SPB Git

Repository Public MIT

manifest.json 3.4 KB 75 lines json

1{2  "accessibility" : [3    "VoiceOver reads the severity word, the title and the message as one element; the symbol is hidden because the word says the same thing.",4    "The action and dismiss buttons are separate elements with labels and the minimum hit target; the action is underlined so that it is recognisable without colour.",5    "Text wraps and follows Dynamic Type; the symbol aligns to the top so long messages stay readable.",6    "For an error that appears while the user is elsewhere on screen, also post an announcement or move focus: the banner does not announce itself."7  ],8  "category" : "feedback",9  "changelog" : [10    {11      "changes" : [12        "Release 1.1.0: see the project changelog."13      ],14      "date" : "2026-12-03",15      "version" : "1.1.0"16    },17    {18      "changes" : [19        "Initial release."20      ],21      "date" : "2026-12-02",22      "version" : "1.0.0"23    }24  ],25  "dependencies" : [26    {27      "id" : "glass-components-support",28      "version" : "1.1.0"29    },30    {31      "id" : "glass-foundation",32      "version" : "1.1.0"33    }34  ],35  "description" : "Inline information, success, warning or error message with icon, text and dismissal.",36  "examples" : [37    {38      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassBannerExample: GlassExample {\n    public static let componentID = \"glass-banner\"\n    @State private var showsWarning = true\n    @State private var retryCount = 0\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(spacing: 12) {\n                GlassBanner(.information, title: \"Maintenance on Sunday\", message: \"The sample service will be read-only from 2:00 to 4:00.\")\n                GlassBanner(.success, title: \"Payment received\")\n                if showsWarning {\n                    GlassBanner(\n                        .warning,\n                        title: \"Your card expires soon\",\n                        message: \"Update your payment method before the end of the month to avoid an interruption.\",\n                        action: GlassBannerAction(\"Update card\") { showsWarning = false },\n                        onDismiss: { showsWarning = false }\n                    )\n                }\n                GlassBanner(\n                    .error,\n                    verbatim: \"Synchronisation failed (attempt \\(retryCount + 1))\",\n                    message: \"The server did not answer.\",\n                    action: GlassBannerAction(\"Retry\") { retryCount += 1 }\n                )\n            }\n            .padding()\n        }\n    }\n}\n\n#Preview(\"GlassBanner\") { GlassBannerExample().glassTheme(.emerald) }\n",39      "title" : "GlassBanner example"40    }41  ],42  "files" : [43    {44      "bytes" : 9141,45      "path" : "Components/Feedback/GlassBanner.swift",46      "sha256" : "8c46d51d07cbbda879b03d2ac108bcfcca66d04785688f8b9411c717c1bc22ea"47    }48  ],49  "frameworks" : [5051  ],52  "id" : "glass-banner",53  "kind" : "content-component",54  "license" : "MIT",55  "minimumOS" : {56    "iOS" : "26.0",57    "iPadOS" : "26.0",58    "macOS" : "26.0"59  },60  "name" : "GlassBanner",61  "platforms" : [62    "iOS",63    "iPadOS",64    "macOS"65  ],66  "schemaVersion" : 1,67  "sha256" : "844d5941ce4cd958a8715781410377e2a0c1c788c74e7c164669ec49a852f24d",68  "symbols" : [69    "GlassBannerSeverity",70    "GlassBannerAction",71    "GlassBanner"72  ],73  "version" : "1.1.0"74}75
Files main
Menu

Theme