@szum-tech/design-system 3.11.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 (50) hide show
  1. package/dist/chunk-3WSQRFUY.cjs +11 -0
  2. package/dist/{chunk-OPQX42NR.js → chunk-4TRADSTP.js} +2 -2
  3. package/dist/{chunk-5ZSD2YLY.js → chunk-5F2Y65JH.js} +2 -2
  4. package/dist/{chunk-A6ZWTZMQ.js → chunk-B7RHEMZH.js} +2 -2
  5. package/dist/{chunk-W5I7BUQO.js → chunk-BTSHACKG.js} +2 -2
  6. package/dist/{chunk-PWBY46RH.cjs → chunk-CP43WJCN.cjs} +11 -11
  7. package/dist/{chunk-Y5UPGNJA.js → chunk-DTSFPOLX.js} +1 -1
  8. package/dist/{chunk-UMILPYKN.js → chunk-E5TYGWGE.js} +5 -5
  9. package/dist/{chunk-LOWCBV4P.cjs → chunk-GHV2TURY.cjs} +2 -2
  10. package/dist/{chunk-FIWOOWZ3.cjs → chunk-HCHVDUI6.cjs} +2 -2
  11. package/dist/{chunk-6FFAE6UY.js → chunk-P5IUC7HJ.js} +1 -1
  12. package/dist/{chunk-CPQEZX4T.js → chunk-QTYNFISP.js} +6 -6
  13. package/dist/{chunk-HEHVP6RQ.cjs → chunk-VK5EX3OG.cjs} +2 -2
  14. package/dist/{chunk-PKUVRULS.cjs → chunk-X3ZT3KGX.cjs} +2 -2
  15. package/dist/{chunk-RXUYF4PD.cjs → chunk-XENOUBSI.cjs} +2 -2
  16. package/dist/{chunk-S5RFK3YL.cjs → chunk-XJZOANXX.cjs} +5 -5
  17. package/dist/components/accordion/index.cjs +5 -6
  18. package/dist/components/accordion/index.js +1 -2
  19. package/dist/components/badge-overflow/index.cjs +182 -0
  20. package/dist/components/badge-overflow/index.d.cts +21 -0
  21. package/dist/components/badge-overflow/index.d.ts +21 -0
  22. package/dist/components/badge-overflow/index.js +160 -0
  23. package/dist/components/button/index.cjs +14 -15
  24. package/dist/components/button/index.js +13 -14
  25. package/dist/components/carousel/index.cjs +261 -0
  26. package/dist/components/carousel/index.d.cts +47 -0
  27. package/dist/components/carousel/index.d.ts +47 -0
  28. package/dist/components/carousel/index.js +230 -0
  29. package/dist/components/checkbox/index.cjs +2 -3
  30. package/dist/components/checkbox/index.js +1 -2
  31. package/dist/components/dialog/index.cjs +9 -10
  32. package/dist/components/dialog/index.js +1 -2
  33. package/dist/components/index.cjs +173 -174
  34. package/dist/components/index.js +13 -14
  35. package/dist/components/radio-group/index.cjs +3 -4
  36. package/dist/components/radio-group/index.js +1 -2
  37. package/dist/components/select/index.cjs +7 -8
  38. package/dist/components/select/index.js +1 -2
  39. package/dist/components/sheet/index.cjs +9 -10
  40. package/dist/components/sheet/index.js +1 -2
  41. package/dist/components/spinner/index.cjs +2 -3
  42. package/dist/components/spinner/index.js +1 -2
  43. package/dist/components/stepper/index.cjs +32 -33
  44. package/dist/components/stepper/index.js +13 -14
  45. package/dist/components/toaster/index.cjs +15 -16
  46. package/dist/components/toaster/index.js +13 -14
  47. package/package.json +15 -14
  48. package/dist/chunk-DAUTZWFD.cjs +0 -206
  49. package/dist/chunk-IARCTYJ3.js +0 -195
  50. package/dist/chunk-MQMHXDRJ.cjs +0 -11
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var lucideReact = require('lucide-react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ function Spinner({ className, ...props }) {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LoaderCircle, { role: "status", "aria-label": "Loading", className: chunkH2BWO3SI_cjs.cn("size-4 animate-spin", className), ...props });
9
+ }
10
+
11
+ exports.Spinner = Spinner;
@@ -1,7 +1,7 @@
1
- import { Circle } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
3
2
  import { RadioGroup as RadioGroup$1 } from 'radix-ui';
