shadcn-packaged 2025.4.21 → 2025.6.16-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +31 -30
  2. package/index.css +112 -138
  3. package/package.json +37 -37
  4. package/ui/accordion.d.ts +4 -4
  5. package/ui/accordion.jsx +20 -15
  6. package/ui/alert-dialog.d.ts +11 -17
  7. package/ui/alert-dialog.jsx +36 -23
  8. package/ui/alert.d.ts +5 -4
  9. package/ui/alert.jsx +12 -9
  10. package/ui/aspect-ratio.d.ts +1 -1
  11. package/ui/aspect-ratio.jsx +3 -1
  12. package/ui/avatar.d.ts +3 -3
  13. package/ui/avatar.jsx +9 -6
  14. package/ui/badge.d.ts +3 -3
  15. package/ui/badge.jsx +9 -7
  16. package/ui/breadcrumb.d.ts +8 -16
  17. package/ui/breadcrumb.jsx +26 -21
  18. package/ui/button.d.ts +2 -3
  19. package/ui/button.jsx +13 -14
  20. package/ui/calendar.d.ts +7 -7
  21. package/ui/calendar.jsx +70 -30
  22. package/ui/card.d.ts +8 -7
  23. package/ui/card.jsx +22 -13
  24. package/ui/carousel.d.ts +6 -5
  25. package/ui/carousel.jsx +26 -34
  26. package/ui/chart.d.ts +6 -28
  27. package/ui/chart.jsx +37 -40
  28. package/ui/checkbox.d.ts +1 -1
  29. package/ui/checkbox.jsx +8 -7
  30. package/ui/collapsible.d.ts +3 -3
  31. package/ui/collapsible.jsx +9 -3
  32. package/ui/command.d.ts +16 -78
  33. package/ui/command.jsx +37 -27
  34. package/ui/context-menu.d.ts +19 -21
  35. package/ui/context-menu.jsx +65 -47
  36. package/ui/dialog.d.ts +13 -17
  37. package/ui/dialog.jsx +41 -27
  38. package/ui/drawer.d.ts +10 -19
  39. package/ui/drawer.jsx +36 -23
  40. package/ui/dropdown-menu.d.ts +20 -22
  41. package/ui/dropdown-menu.jsx +66 -50
  42. package/ui/form.d.ts +6 -5
  43. package/ui/form.jsx +19 -23
  44. package/ui/hover-card.d.ts +3 -3
  45. package/ui/hover-card.jsx +11 -4
  46. package/ui/input-otp.d.ts +7 -30
  47. package/ui/input-otp.jsx +17 -15
  48. package/ui/input.d.ts +1 -1
  49. package/ui/input.jsx +3 -4
  50. package/ui/label.d.ts +1 -2
  51. package/ui/label.jsx +3 -4
  52. package/ui/menubar.d.ts +17 -19
  53. package/ui/menubar.jsx +58 -49
  54. package/ui/navigation-menu.d.ts +11 -9
  55. package/ui/navigation-menu.jsx +37 -29
  56. package/ui/pagination.d.ts +10 -25
  57. package/ui/pagination.jsx +35 -28
  58. package/ui/popover.d.ts +5 -4
  59. package/ui/popover.jsx +15 -7
  60. package/ui/progress.d.ts +1 -1
  61. package/ui/progress.jsx +5 -4
  62. package/ui/radio-group.d.ts +2 -2
  63. package/ui/radio-group.jsx +9 -11
  64. package/ui/resizable.d.ts +5 -20
  65. package/ui/resizable.jsx +15 -8
  66. package/ui/scroll-area.d.ts +2 -2
  67. package/ui/scroll-area.jsx +16 -14
  68. package/ui/select.d.ts +13 -11
  69. package/ui/select.jsx +58 -47
  70. package/ui/separator.d.ts +1 -1
  71. package/ui/separator.jsx +3 -2
  72. package/ui/sheet.d.ts +11 -23
  73. package/ui/sheet.jsx +45 -41
  74. package/ui/sidebar.d.ts +38 -34
  75. package/ui/sidebar.jsx +109 -122
  76. package/ui/skeleton.d.ts +1 -1
  77. package/ui/skeleton.jsx +1 -1
  78. package/ui/slider.d.ts +1 -1
  79. package/ui/slider.jsx +13 -7
  80. package/ui/sonner.d.ts +1 -2
  81. package/ui/sonner.jsx +4 -7
  82. package/ui/switch.d.ts +2 -2
  83. package/ui/switch.jsx +6 -5
  84. package/ui/table.d.ts +8 -8
  85. package/ui/table.jsx +27 -18
  86. package/ui/tabs.d.ts +4 -4
  87. package/ui/tabs.jsx +12 -7
  88. package/ui/textarea.d.ts +1 -1
  89. package/ui/textarea.jsx +3 -4
  90. package/ui/toggle-group.d.ts +3 -8
  91. package/ui/toggle-group.jsx +11 -11
  92. package/ui/toggle.d.ts +1 -4
  93. package/ui/toggle.jsx +8 -7
  94. package/ui/tooltip.d.ts +4 -4
  95. package/ui/tooltip.jsx +19 -5
  96. package/tailwind.config.js +0 -89
  97. /package/hooks/{use-mobile.jsx → use-mobile.js} +0 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Shadcn Packaged
