@szum-tech/design-system 3.7.1 → 3.8.1

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 (85) hide show
  1. package/dist/chunk-2Q2BIWBE.js +46 -0
  2. package/dist/{chunk-AEMI4LPB.cjs → chunk-3Z3GVXXN.cjs} +83 -50
  3. package/dist/chunk-CXHDWIGF.cjs +89 -0
  4. package/dist/chunk-E5TYGWGE.js +176 -0
  5. package/dist/chunk-HNRVLRMN.js +82 -0
  6. package/dist/chunk-O3DHBQA5.cjs +50 -0
  7. package/dist/{chunk-6SNQ2B5C.js → chunk-SZ3LC2VO.js} +80 -47
  8. package/dist/chunk-XJZOANXX.cjs +183 -0
  9. package/dist/components/alert/index.cjs +19 -0
  10. package/dist/components/alert/index.d.cts +24 -0
  11. package/dist/components/alert/index.d.ts +24 -0
  12. package/dist/components/alert/index.js +2 -0
  13. package/dist/components/alert-dialog/index.cjs +0 -1
  14. package/dist/components/alert-dialog/index.js +0 -1
  15. package/dist/components/avatar/index.cjs +0 -1
  16. package/dist/components/avatar/index.js +0 -1
  17. package/dist/components/badge/index.cjs +0 -1
  18. package/dist/components/badge/index.js +0 -1
  19. package/dist/components/button/index.cjs +12 -11
  20. package/dist/components/button/index.js +11 -10
  21. package/dist/components/card/index.cjs +0 -1
  22. package/dist/components/card/index.js +0 -1
  23. package/dist/components/checkbox/index.cjs +0 -1
  24. package/dist/components/checkbox/index.js +0 -1
  25. package/dist/components/color-swatch/index.cjs +0 -1
  26. package/dist/components/color-swatch/index.js +0 -1
  27. package/dist/components/dialog/index.cjs +0 -1
  28. package/dist/components/dialog/index.js +0 -1
  29. package/dist/components/empty/index.cjs +31 -0
  30. package/dist/components/empty/index.d.cts +29 -0
  31. package/dist/components/empty/index.d.ts +29 -0
  32. package/dist/components/empty/index.js +2 -0
  33. package/dist/components/field/index.cjs +12 -13
  34. package/dist/components/field/index.js +2 -3
  35. package/dist/components/header/index.cjs +0 -1
  36. package/dist/components/header/index.js +0 -1
  37. package/dist/components/index.cjs +133 -96
  38. package/dist/components/index.d.cts +2 -1
  39. package/dist/components/index.d.ts +2 -1
  40. package/dist/components/index.js +11 -10
  41. package/dist/components/input/index.cjs +0 -1
  42. package/dist/components/input/index.js +0 -1
  43. package/dist/components/item/index.cjs +0 -1
  44. package/dist/components/item/index.js +0 -1
  45. package/dist/components/label/index.cjs +0 -1
  46. package/dist/components/label/index.js +0 -1
  47. package/dist/components/progress/index.cjs +0 -1
  48. package/dist/components/progress/index.js +0 -1
  49. package/dist/components/radio-group/index.cjs +0 -1
  50. package/dist/components/radio-group/index.js +0 -1
  51. package/dist/components/scroll-area/index.cjs +0 -1
  52. package/dist/components/scroll-area/index.js +0 -1
  53. package/dist/components/select/index.cjs +7 -8
  54. package/dist/components/select/index.d.cts +1 -2
  55. package/dist/components/select/index.d.ts +1 -2
  56. package/dist/components/select/index.js +1 -2
  57. package/dist/components/separator/index.cjs +0 -1
  58. package/dist/components/separator/index.js +0 -1
  59. package/dist/components/sheet/index.cjs +0 -1
  60. package/dist/components/sheet/index.js +0 -1
  61. package/dist/components/spinner/index.cjs +0 -1
  62. package/dist/components/spinner/index.js +0 -1
  63. package/dist/components/stepper/index.cjs +30 -29
  64. package/dist/components/stepper/index.js +11 -10
  65. package/dist/components/textarea/index.cjs +0 -1
  66. package/dist/components/textarea/index.js +0 -1
  67. package/dist/components/toaster/index.cjs +13 -12
  68. package/dist/components/toaster/index.js +11 -10
  69. package/dist/components/tooltip/index.cjs +0 -1
  70. package/dist/components/tooltip/index.js +0 -1
  71. package/dist/contexts/index.cjs +0 -1
  72. package/dist/contexts/index.js +0 -1
  73. package/dist/hooks/index.cjs +0 -1
  74. package/dist/hooks/index.js +0 -1
  75. package/dist/icons/index.cjs +1 -1
  76. package/dist/icons/index.js +1 -1
  77. package/dist/utils/index.cjs +0 -1
  78. package/dist/utils/index.js +0 -1
  79. package/package.json +1 -1
  80. package/dist/chunk-3376ZTRC.cjs +0 -2
  81. package/dist/chunk-3ZRMIVJM.cjs +0 -4934
  82. package/dist/chunk-BYXBJQAS.js +0 -1
  83. package/dist/chunk-O7QFYWMK.js +0 -4907
  84. package/dist/{chunk-YTVV2IUF.cjs → chunk-Q5ONG5HB.cjs} +1 -1
  85. package/dist/{chunk-KYFNEU4K.js → chunk-SYKUS2RV.js} +1 -1
