@work-rjkashyap/unified-ui 0.1.1 → 0.1.2
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 +48 -47
- package/README.md +21 -21
- package/dist/{chunk-QXR4VY7Q.cjs → chunk-33QEKXRQ.cjs} +1 -1
- package/dist/chunk-3EHT6IOA.cjs +49 -0
- package/dist/{chunk-F37GRFSW.cjs → chunk-4NYLE2LT.cjs} +799 -823
- package/dist/{chunk-BIW2RPDU.cjs → chunk-4ON3M3OM.cjs} +4 -4
- package/dist/{chunk-SSGN5QDC.mjs → chunk-5NZDQWRV.mjs} +1 -1
- package/dist/{chunk-3HHJAYQI.cjs → chunk-7ITQSRGX.cjs} +30 -30
- package/dist/{chunk-6A7ID2CO.mjs → chunk-A4YYJAAJ.mjs} +630 -649
- package/dist/{chunk-CWETOWRM.mjs → chunk-F5S6NLOT.mjs} +24 -24
- package/dist/chunk-MBYCK2JJ.mjs +37 -0
- package/dist/chunk-PQR7C4OH.cjs +1533 -0
- package/dist/chunk-QEFOXYBO.cjs +398 -0
- package/dist/chunk-TVCJRD3S.mjs +379 -0
- package/dist/chunk-ZDB557B2.mjs +1505 -0
- package/dist/{chunk-M2LNQWOB.mjs → chunk-ZT3PCXDF.mjs} +4 -4
- package/dist/components.cjs +143 -123
- package/dist/components.d.cts +67 -74
- package/dist/components.d.ts +67 -74
- package/dist/components.mjs +3 -3
- package/dist/index.cjs +304 -204
- package/dist/index.d.cts +5 -14
- package/dist/index.d.ts +5 -14
- package/dist/index.mjs +8 -8
- package/dist/primitives.cjs +14 -14
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.mjs +2 -2
- package/dist/theme.cjs +90 -9
- package/dist/theme.d.cts +271 -12
- package/dist/theme.d.ts +271 -12
- package/dist/theme.mjs +3 -2
- package/dist/tokens.cjs +19 -19
- package/dist/tokens.d.cts +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.mjs +1 -1
- package/dist/utils.cjs +42 -42
- package/dist/utils.d.cts +41 -37
- package/dist/utils.d.ts +41 -37
- package/dist/utils.mjs +3 -3
- package/dist/z-index-G0PBTHL2.d.cts +466 -0
- package/dist/z-index-G0PBTHL2.d.ts +466 -0
- package/package.json +183 -202
- package/styles.css +384 -291
- package/dist/chunk-2RGLRX6K.cjs +0 -279
- package/dist/chunk-I74E52C5.mjs +0 -271
- package/dist/chunk-IWJ5VMZ7.mjs +0 -323
- package/dist/chunk-KHON2AEM.cjs +0 -342
- package/dist/chunk-LSNKPQP7.cjs +0 -58
- package/dist/chunk-ZBN26FLO.mjs +0 -46
- package/dist/z-index-B_nTQ3qo.d.cts +0 -422
- package/dist/z-index-B_nTQ3qo.d.ts +0 -422
package/CHANGELOG.md
CHANGED
|
@@ -1,31 +1,63 @@
|
|
|
1
1
|
# Unified UI Changelog
|
|
2
|
-
|
|
3
2
|
All notable changes to the Unified UI design system will be documented in this file.
|
|
4
|
-
|
|
5
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
5
|
---
|
|
9
|
-
|
|
10
6
|
## [Unreleased]
|
|
11
|
-
|
|
12
7
|
### Planned
|
|
13
|
-
|
|
14
|
-
- Documentation site overhaul (Phase 6) — MDX pages with interactive component previews
|
|
15
|
-
- Motion & accessibility hardening (Phase 7) — focus ring standardization, WCAG AA contrast audit, `prefers-reduced-motion` audit
|
|
16
|
-
- Migration guide (Phase 9) — mapping from legacy `fd-*` tokens to `ds-*` tokens, component replacement strategy
|
|
8
|
+
- Migration guide — mapping from legacy `--ds-*` tokens to new plain `--*` tokens
|
|
17
9
|
- CI/CD pipeline for automated publishing on git tags
|
|
18
10
|
- `UnifiedUIProvider` component for optional auto CSS injection
|
|
19
11
|
- Component tests with Vitest + Testing Library
|
|
20
|
-
|
|
21
12
|
---
|
|
22
|
-
|
|
13
|
+
## [0.1.2] — 2026-03-03
|
|
14
|
+
### Added
|
|
15
|
+
#### Theme Customizer System
|
|
16
|
+
- **`ThemeCustomizerProvider`** — React context provider for runtime theme management with `localStorage` persistence and cross-tab sync via `StorageEvent`
|
|
17
|
+
- **`useThemeCustomizer()`** — hook exposing `config`, `setColorPreset`, `setRadius`, `setFont`, `setShadow`, `setSurfaceStyle`, `resetConfig`, `isDefault`, `generateCSS`
|
|
18
|
+
- **`ThemeCustomizer`** — drop-in UI component with color swatch picker, radius preview, font preview, shadow/surface style toggles, "Copy CSS" button, and reset
|
|
19
|
+
- **13 color presets**: 5 neutral (`Zinc`, `Slate`, `Gray`, `Stone`, `Neutral`) + 8 chromatic (`Blue`, `Green`, `Violet`, `Rose`, `Orange`, `Red`, `Teal`, `Brand`)
|
|
20
|
+
- **7 radius presets**: None (0px) through XL (16px), default 10px
|
|
21
|
+
- **5 font presets**: Outfit, Inter, System, Serif, Mono
|
|
22
|
+
- **4 shadow presets**: None, Subtle, Default, Heavy (each with light/dark scales)
|
|
23
|
+
- **3 surface style presets**: Bordered, Elevated, Mixed
|
|
24
|
+
- `ThemeConfig` type, `DEFAULT_THEME_CONFIG`, `buildThemeOverrides()`, `generateThemeCSS()` utilities
|
|
25
|
+
- `COLOR_PRESET_KEYS`, `COLOR_PRESETS`, `getColorPreset`, `getFontPreset`, `getRadiusPreset`, `getShadowPreset` helpers
|
|
26
|
+
- Exported types: `ColorPreset`, `ColorPresetKey`, `FontPreset`, `RadiusPreset`, `ShadowPreset`, `SurfaceStylePreset`, `PresetSemanticColors`, `ThemeCustomizerContextValue`, `ThemeCustomizerProps`, `ThemeCustomizerProviderProps`
|
|
27
|
+
#### New Tokens
|
|
28
|
+
- `neutral` color palette added to `tokens/colors`
|
|
29
|
+
- New CSS custom properties: `--card`, `--card-foreground`, `--popover`, `--popover-foreground`, `--accent`, `--accent-foreground`, `--destructive`, `--destructive-foreground`, `--ring`, `--radius`, `--chart-1` through `--chart-5`, `--sidebar-*` (8 tokens)
|
|
30
|
+
#### Select Sub-component Exports
|
|
31
|
+
- Newly exported: `SelectContent`, `SelectContentProps`, `SelectTrigger`, `SelectTriggerProps`, `SelectValue`, `SelectScrollUpButton`, `SelectScrollUpButtonProps`, `SelectScrollDownButton`, `SelectScrollDownButtonProps`
|
|
32
|
+
### Changed
|
|
33
|
+
#### Color Format: RGB → oklch
|
|
34
|
+
- All color tokens migrated from RGB channel strings (e.g. `"79 70 229"`) to complete `oklch()` values (e.g. `"oklch(0.585 0.233 277.117)"`)
|
|
35
|
+
- Affects all palettes: `slate`, `gray`, `zinc`, `brand`, `blue`, `green`, `red`, `amber`, `teal`
|
|
36
|
+
- Semantic colors (light + dark) updated to use oklch values
|
|
37
|
+
- Shadow tokens updated from `rgba()` to `oklch()` syntax
|
|
38
|
+
- `dsColorVar()` now returns `var(--{name})` and uses `color-mix(in oklch, ...)` for alpha variants instead of `rgb(... / alpha)`
|
|
39
|
+
#### CSS Variable Prefix Removal (`--ds-*` → `--*`)
|
|
40
|
+
- Removed the `PREFIX` constant from `contract.ts`
|
|
41
|
+
- All CSS custom properties simplified: `--ds-color-primary` → `--primary`, `--ds-radius-md` → `--radius-md`, `--ds-shadow-lg` → `--shadow-lg`, `--ds-z-modal` → `--z-modal`, `--ds-duration-fast` → `--duration-fast`, `--ds-easing-standard` → `--easing-standard`, `--ds-font-sans` → `--font-sans`
|
|
42
|
+
- All Tailwind utility classes updated: `bg-ds-primary` → `bg-primary`, `text-ds-foreground` → `text-foreground`, `rounded-ds-md` → `rounded-md`, etc.
|
|
43
|
+
- All 25 components, 3 primitives, and all utilities updated for the new naming
|
|
44
|
+
#### Focus Ring System Overhaul
|
|
45
|
+
- Redesigned from ring-based (`focus-visible:ring-2 focus-visible:ring-ds-focus-ring focus-visible:ring-offset-2`) to border-based (`focus-visible:border-border-strong`) focus indicators
|
|
46
|
+
- All focus ring variants updated: `focusRingClasses`, `focusRingInsetClasses`, `focusRingCompactClasses`, `focusWithinRingClasses`, `focusRingGroupRingClasses`, `focusRingGroupTriggerClasses`
|
|
47
|
+
#### Component Updates
|
|
48
|
+
- **Button** — Added `not-prose no-underline` to base styles to prevent prose typography overrides on `<a>` buttons
|
|
49
|
+
- **Select** — Refactored to compositional sub-component pattern; removed `SelectProps` type (use sub-component props instead)
|
|
50
|
+
- **DropdownMenu** — Major refactor (618 lines changed)
|
|
51
|
+
- **Popover** — Major refactor (332 lines changed)
|
|
52
|
+
- **DataTable** — Updated for new token naming and focus styles
|
|
53
|
+
#### Other
|
|
54
|
+
- Updated `UNIFIED_UI_VERSION` exported constant from `"0.1.1"` to `"0.1.2"`
|
|
55
|
+
- `@theme` block in `styles.css` completely rewritten with plain `--{name}` properties and new token categories
|
|
56
|
+
- `dsVar()` now generates `--{category}-{name}` (was `--ds-{category}-{name}`)
|
|
57
|
+
---
|
|
23
58
|
## [0.1.1] — 2026-02-28
|
|
24
|
-
|
|
25
59
|
### Added
|
|
26
|
-
|
|
27
60
|
#### DataTable Component
|
|
28
|
-
|
|
29
61
|
- **DataTable** — Full-featured data table powered by TanStack Table (`@tanstack/react-table` ≥ 8.0.0)
|
|
30
62
|
- Column sorting, filtering (text + faceted), row selection, column visibility toggles
|
|
31
63
|
- Built-in pagination with configurable page sizes
|
|
@@ -33,36 +65,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
33
65
|
- `createColumnHelper` re-export for type-safe column definitions
|
|
34
66
|
- Exported types: `DataTableProps`, `DataTableColumnMeta`, `DataTableFacetedFilter`, `UseDataTableOptions`, `UseDataTableReturn`, `ColumnDef`, `ColumnFiltersState`, `PaginationState`, `Row`, `RowSelectionState`, `SortingState`, `VisibilityState`
|
|
35
67
|
- `@tanstack/react-table` added as an optional peer dependency
|
|
36
|
-
|
|
37
68
|
#### Motion Hooks
|
|
38
|
-
|
|
39
69
|
- `useMotion()` — hook for accessing motion presets with reduced-motion awareness
|
|
40
70
|
- `useMotionProps()` — hook that returns spread-ready motion props
|
|
41
71
|
- `useMotionSpringConfig()` — hook for accessing spring configuration tokens
|
|
42
72
|
- `useReducedMotion()` — hook for detecting `prefers-reduced-motion` user preference
|
|
43
73
|
- `MotionSafe` — wrapper component that conditionally renders motion based on user preference
|
|
44
|
-
|
|
45
74
|
### Changed
|
|
46
|
-
|
|
47
75
|
- Updated `UNIFIED_UI_VERSION` exported constant from `"0.1.0"` to `"0.1.1"`
|
|
48
76
|
- Component count updated from 22 to 23 across documentation and metadata
|
|
49
77
|
- Package description updated to reflect 23+ components
|
|
50
|
-
|
|
51
78
|
### Fixed
|
|
52
|
-
|
|
53
79
|
- Removed self-referential dependency (`@work-rjkashyap/unified-ui` depending on itself) from `package.json`
|
|
54
80
|
- Added missing `homepage` and `bugs` fields to `package.json`
|
|
55
81
|
- Added `funding` field to `package.json`
|
|
56
82
|
- Expanded `keywords` in `package.json` for better npm discoverability (`tailwind-css-v4`, `design-tokens`, `css-variables`, `theming`, `dark-mode`, `typescript`, `tree-shakeable`)
|
|
57
|
-
|
|
58
83
|
---
|
|
59
|
-
|
|
60
84
|
## [0.1.0] — 2026-02-27
|
|
61
|
-
|
|
62
85
|
### Added
|
|
63
|
-
|
|
64
86
|
#### Design Tokens
|
|
65
|
-
|
|
66
87
|
- Color palettes: `slate`, `gray`, `zinc`, `neutral`, `red`, `green`, `blue`, `amber`, `teal`, `brand`, `pure`
|
|
67
88
|
- Semantic color mappings for light and dark themes (`semanticLight`, `semanticDark`)
|
|
68
89
|
- Spacing scale (0–96 + custom values)
|
|
@@ -71,17 +92,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
71
92
|
- Shadow scale with light and dark variants
|
|
72
93
|
- Z-index scale (`hide`, `base`, `dropdown`, `sticky`, `overlay`, `modal`, `popover`, `toast`, `max`)
|
|
73
94
|
- Motion tokens: `duration`, `easing`, `spring`, `stagger` (with CSS and seconds variants)
|
|
74
|
-
|
|
75
95
|
#### Theme System
|
|
76
|
-
|
|
77
|
-
- CSS variable contract using `--ds-` prefix for all tokens
|
|
96
|
+
- CSS variable contract mapping all tokens to plain CSS custom properties
|
|
78
97
|
- `DSThemeProvider` component with light/dark/system mode support
|
|
79
98
|
- `useDSTheme()` hook for programmatic theme access
|
|
80
99
|
- `buildLightThemeVars()` / `buildDarkThemeVars()` / `buildThemeCSS()` utilities
|
|
81
100
|
- `cssVar()` helper for type-safe CSS variable references
|
|
82
|
-
|
|
83
101
|
#### Typography System
|
|
84
|
-
|
|
85
102
|
- Multi-font architecture with four font families:
|
|
86
103
|
- **Outfit** (`--font-outfit`) — primary sans-serif UI typeface
|
|
87
104
|
- **Inter** (`--font-inter`) — display / headings
|
|
@@ -89,15 +106,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
89
106
|
- **JetBrains Mono** (`--font-jetbrains`) — monospace / code
|
|
90
107
|
- `font` prop on `Typography` component for runtime font switching
|
|
91
108
|
- Graceful fallback to system font stacks when web fonts are unavailable
|
|
92
|
-
|
|
93
109
|
#### Tailwind CSS v4 Integration
|
|
94
|
-
|
|
95
110
|
- `styles.css` with full `@theme` block mapping all tokens to Tailwind utilities
|
|
96
|
-
-
|
|
111
|
+
- Direct Tailwind utilities for colors, radius, shadows, transitions, fonts (no prefix)
|
|
97
112
|
- Font CSS custom properties (`--font-outfit`, `--font-inter`, `--font-lora`, `--font-jetbrains`)
|
|
98
|
-
|
|
99
113
|
#### Primitive Components
|
|
100
|
-
|
|
101
114
|
- **Typography** — polymorphic text component with `variant`, `font`, `color`, `align`, `truncate` props
|
|
102
115
|
- **Heading** — semantic heading (h1–h6) with automatic size mapping
|
|
103
116
|
- **Subheading** — secondary heading variant
|
|
@@ -110,9 +123,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
110
123
|
- **Stack** — flexbox layout with `direction`, `gap`, `align`, `justify`
|
|
111
124
|
- **Grid** — CSS grid layout with responsive column configuration
|
|
112
125
|
- **Divider** — horizontal/vertical separator with label support
|
|
113
|
-
|
|
114
126
|
#### Composite Components (22 total)
|
|
115
|
-
|
|
116
127
|
- **Button** — primary, secondary, outline, ghost, danger, link variants; sm/md/lg sizes; icon-only mode; loading state
|
|
117
128
|
- **Input** — text input with prefix/suffix slots, error state, disabled state
|
|
118
129
|
- **Textarea** — auto-resize support, character count, error state
|
|
@@ -136,9 +147,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
136
147
|
- **Table** — semantic table with striped rows, hover highlight, sticky header, responsive wrapper; compact/default/relaxed density
|
|
137
148
|
- **Pagination** — page numbers with ellipsis, prev/next, compact variant, controlled/uncontrolled
|
|
138
149
|
- **Breadcrumb** — composable sub-components + `BreadcrumbNav` shorthand; truncation with ellipsis
|
|
139
|
-
|
|
140
150
|
#### Motion System
|
|
141
|
-
|
|
142
151
|
- Fade presets: `fadeIn`, `fadeInFast`, `fadeInSlow`
|
|
143
152
|
- Slide presets: `slideUp`, `slideUpSm`, `slideUpLg`, `slideUpSpring`, `slideDown`, `slideDownSm`, `slideLeft`, `slideRight`, `slideInFromLeft`, `slideInFromRight`, `slideInFromBottom`
|
|
144
153
|
- Scale presets: `scaleIn`, `scaleInLg`, `scaleInSpring`
|
|
@@ -151,9 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
151
160
|
- Stagger containers: `staggerContainer`, `staggerContainerFast`, `staggerContainerSlow`
|
|
152
161
|
- `motionProps()` spread helper for clean JSX usage
|
|
153
162
|
- `reduceMotion` / `withReducedMotion()` utilities for `prefers-reduced-motion` support
|
|
154
|
-
|
|
155
163
|
#### Utilities
|
|
156
|
-
|
|
157
164
|
- `cn()` — class name merger (clsx + tailwind-merge)
|
|
158
165
|
- `mergeSlots()` — slot-based class merging for composite components
|
|
159
166
|
- `composeRefs()` — compose multiple React refs into one
|
|
@@ -167,9 +174,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
167
174
|
- Polymorphic component types: `AsProp`, `PolymorphicProps`, `PolymorphicPropsWithRef`, `PolymorphicRef`, `PolymorphicComponent`
|
|
168
175
|
- Slot types: `SlotClasses`, `SlotConfig`, `SlotDefinition`, `SlotRenderFn`, `Slots`
|
|
169
176
|
- Component types: `ComponentSize`, `ComponentIntent`, `ChildrenProps`, `OptionalChildrenProps`
|
|
170
|
-
|
|
171
177
|
#### Package & Build
|
|
172
|
-
|
|
173
178
|
- `tsup` build pipeline producing ESM (`.mjs`) and CJS (`.cjs`) with TypeScript declarations (`.d.ts` / `.d.cts`)
|
|
174
179
|
- 7 entry points: `index`, `tokens`, `theme`, `primitives`, `components`, `motion`, `utils`
|
|
175
180
|
- Selective `"use client"` directive — applied only to client entry points (not tokens/utils)
|
|
@@ -177,17 +182,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
177
182
|
- Tree-shakeable with code splitting enabled
|
|
178
183
|
- `styles.css` exported as `@work-rjkashyap/unified-ui/styles.css` for Tailwind `@theme` integration
|
|
179
184
|
- `@unified-ui/*` TypeScript path aliases (zero relative cross-directory imports)
|
|
180
|
-
|
|
181
185
|
#### Infrastructure
|
|
182
|
-
|
|
183
186
|
- `UNIFIED_UI_VERSION` exported constant for runtime version checking
|
|
184
187
|
- `.npmignore` for clean package distribution
|
|
185
188
|
- `sideEffects` field for optimal tree-shaking
|
|
186
189
|
- Conditional `exports` map with full `import`/`require`/`types` resolution
|
|
187
190
|
- `typesVersions` fallback for older TypeScript resolvers
|
|
188
|
-
|
|
189
191
|
---
|
|
190
|
-
|
|
191
192
|
_Design system: Unified UI_
|
|
192
193
|
_Maintainer: Rajeshwar Kashyap_
|
|
193
194
|
_Repository: [github.com/imrj05/unified-ui](https://github.com/imrj05/unified-ui)_
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
- **Token-driven** — Every color, spacing, radius, shadow, and motion value flows from a single source of truth
|
|
16
16
|
- **23+ components** — Production-ready composites built on Radix UI primitives
|
|
17
|
-
- **Tailwind CSS v4** — First-class integration via `@theme`
|
|
17
|
+
- **Tailwind CSS v4** — First-class integration via `@theme` with direct utility classes
|
|
18
18
|
- **Framer Motion** — Consistent animation presets with `prefers-reduced-motion` support
|
|
19
19
|
- **Accessible** — WCAG AA contrast, keyboard navigation, ARIA attributes, and focus management
|
|
20
20
|
- **Tree-shakeable** — 7 independent entry points with ESM/CJS dual output and code splitting
|
|
@@ -57,7 +57,7 @@ npm install @radix-ui/react-dialog @radix-ui/react-select @radix-ui/react-tabs
|
|
|
57
57
|
|
|
58
58
|
### 1. Import the CSS
|
|
59
59
|
|
|
60
|
-
Add the stylesheet to your global CSS file **before** any component usage. This registers all
|
|
60
|
+
Add the stylesheet to your global CSS file **before** any component usage. This registers all CSS custom properties and Tailwind `@theme` utilities.
|
|
61
61
|
|
|
62
62
|
```css
|
|
63
63
|
/* src/app/globals.css */
|
|
@@ -183,10 +183,10 @@ Raw design values: colors, spacing, typography, radius, shadows, z-index, and mo
|
|
|
183
183
|
|
|
184
184
|
Bridges tokens to runtime via CSS custom properties and React context.
|
|
185
185
|
|
|
186
|
-
| File | Contents
|
|
187
|
-
| -------------- |
|
|
188
|
-
| `contract.ts` | Maps token keys → CSS variable names
|
|
189
|
-
| `provider.tsx` | `DSThemeProvider` + `useDSTheme` hook
|
|
186
|
+
| File | Contents |
|
|
187
|
+
| -------------- | ----------------------------------------------------------- |
|
|
188
|
+
| `contract.ts` | Maps token keys → CSS variable names, `cssVar` helper |
|
|
189
|
+
| `provider.tsx` | `DSThemeProvider` + `useDSTheme` hook |
|
|
190
190
|
|
|
191
191
|
### Layer 3 — Primitives (`primitives/`)
|
|
192
192
|
|
|
@@ -232,33 +232,33 @@ Hooks: `useMotion`, `useMotionProps`, `useMotionSpringConfig`, `useReducedMotion
|
|
|
232
232
|
|
|
233
233
|
## CSS Variable Prefix
|
|
234
234
|
|
|
235
|
-
All CSS custom properties use
|
|
235
|
+
All CSS custom properties use plain `--` prefix with no namespace infix:
|
|
236
236
|
|
|
237
237
|
```
|
|
238
|
-
--
|
|
239
|
-
--
|
|
240
|
-
--
|
|
241
|
-
--
|
|
242
|
-
--
|
|
243
|
-
--
|
|
238
|
+
--primary
|
|
239
|
+
--radius-md
|
|
240
|
+
--shadow-lg
|
|
241
|
+
--duration-normal
|
|
242
|
+
--easing-standard
|
|
243
|
+
--font-sans
|
|
244
244
|
```
|
|
245
245
|
|
|
246
246
|
### Tailwind Utility Classes
|
|
247
247
|
|
|
248
|
-
After importing the CSS, use
|
|
248
|
+
After importing the CSS, use standard Tailwind utilities:
|
|
249
249
|
|
|
250
250
|
```html
|
|
251
251
|
<!-- Colors (supports opacity modifier) -->
|
|
252
|
-
<div class="bg-
|
|
253
|
-
<div class="bg-
|
|
252
|
+
<div class="bg-primary text-primary-foreground">Primary</div>
|
|
253
|
+
<div class="bg-muted/50">Semi-transparent muted</div>
|
|
254
254
|
|
|
255
255
|
<!-- Radius, shadows, transitions -->
|
|
256
|
-
<div class="rounded-
|
|
257
|
-
<button class="duration-
|
|
256
|
+
<div class="rounded-md shadow-lg">Elevated card</div>
|
|
257
|
+
<button class="duration-fast ease-standard">Animated</button>
|
|
258
258
|
|
|
259
259
|
<!-- Fonts -->
|
|
260
|
-
<p class="font-
|
|
261
|
-
<code class="font-
|
|
260
|
+
<p class="font-serif">Editorial text</p>
|
|
261
|
+
<code class="font-mono">console.log("hello")</code>
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
### Data Attributes
|
|
@@ -351,7 +351,7 @@ console.log(UNIFIED_UI_VERSION); // "0.1.1"
|
|
|
351
351
|
|
|
352
352
|
## Troubleshooting
|
|
353
353
|
|
|
354
|
-
### `bg-
|
|
354
|
+
### `bg-primary` and other Tailwind utilities aren't working
|
|
355
355
|
|
|
356
356
|
Make sure you import the CSS **after** `@import "tailwindcss"` in your global stylesheet. The `@theme` block must be processed by Tailwind.
|
|
357
357
|
|
|
@@ -109,7 +109,7 @@ var DS_LIGHT_CRITICAL_PAIRS = [
|
|
|
109
109
|
},
|
|
110
110
|
// Secondary
|
|
111
111
|
{ label: "secondary-fg on secondary", fg: "24 24 27", bg: "244 244 245" },
|
|
112
|
-
// Muted (zinc.600 = 82 82 91 — matches CSS --
|
|
112
|
+
// Muted (zinc.600 = 82 82 91 — matches CSS --muted-foreground)
|
|
113
113
|
{ label: "muted-fg on background", fg: "82 82 91", bg: "255 255 255" },
|
|
114
114
|
{ label: "muted-fg on muted", fg: "82 82 91", bg: "244 244 245" },
|
|
115
115
|
// Semantic — foreground on solid bg (dark text on bright semantic colors)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/focus-ring.ts
|
|
4
|
+
var focusRingClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
5
|
+
var focusRingClassList = [
|
|
6
|
+
"focus-visible:outline-none",
|
|
7
|
+
"focus-visible:border-border-strong"
|
|
8
|
+
];
|
|
9
|
+
var focusRingInsetClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
10
|
+
var focusRingInsetClassList = [
|
|
11
|
+
"focus-visible:outline-none",
|
|
12
|
+
"focus-visible:border-border-strong"
|
|
13
|
+
];
|
|
14
|
+
var focusRingCompactClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
15
|
+
var focusRingCompactClassList = [
|
|
16
|
+
"focus-visible:outline-none",
|
|
17
|
+
"focus-visible:border-border-strong"
|
|
18
|
+
];
|
|
19
|
+
var focusRingVariantOverrides = {
|
|
20
|
+
/** Override focus border color to danger red */
|
|
21
|
+
danger: "focus-visible:border-danger",
|
|
22
|
+
/** Override focus border color to success green */
|
|
23
|
+
success: "focus-visible:border-success",
|
|
24
|
+
/** Override focus border color to warning amber */
|
|
25
|
+
warning: "focus-visible:border-warning",
|
|
26
|
+
/** Override focus border color to info blue */
|
|
27
|
+
info: "focus-visible:border-info",
|
|
28
|
+
/** Override focus border color to current text color */
|
|
29
|
+
current: "focus-visible:border-current"
|
|
30
|
+
};
|
|
31
|
+
var focusRingGroupTriggerClasses = "focus-visible:outline-none";
|
|
32
|
+
var focusRingGroupRingClasses = "group-focus-visible:border-border-strong";
|
|
33
|
+
var focusWithinRingClasses = "focus-within:outline-none focus-within:border-border-strong";
|
|
34
|
+
var focusWithinRingClassList = [
|
|
35
|
+
"focus-within:outline-none",
|
|
36
|
+
"focus-within:border-border-strong"
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
exports.focusRingClassList = focusRingClassList;
|
|
40
|
+
exports.focusRingClasses = focusRingClasses;
|
|
41
|
+
exports.focusRingCompactClassList = focusRingCompactClassList;
|
|
42
|
+
exports.focusRingCompactClasses = focusRingCompactClasses;
|
|
43
|
+
exports.focusRingGroupRingClasses = focusRingGroupRingClasses;
|
|
44
|
+
exports.focusRingGroupTriggerClasses = focusRingGroupTriggerClasses;
|
|
45
|
+
exports.focusRingInsetClassList = focusRingInsetClassList;
|
|
46
|
+
exports.focusRingInsetClasses = focusRingInsetClasses;
|
|
47
|
+
exports.focusRingVariantOverrides = focusRingVariantOverrides;
|
|
48
|
+
exports.focusWithinRingClassList = focusWithinRingClassList;
|
|
49
|
+
exports.focusWithinRingClasses = focusWithinRingClasses;
|