4
3
  import { jsx } from 'react/jsx-runtime';
4
+ import { CircleIcon } from 'lucide-react';
5
5
 
6
6
  function RadioGroup({ className, ...props }) {
7
7
  return /* @__PURE__ */ jsx(RadioGroup$1.Root, { "data-slot": "radio-group", className: cn("grid gap-3", className), ...props });
@@ -24,7 +24,7 @@ function RadioGroupItem({ className, ...props }) {
24
24
  {
25
25
  "data-slot": "radio-group-indicator",
26
26
  className: "relative flex items-center justify-center",
27
- children: /* @__PURE__ */ jsx(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
27
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
28
28
  }
29
29
  )
30
30
  }
@@ -1,5 +1,5 @@
1
- import { Check } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
2
+ import { CheckIcon } from 'lucide-react';
3
3
  import { Checkbox as Checkbox$1 } from 'radix-ui';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
@@ -22,7 +22,7 @@ function Checkbox({ className, ...props }) {
22
22
  {
23
23
  "data-slot": "checkbox-indicator",
24
24
  className: "grid place-content-center text-current transition-none",
25
- children: /* @__PURE__ */ jsx(Check, { className: "size-3.5" })
25
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
26
26
  }
27
27
  )
28
28
  }
@@ -1,7 +1,7 @@
1
- import { ChevronDown } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
3
2
  import { Accordion as Accordion$1 } from 'radix-ui';
4
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { ChevronDownIcon } from 'lucide-react';
5
5
 
6
6
  function Accordion({ ...props }) {
7
7
  return /* @__PURE__ */ jsx(Accordion$1.Root, { "data-slot": "accordion", ...props });
@@ -29,7 +29,7 @@ function AccordionTrigger({ className, children, ...props }) {
29
29
  ...props,
30
30
  children: [
31
31
  children,
32
- /* @__PURE__ */ jsx(ChevronDown, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
32
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
33
33
  ]
34
34
  }
35
35
  ) });
@@ -1,7 +1,7 @@
1
- import { X } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
3
2
  import { Dialog as Dialog$1 } from 'radix-ui';
4
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
+ import { XIcon } from 'lucide-react';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { cva } from 'class-variance-authority';
7
7
 
@@ -66,7 +66,7 @@ function DialogContent({
66
66
  "data-slot": "dialog-close",
67
67
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
68
68
  children: [
69
- /* @__PURE__ */ jsx(X, {}),
69
+ /* @__PURE__ */ jsx(XIcon, {}),
70
70
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
71
71
  ]
72
72
  }
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKQ6QE7BT_cjs = require('./chunk-KQ6QE7BT.cjs');
4
- var chunkMQMHXDRJ_cjs = require('./chunk-MQMHXDRJ.cjs');
4
+ var chunk3WSQRFUY_cjs = require('./chunk-3WSQRFUY.cjs');
5
5
  var chunkXIQUR62A_cjs = require('./chunk-XIQUR62A.cjs');
6
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
7
6
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
8
7
  var React5 = require('react');
9
8
  var reactSlot = require('@radix-ui/react-slot');
10
9
  var jsxRuntime = require('react/jsx-runtime');
10
+ var lucideReact = require('lucide-react');
11
11
  var sonner = require('sonner');
12
12
  var classVarianceAuthority = require('class-variance-authority');
13
13
 
@@ -908,11 +908,11 @@ var Toaster = ({ theme = "system", ...props }) => {
908
908
  {
909
909
  className: "group",
910
910
  icons: {
911
- success: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.CircleCheck, { className: "size-4" }),
912
- info: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.Info, { className: "size-4" }),
913
- warning: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.TriangleAlert, { className: "size-4" }),
914
- error: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.OctagonX, { className: "size-4" }),
915
- loading: /* @__PURE__ */ jsxRuntime.jsx(chunkMQMHXDRJ_cjs.Spinner, {})
911
+ success: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { className: "size-4" }),
912
+ info: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "size-4" }),
913
+ warning: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlertIcon, { className: "size-4" }),
914
+ error: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.OctagonXIcon, { className: "size-4" }),
915
+ loading: /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, {})
916
916
  },
