impact-nova 0.1.13 → 1.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 (120) hide show
  1. package/dist/components/layout/dashboard-layout.d.ts +21 -6
  2. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
  3. package/dist/components/ui/accordion.js +25 -23
  4. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +32 -21
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  9. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  10. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  11. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  12. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  13. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  14. package/dist/components/ui/alert-dialog.js +45 -40
  15. package/dist/components/ui/alert.d.ts +21 -4
  16. package/dist/components/ui/alert.js +45 -25
  17. package/dist/components/ui/avatar.js +19 -16
  18. package/dist/components/ui/badge.js +8 -1
  19. package/dist/components/ui/breadcrumb.js +1 -0
  20. package/dist/components/ui/button-group.d.ts +1 -1
  21. package/dist/components/ui/button-group.js +27 -32
  22. package/dist/components/ui/button-variants.d.ts +1 -1
  23. package/dist/components/ui/button.d.ts +11 -0
  24. package/dist/components/ui/button.js +11 -9
  25. package/dist/components/ui/calendar.d.ts +14 -2
  26. package/dist/components/ui/calendar.js +443 -376
  27. package/dist/components/ui/card.js +7 -6
  28. package/dist/components/ui/checkbox.js +64 -48
  29. package/dist/components/ui/chips.d.ts +1 -0
  30. package/dist/components/ui/chips.js +27 -19
  31. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  32. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  33. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  34. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  35. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  36. package/dist/components/ui/data-table/data-table.js +21 -20
  37. package/dist/components/ui/date-picker/date-picker.js +93 -93
  38. package/dist/components/ui/date-picker/date-range-picker.js +142 -133
  39. package/dist/components/ui/date-picker/month-picker.js +96 -93
  40. package/dist/components/ui/date-picker/month-range-picker.js +144 -134
  41. package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
  42. package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
  43. package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
  44. package/dist/components/ui/date-picker/week-picker.js +119 -109
  45. package/dist/components/ui/date-picker/week-range-picker.js +170 -147
  46. package/dist/components/ui/dialog.js +15 -6
  47. package/dist/components/ui/drawer.js +16 -13
  48. package/dist/components/ui/dropdown-menu.js +4 -2
  49. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  50. package/dist/components/ui/dynamic-layout.js +18 -15
  51. package/dist/components/ui/empty-container.js +69 -64
  52. package/dist/components/ui/file-upload.js +113 -106
  53. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  54. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  55. package/dist/components/ui/header.js +26 -25
  56. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  57. package/dist/components/ui/hover-card.js +6 -5
  58. package/dist/components/ui/input.d.ts +1 -1
  59. package/dist/components/ui/input.js +79 -68
  60. package/dist/components/ui/loader.d.ts +1 -0
  61. package/dist/components/ui/loader.js +23 -13
  62. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  63. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  64. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  65. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  66. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  67. package/dist/components/ui/nested-list/nested-list.js +182 -189
  68. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  69. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  70. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  71. package/dist/components/ui/popover.js +37 -34
  72. package/dist/components/ui/progress.js +12 -10
  73. package/dist/components/ui/prompt.js +29 -27
  74. package/dist/components/ui/radio-group.js +55 -46
  75. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  76. package/dist/components/ui/select/components/Submenu.js +52 -48
  77. package/dist/components/ui/select/select.js +321 -324
  78. package/dist/components/ui/sheet.js +18 -15
  79. package/dist/components/ui/sidebar.d.ts +2 -2
  80. package/dist/components/ui/sidebar.js +3 -3
  81. package/dist/components/ui/skeleton.d.ts +2 -1
  82. package/dist/components/ui/skeleton.js +12 -11
  83. package/dist/components/ui/slider.js +39 -12
  84. package/dist/components/ui/smart-input.js +44 -39
  85. package/dist/components/ui/stepper.js +33 -29
  86. package/dist/components/ui/switch.js +6 -4
  87. package/dist/components/ui/tabs.js +50 -45
  88. package/dist/components/ui/tag-group.d.ts +2 -1
  89. package/dist/components/ui/tag-group.js +29 -25
  90. package/dist/components/ui/tag.d.ts +1 -0
  91. package/dist/components/ui/tag.js +26 -20
  92. package/dist/components/ui/textarea.js +18 -17
  93. package/dist/components/ui/toast.d.ts +1 -1
  94. package/dist/components/ui/toast.js +47 -41
  95. package/dist/components/ui/toaster.js +42 -42
  96. package/dist/components/ui/tooltip.js +18 -16
  97. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  98. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  99. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  100. package/dist/components/ui/types/select.types.d.ts +0 -1
  101. package/dist/icons/assets/bookmark.svg.js +4 -0
  102. package/dist/icons/assets/bookmark.svg2.js +5 -0
  103. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  104. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  105. package/dist/icons/assets/download.svg.js +4 -0
  106. package/dist/icons/assets/download.svg2.js +5 -0
  107. package/dist/icons/index.d.ts +20 -6
  108. package/dist/icons/index.js +398 -370
  109. package/dist/impact-nova.css +1 -1
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.js +318 -314
  112. package/dist/lib/fiscal-calendar.d.ts +62 -0
  113. package/dist/lib/fiscal-calendar.js +99 -0
  114. package/dist/lib/utils.d.ts +2 -1
  115. package/dist/lib/utils.js +29 -13
  116. package/package.json +5 -5
  117. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  118. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  119. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  120. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,4 +1,4 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
