@szum-tech/design-system 2.7.0 → 3.1.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 (126) hide show
  1. package/dist/chunk-2Y2ZCPNV.cjs +61 -0
  2. package/dist/chunk-3376ZTRC.cjs +2 -0
  3. package/dist/{chunk-S5BN23O7.cjs → chunk-3KMXFN6M.cjs} +14 -20
  4. package/dist/chunk-5AA4IE2T.cjs +27 -0
  5. package/dist/chunk-5F2Y65JH.js +32 -0
  6. package/dist/chunk-6BSR3O2J.js +53 -0
  7. package/dist/chunk-BYXBJQAS.js +1 -0
  8. package/dist/{chunk-XIPREW2R.js → chunk-DP7UEOTA.js} +173 -176
  9. package/dist/chunk-HCHVDUI6.cjs +34 -0
  10. package/dist/chunk-HD7ZDQWW.js +173 -0
  11. package/dist/chunk-I3RSTJP6.js +20 -0
  12. package/dist/chunk-I7AV5IQO.cjs +33 -0
  13. package/dist/chunk-N4O2GO6V.cjs +204 -0
  14. package/dist/chunk-NGVFYKAT.js +29 -0
  15. package/dist/chunk-NU5UQPBX.cjs +25 -0
  16. package/dist/chunk-OQCNPNPS.js +23 -0
  17. package/dist/chunk-S3ANEJJ7.cjs +22 -0
  18. package/dist/chunk-U4AWAABZ.js +4901 -0
  19. package/dist/chunk-UGSNASZM.js +25 -0
  20. package/dist/{chunk-EIXSMEDP.cjs → chunk-UIOBJSKZ.cjs} +1 -3
  21. package/dist/{chunk-I5P2HH5Z.js → chunk-WJSS32MY.js} +13 -19
  22. package/dist/{chunk-GEACYHTU.js → chunk-XJIUGEPN.js} +1 -3
  23. package/dist/chunk-Y6EVJSAH.cjs +4928 -0
  24. package/dist/{chunk-D3MOZUNH.cjs → chunk-ZV4467OW.cjs} +176 -185
  25. package/dist/components/alert-dialog/index.cjs +1 -0
  26. package/dist/components/alert-dialog/index.js +1 -0
  27. package/dist/components/avatar/index.cjs +5 -4
  28. package/dist/components/avatar/index.d.cts +5 -19
  29. package/dist/components/avatar/index.d.ts +5 -19
  30. package/dist/components/avatar/index.js +2 -1
  31. package/dist/components/badge/index.cjs +1 -0
  32. package/dist/components/badge/index.js +1 -0
  33. package/dist/components/button/index.cjs +23 -3
  34. package/dist/components/button/index.d.cts +8 -15
  35. package/dist/components/button/index.d.ts +8 -15
  36. package/dist/components/button/index.js +22 -2
  37. package/dist/components/card/index.cjs +12 -7
  38. package/dist/components/card/index.d.cts +8 -5
  39. package/dist/components/card/index.d.ts +8 -5
  40. package/dist/components/card/index.js +2 -1
  41. package/dist/components/checkbox/index.cjs +12 -0
  42. package/dist/components/checkbox/index.d.cts +8 -0
  43. package/dist/components/checkbox/index.d.ts +8 -0
  44. package/dist/components/checkbox/index.js +3 -0
  45. package/dist/components/dialog/index.cjs +1 -0
  46. package/dist/components/dialog/index.d.cts +1 -1
  47. package/dist/components/dialog/index.d.ts +1 -1
  48. package/dist/components/dialog/index.js +1 -0
  49. package/dist/components/field/index.cjs +50 -0
  50. package/dist/components/field/index.d.cts +50 -0
  51. package/dist/components/field/index.d.ts +50 -0
  52. package/dist/components/field/index.js +5 -0
  53. package/dist/components/header/index.cjs +1 -0
  54. package/dist/components/header/index.js +1 -0
  55. package/dist/components/index.cjs +157 -125
  56. package/dist/components/index.d.cts +7 -8
  57. package/dist/components/index.d.ts +7 -8
  58. package/dist/components/index.js +14 -14
  59. package/dist/components/input/index.cjs +3 -2
  60. package/dist/components/input/index.d.cts +2 -4
  61. package/dist/components/input/index.d.ts +2 -4
  62. package/dist/components/input/index.js +2 -1
  63. package/dist/components/item/index.cjs +13 -12
  64. package/dist/components/item/index.d.cts +7 -7
  65. package/dist/components/item/index.d.ts +7 -7
  66. package/dist/components/item/index.js +3 -2
  67. package/dist/components/label/index.cjs +3 -2
  68. package/dist/components/label/index.js +2 -1
  69. package/dist/components/select/index.cjs +20 -3
  70. package/dist/components/select/index.d.cts +20 -6
  71. package/dist/components/select/index.d.ts +20 -6
  72. package/dist/components/select/index.js +2 -1
  73. package/dist/components/separator/index.cjs +3 -2
  74. package/dist/components/separator/index.js +2 -1
  75. package/dist/components/sheet/index.cjs +1 -0
  76. package/dist/components/sheet/index.d.cts +1 -1
  77. package/dist/components/sheet/index.d.ts +1 -1
  78. package/dist/components/sheet/index.js +1 -0
  79. package/dist/components/spinner/index.cjs +1 -0
  80. package/dist/components/spinner/index.js +1 -0
  81. package/dist/components/stepper/index.cjs +33 -33
  82. package/dist/components/stepper/index.js +14 -14
  83. package/dist/components/textarea/index.cjs +4 -2
  84. package/dist/components/textarea/index.d.cts +2 -2
  85. package/dist/components/textarea/index.d.ts +2 -2
  86. package/dist/components/textarea/index.js +3 -1
  87. package/dist/components/tooltip/index.cjs +1 -0
  88. package/dist/components/tooltip/index.js +1 -0
  89. package/dist/contexts/index.cjs +1 -0
  90. package/dist/contexts/index.js +1 -0
  91. package/dist/hooks/index.cjs +1 -0
  92. package/dist/hooks/index.js +1 -0
  93. package/dist/icons/index.cjs +89 -18
  94. package/dist/icons/index.js +88 -1
  95. package/dist/utils/index.cjs +1 -0
  96. package/dist/utils/index.js +1 -0
  97. package/package.json +8 -9
  98. package/tailwind/global.css +12 -8
  99. package/tailwind/palette.css +149 -204
  100. package/tailwind/typography.css +33 -57
  101. package/dist/chunk-36YD6ICC.js +0 -70
  102. package/dist/chunk-4NO6IM75.cjs +0 -40
  103. package/dist/chunk-5BTQ6BQA.js +0 -24
  104. package/dist/chunk-5PBHBOXI.js +0 -30
  105. package/dist/chunk-EU7G37IS.js +0 -36
  106. package/dist/chunk-FPFRA5Q6.cjs +0 -31
  107. package/dist/chunk-FVSO3RHT.cjs +0 -17
  108. package/dist/chunk-G6VXQ7DJ.cjs +0 -63
  109. package/dist/chunk-IAI7BIAG.js +0 -31
  110. package/dist/chunk-K4TRAPRN.cjs +0 -341
  111. package/dist/chunk-MI3CQBHC.js +0 -60
  112. package/dist/chunk-OIWEXHFE.cjs +0 -33
  113. package/dist/chunk-P4J2TTH7.cjs +0 -32
  114. package/dist/chunk-UKWZ5BHD.cjs +0 -93
  115. package/dist/chunk-VZKTT6CG.js +0 -15
  116. package/dist/chunk-XTO7CMIM.js +0 -88
  117. package/dist/chunk-YJFJLF7Y.js +0 -319
  118. package/dist/chunk-ZZ3EBGSD.cjs +0 -72
  119. package/dist/components/form/index.cjs +0 -55
  120. package/dist/components/form/index.d.cts +0 -32
  121. package/dist/components/form/index.d.ts +0 -32
  122. package/dist/components/form/index.js +0 -22
  123. package/dist/components/helper-text/index.cjs +0 -10
  124. package/dist/components/helper-text/index.d.cts +0 -18
  125. package/dist/components/helper-text/index.d.ts +0 -18
  126. package/dist/components/helper-text/index.js +0 -1
