SPB Git

Repository Public MIT

manifest.json 3.1 KB 68 lines json

1{2  "accessibility" : [3    "The reveal button is labelled with the action it performs: \"Show password\", then \"Hide password\" (localised).",4    "The button has the platform's minimum hit target and is reachable with the keyboard.",5    "Errors are an icon and a sentence, not colour alone.",6    "The field is marked `privacySensitive()`, so the system can redact it where it redacts private content."7  ],8  "category" : "forms",9  "changelog" : [10    {11      "changes" : [12        "Initial release."13      ],14      "date" : "2026-12-02",15      "version" : "1.0.0"16    }17  ],18  "dependencies" : [19    {20      "id" : "glass-forms-support",21      "version" : "1.0.0"22    },23    {24      "id" : "glass-foundation",25      "version" : "1.0.0"26    }27  ],28  "description" : "Secure field with optional explicit reveal; its content is never logged.",29  "examples" : [30    {31      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassSecureFieldExample: GlassExample {\n    public static let componentID = \"glass-secure-field\"\n    @State private var current = \"\"\n    @State private var new = \"\"\n    @State private var pin = \"\"\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(alignment: .leading, spacing: 20) {\n                GlassSecureField(\"Current password\", text: $current, validation: GlassFieldValidation(.required()))\n\n                GlassSecureField(\n                    \"New password\",\n                    text: $new,\n                    prompt: \"At least 12 characters\",\n                    helper: \"Use a phrase you can remember.\",\n                    content: .newPassword,\n                    allowsReveal: true,\n                    validation: GlassFieldValidation(.required(), .minLength(12)),\n                    validateOn: .always\n                )\n\n                GlassSecureField(\"Device PIN\", text: $pin, allowsReveal: true, errorMessage: pin.isEmpty ? nil : \"Demo: this PIN is always rejected.\")\n\n                // Only the length is ever displayed: the example never prints the secret.\n                Text(\"New password length: \\(new.count)\")\n                    .font(.callout)\n                    .foregroundStyle(.secondary)\n            }\n            .padding()\n        }\n    }\n}\n\n#Preview(\"GlassSecureField\") { GlassSecureFieldExample() }\n",32      "title" : "GlassSecureField example"33    }34  ],35  "files" : [36    {37      "bytes" : 7664,38      "path" : "Forms/Forms/GlassSecureField.swift",39      "sha256" : "137f2029cc372f9b75ee19655510dd0805afc586ad972bf3e5baca8fec993374"40    }41  ],42  "frameworks" : [4344  ],45  "id" : "glass-secure-field",46  "kind" : "content-component",47  "license" : "MIT",48  "minimumOS" : {49    "iOS" : "26.0",50    "iPadOS" : "26.0",51    "macOS" : "26.0"52  },53  "name" : "GlassSecureField",54  "platforms" : [55    "iOS",56    "iPadOS",57    "macOS"58  ],59  "schemaVersion" : 1,60  "sha256" : "909973db0f0bba4a675a83f6403867ba5176132df0063a368526c7da346cd177",61  "symbols" : [62    "GlassSecureContent",63    "GlassSecureFieldReveal",64    "GlassSecureField"65  ],66  "version" : "1.0.0"67}68
Files main
Menu

Theme