@jarllyng/nostromo 3.10.0 → 3.12.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 (90) hide show
  1. package/README.md +1 -1
  2. package/dist/animations.css +29 -1
  3. package/dist/chunk-27UORO2F.cjs +3 -0
  4. package/dist/chunk-27UORO2F.cjs.map +1 -0
  5. package/dist/chunk-5N5KJBMP.js +3 -0
  6. package/dist/chunk-5N5KJBMP.js.map +1 -0
  7. package/dist/chunk-75OZKMEA.cjs +3 -0
  8. package/dist/chunk-75OZKMEA.cjs.map +1 -0
  9. package/dist/chunk-BDRP7ALG.cjs +3 -0
  10. package/dist/chunk-BDRP7ALG.cjs.map +1 -0
  11. package/dist/chunk-BJPJB6IA.cjs +3 -0
  12. package/dist/chunk-BJPJB6IA.cjs.map +1 -0
  13. package/dist/chunk-DB6MHAU3.cjs +3 -0
  14. package/dist/chunk-DB6MHAU3.cjs.map +1 -0
  15. package/dist/chunk-ERGAJKFH.cjs +3 -0
  16. package/dist/chunk-ERGAJKFH.cjs.map +1 -0
  17. package/dist/chunk-K45ZUJ42.js +3 -0
  18. package/dist/chunk-K45ZUJ42.js.map +1 -0
  19. package/dist/chunk-MINSU2YF.js +3 -0
  20. package/dist/chunk-MINSU2YF.js.map +1 -0
  21. package/dist/chunk-NM5NVIAK.js +3 -0
  22. package/dist/chunk-NM5NVIAK.js.map +1 -0
  23. package/dist/chunk-PLEQSJHY.js +3 -0
  24. package/dist/chunk-PLEQSJHY.js.map +1 -0
  25. package/dist/chunk-QESG3HCL.js +3 -0
  26. package/dist/chunk-QESG3HCL.js.map +1 -0
  27. package/dist/chunk-QQTI6OI3.js +3 -0
  28. package/dist/chunk-QQTI6OI3.js.map +1 -0
  29. package/dist/chunk-RKSTEJKG.cjs +3 -0
  30. package/dist/chunk-RKSTEJKG.cjs.map +1 -0
  31. package/dist/components/core/carousel.cjs +3 -0
  32. package/dist/components/core/carousel.cjs.map +1 -0
  33. package/dist/components/core/carousel.d.cts +71 -0
  34. package/dist/components/core/carousel.d.ts +71 -0
  35. package/dist/components/core/carousel.js +3 -0
  36. package/dist/components/core/carousel.js.map +1 -0
  37. package/dist/components/core/command.cjs +3 -0
  38. package/dist/components/core/command.cjs.map +1 -0
  39. package/dist/components/core/command.d.cts +169 -0
  40. package/dist/components/core/command.d.ts +169 -0
  41. package/dist/components/core/command.js +3 -0
  42. package/dist/components/core/command.js.map +1 -0
  43. package/dist/components/core/dialog.cjs +1 -1
  44. package/dist/components/core/dialog.d.cts +9 -0
  45. package/dist/components/core/dialog.d.ts +9 -0
  46. package/dist/components/core/dialog.js +1 -1
  47. package/dist/components/core/drawer.cjs +3 -0
  48. package/dist/components/core/drawer.cjs.map +1 -0
  49. package/dist/components/core/drawer.d.cts +70 -0
  50. package/dist/components/core/drawer.d.ts +70 -0
  51. package/dist/components/core/drawer.js +3 -0
  52. package/dist/components/core/drawer.js.map +1 -0
  53. package/dist/components/core/form.cjs +1 -1
  54. package/dist/components/core/form.js +1 -1
  55. package/dist/components/core/input-otp.cjs +3 -0
  56. package/dist/components/core/input-otp.cjs.map +1 -0
  57. package/dist/components/core/input-otp.d.cts +50 -0
  58. package/dist/components/core/input-otp.d.ts +50 -0
  59. package/dist/components/core/input-otp.js +3 -0
  60. package/dist/components/core/input-otp.js.map +1 -0
  61. package/dist/components/core/resizable.cjs +3 -0
  62. package/dist/components/core/resizable.cjs.map +1 -0
  63. package/dist/components/core/resizable.d.cts +362 -0
  64. package/dist/components/core/resizable.d.ts +362 -0
  65. package/dist/components/core/resizable.js +3 -0
  66. package/dist/components/core/resizable.js.map +1 -0
  67. package/dist/components/core/sidebar.cjs +3 -0
  68. package/dist/components/core/sidebar.cjs.map +1 -0
  69. package/dist/components/core/sidebar.d.cts +131 -0
  70. package/dist/components/core/sidebar.d.ts +131 -0
  71. package/dist/components/core/sidebar.js +3 -0
  72. package/dist/components/core/sidebar.js.map +1 -0
  73. package/dist/index.cjs +1 -1
  74. package/dist/index.cjs.map +1 -1
  75. package/dist/index.css +1 -1
  76. package/dist/index.css.map +1 -1
  77. package/dist/index.d.cts +34 -1
  78. package/dist/index.d.ts +34 -1
  79. package/dist/index.js +1 -1
  80. package/dist/index.js.map +1 -1
  81. package/dist/themes/lv-426.css +22 -0
  82. package/dist/themes/mother.css +22 -0
  83. package/dist/themes/nostromo.css +22 -0
  84. package/dist/themes/sulaco.css +22 -0
  85. package/dist/tokens.css +12 -0
  86. package/package.json +93 -4
  87. package/dist/chunk-MY2KMTUS.js +0 -3
  88. package/dist/chunk-MY2KMTUS.js.map +0 -1
  89. package/dist/chunk-NBX6FKCA.cjs +0 -3
  90. package/dist/chunk-NBX6FKCA.cjs.map +0 -1
@@ -88,6 +88,17 @@
88
88
  --nostromo-color-popover-foreground: var(--nostromo-color-neutral-900);
89
89
  --nostromo-color-card: var(--nostromo-color-neutral-50);
