@arolariu/components 0.0.10 → 0.0.11

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 (105) hide show
  1. package/dist/cjs/components/ui/carousel.js +1 -1
  2. package/dist/cjs/components/ui/menubar.js +1 -1
  3. package/dist/cjs/components/ui/pagination.js +1 -1
  4. package/dist/cjs/components/ui/popover.js +1 -1
  5. package/dist/cjs/components/ui/scroll-area.js +1 -1
  6. package/dist/es/components/ui/accordion.js +8 -50
  7. package/dist/es/components/ui/alert-dialog.js +22 -118
  8. package/dist/es/components/ui/alert.js +14 -52
  9. package/dist/es/components/ui/aspect-ratio.js +2 -4
  10. package/dist/es/components/ui/avatar.js +6 -42
  11. package/dist/es/components/ui/badge.js +13 -28
  12. package/dist/es/components/ui/breadcrumb.js +10 -78
  13. package/dist/es/components/ui/button.js +21 -37
  14. package/dist/es/components/ui/calendar.js +29 -52
  15. package/dist/es/components/ui/card.js +6 -51
  16. package/dist/es/components/ui/carousel.js +32 -142
  17. package/dist/es/components/ui/chart.js +42 -169
  18. package/dist/es/components/ui/checkbox.js +2 -23
  19. package/dist/es/components/ui/collapsible.js +6 -24
  20. package/dist/es/components/ui/command.js +18 -136
  21. package/dist/es/components/ui/context-menu.js +30 -187
  22. package/dist/es/components/ui/dialog.js +18 -100
  23. package/dist/es/components/ui/drawer.js +18 -98
  24. package/dist/es/components/ui/dropdown-menu.js +30 -195
  25. package/dist/es/components/ui/form.js +8 -59
  26. package/dist/es/components/ui/hover-card.js +9 -30
  27. package/dist/es/components/ui/input-otp.js +6 -47
  28. package/dist/es/components/ui/input.js +1 -14
  29. package/dist/es/components/ui/label.js +2 -15
  30. package/dist/es/components/ui/menubar.js +47 -228
  31. package/dist/es/components/ui/navigation-menu.js +17 -146
  32. package/dist/es/components/ui/pagination.js +15 -96
  33. package/dist/es/components/ui/popover.js +10 -33
  34. package/dist/es/components/ui/progress.js +2 -24
  35. package/dist/es/components/ui/radio-group.js +4 -35
  36. package/dist/es/components/ui/resizable.js +6 -36
  37. package/dist/es/components/ui/scroll-area.js +4 -51
  38. package/dist/es/components/ui/select.js +21 -142
  39. package/dist/es/components/ui/separator.js +2 -19
  40. package/dist/es/components/ui/sheet.js +17 -99
  41. package/dist/es/components/ui/sidebar.js +112 -512
  42. package/dist/es/components/ui/skeleton.js +1 -8
  43. package/dist/es/components/ui/slider.js +4 -56
  44. package/dist/es/components/ui/sonner.js +7 -15
  45. package/dist/es/components/ui/switch.js +2 -24
  46. package/dist/es/components/ui/table.js +9 -87
  47. package/dist/es/components/ui/tabs.js +8 -54
  48. package/dist/es/components/ui/textarea.js +1 -11
  49. package/dist/es/components/ui/toggle-group.js +9 -48
  50. package/dist/es/components/ui/toggle.js +16 -31
  51. package/dist/es/components/ui/tooltip.js +11 -45
  52. package/dist/umd/arolariu-components.umd.js +2 -2
  53. package/package.json +94 -96
  54. package/readme.md +169 -0
  55. package/src/components/ui/accordion.tsx +0 -66
  56. package/src/components/ui/alert-dialog.tsx +0 -157
  57. package/src/components/ui/alert.tsx +0 -66
  58. package/src/components/ui/aspect-ratio.tsx +0 -11
  59. package/src/components/ui/avatar.tsx +0 -53
  60. package/src/components/ui/badge.tsx +0 -46
  61. package/src/components/ui/breadcrumb.tsx +0 -109
  62. package/src/components/ui/button.tsx +0 -58
  63. package/src/components/ui/calendar.tsx +0 -75
  64. package/src/components/ui/card.tsx +0 -68
  65. package/src/components/ui/carousel.tsx +0 -241
  66. package/src/components/ui/chart.tsx +0 -353
  67. package/src/components/ui/checkbox.tsx +0 -32
  68. package/src/components/ui/collapsible.tsx +0 -33
  69. package/src/components/ui/command.tsx +0 -177
  70. package/src/components/ui/context-menu.tsx +0 -252
  71. package/src/components/ui/dialog.tsx +0 -135
  72. package/src/components/ui/drawer.tsx +0 -132
  73. package/src/components/ui/dropdown-menu.tsx +0 -257
  74. package/src/components/ui/form.tsx +0 -167
  75. package/src/components/ui/hover-card.tsx +0 -42
  76. package/src/components/ui/input-otp.tsx +0 -78
  77. package/src/components/ui/input.tsx +0 -21
  78. package/src/components/ui/label.tsx +0 -24
  79. package/src/components/ui/menubar.tsx +0 -276
  80. package/src/components/ui/navigation-menu.tsx +0 -170
  81. package/src/components/ui/pagination.tsx +0 -127
  82. package/src/components/ui/popover.tsx +0 -48
  83. package/src/components/ui/progress.tsx +0 -31
  84. package/src/components/ui/radio-group.tsx +0 -45
  85. package/src/components/ui/resizable.tsx +0 -56
  86. package/src/components/ui/scroll-area.tsx +0 -58
  87. package/src/components/ui/select.tsx +0 -181
  88. package/src/components/ui/separator.tsx +0 -28
  89. package/src/components/ui/sheet.tsx +0 -139
  90. package/src/components/ui/sidebar.tsx +0 -723
  91. package/src/components/ui/skeleton.tsx +0 -13
  92. package/src/components/ui/slider.tsx +0 -63
  93. package/src/components/ui/sonner.tsx +0 -29
  94. package/src/components/ui/switch.tsx +0 -31
  95. package/src/components/ui/table.tsx +0 -116
  96. package/src/components/ui/tabs.tsx +0 -66
  97. package/src/components/ui/textarea.tsx +0 -18
  98. package/src/components/ui/toggle-group.tsx +0 -73
  99. package/src/components/ui/toggle.tsx +0 -47
  100. package/src/components/ui/tooltip.tsx +0 -61
  101. package/src/hooks/use-mobile.ts +0 -19
  102. package/src/hooks/use-mobile.tsx +0 -19
  103. package/src/index.css +0 -137
  104. package/src/index.ts +0 -326
  105. package/src/lib/utils.ts +0 -6
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arolariu/components",
3
3
  "displayName": "@arolariu/components",