2
2
 
3
- > Tailwindcss V4 not tested, please use v3
3
+ **Support Tailwindcss V4**
4
4
 
5
5
  This is an npm package that exports all [shadcn/ui](https://ui.shadcn.com/) components without the need for a CLI, designed for ease of use.
6
6
 
@@ -16,25 +16,12 @@ Weekly publish latest version components to npm.
16
16
  ## Install
17
17
 
18
18
  ```shell
19
- npm i tailwindcss-animate class-variance-authority clsx tailwind-merge lucide-react
19
+ npm i class-variance-authority clsx tailwind-merge lucide-react tw-animate-css
20
20
  npm i shadcn-packaged
21
21
  ```
22
22
 
23
23
  ## Configuation
24
24
 
25
- tailwind.config.js
26
-
27
- ```javascript
28
- const config = {
29
- content: [
30
- "...",
31
- "./node_modules/shadcn-packaged/**/*.{jsx,js,ts,tsx}"
32
- ],
33
- presets: [require("shadcn-packaged/tailwind.config")]
34
- };
35
- export default config;
36
- ```
37
-
38
25
  For nextjs user, next.config.js
39
26
 
40
27
  ```javascript
@@ -58,12 +45,17 @@ export default defineConfig({
58
45
 
59
46
  ## Usage
60
47
 
61
- Import style
48
+ Import default style
62
49
 
63
- > If you have a fully customized style in global entry css file, you don't need to import it
50
+ > If you have a fully customized style in global entry css file, see [Custom Theme](#custom-theme), you don't need to import it
64
51
 
65
- ```javascript
66
- import "shadcn-packaged/index.css";
52
+ The global entry css file, `index.css` | `global.css`
53
+
54
+ ```css
55
+ /* "shadcn-packaged/index.css" includes `@import "tailwindcss"` */
56
+ @import "shadcn-packaged/index.css";
57
+ /* source detection, according to the actual path specified */
58
+ @source "../node_modules/shadcn-packaged";
67
59
  ```
68
60
 
69
61
  Import code
@@ -105,21 +97,30 @@ If the automatic code import does not take effect, please try the following meth
105
97
 
106
98
  ## Custom Theme
107
99
 
108
- index.css | global.css (the global entry css file)
100
+ The global entry css file, `index.css` | `global.css`, more detail see [shadcn theme](https://ui.shadcn.com/docs/theming)
109
101
 
110
102
  ```css
111
- @tailwind base;
112
- @tailwind components;
113
- @tailwind utilities;
103
+ /* "shadcn-packaged/index.css" includes `@import "tailwindcss"` */
104
+ @import "shadcn-packaged/index.css";
105
+ /* source detection, according to the actual path specified */
106
+ @source "../node_modules/shadcn-packaged";
114
107
 
115
- @layer base {
116
- :root {
117
- /* theme here */
118
- }
108
+ @custom-variant dark (&:is(.dark *));
119
109
 
120
- .dark {
121
- /* theme here */
122
- }
110
+ :root {
111
+ ...
112
+ }
113
+
114
+ .dark {
115
+ ...
116
+ }
117
+
118
+ @theme inline {
119
+ ...
120
+ }
121
+
122
+ @layer base {
123
+ ...
123
124
  }
124
125
  ```
125
126
 
package/index.css CHANGED
@@ -1,148 +1,122 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @layer base {
6
- :root {
7
-
8
- --background: 0 0% 100%;
9
-
10
- --foreground: 0 0% 3.9%;
11
-
12
- --card: 0 0% 100%;
13
-
14
- --card-foreground: 0 0% 3.9%;
15
-
16
- --popover: 0 0% 100%;
17
-
18
- --popover-foreground: 0 0% 3.9%;
19
-
20
- --primary: 0 0% 9%;
21
-
22
- --primary-foreground: 0 0% 98%;
23
-
24
- --secondary: 0 0% 96.1%;
25
-
26
- --secondary-foreground: 0 0% 9%;
27
-
28
- --muted: 0 0% 96.1%;
29
-
30
- --muted-foreground: 0 0% 45.1%;
31
-
32
- --accent: 0 0% 96.1%;
33
-
34
- --accent-foreground: 0 0% 9%;
35
-
36
- --destructive: 0 84.2% 60.2%;
37
-
38
- --destructive-foreground: 0 0% 98%;
39
-
40
- --border: 0 0% 89.8%;
41
-
42
- --input: 0 0% 89.8%;
43
-
44
- --ring: 0 0% 3.9%;
45
-
46
- --chart-1: 12 76% 61%;
47
-
48
- --chart-2: 173 58% 39%;
49
-
50
- --chart-3: 197 37% 24%;
51
-
52
- --chart-4: 43 74% 66%;
53
-
54
- --chart-5: 27 87% 67%;
55
-
56
- --radius: 0.5rem;
57
-
58
- --sidebar-background: 0 0% 98%;
59
-
60
- --sidebar-foreground: 240 5.3% 26.1%;
61
-
62
- --sidebar-primary: 240 5.9% 10%;
63
-
64
- --sidebar-primary-foreground: 0 0% 98%;
65
-
66
- --sidebar-accent: 240 4.8% 95.9%;
67
-
68
- --sidebar-accent-foreground: 240 5.9% 10%;
69
-
70
- --sidebar-border: 220 13% 91%;
71
-
72
- --sidebar-ring: 217.2 91.2% 59.8%}
73
-
74
- .dark {
75
-
76
- --background: 0 0% 3.9%;
77
-
78
- --foreground: 0 0% 98%;
79
-
80
- --card: 0 0% 3.9%;
81
-
82
- --card-foreground: 0 0% 98%;
83
-
84
- --popover: 0 0% 3.9%;
85
-
86
- --popover-foreground: 0 0% 98%;
87
-
88
- --primary: 0 0% 98%;
89
-
90
- --primary-foreground: 0 0% 9%;
91
-
92
- --secondary: 0 0% 14.9%;
93
-
94
- --secondary-foreground: 0 0% 98%;
95
-
96
- --muted: 0 0% 14.9%;
97
-
98
- --muted-foreground: 0 0% 63.9%;
99
-
100
- --accent: 0 0% 14.9%;
101
-
102
- --accent-foreground: 0 0% 98%;
103
-
104
- --destructive: 0 62.8% 30.6%;
105
-
106
- --destructive-foreground: 0 0% 98%;
107
-
108
- --border: 0 0% 14.9%;
109
-
110
- --input: 0 0% 14.9%;
111
-
112
- --ring: 0 0% 83.1%;
113
-
114
- --chart-1: 220 70% 50%;
115
-
116
- --chart-2: 160 60% 45%;
117
-
118
- --chart-3: 30 80% 55%;
119
-
120
- --chart-4: 280 65% 60%;
121
-
122
- --chart-5: 340 75% 55%;
123
-
124
- --sidebar-background: 240 5.9% 10%;
125
-
126
- --sidebar-foreground: 240 4.8% 95.9%;
127
-
128
- --sidebar-primary: 224.3 76.3% 48%;
129
-
130
- --sidebar-primary-foreground: 0 0% 100%;
131
-
132
- --sidebar-accent: 240 3.7% 15.9%;
133
-
134
- --sidebar-accent-foreground: 240 4.8% 95.9%;
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+
4
+ @custom-variant dark (&:is(.dark *));
5
+
6
+ :root {
7
+ --background: oklch(1 0 0);
8
+ --foreground: oklch(0.145 0 0);
9
+ --card: oklch(1 0 0);
10
+ --card-foreground: oklch(0.145 0 0);
11
+ --popover: oklch(1 0 0);
12
+ --popover-foreground: oklch(0.145 0 0);
13
+ --primary: oklch(0.205 0 0);
14
+ --primary-foreground: oklch(0.985 0 0);
15
+ --secondary: oklch(0.97 0 0);
16
+ --secondary-foreground: oklch(0.205 0 0);
17
+ --muted: oklch(0.97 0 0);
18
+ --muted-foreground: oklch(0.556 0 0);
19
+ --accent: oklch(0.97 0 0);
20
+ --accent-foreground: oklch(0.205 0 0);
21
+ --destructive: oklch(0.577 0.245 27.325);
22
+ --destructive-foreground: oklch(0.577 0.245 27.325);
23
+ --border: oklch(0.922 0 0);
24
+ --input: oklch(0.922 0 0);
25
+ --ring: oklch(0.708 0 0);
26
+ --chart-1: oklch(0.646 0.222 41.116);
27
+ --chart-2: oklch(0.6 0.118 184.704);
28
+ --chart-3: oklch(0.398 0.07 227.392);
29
+ --chart-4: oklch(0.828 0.189 84.429);
30
+ --chart-5: oklch(0.769 0.188 70.08);
31
+ --radius: 0.625rem;
32
+ --sidebar: oklch(0.985 0 0);
33
+ --sidebar-foreground: oklch(0.145 0 0);
34
+ --sidebar-primary: oklch(0.205 0 0);
35
+ --sidebar-primary-foreground: oklch(0.985 0 0);
36
+ --sidebar-accent: oklch(0.97 0 0);
37
+ --sidebar-accent-foreground: oklch(0.205 0 0);
38
+ --sidebar-border: oklch(0.922 0 0);
39
+ --sidebar-ring: oklch(0.708 0 0);
40
+ }
135
41
 
136
- --sidebar-border: 240 3.7% 15.9%;
42
+ .dark {
43
+ --background: oklch(0.145 0 0);
44
+ --foreground: oklch(0.985 0 0);
45
+ --card: oklch(0.145 0 0);
46
+ --card-foreground: oklch(0.985 0 0);
47
+ --popover: oklch(0.145 0 0);
48
+ --popover-foreground: oklch(0.985 0 0);
49
+ --primary: oklch(0.985 0 0);
50
+ --primary-foreground: oklch(0.205 0 0);
51
+ --secondary: oklch(0.269 0 0);
52
+ --secondary-foreground: oklch(0.985 0 0);
53
+ --muted: oklch(0.269 0 0);
54
+ --muted-foreground: oklch(0.708 0 0);
55
+ --accent: oklch(0.269 0 0);
56
+ --accent-foreground: oklch(0.985 0 0);
57
+ --destructive: oklch(0.396 0.141 25.723);
58
+ --destructive-foreground: oklch(0.637 0.237 25.331);
59
+ --border: oklch(0.269 0 0);
60
+ --input: oklch(0.269 0 0);
61
+ --ring: oklch(0.439 0 0);
62
+ --chart-1: oklch(0.488 0.243 264.376);
63
+ --chart-2: oklch(0.696 0.17 162.48);
64
+ --chart-3: oklch(0.769 0.188 70.08);
65
+ --chart-4: oklch(0.627 0.265 303.9);
66
+ --chart-5: oklch(0.645 0.246 16.439);
67
+ --sidebar: oklch(0.205 0 0);
68
+ --sidebar-foreground: oklch(0.985 0 0);
69
+ --sidebar-primary: oklch(0.488 0.243 264.376);
70
+ --sidebar-primary-foreground: oklch(0.985 0 0);
71
+ --sidebar-accent: oklch(0.269 0 0);
72
+ --sidebar-accent-foreground: oklch(0.985 0 0);
73
+ --sidebar-border: oklch(0.269 0 0);
74
+ --sidebar-ring: oklch(0.439 0 0);
75
+ }
137
76
 
138
- --sidebar-ring: 217.2 91.2% 59.8%}
77
+ @theme inline {
78
+ --color-background: var(--background);
79
+ --color-foreground: var(--foreground);
80
+ --color-card: var(--card);
81
+ --color-card-foreground: var(--card-foreground);
82
+ --color-popover: var(--popover);
83
+ --color-popover-foreground: var(--popover-foreground);
84
+ --color-primary: var(--primary);
85
+ --color-primary-foreground: var(--primary-foreground);
86
+ --color-secondary: var(--secondary);
87
+ --color-secondary-foreground: var(--secondary-foreground);
88
+ --color-muted: var(--muted);
89
+ --color-muted-foreground: var(--muted-foreground);
90
+ --color-accent: var(--accent);
91
+ --color-accent-foreground: var(--accent-foreground);
92
+ --color-destructive: var(--destructive);
93
+ --color-destructive-foreground: var(--destructive-foreground);
94
+ --color-border: var(--border);
95
+ --color-input: var(--input);
96
+ --color-ring: var(--ring);
97
+ --color-chart-1: var(--chart-1);
98
+ --color-chart-2: var(--chart-2);
99
+ --color-chart-3: var(--chart-3);
100
+ --color-chart-4: var(--chart-4);
101
+ --color-chart-5: var(--chart-5);
102
+ --radius-sm: calc(var(--radius) - 4px);
103
+ --radius-md: calc(var(--radius) - 2px);
104
+ --radius-lg: var(--radius);
105
+ --radius-xl: calc(var(--radius) + 4px);
106
+ --color-sidebar: var(--sidebar);
107
+ --color-sidebar-foreground: var(--sidebar-foreground);
108
+ --color-sidebar-primary: var(--sidebar-primary);
109
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
110
+ --color-sidebar-accent: var(--sidebar-accent);
111
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
112
+ --color-sidebar-border: var(--sidebar-border);
113
+ --color-sidebar-ring: var(--sidebar-ring);
139
114
  }
140
115
 
141
116
  @layer base {
142
117
  * {
143
- @apply border-border;
118
+ @apply border-border outline-ring/50;
144
119
  }
145
-
146
120
  body {
147
121
  @apply bg-background text-foreground;
148
122
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shadcn-packaged",
3
3
  "private": false,
4
- "version": "2025.4.21",
4
+ "version": "2025.6.16-2",
5
5
  "type": "module",
6
6
  "module": "index.mjs",
7
7
  "scripts": {
@@ -10,7 +10,7 @@
10
10
  "shadcn:clean": "rm -rf lib ui hooks dist ~shadcn-packaged/hooks ~shadcn-packaged/ui",
11
11
  "shadcn:generate": "npx shadcn@latest add -a -y -o && node ./modify.mjs",
12
12
  "shadcn:tsc": "npm run shadcn:tsc:preinstall && tsc -p tsconfig.json && node ./types.mjs",
13
- "shadcn:tsc:preinstall": "npm install -D tailwindcss-animate class-variance-authority clsx tailwind-merge lucide-react",
13
+ "shadcn:tsc:preinstall": "npm install -D class-variance-authority clsx tailwind-merge lucide-react tw-animate-css",
14
14
  "shadcn:move": "mv dist/* ./"
15
15
  },
16
16
  "types": "index.d.ts",
@@ -24,45 +24,45 @@
24
24
  "index.mjs"
25
25
  ],
26
26
  "dependencies": {
27
- "@hookform/resolvers": "^5.0.1",
28
- "@radix-ui/react-accordion": "^1.2.7",
29
- "@radix-ui/react-alert-dialog": "^1.1.10",
30
- "@radix-ui/react-aspect-ratio": "^1.1.4",
31
- "@radix-ui/react-avatar": "^1.1.6",
32
- "@radix-ui/react-checkbox": "^1.2.2",
33
- "@radix-ui/react-collapsible": "^1.1.7",
34
- "@radix-ui/react-context-menu": "^2.2.11",
35
- "@radix-ui/react-dialog": "^1.1.10",
36
- "@radix-ui/react-dropdown-menu": "^2.1.11",
37
- "@radix-ui/react-hover-card": "^1.1.10",
38
- "@radix-ui/react-label": "^2.1.4",
39
- "@radix-ui/react-menubar": "^1.1.11",
40
- "@radix-ui/react-navigation-menu": "^1.2.9",
41
- "@radix-ui/react-popover": "^1.1.10",
42
- "@radix-ui/react-progress": "^1.1.4",
43
- "@radix-ui/react-radio-group": "^1.3.3",
44
- "@radix-ui/react-scroll-area": "^1.2.5",
45
- "@radix-ui/react-select": "^2.2.2",
46
- "@radix-ui/react-separator": "^1.1.4",
47
- "@radix-ui/react-slider": "^1.3.2",
48
- "@radix-ui/react-slot": "^1.2.0",
49
- "@radix-ui/react-switch": "^1.2.2",
50
- "@radix-ui/react-tabs": "^1.1.8",
51
- "@radix-ui/react-toggle": "^1.1.6",
52
- "@radix-ui/react-toggle-group": "^1.1.7",
53
- "@radix-ui/react-tooltip": "^1.2.3",
27
+ "@hookform/resolvers": "^5.1.1",
28
+ "@radix-ui/react-accordion": "^1.2.11",
29
+ "@radix-ui/react-alert-dialog": "^1.1.14",
30
+ "@radix-ui/react-aspect-ratio": "^1.1.7",
31
+ "@radix-ui/react-avatar": "^1.1.10",
32
+ "@radix-ui/react-checkbox": "^1.3.2",
33
+ "@radix-ui/react-collapsible": "^1.1.11",
34
+ "@radix-ui/react-context-menu": "^2.2.15",
35
+ "@radix-ui/react-dialog": "^1.1.14",
36
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
37
+ "@radix-ui/react-hover-card": "^1.1.14",
38
+ "@radix-ui/react-label": "^2.1.7",
39
+ "@radix-ui/react-menubar": "^1.1.15",
40
+ "@radix-ui/react-navigation-menu": "^1.2.13",
41
+ "@radix-ui/react-popover": "^1.1.14",
42
+ "@radix-ui/react-progress": "^1.1.7",
43
+ "@radix-ui/react-radio-group": "^1.3.7",
44
+ "@radix-ui/react-scroll-area": "^1.2.9",
45
+ "@radix-ui/react-select": "^2.2.5",
46
+ "@radix-ui/react-separator": "^1.1.7",
47
+ "@radix-ui/react-slider": "^1.3.5",
48
+ "@radix-ui/react-slot": "^1.2.3",
49
+ "@radix-ui/react-switch": "^1.2.5",
50
+ "@radix-ui/react-tabs": "^1.1.12",
51
+ "@radix-ui/react-toggle": "^1.1.9",
52
+ "@radix-ui/react-toggle-group": "^1.1.10",
53
+ "@radix-ui/react-tooltip": "^1.2.7",
54
54
  "cmdk": "^1.1.1",
55
55
  "date-fns": "^4.1.0",
56
56
  "embla-carousel-react": "^8.6.0",
57
57
  "input-otp": "^1.4.2",
58
58
  "next-themes": "^0.4.6",
59
- "react-day-picker": "^8.10.1",
60
- "react-hook-form": "^7.56.0",
61
- "react-resizable-panels": "^2.1.7",
59
+ "react-day-picker": "^9.7.0",
60
+ "react-hook-form": "^7.58.0",
61
+ "react-resizable-panels": "^3.0.3",
62
62
  "recharts": "^2.15.3",
63
- "sonner": "^2.0.3",
63
+ "sonner": "^2.0.5",
64
64
  "vaul": "^1.1.2",
65
- "zod": "^3.24.3"
65
+ "zod": "^3.25.64"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^22.10.7",
@@ -71,10 +71,10 @@
71
71
  "class-variance-authority": "^0.7.1",
72
72
  "clsx": "^2.1.1",
73
73
  "globals": "^15.14.0",
74
- "lucide-react": "^0.501.0",
75
- "tailwind-merge": "^3.2.0",
74
+ "lucide-react": "^0.515.0",
75
+ "tailwind-merge": "^3.3.1",
76
76
  "tailwindcss": "^3.4.17",
77
- "tailwindcss-animate": "^1.0.7",
77
+ "tw-animate-css": "^1.3.4",
78
78
  "typescript": "~5.6.2"
79
79
  }
80
80
  }
package/ui/accordion.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
- declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
- declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
- declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
- declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
+ declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
4
+ declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
5
+ declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
6
+ declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
7
7
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
package/ui/accordion.jsx CHANGED
@@ -1,20 +1,25 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
- import { ChevronDown } from "lucide-react";
4
+ import { ChevronDownIcon } from "lucide-react";
5
5
  import { cn } from "../lib/utils";
6
- const Accordion = AccordionPrimitive.Root;
7
- const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (<AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props}/>));
8
- AccordionItem.displayName = "AccordionItem";
9
- const AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Header className="flex">
10
- <AccordionPrimitive.Trigger ref={ref} className={cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)} {...props}>
11
- {children}
12
- <ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200"/>
13
- </AccordionPrimitive.Trigger>
14
- </AccordionPrimitive.Header>));
15
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
16
- const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (<AccordionPrimitive.Content ref={ref} className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" {...props}>
17
- <div className={cn("pb-4 pt-0", className)}>{children}</div>
18
- </AccordionPrimitive.Content>));
19
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
6
+ function Accordion({ ...props }) {
7
+ return <AccordionPrimitive.Root data-slot="accordion" {...props}/>;
8
+ }
9
+ function AccordionItem({ className, ...props }) {
10
+ return (<AccordionPrimitive.Item data-slot="accordion-item" className={cn("border-b last:border-b-0", className)} {...props}/>);
11
+ }
12
+ function AccordionTrigger({ className, children, ...props }) {
13
+ return (<AccordionPrimitive.Header className="flex">
14
+ <AccordionPrimitive.Trigger data-slot="accordion-trigger" className={cn("focus-visible:border-ring focus-visible:ring-ring/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", className)} {...props}>
15
+ {children}
16
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"/>
17
+ </AccordionPrimitive.Trigger>
18
+ </AccordionPrimitive.Header>);
19
+ }
20
+ function AccordionContent({ className, children, ...props }) {
21
+ return (<AccordionPrimitive.Content data-slot="accordion-content" className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm" {...props}>
22
+ <div className={cn("pt-0 pb-4", className)}>{children}</div>
23
+ </AccordionPrimitive.Content>);
24
+ }
20
25
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -1,20 +1,14 @@
1
1
  import * as React from "react";