917
917
  toastOptions: {
918
918
  classNames: {
@@ -1019,21 +1019,21 @@ function ButtonContent({
1019
1019
  ...props
1020
1020
  }) {
1021
1021
  const isStartLoading = loading && loadingPosition === "start";
1022
- const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMQMHXDRJ_cjs.Spinner, { "aria-label": "Loading" }) : startIcon || null;
1022
+ const StartIcon = isStartLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : startIcon || null;
1023
1023
  const isEndLoading = loading && loadingPosition === "end";
1024
- const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMQMHXDRJ_cjs.Spinner, { "aria-label": "Loading" }) : endIcon || null;
1024
+ const EndIcon = isEndLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : endIcon || null;
1025
1025
  const isCenterLoading = loading && loadingPosition === "center";
1026
1026
  return asChild && React5__namespace.isValidElement(children) ? React5__namespace.cloneElement(
1027
1027
  children,
1028
1028
  props,
1029
1029
  /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
1030
1030
  StartIcon,
1031
- isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMQMHXDRJ_cjs.Spinner, { "aria-label": "Loading" }) : React5__namespace.isValidElement(children) ? children.props?.children : null,
1031
+ isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : React5__namespace.isValidElement(children) ? children.props?.children : null,
1032
1032
  EndIcon
1033
1033
  ] })
1034
1034
  ) : /* @__PURE__ */ jsxRuntime.jsxs(React5__namespace.Fragment, { children: [
1035
1035
  StartIcon,
1036
- isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkMQMHXDRJ_cjs.Spinner, { "aria-label": "Loading" }) : children,
1036
+ isCenterLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunk3WSQRFUY_cjs.Spinner, { "aria-label": "Loading" }) : children,
1037
1037
  EndIcon
1038
1038
  ] });
1039
1039
  }
@@ -1,6 +1,6 @@
1
- import { X } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
3
2
  import { Dialog } from 'radix-ui';
3
+ import { X } from 'lucide-react';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
@@ -1,5 +1,5 @@
1
- import { ChevronDown, ChevronUp, Check } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
2
+ import { ChevronDownIcon, ChevronUpIcon, CheckIcon } from 'lucide-react';
3
3
  import { Select as Select$1 } from 'radix-ui';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
5
5
 
@@ -61,7 +61,7 @@ function Select({
61
61
  ...triggerProps,
62
62
  children: [
63
63
  /* @__PURE__ */ jsx(Select$1.Value, { "data-slot": "select-value", placeholder }),
64
- /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" }) })
64
+ /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
65
65
  ]
66
66
  }
67
67
  ),
@@ -112,7 +112,7 @@ function SelectScrollUpButton({ className, ...props }) {
112
112
  "data-slot": "select-scroll-up-button",
113
113
  className: cn("flex cursor-default items-center justify-center py-1", className),
114
114
  ...props,
115
- children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" })
115
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
116
116
  }
117
117
  );
118
118
  }
@@ -126,7 +126,7 @@ function SelectScrollDownButton({
126
126
  "data-slot": "select-scroll-down-button",
127
127
  className: cn("flex cursor-default items-center justify-center py-1", className),
128
128
  ...props,
129
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
129
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
130
130
  }
131
131
  );
132
132
  }
@@ -146,7 +146,7 @@ function SelectItem({ className, children, ...props }) {
146
146
  ),
147
147
  ...props,
148
148
  children: [
149
- /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) }) }),
149
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
150
150
  /* @__PURE__ */ jsx(Select$1.ItemText, { children })
151
151
  ]
152
152
  }
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
5
4
  var radixUi = require('radix-ui');
5
+ var lucideReact = require('lucide-react');
6
6
  var classVarianceAuthority = require('class-variance-authority');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
 
@@ -31,7 +31,7 @@ function SheetContent({ side = "right", className, children, ...props }) {
31
31
  /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Content, { className: chunkH2BWO3SI_cjs.cn(sheetContentStyles({ side }), className), ...props, children: [
32
32
  children,
33
33
  /* @__PURE__ */ jsxRuntime.jsxs(radixUi.Dialog.Close, { className: "focus:ring-ring ring-primary-500 ring-offset-app-foreground data-[state=open]:bg-app-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
34
- /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.X, { className: "size-4" }),
34
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" }),
35
35
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
36
36
  ] })
37
37
  ] })
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var lucideReact = require('lucide-react');
5
5
  var radixUi = require('radix-ui');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
 
