@clidey/ux 0.39.0 → 0.40.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.
Files changed (109) hide show
  1. package/README.md +296 -212
  2. package/dist/app.d.ts +3 -0
  3. package/dist/app.d.ts.map +1 -0
  4. package/dist/components/theme/provider.d.ts +14 -0
  5. package/dist/components/theme/provider.d.ts.map +1 -0
  6. package/dist/components/theme/toggle.d.ts +2 -0
  7. package/dist/components/theme/toggle.d.ts.map +1 -0
  8. package/dist/components/ui/accordion.d.ts +8 -0
  9. package/dist/components/ui/accordion.d.ts.map +1 -0
  10. package/dist/components/ui/alert-dialog.d.ts +15 -0
  11. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  12. package/dist/components/ui/alert.d.ts +10 -0
  13. package/dist/components/ui/alert.d.ts.map +1 -0
  14. package/dist/components/ui/badge.d.ts +10 -0
  15. package/dist/components/ui/badge.d.ts.map +1 -0
  16. package/dist/components/ui/breadcrumb.d.ts +12 -0
  17. package/dist/components/ui/breadcrumb.d.ts.map +1 -0
  18. package/dist/components/ui/button-group.d.ts +12 -0
  19. package/dist/components/ui/button-group.d.ts.map +1 -0
  20. package/dist/components/ui/button.d.ts +10 -0
  21. package/dist/components/ui/button.d.ts.map +1 -0
  22. package/dist/components/ui/card.d.ts +10 -0
  23. package/dist/components/ui/card.d.ts.map +1 -0
  24. package/dist/components/ui/chart.d.ts +57 -0
  25. package/dist/components/ui/chart.d.ts.map +1 -0
  26. package/dist/components/ui/checkbox.d.ts +5 -0
  27. package/dist/components/ui/checkbox.d.ts.map +1 -0
  28. package/dist/components/ui/command.d.ts +19 -0
  29. package/dist/components/ui/command.d.ts.map +1 -0
  30. package/dist/components/ui/context-menu.d.ts +26 -0
  31. package/dist/components/ui/context-menu.d.ts.map +1 -0
  32. package/dist/components/ui/dialog.d.ts +16 -0
  33. package/dist/components/ui/dialog.d.ts.map +1 -0
  34. package/dist/components/ui/drawer.d.ts +14 -0
  35. package/dist/components/ui/drawer.d.ts.map +1 -0
  36. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  37. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  38. package/dist/components/ui/empty-state.d.ts +8 -0
  39. package/dist/components/ui/empty-state.d.ts.map +1 -0
  40. package/dist/components/ui/icon.d.ts +14 -0
  41. package/dist/components/ui/icon.d.ts.map +1 -0
  42. package/dist/components/ui/input.d.ts +9 -0
  43. package/dist/components/ui/input.d.ts.map +1 -0
  44. package/dist/components/ui/label.d.ts +5 -0
  45. package/dist/components/ui/label.d.ts.map +1 -0
  46. package/dist/components/ui/pagination.d.ts +14 -0
  47. package/dist/components/ui/pagination.d.ts.map +1 -0
  48. package/dist/components/ui/popover.d.ts +8 -0
  49. package/dist/components/ui/popover.d.ts.map +1 -0
  50. package/dist/components/ui/progress.d.ts +5 -0
  51. package/dist/components/ui/progress.d.ts.map +1 -0
  52. package/dist/components/ui/resizable.d.ts +9 -0
  53. package/dist/components/ui/resizable.d.ts.map +1 -0
  54. package/dist/components/ui/scroll-area.d.ts +6 -0
  55. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  56. package/dist/components/ui/select.d.ts +46 -0
  57. package/dist/components/ui/select.d.ts.map +1 -0
  58. package/dist/components/ui/separator.d.ts +5 -0
  59. package/dist/components/ui/separator.d.ts.map +1 -0
  60. package/dist/components/ui/sheet.d.ts +15 -0
  61. package/dist/components/ui/sheet.d.ts.map +1 -0
  62. package/dist/components/ui/sidebar.d.ts +72 -0
  63. package/dist/components/ui/sidebar.d.ts.map +1 -0
  64. package/dist/components/ui/skeleton.d.ts +3 -0
  65. package/dist/components/ui/skeleton.d.ts.map +1 -0
  66. package/dist/components/ui/sonner.d.ts +4 -0
  67. package/dist/components/ui/sonner.d.ts.map +1 -0
  68. package/dist/components/ui/spinner.d.ts +13 -0
  69. package/dist/components/ui/spinner.d.ts.map +1 -0
  70. package/dist/components/ui/stack-list.d.ts +17 -0
  71. package/dist/components/ui/stack-list.d.ts.map +1 -0
  72. package/dist/components/ui/switch.d.ts +5 -0
  73. package/dist/components/ui/switch.d.ts.map +1 -0
  74. package/dist/components/ui/table.d.ts +42 -0
  75. package/dist/components/ui/table.d.ts.map +1 -0
  76. package/dist/components/ui/tabs.d.ts +8 -0
  77. package/dist/components/ui/tabs.d.ts.map +1 -0
  78. package/dist/components/ui/tooltip.d.ts +8 -0
  79. package/dist/components/ui/tooltip.d.ts.map +1 -0
  80. package/dist/components/ui/tree.d.ts +17 -0
  81. package/dist/components/ui/tree.d.ts.map +1 -0
  82. package/dist/hooks/use-mobile.d.ts +2 -0
  83. package/dist/hooks/use-mobile.d.ts.map +1 -0
  84. package/dist/index.d.ts +41 -658
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +862 -849
  87. package/dist/lib/use-resize-observer.d.ts +6 -0
  88. package/dist/lib/use-resize-observer.d.ts.map +1 -0
  89. package/dist/lib/utils.d.ts +5 -0
  90. package/dist/lib/utils.d.ts.map +1 -0
  91. package/dist/showcases/buttons-showcase.d.ts +2 -0
  92. package/dist/showcases/buttons-showcase.d.ts.map +1 -0
  93. package/dist/showcases/charts-showcase.d.ts +2 -0
  94. package/dist/showcases/charts-showcase.d.ts.map +1 -0
  95. package/dist/showcases/data-showcase.d.ts +2 -0
  96. package/dist/showcases/data-showcase.d.ts.map +1 -0
  97. package/dist/showcases/feedback-showcase.d.ts +2 -0
  98. package/dist/showcases/feedback-showcase.d.ts.map +1 -0
  99. package/dist/showcases/forms-showcase.d.ts +2 -0
  100. package/dist/showcases/forms-showcase.d.ts.map +1 -0
  101. package/dist/showcases/layout-showcase.d.ts +2 -0
  102. package/dist/showcases/layout-showcase.d.ts.map +1 -0
  103. package/dist/showcases/navigation-showcase.d.ts +2 -0
  104. package/dist/showcases/navigation-showcase.d.ts.map +1 -0
  105. package/dist/showcases/overlays-showcase.d.ts +2 -0
  106. package/dist/showcases/overlays-showcase.d.ts.map +1 -0
  107. package/dist/styles.css +1 -1
  108. package/package.json +3 -4
  109. package/dist/styles.css.d.ts +0 -1