90
90
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-900);
91
+
92
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
93
+ its border and ring, so the family is themeable without inventing
94
+ colours that no contrast test has seen. Override any of them to give the
95
+ sidebar a surface of its own. */
96
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-50);
97
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-900);
98
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-200);
99
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-100);
100
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-900);
101
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-500);
91
102
  --nostromo-color-border: var(--nostromo-color-neutral-200);
92
103
  --nostromo-color-input: var(--nostromo-color-neutral-200);
93
104
  /* Contrast validated: primary-foreground/primary 4.52:1 */
@@ -177,6 +188,17 @@
177
188
  --nostromo-color-popover-foreground: var(--nostromo-color-neutral-50);
178
189
  --nostromo-color-card: var(--nostromo-color-neutral-800);
179
190
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-50);
191
+
192
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
193
+ its border and ring, so the family is themeable without inventing
194
+ colours that no contrast test has seen. Override any of them to give the
195
+ sidebar a surface of its own. */
196
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-800);
197
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-50);
198
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-700);
199
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-800);
200
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-100);
201
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-400);
180
202
  --nostromo-color-border: var(--nostromo-color-neutral-700);
181
203
  --nostromo-color-input: var(--nostromo-color-neutral-700);
182
204
  --nostromo-color-primary: var(--nostromo-color-brand-400);
@@ -88,6 +88,17 @@
88
88
  --nostromo-color-popover-foreground: var(--nostromo-color-neutral-900);
89
89
  --nostromo-color-card: var(--nostromo-color-neutral-50);
90
90
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-900);
91
+
92
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
93
+ its border and ring, so the family is themeable without inventing
94
+ colours that no contrast test has seen. Override any of them to give the
95
+ sidebar a surface of its own. */
96
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-50);
97
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-900);
98
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-200);
99
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-100);
100
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-900);
101
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-500);
91
102
  --nostromo-color-border: var(--nostromo-color-neutral-200);
92
103
  --nostromo-color-input: var(--nostromo-color-neutral-200);
93
104
  /* Contrast validated: primary-foreground/primary 4.52:1 */
@@ -182,6 +193,17 @@
182
193
  --nostromo-color-neutral-900
183
194
  ); /* Changed from 800 to 900 for better contrast */
184
195
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-50);
196
+
197
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
198
+ its border and ring, so the family is themeable without inventing
199
+ colours that no contrast test has seen. Override any of them to give the
200
+ sidebar a surface of its own. */
201
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-900);
202
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-50);
203
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-700);
204
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-800);
205
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-100);
206
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-400);
185
207
  --nostromo-color-border: var(--nostromo-color-neutral-700);
186
208
  --nostromo-color-input: var(--nostromo-color-neutral-700);
187
209
  --nostromo-color-primary: var(
@@ -177,6 +177,17 @@
177
177
  --nostromo-color-popover-foreground: 0 0% 9%;
178
178
  --nostromo-color-card: 0 0% 98%;
179
179
  --nostromo-color-card-foreground: 0 0% 9%;
180
+
181
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
182
+ its border and ring, so the family is themeable without inventing
183
+ colours that no contrast test has seen. Override any of them to give the
184
+ sidebar a surface of its own. */
185
+ --nostromo-color-sidebar: 0 0% 98%;
186
+ --nostromo-color-sidebar-foreground: 0 0% 9%;
187
+ --nostromo-color-sidebar-border: 0 0% 90%;
188
+ --nostromo-color-sidebar-accent: 262 84% 90%;
189
+ --nostromo-color-sidebar-accent-foreground: 262 84% 15%;
190
+ --nostromo-color-sidebar-ring: 262 84% 52%;
180
191
  --nostromo-color-border: 0 0% 90%;
181
192
  --nostromo-color-input: 0 0% 90%;
182
193
  --nostromo-color-primary: 262 84% 52%;
@@ -252,6 +263,17 @@
252
263
  --nostromo-color-popover-foreground: 0 0% 95%; /* Light text on dark popover */
253
264
  --nostromo-color-card: 0 0% 15%;
254
265
  --nostromo-color-card-foreground: 0 0% 95%;
266
+
267
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
268
+ its border and ring, so the family is themeable without inventing
269
+ colours that no contrast test has seen. Override any of them to give the
270
+ sidebar a surface of its own. */
271
+ --nostromo-color-sidebar: 0 0% 15%;
272
+ --nostromo-color-sidebar-foreground: 0 0% 95%;
273
+ --nostromo-color-sidebar-border: 0 0% 75%;
274
+ --nostromo-color-sidebar-accent: 262 84% 25%;
275
+ --nostromo-color-sidebar-accent-foreground: 262 84% 90%;
276
+ --nostromo-color-sidebar-ring: 262 84% 60%;
255
277
  --nostromo-color-border: 0 0% 75%;
256
278
  --nostromo-color-input: 0 0% 75%;
257
279
  --nostromo-color-primary: 262 84% 60%;
@@ -88,6 +88,17 @@
88
88
  --nostromo-color-popover-foreground: var(--nostromo-color-neutral-900);
89
89
  --nostromo-color-card: var(--nostromo-color-neutral-50);
90
90
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-900);
91
+
92
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
93
+ its border and ring, so the family is themeable without inventing
94
+ colours that no contrast test has seen. Override any of them to give the
95
+ sidebar a surface of its own. */
96
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-50);
97
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-900);
98
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-200);
99
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-100);
100
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-900);
101
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-500);
91
102
  --nostromo-color-border: var(--nostromo-color-neutral-200);
92
103
  --nostromo-color-input: var(--nostromo-color-neutral-200);
93
104
  /* Contrast validated: primary-foreground/primary 4.52:1 */
@@ -177,6 +188,17 @@
177
188
  --nostromo-color-popover-foreground: var(--nostromo-color-neutral-50);
178
189
  --nostromo-color-card: var(--nostromo-color-neutral-800);
179
190
  --nostromo-color-card-foreground: var(--nostromo-color-neutral-50);