@@ -24,7 +24,7 @@ function Checkbox({ className, ...props }) {
24
24
  {
25
25
  "data-slot": "checkbox-indicator",
26
26
  className: "grid place-content-center text-current transition-none",
27
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.Check, { className: "size-3.5" })
27
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
28
28
  }
29
29
  )
30
30
  }
@@ -1,5 +1,5 @@
1
- import { LoaderCircle } from './chunk-IARCTYJ3.js';
2
1
  import { cn } from './chunk-ZD2QRAOX.js';
2
+ import { LoaderCircle } from 'lucide-react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  function Spinner({ className, ...props }) {
@@ -1,11 +1,11 @@
1
1
  import { useDirection, useComposedRefs } from './chunk-WXZE35FK.js';
2
- import { Spinner } from './chunk-6FFAE6UY.js';
2
+ import { Spinner } from './chunk-P5IUC7HJ.js';
3
3
  import { useLazyRef, useIsomorphicLayoutEffect } from './chunk-SB5UG7OC.js';
4
- import { OctagonX, TriangleAlert, Info, CircleCheck } from './chunk-IARCTYJ3.js';
5
4
  import { cn } from './chunk-ZD2QRAOX.js';
6
5
  import * as React5 from 'react';
7
6
  import { Slot } from '@radix-ui/react-slot';
8
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
+ import { OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon } from 'lucide-react';
9
9
  import { Toaster as Toaster$1 } from 'sonner';
10
10
  export { toast } from 'sonner';
11
11
  import { cva } from 'class-variance-authority';
@@ -887,10 +887,10 @@ var Toaster = ({ theme = "system", ...props }) => {
887
887
  {
888
888
  className: "group",
889
889
  icons: {
890
- success: /* @__PURE__ */ jsx(CircleCheck, { className: "size-4" }),
891
- info: /* @__PURE__ */ jsx(Info, { className: "size-4" }),
892
- warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "size-4" }),
893
- error: /* @__PURE__ */ jsx(OctagonX, { className: "size-4" }),
890
+ success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
891
+ info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
892
+ warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" }),
893
+ error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
894
894
  loading: /* @__PURE__ */ jsx(Spinner, {})
895
895
  },
896
896
  toastOptions: {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
5
4
  var radixUi = require('radix-ui');
6
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var lucideReact = require('lucide-react');
7
7
  var tailwindMerge = require('tailwind-merge');
8
8
  var classVarianceAuthority = require('class-variance-authority');
9
9
 
@@ -68,7 +68,7 @@ function DialogContent({
68
68
  "data-slot": "dialog-close",
69
69
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
70
70
  children: [
71
- /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.X, {}),
71
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
72
72
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
73
73
  ]
74
74
  }
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
5
4
  var radixUi = require('radix-ui');
6
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var lucideReact = require('lucide-react');
7
7
 
8
8
  function Accordion({ ...props }) {
9
9
  return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Root, { "data-slot": "accordion", ...props });
@@ -31,7 +31,7 @@ function AccordionTrigger({ className, children, ...props }) {
31
31
  ...props,
32
32
  children: [
33
33
  children,
34
- /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.ChevronDown, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
34
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })
35
35
  ]
36
36
  }
37
37
  ) });
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
5
4
  var radixUi = require('radix-ui');
6
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var lucideReact = require('lucide-react');
7
7
 
8
8
  function RadioGroup({ className, ...props }) {
9
9
  return /* @__PURE__ */ jsxRuntime.jsx(radixUi.RadioGroup.Root, { "data-slot": "radio-group", className: chunkH2BWO3SI_cjs.cn("grid gap-3", className), ...props });
@@ -26,7 +26,7 @@ function RadioGroupItem({ className, ...props }) {
26
26
  {
27
27
  "data-slot": "radio-group-indicator",
28
28
  className: "relative flex items-center justify-center",
29
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
29
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
30
30
  }
31
31
  )
32
32
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkDAUTZWFD_cjs = require('./chunk-DAUTZWFD.cjs');
4
3
  var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
4
+ var lucideReact = require('lucide-react');
5
5
  var radixUi = require('radix-ui');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
 
@@ -63,7 +63,7 @@ function Select({
63
63
  ...triggerProps,
64
64
  children: [
65
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(chunkDAUTZWFD_cjs.ChevronDown, { className: "size-4 opacity-50" }) })
66
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4 opacity-50" }) })
67
67
  ]
68
68
  }