package/README.md CHANGED
@@ -1,278 +1,362 @@
1
- # @clidey/ux
2
-
3
- A modern React UI component library built with Tailwind CSS and Radix UI primitives.
4
-
5
- ## Features
6
-
7
- - 🎨 **Modern Design**: Clean, accessible components with a modern aesthetic
8
- - 🌙 **Dark Mode**: Built-in dark mode support with theme switching
9
- - ♿ **Accessible**: Built on Radix UI primitives for excellent accessibility
10
- - 🎯 **TypeScript**: Full TypeScript support with proper type definitions
11
- - 🚀 **Lightweight**: Optimized bundle size with tree-shaking support
12
- - 🎨 **Customizable**: Easy to customize with Tailwind CSS classes
1
+ <p align="center">
2
+ <img src="./docs/logo/logo.png" alt="Clidey UX" height="72" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <strong>A production-ready React component library built on Radix UI and Tailwind CSS v4.</strong><br/>
7
+ 37+ accessible, composable, dark-mode-ready components drop in and ship.
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/@clidey/ux">
12
+ <img src="https://img.shields.io/npm/v/@clidey/ux?color=6366f1&labelColor=18181b&style=flat-square" alt="npm version" />
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/@clidey/ux">
15
+ <img src="https://img.shields.io/npm/dm/@clidey/ux?color=6366f1&labelColor=18181b&style=flat-square" alt="downloads" />
16
+ </a>
17
+ <a href="https://github.com/clidey/ux/blob/main/LICENSE">
18
+ <img src="https://img.shields.io/badge/license-MIT-6366f1?labelColor=18181b&style=flat-square" alt="MIT license" />
19
+ </a>
20
+ <img src="https://img.shields.io/badge/React-18%20%7C%2019-6366f1?labelColor=18181b&style=flat-square" alt="React 18/19" />
21
+ <img src="https://img.shields.io/badge/TypeScript-ready-6366f1?labelColor=18181b&style=flat-square" alt="TypeScript" />
22
+ </p>
23
+
24
+ ---
25
+
26
+ ## Why Clidey UX?
27
+
28
+ Building a consistent, accessible UI from scratch takes weeks. Clidey UX gives you a complete set of polished components so you can focus on your product, not your design system.
29
+
30
+ - **Accessible by default** — every component is built on [Radix UI](https://radix-ui.com) primitives. Keyboard navigation, focus management, and ARIA attributes are handled for you.
31
+ - **Dark mode included** — wrap your app with `ThemeProvider` and all components adapt automatically. System preference detection and `localStorage` persistence built in.
32
+ - **Fully typed** — complete TypeScript definitions with strict mode. Autocomplete for every prop, variant, and event handler.
33
+ - **Composable API** — sub-component patterns give you full control over layout and markup without fighting against an opinionated structure.
34
+ - **Tailwind CSS v4** — styled with utility classes you already know. Override anything with `className`.
35
+ - **Zero configuration** — one import, one stylesheet, done.
36
+
37
+ ---
13
38
 
14
39
  ## Installation
15
40
 
16
41
  ```bash
17
42
  npm install @clidey/ux
18
43
  # or
19
- yarn add @clidey/ux
20
- # or
21
44
  pnpm add @clidey/ux
45
+ # or
46
+ yarn add @clidey/ux
22
47
  ```
23
48
 
24
- ## Quick Start
49
+ **Import the stylesheet once** at your app entry point:
25
50
 
26
51
  ```tsx
27
- import { Button, Card, ThemeProvider } from '@clidey/ux'
28
-
29
- function App() {
30
- return (
31
- <ThemeProvider defaultTheme="dark" storageKey="my-app-theme">
32
- <Card>
33
- <CardHeader>
34
- <CardTitle>Welcome to Clidey UX</CardTitle>
35
- </CardHeader>
36
- <CardContent>
37
- <Button>Click me</Button>
38
- </CardContent>
39
- </Card>
40
- </ThemeProvider>
41
- )
42
- }
52
+ // main.tsx / _app.tsx
53
+ import '@clidey/ux/styles.css';
43
54
  ```
44
55
 
45
- **Note:** Styles are automatically included when you import components. No additional CSS imports are required.
46
-
47
- ## Components
48
-
49
- ### Layout Components
50
-
51
- - **Card** - Container component with header, content, and footer sections
52
- - **Skeleton** - Loading state component
53
-
54
- ### Form Components
55
-
56
- - **Button** - Button component with multiple variants and sizes
57
- - **Input** - Input field component
58
- - **Label** - Form label component
59
-
60
- ### Navigation Components
61
-
62
- - **Breadcrumb** - Hierarchical navigation component
63
- - **Pagination** - Page navigation component
64
- - **Tabs** - Tabbed interface component
65
-
66
- ### Data Display Components
67
-
68
- - **Badge** - Status and label component
69
- - **Table** - Data table component
70
- - **Tooltip** - Tooltip component
71
-
72
- ### Overlay Components
73
-
74
- - **ContextMenu** - Context menu component
75
- - **Drawer** - Slide-out drawer component
76
- - **DropdownMenu** - Dropdown menu component
77
- - **Popover** - Popover component
78
-
79
- ### Feedback Components
80
-
81
- - **Toaster** - Toast notification component
82
-
83
- ### Theme Components
84
-
85
- - **ThemeProvider** - Theme context provider
86
- - **ModeToggle** - Theme toggle button
87
-
88
- ## Usage Examples
89
-
90
- ### Basic Button
56
+ **Wrap with ThemeProvider** to enable dark mode:
91
57
 
92
58
  ```tsx
93
- import { Button } from '@clidey/ux'
59
+ import { ThemeProvider } from '@clidey/ux';
94
60
 
95
- function MyComponent() {
61
+ export default function App() {
96
62
  return (
97
- <div>
98
- <Button>Default Button</Button>
99
- <Button variant="secondary">Secondary</Button>
100
- <Button variant="destructive">Delete</Button>
101
- <Button variant="outline">Outline</Button>
102
- <Button variant="ghost">Ghost</Button>
103
- <Button variant="link">Link</Button>
104
- </div>
105
- )
63
+ <ThemeProvider defaultTheme="system">
64
+ {/* your app */}
65
+ </ThemeProvider>
66
+ );
106
67
  }
107
68
  ```
108
69
 
109
- ### Card with Content
70
+ That's it. No extra configuration, no Tailwind setup required in your project.
110
71
 
111
- ```tsx
112
- import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@clidey/ux'
72
+ ---
73
+
74
+ ## Quick start
113
75
 
114
- function MyCard() {
76
+ ```tsx
77
+ import {
78
+ Button,
79
+ Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter,
80
+ Badge,
81
+ Input,
82
+ Label,
83
+ } from '@clidey/ux';
84
+ import '@clidey/ux/styles.css';
85
+
86
+ export default function Example() {
115
87
  return (
116
- <Card>
88
+ <Card className="max-w-sm">
117
89
  <CardHeader>
118
- <CardTitle>Card Title</CardTitle>
119
- <CardDescription>Card description goes here</CardDescription>
90
+ <CardTitle>Create account</CardTitle>
91
+ <CardDescription>Get started in seconds. No credit card required.</CardDescription>
120
92
  </CardHeader>
121
- <CardContent>
122
- <p>This is the main content of the card.</p>
93
+ <CardContent className="space-y-3">
94
+ <div className="space-y-1">
95
+ <Label htmlFor="email">Email</Label>
96
+ <Input id="email" type="email" placeholder="you@example.com" />
97
+ </div>
98
+ <div className="space-y-1">
99
+ <Label htmlFor="password">Password</Label>
100
+ <Input id="password" type="password" showPasswordToggle />
101
+ </div>
123
102
  </CardContent>
124
- <CardFooter>
125
- <Button>Action</Button>
103
+ <CardFooter className="flex items-center justify-between">
104
+ <Badge variant="outline">Free plan</Badge>
105
+ <Button>Create account</Button>
126
106
  </CardFooter>
127
107
  </Card>
128
- )
108
+ );
129
109
  }
130
110
  ```
131
111
 
132
- ### Form with Input
133
-
134
- ```tsx
135
- import { Input, Label, Button } from '@clidey/ux'
112
+ ---
136
113
 
137
- function MyForm() {
138
- return (
139
- <form className="space-y-4">
140
- <div>
141
- <Label htmlFor="email">Email</Label>
142
- <Input id="email" type="email" placeholder="Enter your email" />
143
- </div>
144
- <Button type="submit">Submit</Button>
145
- </form>
146
- )
147
- }
148
- ```
114
+ ## Components
149
115
 
150
- ### Table with Data
116
+ ### Actions
117
+ | Component | Description |
118
+ | --- | --- |
119
+ | `Button` | 6 variants (`default`, `destructive`, `outline`, `secondary`, `ghost`, `link`) · 4 sizes |
120
+ | `ButtonGroup` | Connected button strip for toolbars and segmented controls |
121
+
122
+ ### Inputs
123
+ | Component | Description |
124
+ | --- | --- |
125
+ | `Input` | Text field with optional password toggle |
126
+ | `TextArea` | Multi-line text input |
127
+ | `SearchInput` | Text field with built-in search icon |
128
+ | `Checkbox` | Accessible checkbox with indeterminate state |
129
+ | `Switch` | Toggle for boolean settings |
130
+ | `Select` | Composable dropdown selector |
131
+ | `SearchSelect` | Dropdown with search filtering and icon support |
132
+ | `Label` | Accessible form label |
133
+
134
+ ### Display
135
+ | Component | Description |
136
+ | --- | --- |
137
+ | `Badge` | Status and category labels · 4 variants |
138
+ | `Card` | Container with header, content, footer, and action slots |
139
+ | `Alert` | Inline feedback messages · `default` and `destructive` |
140
+ | `Spinner` | Animated loader · 5 color variants · 3 sizes |
141
+ | `Skeleton` | Pulsing placeholder for loading states |
142
+ | `Progress` | Linear progress bar |
143
+ | `EmptyState` | Placeholder for empty lists and zero-state screens |
144
+ | `Separator` | Horizontal or vertical divider |
145
+
146
+ ### Navigation
147
+ | Component | Description |
148
+ | --- | --- |
149
+ | `Tabs` | Tab panels for switching between sections |
150
+ | `Breadcrumb` | Hierarchical path with ellipsis support |
151
+ | `Pagination` | Previous / next and numbered page controls |
152
+ | `Sidebar` | Full sidebar with collapsible menus, submenus, mobile support |
153
+
154
+ ### Overlays
155
+ | Component | Description |
156
+ | --- | --- |
157
+ | `Dialog` | Modal with focus trap and scroll lock |
158
+ | `AlertDialog` | Blocking confirmation for destructive actions |
159
+ | `Drawer` | Slide-in panel from any edge (powered by Vaul) |
160
+ | `Sheet` | Side panel overlay (powered by Radix Dialog) |
161
+ | `Tooltip` | Hover label with configurable delay and position |
162
+ | `Popover` | Click-anchored floating panel |
163
+
164
+ ### Menus
165
+ | Component | Description |
166
+ | --- | --- |
167
+ | `DropdownMenu` | Trigger menu with checkboxes, radio groups, and sub-menus |
168
+ | `ContextMenu` | Right-click menu with the same rich item types |
169
+ | `Command` | Fuzzy-search command palette (⌘K) powered by cmdk |
170
+
171
+ ### Layout
172
+ | Component | Description |
173
+ | --- | --- |
174
+ | `Accordion` | Collapsible sections with animated expand/collapse |
175
+ | `ResizablePanelGroup` | Drag-to-resize split views |
176
+ | `ScrollArea` | Custom scrollbar with styled track and thumb |
177
+ | `StackList` | Key-value metadata list with separators |
178
+
179
+ ### Data & Visualization
180
+ | Component | Description |
181
+ | --- | --- |
182
+ | `Table` | Full table with virtualization for large datasets and JSON preview |
183
+ | `Chart` | Recharts wrapper with theme-aware tooltips and legend |
184
+ | `Tree` | Hierarchical tree / file explorer with expand and selection |
185
+
186
+ ### Utilities
187
+ | Component | Description |
188
+ | --- | --- |
189
+ | `Icon` | SVG wrapper with consistent sizing |
190
+ | `Toaster` | Toast notifications powered by Sonner |
191
+
192
+ ### Theme
193
+ | Component / Hook | Description |
194
+ | --- | --- |
195
+ | `ThemeProvider` | Context provider for light / dark / system theme |
196
+ | `useTheme` | Hook to read and set the active theme |
197
+ | `ModeToggle` | Ready-made dropdown to switch themes |
198
+
199
+ ---
200
+
201
+ ## Usage examples
202
+
203
+ ### Confirmation dialog
151
204
 
152
205
  ```tsx
