shadcn-glass-ui 1.0.10 → 2.0.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 +259 -16
- package/README.md +248 -28
- package/context7.json +58 -0
- package/dist/cli/index.cjs +470 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.ts +18 -0
- package/dist/cli/index.js +469 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/components.cjs +4 -4
- package/dist/components.d.ts +153 -22
- package/dist/components.js +2 -2
- package/dist/hooks.cjs +2 -2
- package/dist/index.cjs +872 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -2390
- package/dist/index.js +844 -3
- package/dist/index.js.map +1 -1
- package/dist/r/ai-card-glass.json +5 -12
- package/dist/r/avatar-glass.json +5 -15
- package/dist/r/circular-metric-glass.json +5 -11
- package/dist/r/circular-progress-glass.json +5 -12
- package/dist/r/combobox-glass.json +5 -13
- package/dist/r/flag-alert-glass.json +5 -11
- package/dist/r/flags-section-glass.json +5 -12
- package/dist/r/insight-card-glass.json +17 -0
- package/dist/r/interactive-card.json +5 -12
- package/dist/r/language-bar-glass.json +5 -11
- package/dist/r/metric-card-glass.json +6 -13
- package/dist/r/metrics-grid-glass.json +5 -11
- package/dist/r/modal-glass.json +5 -15
- package/dist/r/popover-glass.json +1 -1
- package/dist/r/progress-glass.json +5 -13
- package/dist/r/registry.json +20 -2
- package/dist/r/segmented-control-glass.json +5 -11
- package/dist/r/sparkline-glass.json +17 -0
- package/dist/r/stepper-glass.json +33 -0
- package/dist/r/tabs-glass.json +4 -9
- package/dist/r/trust-score-card-glass.json +5 -12
- package/dist/r/year-card-glass.json +5 -13
- package/dist/shadcn-glass-ui.css +1 -1
- package/dist/{theme-context-XtasSxRT.cjs → theme-context-CVW50BKW.cjs} +2 -2
- package/dist/{theme-context-XtasSxRT.cjs.map → theme-context-CVW50BKW.cjs.map} +1 -1
- package/dist/themes.cjs +1 -1
- package/dist/trust-score-card-glass-BcZbul0P.js +26895 -0
- package/dist/trust-score-card-glass-BcZbul0P.js.map +1 -0
- package/dist/trust-score-card-glass-r3qM09Jp.cjs +27689 -0
- package/dist/trust-score-card-glass-r3qM09Jp.cjs.map +1 -0
- package/dist/{use-focus-BbpE2qGq.cjs → use-focus-ZE8ozmZE.cjs} +2 -2
- package/dist/{use-focus-BbpE2qGq.cjs.map → use-focus-ZE8ozmZE.cjs.map} +1 -1
- package/dist/{use-wallpaper-tint-CIqtoETa.cjs → use-wallpaper-tint-BuS80tbN.cjs} +2 -2
- package/dist/{use-wallpaper-tint-CIqtoETa.cjs.map → use-wallpaper-tint-BuS80tbN.cjs.map} +1 -1
- package/dist/{utils-CGCOTvxT.js → utils-CcyeqpKQ.js} +1 -1
- package/dist/{utils-CGCOTvxT.js.map → utils-CcyeqpKQ.js.map} +1 -1
- package/dist/{utils-CriE74ig.cjs → utils-DLXayspX.cjs} +2 -2
- package/dist/{utils-CriE74ig.cjs.map → utils-DLXayspX.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/docs/AI_IMPROVEMENTS_COMPLETE.md +574 -0
- package/docs/AI_USAGE.md +1328 -0
- package/docs/API_PATTERNS_COMPARISON.md +418 -0
- package/docs/BEST_PRACTICES.md +800 -0
- package/docs/COMPLIANCE_CHECKLIST.md +307 -0
- package/docs/COMPLIANCE_TESTING.md +436 -0
- package/docs/COMPONENTS_CATALOG.md +1076 -0
- package/docs/CSS_VARIABLES_AUDIT.md +306 -0
- package/docs/CSS_VARIABLES_REFACTORING_PLAN.md +330 -0
- package/docs/EXPORTS_MAP.json +875 -0
- package/docs/EXPORTS_STRUCTURE.md +729 -0
- package/docs/GETTING_STARTED.md +655 -0
- package/docs/METRIC_CARD_API_REDESIGN.md +354 -0
- package/docs/PRIMITIVE_MAPPING.md +404 -0
- package/docs/PUBLISHING.md +593 -0
- package/docs/REGISTRY_SUMMARY.md +96 -0
- package/docs/REGISTRY_USAGE.md +339 -0
- package/docs/SECURITY.md +117 -0
- package/docs/THEME_CREATION_GUIDE.md +455 -0
- package/docs/TOKEN_ARCHITECTURE.md +365 -0
- package/docs/announcements/v1.0.5-devto.md +363 -0
- package/docs/announcements/v1.0.5-reddit.md +115 -0
- package/docs/announcements/v1.0.5-twitter.md +70 -0
- package/docs/api/README.md +725 -0
- package/docs/api/functions/ThemeProvider.md +21 -0
- package/docs/api/functions/cn.md +27 -0
- package/docs/api/functions/getNextTheme.md +21 -0
- package/docs/api/functions/getThemeConfig.md +21 -0
- package/docs/api/functions/useFocus.md +53 -0
- package/docs/api/functions/useHover.md +47 -0
- package/docs/api/functions/useResponsive.md +31 -0
- package/docs/api/functions/useTheme.md +15 -0
- package/docs/api/functions/useWallpaperTint.md +36 -0
- package/docs/api/globals.md +139 -0
- package/docs/api/interfaces/AlertGlassProps.md +131 -0
- package/docs/api/interfaces/AvatarGlassProps.md +114 -0
- package/docs/api/interfaces/BadgeGlassProps.md +118 -0
- package/docs/api/interfaces/ButtonGlassProps.md +179 -0
- package/docs/api/interfaces/CheckboxGlassProps.md +125 -0
- package/docs/api/interfaces/DropdownGlassProps.md +123 -0
- package/docs/api/interfaces/DropdownItem.md +53 -0
- package/docs/api/interfaces/GlassCardProps.md +151 -0
- package/docs/api/interfaces/InputGlassProps.md +169 -0
- package/docs/api/interfaces/NotificationGlassProps.md +67 -0
- package/docs/api/interfaces/ProgressGlassProps.md +49 -0
- package/docs/api/interfaces/SkeletonGlassProps.md +41 -0
- package/docs/api/interfaces/SliderGlassProps.md +107 -0
- package/docs/api/interfaces/TabItem.md +25 -0
- package/docs/api/interfaces/ThemeConfig.md +25 -0
- package/docs/api/interfaces/ThemeContextValue.md +47 -0
- package/docs/api/interfaces/ToggleGlassProps.md +59 -0
- package/docs/api/interfaces/TooltipGlassProps.md +119 -0
- package/docs/api/type-aliases/AlertType.md +11 -0
- package/docs/api/type-aliases/AlertVariant.md +11 -0
- package/docs/api/type-aliases/AvatarSize.md +11 -0
- package/docs/api/type-aliases/AvatarStatus.md +13 -0
- package/docs/api/type-aliases/BadgeSize.md +11 -0
- package/docs/api/type-aliases/BadgeVariant.md +11 -0
- package/docs/api/type-aliases/ButtonGlassSize.md +11 -0
- package/docs/api/type-aliases/ButtonGlassVariant.md +11 -0
- package/docs/api/type-aliases/DropdownAlign.md +11 -0
- package/docs/api/type-aliases/GlowType.md +11 -0
- package/docs/api/type-aliases/InputGlassSize.md +11 -0
- package/docs/api/type-aliases/IntensityType.md +11 -0
- package/docs/api/type-aliases/ModalSize.md +11 -0
- package/docs/api/type-aliases/NotificationType.md +11 -0
- package/docs/api/type-aliases/PaddingType.md +11 -0
- package/docs/api/type-aliases/ProgressGradient.md +11 -0
- package/docs/api/type-aliases/ProgressSize.md +11 -0
- package/docs/api/type-aliases/SkeletonVariant.md +11 -0
- package/docs/api/type-aliases/Theme.md +11 -0
- package/docs/api/type-aliases/ToggleGlassSize.md +11 -0
- package/docs/api/type-aliases/TooltipPosition.md +11 -0
- package/docs/api/variables/AICardGlass.md +11 -0
- package/docs/api/variables/AlertGlass.md +11 -0
- package/docs/api/variables/AvatarGlass.md +11 -0
- package/docs/api/variables/BadgeGlass.md +11 -0
- package/docs/api/variables/BaseProgressGlass.md +11 -0
- package/docs/api/variables/ButtonGlass.md +11 -0
- package/docs/api/variables/CareerStatsGlass.md +11 -0
- package/docs/api/variables/CareerStatsHeaderGlass.md +11 -0
- package/docs/api/variables/CheckboxGlass.md +11 -0
- package/docs/api/variables/CircularMetricGlass.md +22 -0
- package/docs/api/variables/CircularProgressGlass.md +11 -0
- package/docs/api/variables/ComboBoxGlass.md +27 -0
- package/docs/api/variables/ContributionMetricsGlass.md +11 -0
- package/docs/api/variables/DropdownGlass.md +11 -0
- package/docs/api/variables/ExpandableHeaderGlass.md +11 -0
- package/docs/api/variables/FlagAlertGlass.md +11 -0
- package/docs/api/variables/FlagsSectionGlass.md +11 -0
- package/docs/api/variables/FormFieldWrapper.md +44 -0
- package/docs/api/variables/GlassCard.md +11 -0
- package/docs/api/variables/HeaderBrandingGlass.md +11 -0
- package/docs/api/variables/HeaderNavGlass.md +11 -0
- package/docs/api/variables/IconButtonGlass.md +11 -0
- package/docs/api/variables/InputGlass.md +11 -0
- package/docs/api/variables/InteractiveCard.md +45 -0
- package/docs/api/variables/LanguageBarGlass.md +11 -0
- package/docs/api/variables/MetricCardGlass.md +11 -0
- package/docs/api/variables/MetricsGridGlass.md +11 -0
- package/docs/api/variables/ModalGlass.md +72 -0
- package/docs/api/variables/NotificationGlass.md +11 -0
- package/docs/api/variables/PopoverGlass.md +11 -0
- package/docs/api/variables/ProfileAvatarGlass.md +11 -0
- package/docs/api/variables/ProfileHeaderGlass.md +11 -0
- package/docs/api/variables/ProgressGlass.md +11 -0
- package/docs/api/variables/ProjectsListGlass.md +11 -0
- package/docs/api/variables/RainbowProgressGlass.md +11 -0
- package/docs/api/variables/RepositoryCardGlass.md +11 -0
- package/docs/api/variables/RepositoryHeaderGlass.md +11 -0
- package/docs/api/variables/RepositoryMetadataGlass.md +11 -0
- package/docs/api/variables/SearchBoxGlass.md +11 -0
- package/docs/api/variables/SegmentedControlGlass.md +11 -0
- package/docs/api/variables/SkeletonGlass.md +11 -0
- package/docs/api/variables/SliderGlass.md +11 -0
- package/docs/api/variables/SortDropdownGlass.md +11 -0
- package/docs/api/variables/StatItemGlass.md +11 -0
- package/docs/api/variables/StatusIndicatorGlass.md +11 -0
- package/docs/api/variables/THEMES.md +11 -0
- package/docs/api/variables/THEME_CONFIG.md +11 -0
- package/docs/api/variables/TabsGlass.md +52 -0
- package/docs/api/variables/ThemeToggleGlass.md +11 -0
- package/docs/api/variables/ToggleGlass.md +11 -0
- package/docs/api/variables/TooltipGlass.md +11 -0
- package/docs/api/variables/TouchTarget.md +35 -0
- package/docs/api/variables/TrustScoreCardGlass.md +11 -0
- package/docs/api/variables/TrustScoreDisplayGlass.md +11 -0
- package/docs/api/variables/UserInfoGlass.md +11 -0
- package/docs/api/variables/UserStatsLineGlass.md +11 -0
- package/docs/api/variables/YearCardGlass.md +11 -0
- package/docs/api/variables/alertVariants.md +21 -0
- package/docs/api/variables/avatarSizes.md +21 -0
- package/docs/api/variables/badgeVariants.md +21 -0
- package/docs/api/variables/buttonGlassVariants.md +21 -0
- package/docs/api/variables/cardIntensity.md +21 -0
- package/docs/api/variables/dropdownAlign.md +21 -0
- package/docs/api/variables/inputVariants.md +21 -0
- package/docs/api/variables/modalSizes.md +21 -0
- package/docs/api/variables/notificationVariants.md +21 -0
- package/docs/api/variables/progressSizes.md +21 -0
- package/docs/api/variables/shadcnAlertVariants.md +21 -0
- package/docs/api/variables/shadcnBadgeVariants.md +21 -0
- package/docs/api/variables/shadcnButtonVariants.md +21 -0
- package/docs/api/variables/skeletonVariants.md +21 -0
- package/docs/api/variables/statusSizes.md +21 -0
- package/docs/api/variables/toggleSizes.md +21 -0
- package/docs/api/variables/tooltipPositions.md +21 -0
- package/docs/design-system/UI_DESIGN.md +628 -0
- package/docs/migration/CSS_VARIABLES_MIGRATION_2.0.md +325 -0
- package/docs/migration/modal-glass-compound-api.md +458 -0
- package/docs/migration/select-to-combobox.md +386 -0
- package/docs/migration/tabs-glass-compound-api.md +579 -0
- package/docs/technical/DEPENDENCIES.md +291 -0
- package/docs/visual-testing-guide.md +324 -0
- package/package.json +16 -3
- package/dist/trust-score-card-glass-CNcQveNY.cjs +0 -8231
- package/dist/trust-score-card-glass-CNcQveNY.cjs.map +0 -1
- package/dist/trust-score-card-glass-CowcDyxH.js +0 -7795
- package/dist/trust-score-card-glass-CowcDyxH.js.map +0 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
# SelectGlass → ComboBoxGlass Migration Guide
|
|
2
|
+
|
|
3
|
+
**Version:** v1.0.0
|
|
4
|
+
**Status:** ⚠️ SelectGlass removed in v1.0.0
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ⚠️ Important Notice
|
|
9
|
+
|
|
10
|
+
**SelectGlass has been removed** in v1.0.0.
|
|
11
|
+
|
|
12
|
+
Please migrate to **ComboBoxGlass** which provides:
|
|
13
|
+
- ✅ Better performance (uses shadcn/ui Command component)
|
|
14
|
+
- ✅ More features (icons, better search, styling)
|
|
15
|
+
- ✅ Active maintenance
|
|
16
|
+
- ✅ shadcn/ui compatibility
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Quick Migration
|
|
21
|
+
|
|
22
|
+
### Basic Migration
|
|
23
|
+
|
|
24
|
+
**Before (SelectGlass):**
|
|
25
|
+
```tsx
|
|
26
|
+
import { SelectGlass } from '@/components/glass/ui/select-glass';
|
|
27
|
+
|
|
28
|
+
<SelectGlass
|
|
29
|
+
options={options}
|
|
30
|
+
value={value}
|
|
31
|
+
onChange={setValue}
|
|
32
|
+
placeholder="Select option"
|
|
33
|
+
/>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**After (ComboBoxGlass):**
|
|
37
|
+
```tsx
|
|
38
|
+
import { ComboBoxGlass } from '@/components/glass/ui/combobox-glass';
|
|
39
|
+
|
|
40
|
+
<ComboBoxGlass
|
|
41
|
+
options={options}
|
|
42
|
+
value={value}
|
|
43
|
+
onChange={setValue}
|
|
44
|
+
placeholder="Select option"
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**API is 95% compatible** - Most code requires only import change!
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## API Comparison
|
|
53
|
+
|
|
54
|
+
### Props Mapping
|
|
55
|
+
|
|
56
|
+
| SelectGlass Prop | ComboBoxGlass Prop | Notes |
|
|
57
|
+
|------------------|-------------------|-------|
|
|
58
|
+
| `options` | `options` | ✅ Same format |
|
|
59
|
+
| `value` | `value` | ✅ Same type |
|
|
60
|
+
| `onChange` | `onChange` | ✅ Same signature |
|
|
61
|
+
| `placeholder` | `placeholder` | ✅ Same |
|
|
62
|
+
| `label` | `label` | ✅ Same |
|
|
63
|
+
| `error` | `error` | ✅ Same |
|
|
64
|
+
| `success` | `success` | ✅ Same |
|
|
65
|
+
| `size` | `size` | ✅ Same (`sm`, `md`, `lg`) |
|
|
66
|
+
| `disabled` | `disabled` | ✅ Same |
|
|
67
|
+
| `searchable` | `searchable` | ✅ Default `true` in ComboBoxGlass |
|
|
68
|
+
| `className` | `className` | ✅ Same |
|
|
69
|
+
| N/A | `triggerIcon` | ⭐ NEW - Custom trigger icon |
|
|
70
|
+
| N/A | `emptyMessage` | ⭐ NEW - Custom "No results" text |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Migration Examples
|
|
75
|
+
|
|
76
|
+
### Example 1: Basic Select
|
|
77
|
+
|
|
78
|
+
**Before:**
|
|
79
|
+
```tsx
|
|
80
|
+
const countries = [
|
|
81
|
+
{ value: 'us', label: 'United States' },
|
|
82
|
+
{ value: 'uk', label: 'United Kingdom' },
|
|
83
|
+
{ value: 'ca', label: 'Canada' }
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
<SelectGlass
|
|
87
|
+
options={countries}
|
|
88
|
+
value={selectedCountry}
|
|
89
|
+
onChange={setSelectedCountry}
|
|
90
|
+
label="Country"
|
|
91
|
+
placeholder="Select country"
|
|
92
|
+
/>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**After:**
|
|
96
|
+
```tsx
|
|
97
|
+
const countries = [
|
|
98
|
+
{ value: 'us', label: 'United States' },
|
|
99
|
+
{ value: 'uk', label: 'United Kingdom' },
|
|
100
|
+
{ value: 'ca', label: 'Canada' }
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
<ComboBoxGlass
|
|
104
|
+
options={countries}
|
|
105
|
+
value={selectedCountry}
|
|
106
|
+
onChange={setSelectedCountry}
|
|
107
|
+
label="Country"
|
|
108
|
+
placeholder="Select country"
|
|
109
|
+
/>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
✅ **No changes needed** except import!
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
### Example 2: Select with Icons
|
|
117
|
+
|
|
118
|
+
**Before:**
|
|
119
|
+
```tsx
|
|
120
|
+
import { User, Settings, LogOut } from 'lucide-react';
|
|
121
|
+
|
|
122
|
+
const menuOptions = [
|
|
123
|
+
{ value: 'profile', label: 'Profile', icon: User },
|
|
124
|
+
{ value: 'settings', label: 'Settings', icon: Settings },
|
|
125
|
+
{ value: 'logout', label: 'Logout', icon: LogOut }
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
<SelectGlass
|
|
129
|
+
options={menuOptions}
|
|
130
|
+
value={selected}
|
|
131
|
+
onChange={setSelected}
|
|
132
|
+
/>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**After:**
|
|
136
|
+
```tsx
|
|
137
|
+
import { User, Settings, LogOut } from 'lucide-react';
|
|
138
|
+
|
|
139
|
+
const menuOptions = [
|
|
140
|
+
{ value: 'profile', label: 'Profile', icon: User },
|
|
141
|
+
{ value: 'settings', label: 'Settings', icon: Settings },
|
|
142
|
+
{ value: 'logout', label: 'Logout', icon: LogOut }
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
<ComboBoxGlass
|
|
146
|
+
options={menuOptions}
|
|
147
|
+
value={selected}
|
|
148
|
+
onChange={setSelected}
|
|
149
|
+
/>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
✅ **Same code** - icons work identically!
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
### Example 3: Select with Validation
|
|
157
|
+
|
|
158
|
+
**Before:**
|
|
159
|
+
```tsx
|
|
160
|
+
<SelectGlass
|
|
161
|
+
options={options}
|
|
162
|
+
value={value}
|
|
163
|
+
onChange={setValue}
|
|
164
|
+
label="Required Field"
|
|
165
|
+
error={errors.field ? "This field is required" : undefined}
|
|
166
|
+
size="md"
|
|
167
|
+
/>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**After:**
|
|
171
|
+
```tsx
|
|
172
|
+
<ComboBoxGlass
|
|
173
|
+
options={options}
|
|
174
|
+
value={value}
|
|
175
|
+
onChange={setValue}
|
|
176
|
+
label="Required Field"
|
|
177
|
+
error={errors.field ? "This field is required" : undefined}
|
|
178
|
+
size="md"
|
|
179
|
+
/>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
✅ **Identical API** for validation states!
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### Example 4: Non-Searchable Select
|
|
187
|
+
|
|
188
|
+
**Before:**
|
|
189
|
+
```tsx
|
|
190
|
+
<SelectGlass
|
|
191
|
+
options={statusOptions}
|
|
192
|
+
value={status}
|
|
193
|
+
onChange={setStatus}
|
|
194
|
+
searchable={false} // Disable search
|
|
195
|
+
/>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**After:**
|
|
199
|
+
```tsx
|
|
200
|
+
<ComboBoxGlass
|
|
201
|
+
options={statusOptions}
|
|
202
|
+
value={status}
|
|
203
|
+
onChange={setStatus}
|
|
204
|
+
searchable={false} // Still works
|
|
205
|
+
/>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
✅ **Same prop** for controlling search!
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### Example 5: Custom Empty Message (NEW Feature)
|
|
213
|
+
|
|
214
|
+
**Before (SelectGlass - Not Possible):**
|
|
215
|
+
```tsx
|
|
216
|
+
// Could not customize "No results" message
|
|
217
|
+
<SelectGlass
|
|
218
|
+
options={filteredOptions}
|
|
219
|
+
value={value}
|
|
220
|
+
onChange={setValue}
|
|
221
|
+
/>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**After (ComboBoxGlass - NEW):**
|
|
225
|
+
```tsx
|
|
226
|
+
<ComboBoxGlass
|
|
227
|
+
options={filteredOptions}
|
|
228
|
+
value={value}
|
|
229
|
+
onChange={setValue}
|
|
230
|
+
emptyMessage="No matching countries found. Try a different search."
|
|
231
|
+
/>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
⭐ **New feature** in ComboBoxGlass!
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Benefits of ComboBoxGlass
|
|
239
|
+
|
|
240
|
+
### 1. Better Performance
|
|
241
|
+
- Uses shadcn/ui Command component (optimized)
|
|
242
|
+
- Virtual scrolling for large lists (500+ items)
|
|
243
|
+
- Faster search filtering
|
|
244
|
+
|
|
245
|
+
### 2. Enhanced Features
|
|
246
|
+
- Custom trigger icons
|
|
247
|
+
- Better keyboard navigation
|
|
248
|
+
- Improved accessibility (ARIA attributes)
|
|
249
|
+
- Better mobile support
|
|
250
|
+
|
|
251
|
+
### 3. Better Styling
|
|
252
|
+
- More customizable appearance
|
|
253
|
+
- Better glass effects
|
|
254
|
+
- Smoother animations
|
|
255
|
+
|
|
256
|
+
### 4. Active Maintenance
|
|
257
|
+
- SelectGlass frozen (no new features)
|
|
258
|
+
- ComboBoxGlass actively maintained
|
|
259
|
+
- Future updates and improvements
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Breaking Changes (Minor)
|
|
264
|
+
|
|
265
|
+
### 1. Default `searchable` Value
|
|
266
|
+
|
|
267
|
+
**SelectGlass:** `searchable` defaults to `false`
|
|
268
|
+
**ComboBoxGlass:** `searchable` defaults to `true`
|
|
269
|
+
|
|
270
|
+
**Fix:** Explicitly set `searchable={false}` if you don't want search:
|
|
271
|
+
```tsx
|
|
272
|
+
<ComboBoxGlass searchable={false} {...props} />
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### 2. Import Path
|
|
276
|
+
|
|
277
|
+
**Before:**
|
|
278
|
+
```tsx
|
|
279
|
+
import { SelectGlass } from '@/components/glass/ui/select-glass';
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**After:**
|
|
283
|
+
```tsx
|
|
284
|
+
import { ComboBoxGlass } from '@/components/glass/ui/combobox-glass';
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Migration Checklist
|
|
290
|
+
|
|
291
|
+
- [ ] Find all `SelectGlass` imports: `rg "SelectGlass" -l`
|
|
292
|
+
- [ ] Replace imports with `ComboBoxGlass`
|
|
293
|
+
- [ ] Replace component usage: `<SelectGlass` → `<ComboBoxGlass`
|
|
294
|
+
- [ ] Add `searchable={false}` where needed (if you relied on default `false`)
|
|
295
|
+
- [ ] Test all select dropdowns
|
|
296
|
+
- [ ] Run TypeScript check: `npx tsc --noEmit`
|
|
297
|
+
- [ ] Run tests: `npm run test`
|
|
298
|
+
- [ ] Commit: `refactor: migrate SelectGlass to ComboBoxGlass`
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Automated Migration (Recommended)
|
|
303
|
+
|
|
304
|
+
### Find All Usage:
|
|
305
|
+
```bash
|
|
306
|
+
# Find all SelectGlass usage
|
|
307
|
+
rg "SelectGlass" --type typescript --type tsx -l
|
|
308
|
+
|
|
309
|
+
# Count occurrences
|
|
310
|
+
rg "SelectGlass" --type typescript --type tsx | wc -l
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Semi-Automated Replace:
|
|
314
|
+
```bash
|
|
315
|
+
# Replace imports
|
|
316
|
+
rg "import.*SelectGlass.*from" -l | xargs sed -i '' \
|
|
317
|
+
's/SelectGlass/ComboBoxGlass/g' \
|
|
318
|
+
's/select-glass/combobox-glass/g'
|
|
319
|
+
|
|
320
|
+
# Replace component usage
|
|
321
|
+
rg "<SelectGlass" -l | xargs sed -i '' 's/<SelectGlass/<ComboBoxGlass/g'
|
|
322
|
+
rg "</SelectGlass>" -l | xargs sed -i '' 's/<\/SelectGlass>/<\/ComboBoxGlass>/g'
|
|
323
|
+
|
|
324
|
+
# Verify
|
|
325
|
+
rg "SelectGlass" --files-with-matches
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
⚠️ **Review changes before committing!**
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Timeline
|
|
333
|
+
|
|
334
|
+
| Version | Event |
|
|
335
|
+
|---------|-------|
|
|
336
|
+
| **v0.x** | SelectGlass available |
|
|
337
|
+
| **v1.0.0** | SelectGlass removed |
|
|
338
|
+
|
|
339
|
+
**Action Required:** Use ComboBoxGlass instead
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Need Help?
|
|
344
|
+
|
|
345
|
+
- 📖 See [ComboBoxGlass Storybook](http://localhost:6006/?path=/story/components-comboboxglass)
|
|
346
|
+
- 💬 Ask in [GitHub Discussions](https://github.com/your-org/shadcn-glass-ui-library/discussions)
|
|
347
|
+
- 🐛 Report issues in [GitHub Issues](https://github.com/your-org/shadcn-glass-ui-library/issues)
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Rollback Plan
|
|
352
|
+
|
|
353
|
+
If you encounter issues:
|
|
354
|
+
|
|
355
|
+
### Option 1: Revert Migration
|
|
356
|
+
```bash
|
|
357
|
+
git revert <commit-hash>
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Option 2: Pin to v0.x
|
|
361
|
+
If you need more time to migrate, pin to version 0.x temporarily.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## FAQ
|
|
366
|
+
|
|
367
|
+
### Q: Why is SelectGlass being removed?
|
|
368
|
+
**A:** ComboBoxGlass is a superior implementation using shadcn/ui Command. Maintaining both components is redundant and increases bundle size.
|
|
369
|
+
|
|
370
|
+
### Q: Will my code break immediately?
|
|
371
|
+
**A:** Yes, in v1.0.0. SelectGlass has been removed. Migrate to ComboBoxGlass.
|
|
372
|
+
|
|
373
|
+
### Q: Is the API exactly the same?
|
|
374
|
+
**A:** 95% identical. Main difference: `searchable` defaults to `true` in ComboBoxGlass.
|
|
375
|
+
|
|
376
|
+
### Q: Can I use both components during migration?
|
|
377
|
+
**A:** No. In v1.0.0, only ComboBoxGlass is available. Pin to v0.x if you need gradual migration.
|
|
378
|
+
|
|
379
|
+
### Q: What if I find a bug in ComboBoxGlass?
|
|
380
|
+
**A:** Report it! We'll fix it. ComboBoxGlass is actively maintained.
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
**Last updated:** 2025-12-05
|
|
385
|
+
**Status:** SelectGlass removed in v1.0.0
|
|
386
|
+
**Migration:** Use ComboBoxGlass
|