69
69
  ),
@@ -114,7 +114,7 @@ function SelectScrollUpButton({ className, ...props }) {
114
114
  "data-slot": "select-scroll-up-button",
115
115
  className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
116
116
  ...props,
117
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.ChevronUp, { className: "size-4" })
117
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
118
118
  }
119
119
  );
120
120
  }
@@ -128,7 +128,7 @@ function SelectScrollDownButton({
128
128
  "data-slot": "select-scroll-down-button",
129
129
  className: chunkH2BWO3SI_cjs.cn("flex cursor-default items-center justify-center py-1", className),
130
130
  ...props,
131
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkDAUTZWFD_cjs.ChevronDown, { className: "size-4" })
131
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
132
132
  }
133
133
  );
134
134
  }
@@ -148,7 +148,7 @@ function SelectItem({ className, children, ...props }) {
148
148
  ),
149
149
  ...props,
150
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(chunkDAUTZWFD_cjs.Check, { className: "size-4" }) }) }),
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
152
  /* @__PURE__ */ jsxRuntime.jsx(radixUi.Select.ItemText, { children })
153
153
  ]
154
154
  }
@@ -1,24 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunkPKUVRULS_cjs = require('../../chunk-PKUVRULS.cjs');
4
- require('../../chunk-DAUTZWFD.cjs');
3
+ var chunkX3ZT3KGX_cjs = require('../../chunk-X3ZT3KGX.cjs');
5
4
  require('../../chunk-H2BWO3SI.cjs');
6
5
 
7
6
 
8
7
 
9
8
  Object.defineProperty(exports, "Accordion", {
10
9
  enumerable: true,
11
- get: function () { return chunkPKUVRULS_cjs.Accordion; }
10
+ get: function () { return chunkX3ZT3KGX_cjs.Accordion; }
12
11
  });
13
12
  Object.defineProperty(exports, "AccordionContent", {
14
13
  enumerable: true,
15
- get: function () { return chunkPKUVRULS_cjs.AccordionContent; }
14
+ get: function () { return chunkX3ZT3KGX_cjs.AccordionContent; }
16
15
  });
17
16
  Object.defineProperty(exports, "AccordionItem", {
18
17
  enumerable: true,
19
- get: function () { return chunkPKUVRULS_cjs.AccordionItem; }
18
+ get: function () { return chunkX3ZT3KGX_cjs.AccordionItem; }
20
19
  });
21
20
  Object.defineProperty(exports, "AccordionTrigger", {
22
21
  enumerable: true,
23
- get: function () { return chunkPKUVRULS_cjs.AccordionTrigger; }
22
+ get: function () { return chunkX3ZT3KGX_cjs.AccordionTrigger; }
24
23
  });
@@ -1,3 +1,2 @@
1
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../../chunk-A6ZWTZMQ.js';
2
- import '../../chunk-IARCTYJ3.js';
1
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../../chunk-B7RHEMZH.js';
3
2
  import '../../chunk-ZD2QRAOX.js';
