shadcn-glass-ui 1.0.11 → 2.0.1
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 +213 -0
- package/README.md +174 -17
- 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 +1 -1
- package/dist/r/avatar-glass.json +1 -1
- package/dist/r/circular-metric-glass.json +1 -1
- package/dist/r/circular-progress-glass.json +1 -1
- package/dist/r/combobox-glass.json +1 -1
- package/dist/r/flag-alert-glass.json +1 -1
- package/dist/r/flags-section-glass.json +1 -1
- package/dist/r/insight-card-glass.json +26 -0
- package/dist/r/interactive-card.json +1 -1
- package/dist/r/language-bar-glass.json +1 -1
- package/dist/r/metric-card-glass.json +3 -2
- package/dist/r/metrics-grid-glass.json +1 -1
- package/dist/r/modal-glass.json +1 -1
- package/dist/r/progress-glass.json +1 -1
- package/dist/r/registry.json +19 -1
- package/dist/r/segmented-control-glass.json +1 -1
- package/dist/r/sparkline-glass.json +26 -0
- package/dist/r/stepper-glass.json +41 -0
- package/dist/r/tabs-glass.json +1 -1
- package/dist/r/trust-score-card-glass.json +1 -1
- package/dist/r/year-card-glass.json +1 -1
- 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 +20 -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
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,219 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
|
|
6
6
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.0] - 2025-12-11
|
|
9
|
+
|
|
10
|
+
### ✨ Added
|
|
11
|
+
|
|
12
|
+
**New Components:**
|
|
13
|
+
|
|
14
|
+
- **StepperGlass** - Compound stepper component for multi-step workflows
|
|
15
|
+
- 3 variants: `numbered` (default), `icon`, `dots`
|
|
16
|
+
- 2 orientations: `horizontal` (default), `vertical`
|
|
17
|
+
- 3 sizes: `sm`, `md`, `lg`
|
|
18
|
+
- Linear mode support for wizard patterns (locks future steps)
|
|
19
|
+
- Full accessibility: keyboard navigation, ARIA labels, focus management
|
|
20
|
+
- 14+ Storybook stories covering all variants and use cases
|
|
21
|
+
- Complete unit test coverage
|
|
22
|
+
|
|
23
|
+
**Token Architecture:**
|
|
24
|
+
|
|
25
|
+
- **3-Layer CSS Token System** implemented across all themes
|
|
26
|
+
- **Layer 1**: 207 primitive tokens in `src/styles/tokens/oklch-primitives.css`
|
|
27
|
+
- **Layer 2**: Semantic tokens (role-based) in each theme file
|
|
28
|
+
- **Layer 3**: Component tokens (component-specific)
|
|
29
|
+
- **Zero hardcoded OKLCH values** in all theme files:
|
|
30
|
+
- glass.css: 98 → 0 hardcoded values ✅
|
|
31
|
+
- light.css: 3 → 0 hardcoded values ✅
|
|
32
|
+
- aurora.css: 0 → 0 hardcoded values ✅
|
|
33
|
+
- **296+ CSS variables per theme** with complete semantic coverage
|
|
34
|
+
- **Theme creation time**: Reduced from 2-3 hours to 10-15 minutes (90% faster)
|
|
35
|
+
|
|
36
|
+
**Documentation:**
|
|
37
|
+
|
|
38
|
+
- [TOKEN_ARCHITECTURE.md](docs/TOKEN_ARCHITECTURE.md) (365 lines) - Complete 3-layer token system
|
|
39
|
+
guide
|
|
40
|
+
- [THEME_CREATION_GUIDE.md](docs/THEME_CREATION_GUIDE.md) (455 lines) - 15-minute theme creation
|
|
41
|
+
tutorial
|
|
42
|
+
- [CSS_VARIABLES_AUDIT.md](docs/CSS_VARIABLES_AUDIT.md) - Complete audit of 296+ variables
|
|
43
|
+
- [API_PATTERNS_COMPARISON.md](docs/API_PATTERNS_COMPARISON.md) - Component API consistency guide
|
|
44
|
+
- [PRIMITIVE_MAPPING.md](docs/PRIMITIVE_MAPPING.md) - Primitive token reference
|
|
45
|
+
- [CSS_VARIABLES_MIGRATION_2.0.md](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md) - v1.x → v2.0.0
|
|
46
|
+
migration guide
|
|
47
|
+
|
|
48
|
+
**Custom Hooks (Exported):**
|
|
49
|
+
|
|
50
|
+
- `useFocus` - Focus state management with glow effects
|
|
51
|
+
- `useHover` - Hover detection for interactive components
|
|
52
|
+
- `useResponsive` - Responsive breakpoint detection
|
|
53
|
+
- `useWallpaperTint` - Wallpaper color tint detection
|
|
54
|
+
|
|
55
|
+
**Registry:**
|
|
56
|
+
|
|
57
|
+
- Added `stepper-glass` to shadcn registry
|
|
58
|
+
- Total registry items: 55 components
|
|
59
|
+
|
|
60
|
+
### 🔧 Internal
|
|
61
|
+
|
|
62
|
+
**CSS Variables Standardization:**
|
|
63
|
+
|
|
64
|
+
- Migrated all internal components to semantic CSS variable names
|
|
65
|
+
- Updated `CircularMetricGlass`, `MetricCardGlass`, `MetricsGridGlass` to use semantic tokens
|
|
66
|
+
- Updated `InteractiveCard` documentation with new variable names
|
|
67
|
+
- All unit tests updated to reflect semantic naming
|
|
68
|
+
- Complete migration to 3-layer token architecture
|
|
69
|
+
|
|
70
|
+
**Performance:**
|
|
71
|
+
|
|
72
|
+
- Theme creation time: 2-3 hours → 10-15 minutes (90% faster)
|
|
73
|
+
- CSS maintainability improved with semantic token layer
|
|
74
|
+
- Zero code duplication in color values
|
|
75
|
+
|
|
76
|
+
### ⚠️ BREAKING CHANGES
|
|
77
|
+
|
|
78
|
+
**CSS Variables REMOVED:**
|
|
79
|
+
|
|
80
|
+
The following CSS variable names have been **REMOVED** in v2.0.0:
|
|
81
|
+
|
|
82
|
+
| Removed (v1.x) | Replacement (v2.0+) | Semantic Meaning |
|
|
83
|
+
| -------------------- | ------------------------ | ---------------- |
|
|
84
|
+
| `--metric-emerald-*` | `--metric-success-*` | Success states |
|
|
85
|
+
| `--metric-amber-*` | `--metric-warning-*` | Warning states |
|
|
86
|
+
| `--metric-blue-*` | `--metric-default-*` | Neutral/default |
|
|
87
|
+
| `--metric-red-*` | `--metric-destructive-*` | Error/danger |
|
|
88
|
+
|
|
89
|
+
**Total affected variables:** 16 (4 color families × 4 properties: -bg, -text, -border, -glow)
|
|
90
|
+
|
|
91
|
+
**Migration:**
|
|
92
|
+
|
|
93
|
+
```css
|
|
94
|
+
/* ❌ REMOVED in v2.0.0 */
|
|
95
|
+
background: var(--metric-emerald-bg);
|
|
96
|
+
color: var(--metric-amber-text);
|
|
97
|
+
box-shadow: var(--metric-blue-glow);
|
|
98
|
+
|
|
99
|
+
/* ✅ Use in v2.0.0+ */
|
|
100
|
+
background: var(--metric-success-bg);
|
|
101
|
+
color: var(--metric-warning-text);
|
|
102
|
+
box-shadow: var(--metric-default-glow);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Why?**
|
|
106
|
+
|
|
107
|
+
- Aligns with shadcn/ui naming conventions
|
|
108
|
+
- Improves semantic meaning (color names → semantic roles)
|
|
109
|
+
- Consistency with component variant props (AlertGlass, BadgeGlass, ButtonGlass)
|
|
110
|
+
- Part of 3-layer token architecture migration
|
|
111
|
+
|
|
112
|
+
**Migration Guide:**
|
|
113
|
+
[docs/migration/CSS_VARIABLES_MIGRATION_2.0.md](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md)
|
|
114
|
+
|
|
115
|
+
**Automated Migration Script:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# macOS/Linux
|
|
119
|
+
find src/ -type f \( -name "*.tsx" -o -name "*.css" \) -exec sed -i '' \
|
|
120
|
+
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
121
|
+
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
122
|
+
-e 's/--metric-blue-/--metric-default-/g' \
|
|
123
|
+
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
124
|
+
{} +
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 📊 Statistics
|
|
128
|
+
|
|
129
|
+
- **Components**: 57 → **58** (added StepperGlass)
|
|
130
|
+
- **Tests**: 1,355+ → **~1,570+**
|
|
131
|
+
- Visual: 582 → **802** (+220 screenshots from StepperGlass variants)
|
|
132
|
+
- Compliance: ~650
|
|
133
|
+
- Unit: ~125
|
|
134
|
+
- **Primitive Tokens**: **207** OKLCH color primitives
|
|
135
|
+
- **CSS Variables**: **296+** per theme (glass, light, aurora)
|
|
136
|
+
- **Hardcoded OKLCH**: **0** (was 98 in glass.css)
|
|
137
|
+
- **Themes**: 3 (glass, light, aurora)
|
|
138
|
+
- **Registry Items**: **55**
|
|
139
|
+
- **Exported Hooks**: **4**
|
|
140
|
+
|
|
141
|
+
### 📚 Related Documentation
|
|
142
|
+
|
|
143
|
+
- [TOKEN_ARCHITECTURE.md](docs/TOKEN_ARCHITECTURE.md) - Complete token system documentation
|
|
144
|
+
- [THEME_CREATION_GUIDE.md](docs/THEME_CREATION_GUIDE.md) - Create themes in 15 minutes
|
|
145
|
+
- [CSS_VARIABLES_MIGRATION_2.0.md](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md) - Migration guide
|
|
146
|
+
- [CSS_VARIABLES_AUDIT.md](docs/CSS_VARIABLES_AUDIT.md) - Full variable audit
|
|
147
|
+
|
|
148
|
+
## [1.1.0] - 2025-12-10
|
|
149
|
+
|
|
150
|
+
### ✨ Added
|
|
151
|
+
|
|
152
|
+
**New Components:**
|
|
153
|
+
|
|
154
|
+
- **SparklineGlass**: Compact bar chart for time series visualization
|
|
155
|
+
- Support for height variants (sm/md/lg) and gap spacing (none/sm/md)
|
|
156
|
+
- Highlight maximum value with custom colors
|
|
157
|
+
- Animated grow effect with staggered delays
|
|
158
|
+
- Full accessibility with role="img" and descriptive aria-labels
|
|
159
|
+
- 10 Storybook stories and comprehensive unit tests
|
|
160
|
+
|
|
161
|
+
- **InsightCardGlass**: Insight display component with 7 semantic variants
|
|
162
|
+
- Variants: default, tip, highlight, warning, stat, growth, decline
|
|
163
|
+
- Inline and card display modes
|
|
164
|
+
- Clickable with full keyboard support (Enter/Space keys)
|
|
165
|
+
- Animated fade-in effect
|
|
166
|
+
- Full accessibility support
|
|
167
|
+
|
|
168
|
+
**Extended Components:**
|
|
169
|
+
|
|
170
|
+
- **YearCardGlass**:
|
|
171
|
+
- Added optional `sparklineData` for monthly activity trends
|
|
172
|
+
- Added optional `insights` array for analytical insight cards
|
|
173
|
+
- Support for all 7 InsightCardGlass variants
|
|
174
|
+
- Full backward compatibility maintained
|
|
175
|
+
- 8 new Storybook stories, 30 unit tests
|
|
176
|
+
|
|
177
|
+
- **MetricCardGlass**:
|
|
178
|
+
- Added optional `sparklineData` for metric trend visualization
|
|
179
|
+
- Added `showSparkline` flag for toggling sparkline display
|
|
180
|
+
- Automatic positioning of progress bar and sparkline
|
|
181
|
+
- Full backward compatibility maintained
|
|
182
|
+
- 11 new Storybook stories, 33 unit tests
|
|
183
|
+
|
|
184
|
+
**AI Compatibility:**
|
|
185
|
+
|
|
186
|
+
- Included `docs/` folder in npm package for AI assistants
|
|
187
|
+
- Added `docs/EXPORTS_MAP.json` - Machine-readable component registry
|
|
188
|
+
- Added `docs/AI_USAGE.md` - Quick reference guide for AI tools
|
|
189
|
+
- Enhanced TypeDoc comments with `@example` and `@accessibility` sections
|
|
190
|
+
- Added `context7.json` for Context7 MCP integration
|
|
191
|
+
- Added CLI commands for component exploration:
|
|
192
|
+
- `npx shadcn-glass-ui info <name>` - Show component details (fuzzy search)
|
|
193
|
+
- `npx shadcn-glass-ui list` - List all components
|
|
194
|
+
- `npx shadcn-glass-ui list --category=core` - Filter by category
|
|
195
|
+
|
|
196
|
+
**Infrastructure:**
|
|
197
|
+
|
|
198
|
+
- Installed `framer-motion` dependency for animations
|
|
199
|
+
- Added CVA variants for SparklineGlass and InsightCardGlass
|
|
200
|
+
- Added CSS animations: `sparkline-grow` and `insight-fade-in`
|
|
201
|
+
- Added CSS variables for SparklineGlass theming
|
|
202
|
+
- Created visual regression tests for new components
|
|
203
|
+
|
|
204
|
+
### 📊 Testing
|
|
205
|
+
|
|
206
|
+
- **Total new tests**: 83 unit tests + 5 visual regression tests
|
|
207
|
+
- **Pass rate**: 100% (all tests passing)
|
|
208
|
+
- **Coverage**: SparklineGlass (10 tests), InsightCardGlass (10 tests), YearCardGlass (+30 tests),
|
|
209
|
+
MetricCardGlass (+33 tests)
|
|
210
|
+
|
|
211
|
+
### 🔄 Changed
|
|
212
|
+
|
|
213
|
+
- Updated component count: 55+ components (was 53)
|
|
214
|
+
- Updated `package.json` to include `docs/` in published package
|
|
215
|
+
- Enhanced registry with new component entries
|
|
216
|
+
|
|
217
|
+
### 🚀 Breaking Changes
|
|
218
|
+
|
|
219
|
+
**None** - This release maintains full backward compatibility with v1.0.x
|
|
220
|
+
|
|
8
221
|
## [1.0.9] - 2025-12-06
|
|
9
222
|
|
|
10
223
|
### 📚 AIDocumentation
|
package/README.md
CHANGED
|
@@ -11,25 +11,31 @@
|
|
|
11
11
|
[](docs/AI_USAGE.md)
|
|
12
12
|
[](docs/AI_USAGE.md)
|
|
13
13
|
[](docs/AI_USAGE.md)
|
|
14
|
+
[](https://context7.com/yhooi2/shadcn-glass-ui-library)
|
|
14
15
|
|
|
15
|
-
Glassmorphism UI library for React - AI-friendly with
|
|
16
|
+
Glassmorphism UI library for React - AI-friendly with 58 components, strict TypeScript, and
|
|
16
17
|
comprehensive docs.
|
|
17
18
|
|
|
18
19
|
## ✨ Highlights
|
|
19
20
|
|
|
20
|
-
- 🎨 **
|
|
21
|
-
(
|
|
21
|
+
- 🎨 **58 Components** - Core UI (18) + Atomic (7) + Composite (13) + Sections (7) + Specialized
|
|
22
|
+
(10) + Primitives (3)
|
|
23
|
+
- 🪜 **StepperGlass** - NEW compound stepper component with 3 variants (numbered, icon, dots)
|
|
22
24
|
- 🌈 **3 Themes** - Glass (dark glassmorphism), Light (clean minimal), Aurora (gradient glow)
|
|
25
|
+
- 🎨 **3-Layer Token System** - 207 primitive tokens, zero hardcoded colors, 15-minute theme
|
|
26
|
+
creation
|
|
23
27
|
- 🤖 **AI-Friendly** - Optimized for Claude Code, Copilot, GPT with comprehensive docs
|
|
24
|
-
- 🔮 **Advanced Patterns** - asChild polymorphic rendering, Compound components (Modal, Tabs
|
|
28
|
+
- 🔮 **Advanced Patterns** - asChild polymorphic rendering, Compound components (Modal, Tabs,
|
|
29
|
+
Stepper)
|
|
25
30
|
- ♿ **WCAG 2.1 AA** - Full accessibility compliance with automated testing
|
|
26
31
|
- 📱 **Touch Optimized** - 44×44px minimum touch targets (Apple HIG)
|
|
27
32
|
- ⚡ **Modern Stack** - React 19, Tailwind v4, Vitest 4, Storybook 10, Vite 7
|
|
28
|
-
- 🧪
|
|
33
|
+
- 🧪 **~1570+ Tests** - 650+ compliance + 802 visual regression + 125 unit tests
|
|
29
34
|
- 📦 **shadcn Compatible** - Works seamlessly with existing shadcn/ui projects
|
|
30
35
|
- 🎯 **Design System** - Comprehensive [UI_DESIGN.md](docs/design-system/UI_DESIGN.md)
|
|
31
36
|
specifications
|
|
32
37
|
- 📦 **Bundle Size** - ~110KB gzipped (production build)
|
|
38
|
+
- 📊 **Data Visualization** - SparklineGlass for compact time series, InsightCardGlass for analytics
|
|
33
39
|
|
|
34
40
|
## Tech Stack
|
|
35
41
|
|
|
@@ -42,6 +48,18 @@ comprehensive docs.
|
|
|
42
48
|
|
|
43
49
|
See [DEPENDENCIES.md](DEPENDENCIES.md) for detailed dependency documentation.
|
|
44
50
|
|
|
51
|
+
## 🎨 Design System
|
|
52
|
+
|
|
53
|
+
- **Token Architecture** - [3-layer CSS token system](docs/TOKEN_ARCHITECTURE.md) with 207 OKLCH
|
|
54
|
+
primitives
|
|
55
|
+
- **Theme Creation** - Create production-ready themes in [15 minutes](docs/THEME_CREATION_GUIDE.md)
|
|
56
|
+
- **Zero Hardcoded Colors** - 100% CSS variable coverage across all components
|
|
57
|
+
- **Rapid Theming** - 90% faster theme creation (2-3 hours → 10-15 minutes)
|
|
58
|
+
- **Complete Documentation** - [CSS Variables Audit](docs/CSS_VARIABLES_AUDIT.md) with 296+
|
|
59
|
+
variables per theme
|
|
60
|
+
- **Migration Support** - [Automated migration tools](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md)
|
|
61
|
+
for v2.0.0
|
|
62
|
+
|
|
45
63
|
## 🤖 AI Assistant Support
|
|
46
64
|
|
|
47
65
|
This library is **optimized for AI coding assistants** including Claude Code, GitHub Copilot, and
|
|
@@ -56,10 +74,52 @@ ChatGPT:
|
|
|
56
74
|
- 🧪 **Real-World Examples** - Use-case based Storybook stories
|
|
57
75
|
- 📦 **shadcn CLI Compatible** - Install components via
|
|
58
76
|
`npx shadcn add @shadcn-glass-ui/button-glass`
|
|
77
|
+
- 🌐 **Context7 Indexed** - Discoverable via
|
|
78
|
+
[Context7 MCP](https://context7.com/yhooi2/shadcn-glass-ui-library) for AI assistants
|
|
59
79
|
|
|
60
80
|
[**→ Read AI Usage Guide**](docs/AI_USAGE.md) |
|
|
61
81
|
[**→ Component Catalog**](docs/COMPONENTS_CATALOG.md)
|
|
62
82
|
|
|
83
|
+
## 🤖 AI Tools Integration
|
|
84
|
+
|
|
85
|
+
This library is indexed and optimized for multiple AI development tools:
|
|
86
|
+
|
|
87
|
+
- **[Context7](https://context7.com/yhooi2/shadcn-glass-ui-library)** - MCP server integration with
|
|
88
|
+
59 AI-specific rules
|
|
89
|
+
- **Claude Code** - Optimized with [CLAUDE.md](CLAUDE.md) and project-specific instructions
|
|
90
|
+
- **GitHub Copilot** - TypeScript strict mode + comprehensive JSDoc annotations
|
|
91
|
+
- **ChatGPT/GPT-4** - Machine-readable [EXPORTS_MAP.json](docs/EXPORTS_MAP.json) with component
|
|
92
|
+
metadata
|
|
93
|
+
|
|
94
|
+
**Features for AI assistants:**
|
|
95
|
+
|
|
96
|
+
- 🎯 Decision trees for installation methods ([AI_USAGE.md](docs/AI_USAGE.md))
|
|
97
|
+
- 📋 59 Context7 rules covering breaking changes, compound APIs, token system
|
|
98
|
+
- 🔍 Searchable component catalog with fuzzy matching support
|
|
99
|
+
- 📦 Machine-readable exports with props, variants, and keywords
|
|
100
|
+
- 🧪 Test coverage metadata for quality assurance
|
|
101
|
+
|
|
102
|
+
## 🖥️ CLI
|
|
103
|
+
|
|
104
|
+
Explore components directly from the command line:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Get component info (fuzzy search supported)
|
|
108
|
+
npx shadcn-glass-ui info ButtonGlass
|
|
109
|
+
npx shadcn-glass-ui info button
|
|
110
|
+
npx shadcn-glass-ui info modal
|
|
111
|
+
|
|
112
|
+
# List all components
|
|
113
|
+
npx shadcn-glass-ui list
|
|
114
|
+
|
|
115
|
+
# List by category
|
|
116
|
+
npx shadcn-glass-ui list --category=core
|
|
117
|
+
npx shadcn-glass-ui list --category=composite
|
|
118
|
+
|
|
119
|
+
# Show help
|
|
120
|
+
npx shadcn-glass-ui --help
|
|
121
|
+
```
|
|
122
|
+
|
|
63
123
|
## 📚 Documentation
|
|
64
124
|
|
|
65
125
|
- **[Live Storybook](https://yhooi2.github.io/shadcn-glass-ui-library/)** - Interactive component
|
|
@@ -111,7 +171,7 @@ npx shadcn@latest add @shadcn-glass-ui/button-glass --deps
|
|
|
111
171
|
- ✅ Automatic dependency installation
|
|
112
172
|
- ✅ Type-safe CLI workflow
|
|
113
173
|
- ✅ Compatible with existing shadcn/ui projects
|
|
114
|
-
- ✅
|
|
174
|
+
- ✅ 58 components available
|
|
115
175
|
|
|
116
176
|
**[→ Full Registry Documentation](docs/REGISTRY_USAGE.md)**
|
|
117
177
|
|
|
@@ -225,6 +285,99 @@ import { ModalGlass, TabsGlass } from 'shadcn-glass-ui';
|
|
|
225
285
|
</TabsGlass.Root>
|
|
226
286
|
```
|
|
227
287
|
|
|
288
|
+
## ⚠️ Breaking Changes (v2.0.0)
|
|
289
|
+
|
|
290
|
+
**v2.0.0 removes deprecated CSS variables.** This is a major version bump due to breaking changes in
|
|
291
|
+
theming.
|
|
292
|
+
|
|
293
|
+
### Removed CSS Variables
|
|
294
|
+
|
|
295
|
+
The following CSS variable names have been **REMOVED** in v2.0.0:
|
|
296
|
+
|
|
297
|
+
| Removed (v1.x) | Replacement (v2.0+) | Semantic Meaning |
|
|
298
|
+
| -------------------- | ------------------------ | --------------------------------- |
|
|
299
|
+
| `--metric-emerald-*` | `--metric-success-*` | Success states (positive metrics) |
|
|
300
|
+
| `--metric-amber-*` | `--metric-warning-*` | Warning states (attention needed) |
|
|
301
|
+
| `--metric-blue-*` | `--metric-default-*` | Neutral/default states |
|
|
302
|
+
| `--metric-red-*` | `--metric-destructive-*` | Error/danger states (critical) |
|
|
303
|
+
|
|
304
|
+
**Total removed:** 16 variables (4 color families × 4 properties each: bg, text, border, glow)
|
|
305
|
+
|
|
306
|
+
### Why This Change?
|
|
307
|
+
|
|
308
|
+
- **Semantic Clarity**: Color names (emerald, amber, blue, red) → semantic roles (success, warning,
|
|
309
|
+
default, destructive)
|
|
310
|
+
- **shadcn/ui Compatibility**: Aligns with shadcn/ui variant naming conventions
|
|
311
|
+
- **Consistency**: Matches AlertGlass/BadgeGlass/ButtonGlass variant prop values
|
|
312
|
+
- **Token Architecture**: Part of the 3-layer token system migration
|
|
313
|
+
|
|
314
|
+
### Migration Guide
|
|
315
|
+
|
|
316
|
+
**Automated Migration (Recommended):**
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# macOS/BSD
|
|
320
|
+
find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" \) -exec sed -i '' \
|
|
321
|
+
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
322
|
+
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
323
|
+
-e 's/--metric-blue-/--metric-default-/g' \
|
|
324
|
+
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
325
|
+
{} +
|
|
326
|
+
|
|
327
|
+
# Linux
|
|
328
|
+
find src/ -type f \( -name "*.tsx" -o -name "*.ts" -o -name "*.css" \) -exec sed -i \
|
|
329
|
+
-e 's/--metric-emerald-/--metric-success-/g' \
|
|
330
|
+
-e 's/--metric-amber-/--metric-warning-/g' \
|
|
331
|
+
-e 's/--metric-blue-/--metric-default-/g' \
|
|
332
|
+
-e 's/--metric-red-/--metric-destructive-/g' \
|
|
333
|
+
{} +
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**Example:**
|
|
337
|
+
|
|
338
|
+
```css
|
|
339
|
+
/* ❌ v1.x (REMOVED in v2.0) */
|
|
340
|
+
.metric-card-success {
|
|
341
|
+
background: var(--metric-emerald-bg);
|
|
342
|
+
color: var(--metric-emerald-text);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* ✅ v2.0+ */
|
|
346
|
+
.metric-card-success {
|
|
347
|
+
background: var(--metric-success-bg);
|
|
348
|
+
color: var(--metric-success-text);
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**[→ Complete Migration Guide](docs/migration/CSS_VARIABLES_MIGRATION_2.0.md)** - Includes manual
|
|
353
|
+
examples, troubleshooting, and affected components.
|
|
354
|
+
|
|
355
|
+
### New in v2.0.0
|
|
356
|
+
|
|
357
|
+
**Token Architecture:**
|
|
358
|
+
|
|
359
|
+
- **3-Layer System**: Primitive → Semantic → Component tokens
|
|
360
|
+
- **207 Primitive Tokens**: Complete OKLCH color palette in `oklch-primitives.css`
|
|
361
|
+
- **Zero Hardcoded Colors**: 100% migration to CSS variables (98→0 in glass.css)
|
|
362
|
+
- **Theme Creation**: 90% faster (2-3 hours → 10-15 minutes)
|
|
363
|
+
|
|
364
|
+
**New Components:**
|
|
365
|
+
|
|
366
|
+
- **StepperGlass** - Compound stepper with 3 variants (numbered, icon, dots), 2 orientations, linear
|
|
367
|
+
mode
|
|
368
|
+
|
|
369
|
+
**Custom Hooks (Exported):**
|
|
370
|
+
|
|
371
|
+
- `useFocus`, `useHover`, `useResponsive`, `useWallpaperTint`
|
|
372
|
+
|
|
373
|
+
**Documentation:**
|
|
374
|
+
|
|
375
|
+
- [TOKEN_ARCHITECTURE.md](docs/TOKEN_ARCHITECTURE.md) - Complete token system guide (365 lines)
|
|
376
|
+
- [THEME_CREATION_GUIDE.md](docs/THEME_CREATION_GUIDE.md) - Create themes in 15 minutes (455 lines)
|
|
377
|
+
- [CSS_VARIABLES_AUDIT.md](docs/CSS_VARIABLES_AUDIT.md) - Complete audit of 296+ variables per theme
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
228
381
|
## ⚠️ Breaking Changes (v1.0.0)
|
|
229
382
|
|
|
230
383
|
**v1.0.0 removes all legacy/deprecated APIs.** This is a clean slate release with only Compound API
|
|
@@ -360,7 +513,7 @@ Essential building blocks for any application:
|
|
|
360
513
|
|
|
361
514
|
[View all Core UI components →](src/components/glass/ui/)
|
|
362
515
|
|
|
363
|
-
### Level 2: Atomic (
|
|
516
|
+
### Level 2: Atomic (7 components)
|
|
364
517
|
|
|
365
518
|
Small, specialized components for specific use cases:
|
|
366
519
|
|
|
@@ -370,6 +523,8 @@ Small, specialized components for specific use cases:
|
|
|
370
523
|
- **SortDropdownGlass** - Sorting dropdown menu
|
|
371
524
|
- **StatItemGlass** - Individual stat display
|
|
372
525
|
- **IconButtonGlass** - Icon-only button variant
|
|
526
|
+
- **InsightCardGlass** - Insight display with 7 semantic variants (default, tip, highlight, warning,
|
|
527
|
+
stat, growth, decline)
|
|
373
528
|
|
|
374
529
|
[View all Atomic components →](src/components/glass/atomic/)
|
|
375
530
|
|
|
@@ -393,7 +548,7 @@ Pre-built complex components combining multiple elements:
|
|
|
393
548
|
|
|
394
549
|
[View all Composite components →](src/components/glass/composite/)
|
|
395
550
|
|
|
396
|
-
### Specialized Components (
|
|
551
|
+
### Specialized Components (10 components)
|
|
397
552
|
|
|
398
553
|
Advanced specialized components for specific use cases:
|
|
399
554
|
|
|
@@ -405,6 +560,8 @@ Advanced specialized components for specific use cases:
|
|
|
405
560
|
- **FlagAlertGlass** - Warning/danger flag alert with icon
|
|
406
561
|
- **ProgressGlass** - Enhanced progress bar
|
|
407
562
|
- **BaseProgressGlass** - Base progress component
|
|
563
|
+
- **SparklineGlass** - Compact bar chart for time series visualization with height/gap variants
|
|
564
|
+
- **StepperGlass** - Compound stepper for multi-step workflows (numbered, icon, dots variants)
|
|
408
565
|
|
|
409
566
|
[View all Specialized components →](src/components/glass/specialized/)
|
|
410
567
|
|
|
@@ -443,7 +600,7 @@ individual components from the categories above.
|
|
|
443
600
|
|
|
444
601
|
Complete application examples showcasing all components:
|
|
445
602
|
|
|
446
|
-
- **ComponentShowcase** - Interactive demo of all
|
|
603
|
+
- **ComponentShowcase** - Interactive demo of all 58 components with theme switching
|
|
447
604
|
- **DesktopShowcase** - GitHub Analytics desktop application mockup with glassmorphism design
|
|
448
605
|
- **MobileShowcase** - Mobile-optimized GitHub profile view with responsive layout
|
|
449
606
|
|
|
@@ -615,14 +772,14 @@ Comprehensive test coverage across multiple layers:
|
|
|
615
772
|
### Test Suites
|
|
616
773
|
|
|
617
774
|
```bash
|
|
618
|
-
# All tests (1,
|
|
775
|
+
# All tests (~1,570+ total)
|
|
619
776
|
npm test
|
|
620
777
|
|
|
621
778
|
# Design system compliance (650+ tests)
|
|
622
779
|
npm run test:compliance:run # jsdom tests
|
|
623
780
|
npm run test:compliance:browser:run # browser tests
|
|
624
781
|
|
|
625
|
-
# Visual regression (
|
|
782
|
+
# Visual regression (802 screenshots)
|
|
626
783
|
npm run test:visual:ci # Run visual tests
|
|
627
784
|
npm run test:visual:update # Update baselines
|
|
628
785
|
|
|
@@ -635,12 +792,12 @@ npm run test:coverage
|
|
|
635
792
|
|
|
636
793
|
### Test Categories
|
|
637
794
|
|
|
638
|
-
| Category | Tests
|
|
639
|
-
| ---------------------------- |
|
|
640
|
-
| **Design System Compliance** | 650+
|
|
641
|
-
| **Visual Regression** |
|
|
642
|
-
| **Unit Tests** | 125
|
|
643
|
-
| **Total** |
|
|
795
|
+
| Category | Tests | Coverage |
|
|
796
|
+
| ---------------------------- | ----------- | ----------------- |
|
|
797
|
+
| **Design System Compliance** | 650+ | 100% |
|
|
798
|
+
| **Visual Regression** | 802 | All components |
|
|
799
|
+
| **Unit Tests** | 125 | Core utilities |
|
|
800
|
+
| **Total** | **~1,570+** | **Comprehensive** |
|
|
644
801
|
|
|
645
802
|
## 🛠️ Development
|
|
646
803
|
|
package/context7.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://context7.com/schema/context7.json",
|
|
3
|
+
"projectTitle": "shadcn-glass-ui",
|
|
4
|
+
"description": "Glassmorphism UI library for React - AI-friendly with 58 components, strict TypeScript, and comprehensive docs",
|
|
5
|
+
"branch": "main",
|
|
6
|
+
"folders": ["docs"],
|
|
7
|
+
"excludeFolders": ["src", "node_modules", "dist", ".storybook", ".github", "public", "coverage"],
|
|
8
|
+
"excludeFiles": ["package-lock.json", ".DS_Store"],
|
|
9
|
+
"rules": [
|
|
10
|
+
"Use 'variant' prop instead of 'type' for AlertGlass and NotificationGlass (v1.0 breaking change)",
|
|
11
|
+
"Use 'variant=\"destructive\"' instead of 'variant=\"danger\"' for ButtonGlass",
|
|
12
|
+
"Always wrap components with ThemeProvider from 'shadcn-glass-ui'",
|
|
13
|
+
"Import CSS: '@import \"shadcn-glass-ui/dist/styles.css\"' in main CSS file",
|
|
14
|
+
"Use TypeScript strict mode - no 'any' types allowed",
|
|
15
|
+
"ModalGlass and TabsGlass use compound component API (e.g., ModalGlass.Root, ModalGlass.Content)",
|
|
16
|
+
"Three themes available: 'glass' (dark), 'light', 'aurora' (gradient)",
|
|
17
|
+
"WCAG 2.1 AA accessibility compliance required",
|
|
18
|
+
"Use asChild prop on ButtonGlass for polymorphic rendering: <ButtonGlass asChild><Link href='/'>Home</Link></ButtonGlass>",
|
|
19
|
+
"Combine FormFieldWrapper with InputGlass for consistent form validation feedback",
|
|
20
|
+
"Use ComboBoxGlass instead of SelectGlass for searchable dropdowns (SelectGlass removed in v1.0)",
|
|
21
|
+
"For forms with validation, use InputGlass error/success props: <InputGlass error='Required' /> or <InputGlass success='Valid' />",
|
|
22
|
+
"Use SegmentedControlGlass for exclusive selection (like radio buttons but glass-styled)",
|
|
23
|
+
"Test all components with 3 themes before shipping: glass (dark), light, aurora",
|
|
24
|
+
"Use CSS variables from glass-theme.css for custom styling: --glass-bg, --blur-md, --focus-glow",
|
|
25
|
+
"Prefer GlassCard intensity variants (subtle, medium, strong) for different visual depths",
|
|
26
|
+
"Use TooltipGlass with aria-label on icon buttons for screen reader support",
|
|
27
|
+
"ExpandableHeaderGlass has built-in ARIA attributes for accessible expandable sections",
|
|
28
|
+
"Memoize ComboBoxGlass options array with useMemo to prevent unnecessary re-renders",
|
|
29
|
+
"RainbowProgressGlass uses GPU-optimized animations with will-change for smooth performance",
|
|
30
|
+
"SparklineGlass displays compact time series data - use with sparklineData array of numbers (e.g., [10, 15, 12, 18, 20])",
|
|
31
|
+
"SparklineGlass supports height variants (sm/md/lg) and gap spacing (none/sm/md) for flexible visualization",
|
|
32
|
+
"InsightCardGlass has 7 semantic variants: default, tip, highlight, warning, stat, growth, decline",
|
|
33
|
+
"InsightCardGlass supports inline and card display modes - use displayMode prop to switch between layouts",
|
|
34
|
+
"YearCardGlass accepts optional sparklineData for monthly activity trends visualization",
|
|
35
|
+
"YearCardGlass accepts optional insights array for displaying InsightCardGlass items with all 7 variants",
|
|
36
|
+
"MetricCardGlass supports optional sparklineData for metric trend visualization alongside progress bars",
|
|
37
|
+
"When using sparklineData in cards, data array length should match your time period (e.g., 12 months = 12 values)",
|
|
38
|
+
"Use 3-layer token system: Primitive → Semantic → Component tokens (v2.0.0+)",
|
|
39
|
+
"NEVER hardcode OKLCH values - use CSS variables from oklch-primitives.css",
|
|
40
|
+
"For custom styling, use semantic tokens: var(--semantic-primary), var(--semantic-surface)",
|
|
41
|
+
"CSS variables removed in v2.0.0: --metric-emerald-*, --metric-amber-*, --metric-blue-*, --metric-red-*",
|
|
42
|
+
"Use new semantic names: --metric-success-*, --metric-warning-*, --metric-default-*, --metric-destructive-*",
|
|
43
|
+
"Create new themes in 15 minutes using THEME_CREATION_GUIDE.md template",
|
|
44
|
+
"All 207 primitive tokens defined in src/styles/tokens/oklch-primitives.css",
|
|
45
|
+
"Reference TOKEN_ARCHITECTURE.md for complete token system documentation",
|
|
46
|
+
"StepperGlass component uses compound API: StepperGlass.Root, .Step, .Title, .Description, .Indicator",
|
|
47
|
+
"StepperGlass has 3 variants: numbered (default), icon, dots - use variant prop",
|
|
48
|
+
"StepperGlass orientation: horizontal (default) or vertical",
|
|
49
|
+
"StepperGlass supports linear mode (wizard pattern) - set linear prop to lock future steps",
|
|
50
|
+
"Use exported hooks: useFocus, useHover, useResponsive, useWallpaperTint for custom components"
|
|
51
|
+
],
|
|
52
|
+
"previousVersions": [
|
|
53
|
+
{ "tag": "v2.0.0", "title": "Version 2.0.0 (Latest - Token Architecture)" },
|
|
54
|
+
{ "tag": "v1.1.0", "title": "Version 1.1.0" },
|
|
55
|
+
{ "tag": "v1.0.11", "title": "Version 1.0.11" },
|
|
56
|
+
{ "tag": "v1.0.0", "title": "Version 1.0.0 (Breaking Changes)" }
|
|
57
|
+
]
|
|
58
|
+
}
|