191
+
192
+ /* Sidebar. Defaults to this scheme's card surface, its accent pair and
193
+ its border and ring, so the family is themeable without inventing
194
+ colours that no contrast test has seen. Override any of them to give the
195
+ sidebar a surface of its own. */
196
+ --nostromo-color-sidebar: var(--nostromo-color-neutral-800);
197
+ --nostromo-color-sidebar-foreground: var(--nostromo-color-neutral-50);
198
+ --nostromo-color-sidebar-border: var(--nostromo-color-neutral-700);
199
+ --nostromo-color-sidebar-accent: var(--nostromo-color-brand-800);
200
+ --nostromo-color-sidebar-accent-foreground: var(--nostromo-color-brand-100);
201
+ --nostromo-color-sidebar-ring: var(--nostromo-color-brand-400);
180
202
  --nostromo-color-border: var(--nostromo-color-neutral-700);
181
203
  --nostromo-color-input: var(--nostromo-color-neutral-700);
182
204
  --nostromo-color-primary: var(--nostromo-color-brand-400);
package/dist/tokens.css CHANGED
@@ -100,6 +100,18 @@
100
100
  --color-popover-foreground: hsl(var(--nostromo-color-popover-foreground));
101
101
  --color-card: hsl(var(--nostromo-color-card));
102
102
  --color-card-foreground: hsl(var(--nostromo-color-card-foreground));
103
+
104
+ /* Sidebar surface. Its own family so a sidebar can be coloured apart from a
105
+ card; every theme defaults it to that theme's card, accent, border and
106
+ ring, so nothing looks different until someone overrides it. */
107
+ --color-sidebar: hsl(var(--nostromo-color-sidebar));
108
+ --color-sidebar-foreground: hsl(var(--nostromo-color-sidebar-foreground));
109
+ --color-sidebar-border: hsl(var(--nostromo-color-sidebar-border));
110
+ --color-sidebar-accent: hsl(var(--nostromo-color-sidebar-accent));
111
+ --color-sidebar-accent-foreground: hsl(
112
+ var(--nostromo-color-sidebar-accent-foreground)
113
+ );
114
+ --color-sidebar-ring: hsl(var(--nostromo-color-sidebar-ring));
103
115
  --color-background: hsl(var(--nostromo-color-background));
104
116
  --color-foreground: hsl(var(--nostromo-color-foreground));
105
117
  --color-border: hsl(var(--nostromo-color-border));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jarllyng/nostromo",
3
- "version": "3.10.0",
3
+ "version": "3.12.0",
4
4
  "description": "Accessible React component library with CSS-first Tailwind v4 theming",
5
5
  "keywords": [
6
6
  "react",
@@ -90,6 +90,11 @@
90
90
  "import": "./dist/components/core/card.js",
91
91
  "require": "./dist/components/core/card.cjs"
92
92
  },
93
+ "./carousel": {
94
+ "types": "./dist/components/core/carousel.d.ts",
95
+ "import": "./dist/components/core/carousel.js",
96
+ "require": "./dist/components/core/carousel.cjs"
97
+ },
93
98
  "./chart-composable": {
94
99
  "types": "./dist/components/core/chart-composable.d.ts",
95
100
  "import": "./dist/components/core/chart-composable.js",
@@ -115,6 +120,11 @@
115
120
  "import": "./dist/components/core/collapsible.js",
116
121
  "require": "./dist/components/core/collapsible.cjs"
117
122
  },
123
+ "./command": {
124
+ "types": "./dist/components/core/command.d.ts",
125
+ "import": "./dist/components/core/command.js",
126
+ "require": "./dist/components/core/command.cjs"
127
+ },
118
128
  "./components/core/accordion": {
119
129
  "types": "./dist/components/core/accordion.d.ts",
120
130
  "import": "./dist/components/core/accordion.js",
@@ -165,6 +175,11 @@
165
175
  "import": "./dist/components/core/card.js",
166
176
  "require": "./dist/components/core/card.cjs"
167
177
  },
178
+ "./components/core/carousel": {
179
+ "types": "./dist/components/core/carousel.d.ts",
180
+ "import": "./dist/components/core/carousel.js",
181
+ "require": "./dist/components/core/carousel.cjs"
182
+ },
168
183
  "./components/core/chart-composable": {
169
184
  "types": "./dist/components/core/chart-composable.d.ts",
170
185
  "import": "./dist/components/core/chart-composable.js",
@@ -190,6 +205,11 @@
190
205
  "import": "./dist/components/core/collapsible.js",
191
206
  "require": "./dist/components/core/collapsible.cjs"
192
207
  },
208
+ "./components/core/command": {
209
+ "types": "./dist/components/core/command.d.ts",
210
+ "import": "./dist/components/core/command.js",
211
+ "require": "./dist/components/core/command.cjs"
212
+ },
193
213
  "./components/core/context-menu": {
194
214
  "types": "./dist/components/core/context-menu.d.ts",
195
215
  "import": "./dist/components/core/context-menu.js",
@@ -205,6 +225,11 @@
205
225
  "import": "./dist/components/core/dialog.js",
206
226
  "require": "./dist/components/core/dialog.cjs"
207
227
  },
228
+ "./components/core/drawer": {
229
+ "types": "./dist/components/core/drawer.d.ts",
230
+ "import": "./dist/components/core/drawer.js",
231
+ "require": "./dist/components/core/drawer.cjs"
232
+ },
208
233
  "./components/core/dropdown-menu": {
209
234
  "types": "./dist/components/core/dropdown-menu.d.ts",
210
235
  "import": "./dist/components/core/dropdown-menu.js",
@@ -245,6 +270,11 @@
245
270
  "import": "./dist/components/core/input.js",
246
271
  "require": "./dist/components/core/input.cjs"
247
272
  },
273
+ "./components/core/input-otp": {
274
+ "types": "./dist/components/core/input-otp.d.ts",
275
+ "import": "./dist/components/core/input-otp.js",
276
+ "require": "./dist/components/core/input-otp.cjs"
277
+ },
248
278
  "./components/core/label": {
249
279
  "types": "./dist/components/core/label.d.ts",
250
280
  "import": "./dist/components/core/label.js",
@@ -280,6 +310,11 @@
280
310
  "import": "./dist/components/core/radio-group.js",
281
311
  "require": "./dist/components/core/radio-group.cjs"
282
312
  },