@@ -0,0 +1,182 @@
1
+ 'use strict';
2
+
3
+ var chunkXIQUR62A_cjs = require('../../chunk-XIQUR62A.cjs');
4
+ var chunkH2BWO3SI_cjs = require('../../chunk-H2BWO3SI.cjs');
5
+ var React = require('react');
6
+ var radixUi = require('radix-ui');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ function BadgeOverflow(props) {
30
+ const {
31
+ items,
32
+ getBadgeLabel: getBadgeLabelProp,
33
+ lineCount = 1,
34
+ renderBadge,
35
+ renderOverflow,
36
+ asChild,
37
+ className,
38
+ style,
39
+ ref,
40
+ ...rootProps
41
+ } = props;
42
+ const getBadgeLabel = React__namespace.useCallback(
43
+ (item) => {
44
+ if (typeof item === "object" && !getBadgeLabelProp) {
45
+ throw new Error("`getBadgeLabel` is required when using array of objects");
46
+ }
47
+ return getBadgeLabelProp ? getBadgeLabelProp(item) : item;
48
+ },
49
+ [getBadgeLabelProp]
50
+ );
51
+ const rootRef = React__namespace.useRef(null);
52
+ const composedRef = chunkXIQUR62A_cjs.useComposedRefs(ref, rootRef);
53
+ const measureRef = React__namespace.useRef(null);
54
+ const [containerWidth, setContainerWidth] = React__namespace.useState(0);
55
+ const [badgeGap, setBadgeGap] = React__namespace.useState(4);
56
+ const [badgeHeight, setBadgeHeight] = React__namespace.useState(20);
57
+ const [overflowBadgeWidth, setOverflowBadgeWidth] = React__namespace.useState(40);
58
+ const [isMeasured, setIsMeasured] = React__namespace.useState(false);
59
+ const [badgeWidths, setBadgeWidths] = React__namespace.useState(/* @__PURE__ */ new Map());
60
+ React__namespace.useLayoutEffect(() => {
61
+ if (!rootRef.current || !measureRef.current) return;
62
+ function measureContainer() {
63
+ if (!rootRef.current || !measureRef.current) return;
64
+ const computedStyle = getComputedStyle(rootRef.current);
65
+ const gapValue = computedStyle.gap;
66
+ const gap = gapValue ? parseFloat(gapValue) : 4;
67
+ setBadgeGap(gap);
68
+ const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
69
+ const paddingRight = parseFloat(computedStyle.paddingRight) || 0;
70
+ const totalPadding = paddingLeft + paddingRight;
71
+ const widthMap = /* @__PURE__ */ new Map();
72
+ const measureChildren = measureRef.current.children;
73
+ for (let i = 0; i < items.length; i++) {
74
+ const child = measureChildren[i];
75
+ if (child) {
76
+ const label = getBadgeLabel(items[i]);
77
+ widthMap.set(label, child.offsetWidth);
78
+ }
79
+ }
80
+ setBadgeWidths(widthMap);
81
+ const firstBadge = measureChildren[0];
82
+ if (firstBadge) {
83
+ setBadgeHeight(firstBadge.offsetHeight || 20);
84
+ }
85
+ const overflowChild = measureChildren[items.length];
86
+ if (overflowChild) {
87
+ setOverflowBadgeWidth(overflowChild.offsetWidth || 40);
88
+ }
89
+ const width = rootRef.current.clientWidth - totalPadding;
90
+ setContainerWidth(width);
91
+ setIsMeasured(true);
92
+ }
93
+ measureContainer();
94
+ const resizeObserver = new ResizeObserver(measureContainer);
95
+ resizeObserver.observe(rootRef.current);
96
+ return () => {
97
+ resizeObserver.disconnect();
98
+ };
99
+ }, [items, getBadgeLabel]);
100
+ const placeholderHeight = React__namespace.useMemo(
101
+ () => badgeHeight * lineCount + badgeGap * (lineCount - 1),
102
+ [badgeHeight, badgeGap, lineCount]
103
+ );
104
+ const { visibleItems, hiddenCount } = React__namespace.useMemo(() => {
105
+ if (!containerWidth || items.length === 0 || badgeWidths.size === 0) {
106
+ return { visibleItems: items, hiddenCount: 0 };
107
+ }
108
+ let currentLineWidth = 0;
109
+ let currentLine = 1;
110
+ const visible = [];
111
+ for (let i = 0; i < items.length; i++) {
112
+ const item = items[i];
113
+ if (!item) continue;
114
+ const label = getBadgeLabel(item);
115
+ const badgeWidth = badgeWidths.get(label);
116
+ if (!badgeWidth) {
117
+ continue;
118
+ }
119
+ const widthWithGap = badgeWidth + badgeGap;
120
+ const isLastLine = currentLine === lineCount;
121
+ const hasMoreItems = i < items.length - 1;
122
+ const availableWidth = isLastLine && hasMoreItems ? containerWidth - overflowBadgeWidth - badgeGap : containerWidth;
123
+ if (currentLineWidth + widthWithGap <= availableWidth) {
124
+ currentLineWidth += widthWithGap;
125
+ visible.push(item);
126
+ } else if (currentLine < lineCount) {
127
+ currentLine++;
128
+ currentLineWidth = widthWithGap;
129
+ visible.push(item);
130
+ } else {
131
+ break;
132
+ }
133
+ }
134
+ return {
135
+ visibleItems: visible,
136
+ hiddenCount: Math.max(0, items.length - visible.length)
137
+ };
138
+ }, [items, getBadgeLabel, containerWidth, lineCount, badgeGap, overflowBadgeWidth, badgeWidths]);
139
+ const Component = asChild ? radixUi.Slot.Slot : "div";
140
+ return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
141
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: measureRef, className: "pointer-events-none invisible absolute flex flex-wrap", style: { gap: badgeGap }, children: [
142
+ items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Fragment, { children: renderBadge(item, getBadgeLabel(item)) }, index)),
143
+ renderOverflow ? renderOverflow(99) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-5 shrink-0 items-center rounded-md border px-1.5 text-xs font-semibold", children: "+99" })
144
+ ] }),
145
+ isMeasured ? /* @__PURE__ */ jsxRuntime.jsxs(
146
+ Component,
147
+ {
148
+ "data-slot": "badge-overflow",
149
+ ...rootProps,
150
+ ref: composedRef,
151
+ className: chunkH2BWO3SI_cjs.cn("flex flex-wrap", className),
152
+ style: {
153
+ gap: badgeGap,
154
+ ...style
155
+ },
156
+ children: [
157
+ visibleItems.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Fragment, { children: renderBadge(item, getBadgeLabel(item)) }, index)),
158
+ hiddenCount > 0 && (renderOverflow ? renderOverflow(hiddenCount) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex h-5 shrink-0 items-center rounded-md border px-1.5 text-xs font-semibold", children: [
159
+ "+",
160
+ hiddenCount
161
+ ] }))
162
+ ]
163
+ }
164
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
165
+ Component,
166
+ {
167
+ "data-slot": "badge-overflow",
168
+ ...rootProps,
169
+ ref: composedRef,
170
+ className: chunkH2BWO3SI_cjs.cn("flex flex-wrap", className),
171
+ style: {
172
+ gap: badgeGap,
173
+ minHeight: placeholderHeight,
174
+ ...style
175
+ },
176
+ children: items.slice(0, Math.min(items.length, lineCount * 3 - (lineCount > 1 ? 1 : 0))).map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Fragment, { children: renderBadge(item, getBadgeLabel(item)) }, index))
177
+ }
178
+ )
179
+ ] });
180
+ }
181
+
182
+ exports.BadgeOverflow = BadgeOverflow;
@@ -0,0 +1,21 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface GetBadgeLabel<T> {
5
+ /**
6
+ * Callback that returns a label string for each badge item.
7
+ * Optional for primitive arrays (strings, numbers), required for object arrays.
8
+ * @example getBadgeLabel={(item) => item.name}
9
+ */
10
+ getBadgeLabel: (item: T) => string;
11
+ }
12
+ type BadgeOverflowProps<T = string> = React.ComponentProps<"div"> & (T extends object ? GetBadgeLabel<T> : Partial<GetBadgeLabel<T>>) & {
13
+ items: T[];
14
+ lineCount?: number;
15
+ renderBadge: (item: T, label: string) => React.ReactNode;
16
+ renderOverflow?: (count: number) => React.ReactNode;
17
+ asChild?: boolean;
18
+ };
19
+ declare function BadgeOverflow<T = string>(props: BadgeOverflowProps<T>): react_jsx_runtime.JSX.Element;
20
+
21
+ export { BadgeOverflow, type BadgeOverflowProps };
@@ -0,0 +1,21 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface GetBadgeLabel<T> {
5
+ /**
6
+ * Callback that returns a label string for each badge item.
7
+ * Optional for primitive arrays (strings, numbers), required for object arrays.
8
+ * @example getBadgeLabel={(item) => item.name}
9
+ */
10
+ getBadgeLabel: (item: T) => string;
11
+ }
12
+ type BadgeOverflowProps<T = string> = React.ComponentProps<"div"> & (T extends object ? GetBadgeLabel<T> : Partial<GetBadgeLabel<T>>) & {
13
+ items: T[];
14
+ lineCount?: number;
15
+ renderBadge: (item: T, label: string) => React.ReactNode;
16
+ renderOverflow?: (count: number) => React.ReactNode;
17
+ asChild?: boolean;
18
+ };
19
+ declare function BadgeOverflow<T = string>(props: BadgeOverflowProps<T>): react_jsx_runtime.JSX.Element;
20
+
21
+ export { BadgeOverflow, type BadgeOverflowProps };