@yuva-devlab/ui 1.4.4 → 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/README.md +117 -33
- package/dist/common.css +0 -40
- package/dist/components/accordion/accordion.mdx +18 -0
- package/dist/components/alert/alert.css +2 -2
- package/dist/components/alert-dialog/alert-dialog.mdx +18 -0
- package/dist/components/aspect-ratio/aspect-ratio.mdx +22 -0
- package/dist/components/badge/badge.css +31 -27
- package/dist/components/badge/badge.mdx +6 -4
- package/dist/components/breadcrumb/breadcrumb.mdx +18 -0
- package/dist/components/calendar/calendar-nav.css +111 -0
- package/dist/components/calendar/calendar.css +27 -82
- package/dist/components/calendar/calendar.mdx +18 -0
- package/dist/components/card/card.css +4 -4
- package/dist/components/carousel/carousel.css +4 -4
- package/dist/components/carousel/carousel.mdx +18 -0
- package/dist/components/chain-of-thought/chain-of-thought.css +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.mdx +18 -0
- package/dist/components/chart/chart.css +86 -0
- package/dist/components/chart/chart.mdx +18 -0
- package/dist/components/checkbox/checkbox.css +11 -0
- package/dist/components/checkpoint/checkpoint.css +54 -0
- package/dist/components/checkpoint/checkpoint.mdx +18 -0
- package/dist/components/code-block/code-block.css +84 -0
- package/dist/components/code-block/code-block.mdx +26 -0
- package/dist/components/collapsible/collapsible.mdx +18 -0
- package/dist/components/command/command.css +3 -3
- package/dist/components/command/command.mdx +18 -0
- package/dist/components/confirm-dialog/confirm-dialog.mdx +18 -0
- package/dist/components/confirmation/confirmation.css +75 -0
- package/dist/components/confirmation/confirmation.mdx +22 -0
- package/dist/components/context/context.css +80 -0
- package/dist/components/context/context.mdx +18 -0
- package/dist/components/context-menu/context-menu.mdx +18 -0
- package/dist/components/copy-button/copy-button.mdx +18 -0
- package/dist/components/data-table/data-table.css +71 -0
- package/dist/components/data-table/data-table.mdx +22 -0
- package/dist/components/date-picker/date-picker.css +2 -2
- package/dist/components/date-picker/date-picker.mdx +18 -0
- package/dist/components/dialog/dialog.css +6 -6
- package/dist/components/drawer/drawer.mdx +18 -0
- package/dist/components/dropdown-menu/dropdown-menu.css +18 -0
- package/dist/components/dropdown-menu/dropdown-menu.mdx +18 -0
- package/dist/components/empty-state/empty-state.css +67 -0
- package/dist/components/empty-state/empty-state.mdx +18 -0
- package/dist/components/file-tree/file-tree.css +58 -0
- package/dist/components/file-tree/file-tree.mdx +18 -0
- package/dist/components/form/form.mdx +18 -0
- package/dist/components/hover-card/hover-card.mdx +18 -0
- package/dist/components/input-number/input-number.css +95 -0
- package/dist/components/input-number/input-number.mdx +34 -0
- package/dist/components/input-otp/input-otp.mdx +18 -0
- package/dist/components/kbd/kbd.css +78 -0
- package/dist/components/kbd/kbd.mdx +30 -0
- package/dist/components/label/label.mdx +18 -0
- package/dist/components/layout/layout.css +158 -0
- package/dist/components/layout/layout.mdx +30 -0
- package/dist/components/loading-state/loading-state.css +11 -0
- package/dist/components/loading-state/loading-state.mdx +18 -0
- package/dist/components/menubar/menubar.css +4 -4
- package/dist/components/menubar/menubar.mdx +18 -0
- package/dist/components/message/message.css +89 -0
- package/dist/components/message/message.mdx +14 -0
- package/dist/components/metric-card/metric-card.mdx +18 -0
- package/dist/components/model-selector/model-selector.css +138 -0
- package/dist/components/model-selector/model-selector.mdx +26 -0
- package/dist/components/multi-select/multi-select.css +212 -0
- package/dist/components/multi-select/multi-select.mdx +30 -0
- package/dist/components/navigation-menu/navigation-menu.css +2 -2
- package/dist/components/navigation-menu/navigation-menu.mdx +18 -0
- package/dist/components/pagination/pagination.css +8 -2
- package/dist/components/pagination/pagination.mdx +18 -0
- package/dist/components/panel/panel.mdx +18 -0
- package/dist/components/password-input/password-input.css +21 -0
- package/dist/components/password-input/password-input.mdx +30 -0
- package/dist/components/plan/plan.css +106 -0
- package/dist/components/plan/plan.mdx +22 -0
- package/dist/components/popover/popover.css +2 -7
- package/dist/components/popover/popover.mdx +18 -0
- package/dist/components/prompt-input/prompt-input.css +140 -0
- package/dist/components/prompt-input/prompt-input.mdx +22 -0
- package/dist/components/queue/queue.css +76 -0
- package/dist/components/queue/queue.mdx +18 -0
- package/dist/components/radio-group/radio-group.mdx +18 -0
- package/dist/components/resizable/resizable.mdx +18 -0
- package/dist/components/scroll-area/scroll-area.mdx +18 -0
- package/dist/components/search-input/search-input.css +21 -0
- package/dist/components/search-input/search-input.mdx +30 -0
- package/dist/components/searchable-select/searchable-select.css +26 -3
- package/dist/components/searchable-select/searchable-select.mdx +18 -0
- package/dist/components/secret-reveal-card/secret-reveal-card.css +6 -0
- package/dist/components/secret-reveal-card/secret-reveal-card.mdx +18 -0
- package/dist/components/select/select.css +17 -2
- package/dist/components/separator/separator.mdx +18 -0
- package/dist/components/sheet/sheet.css +5 -1
- package/dist/components/sheet/sheet.mdx +18 -0
- package/dist/components/sidebar/sidebar-menu.css +183 -0
- package/dist/components/sidebar/sidebar-submenu.css +69 -0
- package/dist/components/sidebar/sidebar.css +171 -4
- package/dist/components/sidebar/sidebar.mdx +18 -0
- package/dist/components/slider/slider.mdx +18 -0
- package/dist/components/sonner/sonner.css +68 -17
- package/dist/components/sonner/sonner.mdx +5 -3
- package/dist/components/sources/sources.css +105 -0
- package/dist/components/sources/sources.mdx +18 -0
- package/dist/components/stack-trace/stack-trace.css +105 -0
- package/dist/components/stack-trace/stack-trace.mdx +18 -0
- package/dist/components/status-chip/status-chip.mdx +18 -0
- package/dist/components/subagent/subagent.css +70 -0
- package/dist/components/subagent/subagent.mdx +18 -0
- package/dist/components/suggestion/suggestion.css +52 -0
- package/dist/components/suggestion/suggestion.mdx +14 -0
- package/dist/components/table/table.css +5 -3
- package/dist/components/tabs/tabs.css +3 -3
- package/dist/components/terminal/terminal.css +60 -0
- package/dist/components/terminal/terminal.mdx +26 -0
- package/dist/components/test-results/test-results.css +108 -0
- package/dist/components/test-results/test-results.mdx +18 -0
- package/dist/components/textarea/textarea.css +3 -3
- package/dist/components/textarea/textarea.mdx +18 -0
- package/dist/components/toggle/toggle.css +9 -9
- package/dist/components/toggle/toggle.mdx +18 -0
- package/dist/components/toggle-group/toggle-group.mdx +18 -0
- package/dist/components/tool-call/tool-call.css +111 -0
- package/dist/components/tool-call/tool-call.mdx +22 -0
- package/dist/components/tooltip/tooltip.mdx +18 -0
- package/dist/components/trace/trace.css +100 -0
- package/dist/components/trace/trace.mdx +18 -0
- package/dist/components/typography/heading.mdx +36 -0
- package/dist/components/typography/text.mdx +34 -0
- package/dist/components/typography/typography.css +98 -0
- package/dist/components.css +4454 -1179
- package/dist/index.cjs +4094 -1125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1742 -248
- package/dist/index.d.ts +1742 -248
- package/dist/index.js +4088 -1156
- package/dist/index.js.map +1 -1
- package/dist/preset.css +1 -4
- package/dist/styles/common.css +0 -40
- package/dist/styles/components.css +4454 -1179
- package/dist/styles/preset.css +1 -4
- package/dist/styles/styles.css +7 -4
- package/dist/styles/utilities.css +137 -0
- package/dist/styles.css +7 -4
- package/dist/utilities.css +137 -0
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -3,20 +3,33 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@yuva-devlab/ui)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://react.dev)
|
|
6
|
-
[](https://www.typescriptlang.org)
|
|
7
|
+
[](https://developer.mozilla.org/en-US/docs/Web/CSS/@layer)
|
|
7
8
|
|
|
8
|
-
> Production-ready, fully-typed React component library engineered for the DevLab ecosystem. Built on accessible Radix UI primitives, powered by OKLCH CSS design tokens (`@yuva-devlab/tokens`), and
|
|
9
|
+
> Production-ready, fully-typed React component library engineered for the DevLab ecosystem. Built on accessible Radix UI primitives, powered by OKLCH CSS design tokens (`@yuva-devlab/tokens`), and modular W3C Cascade Layers (`@layer dl-*`).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What's New in v2.0.0
|
|
14
|
+
|
|
15
|
+
- **Pure Platform CSS Architecture**: Completely eliminated Tailwind CSS runtime and utility dependencies from components. Component styling is strictly governed by W3C Cascade Layers (`@layer dl-base, dl-tokens, dl-components, dl-utilities`), eliminating CSS specificity conflicts and removing build-step plugin overhead.
|
|
16
|
+
- **First-Class Typography Primitives**: Added `<Heading>` and `<Text>` primitives with decoupled semantic HTML tags (`as="h1"`..`as="h6"`, `span`, `div`) and visual scales (`size="display" | "h1".."h6"` and `variant="body-lg" | "body" | "body-sm" | "caption" | "code" | "metric"`).
|
|
17
|
+
- **64+ Accessible UI Primitives**: Expanded catalog with Radix UI accessibility compliance and multi-brand responsiveness.
|
|
18
|
+
- **Upgraded Design Tokens Peer**: Upgraded to `@yuva-devlab/tokens@^2.0.0` with isolated brand extensions and native VS Code autocomplete.
|
|
9
19
|
|
|
10
20
|
---
|
|
11
21
|
|
|
12
22
|
## Features
|
|
13
23
|
|
|
14
24
|
- 🎨 **Multi-Brand Theme Architecture** - Seamless brand isolation across OrchestrAI, VitalAI, FinAI, Logs, and Portal.
|
|
15
|
-
-
|
|
25
|
+
- 📐 **Dynamic Theme-Driven Sizing** - Automatic adaptation across brand densities (compact telemetry logs, precision finance tables, athletic kinetic scaling).
|
|
26
|
+
- ⚡ **Pure Platform CSS** - Scoped W3C Cascade Layers (`@layer dl-components, dl-layout, dl-utilities`) and semantic design tokens.
|
|
27
|
+
- 🔤 **Typography Primitives** - First-class `<Heading>` and `<Text>` primitives with semantic decoupling.
|
|
28
|
+
- 📐 **Layout & Composition Primitives** - First-class `<Box>`, `<Flex>`, `<Stack>`, `<Grid>`, and `<Container>` primitives.
|
|
16
29
|
- ♿ **Accessible by Default** - Built on Radix UI primitives with complete WAI-ARIA and keyboard navigation compliance.
|
|
17
|
-
- 🧩 **
|
|
18
|
-
- 🔒 **End-to-End Type Safety** - First-class TypeScript definitions with full polymorphic `asChild` composition support.
|
|
19
|
-
- 📦 **Tree-Shakeable ESM & CJS** -
|
|
30
|
+
- 🧩 **64+ Core UI & Layout Primitives** - Buttons, Calendars, DatePickers, Drawers, Sheets, Sidebars, Menus, Modals, EmptyStates, Layouts, and more.
|
|
31
|
+
- 🔒 **End-to-End Type Safety** - First-class TypeScript definitions with full polymorphic `asChild` and `as` composition support.
|
|
32
|
+
- 📦 **Tree-Shakeable ESM & CJS** - Highly optimized builds producing clean dual artifacts.
|
|
20
33
|
|
|
21
34
|
---
|
|
22
35
|
|
|
@@ -47,38 +60,56 @@ pnpm add react@^19.0.0 react-dom@^19.0.0 sonner@^2.0.0
|
|
|
47
60
|
|
|
48
61
|
### 1. Configure Styles
|
|
49
62
|
|
|
50
|
-
In your application's root stylesheet (e.g. `globals.css` or `app.css`),
|
|
63
|
+
In your application's root stylesheet (e.g. `globals.css` or `app.css`), establish the W3C Cascade Layer order and import your desired tokens and styles:
|
|
51
64
|
|
|
52
65
|
```css
|
|
53
|
-
|
|
54
|
-
@
|
|
55
|
-
|
|
56
|
-
|
|
66
|
+
/* 1. Establish W3C Cascade Layer hierarchy */
|
|
67
|
+
@layer dl-base, dl-tokens, dl-components, dl-layout, dl-utilities, dl-app;
|
|
68
|
+
|
|
69
|
+
/* 2. Import design tokens & brand theme */
|
|
70
|
+
@import "@yuva-devlab/tokens/styles.css";
|
|
71
|
+
@import "@yuva-devlab/tokens/themes/finai.css";
|
|
72
|
+
|
|
73
|
+
/* 3. Import UI components and layout styles */
|
|
74
|
+
@import "@yuva-devlab/ui/styles.css";
|
|
57
75
|
```
|
|
58
76
|
|
|
59
|
-
> **Tip:** You can import any theme preset from `@yuva-devlab/tokens/themes/*` (`
|
|
77
|
+
> **Tip:** You can import any theme preset from `@yuva-devlab/tokens/themes/*` (`finai`, `vitalai`, `logs`, `orchestrai`, `portal`).
|
|
60
78
|
|
|
61
|
-
### 2. Render Components
|
|
79
|
+
### 2. Render Components & Typography Primitives
|
|
62
80
|
|
|
63
81
|
```tsx
|
|
64
|
-
import {
|
|
82
|
+
import {
|
|
83
|
+
Heading,
|
|
84
|
+
Text,
|
|
85
|
+
Button,
|
|
86
|
+
Card,
|
|
87
|
+
Badge,
|
|
88
|
+
Stack,
|
|
89
|
+
Flex,
|
|
90
|
+
} from "@yuva-devlab/ui";
|
|
65
91
|
import { Sparkles } from "lucide-react";
|
|
66
92
|
|
|
67
93
|
export default function DashboardCard() {
|
|
68
94
|
return (
|
|
69
|
-
<Card
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
<Card>
|
|
96
|
+
<Stack gap={4}>
|
|
97
|
+
<Flex justify="between" align="center">
|
|
98
|
+
{/* Decoupled semantic level and visual scale */}
|
|
99
|
+
<Heading as="h2" size="h3">
|
|
100
|
+
DevLab Portfolio
|
|
101
|
+
</Heading>
|
|
102
|
+
<Badge variant="default">Active</Badge>
|
|
103
|
+
</Flex>
|
|
104
|
+
|
|
105
|
+
<Text variant="caption">Last updated 5m ago</Text>
|
|
106
|
+
<Text variant="metric">$1,248,390.50</Text>
|
|
107
|
+
|
|
108
|
+
<Button variant="primary">
|
|
109
|
+
<Sparkles />
|
|
110
|
+
Execute Transaction
|
|
80
111
|
</Button>
|
|
81
|
-
</
|
|
112
|
+
</Stack>
|
|
82
113
|
</Card>
|
|
83
114
|
);
|
|
84
115
|
}
|
|
@@ -86,13 +117,52 @@ export default function DashboardCard() {
|
|
|
86
117
|
|
|
87
118
|
---
|
|
88
119
|
|
|
120
|
+
## Typography Primitives
|
|
121
|
+
|
|
122
|
+
### Heading Component
|
|
123
|
+
|
|
124
|
+
The `<Heading>` primitive decouples semantic HTML structure (`as`) from visual appearance (`size`):
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { Heading } from "@yuva-devlab/ui";
|
|
128
|
+
|
|
129
|
+
// Semantic H1 rendered with compact H3 visual appearance
|
|
130
|
+
<Heading as="h1" size="h3">Compact Header</Heading>
|
|
131
|
+
|
|
132
|
+
// Display heading for landing pages
|
|
133
|
+
<Heading as="h1" size="display">DevLab Cloud</Heading>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
| Prop | Type | Default | Description |
|
|
137
|
+
| :------ | :-------------------------------------------------------------------------------------- | :----------- | :------------------------------------------------------- |
|
|
138
|
+
| `as` | `"h1"` \| `"h2"` \| `"h3"` \| `"h4"` \| `"h5"` \| `"h6"` \| `"span"` \| `"div"` | `"h2"` | The semantic HTML element rendered to the DOM. |
|
|
139
|
+
| `size` | `"display"` \| `"h1"` \| `"h2"` \| `"h3"` \| `"h4"` \| `"h5"` \| `"h6"` | Matches `as` | The visual typographic scale applied via Cascade Layers. |
|
|
140
|
+
| `color` | `"default"` \| `"muted"` \| `"primary"` \| `"accent"` \| `"destructive"` \| `"success"` | `"default"` | Semantic text color token. |
|
|
141
|
+
|
|
142
|
+
### Text Component
|
|
143
|
+
|
|
144
|
+
The `<Text>` primitive handles body text, captions, inline code, and tabular metric numerals:
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import { Text } from "@yuva-devlab/ui";
|
|
148
|
+
|
|
149
|
+
<Text variant="body-lg">Large intro body copy</Text>
|
|
150
|
+
<Text variant="body">Standard UI body text</Text>
|
|
151
|
+
<Text variant="body-sm">Small helper description</Text>
|
|
152
|
+
<Text variant="caption">Footnotes and timestamps</Text>
|
|
153
|
+
<Text variant="code">const token = useToken();</Text>
|
|
154
|
+
<Text variant="metric">3,492 req/s</Text>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
89
159
|
## Multi-Brand Theming
|
|
90
160
|
|
|
91
161
|
DevLab UI supports multi-brand switching at runtime using `data-brand` and `data-theme` HTML attributes:
|
|
92
162
|
|
|
93
163
|
```html
|
|
94
|
-
<!-- Switch to
|
|
95
|
-
<html data-brand="
|
|
164
|
+
<!-- Switch to FinAI Spacious Theme with Dark Mode -->
|
|
165
|
+
<html data-brand="finai" class="dark">
|
|
96
166
|
...
|
|
97
167
|
</html>
|
|
98
168
|
```
|
|
@@ -101,19 +171,33 @@ DevLab UI supports multi-brand switching at runtime using `data-brand` and `data
|
|
|
101
171
|
|
|
102
172
|
| Brand Key | Theme Name | Primary Aesthetic | Token Import |
|
|
103
173
|
| :----------- | :---------------- | :------------------------ | :------------------------------------------ |
|
|
104
|
-
| `orchestrai` | **OrchestrAI** | Midnight Neon Violet | `@yuva-devlab/tokens/themes/orchestrai.css` |
|
|
105
|
-
| `vitalai` | **VitalAI** | Athletic Volt Kinetic | `@yuva-devlab/tokens/themes/vitalai.css` |
|
|
106
174
|
| `finai` | **FinAI** | High-Finance Emerald | `@yuva-devlab/tokens/themes/finai.css` |
|
|
175
|
+
| `vitalai` | **VitalAI** | Athletic Volt Kinetic | `@yuva-devlab/tokens/themes/vitalai.css` |
|
|
107
176
|
| `logs` | **DevLab Logs** | High-Density Matrix Amber | `@yuva-devlab/tokens/themes/logs.css` |
|
|
177
|
+
| `orchestrai` | **OrchestrAI** | Midnight Neon Violet | `@yuva-devlab/tokens/themes/orchestrai.css` |
|
|
108
178
|
| `portal` | **DevLab Portal** | Enterprise Modern Indigo | `@yuva-devlab/tokens/themes/portal.css` |
|
|
109
179
|
|
|
110
180
|
---
|
|
111
181
|
|
|
112
|
-
## Component Catalog (
|
|
182
|
+
## Component Catalog (64 Components)
|
|
183
|
+
|
|
184
|
+
### Typography Primitives
|
|
185
|
+
|
|
186
|
+
- **Heading** - Semantic heading with decoupled visual scale (`display`, `h1`..`h6`).
|
|
187
|
+
- **Text** - Multi-variant typography primitive (`body-lg`, `body`, `body-sm`, `caption`, `code`, `metric`).
|
|
188
|
+
|
|
189
|
+
### Layout & Composition Primitives
|
|
190
|
+
|
|
191
|
+
- **Box** - Fundamental container with padding, border, radius, shadow, and surface backgrounds.
|
|
192
|
+
- **Flex** - 1D flexbox container (`direction`, `justify`, `align`, `wrap`, `gap`, `inline`).
|
|
193
|
+
- **Stack** - Vertical or horizontal layout flow with token-governed spacing.
|
|
194
|
+
- **Grid** - Responsive 2D grid (`cols`, `gap`, minItemWidth auto-fit).
|
|
195
|
+
- **Container** - Responsive centered layout container with max-width boundaries (`sm` to `2xl`).
|
|
196
|
+
- **AspectRatio**, **Panel**, **Resizable**, **ScrollArea**, **Separator**
|
|
113
197
|
|
|
114
|
-
### General &
|
|
198
|
+
### General & Display
|
|
115
199
|
|
|
116
|
-
- **Button**, **CopyButton**, **Card**, **MetricCard**, **SecretRevealCard**, **Badge**, **StatusBadge**, **StatusChip**, **
|
|
200
|
+
- **Button**, **CopyButton**, **Card**, **MetricCard**, **SecretRevealCard**, **Badge**, **StatusBadge**, **StatusChip**, **Skeleton**, **LoadingState**, **EmptyState**
|
|
117
201
|
|
|
118
202
|
### Form & Data Entry
|
|
119
203
|
|
package/dist/common.css
CHANGED
|
@@ -106,46 +106,6 @@
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
@keyframes dl-spin {
|
|
110
|
-
from {
|
|
111
|
-
transform: rotate(0deg);
|
|
112
|
-
}
|
|
113
|
-
to {
|
|
114
|
-
transform: rotate(360deg);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* ── Sonner Toast Semantic Feedback ──────────────────────────────────────── */
|
|
119
|
-
[data-sonner-toaster] [data-sonner-toast] {
|
|
120
|
-
border-radius: var(--radius-md, 0.375rem);
|
|
121
|
-
}
|
|
122
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="success"] {
|
|
123
|
-
border-color: color-mix(in oklch, var(--success) 35%, transparent);
|
|
124
|
-
}
|
|
125
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="success"] [data-icon] {
|
|
126
|
-
color: var(--success);
|
|
127
|
-
}
|
|
128
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="error"],
|
|
129
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="destructive"] {
|
|
130
|
-
border-color: color-mix(in oklch, var(--destructive) 35%, transparent);
|
|
131
|
-
}
|
|
132
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="error"] [data-icon],
|
|
133
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="destructive"] [data-icon] {
|
|
134
|
-
color: var(--destructive);
|
|
135
|
-
}
|
|
136
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="warning"] {
|
|
137
|
-
border-color: color-mix(in oklch, var(--warning) 35%, transparent);
|
|
138
|
-
}
|
|
139
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="warning"] [data-icon] {
|
|
140
|
-
color: var(--warning);
|
|
141
|
-
}
|
|
142
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="info"] {
|
|
143
|
-
border-color: color-mix(in oklch, var(--info) 35%, transparent);
|
|
144
|
-
}
|
|
145
|
-
[data-sonner-toaster] [data-sonner-toast][data-type="info"] [data-icon] {
|
|
146
|
-
color: var(--info);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
109
|
/* ── Shared Glass & Surface Utilities ────────────────────────────────────── */
|
|
150
110
|
.dl-glass {
|
|
151
111
|
background-color: var(
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as AccordionStories from "./accordion.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={AccordionStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Accordion
|
|
9
|
+
|
|
10
|
+
Vertically stacked set of interactive headings that each reveal a section of content.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={AccordionStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.dl-alert {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
-
border-radius: var(--radius
|
|
4
|
+
border-radius: var(--radius, 0.5rem);
|
|
5
5
|
border: 1px solid var(--border);
|
|
6
|
-
padding: 0.875rem 1rem;
|
|
6
|
+
padding: var(--space-4, 0.875rem) var(--space-5, 1rem);
|
|
7
7
|
font-size: 0.875rem;
|
|
8
8
|
display: grid;
|
|
9
9
|
grid-template-columns: 1fr;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as AlertDialogStories from "./alert-dialog.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={AlertDialogStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Alert Dialog
|
|
9
|
+
|
|
10
|
+
Modal dialog that interrupts the user with important content and expects a confirmation or cancellation action.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={AlertDialogStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as AspectRatioStories from "./aspect-ratio.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={AspectRatioStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Aspect Ratio
|
|
9
|
+
|
|
10
|
+
Displays content within a desired ratio, preventing layout shifts during asset loading.
|
|
11
|
+
|
|
12
|
+
## Default (16:9)
|
|
13
|
+
|
|
14
|
+
<Canvas of={AspectRatioStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Square (1:1)
|
|
17
|
+
|
|
18
|
+
<Canvas of={AspectRatioStories.Square} />
|
|
19
|
+
|
|
20
|
+
## Component Properties
|
|
21
|
+
|
|
22
|
+
<Controls />
|
|
@@ -39,38 +39,42 @@
|
|
|
39
39
|
border-color: var(--border);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.dl-
|
|
42
|
+
.dl-badge-wrapper {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
vertical-align: middle;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dl-badge-count {
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
transform: translate(50%, -50%);
|
|
54
|
+
transform-origin: 100% 0%;
|
|
55
|
+
z-index: 10;
|
|
43
56
|
display: inline-flex;
|
|
44
57
|
align-items: center;
|
|
45
|
-
|
|
58
|
+
justify-content: center;
|
|
59
|
+
min-width: 1.25rem;
|
|
60
|
+
height: 1.25rem;
|
|
61
|
+
padding: 0 0.375rem;
|
|
46
62
|
border-radius: 9999px;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
font-
|
|
63
|
+
background-color: var(--destructive);
|
|
64
|
+
color: var(--destructive-foreground);
|
|
65
|
+
font-size: 0.6875rem;
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
line-height: 1;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
box-shadow: 0 0 0 2px var(--background);
|
|
50
70
|
}
|
|
51
|
-
|
|
71
|
+
|
|
72
|
+
.dl-badge-dot {
|
|
73
|
+
min-width: 0.5rem;
|
|
52
74
|
width: 0.5rem;
|
|
53
75
|
height: 0.5rem;
|
|
76
|
+
padding: 0;
|
|
54
77
|
border-radius: 9999px;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.dl-status-badge--success {
|
|
58
|
-
background-color: color-mix(in oklch, var(--success) 15%, transparent);
|
|
59
|
-
color: var(--success);
|
|
60
|
-
}
|
|
61
|
-
.dl-status-badge--destructive {
|
|
62
|
-
background-color: color-mix(in oklch, var(--destructive) 15%, transparent);
|
|
63
|
-
color: var(--destructive);
|
|
64
|
-
}
|
|
65
|
-
.dl-status-badge--warning {
|
|
66
|
-
background-color: color-mix(in oklch, var(--warning) 15%, transparent);
|
|
67
|
-
color: var(--warning);
|
|
68
|
-
}
|
|
69
|
-
.dl-status-badge--info {
|
|
70
|
-
background-color: color-mix(in oklch, var(--info) 15%, transparent);
|
|
71
|
-
color: var(--info);
|
|
72
|
-
}
|
|
73
|
-
.dl-status-badge--muted {
|
|
74
|
-
background-color: var(--muted);
|
|
75
|
-
color: var(--muted-foreground);
|
|
78
|
+
background-color: var(--destructive);
|
|
79
|
+
box-shadow: 0 0 0 2px var(--background);
|
|
76
80
|
}
|
|
@@ -7,18 +7,20 @@ import * as BadgeStories from "./badge.stories";
|
|
|
7
7
|
|
|
8
8
|
# Badge
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Versatile badge primitive supporting both standalone status tags and floating notification counters (`count`, `overflowCount`, `dot`) over icons, avatars, and buttons.
|
|
11
11
|
|
|
12
12
|
## Default
|
|
13
13
|
|
|
14
14
|
<Canvas of={BadgeStories.Default} />
|
|
15
15
|
|
|
16
|
-
## Variants
|
|
17
|
-
|
|
18
|
-
Available in `default`, `secondary`, `outline`, `destructive`, `success`, `warning`, and `info`.
|
|
16
|
+
## All Semantic Variants
|
|
19
17
|
|
|
20
18
|
<Canvas of={BadgeStories.AllVariants} />
|
|
21
19
|
|
|
20
|
+
## Notification Counter & Status Dot
|
|
21
|
+
|
|
22
|
+
<Canvas of={BadgeStories.NotificationCounts} />
|
|
23
|
+
|
|
22
24
|
## Component Properties
|
|
23
25
|
|
|
24
26
|
<Controls />
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
|
|
2
|
+
import * as BreadcrumbStories from "./breadcrumb.stories";
|
|
3
|
+
|
|
4
|
+
<Meta of={BreadcrumbStories} />
|
|
5
|
+
|
|
6
|
+
<Title />
|
|
7
|
+
|
|
8
|
+
# Breadcrumb
|
|
9
|
+
|
|
10
|
+
Hierarchical navigation trail indicating the current page location within a navigational hierarchy.
|
|
11
|
+
|
|
12
|
+
## Default
|
|
13
|
+
|
|
14
|
+
<Canvas of={BreadcrumbStories.Default} />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<Controls />
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.dl-calendar .rdp-month_caption,
|
|
2
|
+
.dl-calendar .dl-calendar__month-caption {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
height: var(--cell-size, 2rem);
|
|
6
|
+
width: 100%;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
padding: 0 var(--cell-size, 2rem);
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
color: var(--foreground);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dl-calendar .rdp-caption_label,
|
|
17
|
+
.dl-calendar .dl-calendar__caption-label {
|
|
18
|
+
font-size: 0.875rem;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
color: var(--foreground);
|
|
21
|
+
line-height: 1;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dl-calendar .dl-calendar__caption-label--interactive {
|
|
26
|
+
display: flex;
|
|
27
|
+
height: var(--control-height-sm, 2rem);
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: 0.25rem;
|
|
30
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
31
|
+
padding-inline: 0.5rem 0.25rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dl-calendar .dl-calendar__dropdowns {
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 100%;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: 0.375rem;
|
|
40
|
+
font-size: 0.875rem;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.dl-calendar .dl-calendar__dropdown-root {
|
|
45
|
+
position: relative;
|
|
46
|
+
border-radius: var(--radius-md, 0.375rem);
|
|
47
|
+
border: 1px solid var(--border);
|
|
48
|
+
box-shadow: var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dl-calendar .dl-calendar__dropdown {
|
|
52
|
+
position: absolute;
|
|
53
|
+
inset: 0;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
background: var(--popover);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dl-calendar .rdp-nav,
|
|
60
|
+
.dl-calendar .dl-calendar__nav {
|
|
61
|
+
position: absolute;
|
|
62
|
+
top: 0;
|
|
63
|
+
inset-inline: 0;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: var(--cell-size, 2rem);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dl-calendar .rdp-button_previous,
|
|
73
|
+
.dl-calendar .rdp-button_next,
|
|
74
|
+
.dl-calendar .dl-calendar__nav-button {
|
|
75
|
+
pointer-events: auto;
|
|
76
|
+
width: var(--cell-size, 2rem) !important;
|
|
77
|
+
height: var(--cell-size, 2rem) !important;
|
|
78
|
+
min-width: var(--cell-size, 2rem) !important;
|
|
79
|
+
padding: 0 !important;
|
|
80
|
+
display: inline-flex !important;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
border-radius: var(--radius-md, 0.375rem) !important;
|
|
84
|
+
border: 1px solid var(--border);
|
|
85
|
+
background: var(--background);
|
|
86
|
+
color: var(--muted-foreground);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
user-select: none;
|
|
89
|
+
transition: all 0.15s ease;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dl-calendar .rdp-button_previous:hover,
|
|
93
|
+
.dl-calendar .rdp-button_next:hover,
|
|
94
|
+
.dl-calendar .dl-calendar__nav-button:hover {
|
|
95
|
+
background-color: var(--accent);
|
|
96
|
+
color: var(--accent-foreground);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.dl-calendar .rdp-button_previous[aria-disabled="true"],
|
|
100
|
+
.dl-calendar .rdp-button_next[aria-disabled="true"] {
|
|
101
|
+
opacity: 0.5;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dl-calendar .rdp-button_previous svg,
|
|
106
|
+
.dl-calendar .rdp-button_next svg,
|
|
107
|
+
.dl-calendar .dl-calendar__chevron {
|
|
108
|
+
width: 1rem;
|
|
109
|
+
height: 1rem;
|
|
110
|
+
flex-shrink: 0;
|
|
111
|
+
}
|