SPB Git

Repository Public MIT

manifest.json 3.1 KB 65 lines json

1{2  "accessibility" : [3    "The panel is an accessibility container named by its title; the title has the header trait.",4    "The close button is labelled \"Close\" (localised) and has the minimum hit target.",5    "macOS: the panel is a focus scope and a focus section, so Tab and arrow keys move among its controls as a group. Escape calls `onClose` while focus is inside the panel.",6    "iOS and iPadOS with a hardware keyboard: Escape triggers the close button (`.keyboardShortcut(.cancelAction)`).",7    "The resize handle is focusable (arrow keys resize by one spacing step), is announced as \"Resize panel\" with the current size as its value, and supports the VoiceOver adjustable action.",8    "With Reduce Transparency the surface is opaque (handled by `glassSurface`)."9  ],10  "category" : "containers",11  "changelog" : [12    {13      "changes" : [14        "Initial release."15      ],16      "date" : "2026-12-02",17      "version" : "1.0.0"18    }19  ],20  "dependencies" : [21    {22      "id" : "glass-foundation",23      "version" : "1.0.0"24    }25  ],26  "description" : "Floating panel of actions, resizable on macOS, with managed focus.",27  "examples" : [28    {29      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassPanelExample: GlassExample {\n    public static let componentID = \"glass-panel\"\n    @State private var isShown = true\n    @State private var showsTransit = true\n    @State private var showsTraffic = false\n    @State private var size = CGSize(width: 300, height: 220)\n\n    public init() {}\n\n    public var body: some View {\n        ZStack {\n            LinearGradient(colors: [.teal, .indigo], startPoint: .topLeading, endPoint: .bottomTrailing)\n                .ignoresSafeArea()\n                .accessibilityHidden(true)\n            if isShown {\n                GlassPanel(\n                    \"Layers\",\n                    size: $size,\n                    sizeLimits: GlassPanelSizeLimits(minimum: CGSize(width: 240, height: 180), maximum: CGSize(width: 480, height: 360)),\n                    onClose: { isShown = false }\n                ) {\n                    Toggle(\"Transit\", isOn: $showsTransit)\n                    Toggle(\"Traffic\", isOn: $showsTraffic)\n                }\n                .padding()\n            } else {\n                GlassButton(\"Show layers\", systemImage: \"square.3.layers.3d\") { isShown = true }\n            }\n        }\n    }\n}\n\n#Preview(\"GlassPanel\") { GlassPanelExample() }\n",30      "title" : "GlassPanel example"31    }32  ],33  "files" : [34    {35      "bytes" : 10388,36      "path" : "Components/Containers/GlassPanel.swift",37      "sha256" : "e655adafdd231ed718c386a22531eeb2346bd1a5665f1597f0bb56724a077706"38    }39  ],40  "frameworks" : [4142  ],43  "id" : "glass-panel",44  "kind" : "custom-glass",45  "license" : "MIT",46  "minimumOS" : {47    "iOS" : "26.0",48    "iPadOS" : "26.0",49    "macOS" : "26.0"50  },51  "name" : "GlassPanel",52  "platforms" : [53    "iOS",54    "iPadOS",55    "macOS"56  ],57  "schemaVersion" : 1,58  "sha256" : "4495de856fdfb013152b77846d7c9f01757967cdf8aa3ca07627dd5e8355e23a",59  "symbols" : [60    "GlassPanelSizeLimits",61    "GlassPanel"62  ],63  "version" : "1.0.0"64}65
Files main
Menu

Theme