@@ -0,0 +1,82 @@
1
+ import { cn } from './chunk-ZD2QRAOX.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { cva } from 'class-variance-authority';
4
+
5
+ function Empty({ className, border = false, ...props }) {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "data-slot": "empty",
10
+ className: cn(
11
+ "border-border flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded p-6 text-center text-balance md:p-12",
12
+ border ? "border" : "",
13
+ border === "dashed" ? "border-dashed" : "",
14
+ className
15
+ ),
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ function EmptyHeader({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx(
22
+ "div",
23
+ {
24
+ "data-slot": "empty-header",
25
+ className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
26
+ ...props
27
+ }
28
+ );
29
+ }
30
+ function EmptyTitle({ className, ...props }) {
31
+ return /* @__PURE__ */ jsx("div", { "data-slot": "empty-title", className: cn("text-lg font-medium tracking-tight", className), ...props });
32
+ }
33
+ function EmptyDescription({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx(
35
+ "p",
36
+ {
37
+ "data-slot": "empty-description",
38
+ className: cn(
39
+ "text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
40
+ className
41
+ ),
42
+ ...props
43
+ }
44
+ );
45
+ }
46
+ function EmptyContent({ className, ...props }) {
47
+ return /* @__PURE__ */ jsx(
48
+ "div",
49
+ {
50
+ "data-slot": "empty-content",
51
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
52
+ ...props
53
+ }
54
+ );
55
+ }
56
+ var emptyMediaVariants = cva(
57
+ "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
58
+ {
59
+ variants: {
60
+ variant: {
61
+ default: "bg-transparent",
62
+ icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded [&_svg:not([class*='size-'])]:size-6"
63
+ }
64
+ },
65
+ defaultVariants: {
66
+ variant: "default"
67
+ }
68
+ }
69
+ );
70
+ function EmptyMedia({ className, variant = "default", ...props }) {
71
+ return /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ "data-slot": "empty-icon",
75
+ "data-variant": variant,
76
+ className: cn(emptyMediaVariants({ variant, className })),
77
+ ...props
78
+ }
79
+ );
80
+ }
81
+
82
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var classVarianceAuthority = require('class-variance-authority');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ var alertVariants = classVarianceAuthority.cva(
8
+ "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border border-border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-card text-card-foreground",
13
+ destructive: "text-error bg-card *:data-[slot=alert-description]:text-error/90 [&>svg]:text-current"
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ variant: "default"
18
+ }
19
+ }
20
+ );
21
+ function Alert({ className, variant = "default", ...props }) {
22
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert", role: "alert", className: chunkH2BWO3SI_cjs.cn(alertVariants({ variant }), className), ...props });
23
+ }
24
+ function AlertDescription({ className, ...props }) {
25
+ return /* @__PURE__ */ jsxRuntime.jsx(
26
+ "div",
27
+ {
28
+ "data-slot": "alert-description",
29
+ className: chunkH2BWO3SI_cjs.cn(
30
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
31
+ className
32
+ ),
33
+ ...props
34
+ }
35
+ );
36
+ }
37
+ function AlertTitle({ className, ...props }) {
38
+ return /* @__PURE__ */ jsxRuntime.jsx(
39
+ "div",
40
+ {
41
+ "data-slot": "alert-title",
42
+ className: chunkH2BWO3SI_cjs.cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
43
+ ...props
44
+ }
45
+ );
46
+ }
47
+
48
+ exports.Alert = Alert;
49
+ exports.AlertDescription = AlertDescription;
50
+ exports.AlertTitle = AlertTitle;
@@ -1,9 +1,8 @@
1
1
  import { Spinner } from './chunk-P5IUC7HJ.js';
