impact-nova 0.1.13 → 1.0.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 (115) 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/editors/split-cell-editor.d.ts +5 -0
  5. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
  6. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
  7. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
  8. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
  9. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
  10. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
  11. package/dist/components/ui/alert-dialog.js +45 -40
  12. package/dist/components/ui/alert.d.ts +21 -4
  13. package/dist/components/ui/alert.js +45 -25
  14. package/dist/components/ui/avatar.js +19 -16
  15. package/dist/components/ui/badge.js +8 -1
  16. package/dist/components/ui/breadcrumb.js +1 -0
  17. package/dist/components/ui/button-group.d.ts +1 -1
  18. package/dist/components/ui/button-group.js +27 -32
  19. package/dist/components/ui/button-variants.d.ts +1 -1
  20. package/dist/components/ui/button.d.ts +11 -0
  21. package/dist/components/ui/button.js +11 -9
  22. package/dist/components/ui/calendar.d.ts +14 -2
  23. package/dist/components/ui/calendar.js +443 -376
  24. package/dist/components/ui/card.js +7 -6
  25. package/dist/components/ui/checkbox.js +64 -48
  26. package/dist/components/ui/chips.d.ts +1 -0
  27. package/dist/components/ui/chips.js +27 -19
  28. package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
  29. package/dist/components/ui/data-table/data-table-column-list.js +58 -54
  30. package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
  31. package/dist/components/ui/data-table/data-table-sheet.js +43 -40
  32. package/dist/components/ui/data-table/data-table-view-options.js +17 -17
  33. package/dist/components/ui/data-table/data-table.js +21 -20
  34. package/dist/components/ui/date-picker/date-picker.js +83 -87
  35. package/dist/components/ui/date-picker/date-range-picker.js +129 -125
  36. package/dist/components/ui/date-picker/month-picker.js +90 -93
  37. package/dist/components/ui/date-picker/month-range-picker.js +132 -129
  38. package/dist/components/ui/date-picker/multi-date-picker.js +37 -38
  39. package/dist/components/ui/date-picker/multi-month-picker.js +29 -30
  40. package/dist/components/ui/date-picker/multi-week-picker.js +49 -38
  41. package/dist/components/ui/date-picker/week-picker.js +116 -112
  42. package/dist/components/ui/date-picker/week-range-picker.js +153 -142
  43. package/dist/components/ui/dialog.js +15 -6
  44. package/dist/components/ui/drawer.js +16 -13
  45. package/dist/components/ui/dropdown-menu.js +4 -2
  46. package/dist/components/ui/dynamic-layout.d.ts +2 -2
  47. package/dist/components/ui/dynamic-layout.js +18 -15
  48. package/dist/components/ui/empty-container.js +69 -64
  49. package/dist/components/ui/file-upload.js +113 -106
  50. package/dist/components/ui/filter-panel/filter-panel.js +49 -46
  51. package/dist/components/ui/filter-strip/filter-strip.js +41 -37
  52. package/dist/components/ui/header.js +26 -25
  53. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
  54. package/dist/components/ui/hover-card.js +6 -5
  55. package/dist/components/ui/input.d.ts +1 -1
  56. package/dist/components/ui/input.js +79 -68
  57. package/dist/components/ui/loader.d.ts +1 -0
  58. package/dist/components/ui/loader.js +23 -13
  59. package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
  60. package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
  61. package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
  62. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
  63. package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
  64. package/dist/components/ui/nested-list/nested-list.js +182 -189
  65. package/dist/components/ui/notification-panel/notification-item.js +19 -17
  66. package/dist/components/ui/notification-panel/notification-list.js +21 -21
  67. package/dist/components/ui/notification-panel/notification-panel.js +25 -25
  68. package/dist/components/ui/popover.js +37 -34
  69. package/dist/components/ui/progress.js +12 -10
  70. package/dist/components/ui/prompt.js +29 -27
  71. package/dist/components/ui/radio-group.js +55 -46
  72. package/dist/components/ui/select/components/Submenu.d.ts +1 -2
  73. package/dist/components/ui/select/components/Submenu.js +52 -48
  74. package/dist/components/ui/select/select.js +321 -324
  75. package/dist/components/ui/sheet.js +18 -15
  76. package/dist/components/ui/sidebar.d.ts +2 -2
  77. package/dist/components/ui/sidebar.js +3 -3
  78. package/dist/components/ui/skeleton.d.ts +2 -1
  79. package/dist/components/ui/skeleton.js +12 -11
  80. package/dist/components/ui/slider.js +39 -12
  81. package/dist/components/ui/smart-input.js +44 -39
  82. package/dist/components/ui/stepper.js +33 -29
  83. package/dist/components/ui/switch.js +6 -4
  84. package/dist/components/ui/tabs.js +50 -45
  85. package/dist/components/ui/tag-group.d.ts +2 -1
  86. package/dist/components/ui/tag-group.js +29 -25
  87. package/dist/components/ui/tag.d.ts +1 -0
  88. package/dist/components/ui/tag.js +26 -20
  89. package/dist/components/ui/textarea.js +18 -17
  90. package/dist/components/ui/toast.d.ts +1 -1
  91. package/dist/components/ui/toast.js +47 -41
  92. package/dist/components/ui/toaster.js +42 -42
  93. package/dist/components/ui/tooltip.js +18 -16
  94. package/dist/components/ui/types/date-picker.types.d.ts +33 -0
  95. package/dist/components/ui/types/empty-container.types.d.ts +5 -0
  96. package/dist/components/ui/types/nested-list.types.d.ts +1 -0
  97. package/dist/components/ui/types/select.types.d.ts +0 -1
  98. package/dist/icons/assets/bookmark.svg.js +4 -0
  99. package/dist/icons/assets/bookmark.svg2.js +5 -0
  100. package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
  101. package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
  102. package/dist/icons/assets/download.svg.js +4 -0
  103. package/dist/icons/assets/download.svg2.js +5 -0
  104. package/dist/icons/index.d.ts +20 -6
  105. package/dist/icons/index.js +398 -370
  106. package/dist/impact-nova.css +1 -1
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +318 -314
  109. package/dist/lib/fiscal-calendar.d.ts +62 -0
  110. package/dist/lib/fiscal-calendar.js +99 -0
  111. package/package.json +5 -5
  112. package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
  113. package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
  114. package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
  115. package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