@@ -1,15 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkP4J2TTH7_cjs = require('./chunk-P4J2TTH7.cjs');
4
- var chunkFVSO3RHT_cjs = require('./chunk-FVSO3RHT.cjs');
3
+ var chunkY6EVJSAH_cjs = require('./chunk-Y6EVJSAH.cjs');
4
+ var chunk3WSQRFUY_cjs = require('./chunk-3WSQRFUY.cjs');
5
5
  var chunkEW6TE3N5_cjs = require('./chunk-EW6TE3N5.cjs');
6
6
  var chunk7EYMOUWG_cjs = require('./chunk-7EYMOUWG.cjs');
7
7
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
8
- var reactHookForm = require('react-hook-form');
9
- var React12 = require('react');
10
- var tailwindMerge = require('tailwind-merge');
11
- var jsxRuntime = require('react/jsx-runtime');
8
+ var React5 = require('react');
12
9
  var reactSlot = require('@radix-ui/react-slot');
10
+ var jsxRuntime = require('react/jsx-runtime');
11
+ var classVarianceAuthority = require('class-variance-authority');
13
12
 
14
13
  function _interopNamespace(e) {
15
14
  if (e && e.__esModule) return e;
@@ -29,72 +28,7 @@ function _interopNamespace(e) {
29
28
  return Object.freeze(n);
30
29
  }
31
30
 
32
- var React12__namespace = /*#__PURE__*/_interopNamespace(React12);
33
-
34
- var Form = reactHookForm.FormProvider;
35
- var FormItemContext = React12__namespace.createContext({});
36
- var FormItem = React12__namespace.forwardRef(function({ className, ...props }, ref) {
37
- const id = React12__namespace.useId();
38
- return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: tailwindMerge.twMerge("space-y-2", className), ...props }) });
39
- });
40
- FormItem.displayName = "FormItem";
41
- var FormFieldContext = React12__namespace.createContext({});
42
- var FormField = ({
43
- ...props
44
- }) => {
45
- return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
46
- };
47
- var useFormField = () => {
48
- const fieldContext = React12__namespace.useContext(FormFieldContext);
49
- const itemContext = React12__namespace.useContext(FormItemContext);
50
- const { getFieldState, formState } = reactHookForm.useFormContext();
51
- const fieldState = getFieldState(fieldContext.name, formState);
52
- if (!fieldContext) {
53
- throw new Error("useFormField should be used within <FormField>");
54
- }
55
- const { id } = itemContext;
56
- return {
57
- id,
58
- name: fieldContext.name,
59
- formItemId: `${id}-form-item`,
60
- formDescriptionId: `${id}-form-item-description`,
61
- formMessageId: `${id}-form-item-message`,
62
- ...fieldState
63
- };
64
- };
65
- var FormLabel = React12__namespace.forwardRef(
66
- ({ className, caption, ...props }, ref) => {
67
- const { error, formItemId } = useFormField();
68
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-end justify-between", children: [
69
- /* @__PURE__ */ jsxRuntime.jsx(
70
- chunkFVSO3RHT_cjs.Label,
71
- {
72
- ref,
73
- className: tailwindMerge.twMerge(error ? "text-error-500" : null, className),
74
- htmlFor: formItemId,
75
- ...props
76
- }
77
- ),
78
- caption ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "typography-caption text-gray-200", children: caption }) : null
79
- ] });
80
- }
81
- );
82
- FormLabel.displayName = "FormLabel";
83
- var FormControl = React12__namespace.forwardRef(function(props, ref) {
84
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
85
- const newProps = { ...props, invalid: !!error };
86
- return /* @__PURE__ */ jsxRuntime.jsx(
87
- reactSlot.Slot,
88
- {
89
- ref,
90
- id: formItemId,
91
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
92
- "aria-invalid": !!error,
93
- ...newProps
94
- }
95
- );
96
- });
97
- FormControl.displayName = "FormControl";
31
+ var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
98
32
 
