SPB Git

Repository Public MIT

manifest.json 3.3 KB 75 lines json

1{2  "accessibility" : [3    "The title is the accessibility label; a custom label must contain text or set `.accessibilityLabel`.",4    "The label of a prominent button stays legible on a light fill: when the theme's `primary` (or `destructive`) colour is pale in the current appearance, as in Obsidian's dark appearance, the label takes a near-black instead of the system's white (`GlassButtonContrast` holds the rule: white is kept while its contrast on the fill is at least 2.5). `glassButtonLabelContrast(_:role:)` applies the same rule to a label of your own.",5    "Text follows Dynamic Type and wraps instead of truncating.",6    "The loading state is exposed as an accessibility value, not by the spinner alone.",7    "The destructive role is conveyed by the system role, not only by colour."8  ],9  "category" : "buttons",10  "changelog" : [11    {12      "changes" : [13        "Release 1.1.0: see the project changelog."14      ],15      "date" : "2026-12-03",16      "version" : "1.1.0"17    },18    {19      "changes" : [20        "Initial release."21      ],22      "date" : "2026-12-02",23      "version" : "1.0.0"24    }25  ],26  "dependencies" : [27    {28      "id" : "glass-components-support",29      "version" : "1.1.0"30    },31    {32      "id" : "glass-foundation",33      "version" : "1.1.0"34    }35  ],36  "description" : "Button using the system glass styles, with destructive role, loading and disabled states.",37  "examples" : [38    {39      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassButtonExample: GlassExample {\n    public static let componentID = \"glass-button\"\n    @State private var isSaving = false\n    @State private var saveCount = 0\n\n    public init() {}\n\n    public var body: some View {\n        VStack(spacing: 16) {\n            GlassButton(\"Save changes\", systemImage: \"checkmark\", variant: .prominent, isLoading: isSaving) {\n                isSaving = true\n                saveCount += 1\n            }\n            GlassButton(\"Duplicate\", systemImage: \"plus.square.on.square\") { saveCount += 1 }\n            GlassButton(\"Delete draft\", systemImage: \"trash\", role: .destructive) { saveCount = 0 }\n            GlassButton(\"Unavailable\", size: .small) {}\n                .disabled(true)\n            GlassButton(variant: .regular, size: .large) {\n                isSaving = false\n            } label: {\n                VStack {\n                    Text(\"Reset\")\n                    Text(\"Saved \\(saveCount) times\").font(.caption)\n                }\n            }\n        }\n        .padding()\n    }\n}\n\n#Preview(\"GlassButton\") { GlassButtonExample().glassTheme(.aurora) }\n",40      "title" : "GlassButton example"41    }42  ],43  "files" : [44    {45      "bytes" : 5326,46      "path" : "Components/Buttons/GlassButton.swift",47      "sha256" : "3acb39de5e385c8a6b4ea79ae1df4b697de161082b290fde67779fecc80ce931"48    }49  ],50  "frameworks" : [5152  ],53  "id" : "glass-button",54  "kind" : "native-wrapper",55  "license" : "MIT",56  "minimumOS" : {57    "iOS" : "26.0",58    "iPadOS" : "26.0",59    "macOS" : "26.0"60  },61  "name" : "GlassButton",62  "platforms" : [63    "iOS",64    "iPadOS",65    "macOS"66  ],67  "schemaVersion" : 1,68  "sha256" : "295a9de6d02f330ae16dda81dced7b5865d25f0b0e6b3257f5d17c0858d2a0f1",69  "symbols" : [70    "GlassButton",71    "GlassButtonLabel"72  ],73  "version" : "1.1.0"74}75
Files main
Menu

Theme