153
- import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Badge } from '@clidey/ux'
154
-
155
- function MyTable() {
156
- return (
157
- <Table>
158
- <TableHeader>
159
- <TableRow>
160
- <TableHead>Name</TableHead>
161
- <TableHead>Email</TableHead>
162
- <TableHead>Status</TableHead>
163
- </TableRow>
164
- </TableHeader>
165
- <TableBody>
166
- <TableRow>
167
- <TableCell>John Doe</TableCell>
168
- <TableCell>john@example.com</TableCell>
169
- <TableCell><Badge>Active</Badge></TableCell>
170
- </TableRow>
171
- </TableBody>
172
- </Table>
173
- )
174
- }
206
+ import {
207
+ AlertDialog, AlertDialogTrigger, AlertDialogContent,
208
+ AlertDialogHeader, AlertDialogTitle, AlertDialogDescription,
209
+ AlertDialogFooter, AlertDialogCancel, AlertDialogAction,
210
+ Button,
211
+ } from '@clidey/ux';
212
+
213
+ <AlertDialog>
214
+ <AlertDialogTrigger asChild>
215
+ <Button variant="destructive">Delete account</Button>
216
+ </AlertDialogTrigger>
217
+ <AlertDialogContent>
218
+ <AlertDialogHeader>
219
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
220
+ <AlertDialogDescription>
221
+ This action cannot be undone. Your data will be permanently deleted.
222
+ </AlertDialogDescription>
223
+ </AlertDialogHeader>
224
+ <AlertDialogFooter>
225
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
226
+ <AlertDialogAction>Delete account</AlertDialogAction>
227
+ </AlertDialogFooter>
228
+ </AlertDialogContent>
229
+ </AlertDialog>
175
230
  ```
176
231
 
177
- ### Theme Setup
232
+ ### Toast notifications
178
233
 
179
234
  ```tsx
