shadcn-glass-ui 2.0.11 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -5
- package/README.md +132 -43
- package/context7.json +2 -1
- package/dist/cli/index.cjs +1 -1
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +103 -29
- package/dist/components.js +1 -1
- package/dist/demo-screenshot-aurora.png +0 -0
- package/dist/demo-screenshot.png +0 -0
- package/dist/demo-screenshot.png.zip +0 -0
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/r/ai-card-glass.json +1 -1
- package/dist/r/avatar-glass.json +1 -1
- package/dist/r/badge-glass.json +1 -1
- package/dist/r/button-glass.json +1 -1
- package/dist/r/combobox-glass.json +1 -1
- package/dist/r/registry.json +2 -2
- package/dist/r/repository-card-glass.json +2 -1
- package/dist/r/slider-glass.json +4 -5
- package/dist/r/toggle-glass.json +2 -2
- package/dist/r/year-card-glass.json +1 -1
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-DNe_2vWJ.cjs → theme-context-BHXYJ4RE.cjs} +2 -2
- package/dist/{theme-context-DNe_2vWJ.cjs.map → theme-context-BHXYJ4RE.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/{trust-score-card-glass-Dgu46oWI.cjs → trust-score-card-glass-CGXmOIfq.cjs} +850 -150
- package/dist/trust-score-card-glass-CGXmOIfq.cjs.map +1 -0
- package/dist/{trust-score-card-glass-A7kas5OS.js → trust-score-card-glass-L9g0qamo.js} +1182 -482
- package/dist/trust-score-card-glass-L9g0qamo.js.map +1 -0
- package/dist/{use-focus-BRkQtQCj.cjs → use-focus-CeNHOiBa.cjs} +2 -2
- package/dist/{use-focus-BRkQtQCj.cjs.map → use-focus-CeNHOiBa.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-CfShPBo2.cjs → use-wallpaper-tint-Bt2G3g1v.cjs} +2 -2
- package/dist/{use-wallpaper-tint-CfShPBo2.cjs.map → use-wallpaper-tint-Bt2G3g1v.cjs.map} +1 -1
- package/dist/{utils-BXN7AcRu.cjs → utils-LYxxWvUn.cjs} +2 -2
- package/dist/{utils-BXN7AcRu.cjs.map → utils-LYxxWvUn.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/docs/ADVANCED_PATTERNS.md +584 -0
- package/docs/AI_USAGE.md +135 -611
- package/docs/BEST_PRACTICES.md +2 -2
- package/docs/BREAKING_CHANGES.md +239 -0
- package/docs/COMPONENTS_CATALOG.md +8 -8
- package/docs/EXPORTS_STRUCTURE.md +3 -3
- package/docs/GETTING_STARTED.md +13 -8
- package/docs/PUBLISHING.md +1 -1
- package/docs/REGISTRY_SUMMARY.md +2 -2
- package/docs/REGISTRY_USAGE.md +1 -1
- package/docs/api/README.md +11 -11
- package/docs/api/interfaces/BadgeGlassProps.md +21 -14
- package/docs/api/interfaces/ButtonGlassProps.md +37 -30
- package/package.json +4 -3
- package/dist/trust-score-card-glass-A7kas5OS.js.map +0 -1
- package/dist/trust-score-card-glass-Dgu46oWI.cjs.map +0 -1
- package/dist/vite.svg +0 -1
- package/docs/migration/modal-glass-compound-api.md +0 -458
- package/docs/migration/select-to-combobox.md +0 -386
- package/docs/migration/tabs-glass-compound-api.md +0 -579
package/docs/BEST_PRACTICES.md
CHANGED
|
@@ -306,7 +306,7 @@ function LoginForm() {
|
|
|
306
306
|
error={errors.password}
|
|
307
307
|
placeholder="Enter password"
|
|
308
308
|
/>
|
|
309
|
-
<ButtonGlass type="submit" variant="
|
|
309
|
+
<ButtonGlass type="submit" variant="default" className="w-full">
|
|
310
310
|
Sign In
|
|
311
311
|
</ButtonGlass>
|
|
312
312
|
</form>
|
|
@@ -411,7 +411,7 @@ function CreateProjectModal({ open, onClose, onSubmit }) {
|
|
|
411
411
|
<ButtonGlass variant="ghost" onClick={onClose}>
|
|
412
412
|
Cancel
|
|
413
413
|
</ButtonGlass>
|
|
414
|
-
<ButtonGlass variant="
|
|
414
|
+
<ButtonGlass variant="default" onClick={handleSubmit}>
|
|
415
415
|
Create
|
|
416
416
|
</ButtonGlass>
|
|
417
417
|
</ModalGlass.Footer>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Breaking Changes
|
|
2
|
+
|
|
3
|
+
This document lists breaking changes in shadcn-glass-ui v2.0.0.
|
|
4
|
+
|
|
5
|
+
**Current Version:** 2.0.0 (2025-12-14)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## v2.0.0 — 100% shadcn/ui API Compatibility
|
|
10
|
+
|
|
11
|
+
### Summary
|
|
12
|
+
|
|
13
|
+
v2.0.0 achieves **100% API compatibility with shadcn/ui** by standardizing all component APIs to
|
|
14
|
+
match shadcn/ui conventions exactly. This release also introduces the 3-layer token architecture,
|
|
15
|
+
replacing color-based CSS variable names with semantic names.
|
|
16
|
+
|
|
17
|
+
**Major changes:**
|
|
18
|
+
|
|
19
|
+
1. **Component API migrations** — All components now use shadcn/ui naming (onValueChange, pressed,
|
|
20
|
+
etc.)
|
|
21
|
+
2. **CSS variable renaming** — Color-based names → semantic names
|
|
22
|
+
3. **No backward compatibility** — Legacy APIs removed
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Component API Changes
|
|
27
|
+
|
|
28
|
+
### 1. ButtonGlass
|
|
29
|
+
|
|
30
|
+
**Removed variants:**
|
|
31
|
+
|
|
32
|
+
- `variant="primary"` → Use `variant="default"`
|
|
33
|
+
- `variant="text"` → Use `variant="link"`
|
|
34
|
+
- `size="md"` → Use `size="default"`
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
// Before
|
|
38
|
+
<ButtonGlass variant="primary" size="md">Click me</ButtonGlass>
|
|
39
|
+
<ButtonGlass variant="text">Link</ButtonGlass>
|
|
40
|
+
|
|
41
|
+
// After
|
|
42
|
+
<ButtonGlass variant="default" size="default">Click me</ButtonGlass>
|
|
43
|
+
<ButtonGlass variant="link">Link</ButtonGlass>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### 2. ToggleGlass
|
|
49
|
+
|
|
50
|
+
**Removed:** `checked`, `defaultChecked`, `onChange`
|
|
51
|
+
|
|
52
|
+
**Added:** `pressed`, `defaultPressed`, `onPressedChange`
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
// Before
|
|
56
|
+
<ToggleGlass checked={isOn} onChange={(checked) => setIsOn(checked)} />
|
|
57
|
+
|
|
58
|
+
// After
|
|
59
|
+
<ToggleGlass pressed={isOn} onPressedChange={(pressed) => setIsOn(pressed)} />
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**ARIA changes:** `aria-checked` → `aria-pressed`, `role="checkbox"` → `role="switch"`
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### 3. SliderGlass
|
|
67
|
+
|
|
68
|
+
**Removed:** `value: number`, `defaultValue: number`, `onChange(value: number)`
|
|
69
|
+
|
|
70
|
+
**Added:** `value: number[]`, `defaultValue: number[]`, `onValueChange(value: number[])`
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
// Before
|
|
74
|
+
<SliderGlass value={50} onChange={(val) => setValue(val)} />
|
|
75
|
+
|
|
76
|
+
// After (single value)
|
|
77
|
+
<SliderGlass value={[50]} onValueChange={(val) => setValue(val[0])} />
|
|
78
|
+
|
|
79
|
+
// Range slider (new feature)
|
|
80
|
+
<SliderGlass value={[25, 75]} onValueChange={setRange} />
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**New props:** `onValueCommit`, `orientation`
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### 4. ComboBoxGlass
|
|
88
|
+
|
|
89
|
+
**Removed:** `onChange`
|
|
90
|
+
|
|
91
|
+
**Added:** `onValueChange`
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
// Before
|
|
95
|
+
<ComboBoxGlass options={options} value={value} onChange={setValue} />
|
|
96
|
+
|
|
97
|
+
// After
|
|
98
|
+
<ComboBoxGlass options={options} value={value} onValueChange={setValue} />
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### 5. Compound Components (Required)
|
|
104
|
+
|
|
105
|
+
ModalGlass and TabsGlass require compound component API:
|
|
106
|
+
|
|
107
|
+
**ModalGlass:**
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
<ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
111
|
+
<ModalGlass.Overlay />
|
|
112
|
+
<ModalGlass.Content>
|
|
113
|
+
<ModalGlass.Header>
|
|
114
|
+
<ModalGlass.Title>Title</ModalGlass.Title>
|
|
115
|
+
<ModalGlass.Close />
|
|
116
|
+
</ModalGlass.Header>
|
|
117
|
+
<ModalGlass.Body>Content</ModalGlass.Body>
|
|
118
|
+
</ModalGlass.Content>
|
|
119
|
+
</ModalGlass.Root>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**TabsGlass:**
|
|
123
|
+
|
|
124
|
+
```tsx
|
|
125
|
+
<TabsGlass.Root value={activeTab} onValueChange={setActiveTab}>
|
|
126
|
+
<TabsGlass.List>
|
|
127
|
+
<TabsGlass.Trigger value="tab1">Tab 1</TabsGlass.Trigger>
|
|
128
|
+
</TabsGlass.List>
|
|
129
|
+
<TabsGlass.Content value="tab1">Content</TabsGlass.Content>
|
|
130
|
+
</TabsGlass.Root>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**AlertGlass:**
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
<AlertGlass variant="destructive">
|
|
137
|
+
<AlertGlassTitle>Error</AlertGlassTitle>
|
|
138
|
+
<AlertGlassDescription>Message</AlertGlassDescription>
|
|
139
|
+
</AlertGlass>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## CSS Variables Removed
|
|
145
|
+
|
|
146
|
+
| Removed | Replacement | Semantic Meaning |
|
|
147
|
+
| ------------------------- | ----------------------------- | ---------------- |
|
|
148
|
+
| `--metric-emerald-bg` | `--metric-success-bg` | Success states |
|
|
149
|
+
| `--metric-emerald-text` | `--metric-success-text` | Success states |
|
|
150
|
+
| `--metric-emerald-border` | `--metric-success-border` | Success states |
|
|
151
|
+
| `--metric-emerald-glow` | `--metric-success-glow` | Success states |
|
|
152
|
+
| `--metric-amber-bg` | `--metric-warning-bg` | Warning states |
|
|
153
|
+
| `--metric-amber-text` | `--metric-warning-text` | Warning states |
|
|
154
|
+
| `--metric-amber-border` | `--metric-warning-border` | Warning states |
|
|
155
|
+
| `--metric-amber-glow` | `--metric-warning-glow` | Warning states |
|
|
156
|
+
| `--metric-blue-bg` | `--metric-default-bg` | Neutral/default |
|
|
157
|
+
| `--metric-blue-text` | `--metric-default-text` | Neutral/default |
|
|
158
|
+
| `--metric-blue-border` | `--metric-default-border` | Neutral/default |
|
|
159
|
+
| `--metric-blue-glow` | `--metric-default-glow` | Neutral/default |
|
|
160
|
+
| `--metric-red-bg` | `--metric-destructive-bg` | Error/danger |
|
|
161
|
+
| `--metric-red-text` | `--metric-destructive-text` | Error/danger |
|
|
162
|
+
| `--metric-red-border` | `--metric-destructive-border` | Error/danger |
|
|
163
|
+
| `--metric-red-glow` | `--metric-destructive-glow` | Error/danger |
|
|
164
|
+
|
|
165
|
+
**Total removed:** 16 variables (4 color families × 4 properties)
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Migration Script
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
#!/bin/bash
|
|
173
|
+
|
|
174
|
+
# Component API migrations
|
|
175
|
+
find src/ -type f -name "*.tsx" -exec sed -i '' \
|
|
176
|
+
-e 's/variant="primary"/variant="default"/g' \
|
|
177
|
+
-e 's/variant="text"/variant="link"/g' \
|
|
178
|
+
-e 's/size="md"/size="default"/g' \
|
|
179
|
+
-e 's/\bchecked={/pressed={/g' \
|
|
180
|
+
-e 's/defaultChecked=/defaultPressed=/g' \
|
|
181
|
+
{} +
|
|
182
|
+
|
|
183
|
+
# CSS Variables
|
|
184
|
+
find src/ -type f \( -name "*.tsx" -o -name "*.css" \) -exec sed -i '' \
|
|
185
|
+
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
186
|
+
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
187
|
+
-e 's/--metric-blue-/--metric-default-/g' \
|
|
188
|
+
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
189
|
+
{} +
|
|
190
|
+
|
|
191
|
+
echo "⚠️ Manual review required for:"
|
|
192
|
+
echo " - SliderGlass: value={50} → value={[50]}"
|
|
193
|
+
echo " - ToggleGlass: onChange → onPressedChange"
|
|
194
|
+
echo " - ComboBoxGlass: onChange → onValueChange"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## API Summary Table
|
|
200
|
+
|
|
201
|
+
| Component | Old API | v2.0.0 API | Reason |
|
|
202
|
+
| ----------------- | --------------------- | ---------------------------- | ------------------------ |
|
|
203
|
+
| **ButtonGlass** | `variant="primary"` | `variant="default"` | shadcn/ui convention |
|
|
204
|
+
| **ButtonGlass** | `variant="text"` | `variant="link"` | shadcn/ui convention |
|
|
205
|
+
| **ButtonGlass** | `size="md"` | `size="default"` | shadcn/ui convention |
|
|
206
|
+
| **ToggleGlass** | `checked`, `onChange` | `pressed`, `onPressedChange` | shadcn/ui switch pattern |
|
|
207
|
+
| **SliderGlass** | `value: number` | `value: number[]` | Radix UI + range support |
|
|
208
|
+
| **SliderGlass** | `onChange` | `onValueChange` | shadcn/ui convention |
|
|
209
|
+
| **ComboBoxGlass** | `onChange` | `onValueChange` | shadcn/ui convention |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Why These Changes?
|
|
214
|
+
|
|
215
|
+
1. **shadcn/ui alignment** — Matches standard naming conventions
|
|
216
|
+
2. **Semantic clarity** — Names describe meaning, not appearance
|
|
217
|
+
3. **Component consistency** — Aligns with variant props
|
|
218
|
+
4. **3-layer token architecture** — Primitive → Semantic → Component tokens
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Related Documentation
|
|
223
|
+
|
|
224
|
+
- [TOKEN_ARCHITECTURE.md](TOKEN_ARCHITECTURE.md) — Complete token system guide
|
|
225
|
+
- [CSS_VARIABLES_MIGRATION_2.0.md](migration/CSS_VARIABLES_MIGRATION_2.0.md) — Detailed CSS
|
|
226
|
+
migration
|
|
227
|
+
- [THEME_CREATION_GUIDE.md](THEME_CREATION_GUIDE.md) — Create themes in 15 minutes
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Need Help?
|
|
232
|
+
|
|
233
|
+
- [CHANGELOG.md](../CHANGELOG.md) — Complete version history
|
|
234
|
+
- [GitHub Issues](https://github.com/Yhooi2/shadcn-glass-ui-library/issues) — Report migration
|
|
235
|
+
issues
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
**Last updated:** 2025-12-14
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component Catalog
|
|
2
2
|
|
|
3
|
-
Searchable index of all **
|
|
3
|
+
Searchable index of all **57 components** in shadcn-glass-ui.
|
|
4
4
|
|
|
5
5
|
**v2.0.0 Update:** All components now use the 3-layer token system with semantic CSS variables. Zero
|
|
6
6
|
hardcoded OKLCH values across all components.
|
|
@@ -127,13 +127,13 @@ ripple effect, glow
|
|
|
127
127
|
**Basic:**
|
|
128
128
|
|
|
129
129
|
```tsx
|
|
130
|
-
<ButtonGlass variant="
|
|
130
|
+
<ButtonGlass variant="default">Click me</ButtonGlass>
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
**With Loading State:**
|
|
134
134
|
|
|
135
135
|
```tsx
|
|
136
|
-
<ButtonGlass variant="
|
|
136
|
+
<ButtonGlass variant="default" loading={isLoading} disabled={isLoading}>
|
|
137
137
|
{isLoading ? 'Saving...' : 'Save Changes'}
|
|
138
138
|
</ButtonGlass>
|
|
139
139
|
```
|
|
@@ -222,7 +222,7 @@ effect, accessible **Usage:**
|
|
|
222
222
|
accessible, animated **Usage:**
|
|
223
223
|
|
|
224
224
|
```tsx
|
|
225
|
-
<ToggleGlass
|
|
225
|
+
<ToggleGlass pressed={enabled} onPressedChange={setEnabled} label="Enable notifications" />
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
#### SliderGlass
|
|
@@ -293,7 +293,7 @@ trap, scroll lock, click-outside-to-close
|
|
|
293
293
|
```tsx
|
|
294
294
|
<ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
295
295
|
<ModalGlass.Overlay />
|
|
296
|
-
<ModalGlass.Content size="
|
|
296
|
+
<ModalGlass.Content size="default">
|
|
297
297
|
<ModalGlass.Header>
|
|
298
298
|
<ModalGlass.Title>Create New Project</ModalGlass.Title>
|
|
299
299
|
<ModalGlass.Description>Fill in the details below</ModalGlass.Description>
|
|
@@ -308,7 +308,7 @@ trap, scroll lock, click-outside-to-close
|
|
|
308
308
|
<ButtonGlass variant="ghost" onClick={() => setOpen(false)}>
|
|
309
309
|
Cancel
|
|
310
310
|
</ButtonGlass>
|
|
311
|
-
<ButtonGlass variant="
|
|
311
|
+
<ButtonGlass variant="default" onClick={handleSubmit}>
|
|
312
312
|
Create
|
|
313
313
|
</ButtonGlass>
|
|
314
314
|
</ModalGlass.Footer>
|
|
@@ -868,7 +868,7 @@ Small, specialized components for specific use cases.
|
|
|
868
868
|
**File:** `src/components/glass/atomic/icon-button-glass.tsx` **Sizes:** sm, md, lg, xl **Usage:**
|
|
869
869
|
|
|
870
870
|
```tsx
|
|
871
|
-
<IconButtonGlass size="
|
|
871
|
+
<IconButtonGlass size="default" aria-label="Close">
|
|
872
872
|
<X />
|
|
873
873
|
</IconButtonGlass>
|
|
874
874
|
```
|
|
@@ -1167,5 +1167,5 @@ import { TabsGlass, ButtonGlass } from 'shadcn-glass-ui';
|
|
|
1167
1167
|
|
|
1168
1168
|
---
|
|
1169
1169
|
|
|
1170
|
-
**Total Components:**
|
|
1170
|
+
**Total Components:** 57 **Total Variants:** 100+ **Accessibility:** WCAG 2.1 AA compliant
|
|
1171
1171
|
**TypeScript:** Full type definitions **Themes:** 3 (glass, light, aurora)
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
|
|
211
211
|
```tsx
|
|
212
212
|
// Simple button
|
|
213
|
-
<ButtonGlass variant="default" size="
|
|
213
|
+
<ButtonGlass variant="default" size="default">Click me</ButtonGlass>
|
|
214
214
|
|
|
215
215
|
// Compound Modal API
|
|
216
216
|
<ModalGlass.Root open={open} onOpenChange={setOpen}>
|
|
@@ -693,11 +693,11 @@ import {
|
|
|
693
693
|
- **Level 3 (Specialized):** 10 components
|
|
694
694
|
- **Level 4 (Composite):** 13 components
|
|
695
695
|
- **Level 5 (Sections):** 7 components
|
|
696
|
-
- **Total:**
|
|
696
|
+
- **Total:** 57 components
|
|
697
697
|
|
|
698
698
|
### Export Categories
|
|
699
699
|
|
|
700
|
-
- **Components:**
|
|
700
|
+
- **Components:** 57 total
|
|
701
701
|
- **Types:** 25+ prop types, 15+ variant types
|
|
702
702
|
- **Utilities:** 1 function (`cn`)
|
|
703
703
|
- **Hooks:** 4 custom hooks
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -402,7 +402,7 @@ import { ButtonGlass } from 'shadcn-glass-ui';
|
|
|
402
402
|
export default function Demo() {
|
|
403
403
|
return (
|
|
404
404
|
<div className="theme-glass p-8">
|
|
405
|
-
<ButtonGlass variant="
|
|
405
|
+
<ButtonGlass variant="default" size="default" onClick={() => alert('Clicked!')}>
|
|
406
406
|
Click Me
|
|
407
407
|
</ButtonGlass>
|
|
408
408
|
</div>
|
|
@@ -476,7 +476,7 @@ export default function ProductCard() {
|
|
|
476
476
|
|
|
477
477
|
<div className="flex items-center justify-between pt-4">
|
|
478
478
|
<span className="text-2xl font-bold">$49</span>
|
|
479
|
-
<ButtonGlass variant="
|
|
479
|
+
<ButtonGlass variant="default">Purchase</ButtonGlass>
|
|
480
480
|
</div>
|
|
481
481
|
</div>
|
|
482
482
|
</GlassCard>
|
|
@@ -500,7 +500,12 @@ export default function ModalDemo() {
|
|
|
500
500
|
<div className="theme-glass p-8">
|
|
501
501
|
<ButtonGlass onClick={() => setIsOpen(true)}>Open Modal</ButtonGlass>
|
|
502
502
|
|
|
503
|
-
<ModalGlass
|
|
503
|
+
<ModalGlass
|
|
504
|
+
isOpen={isOpen}
|
|
505
|
+
onClose={() => setIsOpen(false)}
|
|
506
|
+
title="Confirm Action"
|
|
507
|
+
size="default"
|
|
508
|
+
>
|
|
504
509
|
<p className="mb-6">Are you sure you want to proceed?</p>
|
|
505
510
|
|
|
506
511
|
<div className="flex gap-3 justify-end">
|
|
@@ -542,16 +547,16 @@ export default function SettingsPanel() {
|
|
|
542
547
|
|
|
543
548
|
<div className="space-y-4">
|
|
544
549
|
<ToggleGlass
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
setSettings((prev) => ({ ...prev, notifications:
|
|
550
|
+
pressed={settings.notifications}
|
|
551
|
+
onPressedChange={(pressed) =>
|
|
552
|
+
setSettings((prev) => ({ ...prev, notifications: pressed }))
|
|
548
553
|
}
|
|
549
554
|
label="Push Notifications"
|
|
550
555
|
/>
|
|
551
556
|
|
|
552
557
|
<ToggleGlass
|
|
553
|
-
|
|
554
|
-
|
|
558
|
+
pressed={settings.darkMode}
|
|
559
|
+
onPressedChange={(pressed) => setSettings((prev) => ({ ...prev, darkMode: pressed }))}
|
|
555
560
|
label="Dark Mode"
|
|
556
561
|
/>
|
|
557
562
|
|
package/docs/PUBLISHING.md
CHANGED
package/docs/REGISTRY_SUMMARY.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
### Components Available
|
|
14
14
|
|
|
15
|
-
- **Total**:
|
|
15
|
+
- **Total**: 57 components
|
|
16
16
|
- **Categories**:
|
|
17
17
|
- Core UI (18)
|
|
18
18
|
- Atomic (7)
|
|
@@ -40,7 +40,7 @@ npx shadcn@latest add @shadcn-glass-ui/button-glass
|
|
|
40
40
|
|
|
41
41
|
| Metric | Value |
|
|
42
42
|
| --------------- | ------------------------ |
|
|
43
|
-
| Components |
|
|
43
|
+
| Components | 57 |
|
|
44
44
|
| Registry Schema | v4.0 |
|
|
45
45
|
| TypeScript | ✅ Full support |
|
|
46
46
|
| Dependencies | Auto-installed |
|
package/docs/REGISTRY_USAGE.md
CHANGED
|
@@ -76,7 +76,7 @@ function App() {
|
|
|
76
76
|
return (
|
|
77
77
|
<ThemeProvider defaultTheme="glass">
|
|
78
78
|
<div className="p-8 space-y-4">
|
|
79
|
-
<ButtonGlass variant="
|
|
79
|
+
<ButtonGlass variant="default">Click me</ButtonGlass>
|
|
80
80
|
<InputGlass placeholder="Enter text..." />
|
|
81
81
|
</div>
|
|
82
82
|
</ThemeProvider>
|
package/docs/api/README.md
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
[](docs/AI_USAGE.md)
|
|
17
17
|
[](docs/AI_USAGE.md)
|
|
18
18
|
|
|
19
|
-
Glassmorphism UI library for React - AI-friendly with
|
|
19
|
+
Glassmorphism UI library for React - AI-friendly with 57 components, strict TypeScript, and
|
|
20
20
|
comprehensive docs.
|
|
21
21
|
|
|
22
22
|
## ✨ Highlights
|
|
23
23
|
|
|
24
|
-
- 🎨 **
|
|
25
|
-
(
|
|
24
|
+
- 🎨 **57 Components** - Core UI (18) + Atomic (7) + Composite (13) + Sections (7) + Specialized
|
|
25
|
+
(9) + Primitives (3)
|
|
26
26
|
- 🌈 **3 Themes** - Glass (dark glassmorphism), Light (clean minimal), Aurora (gradient glow)
|
|
27
27
|
- 🤖 **AI-Friendly** - Optimized for Claude Code, Copilot, GPT with comprehensive docs
|
|
28
28
|
- 🔮 **Advanced Patterns** - asChild polymorphic rendering, Compound components (Modal, Tabs)
|
|
@@ -103,7 +103,7 @@ function App() {
|
|
|
103
103
|
return (
|
|
104
104
|
<ThemeProvider defaultTheme="glass">
|
|
105
105
|
<div className="p-8 space-y-4">
|
|
106
|
-
<ButtonGlass variant="
|
|
106
|
+
<ButtonGlass variant="default" size="lg">
|
|
107
107
|
Click me
|
|
108
108
|
</ButtonGlass>
|
|
109
109
|
<InputGlass placeholder="Enter text..." />
|
|
@@ -131,7 +131,7 @@ import { Link } from 'react-router-dom';
|
|
|
131
131
|
</ButtonGlass>
|
|
132
132
|
|
|
133
133
|
// Render button as anchor
|
|
134
|
-
<ButtonGlass asChild variant="
|
|
134
|
+
<ButtonGlass asChild variant="default">
|
|
135
135
|
<a href="https://example.com" target="_blank">
|
|
136
136
|
External Link
|
|
137
137
|
</a>
|
|
@@ -163,7 +163,7 @@ import { ModalGlass, TabsGlass } from 'shadcn-glass-ui';
|
|
|
163
163
|
</ModalGlass.Body>
|
|
164
164
|
<ModalGlass.Footer>
|
|
165
165
|
<ButtonGlass onClick={() => setOpen(false)}>Cancel</ButtonGlass>
|
|
166
|
-
<ButtonGlass variant="
|
|
166
|
+
<ButtonGlass variant="default">Confirm</ButtonGlass>
|
|
167
167
|
</ModalGlass.Footer>
|
|
168
168
|
</ModalGlass.Content>
|
|
169
169
|
</ModalGlass.Root>
|
|
@@ -282,10 +282,10 @@ support.
|
|
|
282
282
|
|
|
283
283
|
Detailed migration guides are available in the [docs/migration/](../../docs/migration) directory:
|
|
284
284
|
|
|
285
|
-
- **[
|
|
286
|
-
|
|
287
|
-
- **[
|
|
288
|
-
|
|
285
|
+
- **[Compound Components v2](../../docs/migration/compound-components-v2.md)** - Compound component
|
|
286
|
+
patterns
|
|
287
|
+
- **[CSS Variables v2.0](../../docs/migration/CSS_VARIABLES_MIGRATION_2.0.md)** - Token migration
|
|
288
|
+
guide
|
|
289
289
|
|
|
290
290
|
### Changelog
|
|
291
291
|
|
|
@@ -404,7 +404,7 @@ individual components from the categories above.
|
|
|
404
404
|
|
|
405
405
|
Complete application examples showcasing all components:
|
|
406
406
|
|
|
407
|
-
- **ComponentShowcase** - Interactive demo of all
|
|
407
|
+
- **ComponentShowcase** - Interactive demo of all 57 components with theme switching
|
|
408
408
|
- **DesktopShowcase** - GitHub Analytics desktop application mockup with glassmorphism design
|
|
409
409
|
- **MobileShowcase** - Mobile-optimized GitHub profile view with responsive layout
|
|
410
410
|
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
[**shadcn-glass-ui API Reference v1.0.7**](../README.md)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
---
|
|
4
4
|
|
|
5
5
|
[shadcn-glass-ui API Reference](../globals.md) / BadgeGlassProps
|
|
6
6
|
|
|
7
7
|
# Interface: BadgeGlassProps
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in:
|
|
10
|
+
[src/components/glass/ui/badge-glass.tsx:141](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/926c43a35b985ce0dee6d96ce88a1fc3d72f4d67/src/components/glass/ui/badge-glass.tsx#L141)
|
|
10
11
|
|
|
11
12
|
Props for the BadgeGlass component
|
|
12
13
|
|
|
13
|
-
A glass-themed badge with semantic variants and optional animated status dot.
|
|
14
|
-
|
|
14
|
+
A glass-themed badge with semantic variants and optional animated status dot. Features shadcn/ui
|
|
15
|
+
compatible variants plus extended Glass UI variants.
|
|
15
16
|
|
|
16
17
|
## Accessibility
|
|
17
18
|
|
|
18
19
|
- **Keyboard Navigation:** Badges are non-interactive by default (display-only)
|
|
19
20
|
- **Focus Management:** N/A - badges do not receive focus unless wrapped in interactive elements
|
|
20
21
|
- **Screen Readers:** Semantic `<span>` element, content announced naturally
|
|
21
|
-
- **Status Indicators:** Use `aria-label` to provide context for status badges (e.g., "Status:
|
|
22
|
+
- **Status Indicators:** Use `aria-label` to provide context for status badges (e.g., "Status:
|
|
23
|
+
Active")
|
|
22
24
|
- **Animated Dot:** Pulse animation respects `prefers-reduced-motion` settings
|
|
23
25
|
- **Touch Targets:** N/A for display badges, ensure 44x44px if wrapping in button/link (WCAG 2.5.5)
|
|
24
26
|
- **Color Contrast:** All variant text meets WCAG AA contrast ratio 4.5:1 against badge background
|
|
@@ -56,7 +58,7 @@ Features shadcn/ui compatible variants plus extended Glass UI variants.
|
|
|
56
58
|
|
|
57
59
|
// Size variants
|
|
58
60
|
<BadgeGlass size="sm">Small</BadgeGlass>
|
|
59
|
-
<BadgeGlass size="
|
|
61
|
+
<BadgeGlass size="default">Medium</BadgeGlass>
|
|
60
62
|
<BadgeGlass size="lg">Large</BadgeGlass>
|
|
61
63
|
|
|
62
64
|
// Inside interactive elements (ensure accessible labels)
|
|
@@ -75,7 +77,8 @@ Features shadcn/ui compatible variants plus extended Glass UI variants.
|
|
|
75
77
|
|
|
76
78
|
## Extends
|
|
77
79
|
|
|
78
|
-
- `Omit`\<`React.HTMLAttributes`\<`HTMLSpanElement`\>, `"style"`\>.`VariantProps
|
|
80
|
+
- `Omit`\<`React.HTMLAttributes`\<`HTMLSpanElement`\>, `"style"`\>.`VariantProps`\<_typeof_
|
|
81
|
+
[`badgeVariants`](../variables/badgeVariants.md)\>
|
|
79
82
|
|
|
80
83
|
## Properties
|
|
81
84
|
|
|
@@ -83,35 +86,39 @@ Features shadcn/ui compatible variants plus extended Glass UI variants.
|
|
|
83
86
|
|
|
84
87
|
> `readonly` **children**: `ReactNode`
|
|
85
88
|
|
|
86
|
-
Defined in:
|
|
89
|
+
Defined in:
|
|
90
|
+
[src/components/glass/ui/badge-glass.tsx:144](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/926c43a35b985ce0dee6d96ce88a1fc3d72f4d67/src/components/glass/ui/badge-glass.tsx#L144)
|
|
87
91
|
|
|
88
92
|
#### Overrides
|
|
89
93
|
|
|
90
94
|
`Omit.children`
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
---
|
|
93
97
|
|
|
94
98
|
### variant?
|
|
95
99
|
|
|
96
100
|
> `readonly` `optional` **variant**: [`BadgeVariant`](../type-aliases/BadgeVariant.md)
|
|
97
101
|
|
|
98
|
-
Defined in:
|
|
102
|
+
Defined in:
|
|
103
|
+
[src/components/glass/ui/badge-glass.tsx:145](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/926c43a35b985ce0dee6d96ce88a1fc3d72f4d67/src/components/glass/ui/badge-glass.tsx#L145)
|
|
99
104
|
|
|
100
|
-
|
|
105
|
+
---
|
|
101
106
|
|
|
102
107
|
### dot?
|
|
103
108
|
|
|
104
109
|
> `readonly` `optional` **dot**: `boolean`
|
|
105
110
|
|
|
106
|
-
Defined in:
|
|
111
|
+
Defined in:
|
|
112
|
+
[src/components/glass/ui/badge-glass.tsx:146](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/926c43a35b985ce0dee6d96ce88a1fc3d72f4d67/src/components/glass/ui/badge-glass.tsx#L146)
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
---
|
|
109
115
|
|
|
110
116
|
### size?
|
|
111
117
|
|
|
112
118
|
> `optional` **size**: `"sm"` \| `"md"` \| `"lg"` \| `null`
|
|
113
119
|
|
|
114
|
-
Defined in:
|
|
120
|
+
Defined in:
|
|
121
|
+
[src/lib/variants/badge-glass-variants.ts:24](https://github.com/Yhooi2/shadcn-glass-ui-library/blob/926c43a35b985ce0dee6d96ce88a1fc3d72f4d67/src/lib/variants/badge-glass-variants.ts#L24)
|
|
115
122
|
|
|
116
123
|
#### Inherited from
|
|
117
124
|
|