99
33
  // src/components/stepper/stepper.constants.ts
100
34
  var STEPPER_ROOT_NAME = "Stepper";
@@ -122,9 +56,9 @@ var STEPPER_MAP_KEY_TO_FOCUS_INTENT = {
122
56
  };
123
57
 
124
58
  // src/components/stepper/stepper.context.tsx
125
- var StepperContext = React12__namespace.createContext(null);
59
+ var StepperContext = React5__namespace.createContext(null);
126
60
  function useStepperContext(consumerName) {
127
- const context = React12__namespace.useContext(StepperContext);
61
+ const context = React5__namespace.useContext(StepperContext);
128
62
  if (!context) {
129
63
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
130
64
  }
@@ -214,9 +148,9 @@ function createStepperStore(listenersRef, stateRef, onValueChange, onValueComple
214
148
  };
215
149
  return store;
216
150
  }
217
- var StepperStoreContext = React12__namespace.createContext(null);
151
+ var StepperStoreContext = React5__namespace.createContext(null);
218
152
  function useStepperStoreContext(consumerName) {
219
- const context = React12__namespace.useContext(StepperStoreContext);
153
+ const context = React5__namespace.useContext(StepperStoreContext);
220
154
  if (!context) {
221
155
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ROOT_NAME}\``);
222
156
  }
@@ -224,8 +158,8 @@ function useStepperStoreContext(consumerName) {
224
158
  }
225
159
  function useStepperStore(selector) {
226
160
  const store = useStepperStoreContext("useStore");
227
- const getSnapshot = React12__namespace.useCallback(() => selector(store.getState()), [selector, store]);
228
- return React12__namespace.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
161
+ const getSnapshot = React5__namespace.useCallback(() => selector(store.getState()), [selector, store]);
162
+ return React5__namespace.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
229
163
  }