313
+ "./components/core/resizable": {
314
+ "types": "./dist/components/core/resizable.d.ts",
315
+ "import": "./dist/components/core/resizable.js",
316
+ "require": "./dist/components/core/resizable.cjs"
317
+ },
283
318
  "./components/core/scroll-area": {
284
319
  "types": "./dist/components/core/scroll-area.d.ts",
285
320
  "import": "./dist/components/core/scroll-area.js",
@@ -300,6 +335,11 @@
300
335
  "import": "./dist/components/core/sheet.js",
301
336
  "require": "./dist/components/core/sheet.cjs"
302
337
  },
338
+ "./components/core/sidebar": {
339
+ "types": "./dist/components/core/sidebar.d.ts",
340
+ "import": "./dist/components/core/sidebar.js",
341
+ "require": "./dist/components/core/sidebar.cjs"
342
+ },
303
343
  "./components/core/skeleton": {
304
344
  "types": "./dist/components/core/skeleton.d.ts",
305
345
  "import": "./dist/components/core/skeleton.js",
@@ -390,6 +430,11 @@
390
430
  "import": "./dist/components/core/dialog.js",
391
431
  "require": "./dist/components/core/dialog.cjs"
392
432
  },
433
+ "./drawer": {
434
+ "types": "./dist/components/core/drawer.d.ts",
435
+ "import": "./dist/components/core/drawer.js",
436
+ "require": "./dist/components/core/drawer.cjs"
437
+ },
393
438
  "./dropdown-menu": {
394
439
  "types": "./dist/components/core/dropdown-menu.d.ts",
395
440
  "import": "./dist/components/core/dropdown-menu.js",
@@ -445,6 +490,11 @@
445
490
  "import": "./dist/components/core/input.js",
446
491
  "require": "./dist/components/core/input.cjs"
447
492
  },
493
+ "./input-otp": {
494
+ "types": "./dist/components/core/input-otp.d.ts",
495
+ "import": "./dist/components/core/input-otp.js",
496
+ "require": "./dist/components/core/input-otp.cjs"
497
+ },
448
498
  "./label": {
449
499
  "types": "./dist/components/core/label.d.ts",
450
500
  "import": "./dist/components/core/label.js",
@@ -491,6 +541,11 @@
491
541
  "import": "./dist/components/core/radio-group.js",
492
542
  "require": "./dist/components/core/radio-group.cjs"
493
543
  },
544
+ "./resizable": {
545
+ "types": "./dist/components/core/resizable.d.ts",
546
+ "import": "./dist/components/core/resizable.js",
547
+ "require": "./dist/components/core/resizable.cjs"
548
+ },
494
549
  "./scroll-area": {
495
550
  "types": "./dist/components/core/scroll-area.d.ts",
496
551
  "import": "./dist/components/core/scroll-area.js",
@@ -511,6 +566,11 @@
511
566
  "import": "./dist/components/core/sheet.js",
512
567
  "require": "./dist/components/core/sheet.cjs"
513
568
  },