2
2
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
- declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
- declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
- declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const AlertDialogHeader: {
9
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
10
- displayName: string;
11
- };
12
- declare const AlertDialogFooter: {
13
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
- displayName: string;
15
- };
16
- declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
- declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
- declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
- declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
3
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): React.JSX.Element;
4
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): React.JSX.Element;
5
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): React.JSX.Element;
6
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
7
+ declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
8
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
11
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
12
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
13
+ declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
20
14
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -3,27 +3,40 @@ import * as React from "react";
3
3
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
4
  import { cn } from "../lib/utils";
5
5
  import { buttonVariants } from "../ui/button";
6
- const AlertDialog = AlertDialogPrimitive.Root;
7
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
8
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
9
- const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Overlay className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)} {...props} ref={ref}/>));
10
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
11
- const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPortal>
12
- <AlertDialogOverlay />
13
- <AlertDialogPrimitive.Content ref={ref} className={cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)} {...props}/>
14
- </AlertDialogPortal>));
15
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
16
- const AlertDialogHeader = ({ className, ...props }) => (<div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props}/>);
17
- AlertDialogHeader.displayName = "AlertDialogHeader";
18
- const AlertDialogFooter = ({ className, ...props }) => (<div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props}/>);
19
- AlertDialogFooter.displayName = "AlertDialogFooter";
20
- const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold", className)} {...props}/>));
21
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
22
- const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props}/>));
23
- AlertDialogDescription.displayName =
24
- AlertDialogPrimitive.Description.displayName;
25
- const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props}/>));
26
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
27
- const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (<AlertDialogPrimitive.Cancel ref={ref} className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)} {...props}/>));
28
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
6
+ function AlertDialog({ ...props }) {
7
+ return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props}/>;
8
+ }
9
+ function AlertDialogTrigger({ ...props }) {
10
+ return (<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props}/>);
11
+ }
12
+ function AlertDialogPortal({ ...props }) {
13
+ return (<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props}/>);
14
+ }
15
+ function AlertDialogOverlay({ className, ...props }) {
16
+ return (<AlertDialogPrimitive.Overlay data-slot="alert-dialog-overlay" className={cn("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/50", className)} {...props}/>);
17
+ }
18
+ function AlertDialogContent({ className, ...props }) {
19
+ return (<AlertDialogPortal>
20
+ <AlertDialogOverlay />
21
+ <AlertDialogPrimitive.Content data-slot="alert-dialog-content" className={cn("bg-background 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 p-6 shadow-lg duration-200 sm:max-w-lg", className)} {...props}/>
22
+ </AlertDialogPortal>);
23
+ }
24
+ function AlertDialogHeader({ className, ...props }) {
25
+ return (<div data-slot="alert-dialog-header" className={cn("flex flex-col gap-2 text-center sm:text-left", className)} {...props}/>);
26
+ }
27
+ function AlertDialogFooter({ className, ...props }) {
28
+ return (<div data-slot="alert-dialog-footer" className={cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)} {...props}/>);
29
+ }
30
+ function AlertDialogTitle({ className, ...props }) {
31
+ return (<AlertDialogPrimitive.Title data-slot="alert-dialog-title" className={cn("text-lg font-semibold", className)} {...props}/>);
32
+ }
33
+ function AlertDialogDescription({ className, ...props }) {
34
+ return (<AlertDialogPrimitive.Description data-slot="alert-dialog-description" className={cn("text-muted-foreground text-sm", className)} {...props}/>);
35
+ }
36
+ function AlertDialogAction({ className, ...props }) {
37
+ return (<AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props}/>);
38
+ }
39
+ function AlertDialogCancel({ className, ...props }) {
40
+ return (<AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: "outline" }), className)} {...props}/>);
41
+ }
29
42
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
package/ui/alert.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
- declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: {
3
+ declare const alertVariants: (props?: {
4
4
  variant?: "default" | "destructive";
5
- } & import("class-variance-authority/dist/types").ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
6
- declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
- declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
5
+ } & import("class-variance-authority/dist/types").ClassProp) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
9
  export { Alert, AlertTitle, AlertDescription };