180
- import { ThemeProvider, ModeToggle } from '@clidey/ux'
181
-
182
- function App() {
183
- return (
184
- <ThemeProvider defaultTheme="dark" storageKey="my-app-theme">
185
- <div>
186
- <ModeToggle />
187
- {/* Your app content */}
188
- </div>
189
- </ThemeProvider>
190
- )
191
- }
235
+ import { Toaster, toast } from '@clidey/ux';
236
+
237
+ // In your root layout
238
+ <Toaster />
239
+
240
+ // Anywhere in your app
241
+ toast.success('Saved successfully!');
242
+ toast.error('Something went wrong.');
243
+ toast.promise(saveData(), {
244
+ loading: 'Saving...',
245
+ success: 'Done!',
246
+ error: 'Failed to save.',
247
+ });
192
248
  ```
193
249
 
194
- ## Styling
195
-
196
- The components are built with Tailwind CSS v4 and include all necessary styles automatically. When you import any component, the styles are automatically included in your bundle.
250
+ ### Command palette (⌘K)
197
251
 
198
- ### Requirements
252
+ ```tsx
253
+ import {
254
+ CommandDialog, CommandInput, CommandList,
255
+ CommandEmpty, CommandGroup, CommandItem,
256
+ } from '@clidey/ux';
257
+
258
+ <CommandDialog open={open} onOpenChange={setOpen}>
259
+ <CommandInput placeholder="Search commands..." />
260
+ <CommandList>
261
+ <CommandEmpty>No results found.</CommandEmpty>
262
+ <CommandGroup heading="Navigation">
263
+ <CommandItem onSelect={() => navigate('/dashboard')}>Dashboard</CommandItem>
264
+ <CommandItem onSelect={() => navigate('/settings')}>Settings</CommandItem>
265
+ </CommandGroup>
266
+ </CommandList>
267
+ </CommandDialog>
268
+ ```
199
269
 
200
- To use the components properly, you need to have Tailwind CSS v4 installed in your project:
270
+ ### Large dataset table with virtualization
201
271
 
202
- ```bash
203
- npm install tailwindcss@next
272
+ ```tsx
273
+ import {
274
+ TableProvider, Table, TableHeader, TableHeadRow,
275
+ TableHead, VirtualizedTableBody, TableRow, TableCell,
276
+ } from '@clidey/ux';
277
+
278
+ <TableProvider columnCount={3}>
279
+ <Table>
280
+ <TableHeader>
281
+ <TableHeadRow>
282
+ <TableHead>ID</TableHead>
283
+ <TableHead>Name</TableHead>
284
+ <TableHead>Status</TableHead>
285
+ </TableHeadRow>
286
+ </TableHeader>
287
+ <VirtualizedTableBody rowCount={10000} rowHeight={48} height={400}>
288
+ {({ index, style }) => (
289
+ <TableRow style={style}>
290
+ <TableCell>{rows[index].id}</TableCell>
291
+ <TableCell>{rows[index].name}</TableCell>
292
+ <TableCell>{rows[index].status}</TableCell>
293
+ </TableRow>
294
+ )}
295
+ </VirtualizedTableBody>
296
+ </Table>
297
+ </TableProvider>
204
298
  ```
