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,55 +1,59 @@
1
- import { jsx as o, jsxs as v } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
2
  import * as e from "react";
3
- import * as s from "@radix-ui/react-tabs";
4
- import { cn as f } from "../../lib/utils.js";
5
- import { Tooltip as h, TooltipTrigger as y, TooltipContent as w } from "./tooltip.js";
6
- const b = e.createContext({
3
+ import * as o from "@radix-ui/react-tabs";
4
+ import { cn as p } from "../../lib/utils.js";
5
+ import { Tooltip as v, TooltipTrigger as y, TooltipContent as N } from "./tooltip.js";
6
+ const x = e.createContext({
7
7
  variant: "line",
8
8
  size: "default"
9
- }), N = e.forwardRef(({ variant: n = "line", size: t = "default", hideInactiveLabel: a = !1, tooltipClassName: i, value: r, defaultValue: l, onValueChange: m, ...u }, c) => {
10
- const [x, d] = e.useState(r || l);
9
+ }), w = e.forwardRef(({ variant: t = "line", size: a = "default", hideInactiveLabel: i = !1, tooltipClassName: s, value: r, defaultValue: l, onValueChange: m, ...u }, c) => {
10
+ const [b, d] = e.useState(r || l);
11
11
  e.useEffect(() => {
12
12
  r !== void 0 && d(r);
13
13
  }, [r]);
14
- const p = (g) => {
14
+ const f = (g) => {
15
15
  r === void 0 && d(g), m?.(g);
16
16
  };
17
- return /* @__PURE__ */ o(b.Provider, { value: { variant: n, size: t, activeValue: x, hideInactiveLabel: a, tooltipClassName: i }, children: /* @__PURE__ */ o(
18
- s.Root,
17
+ return /* @__PURE__ */ n(x.Provider, { value: { variant: t, size: a, activeValue: b, hideInactiveLabel: i, tooltipClassName: s }, children: /* @__PURE__ */ n(
18
+ o.Root,
19
19
  {
20
20
  ref: c,
21
21
  value: r,
22
22
  defaultValue: l,
23
- onValueChange: p,
23
+ onValueChange: f,
24
+ "data-component": "tabs",
25
+ "data-variant": t,
24
26
  ...u
25
27
  }
26
28
  ) });
27
29
  });
28
- N.displayName = s.Root.displayName;
29
- const C = e.forwardRef(({ className: n, ...t }, a) => {
30
- const { variant: i } = e.useContext(b);
31
- return /* @__PURE__ */ o(
32
- s.List,
30
+ w.displayName = o.Root.displayName;
31
+ const C = e.forwardRef(({ className: t, ...a }, i) => {
32
+ const { variant: s } = e.useContext(x);
33
+ return /* @__PURE__ */ n(
34
+ o.List,
33
35
  {
34
- ref: a,
35
- className: f(
36
+ ref: i,
37
+ "data-tabs": "list",
38
+ className: p(
36
39
  "inline-flex items-center justify-center rounded-lg",
37
- i === "line" && "h-10 p-1 bg-white border w-full justify-start gap-2 px-2 shrink-0 overflow-x-auto scrollbar-none py-0",
38
- i === "pill" && "h-10 p-1 bg-[#eceefd] text-[#4259ee] gap-1",
39
- i === "outline" && "bg-transparent gap-2 p-0 w-full justify-start",
40
- n
40
+ s === "line" && "h-10 bg-white border w-full justify-start gap-2 px-2 shrink-0 py-0",
41
+ s === "pill" && "h-10 p-1 bg-[#eceefd] text-[#4259ee] gap-1",
42
+ s === "outline" && "bg-transparent gap-2 p-0 w-full justify-start",
43
+ t
41
44
  ),
42
- ...t
45
+ ...a
43
46
  }
44
47
  );
45
48
  });
46
- C.displayName = s.List.displayName;
47
- const T = e.forwardRef(({ className: n, icon: t, children: a, ...i }, r) => {
48
- const { variant: l, size: m, activeValue: u, hideInactiveLabel: c, tooltipClassName: x } = e.useContext(b), d = u === i.value, p = /* @__PURE__ */ v(
49
- s.Trigger,
49
+ C.displayName = o.List.displayName;
50
+ const T = e.forwardRef(({ className: t, icon: a, children: i, ...s }, r) => {
51
+ const { variant: l, size: m, activeValue: u, hideInactiveLabel: c, tooltipClassName: b } = e.useContext(x), d = u === s.value, f = /* @__PURE__ */ h(
52
+ o.Trigger,
50
53
  {
51
54
  ref: r,
52
- className: f(
55
+ "data-tabs": "trigger",
56
+ className: p(
53
57
  "relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
54
58
  l === "line" && [
55
59
  "h-full rounded-none border-b-2 border-transparent px-1 text-[13px] font-medium capitalize text-[#60697d] -mb-[1px]",
@@ -67,35 +71,36 @@ const T = e.forwardRef(({ className: n, icon: t, children: a, ...i }, r) => {
67
71
  "data-[state=active]:border-[#4259ee] data-[state=active]:text-[#4259ee]",
68
72
  m === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
69
73
  ],
70
- n
74
+ t
71
75
  ),
72
- ...i,
76
+ ...s,
73
77
  children: [
74
- t && /* @__PURE__ */ o("span", { className: f("h-4 w-4 shrink-0", !c || d ? "mr-2" : "mr-0"), children: t }),
75
- (!c || d) && a
78
+ a && /* @__PURE__ */ n("span", { className: p("h-4 w-4 shrink-0", !c || d ? "mr-2" : "mr-0"), children: a }),
79
+ /* @__PURE__ */ n("span", { className: p(c && !d && "sr-only"), children: i })
76
80
  ]
77
81
  }
78
82
  );
79
- return c && !d ? /* @__PURE__ */ v(h, { children: [
80
- /* @__PURE__ */ o(y, { asChild: !0, children: p }),
81
- /* @__PURE__ */ o(w, { variant: "tertiary", className: x, children: a })
82
- ] }) : p;
83
+ return c && !d ? /* @__PURE__ */ h(v, { children: [
84
+ /* @__PURE__ */ n(y, { asChild: !0, children: f }),
85
+ /* @__PURE__ */ n(N, { variant: "tertiary", className: b, children: i })
86
+ ] }) : f;
83
87
  });
84
- T.displayName = s.Trigger.displayName;
85
- const R = e.forwardRef(({ className: n, ...t }, a) => /* @__PURE__ */ o(
86
- s.Content,
88
+ T.displayName = o.Trigger.displayName;
89
+ const R = e.forwardRef(({ className: t, ...a }, i) => /* @__PURE__ */ n(
90
+ o.Content,
87
91
  {
88
- ref: a,
89
- className: f(
92
+ ref: i,
93
+ "data-tabs": "content",
94
+ className: p(
90
95
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
91
- n
96
+ t
92
97
  ),
93
- ...t
98
+ ...a
94
99
  }
95
100
  ));
96
- R.displayName = s.Content.displayName;
101
+ R.displayName = o.Content.displayName;
97
102
  export {
98
- N as Tabs,
103
+ w as Tabs,
99
104
  R as TabsContent,
100
105
  C as TabsList,
101
106
  T as TabsTrigger
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import { TagProps } from './tag';
3
3
  import * as React from "react";
4
4
  declare const tagGroupVariants: (props?: {
5
- spacing?: "none" | "sm" | "md" | "lg";
5
+ spacing?: "sm" | "md" | "lg" | "none";
6
6
  orientation?: "horizontal" | "vertical";
7
7
  wrap?: "nowrap" | "wrap";
8
8
  } & import('class-variance-authority/types').ClassProp) => string;
@@ -17,6 +17,7 @@ export interface TagGroupProps extends React.HTMLAttributes<HTMLDivElement>, Var
17
17
  removable?: TagProps["removable"];
18
18
  onRemove?: TagProps["onRemove"];
19
19
  }>;
20
+ asChild?: boolean;
20
21
  }
21
22
  declare const TagGroup: React.ForwardRefExoticComponent<TagGroupProps & React.RefAttributes<HTMLDivElement>>;
22
23
  export { TagGroup, tagGroupVariants };
@@ -1,9 +1,10 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { cva as s } from "class-variance-authority";
4
- import { cn as c } from "../../lib/utils.js";
5
- import { Tag as f } from "./tag.js";
6
- const v = s("flex", {
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { Slot as f } from "@radix-ui/react-slot";
4
+ import { cva as d } from "class-variance-authority";
5
+ import { cn as v } from "../../lib/utils.js";
6
+ import { Tag as h } from "./tag.js";
7
+ const w = d("flex", {
7
8
  variants: {
8
9
  spacing: {
9
10
  none: "gap-0",
@@ -25,32 +26,35 @@ const v = s("flex", {
25
26
  orientation: "horizontal",
26
27
  wrap: "nowrap"
27
28
  }
28
- }), w = m.forwardRef(
29
- ({ className: a, spacing: e, orientation: n, tags: i, ...p }, l) => /* @__PURE__ */ o(
30
- "div",
29
+ }), g = c.forwardRef(
30
+ ({ className: n, spacing: a, orientation: r, wrap: p, tags: t, asChild: i = !1, ...m }, l) => /* @__PURE__ */ e(
31
+ i ? f : "div",
31
32
  {
32
33
  ref: l,
33
- className: c(v({ spacing: e, orientation: n }), a),
34
- ...p,
35
- children: i.map((r, t) => /* @__PURE__ */ o(
36
- f,
34
+ className: v(w({ spacing: a, orientation: r, wrap: p }), n),
35
+ "data-component": "tag-group",
36
+ "data-spacing": a ?? "md",
37
+ "data-orientation": r ?? "horizontal",
38
+ ...m,
39
+ children: t.map((o, s) => /* @__PURE__ */ e(
40
+ h,
37
41
  {
38
- variant: r.variant,
39
- size: r.size,
40
- shape: r.shape,
41
- leftIcon: r.leftIcon,
42
- rightIcon: r.rightIcon,
43
- removable: r.removable,
44
- onRemove: r.onRemove,
45
- children: r.label
42
+ variant: o.variant,
43
+ size: o.size,
44
+ shape: o.shape,
45
+ leftIcon: o.leftIcon,
46
+ rightIcon: o.rightIcon,
47
+ removable: o.removable,
48
+ onRemove: o.onRemove,
49
+ children: o.label
46
50
  },
47
- t
51
+ s
48
52
  ))
49
53
  }
50
54
  )
51
55
  );
52
- w.displayName = "TagGroup";
56
+ g.displayName = "TagGroup";
53
57
  export {
54
- w as TagGroup,
55
- v as tagGroupVariants
58
+ g as TagGroup,
59
+ w as tagGroupVariants
56
60
  };
@@ -11,6 +11,7 @@ export interface TagProps extends React.HTMLAttributes<HTMLSpanElement>, Variant
11
11
  rightIcon?: React.ReactNode;
12
12
  removable?: boolean;
13
13
  onRemove?: () => void;
14
+ asChild?: boolean;
14
15
  }
15
16
  declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
16
17
  export { Tag, tagVariants };
@@ -1,9 +1,10 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import { cva as x } from "class-variance-authority";
4
- import { X as h } from "lucide-react";
5
- import { cn as m } from "../../lib/utils.js";
6
- const u = x(
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { Slot as x } from "@radix-ui/react-slot";
4
+ import { cva as h } from "class-variance-authority";
5
+ import { X as u } from "lucide-react";
6
+ import { cn as v } from "../../lib/utils.js";
7
+ const y = h(
7
8
  "inline-flex items-center justify-center rounded-full transition-colors whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8
9
  {
9
10
  variants: {
@@ -36,18 +37,22 @@ const u = x(
36
37
  shape: "pill"
37
38
  }
38
39
  }
39
- ), v = p.forwardRef(
40
- ({ className: n, variant: s, size: i, shape: a, leftIcon: r, rightIcon: t, removable: d, onRemove: l, children: b, ...f }, c) => /* @__PURE__ */ o(
41
- "span",
40
+ ), w = m.forwardRef(
41
+ ({ className: d, variant: r, size: t, shape: o, leftIcon: a, rightIcon: n, removable: i, onRemove: l, asChild: f = !1, children: c, ...p }, b) => /* @__PURE__ */ s(
42
+ f ? x : "span",
42
43
  {
43
- ref: c,
44
- className: m(u({ variant: s, size: i, shape: a }), n),
45
- ...f,
44
+ ref: b,
45
+ className: v(y({ variant: r, size: t, shape: o }), d),
46
+ "data-component": "tag",
47
+ "data-variant": r ?? "default",
48
+ "data-size": t ?? "md",
49
+ "data-shape": o ?? "pill",
50
+ ...p,
46
51
  children: [
47
- r && /* @__PURE__ */ e("span", { className: "mr-1.5 flex shrink-0 items-center justify-center", children: r }),
48
- b,
49
- t && /* @__PURE__ */ e("span", { className: "ml-1.5 flex shrink-0 items-center justify-center", children: t }),
50
- d && /* @__PURE__ */ o(
52
+ a && /* @__PURE__ */ e("span", { className: "mr-1.5 flex shrink-0 items-center justify-center", children: a }),
53
+ c,
54
+ n && /* @__PURE__ */ e("span", { className: "ml-1.5 flex shrink-0 items-center justify-center", children: n }),
55
+ i && /* @__PURE__ */ s(
51
56
  "button",
52
57
  {
53
58
  type: "button",
@@ -55,8 +60,9 @@ const u = x(
55
60
  g.stopPropagation(), l?.();
56
61
  },
57
62
  className: "ml-1.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full hover:bg-black/10 transition-colors",
63
+ "data-component": "tag-remove",
58
64
  children: [
59
- /* @__PURE__ */ e(h, { className: "h-3 w-3" }),
65
+ /* @__PURE__ */ e(u, { className: "h-3 w-3" }),
60
66
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Remove" })
61
67
  ]
62
68
  }
@@ -65,8 +71,8 @@ const u = x(
65
71
  }
66
72
  )
67
73
  );
68
- v.displayName = "Tag";
74
+ w.displayName = "Tag";
69
75
  export {
70
- v as Tag,
71
- u as tagVariants
76
+ w as Tag,
77
+ y as tagVariants
72
78
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import { cva as p } from "class-variance-authority";
4
- import { cn as l } from "../../lib/utils.js";
4
+ import { cn as i } from "../../lib/utils.js";
5
5
  const v = p(
6
6
  "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-[#dfe2e7] focus-visible:outline-none focus-visible:border-primary hover:border-primary disabled:cursor-not-allowed disabled:bg-disabled-secondary-bg disabled:text-disabled-text disabled:border-border md:text-sm",
7
7
  {
@@ -20,25 +20,25 @@ const v = p(
20
20
  }
21
21
  }
22
22
  ), y = c.forwardRef(
23
- ({ className: u, label: b, helperText: i, characterLimit: n, isError: t, disabled: a, value: r, onChange: f, ...e }, m) => {
24
- const [g, o] = c.useState(0);
23
+ ({ className: u, label: x, helperText: n, characterLimit: o, isError: t, disabled: a, value: r, onChange: m, ...e }, f) => {
24
+ const [g, l] = c.useState(0);
25
25
  c.useEffect(() => {
26
- r ? o(String(r).length) : e.defaultValue && o(String(e.defaultValue).length);
26
+ r ? l(String(r).length) : e.defaultValue && l(String(e.defaultValue).length);
27
27
  }, [r, e.defaultValue]);
28
- const h = (x) => {
29
- o(x.target.value.length), f?.(x);
28
+ const h = (b) => {
29
+ l(b.target.value.length), m?.(b);
30
30
  };
31
31
  return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5 min-w-[240px]", children: [
32
- b && /* @__PURE__ */ d(
32
+ x && /* @__PURE__ */ d(
33
33
  "label",
34
34
  {
35
- className: l(
35
+ className: i(
36
36
  "text-xs font-medium leading-[18px] text-[#60697d]",
37
37
  a && "opacity-70",
38
38
  t && "text-destructive"
39
39
  ),
40
40
  children: [
41
- b,
41
+ x,
42
42
  " ",
43
43
  e.required && /* @__PURE__ */ s("span", { className: "text-destructive", children: "*" })
44
44
  ]
@@ -47,33 +47,34 @@ const v = p(
47
47
  /* @__PURE__ */ s(
48
48
  "textarea",
49
49
  {
50
- className: l(
50
+ className: i(
51
51
  v({ isError: t, disabled: a, className: u }),
52
52
  "bg-background",
53
53
  a && "bg-disabled-secondary-bg"
54
54
  ),
55
- ref: m,
55
+ ref: f,
56
56
  disabled: !!a,
57
57
  value: r,
58
58
  onChange: h,
59
+ "data-component": "textarea",
59
60
  ...e
60
61
  }
61
62
  ),
62
- (i || n) && /* @__PURE__ */ d("div", { className: "flex items-start justify-between gap-2", children: [
63
- /* @__PURE__ */ s("div", { className: l("flex items-center gap-1", t && "text-destructive"), children: i && /* @__PURE__ */ s(
63
+ (n || o) && /* @__PURE__ */ d("div", { className: "flex items-start justify-between gap-2", children: [
64
+ /* @__PURE__ */ s("div", { className: i("flex items-center gap-1", t && "text-destructive"), children: n && /* @__PURE__ */ s(
64
65
  "p",
65
66
  {
66
- className: l(
67
+ className: i(
67
68
  "text-[10px] text-[#7a8294]",
68
69
  t && "text-destructive"
69
70
  ),
70
- children: i
71
+ children: n
71
72
  }
72
73
  ) }),
73
- n && /* @__PURE__ */ d("div", { className: "text-[10px] text-[#7a8294] text-right", children: [
74
+ o && /* @__PURE__ */ d("div", { className: "text-[10px] text-[#7a8294] text-right", "data-component": "character-count-indicator", children: [
74
75
  g,
75
76
  "/",
76
- n
77
+ o
77
78
  ] })
78
79
  ] })
79
80
  ] });
@@ -6,7 +6,7 @@ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitive
6
6
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
7
7
  } & React.RefAttributes<HTMLOListElement>>;
8
8
  declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: {
9
- variant?: "default" | "destructive" | "unstyled" | "basic" | "basic-success" | "basic-info" | "basic-warning" | "basic-error";
9
+ variant?: "default" | "destructive" | "basic" | "unstyled" | "basic-success" | "basic-info" | "basic-warning" | "basic-error";
10
10
  } & import('class-variance-authority/types').ClassProp) => string> & React.RefAttributes<HTMLLIElement>>;
11
11
  declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
12
  declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,25 +1,25 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import * as t from "@radix-ui/react-toast";
3
+ import * as o from "@radix-ui/react-toast";
4
4
  import { cva as d } from "class-variance-authority";
5
5
  import { X as p } from "lucide-react";
6
6
  import { cn as i } from "../../lib/utils.js";
7
- const y = t.Provider, f = s.forwardRef(({ className: e, position: r = "top-right", ...o }, n) => /* @__PURE__ */ a(
8
- t.Viewport,
7
+ const y = o.Provider, c = s.forwardRef(({ className: t, position: e = "top-right", ...r }, n) => /* @__PURE__ */ a(
8
+ o.Viewport,
9
9
  {
10
10
  ref: n,
11
11
  className: i(
12
- "z-[400] flex max-h-screen w-full p-4 md:max-w-[420px] gap-2",
13
- !e?.includes("static") && !e?.includes("absolute") && "fixed",
14
- r.startsWith("top") ? "top-0 sm:top-8 flex-col" : "bottom-0 sm:bottom-8 flex-col-reverse",
15
- r.endsWith("left") ? "left-0 sm:left-8" : "right-0 sm:right-8",
16
- e
12
+ "z-[60] flex max-h-screen w-full p-4 md:max-w-[420px] gap-2",
13
+ !t?.includes("static") && !t?.includes("absolute") && "fixed",
14
+ e.startsWith("top") ? "top-0 sm:top-8 flex-col" : "bottom-0 sm:bottom-8 flex-col-reverse",
15
+ e.endsWith("left") ? "left-0 sm:left-8" : "right-0 sm:right-8",
16
+ t
17
17
  ),
18
- ...o
18
+ ...r
19
19
  }
20
20
  ));
21
- f.displayName = t.Viewport.displayName;
22
- const c = d(
21
+ c.displayName = o.Viewport.displayName;
22
+ const f = d(
23
23
  "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
24
24
  {
25
25
  variants: {
@@ -38,59 +38,65 @@ const c = d(
38
38
  variant: "default"
39
39
  }
40
40
  }
41
- ), l = s.forwardRef(({ className: e, variant: r, ...o }, n) => /* @__PURE__ */ a(
42
- t.Root,
41
+ ), l = s.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ a(
42
+ o.Root,
43
43
  {
44
44
  ref: n,
45
- className: i(c({ variant: r }), e),
46
- ...o
45
+ "data-component": "toast",
46
+ "data-variant": e ?? "default",
47
+ className: i(f({ variant: e }), t),
48
+ ...r
47
49
  }
48
50
  ));
49
- l.displayName = t.Root.displayName;
50
- const u = s.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a(
51
- t.Action,
51
+ l.displayName = o.Root.displayName;
52
+ const u = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
53
+ o.Action,
52
54
  {
53
- ref: o,
55
+ ref: r,
56
+ "data-component": "toast-action",
54
57
  className: i(
55
58
  "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
56
- e
59
+ t
57
60
  ),
58
- ...r
61
+ ...e
59
62
  }
60
63
  ));
61
- u.displayName = t.Action.displayName;
62
- const x = s.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a(
63
- t.Close,
64
+ u.displayName = o.Action.displayName;
65
+ const x = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
66
+ o.Close,
64
67
  {
65
- ref: o,
68
+ ref: r,
69
+ "data-component": "toast-close",
66
70
  className: i(
67
71
  "absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
68
- e
72
+ t
69
73
  ),
70
74
  "toast-close": "",
71
- ...r,
75
+ ...e,
72
76
  children: /* @__PURE__ */ a(p, { className: "h-4 w-4" })
73
77
  }
74
78
  ));
75
- x.displayName = t.Close.displayName;
76
- const m = s.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a(
77
- t.Title,
79
+ x.displayName = o.Close.displayName;
80
+ const m = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
81
+ o.Title,
78
82
  {
79
- ref: o,
80
- className: i("text-sm font-semibold [&+div]:text-xs group-[.basic]:text-center group-[.basic]:font-normal", e),
81
- ...r
83
+ ref: r,
84
+ "data-component": "toast-title",
85
+ className: i("text-sm font-semibold [&+div]:text-xs group-[.basic]:text-center group-[.basic]:font-normal", t),
86
+ ...e
82
87
  }
83
88
  ));
84
- m.displayName = t.Title.displayName;
85
- const b = s.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ a(
86
- t.Description,
89
+ m.displayName = o.Title.displayName;
90
+ const b = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
91
+ o.Description,
87
92
  {
88
- ref: o,
89
- className: i("text-sm opacity-90 group-[.basic]:text-center", e),
90
- ...r
93
+ ref: r,
94
+ "data-component": "toast-description",
95
+ className: i("text-sm opacity-90 group-[.basic]:text-center", t),
96
+ ...e
91
97
  }
92
98
  ));
93
- b.displayName = t.Description.displayName;
99
+ b.displayName = o.Description.displayName;
94
100
  export {
95
101
  l as Toast,
96
102
  u as ToastAction,
@@ -98,5 +104,5 @@ export {
98
104
  b as ToastDescription,
99
105
  y as ToastProvider,
100
106
  m as ToastTitle,
101
- f as ToastViewport
107
+ c as ToastViewport
102
108
  };