4
- "version": "0.0.10",
4
+ "version": "0.0.11",
5
5
  "description": "A collection of reusable components for React applications.",
6
6
  "homepage": "https://arolariu.ro",
7
7
  "repository": {
@@ -24,8 +24,7 @@
24
24
  "types": "./dist/types/index.d.ts",
25
25
  "source": "./src/index.ts",
26
26
  "files": [
27
- "dist",
28
- "src"
27
+ "dist"
29
28
  ],
30
29
  "engines": {
31
30
  "node": ">=22",
@@ -38,11 +37,102 @@
38
37
  "Radix-UI",
39
38
  "ShadCN"
40
39
  ],
40
+ "bugs": {
41
+ "url": "https://github.com/arolariu/arolariu.ro/issues",
42
+ "email": "admin@arolariu.ro"
43
+ },
44
+ "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728",
45
+ "scripts": {
46
+ "build": "vite build",
47
+ "clean": "npx tsx scripts/clean.ts",
48
+ "dev": "vite",
49
+ "generate-exports": "npx tsx scripts/generate-exports.ts",
50
+ "preview": "vite preview",
51
+ "storybook": "storybook dev -p 6006",
52
+ "build-storybook": "storybook build"
53
+ },
54
+ "dependencies": {
55
+ "@hookform/resolvers": "^4.1.2",
56
+ "@radix-ui/react-accordion": "^1.2.3",
57
+ "@radix-ui/react-alert-dialog": "^1.1.6",
58
+ "@radix-ui/react-aspect-ratio": "^1.1.2",
59
+ "@radix-ui/react-avatar": "^1.1.3",
60
+ "@radix-ui/react-checkbox": "^1.1.4",
61
+ "@radix-ui/react-collapsible": "^1.1.3",
62
+ "@radix-ui/react-context-menu": "^2.2.6",
63
+ "@radix-ui/react-dialog": "^1.1.6",
64
+ "@radix-ui/react-dropdown-menu": "^2.1.6",
65
+ "@radix-ui/react-hover-card": "^1.1.6",
66
+ "@radix-ui/react-label": "^2.1.2",
67
+ "@radix-ui/react-menubar": "^1.1.6",
68
+ "@radix-ui/react-navigation-menu": "^1.2.5",
69
+ "@radix-ui/react-popover": "^1.1.6",
70
+ "@radix-ui/react-progress": "^1.1.2",
71
+ "@radix-ui/react-radio-group": "^1.2.3",
72
+ "@radix-ui/react-scroll-area": "^1.2.3",
73
+ "@radix-ui/react-select": "^2.1.6",
74
+ "@radix-ui/react-separator": "^1.1.2",
75
+ "@radix-ui/react-slider": "^1.2.3",
76
+ "@radix-ui/react-slot": "^1.1.2",
77
+ "@radix-ui/react-switch": "^1.1.3",
78
+ "@radix-ui/react-tabs": "^1.1.3",
79
+ "@radix-ui/react-toggle": "^1.1.2",
80
+ "@radix-ui/react-toggle-group": "^1.1.2",
81
+ "@radix-ui/react-tooltip": "^1.1.8",
82
+ "class-variance-authority": "^0.7.1",
83
+ "clsx": "2.1.1",
84
+ "cmdk": "1.0.0",
85
+ "date-fns": "^4.1.0",
86
+ "embla-carousel-react": "^8.5.2",
87
+ "input-otp": "^1.4.2",
88
+ "lucide-react": "^0.477.0",
89
+ "next-themes": "^0.4.4",
90
+ "react": "19.0.0",
91
+ "react-day-picker": "8.10.1",
92
+ "react-dom": "19.0.0",
93
+ "react-hook-form": "^7.54.2",
94
+ "react-resizable-panels": "^2.1.7",
95
+ "recharts": "^2.15.1",
96
+ "sonner": "^2.0.1",
97
+ "tailwind-merge": "3.0.2",
98
+ "tailwindcss-animate": "1.0.7",
99
+ "vaul": "^1.1.2",
100
+ "zod": "^3.24.2"
101
+ },
102
+ "peerDependencies": {},
103
+ "devDependencies": {
104
+ "@chromatic-com/storybook": "3.2.5",
105
+ "@storybook/addon-essentials": "8.6.2",
106
+ "@storybook/addon-onboarding": "8.6.2",
107
+ "@storybook/blocks": "8.6.2",
108
+ "@storybook/builder-vite": "8.6.2",
109
+ "@storybook/experimental-addon-test": "8.6.2",
110
+ "@storybook/react": "8.6.2",
111
+ "@storybook/react-vite": "8.6.2",
112
+ "@storybook/test": "8.6.2",
113
+ "@tailwindcss/postcss": "4.0.9",
114
+ "@tailwindcss/vite": "4.0.9",
115
+ "@types/node": "22.13.8",
116
+ "@types/react": "19.0.10",
117
+ "@types/react-dom": "19.0.4",
118
+ "@vitejs/plugin-react": "4.3.4",
119
+ "@vitest/browser": "3.0.7",
120
+ "@vitest/coverage-v8": "3.0.7",
121
+ "daisyui": "5.0.0",
122
+ "playwright": "1.50.1",
123
+ "postcss": "8.5.3",
124
+ "storybook": "8.6.2",
125
+ "tailwindcss": "4.0.9",
126
+ "typescript": "5.8.2",
127
+ "vite": "6.2.0",
128
+ "vite-plugin-dts": "^4.5.1",
129
+ "vitest": "3.0.7"
130
+ },
41
131
  "exports": {
42
132
  ".": {
43
133
  "import": "./dist/es/index.js",
44
134
  "require": "./dist/cjs/index.js",
45
- "types": "./dist/index.d.ts"
135
+ "types": "./dist/types/index.d.ts"
46
136
  },
47
137
  "./accordion": {
48
138
  "import": "./dist/es/components/ui/accordion.js",
@@ -274,97 +364,5 @@
274
364
  "require": "./dist/cjs/components/ui/tooltip.js",
275
365
  "types": "./dist/types/components/ui/tooltip.d.ts"
276
366
  }
277
- },
278
- "bugs": {
279
- "url": "https://github.com/arolariu/arolariu.ro/issues",
280
- "email": "admin@arolariu.ro"
281
- },
282
- "packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728",
283
- "scripts": {
284
- "build": "tsc && vite build && npm run build:styles",
285
- "build:styles": "postcss ./src/index.css -o ./dist/index.css",
286
- "clean": "npx tsx scripts/clean.ts",
287
- "dev": "vite",
288
- "generate-exports": "npx tsx scripts/generate-exports.ts",
289
- "preview": "vite preview",
290
- "storybook": "storybook dev -p 6006",
291
- "build-storybook": "storybook build"
292
- },
293
- "dependencies": {
294
- "@hookform/resolvers": "^4.1.2",
295
- "@radix-ui/react-accordion": "^1.2.3",
296
- "@radix-ui/react-alert-dialog": "^1.1.6",
297
- "@radix-ui/react-aspect-ratio": "^1.1.2",
298
- "@radix-ui/react-avatar": "^1.1.3",
299
- "@radix-ui/react-checkbox": "^1.1.4",
300
- "@radix-ui/react-collapsible": "^1.1.3",
301
- "@radix-ui/react-context-menu": "^2.2.6",
302
- "@radix-ui/react-dialog": "^1.1.6",
303
- "@radix-ui/react-dropdown-menu": "^2.1.6",
304
- "@radix-ui/react-hover-card": "^1.1.6",
305
- "@radix-ui/react-label": "^2.1.2",
306
- "@radix-ui/react-menubar": "^1.1.6",
307
- "@radix-ui/react-navigation-menu": "^1.2.5",
308
- "@radix-ui/react-popover": "^1.1.6",
309
- "@radix-ui/react-progress": "^1.1.2",
310
- "@radix-ui/react-radio-group": "^1.2.3",
311
- "@radix-ui/react-scroll-area": "^1.2.3",
312
- "@radix-ui/react-select": "^2.1.6",
313
- "@radix-ui/react-separator": "^1.1.2",
314
- "@radix-ui/react-slider": "^1.2.3",
315
- "@radix-ui/react-slot": "^1.1.2",
316
- "@radix-ui/react-switch": "^1.1.3",
317
- "@radix-ui/react-tabs": "^1.1.3",
318
- "@radix-ui/react-toggle": "^1.1.2",
319
- "@radix-ui/react-toggle-group": "^1.1.2",
320
- "@radix-ui/react-tooltip": "^1.1.8",
321
- "class-variance-authority": "^0.7.1",
322
- "clsx": "2.1.1",
323
- "cmdk": "1.0.0",
324
- "date-fns": "^4.1.0",
325
- "embla-carousel-react": "^8.5.2",
326
- "input-otp": "^1.4.2",
327
- "lucide-react": "^0.477.0",
328
- "next-themes": "^0.4.4",
329
- "react": "19.0.0",
330
- "react-day-picker": "8.10.1",
331
- "react-dom": "19.0.0",
332
- "react-hook-form": "^7.54.2",
333
- "react-resizable-panels": "^2.1.7",
334
- "recharts": "^2.15.1",
335
- "sonner": "^2.0.1",
336
- "tailwind-merge": "3.0.2",
337
- "tailwindcss-animate": "1.0.7",
338
- "vaul": "^1.1.2",
339
- "zod": "^3.24.2"
340
- },
341
- "peerDependencies": {},
342
- "devDependencies": {
343
- "@chromatic-com/storybook": "3.2.5",
344
- "@storybook/addon-essentials": "8.6.2",
345
- "@storybook/addon-onboarding": "8.6.2",
346
- "@storybook/blocks": "8.6.2",
347
- "@storybook/builder-vite": "8.6.2",
348
- "@storybook/experimental-addon-test": "8.6.2",
349
- "@storybook/react": "8.6.2",
350
- "@storybook/react-vite": "8.6.2",
351
- "@storybook/test": "8.6.2",
352
- "@tailwindcss/postcss": "4.0.9",
353
- "@tailwindcss/vite": "4.0.9",
354
- "@types/node": "22.13.8",
355
- "@types/react": "19.0.10",
356
- "@types/react-dom": "19.0.4",
357
- "@vitejs/plugin-react": "4.3.4",
358
- "@vitest/browser": "3.0.7",
359
- "@vitest/coverage-v8": "3.0.7",
360
- "daisyui": "5.0.0",
361
- "playwright": "1.50.1",
362
- "postcss": "8.5.3",
363
- "storybook": "8.6.2",
364
- "tailwindcss": "4.0.9",
365
- "typescript": "5.8.2",
366
- "vite": "6.2.0",
367
- "vite-plugin-dts": "^4.5.1",
368
- "vitest": "3.0.7"
369
367
  }
370
368
  }