205
299
 
206
- ### Configuration
207
-
208
- Configure your build tool to process CSS. For example, with Vite:
209
-
210
- ```js
211
- // vite.config.js
212
- import { defineConfig } from 'vite'
213
- import react from '@vitejs/plugin-react'
214
-
215
- export default defineConfig({
216
- plugins: [react()],
217
- css: {
218
- postcss: {
219
- plugins: [
220
- require('tailwindcss'),
221
- ],
222
- },
223
- },
224
- })
225
- ```
300
+ ---
226
301
 
227
- ### CSS Variables
302
+ ## Theming
228
303
 
229
- The package provides CSS custom properties for theming that are automatically included:
304
+ All visual tokens are exposed as CSS custom properties. Override them in your own stylesheet after importing `@clidey/ux/styles.css`:
230
305
 
231
306
  ```css
232
307
  :root {
233
- --radius: 0.625rem;
234
- --background: oklch(1 0 0);
235
- --foreground: oklch(0.145 0 0);
236
- /* ... more variables */
237
- }
238
-
239
- .dark {
240
- --background: oklch(0.145 0 0);
241
- --foreground: oklch(0.985 0 0);
242
- /* ... dark mode variables */
308
+ --primary: 250 84% 54%; /* your brand color */
309
+ --radius: 0.375rem; /* border radius */
243
310
  }
244
311
  ```