230
164
  function Stepper({
231
165
  value,
@@ -247,14 +181,14 @@ function Stepper({
247
181
  indicators = {},
248
182
  ...rootProps
249
183
  }) {
250
- const id = React12__namespace.useId();
184
+ const id = React5__namespace.useId();
251
185
  const rootId = idProp ?? id;
252
186
  const listenersRef = chunk7EYMOUWG_cjs.useLazyRef(() => /* @__PURE__ */ new Set());
253
187
  const stateRef = chunk7EYMOUWG_cjs.useLazyRef(() => ({
254
188
  steps: /* @__PURE__ */ new Map(),
255
189
  value: value ?? defaultValue
256
190
  }));
257
- const store = React12__namespace.useMemo(
191
+ const store = React5__namespace.useMemo(
258
192
  () => createStepperStore(listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate),
259
193
  [listenersRef, stateRef, onValueChange, onValueComplete, onValueAdd, onValueRemove, onValidate]
260
194
  );
@@ -264,7 +198,7 @@ function Stepper({
264
198
  }
265
199
  }, [value]);
266
200
  const dir = chunkEW6TE3N5_cjs.useDirection(dirProp);
267
- const contextValue = React12__namespace.useMemo(
201
+ const contextValue = React5__namespace.useMemo(
268
202
  () => ({
269
203
  id: rootId,
270
204
  dir,
@@ -316,48 +250,14 @@ var StepperDataState = {
316
250
  ACTIVE: "active",
317
251
  COMPLETED: "completed"
318
252
  };
319
- var StepperFocusContext = React12__namespace.createContext(null);
253
+ var StepperFocusContext = React5__namespace.createContext(null);
320
254
  function useStepperFocusContext(consumerName) {
321
- const context = React12__namespace.useContext(StepperFocusContext);
255
+ const context = React5__namespace.useContext(StepperFocusContext);
322
256
  if (!context) {
323
257
  throw new Error(`\`${consumerName}\` must be used within \`FocusProvider\``);
324
258
  }
325
259
  return context;
326
260
  }
327
- function setRef(ref, value) {
328
- if (typeof ref === "function") {
329
- return ref(value);
330
- } else if (ref !== null && ref !== void 0) {
331
- ref.current = value;
332
- }
333
- }
334
- function composeRefs(...refs) {
335
- return (node) => {
336
- let hasCleanup = false;
337
- const cleanups = refs.map((ref) => {
338
- const cleanup = setRef(ref, node);
339
- if (!hasCleanup && typeof cleanup == "function") {
340
- hasCleanup = true;
341
- }
342
- return cleanup;
343
- });
344
- if (hasCleanup) {
345
- return () => {
346
- for (let i = 0; i < cleanups.length; i++) {
347
- const cleanup = cleanups[i];
348
- if (typeof cleanup == "function") {
349
- cleanup();
350
- } else {
351
- setRef(refs[i], null);
352
- }
353
- }
354
- };
355
- }
356
- };
357
- }
358
- function useComposedRefs(...refs) {
359
- return React12__namespace.useCallback(composeRefs(...refs), refs);
360
- }
361
261
 
362
262
  // src/components/stepper/stepper.utils.tsx
363
263
  function focusFirst(candidates, preventScroll = false) {
@@ -407,32 +307,32 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
407
307
  const context = useStepperContext(STEPPER_NAV_NAME);
408
308
  const orientation = context.orientation;
409
309
  const currentValue = useStepperStore((state) => state.value);
410
- const [tabStopId, setTabStopId] = React12__namespace.useState(null);
411
- const [isTabbingBackOut, setIsTabbingBackOut] = React12__namespace.useState(false);
412
- const [focusableItemCount, setFocusableItemCount] = React12__namespace.useState(0);
413
- const isClickFocusRef = React12__namespace.useRef(false);
414
- const itemsRef = React12__namespace.useRef(/* @__PURE__ */ new Map());
415
- const listRef = React12__namespace.useRef(null);
416
- const composedRef = useComposedRefs(ref, listRef);
417
- const onItemFocus = React12__namespace.useCallback((tabStopId2) => {
310
+ const [tabStopId, setTabStopId] = React5__namespace.useState(null);
311
+ const [isTabbingBackOut, setIsTabbingBackOut] = React5__namespace.useState(false);
312
+ const [focusableItemCount, setFocusableItemCount] = React5__namespace.useState(0);
313
+ const isClickFocusRef = React5__namespace.useRef(false);
314
+ const itemsRef = React5__namespace.useRef(/* @__PURE__ */ new Map());
315
+ const listRef = React5__namespace.useRef(null);
316
+ const composedRef = chunkY6EVJSAH_cjs.useComposedRefs(ref, listRef);
317
+ const onItemFocus = React5__namespace.useCallback((tabStopId2) => {
418
318
  setTabStopId(tabStopId2);
419
319
  }, []);
420
- const onItemShiftTab = React12__namespace.useCallback(() => {
320
+ const onItemShiftTab = React5__namespace.useCallback(() => {
421
321
  setIsTabbingBackOut(true);
422
322
  }, []);
423
- const onFocusableItemAdd = React12__namespace.useCallback(() => {
323
+ const onFocusableItemAdd = React5__namespace.useCallback(() => {
424
324
  setFocusableItemCount((prevCount) => prevCount + 1);
425
325
  }, []);
426
- const onFocusableItemRemove = React12__namespace.useCallback(() => {
326
+ const onFocusableItemRemove = React5__namespace.useCallback(() => {
427
327
  setFocusableItemCount((prevCount) => prevCount - 1);
428
328
  }, []);
429
- const onItemRegister = React12__namespace.useCallback((item) => {
329
+ const onItemRegister = React5__namespace.useCallback((item) => {
430
330
  itemsRef.current.set(item.id, item);
431
331
  }, []);
432
- const onItemUnregister = React12__namespace.useCallback((id) => {
332
+ const onItemUnregister = React5__namespace.useCallback((id) => {
433
333
  itemsRef.current.delete(id);
434
334
  }, []);
435
- const getItems = React12__namespace.useCallback(() => {
335
+ const getItems = React5__namespace.useCallback(() => {
436
336
  return Array.from(itemsRef.current.values()).filter((item) => item.ref.current).sort((a, b) => {
437
337
  const elementA = a.ref.current;
438
338
  const elementB = b.ref.current;
@@ -447,7 +347,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
447
347
  return 0;
448
348
  });
449
349
  }, []);
450
- const onBlur = React12__namespace.useCallback(
350
+ const onBlur = React5__namespace.useCallback(
451
351
  (event) => {
452
352
  listProps.onBlur?.(event);
453
353
  if (event.defaultPrevented) return;
@@ -455,7 +355,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
455
355
  },
456
356
  [listProps.onBlur]
457
357
  );
458
- const onFocus = React12__namespace.useCallback(
358
+ const onFocus = React5__namespace.useCallback(
459
359
  (event) => {
460
360
  listProps.onFocus?.(event);
461
361
  if (event.defaultPrevented) return;
@@ -480,7 +380,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
480
380
  // eslint-disable-next-line react-hooks/exhaustive-deps
481
381
  [listProps.onFocus, isTabbingBackOut, currentValue, tabStopId]
482
382
  );
483
- const onMouseDown = React12__namespace.useCallback(
383
+ const onMouseDown = React5__namespace.useCallback(
484
384
  (event) => {
485
385
  listProps.onMouseDown?.(event);
486
386
  if (event.defaultPrevented) return;
@@ -489,7 +389,7 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
489
389
  // eslint-disable-next-line react-hooks/exhaustive-deps
490
390
  [listProps.onMouseDown]
491
391
  );
492
- const focusContextValue = React12__namespace.useMemo(
392
+ const focusContextValue = React5__namespace.useMemo(
493
393
  () => ({
494
394
  tabStopId,
495
395
  onItemFocus,
@@ -535,9 +435,9 @@ function StepperNav({ className, children, asChild, ref, ...listProps }) {
535
435
  }
536
436
  ) });
537
437
  }
538
- var StepperItemContext = React12__namespace.createContext(null);
438
+ var StepperItemContext = React5__namespace.createContext(null);
539
439
  function useStepperItemContext(consumerName) {
540
- const context = React12__namespace.useContext(StepperItemContext);
440
+ const context = React5__namespace.useContext(StepperItemContext);
541
441
  if (!context) {
542
442
  throw new Error(`\`${consumerName}\` must be used within \`${STEPPER_ITEM_NAME}\``);
543
443
  }
@@ -568,7 +468,7 @@ function StepperItem({
568
468
  const stepState = useStepperStore((state) => state.steps.get(itemValue));
569
469
  const steps = useStepperStore((state) => state.steps);
570
470
  const dataState = getDataState(value, itemValue, stepState, steps);
571
- const itemContextValue = React12__namespace.useMemo(
471
+ const itemContextValue = React5__namespace.useMemo(
572
472
  () => ({
573
473
  value: itemValue,
574
474
  stepState
@@ -585,7 +485,7 @@ function StepperItem({
585
485
  "data-slot": "stepper-item",
586
486
  dir,
587
487
  className: chunkH2BWO3SI_cjs.cn(
588
- "group/step flex flex-1 flex-col justify-end",
488
+ "group/step flex flex-1 flex-col justify-end data-[disabled]:opacity-50",
589
489
  "",
590
490
  // "group-data-[orientation=horizontal]/stepper-nav:flex-row group-data-[orientation=vertical]/stepper-nav:flex-col",
591
491
  className
@@ -598,8 +498,8 @@ function StepperItem({
598
498
  {
599
499
  "data-state": dataState,
600
500
  className: chunkH2BWO3SI_cjs.cn(
601
- "h-1 w-full bg-gray-800 transition-colors duration-500",
602
- "data-[state=active]:bg-primary-500 data-[state=completed]:bg-success-500"
501
+ "bg-border h-1 w-full transition-colors duration-500",
502
+ "data-[state=active]:bg-primary data-[state=completed]:bg-success"
603
503
  )
604
504
  }
605
505
  )
@@ -630,11 +530,11 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
630
530
  const isActive = value === itemValue;
631
531
  const isTabStop = focusContext.tabStopId === triggerId;
632
532
  const dataState = getDataState(value, itemValue, stepState, steps);
633
- const triggerRef = React12__namespace.useRef(null);
634
- const composedRef = useComposedRefs(ref, triggerRef);
635
- const isArrowKeyPressedRef = React12__namespace.useRef(false);
636
- const isMouseClickRef = React12__namespace.useRef(false);
637
- React12__namespace.useEffect(() => {
533
+ const triggerRef = React5__namespace.useRef(null);
534
+ const composedRef = chunkY6EVJSAH_cjs.useComposedRefs(ref, triggerRef);
535
+ const isArrowKeyPressedRef = React5__namespace.useRef(false);
536
+ const isMouseClickRef = React5__namespace.useRef(false);
537
+ React5__namespace.useEffect(() => {
638
538
  function onKeyDown2(event) {
639
539
  if (STEPPER_ARROW_KEYS.includes(event.key)) {
640
540
  isArrowKeyPressedRef.current = true;
@@ -668,7 +568,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
668
568
  }
669
569
  };
670
570
  }, [focusContext, triggerId, itemValue, isTabStop, isDisabled]);
671
- const onClick = React12__namespace.useCallback(
571
+ const onClick = React5__namespace.useCallback(
672
572
  async (event) => {
673
573
  triggerProps.onClick?.(event);
674
574
  if (event.defaultPrevented) return;
@@ -682,7 +582,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
682
582
  // eslint-disable-next-line react-hooks/exhaustive-deps
683
583
  [isDisabled, context.nonInteractive, store, itemValue, value, steps, triggerProps.onClick]
684
584
  );
685
- const onFocus = React12__namespace.useCallback(
585
+ const onFocus = React5__namespace.useCallback(
686
586
  async (event) => {
687
587
  triggerProps.onFocus?.(event);
688
588
  if (event.defaultPrevented) return;
@@ -697,20 +597,20 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
697
597
  isMouseClickRef.current = false;
698
598
  },
699
599
  [
600
+ triggerProps,
700
601
  focusContext,
701
602
  triggerId,
702
- activationMode,
703
603
  isActive,
704
604
  isDisabled,
605
+ activationMode,
705
606
  context.nonInteractive,
706
- store,
707
- itemValue,
708
- value,
709
607
  steps,
710
- triggerProps.onFocus
608
+ value,
609
+ itemValue,
610
+ store
711
611
  ]
712
612
  );
713
- const onKeyDown = React12__namespace.useCallback(
613
+ const onKeyDown = React5__namespace.useCallback(
714
614
  async (event) => {
715
615
  triggerProps.onKeyDown?.(event);
716
616
  if (event.defaultPrevented) return;
@@ -779,7 +679,7 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
779
679
  steps
780
680
  ]
781
681
  );
782
- const onMouseDown = React12__namespace.useCallback(
682
+ const onMouseDown = React5__namespace.useCallback(
783
683
  (event) => {
784
684
  triggerProps.onMouseDown?.(event);
785
685
  if (event.defaultPrevented) {
@@ -815,10 +715,9 @@ function StepperTrigger({ asChild, disabled, className, ref, ...triggerProps })
815
715
  "aria-selected": isActive,
816
716
  "aria-setsize": stepCount,
817
717
  className: chunkH2BWO3SI_cjs.cn(
818
- "inline-flex w-full cursor-pointer items-center gap-3 rounded text-left transition-colors duration-300 outline-none",
819
- "text-gray-500 data-[state=active]:text-gray-100 data-[state=completed]:text-gray-100 data-[state=loading]:text-gray-100",
820
- "disabled:pointer-events-none disabled:opacity-60",
821
- "focus-visible:ring-primary-500/50 focus-visible:z-10 focus-visible:ring-[3px]",
718
+ "inline-flex w-full cursor-pointer items-center gap-3 rounded text-left transition-colors duration-500 outline-none",
719
+ "disabled:pointer-events-none",
720
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
822
721
  className
823
722
  ),
824
723
  onClick,
@@ -847,9 +746,9 @@ function StepperIndicator({ className, children, asChild, ref, ...props }) {
847
746
  dir,
848
747
  ref,
849
748
  className: chunkH2BWO3SI_cjs.cn(
850
- "bg-app-foreground relative flex size-6 shrink-0 items-center justify-center self-end overflow-hidden rounded-t border-x border-t border-gray-800 text-xs transition-colors duration-500",
851
- "data-[state=completed]:bg-success-500/50 data-[state=completed]:border-success-500",
852
- "data-[state=active]:bg-primary-500/50 data-[state=active]:border-primary-500",
749
+ "bg-muted border-border text-muted-foreground relative flex size-6 shrink-0 items-center justify-center self-end overflow-hidden rounded-t border-x border-t text-xs transition-colors duration-500",
750
+ "data-[state=completed]:bg-success/50 data-[state=completed]:border-success data-[state=completed]:text-success-foreground",
751
+ "data-[state=active]:bg-primary/50 data-[state=active]:border-primary data-[state=active]:text-primary-foreground",
853
752
  className
854
753
  ),
855
754
  ...props,
@@ -884,7 +783,7 @@ function StepperDescription({ className, asChild, ...props }) {
884
783
  id: descriptionId,
885
784
  "data-slot": "stepper-description",
886
785
  dir: context.dir,
887
- className: chunkH2BWO3SI_cjs.cn("text-sm text-gray-700", className),
786
+ className: chunkH2BWO3SI_cjs.cn("text-muted-foreground text-sm", className),
888
787
  ...props
889
788
  }
890
789
  );
@@ -941,7 +840,7 @@ function StepperNextTrigger({ asChild = false, onClick, disabled, ...props }) {
941
840
  const stepKeys = Array.from(steps.keys());
942
841
  const currentIndex = value ? stepKeys.indexOf(value) : -1;
943
842
  const isDisabled = disabled || currentIndex >= stepKeys.length - 1;
944
- const handleClick = React12__namespace.useCallback(
843
+ const handleClick = React5__namespace.useCallback(
945
844
  async (event) => {
946
845
  onClick?.(event);
947
846
  if (event.defaultPrevented || isDisabled) {
@@ -974,7 +873,7 @@ function StepperPrevTrigger({ asChild = false, disabled, onClick, ...props }) {
974
873
  const stepKeys = Array.from(steps.keys());
975
874
  const currentIndex = value ? stepKeys.indexOf(value) : -1;
976
875
  const isDisabled = disabled || currentIndex <= 0;
977
- const handleClick = React12__namespace.useCallback(
876
+ const handleClick = React5__namespace.useCallback(
978
877
  async (event) => {
979
878
  onClick?.(event);
980
879
  if (event.defaultPrevented || isDisabled) {
@@ -1000,28 +899,120 @@ function StepperPrevTrigger({ asChild = false, disabled, onClick, ...props }) {
1000
899
  }
1001
900
  );
1002
901
  }
1003
- var FormMessage = React12__namespace.forwardRef(function({ children, ...props }, ref) {
1004
- const { error, formMessageId } = useFormField();
1005
- const body = error ? String(error?.message) : children;
1006
- if (!body) {
1007
- return null;
902
+ var buttonVariants = classVarianceAuthority.cva(
903
+ [
904
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded text-sm font-medium transition-all shrink-0 outline-none",
905
+ "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50",
906
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
907
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
908
+ "aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error"
909
+ ],
910
+ {
911
+ variants: {
912
+ variant: {
913
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
914
+ error: "bg-error text-white hover:bg-error/90 focus-visible:ring-error/20 dark:focus-visible:ring-error/40 dark:bg-error/60",
915
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
916
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
917
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
918
+ link: "text-primary underline-offset-4 hover:underline"
919
+ },
920
+ size: {
921
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
922
+ sm: "h-8 rounded gap-1.5 px-3 has-[>svg]:px-2.5",
923
+ lg: "h-10 rounded px-6 has-[>svg]:px-4",
924
+ icon: "size-9",
925
+ "icon-sm": "size-8",
926
+ "icon-lg": "size-10"
927
+ },
928
+ fullWidth: {
929
+ true: "w-full"
930
+ }
931
+ },
932
+ defaultVariants: {
933
+ variant: "default",
934
+ size: "default",
935
+ fullWidth: false
936
+ }
1008
937
  }
1009
- return /* @__PURE__ */ jsxRuntime.jsx(chunkP4J2TTH7_cjs.HelperText, { ref, type: "error", id: formMessageId, ...props, children: body });
1010
- });
1011
- FormMessage.displayName = "FormMessage";
1012
- var FormDescription = React12__namespace.forwardRef(function(props, ref) {
1013
- const { formDescriptionId } = useFormField();
1014
- return /* @__PURE__ */ jsxRuntime.jsx(chunkP4J2TTH7_cjs.HelperText, { ref, id: formDescriptionId, ...props });
1015
- });
1016
- FormDescription.displayName = "FormDescription";
938
+ );
939
+ function Button({
940
+ asChild = false,
941
+ variant = "default",
942
+ disabled = false,
943
+ fullWidth = false,
944
+ loadingPosition: loadingPositionProp = "start",
945
+ children,
946
+ type = "button",
947
+ loading = false,
948
+ size = "default",
949
+ endIcon,
950
+ startIcon,
951
+ className,
952
+ ...props
953
+ }) {
954
+ const Comp = asChild ? reactSlot.Slot : "button";
955
+ const isDisabled = disabled || loading;
956
+ const loadingPosition = size?.startsWith("icon") ? "center" : loadingPositionProp;
957
+ return /* @__PURE__ */ jsxRuntime.jsx(
958
+ Comp,
959
+ {
960
+ "data-slot": "button",
961
+ "aria-disabled": isDisabled || void 0,
962
+ className: chunkH2BWO3SI_cjs.cn(buttonVariants({ fullWidth, size, variant }), className),
963
+ "data-state": loading ? "loading" : void 0,
964
+ disabled: isDisabled,
965
+ role: Comp !== "button" ? "button" : void 0,
966
+ tabIndex: isDisabled ? -1 : 0,
967
+ type: Comp === "button" ? type : void 0,
968
+ "data-size": size,
969
+ "data-variant": variant,
970
+ ...props,
971
+ children: /* @__PURE__ */ jsxRuntime.jsx(
972
+ ButtonContent,
973
+ {
974
+ loading,
975
+ size,
976
+ loadingPosition,
977
+ startIcon,
978
+ endIcon,
979
+ asChild,
980
+ children
981
+ }
982
+ )
983
+ }
984
+ );
985
+ }
986
+ function ButtonContent({
987
+ children,
988
+ loading = false,
989
+ loadingPosition = "start",
990
+ startIcon,
991
+ asChild,
992
+ endIcon,
993
+ ...props
994
+ }) {
995
+ const isStartLoading = loading && loadingPosition === "start";
996
+ const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : startIcon || null;
997
+ const isEndLoading = loading && loadingPosition === "end";
998
+ const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : endIcon || null;
999
+ const isCenterLoading = loading && loadingPosition === "center";
1000
+ return asChild && React5__namespace.isValidElement(children) ? React5__namespace.cloneElement(
1001
+ children,
1002
+ props,
1003
+ /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
1004
+ StartIcon,
1005
+ isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : React5__namespace.isValidElement(children) ? children.props?.children : null,
1006
+ EndIcon
1007
+ ] })
1008
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
1009
+ StartIcon,
1010
+ isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : children,
1011
+ EndIcon
1012
+ ] });
1013
+ }
1017
1014
 
1018
- exports.Form = Form;
1019
- exports.FormControl = FormControl;
1020
- exports.FormDescription = FormDescription;
1021
- exports.FormField = FormField;
1022
- exports.FormItem = FormItem;
1023
- exports.FormLabel = FormLabel;
1024
- exports.FormMessage = FormMessage;
1015
+ exports.Button = Button;
1025
1016
  exports.Stepper = Stepper;
1026
1017
  exports.StepperActivationMode = StepperActivationMode;
1027
1018
  exports.StepperContent = StepperContent;
@@ -2,6 +2,7 @@
2
2
 
3
3
  var chunkTMXVL5CV_cjs = require('../../chunk-TMXVL5CV.cjs');
4
4
  require('../../chunk-H2BWO3SI.cjs');
5
+ require('../../chunk-3376ZTRC.cjs');
5
6
 
6
7
 
7
8
 
@@ -1,2 +1,3 @@
1
1
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '../../chunk-5MJPZUTO.js';
2
2
  import '../../chunk-ZD2QRAOX.js';
3
+ import '../../chunk-BYXBJQAS.js';
@@ -1,19 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunk4NO6IM75_cjs = require('../../chunk-4NO6IM75.cjs');
3
+ var chunkI7AV5IQO_cjs = require('../../chunk-I7AV5IQO.cjs');
4
4
  require('../../chunk-H2BWO3SI.cjs');
5
+ require('../../chunk-3376ZTRC.cjs');
5
6
 
6
7
 
7
8
 
8
9
  Object.defineProperty(exports, "Avatar", {
9
10
  enumerable: true,
10
- get: function () { return chunk4NO6IM75_cjs.Avatar; }
11
+ get: function () { return chunkI7AV5IQO_cjs.Avatar; }
11
12
  });
12
13
  Object.defineProperty(exports, "AvatarFallback", {
13
14
  enumerable: true,
14
- get: function () { return chunk4NO6IM75_cjs.AvatarFallback; }
15
+ get: function () { return chunkI7AV5IQO_cjs.AvatarFallback; }
15
16
  });
16
17
  Object.defineProperty(exports, "AvatarImage", {
17
18
  enumerable: true,
18
- get: function () { return chunk4NO6IM75_cjs.AvatarImage; }
19
+ get: function () { return chunkI7AV5IQO_cjs.AvatarImage; }
19
20
  });
@@ -1,28 +1,14 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { Avatar as Avatar$1 } from 'radix-ui';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as class_variance_authority_types from 'class-variance-authority/types';
6
4
 
7
- type AvatarProps = Avatar$1.AvatarProps & React.RefAttributes<HTMLSpanElement> & {
8
- /**
9
- * Defines avatar size
10
- */
11
- size?: AvatarSizeType;
12
- };
13
- declare function Avatar({ className, size, ref, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
14
-
15
- declare const avatarCva: (props?: ({
16
- size?: "sm" | "md" | "lg" | null | undefined;
17
- } & class_variance_authority_types.ClassProp) | undefined) => string;
18
-
19
- type AvatarCvaProps = VariantProps<typeof avatarCva>;
20
- type AvatarSizeType = NonNullable<AvatarCvaProps["size"]>;
5
+ type AvatarProps = React.ComponentProps<typeof Avatar$1.Root>;
6
+ declare function Avatar({ className, ...props }: AvatarProps): react_jsx_runtime.JSX.Element;
21
7
 
22
8
  type AvatarImageProps = React.ComponentProps<typeof Avatar$1.Image>;
23
- declare function AvatarImage({ className, ref, ...props }: AvatarImageProps): react_jsx_runtime.JSX.Element;
9
+ declare function AvatarImage({ className, ...props }: AvatarImageProps): react_jsx_runtime.JSX.Element;
24
10
 
25
11
  type AvatarFallbackProps = React.ComponentProps<typeof Avatar$1.Fallback>;
26
- declare function AvatarFallback({ className, ref, ...props }: AvatarFallbackProps): react_jsx_runtime.JSX.Element;
12
+ declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): react_jsx_runtime.JSX.Element;
27
13
 
28
- export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarSizeType };
14
+ export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps };