SPB Git

Repository Public MIT

manifest.json 3.0 KB 74 lines json

1{2  "accessibility" : [3    "The label is the accessibility label of the editor. While it is empty, the placeholder is read as its value; the painted placeholder itself is hidden from assistive technologies.",4    "The limit counts user-perceived characters: an emoji, a flag or an accented letter counts as one and is never cut in two.",5    "The counter has a spoken form with words, and digits follow the locale.",6    "The minimum height grows with the text size; the editor scrolls inside it."7  ],8  "category" : "forms",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-forms-support",28      "version" : "1.1.0"29    },30    {31      "id" : "glass-foundation",32      "version" : "1.1.0"33    }34  ],35  "description" : "Multiline editor with an accessible placeholder, optional limit and counter.",36  "examples" : [37    {38      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassTextAreaExample: GlassExample {\n    public static let componentID = \"glass-text-area\"\n    @State private var notes = \"\"\n    @State private var bio = \"Hiking 🥾, bread 🍞 and old maps 🗺️.\"\n    @State private var feedback = \"Too short\"\n\n    public init() {}\n\n    public var body: some View {\n        ScrollView {\n            VStack(alignment: .leading, spacing: 20) {\n                GlassTextArea(\"Notes\", text: $notes, placeholder: \"Anything the team should know before the visit\", helper: \"Visible to your team only.\")\n\n                GlassTextArea(\"Short bio\", text: $bio, limit: 40)\n\n                GlassTextArea(\n                    \"Feedback\",\n                    text: $feedback,\n                    showsCounter: true,\n                    minHeight: 72,\n                    errorMessage: feedback.count < 20 ? \"Please write at least 20 characters.\" : nil\n                )\n\n                GlassTextArea(\"Archived comment\", text: .constant(\"This comment can no longer be edited.\"))\n                    .disabled(true)\n            }\n            .padding()\n        }\n    }\n}\n\n#Preview(\"GlassTextArea\") { GlassTextAreaExample().glassTheme(.solar) }\n",39      "title" : "GlassTextArea example"40    }41  ],42  "files" : [43    {44      "bytes" : 7833,45      "path" : "Forms/Forms/GlassTextArea.swift",46      "sha256" : "67557315d95d86fcc3f8b4eaeb46073936ea28d227dea8a6ab0d774d8c378a6b"47    }48  ],49  "frameworks" : [5051  ],52  "id" : "glass-text-area",53  "kind" : "content-component",54  "license" : "MIT",55  "minimumOS" : {56    "iOS" : "26.0",57    "iPadOS" : "26.0",58    "macOS" : "26.0"59  },60  "name" : "GlassTextArea",61  "platforms" : [62    "iOS",63    "iPadOS",64    "macOS"65  ],66  "schemaVersion" : 1,67  "sha256" : "bb4267441df985765ba40cdfb70a5732b48be169b709d0f8925cd3ded636b124",68  "symbols" : [69    "GlassTextLimit",70    "GlassTextArea"71  ],72  "version" : "1.1.0"73}74
Files main
Menu

Theme