2
- import { useComposedRefs } from './chunk-O7QFYWMK.js';
3
2
  import { useDirection, Direction } from './chunk-H5O5L6XT.js';
4
3
  import { useLazyRef, useIsomorphicLayoutEffect } from './chunk-DFD2WUOU.js';
5
4
  import { cn } from './chunk-ZD2QRAOX.js';
6
- import * as React5 from 'react';
5
+ import * as React6 from 'react';
7
6
  import { Slot } from '@radix-ui/react-slot';
8
7
  import { jsx, jsxs } from 'react/jsx-runtime';
9
8
  import { OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
@@ -37,9 +36,9 @@ var STEPPER_MAP_KEY_TO_FOCUS_INTENT = {
37
36
  };
38
37
 
39
38
  // src/components/stepper/stepper.context.tsx
40
- var StepperContext = React5.createContext(null);
39
+ var StepperContext = React6.createContext(null);
41
40
  function useStepperContext(consumerName) {
42
- const context = React5.useContext(StepperContext);
41
+ const context = React6.useContext(StepperContext);
43
42
  if (!context) {
44
43
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
45
44
  }
@@ -129,9 +128,9 @@ function createStepperStore(listenersRef, stateRef, onValueChange, onValueComple
129
128
  };
130
129
  return store;
131
130
  }
132
- var StepperStoreContext = React5.createContext(null);
131
+ var StepperStoreContext = React6.createContext(null);
133
132
  function useStepperStoreContext(consumerName) {
134
- const context = React5.useContext(StepperStoreContext);
133
+ const context = React6.useContext(StepperStoreContext);
135
134
  if (!context) {
136
135
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
137
136
  }
@@ -139,8 +138,8 @@ function useStepperStoreContext(consumerName) {
139
138
  }
140
139
  function useStepperStore(selector) {
141
140
  const store = useStepperStoreContext("useStore");
142
- const getSnapshot = React5.useCallback(() => selector(store.getState()), [selector, store]);
143
- return React5.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
141
+ const getSnapshot = React6.useCallback(() => selector(store.getState()), [selector, store]);
142
+ return React6.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
144
143
  }
145
144
  function Stepper({
146
145
  value,
@@ -162,14 +161,14 @@ function Stepper({
162
161
  indicators = {},
163
162
  ...rootProps
164
163
  }) {
165
- const id = React5.useId();
164
+ const id = React6.useId();
166
165
  const rootId = idProp ?? id;
167
166
  const listenersRef = useLazyRef(() => /* @__PURE__ */ new Set());
168
167
  const stateRef = useLazyRef(() => ({
169
168
  steps: /* @__PURE__ */ new Map(),
170
169
  value: value ?? defaultValue
171
170
  }));
172
- const store = React5.useMemo(
171
+ const store = React6.useMemo(
173
172
  () => createStepperStore(listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate),
174
173
  [listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate]
175
174
  );
@@ -179,7 +178,7 @@ function Stepper({
179
178
  }
180
179
  }, [value]);
181
180
  const dir = useDirection(dirProp);
182
- const contextValue = React5.useMemo(
181
+ const contextValue = React6.useMemo(
183
182
  () => ({
184
183
  id: rootId,
185
184
  dir,
@@ -231,14 +230,48 @@ var StepperDataState = {
231
230
  ACTIVE: "active",
232
231
  COMPLETED: "completed"
233
232
  };
234
- var StepperFocusContext = React5.createContext(null);
233
+ var StepperFocusContext = React6.createContext(null);
235
234
  function useStepperFocusContext(consumerName) {
236
- const context = React5.useContext(StepperFocusContext);
235
+ const context = React6.useContext(StepperFocusContext);
237
236
  if (!context) {
238
237
  throw new Error(`\`${consumerName}\` must be used within \`FocusProvider\``);
239
238
  }
240
239
  return context;
241
240
  }
241
+ function setRef(ref, value) {
242
+ if (typeof ref === "function") {
243
+ return ref(value);
244
+ } else if (ref !== null && ref !== void 0) {
245
+ ref.current = value;
246
+ }
247
+ }
248
+ function composeRefs(...refs) {
249
+ return (node) => {
250
+ let hasCleanup = false;
251
+ const cleanups = refs.map((ref) => {
252
+ const cleanup = setRef(ref, node);
253
+ if (!hasCleanup && typeof cleanup == "function") {
254
+ hasCleanup = true;
255
+ }
256
+ return cleanup;
257
+ });
258
+ if (hasCleanup) {
259
+ return () => {
260
+ for (let i = 0; i < cleanups.length; i++) {
261
+ const cleanup = cleanups[i];
262
+ if (typeof cleanup == "function") {
263
+ cleanup();
264
+ } else {
265
+ setRef(refs[i], null);
266
+ }
267
+ }
268
+ };
269
+ }
270
+ };
271
+ }
272
+ function useComposedRefs(...refs) {
273
+ return React6.useCallback(composeRefs(...refs), refs);
274
+ }
242
275
 
243
276
  // src/components/stepper/stepper.utils.tsx
244
277
  function focusFirst(candidates, preventScroll = false) {
@@ -288,32 +321,32 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
288
321
  const context = useStepperContext(STEPPER_NAV_NAME);
289
322
  const orientation = context.orientation;
290
323
  const currentValue = useStepperStore((state) => state.value);
291
- const [tabStopId, setTabStopId] = React5.useState(null);
292
- const [isTabbingBackOut, setIsTabbingBackOut] = React5.useState(false);
293
- const [focusableItemCount, setFocusableItemCount] = React5.useState(0);
294
- const isClickFocusRef = React5.useRef(false);
295
- const itemsRef = React5.useRef(/* @__PURE__ */ new Map());
296
- const listRef = React5.useRef(null);
324
+ const [tabStopId, setTabStopId] = React6.useState(null);
325
+ const [isTabbingBackOut, setIsTabbingBackOut] = React6.useState(false);
326
+ const [focusableItemCount, setFocusableItemCount] = React6.useState(0);
327
+ const isClickFocusRef = React6.useRef(false);
328
+ const itemsRef = React6.useRef(/* @__PURE__ */ new Map());
329
+ const listRef = React6.useRef(null);
297
330
  const composedRef = useComposedRefs(ref, listRef);
298
- const onItemFocus = React5.useCallback((tabStopId2) => {
331
+ const onItemFocus = React6.useCallback((tabStopId2) => {
299
332
  setTabStopId(tabStopId2);
300
333
  }, []);
301
- const onItemShiftTab = React5.useCallback(() => {
334
+ const onItemShiftTab = React6.useCallback(() => {
302
335
  setIsTabbingBackOut(true);
303
336
  }, []);
304
- const onFocusableItemAdd = React5.useCallback(() => {
337
+ const onFocusableItemAdd = React6.useCallback(() => {
305
338
  setFocusableItemCount((prevCount) => prevCount + 1);
306
339
  }, []);
307
- const onFocusableItemRemove = React5.useCallback(() => {
340
+ const onFocusableItemRemove = React6.useCallback(() => {
308
341
  setFocusableItemCount((prevCount) => prevCount - 1);
309
342
  }, []);
310
- const onItemRegister = React5.useCallback((item) => {
343
+ const onItemRegister = React6.useCallback((item) => {
311
344
  itemsRef.current.set(item.id, item);
312
345
  }, []);
313
- const onItemUnregister = React5.useCallback((id) => {
346
+ const onItemUnregister = React6.useCallback((id) => {
314
347
  itemsRef.current.delete(id);
315
348
  }, []);
316
- const getItems = React5.useCallback(() => {
349
+ const getItems = React6.useCallback(() => {
317
350
  return Array.from(itemsRef.current.values()).filter((item) => item.ref.current).sort((a, b) => {
318
351
  const elementA = a.ref.current;
319
352
  const elementB = b.ref.current;
@@ -328,7 +361,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
328
361
  return 0;
329
362
  });
330
363
  }, []);
331
- const onBlur = React5.useCallback(
364
+ const onBlur = React6.useCallback(
332
365
  (event) => {
333
366
  listProps.onBlur?.(event);
334
367
  if (event.defaultPrevented) return;
@@ -336,7 +369,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
336
369
  },
337
370
  [listProps.onBlur]
338
371
  );
339
- const onFocus = React5.useCallback(
372
+ const onFocus = React6.useCallback(
340
373
  (event) => {
341
374
  listProps.onFocus?.(event);
342
375
  if (event.defaultPrevented) return;
@@ -361,7 +394,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
361
394
  // eslint-disable-next-line react-hooks/exhaustive-deps
362
395
  [listProps.onFocus, isTabbingBackOut, currentValue, tabStopId]
363
396
  );
364
- const onMouseDown = React5.useCallback(
397
+ const onMouseDown = React6.useCallback(
365
398
  (event) => {
366
399
  listProps.onMouseDown?.(event);
367
400
  if (event.defaultPrevented) return;
@@ -370,7 +403,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
370
403
  // eslint-disable-next-line react-hooks/exhaustive-deps
371
404
  [listProps.onMouseDown]
372
405
  );
373
- const focusContextValue = React5.useMemo(
406
+ const focusContextValue = React6.useMemo(
374
407
  () => ({
375
408
  tabStopId,
376
409
  onItemFocus,
@@ -416,9 +449,9 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
416
449
  }
417
450
  ) });
418
451
  }
419
- var StepperItemContext = React5.createContext(null);
452
+ var StepperItemContext = React6.createContext(null);
420
453
  function useStepperItemContext(consumerName) {
421
- const context = React5.useContext(StepperItemContext);
454
+ const context = React6.useContext(StepperItemContext);
422
455
  if (!context) {
423
456
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ITEM_NAME}\``);
424
457
  }
@@ -449,7 +482,7 @@ function StepperItem({
449
482
  const stepState = useStepperStore((state) => state.steps.get(itemValue));
450
483
  const steps = useStepperStore((state) => state.steps);
451
484
  const dataState = getDataState(value, itemValue, stepState, steps);
452
- const itemContextValue = React5.useMemo(
485
+ const itemContextValue = React6.useMemo(
453
486
  () => ({
454
487
  value: itemValue,
455
488
  stepState
@@ -511,11 +544,11 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
511
544
  const isActive = value === itemValue;
512
545
  const isTabStop = focusContext.tabStopId === triggerId;
513
546
  const dataState = getDataState(value, itemValue, stepState, steps);
514
- const triggerRef = React5.useRef(null);
547
+ const triggerRef = React6.useRef(null);
515
548
  const composedRef = useComposedRefs(ref, triggerRef);
516
- const isArrowKeyPressedRef = React5.useRef(false);
517
- const isMouseClickRef = React5.useRef(false);
518
- React5.useEffect(() => {
549
+ const isArrowKeyPressedRef = React6.useRef(false);
550
+ const isMouseClickRef = React6.useRef(false);
551
+ React6.useEffect(() => {
519
552
  function onKeyDown2(event) {
520
553
  if (STEPPER_ARROW_KEYS.includes(event.key)) {
521
554
  isArrowKeyPressedRef.current = true;
@@ -549,7 +582,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
549
582
  }
550
583
  };
551
584
  }, [focusContext, triggerId, itemValue, isTabStop, isDisabled]);
552
- const onClick = React5.useCallback(
585
+ const onClick = React6.useCallback(
553
586
  async (event) => {
554
587
  triggerProps.onClick?.(event);
555
588
  if (event.defaultPrevented) return;
@@ -563,7 +596,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
563
596
  // eslint-disable-next-line react-hooks/exhaustive-deps
564
597
  [isDisabled, context.nonInteractive, store, itemValue, value, steps, triggerProps.onClick]
565
598
  );
566
- const onFocus = React5.useCallback(
599
+ const onFocus = React6.useCallback(
567
600
  async (event) => {
568
601
  triggerProps.onFocus?.(event);
569
602
  if (event.defaultPrevented) return;
@@ -591,7 +624,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
591
624
  store
592
625
  ]
593
626
  );
594
- const onKeyDown = React5.useCallback(
627
+ const onKeyDown = React6.useCallback(
595
628
  async (event) => {
596
629
  triggerProps.onKeyDown?.(event);
597
630
  if (event.defaultPrevented) return;
@@ -660,7 +693,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
660
693
  steps
661
694
  ]
662
695
  );
663
- const onMouseDown = React5.useCallback(
696
+ const onMouseDown = React6.useCallback(
664
697
  (event) => {
665
698
  triggerProps.onMouseDown?.(event);
666
699
  if (event.defaultPrevented) {
@@ -821,7 +854,7 @@ function StepperNextTrigger({ asChild = false, onClick, disabled, ...props }) {
821
854
  const stepKeys = Array.from(steps.keys());
822
855
  const currentIndex = value ? stepKeys.indexOf(value) : -1;
823
856
  const isDisabled = disabled || currentIndex >= stepKeys.length - 1;
824
- const handleClick = React5.useCallback(
857
+ const handleClick = React6.useCallback(
825
858
  async (event) => {
826
859
  onClick?.(event);
827
860
  if (event.defaultPrevented || isDisabled) {
@@ -854,7 +887,7 @@ function StepperPrevTrigger({ asChild = false, disabled, onClick, ...props }) {
854
887
  const stepKeys = Array.from(steps.keys());
855
888
  const currentIndex = value ? stepKeys.indexOf(value) : -1;
856
889
  const isDisabled = disabled || currentIndex <= 0;
857
- const handleClick = React5.useCallback(
890
+ const handleClick = React6.useCallback(
858
891
  async (event) => {
859
892
  onClick?.(event);
860
893
  if (event.defaultPrevented || isDisabled) {
@@ -1001,15 +1034,15 @@ function ButtonContent({
1001
1034
  const isEndLoading = loading && loadingPosition === "end";
1002
1035
  const EndIcon = isEndLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : endIcon || null;
1003
1036
  const isCenterLoading = loading && loadingPosition === "center";
1004
- return asChild && React5.isValidElement(children) ? React5.cloneElement(
1037
+ return asChild && React6.isValidElement(children) ? React6.cloneElement(
1005
1038
  children,
1006
1039
  props,
1007
- /* @__PURE__ */ jsxs(React5.Fragment, { children: [
1040
+ /* @__PURE__ */ jsxs(React6.Fragment, { children: [
1008
1041
  StartIcon,
1009
- isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : React5.isValidElement(children) ? children.props?.children : null,
1042
+ isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : React6.isValidElement(children) ? children.props?.children : null,
1010
1043
  EndIcon
1011
1044
  ] })
1012
- ) : /* @__PURE__ */ jsxs(React5.Fragment, { children: [
1045
+ ) : /* @__PURE__ */ jsxs(React6.Fragment, { children: [
1013
1046
  StartIcon,
1014
1047
  isCenterLoading ? /* @__PURE__ */ jsx(Spinner, { "aria-label": "Loading" }) : children,
1015
1048
  EndIcon
@@ -0,0 +1,183 @@
1
+ 'use strict';
2
+
3
+ var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var lucideReact = require('lucide-react');
5
+ var radixUi = require('radix-ui');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function Select({
9
+ children,
10
+ disabled,
11
+ defaultOpen,
12
+ defaultValue,
13
+ value,
14
+ dir,
15
+ open,
16
+ form,
17
+ name,
18
+ onOpenChange,
19
+ onValueChange,
20
+ required,
21
+ autoComplete,
22
+ // value props
23
+ placeholder,
24
+ // trigger props
25
+ className,
26
+ size = "default",
27
+ invalid = false,
28
+ ...triggerProps
29
+ }) {
30
+ const rootProps = {
31
+ children,
32
+ disabled,
33
+ defaultOpen,
34
+ defaultValue,
35
+ value,
36
+ dir,
37
+ open,
38
+ form,
39
+ name,
40
+ onOpenChange,
41
+ onValueChange,
42
+ required,
43
+ autoComplete
44
+ };
45
+ return /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Select.Root, { "data-slot": "select", ...rootProps, children: [
46
+ /* @__PURE__ */ jsxRuntime.jsxs(
47
+ radixUi.Select.Trigger,
48
+ {
49
+ "data-slot": "select-trigger",
50
+ "aria-invalid": triggerProps["aria-invalid"] || invalid ? true : void 0,
51
+ "data-size": size,
52
+ className: chunkH2BWO3SI_cjs.cn(
53
+ "border-input dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none",
54
+ "*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
55
+ "disabled:cursor-not-allowed disabled:opacity-50",
56
+ "aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error",
57
+ "data-[size=default]:h-9 data-[size=sm]:h-8",
58
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
59
+ "[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
60
+ "data-[placeholder]:text-muted-foreground",
61
+ className
62
+ ),
63
+ ...triggerProps,
64
+ children: [
65
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Value, { "data-slot": "select-value", placeholder }),
66
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
67
+ ]
68
+ }
69
+ ),
70
+ children
71
+ ] });
72
+ }
73
+ function SelectContent({
74
+ className,
75
+ children,
76
+ position = "popper",
77
+ align = "center",
78
+ ...props
79
+ }) {
80
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
81
+ radixUi.Select.Content,
82
+ {
83
+ "data-slot": "select-content",
84
+ className: chunkH2BWO3SI_cjs.cn(
85
+ "bg-popover text-popover-foreground border-border relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded border shadow-sm",
86
+ "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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
87
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
88
+ className
89
+ ),
90
+ position,
91
+ align,
92
+ ...props,
93
+ children: [
94
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
95
+ /* @__PURE__ */ jsxRuntime.jsx(
96
+ radixUi.Select.Viewport,
97
+ {
98
+ className: chunkH2BWO3SI_cjs.cn(
99
+ "p-1",
100
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
101
+ ),
102
+ children
103
+ }
104
+ ),
105
+ /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
106
+ ]
107
+ }
108
+ ) });
109
+ }
110
+ function SelectScrollUpButton({ className, ...props }) {
111
+ return /* @__PURE__ */ jsxRuntime.jsx(
112
+ radixUi.Select.ScrollUpButton,
113
+ {
114
+ "data-slot": "select-scroll-up-button",
115
+ className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
116
+ ...props,
117
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
118
+ }
119
+ );
120
+ }
121
+ function SelectScrollDownButton({
122
+ className,
123
+ ...props
124
+ }) {
125
+ return /* @__PURE__ */ jsxRuntime.jsx(
126
+ radixUi.Select.ScrollDownButton,
127
+ {
128
+ "data-slot": "select-scroll-down-button",
129
+ className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
130
+ ...props,
131
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
132
+ }
133
+ );
134
+ }
135
+ function SelectGroup(props) {
136
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Group, { "data-slot": "select-group", ...props });
137
+ }
138
+ function SelectItem({ className, children, ...props }) {
139
+ return /* @__PURE__ */ jsxRuntime.jsxs(
140
+ radixUi.Select.Item,
141
+ {
142
+ "data-slot": "select-item",
143
+ className: chunkH2BWO3SI_cjs.cn(
144
+ "focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
145
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
146
+ "[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
147
+ className
148
+ ),
149
+ ...props,
150
+ children: [
151
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) }) }),
152
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { children })
153
+ ]
154
+ }
155
+ );
156
+ }
157
+ function SelectLabel({ className, ...props }) {
158
+ return /* @__PURE__ */ jsxRuntime.jsx(
159
+ radixUi.Select.Label,
160
+ {
161
+ "data-slot": "select-label",
162
+ className: chunkH2BWO3SI_cjs.cn("text-muted-foreground px-2 py-1.5 text-xs", className),
163
+ ...props
164
+ }
165
+ );
166
+ }
167
+ function SelectSeparator({ className, ...props }) {
168
+ return /* @__PURE__ */ jsxRuntime.jsx(
169
+ radixUi.Select.Separator,
170
+ {
171
+ "data-slot": "select-separator",
172
+ className: chunkH2BWO3SI_cjs.cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
173
+ ...props
174
+ }
175
+ );
176
+ }
177
+
178
+ exports.Select = Select;
179
+ exports.SelectContent = SelectContent;
180
+ exports.SelectGroup = SelectGroup;
181
+ exports.SelectItem = SelectItem;
182
+ exports.SelectLabel = SelectLabel;
183
+ exports.SelectSeparator = SelectSeparator;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var chunkO3DHBQA5_cjs = require('../../chunk-O3DHBQA5.cjs');
4
+ require('../../chunk-H2BWO3SI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "Alert", {
9
+ enumerable: true,
10
+ get: function () { return chunkO3DHBQA5_cjs.Alert; }
11
+ });
12
+ Object.defineProperty(exports, "AlertDescription", {
13
+ enumerable: true,
14
+ get: function () { return chunkO3DHBQA5_cjs.AlertDescription; }
15
+ });
16
+ Object.defineProperty(exports, "AlertTitle", {
17
+ enumerable: true,
18
+ get: function () { return chunkO3DHBQA5_cjs.AlertTitle; }
19
+ });
@@ -0,0 +1,24 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
+
6
+ declare const alertVariants: (props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+
10
+ type AlertVariantsProps = VariantProps<typeof alertVariants>;
11
+ type AlertVariant = NonNullable<AlertVariantsProps["variant"]>;
12
+
13
+ type AlertProps = React.ComponentProps<"div"> & {
14
+ variant?: AlertVariant;
15
+ };
16
+ declare function Alert({ className, variant, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
17
+
18
+ type AlertDescriptionProps = React.ComponentProps<"div">;
19
+ declare function AlertDescription({ className, ...props }: AlertDescriptionProps): react_jsx_runtime.JSX.Element;
20
+
21
+ type AlertTitleProps = React.ComponentProps<"div">;
22
+ declare function AlertTitle({ className, ...props }: AlertTitleProps): react_jsx_runtime.JSX.Element;
23
+
24
+ export { Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, type AlertVariant };