SPB Git

Repository Public MIT

manifest.json 3.3 KB 71 lines json

1{2  "accessibility" : [3    "`DisclosureGroup` exposes each header as a control with its expanded or collapsed state, and handles Space, Return and the arrow keys on macOS.",4    "With Reduce Motion (real or simulated) sections open and close at once, without the sliding reveal; otherwise the theme's standard animation is used.",5    "Dividers are hidden from accessibility."6  ],7  "category" : "containers",8  "changelog" : [9    {10      "changes" : [11        "Release 1.1.0: see the project changelog."12      ],13      "date" : "2026-12-03",14      "version" : "1.1.0"15    },16    {17      "changes" : [18        "Initial release."19      ],20      "date" : "2026-12-02",21      "version" : "1.0.0"22    }23  ],24  "dependencies" : [25    {26      "id" : "glass-foundation",27      "version" : "1.1.0"28    }29  ],30  "description" : "Disclosure sections with controlled expansion and Reduce Motion support.",31  "examples" : [32    {33      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassAccordionExample: GlassExample {\n    public static let componentID = \"glass-accordion\"\n\n    private struct Question: Identifiable {\n        let id: String\n        let title: String\n        let answer: String\n    }\n\n    private let questions = [\n        Question(id: \"delivery\", title: \"How long does delivery take?\", answer: \"Two to four working days for this sample shop.\"),\n        Question(id: \"returns\", title: \"Can I return an item?\", answer: \"Yes, within 30 days, in its original packaging.\"),\n        Question(id: \"unicode\", title: \"Les accents et les émojis passent-ils ? 🎉\", answer: \"Oui : « é », « ñ », « 日本語 » et le texte de droite à gauche (مرحبا) s'affichent sans casser la mise en page.\"),\n    ]\n    @State private var expanded: Set<String> = [\"delivery\"]\n    @State private var singleMode = true\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(alignment: .leading, spacing: 16) {\n                Toggle(\"One section at a time\", isOn: $singleMode)\n                GlassAccordion(questions, expanded: $expanded, mode: singleMode ? .single : .multiple, style: .grouped) { question in\n                    Text(question.title)\n                } content: { question in\n                    Text(question.answer)\n                }\n                Text(\"\\(expanded.count) open\").font(.caption).foregroundStyle(.secondary)\n            }\n            .padding()\n        }\n    }\n}\n\n#Preview(\"GlassAccordion\") { GlassAccordionExample() }\n",34      "title" : "GlassAccordion example"35    }36  ],37  "files" : [38    {39      "bytes" : 7728,40      "path" : "Components/Containers/GlassAccordion.swift",41      "sha256" : "3993181b2daa1a7dd6340a9d0f0f3aa58ed24c5d857401683f2705ec8b260c54"42    }43  ],44  "frameworks" : [4546  ],47  "id" : "glass-accordion",48  "kind" : "native-wrapper",49  "license" : "MIT",50  "minimumOS" : {51    "iOS" : "26.0",52    "iPadOS" : "26.0",53    "macOS" : "26.0"54  },55  "name" : "GlassAccordion",56  "platforms" : [57    "iOS",58    "iPadOS",59    "macOS"60  ],61  "schemaVersion" : 1,62  "sha256" : "f6d7897fcc33fac4e0424359bc48b7f4818c3acbcdb077e46d70fc7d2437bf96",63  "symbols" : [64    "GlassAccordionMode",65    "GlassAccordionStyle",66    "GlassAccordionReducer",67    "GlassAccordion"68  ],69  "version" : "1.1.0"70}71
Files main
Menu

Theme