package/readme.md CHANGED
@@ -0,0 +1,169 @@
1
+ # @arolariu/components
2
+
3
+ ![npm version](https://img.shields.io/npm/v/@arolariu/components)
4
+ ![license](https://img.shields.io/npm/l/@arolariu/components)
5
+ ![bundle size](https://img.shields.io/bundlephobia/minzip/@arolariu/components)
6
+ ![types](https://img.shields.io/npm/types/@arolariu/components)
7
+
8
+ A collection of reusable, accessible UI components for React applications, built on top of [Radix UI](https://www.radix-ui.com/) primitives and inspired by [shadcn/ui](https://ui.shadcn.com/).
9
+
10
+ ## Features
11
+
12
+ - **Fully Tree-Shakeable** - Import only the components you need
13
+ - **TypeScript Support** - Full type definitions for all components
14
+ - **Multiple Module Formats** - ESM, CommonJS, and UMD support
15
+ - **Accessibility** - Built on Radix UI primitives for ARIA compliance
16
+ - **Customizable** - Override styles with Tailwind CSS
17
+ - **Modern** - Designed for React 18+ and modern browsers
18
+ - **Zero Runtime CSS** - Uses Tailwind for styling
19
+ - **Server-Side Rendering Compatible** - Works with Next.js and other SSR frameworks
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ # npm
25
+ npm install @arolariu/components
26
+
27
+ # yarn
28
+ yarn add @arolariu/components
29
+
30
+ # pnpm
31
+ pnpm add @arolariu/components
32
+ ```
33
+
34
+ ## Usage
35
+
36
+ ### Basic Import
37
+
38
+ ```tsx
39
+ import { Button } from "@arolariu/components/button";
40
+ import { Card } from "@arolariu/components/card";
41
+
42
+ export default function MyComponent() {
43
+ return (
44
+ <Card>
45
+ <Card.Header>
46
+ <Card.Title>Card Title</Card.Title>
47
+ <Card.Description>Card Description</Card.Description>
48
+ </Card.Header>
49
+ <Card.Footer>
50
+ <Button>Click Me</Button>
51
+ </Card.Footer>
52
+ </Card>
53
+ );
54
+ }
55
+ ```
56
+
57
+ ### Tree-Shaking
58
+
59
+ For optimal bundle size, import components directly:
60
+
61
+ ```tsx
62
+ // ✅ Good: Only imports Button component
63
+ import { Button } from "@arolariu/components/button";
64
+
65
+ // ❌ Avoid: Imports all components
66
+ import { Button } from "@arolariu/components";
67
+ ```
68
+
69
+ ## Available Components
70
+
71
+ This library includes over 30 components, including:
72
+
73
+ - **Layout**: Card, AspectRatio, Separator, Resizable
74
+ - **Inputs**: Button, Input, Textarea, Checkbox, RadioGroup, Select
75
+ - **Navigation**: Breadcrumb, Tabs, NavigationMenu, Sidebar
76
+ - **Overlays**: Dialog, Drawer, Sheet, Popover, Tooltip
77
+ - **Feedback**: Alert, Progress, Skeleton
78
+ - **Data Display**: Table, Calendar, Avatar, Badge
79
+ - **Advanced**: Form, Command, Chart, Carousel
80
+
81
+ ## Component Documentation
82
+
83
+ Each component can be imported individually:
84
+
85
+ ```tsx
86
+ // Buttons
87
+ import { Button, buttonVariants } from "@arolariu/components/button";
88
+
89
+ // Forms
90
+ import { Form } from "@arolariu/components/form";
91
+ import { Input } from "@arolariu/components/input";
92
+
93
+ // Data Display
94
+ import { Table } from "@arolariu/components/table";
95
+ import { Avatar } from "@arolariu/components/avatar";
96
+
97
+ // Overlays
98
+ import { Dialog } from "@arolariu/components/dialog";
99
+ import { Sheet } from "@arolariu/components/sheet";
100
+ ```
101
+
102
+ ## TypeScript Support
103
+
104
+ This library includes comprehensive TypeScript definitions. All components are properly typed with props interfaces:
105
+
106
+ ```tsx
107
+ import { Button } from "@arolariu/components/button";
108
+ import type { ButtonProps } from "@arolariu/components/button";
109
+
110
+ // TypeScript will provide autocomplete and type checking for props
111
+ const MyButton = (props: ButtonProps) => {
112
+ return <Button {...props} />;
113
+ };
114
+ ```
115
+
116
+ ## Server-Side Rendering
117
+
118
+ All components are compatible with server-side rendering frameworks like Next.js:
119
+
120
+ ```tsx
121
+ // Next.js App Router example
122
+ export default function Page() {
123
+ return (
124
+ <div>
125
+ <Button>Server Component Button</Button>
126
+ </div>
127
+ );
128
+ }
129
+
130
+ // For client interactions
131
+ ("use client");
132
+ import { Dialog } from "@arolariu/components/dialog";
133
+ ```
134
+
135
+ ## Browser Support
136
+
137
+ - Chrome/Edge (last 2 versions)
138
+ - Firefox (last 2 versions)
139
+ - Safari (last 2 versions)
140
+
141
+ ## Contributing
142
+
143
+ Contributions are welcome! Please feel free to submit a Pull Request.
144
+
145
+ 1. Fork the repository
146
+ 2. Create your feature branch: `git checkout -b my-new-feature`
147
+ 3. Commit your changes: `git commit -am 'Add some feature'`
148
+ 4. Push to the branch: `git push origin my-new-feature`
149
+ 5. Submit a pull request
150
+
151
+ ## License
152
+
153
+ [MIT](https://choosealicense.com/licenses/mit/)
154
+
155
+ ## Author
156
+
157
+ **Alexandru-Razvan Olariu**
158
+
159
+ - Website: [https://arolariu.ro](https://arolariu.ro)
160
+ - GitHub: [@arolariu](https://github.com/arolariu)
161
+ - Email: admin@arolariu.ro
162
+
163
+ ## Acknowledgments
164
+
165
+ - [Radix UI](https://www.radix-ui.com/) for providing accessible primitives
166
+ - [shadcn/ui](https://ui.shadcn.com/) for inspiration and component patterns
167
+ - [Tailwind CSS](https://tailwindcss.com/) for styling utilities
168
+
169
+ Similar code found with 2 license types
@@ -1,66 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as AccordionPrimitive from "@radix-ui/react-accordion"
5
- import { ChevronDownIcon } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- function Accordion({
10
- ...props
11
- }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
12
- return <AccordionPrimitive.Root data-slot="accordion" {...props} />
13
- }
14
-
15
- function AccordionItem({
16
- className,
17
- ...props
18
- }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
19
- return (
20
- <AccordionPrimitive.Item
21
- data-slot="accordion-item"
22
- className={cn("border-b last:border-b-0", className)}
23
- {...props}
24
- />
25
- )
26
- }
27
-
28
- function AccordionTrigger({
29
- className,
30
- children,
31
- ...props
32
- }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
33
- return (
34
- <AccordionPrimitive.Header className="flex">
35
- <AccordionPrimitive.Trigger
36
- data-slot="accordion-trigger"
37
- className={cn(
38
- "focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50",
39
- className
40
- )}
41
- {...props}
42
- >
43
- {children}
44
- <ChevronDownIcon className="text-neutral-500 pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-neutral-400" />
45
- </AccordionPrimitive.Trigger>
46
- </AccordionPrimitive.Header>
47
- )
48
- }
49
-
50
- function AccordionContent({
51
- className,
52
- children,
53
- ...props
54
- }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
55
- return (
56
- <AccordionPrimitive.Content
57
- data-slot="accordion-content"
58
- className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
59
- {...props}
60
- >
61
- <div className={cn("pt-0 pb-4", className)}>{children}</div>
62
- </AccordionPrimitive.Content>
63
- )
64
- }
65
-
66
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
@@ -1,157 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
5
-
6
- import { cn } from "@/lib/utils"
7
- import { buttonVariants } from "@/components/ui/button"
8
-
9
- function AlertDialog({
10
- ...props
11
- }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
12
- return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
13
- }
14
-
15
- function AlertDialogTrigger({
16
- ...props
17
- }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
18
- return (
19
- <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
20
- )
21
- }
22
-
23
- function AlertDialogPortal({
24
- ...props
25
- }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
26
- return (
27
- <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
28
- )
29
- }
30
-
31
- function AlertDialogOverlay({
32
- className,
33
- ...props
34
- }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
35
- return (
36
- <AlertDialogPrimitive.Overlay
37
- data-slot="alert-dialog-overlay"
38
- className={cn(
39
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",
40
- className
41
- )}
42
- {...props}
43
- />
44
- )
45
- }
46
-
47
- function AlertDialogContent({
48
- className,
49
- ...props
50
- }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
51
- return (
52
- <AlertDialogPortal>
53
- <AlertDialogOverlay />
54
- <AlertDialogPrimitive.Content
55
- data-slot="alert-dialog-content"
56
- className={cn(
57
- "bg-white data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-neutral-200 p-6 shadow-lg duration-200 sm:max-w-lg dark:bg-neutral-950 dark:border-neutral-800",
58
- className
59
- )}
60
- {...props}
61
- />
62
- </AlertDialogPortal>
63
- )
64
- }
65
-
66
- function AlertDialogHeader({
67
- className,
68
- ...props
69
- }: React.ComponentProps<"div">) {
70
- return (
71
- <div
72
- data-slot="alert-dialog-header"
73
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
74
- {...props}
75
- />
76
- )
77
- }
78
-
79
- function AlertDialogFooter({
80
- className,
81
- ...props
82
- }: React.ComponentProps<"div">) {
83
- return (
84
- <div
85
- data-slot="alert-dialog-footer"
86
- className={cn(
87
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
88
- className
89
- )}
90
- {...props}
91
- />
92
- )
93
- }
94
-
95
- function AlertDialogTitle({
96
- className,
97
- ...props
98
- }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
99
- return (
100
- <AlertDialogPrimitive.Title
101
- data-slot="alert-dialog-title"
102
- className={cn("text-lg font-semibold", className)}
103
- {...props}
104
- />
105
- )
106
- }
107
-
108
- function AlertDialogDescription({
109
- className,
110
- ...props
111
- }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
112
- return (
113
- <AlertDialogPrimitive.Description
114
- data-slot="alert-dialog-description"
115
- className={cn("text-neutral-500 text-sm dark:text-neutral-400", className)}
116
- {...props}
117
- />
118
- )
119
- }
120
-
121
- function AlertDialogAction({
122
- className,
123
- ...props
124
- }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
125
- return (
126
- <AlertDialogPrimitive.Action
127
- className={cn(buttonVariants(), className)}
128
- {...props}
129
- />
130
- )
131
- }
132
-
133
- function AlertDialogCancel({
134
- className,
135
- ...props
136
- }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
137
- return (
138
- <AlertDialogPrimitive.Cancel
139
- className={cn(buttonVariants({ variant: "outline" }), className)}
140
- {...props}
141
- />
142
- )
143
- }
144
-
145
- export {
146
- AlertDialog,
147
- AlertDialogPortal,
148
- AlertDialogOverlay,
149
- AlertDialogTrigger,
150
- AlertDialogContent,
151
- AlertDialogHeader,
152
- AlertDialogFooter,
153
- AlertDialogTitle,
154
- AlertDialogDescription,
155
- AlertDialogAction,
156
- AlertDialogCancel,
157
- }
@@ -1,66 +0,0 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- const alertVariants = cva(
7
- "relative w-full rounded-lg border border-neutral-200 px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current dark:border-neutral-800",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",
12
- destructive:
13
- "text-neutral-50 [&>svg]:text-current *:data-[slot=alert-description]:text-neutral-50/80 dark:text-neutral-50 dark:*:data-[slot=alert-description]:text-neutral-50/80",
14
- },
15
- },
16
- defaultVariants: {
17
- variant: "default",
18
- },
19
- }
20
- )
21
-
22
- function Alert({
23
- className,
24
- variant,
25
- ...props
26
- }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
27
- return (
28
- <div
29
- data-slot="alert"
30
- role="alert"
31
- className={cn(alertVariants({ variant }), className)}
32
- {...props}
33
- />
34
- )
35
- }
36
-
37
- function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
38
- return (
39
- <div
40
- data-slot="alert-title"
41
- className={cn(
42
- "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
43
- className
44
- )}
45
- {...props}
46
- />
47
- )
48
- }
49
-
50
- function AlertDescription({
51
- className,
52
- ...props
53
- }: React.ComponentProps<"div">) {
54
- return (
55
- <div
56
- data-slot="alert-description"
57
- className={cn(
58
- "text-neutral-500 col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed dark:text-neutral-400",
59
- className
60
- )}
61
- {...props}
62
- />
63
- )
64
- }
65
-
66
- export { Alert, AlertTitle, AlertDescription }
@@ -1,11 +0,0 @@
1
- "use client"
2
-
3
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
4
-
5
- function AspectRatio({
6
- ...props
7
- }: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
8
- return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
9
- }
10
-
11
- export { AspectRatio }