3
  import * as o from "@radix-ui/react-dialog";
4
4
  import { cva as x } from "class-variance-authority";
@@ -12,7 +12,7 @@ const p = n.createContext({
12
12
  o.Overlay,
13
13
  {
14
14
  className: i(
15
- "fixed inset-0 z-[99] bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15
+ "fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
16
16
  e
17
17
  ),
18
18
  ...t,
@@ -21,7 +21,7 @@ const p = n.createContext({
21
21
  ));
22
22
  f.displayName = o.Overlay.displayName;
23
23
  const w = x(
24
- "fixed z-[100] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
24
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
25
25
  {
26
26
  variants: {
27
27
  side: {
@@ -35,20 +35,21 @@ const w = x(
35
35
  side: "right"
36
36
  }
37
37
  }
38
- ), C = n.forwardRef(({ side: e = "right", className: t, children: s, expandable: d = !1, ...c }, m) => {
39
- const [l, h] = n.useState(!1), u = n.useCallback(() => {
38
+ ), C = n.forwardRef(({ side: e = "right", className: t, children: s, expandable: l = !1, ...c }, m) => {
39
+ const [r, h] = n.useState(!1), u = n.useCallback(() => {
40
40
  h((g) => !g);
41
41
  }, []);
42
- return /* @__PURE__ */ a(p.Provider, { value: { isExpanded: l, onExpandToggle: u, expandable: d, side: e || void 0 }, children: /* @__PURE__ */ r(S, { children: [
42
+ return /* @__PURE__ */ a(p.Provider, { value: { isExpanded: r, onExpandToggle: u, expandable: l, side: e || void 0 }, children: /* @__PURE__ */ d(S, { children: [
43
43
  /* @__PURE__ */ a(f, {}),
44
44
  /* @__PURE__ */ a(
45
45
  o.Content,
46
46
  {
47
47
  ref: m,
48
+ "data-component": "sheet-content",
48
49
  className: i(
49
50
  w({ side: e }),
50
51
  "flex flex-col p-0 transition-all duration-300",
51
- e === "bottom" && (l ? "h-[96vh]" : "h-[40vh]"),
52
+ e === "bottom" && (r ? "h-[96vh]" : "h-[40vh]"),
52
53
  t
53
54
  ),
54
55
  ...c,
@@ -63,32 +64,33 @@ const k = ({
63
64
  children: t,
64
65
  ...s
65
66
  }) => {
66
- const { isExpanded: d, onExpandToggle: c, expandable: m, side: l } = n.useContext(p);
67
- return /* @__PURE__ */ r(
67
+ const { isExpanded: l, onExpandToggle: c, expandable: m, side: r } = n.useContext(p);
68
+ return /* @__PURE__ */ d(
68
69
  "div",
69
70
  {
70
71
  className: i(
71
72
  "flex px-4 py-4 shrink-0 items-center justify-between bg-light-blue border-b",
72
- l === "bottom" && "rounded-t-lg",
73
+ r === "bottom" && "rounded-t-lg",
73
74
  e
74
75
  ),
75
76
  ...s,
76
77
  children: [
77
78
  /* @__PURE__ */ a("div", { className: "flex flex-col space-y-1 text-center sm:text-left", children: t }),
78
- /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
79
- m && /* @__PURE__ */ r(
79
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
80
+ m && /* @__PURE__ */ d(
80
81
  "button",
81
82
  {
82
83
  type: "button",
84
+ "data-component": "sheet-expand-toggle",
83
85
  onClick: c,
84
86
  className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none",
85
87
  children: [
86
- d ? /* @__PURE__ */ a(y, { className: "h-4 w-4" }) : /* @__PURE__ */ a(b, { className: "h-4 w-4" }),
87
- /* @__PURE__ */ a("span", { className: "sr-only", children: d ? "Collapse" : "Expand" })
88
+ l ? /* @__PURE__ */ a(y, { className: "h-4 w-4" }) : /* @__PURE__ */ a(b, { className: "h-4 w-4" }),
89
+ /* @__PURE__ */ a("span", { className: "sr-only", children: l ? "Collapse" : "Expand" })
88
90
  ]
89
91
  }
90
92
  ),
91
- /* @__PURE__ */ r(v, { className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
93
+ /* @__PURE__ */ d(v, { "data-component": "sheet-close", className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
92
94
  /* @__PURE__ */ a(N, { className: "h-4 w-4" }),
93
95
  /* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
94
96
  ] })
@@ -128,6 +130,7 @@ const R = n.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a(
128
130
  o.Title,
129
131
  {
130
132
  ref: s,
133
+ "data-component": "sheet-title",
131
134
  className: i("text-sm font-bold leading-none tracking-tight", e),
132
135
  ...t
133
136
  }
@@ -68,7 +68,7 @@ declare const SidebarMenuButton: React.ForwardRefExoticComponent<Omit<React.Clas
68
68
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
69
69
  } & VariantProps<(props?: {
70
70
  variant?: "default" | "outline";
71
- size?: "default" | "sm" | "lg";
71
+ size?: "sm" | "lg" | "default";
72
72
  } & import('class-variance-authority/types').ClassProp) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
73
73
  declare const SidebarLogout: React.ForwardRefExoticComponent<Omit<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
74
74
  asChild?: boolean;
@@ -76,7 +76,7 @@ declare const SidebarLogout: React.ForwardRefExoticComponent<Omit<Omit<React.Cla
76
76
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
77
77
  } & VariantProps<(props?: {
78
78
  variant?: "default" | "outline";
79
- size?: "default" | "sm" | "lg";
79
+ size?: "sm" | "lg" | "default";
80
80
  } & import('class-variance-authority/types').ClassProp) => string>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
81
81
  declare const SidebarMenuAction: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
82
82
  asChild?: boolean;
@@ -153,7 +153,7 @@ const ee = i.forwardRef(({ className: a, onClick: r, ...e }, n) => {
153
153
  },
154
154
  ...e,
155
155
  children: [
156
- d === "expanded" ? /* @__PURE__ */ t(H, { size: 40 }) : /* @__PURE__ */ t(j, { size: 40 }),
156
+ d === "expanded" ? /* @__PURE__ */ t(H, { size: "3xl" }) : /* @__PURE__ */ t(j, { size: "3xl" }),
157
157
  /* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
158
158
  ]
159
159
  }
@@ -313,7 +313,7 @@ const de = i.forwardRef(({ className: a, routes: r, activeValue: e, isActive: n,
313
313
  ref: v,
314
314
  "data-sidebar": "content",
315
315
  className: l(
316
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
316
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",
317
317
  a
318
318
  ),
319
319
  ...b,
@@ -392,7 +392,7 @@ const B = i.forwardRef(({ className: a, children: r, ...e }, n) => {
392
392
  /* @__PURE__ */ t("div", { className: "text-[#3bb273]", children: /* @__PURE__ */ t(
393
393
  I,
394
394
  {
395
- size: 20,
395
+ size: "lg",
396
396
  className: l("transition-transform duration-200", d ? "-rotate-90" : "rotate-90")
397
397
  }
398
398
  ) }),
@@ -1,2 +1,3 @@
1
- declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
1
+ import * as React from "react";
2
+ declare const Skeleton: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
2
3
  export { Skeleton };
@@ -1,17 +1,18 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { cn as o } from "../../lib/utils.js";
3
- function i({
4
- className: r,
5
- ...e
6
- }) {
7
- return /* @__PURE__ */ m(
2
+ import * as r from "react";
3
+ import { cn as t } from "../../lib/utils.js";
4
+ const n = r.forwardRef(
5
+ ({ className: e, ...o }, a) => /* @__PURE__ */ m(
8
6
  "div",
9
7
  {
10
- className: o("animate-pulse rounded-md bg-primary/10", r),
11
- ...e
8
+ ref: a,
9
+ "data-component": "skeleton",
10
+ className: t("animate-pulse rounded-md bg-primary/10", e),
11
+ ...o
12
12
  }
13
- );
14
- }
13
+ )
14
+ );
15
+ n.displayName = "Skeleton";
15
16
  export {
16
- i as Skeleton
17
+ n as Skeleton
17
18
  };
@@ -1,23 +1,50 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import * as s from "react";
3
3
  import * as e from "@radix-ui/react-slider";
4
- import { cn as n } from "../../lib/utils.js";
5
- const t = a.forwardRef(({ className: o, ...i }, l) => /* @__PURE__ */ s(
4
+ import { cn as t } from "../../lib/utils.js";
5
+ const d = s.forwardRef(({ className: a, ...o }, i) => /* @__PURE__ */ n(
6
6
  e.Root,
7
7
  {
8
- ref: l,
9
- className: n(
8
+ ref: i,
9
+ className: t(
10
10
  "relative flex w-full touch-none select-none items-center",
11
- o
11
+ a
12
12
  ),
13
- ...i,
13
+ "data-component": "slider-root",
14
+ ...o,
14
15
  children: [
15
- /* @__PURE__ */ r(e.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ r(e.Range, { className: "absolute h-full bg-primary" }) }),
16
- /* @__PURE__ */ r(e.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
16
+ /* @__PURE__ */ r(
17
+ e.Track,
18
+ {
19
+ className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",
20
+ "data-component": "slider-track",
21
+ children: /* @__PURE__ */ r(
22
+ e.Range,
23
+ {
24
+ className: "absolute h-full bg-primary",
25
+ "data-component": "slider-range"
26
+ }
27
+ )
28
+ }
29
+ ),
30
+ Array.isArray(o.value || o.defaultValue) ? (o.value || o.defaultValue || []).map((c, l) => /* @__PURE__ */ r(
31
+ e.Thumb,
32
+ {
33
+ className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
34
+ "data-component": "slider-thumb"
35
+ },
36
+ l
37
+ )) : /* @__PURE__ */ r(
38
+ e.Thumb,
39
+ {
40
+ className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
41
+ "data-component": "slider-thumb"
42
+ }
43
+ )
17
44
  ]
18
45
  }
19
46
  ));
20
- t.displayName = e.Root.displayName;
47
+ d.displayName = e.Root.displayName;
21
48
  export {
22
- t as Slider
49
+ d as Slider
23
50
  };
@@ -4,26 +4,26 @@ import { Input as Y } from "./input.js";
4
4
  const re = ({
5
5
  value: D = "",
6
6
  onChange: V,
7
- onBlur: y,
7
+ onBlur: P,
8
8
  onFocus: W,
9
- isNumeric: f = !1,
9
+ isNumeric: l = !1,
10
10
  allowNegative: g = !0,
11
11
  min: s,
12
12
  max: u,
13
13
  min_operator: I = ">=",
14
- max_operator: w = "<=",
15
- maxIntegerDigits: S,
16
- decimalPlaces: c,
14
+ max_operator: v = "<=",
15
+ maxIntegerDigits: w,
16
+ decimalPlaces: f,
17
17
  enforceDecimal: z = !1,
18
18
  allowDecimal: C = !0,
19
- maxLength: l,
19
+ maxLength: a,
20
20
  trimLeadingSpaces: M = !0,
21
- customValidator: P,
21
+ customValidator: y,
22
22
  onValidationError: h,
23
23
  disabled: p = !1,
24
24
  ...F
25
25
  }) => {
26
- const [a, $] = Q(String(D ?? "")), K = U(null);
26
+ const [c, $] = Q(String(D ?? "")), K = U(null);
27
27
  X(() => {
28
28
  $(String(D ?? ""));
29
29
  }, [D]);
@@ -43,7 +43,7 @@ const re = ({
43
43
  }
44
44
  }, j = (t) => {
45
45
  if (u === void 0) return !0;
46
- switch (w) {
46
+ switch (v) {
47
47
  case ">":
48
48
  return t > u;
49
49
  case ">=":
@@ -62,7 +62,7 @@ const re = ({
62
62
  e = Math.max(e, r);
63
63
  }
64
64
  if (u !== void 0) {
65
- const r = w === "<" ? u - 0.01 : u;
65
+ const r = v === "<" ? u - 0.01 : u;
66
66
  e = Math.min(e, r);
67
67
  }
68
68
  return e;
@@ -81,67 +81,67 @@ const re = ({
81
81
  return t.replace("-", "");
82
82
  return t;
83
83
  }, q = (t) => {
84
- if (c === void 0 || !t.includes(".")) return t;
84
+ if (f === void 0 || !t.includes(".")) return t;
85
85
  const [e, r] = t.split(".");
86
- return r && r.length > c ? `${e}.${r.slice(0, c)}` : t;
86
+ return r && r.length > f ? `${e}.${r.slice(0, f)}` : t;
87
87
  }, A = (t) => {
88
- if (S === void 0) return t;
88
+ if (w === void 0) return t;
89
89
  const [e, r] = t.split("."), n = e.replace("-", "");
90
- if (n.length > S) {
91
- const o = n.slice(0, S), d = e.startsWith("-") ? "-" : "";
92
- return r !== void 0 ? `${d}${o}.${r}` : `${d}${o}`;
90
+ if (n.length > w) {
91
+ const i = n.slice(0, w), d = e.startsWith("-") ? "-" : "";
92
+ return r !== void 0 ? `${d}${i}.${r}` : `${d}${i}`;
93
93
  }
94
94
  return t;
95
- }, v = (t) => {
96
- if (!f) return t;
95
+ }, S = (t) => {
96
+ if (!l) return t;
97
97
  let e = String(t ?? "");
98
98
  return M && (e = e.replace(/^\s+/, "")), e = R(e), e = O(e), e = T(e, t), e = q(e), e = A(e), C || (e = e.replace(".", "")), e;
99
99
  }, E = (t) => {
100
- if (!f || !t || t === "-") return t;
100
+ if (!l || !t || t === "-") return t;
101
101
  let e = t;
102
102
  const r = parseFloat(e);
103
103
  if (isNaN(r)) return "";
104
104
  const n = k(r);
105
- if (z && c !== void 0)
106
- e = n.toFixed(c);
107
- else if (c !== void 0 && e.includes(".")) {
108
- const [o, d = ""] = e.split("."), B = d.padEnd(c, "0");
109
- e = `${o}.${B}`;
105
+ if (z && f !== void 0)
106
+ e = n.toFixed(f);
107
+ else if (f !== void 0 && e.includes(".")) {
108
+ const [i, d = ""] = e.split("."), B = d.padEnd(f, "0");
109
+ e = `${i}.${B}`;
110
110
  } else
111
111
  e = String(n);
112
112
  return e;
113
113
  }, G = (t) => {
114
114
  if (!t) return !0;
115
- if (P && !P(t))
115
+ if (y && !y(t))
116
116
  return h?.("Custom validation failed"), !1;
117
- if (f) {
117
+ if (l) {
118
118
  const e = parseFloat(t);
119
119
  if (isNaN(e))
120
120
  return h?.("Invalid number"), !1;
121
121
  if (!b(e))
122
122
  return h?.(`Value must be ${I} ${s}`), !1;
123
123
  if (!j(e))
124
- return h?.(`Value must be ${w} ${u}`), !1;
124
+ return h?.(`Value must be ${v} ${u}`), !1;
125
125
  }
126
- return l && t.length > l ? (h?.(`Maximum length is ${l}`), !1) : !0;
126
+ return a && t.length > a ? (h?.(`Maximum length is ${a}`), !1) : !0;
127
127
  };
128
128
  return /* @__PURE__ */ J(
129
129
  Y,
130
130
  {
131
131
  ...F,
132
- value: a,
132
+ value: c,
133
133
  onChange: (t) => {
134
134
  if (p) return;
135
135
  let r = t.target.value;
136
- f ? r = v(r) : M && (r = r.replace(/^\s+/, "")), l && r.length > l && (r = r.slice(0, l)), $(r), V?.(r, t);
136
+ l ? r = S(r) : M && (r = r.replace(/^\s+/, "")), a && r.length > a && (r = r.slice(0, a)), $(r), V?.(r, t);
137
137
  },
138
138
  onBlur: (t) => {
139
- let e = a;
140
- f && e && (e = E(e), G(e) && ($(e), e !== a && V?.(e))), y?.(t);
139
+ let e = c;
140
+ l && e && (e = E(e), G(e) && ($(e), e !== c && V?.(e))), P?.(t);
141
141
  },
142
142
  onFocus: W,
143
143
  onKeyDown: (t) => {
144
- if (p || !f) return;
144
+ if (p || !l) return;
145
145
  const e = t.key;
146
146
  if (e === "e" || e === "E") {
147
147
  t.preventDefault();
@@ -151,11 +151,11 @@ const re = ({
151
151
  t.preventDefault();
152
152
  return;
153
153
  }
154
- if (e === "-" && a.includes("-")) {
154
+ if (e === "-" && c.includes("-")) {
155
155
  t.preventDefault();
156
156
  return;
157
157
  }
158
- if (e === "." && (!C || a.includes("."))) {
158
+ if (e === "." && (!C || c.includes("."))) {
159
159
  t.preventDefault();
160
160
  return;
161
161
  }
@@ -163,12 +163,17 @@ const re = ({
163
163
  onPaste: (t) => {
164
164
  if (p) return;
165
165
  t.preventDefault();
166
- const e = t.clipboardData.getData("text"), r = f ? v(e) : e, n = t.target, o = n.selectionStart || 0, d = n.selectionEnd || 0, B = a.slice(0, o), H = a.slice(d);
167
- let i = B + r + H;
168
- f && (i = v(i)), l && i.length > l && (i = i.slice(0, l)), $(i), V?.(i);
166
+ const e = t.clipboardData.getData("text"), r = l ? S(e) : e, n = t.target, i = n.selectionStart || 0, d = n.selectionEnd || 0, B = c.slice(0, i), H = c.slice(d);
167
+ let o = B + r + H;
168
+ l && (o = S(o)), a && o.length > a && (o = o.slice(0, a)), $(o), V?.(o);
169
169
  },
170
170
  disabled: p,
171
- ref: K
171
+ ref: K,
172
+ "data-component": "smart-input",
173
+ "data-numeric": l || void 0,
174
+ "data-decimal-places": f,
175
+ "data-min": s,
176
+ "data-max": u
172
177
  }
173
178
  );
174
179
  };
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
2
  import * as x from "react";
3
- import { cva as d } from "class-variance-authority";
3
+ import { cva as c } from "class-variance-authority";
4
4
  import { Check as w } from "lucide-react";
5
- import { cn as t } from "../../lib/utils.js";
6
- const N = d("flex w-full gap-0", {
5
+ import { cn as a } from "../../lib/utils.js";
6
+ const N = c("flex w-full gap-0", {
7
7
  variants: {
8
8
  orientation: {
9
9
  horizontal: "flex-row items-center",
@@ -13,7 +13,7 @@ const N = d("flex w-full gap-0", {
13
13
  defaultVariants: {
14
14
  orientation: "horizontal"
15
15
  }
16
- }), y = d(
16
+ }), y = c(
17
17
  "relative flex items-center transition-all duration-200",
18
18
  {
19
19
  variants: {
@@ -66,7 +66,7 @@ const N = d("flex w-full gap-0", {
66
66
  status: "default"
67
67
  }
68
68
  }
69
- ), z = d(
69
+ ), z = c(
70
70
  "flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] text-xs font-extrabold transition-all",
71
71
  {
72
72
  variants: {
@@ -81,46 +81,50 @@ const N = d("flex w-full gap-0", {
81
81
  }
82
82
  }
83
83
  ), V = x.forwardRef(
84
- ({ className: u, currentStep: c, steps: f, orientation: r = "horizontal", onStepClick: m, ...h }, v) => /* @__PURE__ */ e(
84
+ ({ className: u, currentStep: f, steps: p, orientation: e = "horizontal", onStepClick: m, ...h }, v) => /* @__PURE__ */ t(
85
85
  "div",
86
86
  {
87
87
  ref: v,
88
- className: t(N({ orientation: r }), u),
88
+ className: a(N({ orientation: e }), u),
89
+ "data-orientation": e,
89
90
  ...h,
90
- children: f.map((i, s) => {
91
- const a = typeof i == "string" ? { label: i } : i, l = s + 1, g = l === c, p = l < c, b = a.disabled, o = p ? "completed" : g ? "active" : "default";
92
- return /* @__PURE__ */ n(x.Fragment, { children: [
93
- /* @__PURE__ */ n(
91
+ children: p.map((l, s) => {
92
+ const o = typeof l == "string" ? { label: l } : l, i = s + 1, g = i === f, b = i < f, n = o.disabled, r = b ? "completed" : g ? "active" : "default";
93
+ return /* @__PURE__ */ d(x.Fragment, { children: [
94
+ /* @__PURE__ */ d(
94
95
  "div",
95
96
  {
96
- onClick: () => !b && m?.(s),
97
- className: t(
98
- y({ orientation: r, status: o }),
99
- r === "horizontal" && "min-w-[140px]",
100
- b ? "opacity-80 cursor-not-allowed" : m ? "cursor-pointer" : "cursor-default"
97
+ onClick: () => !n && m?.(s),
98
+ "data-step": i,
99
+ "data-status": r,
100
+ "data-disabled": n || void 0,
101
+ className: a(
102
+ y({ orientation: e, status: r }),
103
+ e === "horizontal" && "min-w-[140px]",
104
+ n ? "opacity-80 cursor-not-allowed" : m ? "cursor-pointer" : "cursor-default"
101
105
  ),
102
106
  children: [
103
- /* @__PURE__ */ e("div", { className: t(z({ status: o }), "mr-2"), children: p ? /* @__PURE__ */ e(w, { className: "h-4 w-4 stroke-[3px]" }) : /* @__PURE__ */ e("span", { children: a.icon || l }) }),
104
- /* @__PURE__ */ n("div", { className: "flex flex-col justify-center overflow-hidden", children: [
105
- /* @__PURE__ */ e("div", { className: t(
107
+ /* @__PURE__ */ t("div", { className: a(z({ status: r }), "mr-2"), children: b ? /* @__PURE__ */ t(w, { className: "h-4 w-4 stroke-[3px]" }) : /* @__PURE__ */ t("span", { children: o.icon || i }) }),
108
+ /* @__PURE__ */ d("div", { className: "flex flex-col justify-center overflow-hidden", children: [
109
+ /* @__PURE__ */ t("div", { className: a(
106
110
  "text-[14px] leading-tight font-medium truncate max-w-[200px]",
107
- o === "completed" ? "text-[#3bb273]" : "text-foreground",
108
- o === "active" && r === "vertical" ? "text-primary" : ""
109
- ), children: a.label }),
110
- a.description && /* @__PURE__ */ e("div", { className: t(
111
+ r === "completed" ? "text-[#3bb273]" : "text-foreground",
112
+ r === "active" && e === "vertical" ? "text-primary" : ""
113
+ ), children: o.label }),
114
+ o.description && /* @__PURE__ */ t("div", { className: a(
111
115
  "text-[12px] leading-tight mt-0.5 truncate max-w-[200px]",
112
- o === "completed" ? "text-[#3bb273]" : "text-muted-foreground"
113
- ), children: a.description })
116
+ r === "completed" ? "text-[#3bb273]" : "text-muted-foreground"
117
+ ), children: o.description })
114
118
  ] })
115
119
  ]
116
120
  }
117
121
  ),
118
- s < f.length - 1 && /* @__PURE__ */ e(
122
+ s < p.length - 1 && /* @__PURE__ */ t(
119
123
  "div",
120
124
  {
121
- className: t(
125
+ className: a(
122
126
  "border-t border-dashed border-[#d9dde7] transition-colors",
123
- r === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
127
+ e === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
124
128
  )
125
129
  }
126
130
  )
@@ -2,21 +2,23 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import * as e from "@radix-ui/react-switch";
4
4
  import { cn as a } from "../../lib/utils.js";
5
- const c = s.forwardRef(({ className: r, ...o }, i) => /* @__PURE__ */ t(
5
+ const c = s.forwardRef(({ className: o, ...r }, i) => /* @__PURE__ */ t(
6
6
  e.Root,
7
7
  {
8
8
  className: a(
9
9
  "peer inline-flex h-[16px] w-[24px] shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-[#eceefd] data-[state=checked]:border-accordion-bg data-[state=unchecked]:bg-white data-[state=unchecked]:border-light-blue",
10
- r
10
+ o
11
11
  ),
12
- ...o,
12
+ ...r,
13
13
  ref: i,
14
+ "data-component": "switch-root",
14
15
  children: /* @__PURE__ */ t(
15
16
  e.Thumb,
16
17
  {
17
18
  className: a(
18
19
  "pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-[10px] data-[state=unchecked]:translate-x-[2px] data-[state=checked]:bg-primary data-[state=unchecked]:bg-tertiary-border"
19
- )
20
+ ),
21
+ "data-component": "switch-thumb"
20
22
  }
21
23
  )
22
24
  }