@@ -1,7 +1,7 @@
1
1
  import { jsxs as t, jsx as e, Fragment as j } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { Settings as F, Checkmark as d, Search as T } from "../../../../../icons/index.js";
4
- import { DropdownMenu as L, DropdownMenuTrigger as _, DropdownMenuContent as E, DropdownMenuLabel as z, DropdownMenuSeparator as k, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as s } from "../../../dropdown-menu.js";
4
+ import { DropdownMenu as L, DropdownMenuTrigger as _, DropdownMenuContent as E, DropdownMenuLabel as k, DropdownMenuSeparator as z, DropdownMenuSub as m, DropdownMenuSubTrigger as p, DropdownMenuSubContent as f, DropdownMenuItem as s } from "../../../dropdown-menu.js";
5
5
  const H = ({
6
6
  isOpen: O,
7
7
  onClose: i,
@@ -29,7 +29,7 @@ const H = ({
29
29
  }, A = () => {
30
30
  const n = l?.headerComponentParams;
31
31
  n?.onAdvanceSearchClick ? n.onAdvanceSearchClick(o) : r.getGridOption("context"), i();
32
- }, c = v?.getBoundingClientRect(), N = l?.headerComponentParams, b = N?.isSearchable, y = N?.advanceSearchEnabled;
32
+ }, c = v?.getBoundingClientRect(), b = l?.headerComponentParams, y = b?.isSearchable, N = b?.advanceSearchEnabled;
33
33
  return /* @__PURE__ */ t(L, { open: O, onOpenChange: (n) => !n && i(), children: [
34
34
  c && /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ e(
35
35
  "div",
@@ -51,24 +51,24 @@ const H = ({
51
51
  align: "end",
52
52
  side: "bottom",
53
53
  sideOffset: 5,
54
- className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)] z-[110]",
54
+ className: "w-[200px] p-2 rounded-[8px] border-none !shadow-[0px_0px_2px_0px_rgba(0,0,0,0.25)]",
55
55
  onCloseAutoFocus: (n) => n.preventDefault(),
56
56
  children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5", children: [
57
- /* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
58
- /* @__PURE__ */ e(F, { size: 12 }),
57
+ /* @__PURE__ */ t(k, { className: "flex items-center gap-2 text-[#60697D]", children: [
58
+ /* @__PURE__ */ e(F, { size: "xs" }),
59
59
  " Column Settings"
60
60
  ] }),
61
- /* @__PURE__ */ e(k, {}),
61
+ /* @__PURE__ */ e(z, {}),
62
62
  M && /* @__PURE__ */ t(m, { children: [
63
63
  /* @__PURE__ */ e(p, { inset: !0, children: "Sort" }),
64
- /* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
64
+ /* @__PURE__ */ t(f, { sideOffset: 10, alignOffset: -5, children: [
65
65
  /* @__PURE__ */ e(s, { onClick: () => h("asc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
66
66
  /* @__PURE__ */ e("span", { children: g ? "Sort Smallest to Largest" : w ? "Sort Oldest to Newest" : "Sort A to Z" }),
67
- C === "asc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
67
+ C === "asc" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
68
68
  ] }) }),
69
69
  /* @__PURE__ */ e(s, { onClick: () => h("desc"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
70
70
  /* @__PURE__ */ e("span", { children: g ? "Sort Largest to Smallest" : w ? "Sort Newest to Oldest" : "Sort Z to A" }),
71
- C === "desc" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
71
+ C === "desc" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
72
72
  ] }) }),
73
73
  /* @__PURE__ */ e(s, { onClick: () => h(null), children: /* @__PURE__ */ e("span", { children: "Reset" }) })
74
74
  ] })
@@ -78,11 +78,11 @@ const H = ({
78
78
  /* @__PURE__ */ t(f, { className: "z-[120]", sideOffset: 10, alignOffset: -5, children: [
79
79
  /* @__PURE__ */ e(s, { onClick: () => u("left"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
80
80
  /* @__PURE__ */ e("span", { children: "Pin Left" }),
81
- S === "left" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
81
+ S === "left" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
82
82
  ] }) }),
83
83
  /* @__PURE__ */ e(s, { onClick: () => u("right"), children: /* @__PURE__ */ t("span", { className: "flex items-center w-full justify-between", children: [
84
84
  /* @__PURE__ */ e("span", { children: "Pin Right" }),
85
- S === "right" && /* @__PURE__ */ e(d, { size: 14, className: "ml-2 text-[#60697D]" })
85
+ S === "right" && /* @__PURE__ */ e(d, { size: "sm", className: "ml-2 text-[#60697D]" })
86
86
  ] }) }),
87
87
  /* @__PURE__ */ e(s, { onClick: () => u(null), children: /* @__PURE__ */ e("span", { children: "No Pin" }) })
88
88
  ] })
@@ -94,14 +94,14 @@ const H = ({
94
94
  /* @__PURE__ */ e(s, { onClick: () => D(!0), children: "Autosize All Columns" })
95
95
  ] })
96
96
  ] }),
97
- (b || y) && /* @__PURE__ */ t(j, { children: [
98
- /* @__PURE__ */ e(k, {}),
99
- /* @__PURE__ */ t(z, { className: "flex items-center gap-2 text-[#60697D]", children: [
100
- /* @__PURE__ */ e(T, { size: 12 }),
97
+ (y || N) && /* @__PURE__ */ t(j, { children: [
98
+ /* @__PURE__ */ e(z, {}),
99
+ /* @__PURE__ */ t(k, { className: "flex items-center gap-2 text-[#60697D]", children: [
100
+ /* @__PURE__ */ e(T, { size: "xs" }),
101
101
  " Search Options"
102
102
  ] }),
103
- b && /* @__PURE__ */ e(s, { inset: !0, onClick: P, children: "Search" }),
104
- y && /* @__PURE__ */ e(s, { inset: !0, onClick: A, children: "Advance Search" })
103
+ y && /* @__PURE__ */ e(s, { inset: !0, onClick: P, children: "Search" }),
104
+ N && /* @__PURE__ */ e(s, { inset: !0, onClick: A, children: "Advance Search" })
105
105
  ] })
106
106
  ] })
107
107
  }
@@ -234,7 +234,7 @@ const je = {
234
234
  S(le()), K && K();
235
235
  }, Ne = () => ge ? /* @__PURE__ */ s("svg", { className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6] shrink-0", fill: "currentColor", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", width: "18", height: "18", onClick: (e) => {
236
236
  e.stopPropagation(), R.current && R.current.blur(), V ? V(A) : J ? J(o) : U && U.openAdvancedFilter(o);
237
- }, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ae = () => /* @__PURE__ */ s("button", { onClick: G, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ s(me, { size: 12 }) }), D = a.filter === "agMultiColumnFilter", x = b(a);
237
+ }, children: /* @__PURE__ */ s("path", { d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z" }) }) : null, Ae = () => /* @__PURE__ */ s("button", { onClick: G, className: "cursor-pointer shrink-0 text-[#4259ee] hover:text-[#0f1c76]", children: /* @__PURE__ */ s(me, { size: "xs" }) }), D = a.filter === "agMultiColumnFilter", x = b(a);
238
238
  let y = "text";
239
239
  D ? y = x.set !== -1 ? "set" : x.date !== -1 ? "date" : "text" : H ? y = "set" : g && (y = "date");
240
240
  const Se = D ? x.text !== -1 || x.number !== -1 : !g && !H, oe = D ? x.set !== -1 : H, se = D ? x.date !== -1 : g, Ie = c.getFilterModel()[o], ie = D && Ie?.filterModels?.some((e, t) => {
@@ -291,13 +291,13 @@ const je = {
291
291
  onBlur: () => f(!1),
292
292
  suffix: k && /* @__PURE__ */ s("button", { onClick: (e) => {
293
293
  e.stopPropagation(), Ce();
294
- }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ s(me, { size: 10 }) })
294
+ }, className: "cursor-pointer text-[#7a8294] hover:text-[#3649C6]", children: /* @__PURE__ */ s(me, { size: "xs" }) })
295
295
  }
296
296
  ),
297
297
  /* @__PURE__ */ F("div", { className: "flex items-center gap-1.5 shrink-0", children: [
298
298
  D && /* @__PURE__ */ F(qe, { children: [
299
299
  /* @__PURE__ */ s(Ee, { asChild: !0, children: /* @__PURE__ */ F("div", { className: "relative group p-1 hover:bg-[#dbe0fb] rounded-md transition-colors cursor-pointer", children: [
300
- /* @__PURE__ */ s(we, { size: 16, className: ze("text-[#60697D] group-hover:text-[#3649C6]", ie && "text-[#3649C6]") }),
300
+ /* @__PURE__ */ s(we, { size: "md", className: ze("text-[#60697D] group-hover:text-[#3649C6]", ie && "text-[#3649C6]") }),
301
301
  ie && /* @__PURE__ */ s("span", { className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-[#4259ee] border border-white shadow-sm" })
302
302
  ] }) }),
303
303
  /* @__PURE__ */ F(Be, { align: "end", className: "w-[300px]", children: [
@@ -1,39 +1,40 @@
1
1
  import { jsx as l, jsxs as n } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import * as t from "@radix-ui/react-alert-dialog";
3
+ import * as e from "@radix-ui/react-alert-dialog";
4
4
  import { cn as s } from "../../lib/utils.js";
5
- import { buttonVariants as r } from "./button-variants.js";
6
- const w = t.Root, b = t.Trigger, m = t.Portal, d = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
7
- t.Overlay,
5
+ import { buttonVariants as d } from "./button-variants.js";
6
+ const w = e.Root, b = e.Trigger, m = e.Portal, r = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
7
+ e.Overlay,
8
8
  {
9
9
  className: s(
10
10
  "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
11
11
  a
12
12
  ),
13
- ...e,
13
+ ...t,
14
14
  ref: o
15
15
  }
16
16
  ));
17
- d.displayName = t.Overlay.displayName;
18
- const c = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ n(m, { children: [
19
- /* @__PURE__ */ l(d, {}),
17
+ r.displayName = e.Overlay.displayName;
18
+ const c = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ n(m, { children: [
19
+ /* @__PURE__ */ l(r, {}),
20
20
  /* @__PURE__ */ l(
21
- t.Content,
21
+ e.Content,
22
22
  {
23
23
  ref: o,
24
24
  "aria-describedby": void 0,
25
+ "data-component": "alert-dialog-content",
25
26
  className: s(
26
27
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
27
28
  a
28
29
  ),
29
- ...e
30
+ ...t
30
31
  }
31
32
  )
32
33
  ] }));
33
- c.displayName = t.Content.displayName;
34
- const f = ({
34
+ c.displayName = e.Content.displayName;
35
+ const p = ({
35
36
  className: a,
36
- ...e
37
+ ...t
37
38
  }) => /* @__PURE__ */ l(
38
39
  "div",
39
40
  {
@@ -41,13 +42,13 @@ const f = ({
41
42
  "flex flex-col space-y-2 text-center sm:text-left",
42
43
  a
43
44
  ),
44
- ...e
45
+ ...t
45
46
  }
46
47
  );
47
- f.displayName = "AlertDialogHeader";
48
- const p = ({
48
+ p.displayName = "AlertDialogHeader";
49
+ const f = ({
49
50
  className: a,
50
- ...e
51
+ ...t
51
52
  }) => /* @__PURE__ */ l(
52
53
  "div",
53
54
  {
@@ -55,59 +56,63 @@ const p = ({
55
56
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
56
57
  a
57
58
  ),
58
- ...e
59
+ ...t
59
60
  }
60
61
  );
61
- p.displayName = "AlertDialogFooter";
62
- const g = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
63
- t.Title,
62
+ f.displayName = "AlertDialogFooter";
63
+ const g = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
64
+ e.Title,
64
65
  {
65
66
  ref: o,
67
+ "data-component": "alert-dialog-title",
66
68
  className: s("text-lg font-semibold", a),
67
- ...e
69
+ ...t
68
70
  }
69
71
  ));
70
- g.displayName = t.Title.displayName;
71
- const N = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
72
- t.Description,
72
+ g.displayName = e.Title.displayName;
73
+ const N = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
74
+ e.Description,
73
75
  {
74
76
  ref: o,
77
+ "data-component": "alert-dialog-description",
75
78
  className: s("text-sm text-muted-foreground", a),
76
- ...e
79
+ ...t
77
80
  }
78
81
  ));
79
- N.displayName = t.Description.displayName;
80
- const y = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
81
- t.Action,
82
+ N.displayName = e.Description.displayName;
83
+ const y = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
84
+ e.Action,
82
85
  {
83
86
  ref: o,
84
- className: s(r(), a),
85
- ...e
87
+ "data-component": "alert-dialog-action",
88
+ className: s(d(), a),
89
+ ...t
86
90
  }
87
91
  ));
88
- y.displayName = t.Action.displayName;
89
- const x = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ l(
90
- t.Cancel,
92
+ y.displayName = e.Action.displayName;
93
+ const x = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
94
+ e.Cancel,
91
95
  {
92
96
  ref: o,
97
+ "data-component": "alert-dialog-cancel",
93
98
  className: s(
94
- r({ variant: "outline" }),
99
+ d({ variant: "outline" }),
95
100
  "mt-2 sm:mt-0",
96
101
  a
97
102
  ),
98
- ...e
103
+ ...t
99
104
  }
100
105
  ));
101
- x.displayName = t.Cancel.displayName;
106
+ x.displayName = e.Cancel.displayName;
102
107
  export {
103
108
  w as AlertDialog,
104
109
  y as AlertDialogAction,
105
110
  x as AlertDialogCancel,
106
111
  c as AlertDialogContent,
107
112
  N as AlertDialogDescription,
108
- p as AlertDialogFooter,
109
- f as AlertDialogHeader,
110
- d as AlertDialogOverlay,
113
+ f as AlertDialogFooter,
114
+ p as AlertDialogHeader,
115
+ r as AlertDialogOverlay,
111
116
  m as AlertDialogPortal,
112
117
  g as AlertDialogTitle,
113
118
  b as AlertDialogTrigger
@@ -3,9 +3,26 @@ import * as React from "react";
3
3
  declare const alertVariants: (props?: {
4
4
  variant?: "default" | "info" | "warning" | "error" | "success";
5
5
  } & import('class-variance-authority/types').ClassProp) => string;
6
- declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: {
7
- variant?: "default" | "info" | "warning" | "error" | "success";
8
- } & import('class-variance-authority/types').ClassProp) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
7
+ asChild?: boolean;
8
+ }
9
+ declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
9
10
  declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
10
11
  declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
11
- export { Alert, AlertTitle, AlertDescription, alertVariants };
12
+ export interface AlertIconProps {
13
+ /** The alert variant — determines which icon to render */
14
+ variant?: "default" | "info" | "success" | "warning" | "error";
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Renders the appropriate icon for the given Alert variant.
19
+ *
20
+ * @example
21
+ * <AlertIcon variant="success" className="h-4 w-4" />
22
+ * <AlertIcon variant="error" />
23
+ */
24
+ declare const AlertIcon: {
25
+ ({ variant, className }: AlertIconProps): import("react/jsx-runtime").JSX.Element;
26
+ displayName: string;
27
+ };
28
+ export { Alert, AlertTitle, AlertDescription, AlertIcon, alertVariants };
@@ -1,8 +1,10 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { cva as l } from "class-variance-authority";
2
+ import * as n from "react";
3
+ import { Slot as c } from "@radix-ui/react-slot";
4
+ import { cva as d } from "class-variance-authority";
4
5
  import { cn as s } from "../../lib/utils.js";
5
- const n = l(
6
+ import { XCircle as f, AlertTriangle as g, CheckCircle as m, Info as o } from "lucide-react";
7
+ const p = d(
6
8
  "relative w-full rounded-lg border px-4 py-3 text-sm flex gap-3 items-start",
7
9
  {
8
10
  variants: {
@@ -18,37 +20,55 @@ const n = l(
18
20
  variant: "default"
19
21
  }
20
22
  }
21
- ), d = o.forwardRef(({ className: r, variant: e, ...t }, i) => /* @__PURE__ */ a(
22
- "div",
23
- {
24
- ref: i,
25
- role: "alert",
26
- className: s(n({ variant: e }), r),
27
- ...t
28
- }
29
- ));
30
- d.displayName = "Alert";
31
- const g = o.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ a(
23
+ ), b = n.forwardRef(
24
+ ({ className: e, variant: r, asChild: t = !1, ...l }, i) => /* @__PURE__ */ a(
25
+ t ? c : "div",
26
+ {
27
+ ref: i,
28
+ role: "alert",
29
+ "data-component": "alert",
30
+ "data-variant": r ?? "default",
31
+ className: s(p({ variant: r }), e),
32
+ ...l
33
+ }
34
+ )
35
+ );
36
+ b.displayName = "Alert";
37
+ const u = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
32
38
  "h5",
33
39
  {
34
40
  ref: t,
35
- className: s("font-semibold leading-[21px] tracking-tight text-foreground", r),
36
- ...e
41
+ "data-component": "alert-title",
42
+ className: s("font-semibold leading-[21px] tracking-tight text-foreground", e),
43
+ ...r
37
44
  }
38
45
  ));
39
- g.displayName = "AlertTitle";
40
- const c = o.forwardRef(({ className: r, ...e }, t) => /* @__PURE__ */ a(
46
+ u.displayName = "AlertTitle";
47
+ const x = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
41
48
  "div",
42
49
  {
43
50
  ref: t,
44
- className: s("text-[12px] leading-[18px] text-secondary-foreground", r),
45
- ...e
51
+ "data-component": "alert-description",
52
+ className: s("text-[12px] leading-[18px] text-secondary-foreground", e),
53
+ ...r
46
54
  }
47
55
  ));
48
- c.displayName = "AlertDescription";
56
+ x.displayName = "AlertDescription";
57
+ const v = {
58
+ default: o,
59
+ info: o,
60
+ success: m,
61
+ warning: g,
62
+ error: f
63
+ }, w = ({ variant: e = "info", className: r = "h-4 w-4 shrink-0 mt-1" }) => {
64
+ const t = v[e] || o;
65
+ return /* @__PURE__ */ a(t, { className: r });
66
+ };
67
+ w.displayName = "AlertIcon";
49
68
  export {
50
- d as Alert,
51
- c as AlertDescription,
52
- g as AlertTitle,
53
- n as alertVariants
69
+ b as Alert,
70
+ x as AlertDescription,
71
+ w as AlertIcon,
72
+ u as AlertTitle,
73
+ p as alertVariants
54
74
  };
@@ -1,9 +1,9 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as s } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import * as a from "@radix-ui/react-avatar";
4
- import { cva as f } from "class-variance-authority";
5
- import { cn as m } from "../../lib/utils.js";
6
- const c = f(
4
+ import { cva as c } from "class-variance-authority";
5
+ import { cn as o } from "../../lib/utils.js";
6
+ const f = c(
7
7
  "relative flex shrink-0 overflow-hidden",
8
8
  {
9
9
  variants: {
@@ -22,33 +22,36 @@ const c = f(
22
22
  shape: "square"
23
23
  }
24
24
  }
25
- ), d = l.forwardRef(({ className: e, size: s, shape: t, ...o }, i) => /* @__PURE__ */ r(
25
+ ), d = l.forwardRef(({ className: e, size: t, shape: r, ...m }, i) => /* @__PURE__ */ s(
26
26
  a.Root,
27
27
  {
28
28
  ref: i,
29
- className: m(c({ size: s, shape: t, className: e })),
30
- ...o
29
+ className: o(f({ size: t, shape: r, className: e })),
30
+ "data-component": "avatar",
31
+ ...m
31
32
  }
32
33
  ));
33
34
  d.displayName = a.Root.displayName;
34
- const n = l.forwardRef(({ className: e, ...s }, t) => /* @__PURE__ */ r(
35
+ const n = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ s(
35
36
  a.Image,
36
37
  {
37
- ref: t,
38
- className: m("aspect-square h-full w-full", e),
39
- ...s
38
+ ref: r,
39
+ className: o("aspect-square h-full w-full", e),
40
+ "data-component": "avatar-image",
41
+ ...t
40
42
  }
41
43
  ));
42
44
  n.displayName = a.Image.displayName;
43
- const p = l.forwardRef(({ className: e, ...s }, t) => /* @__PURE__ */ r(
45
+ const p = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ s(
44
46
  a.Fallback,
45
47
  {
46
- ref: t,
47
- className: m(
48
+ ref: r,
49
+ className: o(
48
50
  "flex h-full w-full items-center justify-center bg-success text-white font-bold",
49
51
  e
50
52
  ),
51
- ...s
53
+ "data-component": "avatar-fallback",
54
+ ...t
52
55
  }
53
56
  ));
54
57
  p.displayName = a.Fallback.displayName;
@@ -56,5 +59,5 @@ export {
56
59
  d as Avatar,
57
60
  p as AvatarFallback,
58
61
  n as AvatarImage,
59
- c as avatarVariants
62
+ f as avatarVariants
60
63
  };
@@ -46,7 +46,14 @@ const i = n(
46
46
  }
47
47
  );
48
48
  function d({ className: r, variant: t, color: a, ...e }) {
49
- return /* @__PURE__ */ s("div", { className: o(i({ variant: t, color: a }), r), ...e });
49
+ return /* @__PURE__ */ s(
50
+ "div",
51
+ {
52
+ className: o(i({ variant: t, color: a }), r),
53
+ "data-component": "badge",
54
+ ...e
55
+ }
56
+ );
50
57
  }
51
58
  export {
52
59
  d as Badge,
@@ -60,6 +60,7 @@ const w = o.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
60
60
  role: "link",
61
61
  "aria-disabled": "true",
62
62
  "aria-current": "page",
63
+ "data-current": "page",
63
64
  className: s("font-extrabold text-[#1f2b4d]", e),
64
65
  ...r
65
66
  }
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const buttonGroupVariants: (props?: {
4
4
  orientation?: "horizontal" | "vertical";
5
- spacing?: "none" | "sm" | "md" | "lg";
5
+ spacing?: "sm" | "md" | "lg" | "none";
6
6
  } & import('class-variance-authority/types').ClassProp) => string;
7
7
  export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof buttonGroupVariants> {
8
8
  value?: string;
@@ -1,5 +1,5 @@
1
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import * as o from "react";
3
3
  import { cva as k } from "class-variance-authority";
4
4
  import { cn as t } from "../../lib/utils.js";
5
5
  import { Info as G } from "../../icons/index.js";
@@ -23,55 +23,50 @@ const V = k(
23
23
  spacing: "none"
24
24
  }
25
25
  }
26
- ), j = a.forwardRef(
27
- ({ className: f, orientation: d = "horizontal", spacing: x = "none", value: v, onValueChange: l, isDisabled: c, children: b, label: p, helperText: m, isError: r, required: g, ...h }, N) => /* @__PURE__ */ s("div", { className: t("grid gap-1.5", f), children: [
28
- p && /* @__PURE__ */ s(
26
+ ), j = o.forwardRef(
27
+ ({ className: x, orientation: n = "horizontal", spacing: l = "none", value: v, onValueChange: c, isDisabled: p, children: b, label: m, helperText: u, isError: r, required: g, ...h }, N) => /* @__PURE__ */ s("div", { className: t("grid gap-1.5", x), children: [
28
+ m && /* @__PURE__ */ s(
29
29
  "label",
30
30
  {
31
31
  className: t(
32
32
  "text-xs font-medium leading-[18px] text-[#60697d]",
33
33
  // Exact legacy color
34
- c && "opacity-70",
34
+ p && "opacity-70",
35
35
  r && "text-destructive"
36
36
  ),
37
37
  children: [
38
- p,
38
+ m,
39
39
  " ",
40
- g && /* @__PURE__ */ o("span", { className: "text-destructive", children: "*" })
40
+ g && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
41
41
  ]
42
42
  }
43
43
  ),
44
- /* @__PURE__ */ o(
44
+ /* @__PURE__ */ a(
45
45
  "div",
46
46
  {
47
47
  ref: N,
48
48
  className: t(
49
- V({ orientation: d, spacing: x }),
49
+ V({ orientation: n, spacing: l }),
50
50
  ""
51
- // Remove className from here to avoid double application if it was meant for the wrapper,
52
- // but usually className on the component means the outer container.
53
- // However, for backward compatibility, if className had width styles, they might break.
54
- // But since we wrapped it, let's keep className on the wrapper?
55
- // Actually, usually standard in this library seems to be className on the root.
56
- // So I will apply className to the wrapper (done above) and NOT here.
57
- // Wait, existing usage might expect className on the flex container.
58
- // Let's inspect Input/RadioGroup. They apply className to the wrapper/grid.
59
- // So applying className to the wrapper is consistent.
60
51
  ),
61
52
  role: "group",
53
+ "data-component": "button-group",
54
+ "data-orientation": n,
55
+ "data-spacing": l,
62
56
  ...h,
63
- children: a.Children.map(b, (n) => {
64
- if (a.isValidElement(n)) {
65
- const e = n, i = e.props.value || e.props.children?.toString(), u = v === i, z = d === "horizontal";
66
- return a.cloneElement(e, {
67
- disabled: e.props.disabled || c,
57
+ children: o.Children.map(b, (i) => {
58
+ if (o.isValidElement(i)) {
59
+ const e = i, d = e.props.value || e.props.children?.toString(), f = v === d, z = n === "horizontal";
60
+ return o.cloneElement(e, {
61
+ disabled: e.props.disabled || p,
68
62
  variant: e.props.variant || "tertiary",
63
+ "data-button-group": "item",
69
64
  className: t(
70
65
  "relative transition-all hover:bg-transparent hover:border-tertiary-border",
71
66
  z ? "rounded-none first:rounded-l-md last:rounded-r-md -ml-[1px] first:ml-0" : "rounded-none first:rounded-t-md last:rounded-b-md -mt-[1px] first:mt-0",
72
- u ? "z-10 bg-[#eceefd] border-[#4259ee] text-[#4259ee] hover:bg-[#eceefd] hover:border-[#4259ee] hover:text-[#4259ee]" : "text-[#0000008a]",
67
+ f ? "z-10 bg-[#eceefd] border-[#4259ee] text-[#4259ee] hover:bg-[#eceefd] hover:border-[#4259ee] hover:text-[#4259ee]" : "text-[#0000008a]",
73
68
  "disabled:bg-[#f8f9fb] disabled:text-[#b4bac7] disabled:opacity-100",
74
- r && !u && "border-destructive text-destructive z-10",
69
+ r && !f && "border-destructive text-destructive z-10",
75
70
  // rudimentary error style for buttons
76
71
  // If active and error? Maybe keep active color but allow border to be red?
77
72
  // For now let's just stick to the text label error. Button error styles are complex.
@@ -79,17 +74,17 @@ const V = k(
79
74
  e.props.className
80
75
  ),
81
76
  onClick: (y) => {
82
- e.props.onClick?.(y), i && l && l(i);
77
+ e.props.onClick?.(y), d && c && c(d);
83
78
  }
84
79
  });
85
80
  }
86
- return n;
81
+ return i;
87
82
  })
88
83
  }
89
84
  ),
90
- m && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
91
- !r && /* @__PURE__ */ o(G, { size: 10, className: "shrink-0 text-muted-foreground" }),
92
- /* @__PURE__ */ o(
85
+ u && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
86
+ !r && /* @__PURE__ */ a(G, { size: 10, className: "shrink-0 text-muted-foreground" }),
87
+ /* @__PURE__ */ a(
93
88
  "p",
94
89
  {
95
90
  className: t(
@@ -97,7 +92,7 @@ const V = k(
97
92
  // Exact legacy color
98
93
  r && "text-destructive"
99
94
  ),
100
- children: m
95
+ children: u
101
96
  }
102
97
  )
103
98
  ] })
@@ -1,4 +1,4 @@
1
1
  export declare const buttonVariants: (props?: {
2
2
  variant?: "default" | "link" | "secondary" | "tertiary" | "destructive" | "outline" | "ghost";
3
- size?: "default" | "icon" | "sm" | "md" | "lg";
3
+ size?: "sm" | "md" | "lg" | "default" | "icon";
4
4
  } & import('class-variance-authority/types').ClassProp) => string;
@@ -2,7 +2,18 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import { buttonVariants } from './button-variants';
3
3
  import * as React from "react";
4
4
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
5
+ /**
6
+ * Renders the button as a child element using Radix's Slot pattern.
7
+ * Use this when you want to pass a custom element (e.g. `<a>`) but
8
+ * keep button styling and behavior.
9
+ * @example <Button asChild><a href="/home">Home</a></Button>
10
+ */
5
11
  asChild?: boolean;
12
+ /**
13
+ * Side of the tooltip for icon-only buttons.
14
+ * Only applies when `size="icon"` and `aria-label` is set.
15
+ * @default "top"
16
+ */
6
17
  tooltipSide?: "top" | "bottom" | "left" | "right";
7
18
  }
8
19
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;