569
+ "./sidebar": {
570
+ "types": "./dist/components/core/sidebar.d.ts",
571
+ "import": "./dist/components/core/sidebar.js",
572
+ "require": "./dist/components/core/sidebar.cjs"
573
+ },
514
574
  "./skeleton": {
515
575
  "types": "./dist/components/core/skeleton.d.ts",
516
576
  "import": "./dist/components/core/skeleton.js",
@@ -597,8 +657,8 @@
597
657
  "peerDependencies": {
598
658
  "react": "^18.2.0 || ^19.0.0",
599
659
  "react-dom": "^18.2.0 || ^19.0.0",
600
- "tailwindcss": "^4.0.0",
601
- "react-hook-form": "^7.50.0"
660
+ "react-hook-form": "^7.50.0",
661
+ "tailwindcss": "^4.0.0"
602
662
  },
603
663
  "dependencies": {
604
664
  "@radix-ui/react-alert-dialog": "^1.1.23",
@@ -620,10 +680,15 @@
620
680
  "@radix-ui/react-toggle-group": "^1.1.19",
621
681
  "class-variance-authority": "^0.7.1",
622
682
  "clsx": "^2.1.1",
683
+ "cmdk": "^1.1.1",
623
684
  "date-fns": "^4.4.0",
685
+ "embla-carousel-react": "^8.6.0",
686
+ "input-otp": "^1.4.2",
624
687
  "phosphor-react": "^1.4.1",
688
+ "react-resizable-panels": "^4.12.3",
625
689
  "recharts": "^3.10.1",
626
- "tailwind-merge": "^3.6.0"
690
+ "tailwind-merge": "^3.6.0",
691
+ "vaul": "^1.1.2"
627
692
  },
628
693
  "devDependencies": {
629
694
  "@eslint/js": "^9.39.5",
@@ -748,6 +813,30 @@
748
813
  {
749
814
  "path": "dist/components/core/form.js",
750
815
  "limit": "12 KB"
816
+ },
817
+ {
818
+ "path": "dist/components/core/carousel.js",
819
+ "limit": "22 KB"
820
+ },
821
+ {
822
+ "path": "dist/components/core/input-otp.js",
823
+ "limit": "15 KB"
824
+ },
825
+ {
826
+ "path": "dist/components/core/resizable.js",
827
+ "limit": "22 KB"
828
+ },
829
+ {
830
+ "path": "dist/components/core/command.js",
831
+ "limit": "30 KB"
832
+ },
833
+ {
834
+ "path": "dist/components/core/drawer.js",
835
+ "limit": "32 KB"
836
+ },
837
+ {
838
+ "path": "dist/components/core/sidebar.js",
839
+ "limit": "32 KB"
751
840
  }
752
841
  ],
753
842
  "peerDependenciesMeta": {
@@ -1,3 +0,0 @@
1
- "use client";
2
- import {a}from'./chunk-AC2JBXHQ.js';import*as e from'react';import {cva}from'class-variance-authority';var w=cva("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-300 transition-all",{variants:{variant:{default:"border-border shadow-lg hover:shadow-xl",elevated:"border-border shadow-xl hover:shadow-2xl",outlined:"border-2 border-border shadow-md hover:border-primary hover:shadow-lg",filled:"border-border bg-muted shadow-md hover:shadow-lg",destructive:"border-error-200 bg-error-50 shadow-lg hover:shadow-xl"},size:{default:"max-w-lg sm:max-w-xl md:max-w-2xl lg:max-w-4xl",sm:"max-w-sm sm:max-w-md",lg:"max-w-2xl sm:max-w-3xl md:max-w-4xl lg:max-w-5xl",xl:"max-w-4xl sm:max-w-5xl md:max-w-6xl lg:max-w-7xl",full:"max-w-[95vw] sm:max-w-[90vw]"},animation:{default:"animate-in fade-in-0 zoom-in-95 duration-300",slide:"animate-in slide-in-from-bottom-4 duration-300",scale:"animate-in zoom-in-95 duration-300",none:""}},defaultVariants:{variant:"default",size:"default",animation:"default"}}),D=cva("fixed inset-0 z-40 transition-all duration-300",{variants:{variant:{default:"bg-black/50 backdrop-blur-sm",subtle:"bg-black/30 backdrop-blur-none",strong:"bg-black/70 backdrop-blur-md",colored:"bg-brand-500/20 backdrop-blur-sm"}},defaultVariants:{variant:"default"}}),x=e.createContext(null);function p(a){let t=e.useContext(x);if(!t)throw new Error(`${a} must be used inside <Dialog>`);return t}var H=({open:a$1,defaultOpen:t=false,onOpenChange:o,children:r,backdropVariant:i="default"})=>{let l=e.useId(),[s,u]=e.useState(t),n=a$1!==void 0,d=n?a$1:s,c=e.useCallback(g=>{n||u(g),o?.(g);},[n,o]);e.useEffect(()=>{if(!d)return;let g=v=>{v.key==="Escape"&&c(false);};return document.addEventListener("keydown",g),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow="unset";}},[d,c]);let f=e.useMemo(()=>({open:d,setOpen:c,titleId:l}),[d,c,l]);return e.createElement(x.Provider,{value:f},r,d&&e.createElement("div",{className:a(D({variant:i})),onClick:()=>c(false),"aria-hidden":"true"}))},h=e.forwardRef(({asChild:a,children:t,onClick:o,...r},i)=>{let{open:l,setOpen:s}=p("DialogTrigger"),u=n=>{o?.(n),n.defaultPrevented||s(true);};return a&&e.isValidElement(t)?e.cloneElement(t,{onClick:u,"aria-expanded":l}):e.createElement("button",{ref:i,type:"button","aria-expanded":l,"aria-haspopup":"dialog",onClick:u,...r},t)});h.displayName="DialogTrigger";var R=e.forwardRef(({className:a$1,children:t,onClose:o,variant:r,size:i,animation:l,...s},u)=>{let{open:n,setOpen:d,titleId:c}=p("DialogContent");if(!n)return null;let f=s["aria-label"]!==void 0||s["aria-labelledby"]!==void 0;return e.createElement("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none"},e.createElement("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":f?void 0:c,className:a(w({variant:r,size:i,animation:l}),"pointer-events-auto p-4 sm:p-6 sm:rounded-lg",a$1),...s},t,e.createElement("button",{type:"button",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",onClick:o??(()=>d(false))},e.createElement("span",{className:"sr-only"},"Close"),e.createElement("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})))))});R.displayName="DialogContent";var y=e.forwardRef(({className:a$1,...t},o)=>e.createElement("div",{ref:o,className:a("flex flex-col space-y-1.5 text-center sm:text-left",a$1),...t}));y.displayName="DialogHeader";var k=e.forwardRef(({className:a$1,id:t,...o},r)=>{let{titleId:i}=p("DialogTitle");return e.createElement("h2",{ref:r,id:t??i,className:a("text-lg font-semibold leading-none tracking-tight",a$1),...o})});k.displayName="DialogTitle";var C=e.forwardRef(({className:a$1,...t},o)=>e.createElement("p",{ref:o,className:a("text-sm text-muted-foreground",a$1),...t}));C.displayName="DialogDescription";export{w as a,D as b,H as c,h as d,R as e,y as f,k as g,C as h};//# sourceMappingURL=chunk-MY2KMTUS.js.map
3
- //# sourceMappingURL=chunk-MY2KMTUS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/core/dialog.tsx"],"names":["dialogVariants","cva","backdropVariants","DialogContext","useDialogContext","component","context","Dialog","controlledOpen","defaultOpen","onOpenChange","children","backdropVariant","titleId","uncontrolledOpen","setUncontrolledOpen","isControlled","open","setOpen","next","handleEscape","e","cn","DialogTrigger","asChild","onClick","props","ref","handleClick","event","DialogContent","className","onClose","variant","size","animation","hasOwnLabel","DialogHeader","DialogTitle","id","DialogDescription"],"mappings":"uGAIA,IAAMA,CAAAA,CAAiBC,GAAAA,CACrB,oJAAA,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,yCAAA,CACT,QAAA,CAAU,0CAAA,CACV,QAAA,CACE,uEAAA,CACF,OAAQ,kDAAA,CACR,WAAA,CAAa,wDACf,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,gDAAA,CACT,GAAI,sBAAA,CACJ,EAAA,CAAI,kDAAA,CACJ,EAAA,CAAI,kDAAA,CACJ,IAAA,CAAM,8BACR,CAAA,CACA,SAAA,CAAW,CACT,OAAA,CAAS,8CAAA,CACT,KAAA,CAAO,gDAAA,CACP,KAAA,CAAO,oCAAA,CACP,KAAM,EACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,UACN,SAAA,CAAW,SACb,CACF,CACF,CAAA,CAEMC,CAAAA,CAAmBD,GAAAA,CAAI,gDAAA,CAAkD,CAC7E,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,8BAAA,CACT,MAAA,CAAQ,gCAAA,CACR,MAAA,CAAQ,8BAAA,CACR,OAAA,CAAS,kCACX,CACF,CAAA,CACA,eAAA,CAAiB,CACf,QAAS,SACX,CACF,CAAC,CAAA,CAmCKE,CAAAA,CAAsB,CAAA,CAAA,aAAA,CAAyC,IAAI,EAEzE,SAASC,CAAAA,CAAiBC,CAAAA,CAAuC,CAC/D,IAAMC,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAWH,CAAa,CAAA,CAC9C,GAAI,CAACG,CAAAA,CACH,MAAM,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AC,GAAA,CAAA,CACC,GAAA,CAAKA,CAAAA,CACL,UAAWL,CAAAA,CAAG,+BAAA,CAAiCS,GAAS,CAAA,CACvD,GAAGL,CAAAA,CACN,CACD,EACDc,EAAkB,WAAA,CAAc,mBAAA","file":"chunk-MY2KMTUS.js","sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\n\nconst dialogVariants = cva(\n \"fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-300 transition-all\",\n {\n variants: {\n variant: {\n default: \"border-border shadow-lg hover:shadow-xl\",\n elevated: \"border-border shadow-xl hover:shadow-2xl\",\n outlined:\n \"border-2 border-border shadow-md hover:border-primary hover:shadow-lg\",\n filled: \"border-border bg-muted shadow-md hover:shadow-lg\",\n destructive: \"border-error-200 bg-error-50 shadow-lg hover:shadow-xl\",\n },\n size: {\n default: \"max-w-lg sm:max-w-xl md:max-w-2xl lg:max-w-4xl\",\n sm: \"max-w-sm sm:max-w-md\",\n lg: \"max-w-2xl sm:max-w-3xl md:max-w-4xl lg:max-w-5xl\",\n xl: \"max-w-4xl sm:max-w-5xl md:max-w-6xl lg:max-w-7xl\",\n full: \"max-w-[95vw] sm:max-w-[90vw]\",\n },\n animation: {\n default: \"animate-in fade-in-0 zoom-in-95 duration-300\",\n slide: \"animate-in slide-in-from-bottom-4 duration-300\",\n scale: \"animate-in zoom-in-95 duration-300\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n animation: \"default\",\n },\n },\n);\n\nconst backdropVariants = cva(\"fixed inset-0 z-40 transition-all duration-300\", {\n variants: {\n variant: {\n default: \"bg-black/50 backdrop-blur-sm\",\n subtle: \"bg-black/30 backdrop-blur-none\",\n strong: \"bg-black/70 backdrop-blur-md\",\n colored: \"bg-brand-500/20 backdrop-blur-sm\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface DialogProps {\n open?: boolean;\n /** Uncontrolled initial state, for when a DialogTrigger owns the opening. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n backdropVariant?: VariantProps<typeof backdropVariants>[\"variant\"];\n}\n\nexport interface DialogContentProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof dialogVariants> {\n onClose?: () => void;\n}\n\nexport interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport interface DialogTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nexport interface DialogDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}\n\ninterface DialogContextValue {\n open: boolean;\n setOpen: (open: boolean) => void;\n /**\n * Ties `DialogContent`'s `aria-labelledby` to whatever `DialogTitle` renders.\n * Adding `role=\"dialog\"` without this fails axe's aria-dialog-name rule - the\n * role only means something to a screen reader if the node has a name.\n */\n titleId: string;\n}\n\nconst DialogContext = React.createContext<DialogContextValue | null>(null);\n\nfunction useDialogContext(component: string): DialogContextValue {\n const context = React.useContext(DialogContext);\n if (!context) {\n throw new Error(`${component} must be used inside <Dialog>`);\n }\n return context;\n}\n\n/**\n * Dialog root.\n *\n * Renders its children whether or not it is open, and puts the open state on\n * context. It used to return `null` while closed and draw the overlay itself,\n * which made `DialogTrigger` impossible: a trigger nested in the dialog was\n * unmounted exactly when you needed to click it. The overlay moved to\n * `DialogContent`, which is what actually knows it is being shown.\n *\n * Works controlled (`open` + `onOpenChange`) or uncontrolled (`defaultOpen`).\n */\nconst Dialog: React.FC<DialogProps> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n children,\n backdropVariant = \"default\",\n}) => {\n const titleId = React.useId();\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n React.useEffect(() => {\n if (!open) return;\n\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") setOpen(false);\n };\n\n document.addEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"hidden\";\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"unset\";\n };\n }, [open, setOpen]);\n\n const context = React.useMemo(\n () => ({ open, setOpen, titleId }),\n [open, setOpen, titleId],\n );\n\n return (\n <DialogContext.Provider value={context}>\n {children}\n {open && (\n <div\n className={cn(backdropVariants({ variant: backdropVariant }))}\n onClick={() => setOpen(false)}\n aria-hidden=\"true\"\n />\n )}\n </DialogContext.Provider>\n );\n};\n\nexport interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Render the child element instead of a button, forwarding the click. */\n asChild?: boolean;\n}\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, onClick, ...props }, ref) => {\n const { open, setOpen } = useDialogContext(\"DialogTrigger\");\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) setOpen(true);\n };\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(\n children as React.ReactElement<{\n onClick?: React.MouseEventHandler;\n \"aria-expanded\"?: boolean;\n }>,\n { onClick: handleClick, \"aria-expanded\": open },\n );\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n onClick={handleClick}\n {...props}\n >\n {children}\n </button>\n );\n },\n);\n\nDialogTrigger.displayName = \"DialogTrigger\";\n\nconst DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(\n (\n { className, children, onClose, variant, size, animation, ...props },\n ref,\n ) => {\n const { open, setOpen, titleId } = useDialogContext(\"DialogContent\");\n\n if (!open) return null;\n\n // A caller-supplied name wins; otherwise point at the DialogTitle.\n const hasOwnLabel =\n props[\"aria-label\"] !== undefined ||\n props[\"aria-labelledby\"] !== undefined;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none\">\n <div\n ref={ref}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={hasOwnLabel ? undefined : titleId}\n className={cn(\n dialogVariants({ variant, size, animation }),\n \"pointer-events-auto p-4 sm:p-6 sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <button\n type=\"button\"\n className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n onClick={onClose ?? (() => setOpen(false))}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n </div>\n );\n },\n);\nDialogContent.displayName = \"DialogContent\";\n\nconst DialogHeader = React.forwardRef<HTMLDivElement, DialogHeaderProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n ),\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogTitle = React.forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ className, id, ...props }, ref) => {\n const { titleId } = useDialogContext(\"DialogTitle\");\n\n return (\n <h2\n ref={ref}\n // Falls back to the shared id so DialogContent's aria-labelledby resolves.\n id={id ?? titleId}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nDialogTitle.displayName = \"DialogTitle\";\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n DialogDescriptionProps\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = \"DialogDescription\";\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n dialogVariants,\n backdropVariants,\n};\n"]}
@@ -1,3 +0,0 @@
1
- "use client";
2
- 'use strict';var chunkITRGJNWL_cjs=require('./chunk-ITRGJNWL.cjs'),e=require('react'),classVarianceAuthority=require('class-variance-authority');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var w=classVarianceAuthority.cva("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-300 transition-all",{variants:{variant:{default:"border-border shadow-lg hover:shadow-xl",elevated:"border-border shadow-xl hover:shadow-2xl",outlined:"border-2 border-border shadow-md hover:border-primary hover:shadow-lg",filled:"border-border bg-muted shadow-md hover:shadow-lg",destructive:"border-error-200 bg-error-50 shadow-lg hover:shadow-xl"},size:{default:"max-w-lg sm:max-w-xl md:max-w-2xl lg:max-w-4xl",sm:"max-w-sm sm:max-w-md",lg:"max-w-2xl sm:max-w-3xl md:max-w-4xl lg:max-w-5xl",xl:"max-w-4xl sm:max-w-5xl md:max-w-6xl lg:max-w-7xl",full:"max-w-[95vw] sm:max-w-[90vw]"},animation:{default:"animate-in fade-in-0 zoom-in-95 duration-300",slide:"animate-in slide-in-from-bottom-4 duration-300",scale:"animate-in zoom-in-95 duration-300",none:""}},defaultVariants:{variant:"default",size:"default",animation:"default"}}),D=classVarianceAuthority.cva("fixed inset-0 z-40 transition-all duration-300",{variants:{variant:{default:"bg-black/50 backdrop-blur-sm",subtle:"bg-black/30 backdrop-blur-none",strong:"bg-black/70 backdrop-blur-md",colored:"bg-brand-500/20 backdrop-blur-sm"}},defaultVariants:{variant:"default"}}),x=e__namespace.createContext(null);function p(a){let t=e__namespace.useContext(x);if(!t)throw new Error(`${a} must be used inside <Dialog>`);return t}var H=({open:a,defaultOpen:t=false,onOpenChange:o,children:r,backdropVariant:i="default"})=>{let l=e__namespace.useId(),[s,u]=e__namespace.useState(t),n=a!==void 0,d=n?a:s,c=e__namespace.useCallback(g=>{n||u(g),o?.(g);},[n,o]);e__namespace.useEffect(()=>{if(!d)return;let g=v=>{v.key==="Escape"&&c(false);};return document.addEventListener("keydown",g),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",g),document.body.style.overflow="unset";}},[d,c]);let f=e__namespace.useMemo(()=>({open:d,setOpen:c,titleId:l}),[d,c,l]);return e__namespace.createElement(x.Provider,{value:f},r,d&&e__namespace.createElement("div",{className:chunkITRGJNWL_cjs.a(D({variant:i})),onClick:()=>c(false),"aria-hidden":"true"}))},h=e__namespace.forwardRef(({asChild:a,children:t,onClick:o,...r},i)=>{let{open:l,setOpen:s}=p("DialogTrigger"),u=n=>{o?.(n),n.defaultPrevented||s(true);};return a&&e__namespace.isValidElement(t)?e__namespace.cloneElement(t,{onClick:u,"aria-expanded":l}):e__namespace.createElement("button",{ref:i,type:"button","aria-expanded":l,"aria-haspopup":"dialog",onClick:u,...r},t)});h.displayName="DialogTrigger";var R=e__namespace.forwardRef(({className:a,children:t,onClose:o,variant:r,size:i,animation:l,...s},u)=>{let{open:n,setOpen:d,titleId:c}=p("DialogContent");if(!n)return null;let f=s["aria-label"]!==void 0||s["aria-labelledby"]!==void 0;return e__namespace.createElement("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none"},e__namespace.createElement("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":f?void 0:c,className:chunkITRGJNWL_cjs.a(w({variant:r,size:i,animation:l}),"pointer-events-auto p-4 sm:p-6 sm:rounded-lg",a),...s},t,e__namespace.createElement("button",{type:"button",className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",onClick:o??(()=>d(false))},e__namespace.createElement("span",{className:"sr-only"},"Close"),e__namespace.createElement("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},e__namespace.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})))))});R.displayName="DialogContent";var y=e__namespace.forwardRef(({className:a,...t},o)=>e__namespace.createElement("div",{ref:o,className:chunkITRGJNWL_cjs.a("flex flex-col space-y-1.5 text-center sm:text-left",a),...t}));y.displayName="DialogHeader";var k=e__namespace.forwardRef(({className:a,id:t,...o},r)=>{let{titleId:i}=p("DialogTitle");return e__namespace.createElement("h2",{ref:r,id:t??i,className:chunkITRGJNWL_cjs.a("text-lg font-semibold leading-none tracking-tight",a),...o})});k.displayName="DialogTitle";var C=e__namespace.forwardRef(({className:a,...t},o)=>e__namespace.createElement("p",{ref:o,className:chunkITRGJNWL_cjs.a("text-sm text-muted-foreground",a),...t}));C.displayName="DialogDescription";exports.a=w;exports.b=D;exports.c=H;exports.d=h;exports.e=R;exports.f=y;exports.g=k;exports.h=C;//# sourceMappingURL=chunk-NBX6FKCA.cjs.map
3
- //# sourceMappingURL=chunk-NBX6FKCA.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/core/dialog.tsx"],"names":["dialogVariants","cva","backdropVariants","DialogContext","e","useDialogContext","component","context","Dialog","controlledOpen","defaultOpen","onOpenChange","children","backdropVariant","titleId","uncontrolledOpen","setUncontrolledOpen","isControlled","open","setOpen","next","handleEscape","cn","DialogTrigger","asChild","onClick","props","ref","handleClick","event","DialogContent","className","onClose","variant","size","animation","hasOwnLabel","DialogHeader","DialogTitle","id","DialogDescription"],"mapp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c,mBAAA","file":"chunk-NBX6FKCA.cjs","sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../lib/utils\";\n\nconst dialogVariants = cva(\n \"fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-300 transition-all\",\n {\n variants: {\n variant: {\n default: \"border-border shadow-lg hover:shadow-xl\",\n elevated: \"border-border shadow-xl hover:shadow-2xl\",\n outlined:\n \"border-2 border-border shadow-md hover:border-primary hover:shadow-lg\",\n filled: \"border-border bg-muted shadow-md hover:shadow-lg\",\n destructive: \"border-error-200 bg-error-50 shadow-lg hover:shadow-xl\",\n },\n size: {\n default: \"max-w-lg sm:max-w-xl md:max-w-2xl lg:max-w-4xl\",\n sm: \"max-w-sm sm:max-w-md\",\n lg: \"max-w-2xl sm:max-w-3xl md:max-w-4xl lg:max-w-5xl\",\n xl: \"max-w-4xl sm:max-w-5xl md:max-w-6xl lg:max-w-7xl\",\n full: \"max-w-[95vw] sm:max-w-[90vw]\",\n },\n animation: {\n default: \"animate-in fade-in-0 zoom-in-95 duration-300\",\n slide: \"animate-in slide-in-from-bottom-4 duration-300\",\n scale: \"animate-in zoom-in-95 duration-300\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n animation: \"default\",\n },\n },\n);\n\nconst backdropVariants = cva(\"fixed inset-0 z-40 transition-all duration-300\", {\n variants: {\n variant: {\n default: \"bg-black/50 backdrop-blur-sm\",\n subtle: \"bg-black/30 backdrop-blur-none\",\n strong: \"bg-black/70 backdrop-blur-md\",\n colored: \"bg-brand-500/20 backdrop-blur-sm\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport interface DialogProps {\n open?: boolean;\n /** Uncontrolled initial state, for when a DialogTrigger owns the opening. */\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n backdropVariant?: VariantProps<typeof backdropVariants>[\"variant\"];\n}\n\nexport interface DialogContentProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof dialogVariants> {\n onClose?: () => void;\n}\n\nexport interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport interface DialogTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {}\n\nexport interface DialogDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {}\n\ninterface DialogContextValue {\n open: boolean;\n setOpen: (open: boolean) => void;\n /**\n * Ties `DialogContent`'s `aria-labelledby` to whatever `DialogTitle` renders.\n * Adding `role=\"dialog\"` without this fails axe's aria-dialog-name rule - the\n * role only means something to a screen reader if the node has a name.\n */\n titleId: string;\n}\n\nconst DialogContext = React.createContext<DialogContextValue | null>(null);\n\nfunction useDialogContext(component: string): DialogContextValue {\n const context = React.useContext(DialogContext);\n if (!context) {\n throw new Error(`${component} must be used inside <Dialog>`);\n }\n return context;\n}\n\n/**\n * Dialog root.\n *\n * Renders its children whether or not it is open, and puts the open state on\n * context. It used to return `null` while closed and draw the overlay itself,\n * which made `DialogTrigger` impossible: a trigger nested in the dialog was\n * unmounted exactly when you needed to click it. The overlay moved to\n * `DialogContent`, which is what actually knows it is being shown.\n *\n * Works controlled (`open` + `onOpenChange`) or uncontrolled (`defaultOpen`).\n */\nconst Dialog: React.FC<DialogProps> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n children,\n backdropVariant = \"default\",\n}) => {\n const titleId = React.useId();\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const open = isControlled ? controlledOpen : uncontrolledOpen;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n React.useEffect(() => {\n if (!open) return;\n\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") setOpen(false);\n };\n\n document.addEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"hidden\";\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"unset\";\n };\n }, [open, setOpen]);\n\n const context = React.useMemo(\n () => ({ open, setOpen, titleId }),\n [open, setOpen, titleId],\n );\n\n return (\n <DialogContext.Provider value={context}>\n {children}\n {open && (\n <div\n className={cn(backdropVariants({ variant: backdropVariant }))}\n onClick={() => setOpen(false)}\n aria-hidden=\"true\"\n />\n )}\n </DialogContext.Provider>\n );\n};\n\nexport interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Render the child element instead of a button, forwarding the click. */\n asChild?: boolean;\n}\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, onClick, ...props }, ref) => {\n const { open, setOpen } = useDialogContext(\"DialogTrigger\");\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) setOpen(true);\n };\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(\n children as React.ReactElement<{\n onClick?: React.MouseEventHandler;\n \"aria-expanded\"?: boolean;\n }>,\n { onClick: handleClick, \"aria-expanded\": open },\n );\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n onClick={handleClick}\n {...props}\n >\n {children}\n </button>\n );\n },\n);\n\nDialogTrigger.displayName = \"DialogTrigger\";\n\nconst DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(\n (\n { className, children, onClose, variant, size, animation, ...props },\n ref,\n ) => {\n const { open, setOpen, titleId } = useDialogContext(\"DialogContent\");\n\n if (!open) return null;\n\n // A caller-supplied name wins; otherwise point at the DialogTitle.\n const hasOwnLabel =\n props[\"aria-label\"] !== undefined ||\n props[\"aria-labelledby\"] !== undefined;\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none\">\n <div\n ref={ref}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={hasOwnLabel ? undefined : titleId}\n className={cn(\n dialogVariants({ variant, size, animation }),\n \"pointer-events-auto p-4 sm:p-6 sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <button\n type=\"button\"\n className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none\"\n onClick={onClose ?? (() => setOpen(false))}\n >\n <span className=\"sr-only\">Close</span>\n <svg\n className=\"h-4 w-4\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M6 18L18 6M6 6l12 12\"\n />\n </svg>\n </button>\n </div>\n </div>\n );\n },\n);\nDialogContent.displayName = \"DialogContent\";\n\nconst DialogHeader = React.forwardRef<HTMLDivElement, DialogHeaderProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n ),\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogTitle = React.forwardRef<HTMLHeadingElement, DialogTitleProps>(\n ({ className, id, ...props }, ref) => {\n const { titleId } = useDialogContext(\"DialogTitle\");\n\n return (\n <h2\n ref={ref}\n // Falls back to the shared id so DialogContent's aria-labelledby resolves.\n id={id ?? titleId}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nDialogTitle.displayName = \"DialogTitle\";\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n DialogDescriptionProps\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = \"DialogDescription\";\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogDescription,\n dialogVariants,\n backdropVariants,\n};\n"]}