245
312
 
246
- ### Troubleshooting
313
+ Dark mode is automatic — `ThemeProvider` applies a `dark` class to `<html>` and all components respond to it via Tailwind's `dark:` modifier.
247
314
 
248
- If the styles aren't loading properly:
315
+ ---
249
316
 
250
- 1. **Check your build tool configuration** - Make sure CSS imports are being processed
251
- 2. **Verify Tailwind CSS version** - Ensure you're using Tailwind CSS v4
252
- 3. **Clear cache** - Try clearing your build cache and node_modules
317
+ ## Next.js
253
318
 
254
- ## Dependencies
319
+ ```tsx
320
+ // app/providers.tsx
321
+ 'use client';
322
+ import { ThemeProvider } from '@clidey/ux';
255
323
 
256
- This package has the following peer dependencies:
324
+ export function Providers({ children }: { children: React.ReactNode }) {
325
+ return <ThemeProvider defaultTheme="system">{children}</ThemeProvider>;
326
+ }
257
327
 
258
- - `react` (^18.0.0 || ^19.0.0)
259
- - `react-dom` (^18.0.0 || ^19.0.0)
328
+ // app/layout.tsx
329
+ import '@clidey/ux/styles.css';
330
+ import { Providers } from './providers';
260
331
 
261
- And the following dependencies:
332
+ export default function RootLayout({ children }: { children: React.ReactNode }) {
333
+ return (
334
+ <html lang="en" suppressHydrationWarning>
335
+ <body>
336
+ <Providers>{children}</Providers>
337
+ </body>
338
+ </html>
339
+ );
340
+ }
341
+ ```
262
342
 
263
- - `@radix-ui/react-*` - UI primitives
264
- - `class-variance-authority` - Component variants
265
- - `clsx` - Conditional classes
266
- - `lucide-react` - Icons
267
- - `next-themes` - Theme management
268
- - `sonner` - Toast notifications
269
- - `tailwind-merge` - Tailwind class merging
270
- - `vaul` - Drawer component
343
+ ---
271
344
 
272
- ## License
345
+ ## Peer dependencies
346
+
347
+ | Package | Version |
348
+ | --- | --- |
349
+ | `react` | `>= 18.3.0` |
350
+ | `react-dom` | `>= 18.3.0` |
273
351
 
274
- MIT
352
+ All other dependencies (Radix UI, Lucide, Recharts, Sonner, Vaul, cmdk) are bundled — no extra installs needed.
353
+
354
+ ---
275
355
 
276
356
  ## Contributing
277
357
 
278
- Contributions are welcome! Please feel free to submit a Pull Request.
358
+ Contributions, bug reports, and feature requests are welcome. Please open an issue or pull request on [GitHub](https://github.com/clidey/ux).
359
+
360
+ ## License
361
+
362
+ MIT — free to use in personal and commercial projects.
package/dist/app.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
3
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.tsx"],"names":[],"mappings":"AAwCA,iBAAS,GAAG,4CAwFX;AAED,eAAe,GAAG,CAAA"}
@@ -0,0 +1,14 @@
1
+ type Theme = "dark" | "light" | "system";
2
+ type ThemeProviderProps = {
3
+ children: React.ReactNode;
4
+ defaultTheme?: Theme;
5
+ storageKey?: string;
6
+ };
7
+ type ThemeProviderState = {
8
+ theme: Theme;
9
+ setTheme: (theme: Theme) => void;
10
+ };
11
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const useTheme: () => ThemeProviderState;
13
+ export {};
14
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/components/theme/provider.tsx"],"names":[],"mappings":"AAkBA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAExC,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CACjC,CAAA;AASD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAuB,EACvB,UAA+B,EAC/B,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAoCpB;AAED,eAAO,MAAM,QAAQ,0BAOpB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function ModeToggle(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/theme/toggle.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,UAAU,4CA4BzB"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
+ declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
8
+ //# sourceMappingURL=accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/ui/accordion.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAK/D,iBAAS,SAAS,CAAC,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAEtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAgBzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAUzD;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
11
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
12
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
13
+ declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
14
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
15
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert-dialog.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAI3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAI1D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAW3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAc3D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ7B;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,2CAQzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,2CAQ/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,2CAO1D;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
9
+ export { Alert, AlertTitle, AlertDescription };
10
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAA;AAI/D,QAAA,MAAM,aAAa;;8EAalB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CAUlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAWrE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAW3B;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA"}