impact-nova 1.2.4 → 1.5.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 (123) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +1 -1
  16. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  18. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  19. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  20. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  21. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  23. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  24. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  25. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  26. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  27. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  28. package/dist/components/ui/alert.d.ts +1 -1
  29. package/dist/components/ui/alert.js +76 -60
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +355 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -85
  84. package/dist/components/ui/select/select.js +225 -229
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tabs.d.ts +11 -1
  90. package/dist/components/ui/tabs.js +79 -54
  91. package/dist/components/ui/tag.js +48 -44
  92. package/dist/components/ui/toast.js +46 -41
  93. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  94. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  95. package/dist/i18n/defaultMessages.d.ts +231 -0
  96. package/dist/i18n/defaultMessages.js +206 -0
  97. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  98. package/dist/i18n/getDateFnsLocale.js +21 -0
  99. package/dist/i18n/index.d.ts +5 -0
  100. package/dist/i18n/locales/de.d.ts +2 -0
  101. package/dist/i18n/locales/de.js +206 -0
  102. package/dist/i18n/locales/es.d.ts +2 -0
  103. package/dist/i18n/locales/es.js +206 -0
  104. package/dist/i18n/locales/hi.d.ts +2 -0
  105. package/dist/i18n/locales/hi.js +206 -0
  106. package/dist/i18n/locales/index.d.ts +4 -0
  107. package/dist/i18n/locales/kn.d.ts +2 -0
  108. package/dist/i18n/locales/kn.js +206 -0
  109. package/dist/icons/assets/boxAdd.svg.js +5 -0
  110. package/dist/icons/assets/boxed.svg.js +5 -0
  111. package/dist/icons/assets/trolley.svg.js +5 -0
  112. package/dist/icons/assets/unlocked.svg.js +5 -0
  113. package/dist/icons/assets/webp/delete-3d.webp.js +4 -0
  114. package/dist/icons/assets/webp/info-3d.webp.js +4 -0
  115. package/dist/icons/assets/webp/success-3d.webp.js +4 -0
  116. package/dist/icons/assets/webp/warning-3d.webp.js +4 -0
  117. package/dist/icons/index.d.ts +8 -0
  118. package/dist/icons/index.js +197 -181
  119. package/dist/impact-nova.css +1 -1
  120. package/dist/index.d.ts +4 -0
  121. package/dist/index.js +260 -199
  122. package/package.json +36 -4
  123. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,9 +1,10 @@
1
- import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
- import * as x from "react";
3
- import { cva as c } from "class-variance-authority";
4
- import { Check as w } from "lucide-react";
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import * as h from "react";
3
+ import { cva as m } from "class-variance-authority";
4
+ import { Check as V } from "lucide-react";
5
5
  import { cn as a } from "../../lib/utils.js";
6
- const N = c("flex w-full gap-0", {
6
+ import { useImpactNovaI18n as j } from "../../i18n/ImpactNovaI18nContext.js";
7
+ const I = m("flex w-full gap-0", {
7
8
  variants: {
8
9
  orientation: {
9
10
  horizontal: "flex-row items-center",
@@ -13,7 +14,7 @@ const N = c("flex w-full gap-0", {
13
14
  defaultVariants: {
14
15
  orientation: "horizontal"
15
16
  }
16
- }), y = c(
17
+ }), _ = m(
17
18
  "relative flex items-center transition-all duration-200",
18
19
  {
19
20
  variants: {
@@ -66,7 +67,7 @@ const N = c("flex w-full gap-0", {
66
67
  status: "default"
67
68
  }
68
69
  }
69
- ), z = c(
70
+ ), D = m(
70
71
  "flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] text-xs font-extrabold transition-all",
71
72
  {
72
73
  variants: {
@@ -80,62 +81,73 @@ const N = c("flex w-full gap-0", {
80
81
  status: "default"
81
82
  }
82
83
  }
83
- ), V = x.forwardRef(
84
- ({ className: u, currentStep: f, steps: p, orientation: e = "horizontal", onStepClick: m, ...h }, v) => /* @__PURE__ */ t(
85
- "div",
86
- {
87
- ref: v,
88
- className: a(N({ orientation: e }), u),
89
- "data-orientation": e,
90
- ...h,
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(
95
- "div",
96
- {
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"
105
- ),
106
- children: [
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(
110
- "text-[14px] leading-tight font-medium truncate max-w-[200px]",
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(
115
- "text-[12px] leading-tight mt-0.5 truncate max-w-[200px]",
116
- r === "completed" ? "text-[#3bb273]" : "text-muted-foreground"
117
- ), children: o.description })
118
- ] })
119
- ]
120
- }
121
- ),
122
- s < p.length - 1 && /* @__PURE__ */ t(
123
- "div",
124
- {
125
- className: a(
126
- "border-t border-dashed border-[#d9dde7] transition-colors",
127
- e === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
128
- )
129
- }
130
- )
131
- ] }, s);
132
- })
133
- }
134
- )
84
+ ), k = h.forwardRef(
85
+ ({ className: v, currentStep: b, steps: d, orientation: e = "horizontal", onStepClick: o, ...g }, w) => {
86
+ const { t: y } = j(), N = d.length;
87
+ return /* @__PURE__ */ t(
88
+ "div",
89
+ {
90
+ ref: w,
91
+ className: a(I({ orientation: e }), v),
92
+ "data-orientation": e,
93
+ role: "list",
94
+ ...g,
95
+ children: d.map((c, s) => {
96
+ const i = typeof c == "string" ? { label: c } : c, l = s + 1, u = l === b, x = l < b, n = i.disabled, r = x ? "completed" : u ? "active" : "default", z = y("stepper.stepOfTotal", { current: l, total: N });
97
+ return /* @__PURE__ */ p(h.Fragment, { children: [
98
+ /* @__PURE__ */ p(
99
+ "div",
100
+ {
101
+ role: "listitem",
102
+ onClick: () => !n && o?.(s),
103
+ "aria-label": z,
104
+ "aria-current": u ? "step" : void 0,
105
+ tabIndex: o && !n ? 0 : void 0,
106
+ onKeyDown: o && !n ? (f) => {
107
+ (f.key === "Enter" || f.key === " ") && (f.preventDefault(), o(s));
108
+ } : void 0,
109
+ "data-step": l,
110
+ "data-status": r,
111
+ "data-disabled": n || void 0,
112
+ className: a(
113
+ _({ orientation: e, status: r }),
114
+ e === "horizontal" && "min-w-[140px]",
115
+ n ? "opacity-80 cursor-not-allowed" : o ? "cursor-pointer" : "cursor-default"
116
+ ),
117
+ children: [
118
+ /* @__PURE__ */ t("div", { className: a(D({ status: r }), "mr-2"), children: x ? /* @__PURE__ */ t(V, { className: "h-4 w-4 stroke-[3px]" }) : /* @__PURE__ */ t("span", { children: i.icon || l }) }),
119
+ /* @__PURE__ */ p("div", { className: "flex flex-col justify-center overflow-hidden", children: [
120
+ /* @__PURE__ */ t("div", { className: a(
121
+ "text-[14px] leading-tight font-medium truncate max-w-[200px]",
122
+ r === "completed" ? "text-[#3bb273]" : "text-foreground",
123
+ r === "active" && e === "vertical" ? "text-primary" : ""
124
+ ), children: i.label }),
125
+ i.description && /* @__PURE__ */ t("div", { className: a(
126
+ "text-[12px] leading-tight mt-0.5 truncate max-w-[200px]",
127
+ r === "completed" ? "text-[#3bb273]" : "text-muted-foreground"
128
+ ), children: i.description })
129
+ ] })
130
+ ]
131
+ }
132
+ ),
133
+ s < d.length - 1 && /* @__PURE__ */ t(
134
+ "div",
135
+ {
136
+ className: a(
137
+ "border-t border-dashed border-[#d9dde7] transition-colors",
138
+ e === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
139
+ )
140
+ }
141
+ )
142
+ ] }, s);
143
+ })
144
+ }
145
+ );
146
+ }
135
147
  );
136
- V.displayName = "Stepper";
148
+ k.displayName = "Stepper";
137
149
  export {
138
- V as Stepper,
139
- y as stepVariants,
140
- N as stepperVariants
150
+ k as Stepper,
151
+ _ as stepVariants,
152
+ I as stepperVariants
141
153
  };
@@ -1,16 +1,26 @@
1
1
  import * as React from "react";
2
2
  import * as TabsPrimitive from "@radix-ui/react-tabs";
3
3
  declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
4
- variant?: "line" | "pill" | "outline";
4
+ variant?: "line" | "pill" | "outline" | "box";
5
5
  size?: "default" | "sm";
6
6
  hideInactiveLabel?: boolean;
7
7
  tooltipClassName?: string;
8
8
  maxWords?: number;
9
9
  } & React.RefAttributes<HTMLDivElement>>;
10
10
  declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ export type ActiveColorConfig = {
12
+ text: string;
13
+ bg: string;
14
+ border: string;
15
+ };
11
16
  declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
12
17
  icon?: React.ReactNode;
13
18
  maxWords?: number;
19
+ activeColor?: ActiveColorConfig;
14
20
  } & React.RefAttributes<HTMLButtonElement>>;
15
21
  declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ export declare const TabsImage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
23
+ activeImage: React.ReactNode;
24
+ inactiveImage: React.ReactNode;
25
+ } & React.RefAttributes<HTMLDivElement>>;
16
26
  export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -1,66 +1,76 @@
1
- import { jsx as s, jsxs as w, Fragment as j } from "react/jsx-runtime";
2
- import * as n from "react";
3
- import * as r from "@radix-ui/react-tabs";
4
- import { cn as f } from "../../lib/utils.js";
5
- import { Tooltip as R, TooltipTrigger as V, TooltipContent as W } from "./tooltip.js";
6
- const h = n.createContext({
1
+ import { jsx as r, jsxs as g, Fragment as j } from "react/jsx-runtime";
2
+ import * as i from "react";
3
+ import * as d from "@radix-ui/react-tabs";
4
+ import { cn as p } from "../../lib/utils.js";
5
+ import { Tooltip as W, TooltipTrigger as z, TooltipContent as I } from "./tooltip.js";
6
+ const N = i.createContext({
7
7
  variant: "line",
8
8
  size: "default"
9
9
  }), L = (t, a) => {
10
10
  const e = t.split(/\s+/);
11
11
  return e.length <= a ? t : e.slice(0, a).join(" ") + "...";
12
- }, k = n.forwardRef(({ variant: t = "line", size: a = "default", hideInactiveLabel: e = !1, tooltipClassName: o, maxWords: m, value: i, defaultValue: l, onValueChange: x, ...b }, p) => {
13
- const [g, u] = n.useState(i || l);
14
- n.useEffect(() => {
15
- i !== void 0 && u(i);
16
- }, [i]);
17
- const d = (c) => {
18
- i === void 0 && u(c), x?.(c);
12
+ }, S = i.forwardRef(({ variant: t = "line", size: a = "default", hideInactiveLabel: e = !1, tooltipClassName: s, maxWords: n, value: o, defaultValue: b, onValueChange: h, ...l }, v) => {
13
+ const [y, c] = i.useState(o || b);
14
+ i.useEffect(() => {
15
+ o !== void 0 && c(o);
16
+ }, [o]);
17
+ const w = (x) => {
18
+ o === void 0 && c(x), h?.(x);
19
19
  };
20
- return /* @__PURE__ */ s(h.Provider, { value: { variant: t, size: a, activeValue: g, hideInactiveLabel: e, tooltipClassName: o, maxWords: m }, children: /* @__PURE__ */ s(
21
- r.Root,
20
+ return /* @__PURE__ */ r(N.Provider, { value: { variant: t, size: a, activeValue: y, hideInactiveLabel: e, tooltipClassName: s, maxWords: n }, children: /* @__PURE__ */ r(
21
+ d.Root,
22
22
  {
23
- ref: p,
24
- value: i,
25
- defaultValue: l,
26
- onValueChange: d,
23
+ ref: v,
24
+ value: o,
25
+ defaultValue: b,
26
+ onValueChange: w,
27
27
  "data-component": "tabs",
28
28
  "data-variant": t,
29
- ...b
29
+ ...l
30
30
  }
31
31
  ) });
32
32
  });
33
- k.displayName = r.Root.displayName;
34
- const z = n.forwardRef(({ className: t, ...a }, e) => {
35
- const { variant: o } = n.useContext(h);
36
- return /* @__PURE__ */ s(
37
- r.List,
33
+ S.displayName = d.Root.displayName;
34
+ const F = i.forwardRef(({ className: t, ...a }, e) => {
35
+ const { variant: s } = i.useContext(N);
36
+ return /* @__PURE__ */ r(
37
+ d.List,
38
38
  {
39
39
  ref: e,
40
40
  "data-tabs": "list",
41
- className: f(
41
+ className: p(
42
42
  "inline-flex items-center justify-center rounded-lg",
43
- o === "line" && "h-10 bg-white border w-full justify-start gap-2 px-2 shrink-0 py-0",
44
- o === "pill" && "h-10 p-1 bg-[#eceefd] text-[#4259ee] gap-1",
45
- o === "outline" && "bg-transparent gap-2 p-0 w-full justify-start",
43
+ s === "line" && "h-10 bg-white border w-full justify-start gap-2 px-2 shrink-0 py-0",
44
+ s === "pill" && "h-10 p-1 bg-[#eceefd] text-[#4259ee] gap-1",
45
+ s === "outline" && "bg-transparent gap-2 p-0 w-full justify-start",
46
+ s === "box" && "h-auto bg-transparent border-0 w-full justify-start gap-[16px] p-0 shrink-0",
46
47
  t
47
48
  ),
48
49
  ...a
49
50
  }
50
51
  );
51
- });
52
- z.displayName = r.List.displayName;
53
- const M = n.forwardRef(({ className: t, icon: a, children: e, maxWords: o, ...m }, i) => {
54
- const { variant: l, size: x, activeValue: b, hideInactiveLabel: p, tooltipClassName: g, maxWords: u } = n.useContext(h), d = o ?? u, c = b === m.value, v = typeof e == "string", N = v && d ? L(e, d) : e, C = v && d && e.split(/\s+/).length > d, T = p && !c || C, y = /* @__PURE__ */ w(j, { children: [
55
- a && /* @__PURE__ */ s("span", { className: f("h-4 w-4 shrink-0", !p || c ? "mr-2" : "mr-0"), children: a }),
56
- /* @__PURE__ */ s("span", { className: f(p && !c && "sr-only"), children: N })
52
+ }), D = i.forwardRef(({ className: t, icon: a, children: e, maxWords: s, activeColor: n, style: o, ...b }, h) => {
53
+ const { variant: l, size: v, activeValue: y, hideInactiveLabel: c, tooltipClassName: w, maxWords: x } = i.useContext(N), m = s ?? x, f = y === b.value, C = typeof e == "string", R = C && m ? L(e, m) : e, k = C && m && e.split(/\s+/).length > m, V = c && !f || k, u = { ...o };
54
+ l === "box" && n && f && (u["--tab-border"] = n.border, u["--tab-bg"] = n.bg, u["--tab-text"] = n.text);
55
+ const T = l === "box" ? /* @__PURE__ */ g(j, { children: [
56
+ e,
57
+ f && /* @__PURE__ */ r(
58
+ "span",
59
+ {
60
+ className: "absolute -bottom-[5.5px] left-1/2 -translate-x-1/2 w-[11px] h-[11px] rotate-45 border-b border-r",
61
+ style: { backgroundColor: "inherit", borderBottomColor: "inherit", borderRightColor: "inherit" }
62
+ }
63
+ )
64
+ ] }) : /* @__PURE__ */ g(j, { children: [
65
+ a && /* @__PURE__ */ r("span", { className: p("h-4 w-4 shrink-0", !c || f ? "mr-2" : "mr-0"), children: a }),
66
+ /* @__PURE__ */ r("span", { className: p(c && !f && "sr-only"), children: R })
57
67
  ] });
58
- return /* @__PURE__ */ s(
59
- r.Trigger,
68
+ return /* @__PURE__ */ r(
69
+ d.Trigger,
60
70
  {
61
- ref: i,
71
+ ref: h,
62
72
  "data-tabs": "trigger",
63
- className: f(
73
+ className: p(
64
74
  "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",
65
75
  l === "line" && [
66
76
  "h-full rounded-none border-b-2 border-transparent px-1 text-[13px] font-medium capitalize text-[#60697d] -mb-[1px]",
@@ -76,35 +86,50 @@ const M = n.forwardRef(({ className: t, icon: a, children: e, maxWords: o, ...m
76
86
  "rounded-full border border-[#5f6673] bg-white text-[#5f6673] font-['Manrope']",
77
87
  "hover:bg-slate-50 hover:text-[#1f2b4d]",
78
88
  "data-[state=active]:border-[#4259ee] data-[state=active]:text-[#4259ee]",
79
- x === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
89
+ v === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
90
+ ],
91
+ l === "box" && [
92
+ "group flex flex-row items-center justify-between min-w-[231px] w-fit gap-4 min-h-[45px] h-auto py-2 px-[16px] rounded-[8px] bg-white text-[#60697D] transition-none hover:bg-slate-50 overflow-visible",
93
+ "border border-[#C3C8D4]",
94
+ "text-[16px]",
95
+ "data-[state=active]:border-[color:var(--tab-border,#4259ee)]",
96
+ "data-[state=active]:bg-[color:var(--tab-bg,#f8f9fb)]",
97
+ "data-[state=active]:text-[color:var(--tab-text,#3649c6)]"
80
98
  ],
81
99
  t
82
100
  ),
83
- ...m,
84
- children: T ? /* @__PURE__ */ w(R, { children: [
85
- /* @__PURE__ */ s(V, { asChild: !0, children: /* @__PURE__ */ s("span", { className: "inline-flex items-center justify-center h-full w-full", children: y }) }),
86
- /* @__PURE__ */ s(W, { variant: "tertiary", className: g, children: e })
87
- ] }) : y
101
+ style: u,
102
+ ...b,
103
+ children: V ? /* @__PURE__ */ g(W, { children: [
104
+ /* @__PURE__ */ r(z, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "inline-flex items-center justify-center h-full w-full", children: T }) }),
105
+ /* @__PURE__ */ r(I, { variant: "tertiary", className: w, children: e })
106
+ ] }) : T
88
107
  }
89
108
  );
90
109
  });
91
- M.displayName = r.Trigger.displayName;
92
- const P = n.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
93
- r.Content,
110
+ D.displayName = d.Trigger.displayName;
111
+ const M = i.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ r(
112
+ d.Content,
94
113
  {
95
114
  ref: e,
96
115
  "data-tabs": "content",
97
- className: f(
116
+ className: p(
98
117
  "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
99
118
  t
100
119
  ),
101
120
  ...a
102
121
  }
103
122
  ));
104
- P.displayName = r.Content.displayName;
123
+ M.displayName = d.Content.displayName;
124
+ const P = i.forwardRef(({ className: t, activeImage: a, inactiveImage: e, ...s }, n) => /* @__PURE__ */ g("div", { ref: n, className: p("relative flex items-center justify-center shrink-0", t), ...s, children: [
125
+ /* @__PURE__ */ r("div", { className: "flex group-data-[state=active]:hidden", children: e }),
126
+ /* @__PURE__ */ r("div", { className: "hidden group-data-[state=active]:flex", children: a })
127
+ ] }));
128
+ P.displayName = "TabsImage";
105
129
  export {
106
- k as Tabs,
107
- P as TabsContent,
108
- z as TabsList,
109
- M as TabsTrigger
130
+ S as Tabs,
131
+ M as TabsContent,
132
+ P as TabsImage,
133
+ F as TabsList,
134
+ D as TabsTrigger
110
135
  };
@@ -1,11 +1,12 @@
1
- import { jsxs as c, 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 { Button as v } from "./button.js";
7
- import { cn as w } from "../../lib/utils.js";
8
- const y = h(
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import * as x from "react";
3
+ import { Slot as h } from "@radix-ui/react-slot";
4
+ import { cva as u } from "class-variance-authority";
5
+ import { X as v } from "lucide-react";
6
+ import { Button as w } from "./button.js";
7
+ import { cn as y } from "../../lib/utils.js";
8
+ import { useImpactNovaI18n as N } from "../../i18n/ImpactNovaI18nContext.js";
9
+ const j = u(
9
10
  "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",
10
11
  {
11
12
  variants: {
@@ -38,42 +39,45 @@ const y = h(
38
39
  shape: "pill"
39
40
  }
40
41
  }
41
- ), j = m.forwardRef(
42
- ({ className: i, variant: r, size: t, shape: o, leftIcon: a, rightIcon: n, removable: s, onRemove: d, asChild: l = !1, children: p, ...f }, g) => /* @__PURE__ */ c(
43
- l ? x : "span",
44
- {
45
- ref: g,
46
- className: w(y({ variant: r, size: t, shape: o }), i),
47
- "data-component": "tag",
48
- "data-variant": r ?? "default",
49
- "data-size": t ?? "md",
50
- "data-shape": o ?? "pill",
51
- ...f,
52
- children: [
53
- a && /* @__PURE__ */ e("span", { className: "mr-1.5 flex shrink-0 items-center justify-center", children: a }),
54
- p,
55
- n && /* @__PURE__ */ e("span", { className: "ml-1.5 flex shrink-0 items-center justify-center", children: n }),
56
- s && /* @__PURE__ */ e(
57
- v,
58
- {
59
- type: "button",
60
- variant: "ghost",
61
- size: "icon",
62
- "aria-label": "Remove",
63
- onClick: (b) => {
64
- b.stopPropagation(), d?.();
65
- },
66
- className: "ml-1.5 h-4 w-4 shrink-0 rounded-full hover:bg-black/10 transition-colors p-0 [&_svg]:size-3",
67
- "data-component": "tag-remove",
68
- children: /* @__PURE__ */ e(u, {})
69
- }
70
- )
71
- ]
72
- }
73
- )
42
+ ), k = x.forwardRef(
43
+ ({ className: i, variant: r, size: t, shape: o, leftIcon: a, rightIcon: n, removable: s, onRemove: d, asChild: l = !1, children: p, ...f }, g) => {
44
+ const { t: b } = N();
45
+ return /* @__PURE__ */ m(
46
+ l ? h : "span",
47
+ {
48
+ ref: g,
49
+ className: y(j({ variant: r, size: t, shape: o }), i),
50
+ "data-component": "tag",
51
+ "data-variant": r ?? "default",
52
+ "data-size": t ?? "md",
53
+ "data-shape": o ?? "pill",
54
+ ...f,
55
+ children: [
56
+ a && /* @__PURE__ */ e("span", { className: "mr-1.5 flex shrink-0 items-center justify-center", children: a }),
57
+ p,
58
+ n && /* @__PURE__ */ e("span", { className: "ml-1.5 flex shrink-0 items-center justify-center", children: n }),
59
+ s && /* @__PURE__ */ e(
60
+ w,
61
+ {
62
+ type: "button",
63
+ variant: "ghost",
64
+ size: "icon",
65
+ "aria-label": b("aria.remove"),
66
+ onClick: (c) => {
67
+ c.stopPropagation(), d?.();
68
+ },
69
+ className: "ml-1.5 h-4 w-4 shrink-0 rounded-full hover:bg-black/10 transition-colors p-0 [&_svg]:size-3",
70
+ "data-component": "tag-remove",
71
+ children: /* @__PURE__ */ e(v, {})
72
+ }
73
+ )
74
+ ]
75
+ }
76
+ );
77
+ }
74
78
  );
75
- j.displayName = "Tag";
79
+ k.displayName = "Tag";
76
80
  export {
77
- j as Tag,
78
- y as tagVariants
81
+ k as Tag,
82
+ j as tagVariants
79
83
  };
@@ -1,11 +1,12 @@
1
- import { jsx as a, jsxs as d } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as p } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import * as o from "@radix-ui/react-toast";
4
- import { cva as p } from "class-variance-authority";
5
- import { X as c } from "lucide-react";
4
+ import { cva as c } from "class-variance-authority";
5
+ import { X as f } from "lucide-react";
6
6
  import { cn as i } from "../../lib/utils.js";
7
- import { Tooltip as f, TooltipTrigger as l, TooltipContent as u } from "./tooltip.js";
8
- const R = o.Provider, x = s.forwardRef(({ className: t, position: e = "top-right", ...r }, n) => /* @__PURE__ */ a(
7
+ import { Tooltip as l, TooltipTrigger as u, TooltipContent as m } from "./tooltip.js";
8
+ import { useImpactNovaI18n as x } from "../../i18n/ImpactNovaI18nContext.js";
9
+ const A = o.Provider, b = s.forwardRef(({ className: t, position: e = "top-right", ...r }, n) => /* @__PURE__ */ a(
9
10
  o.Viewport,
10
11
  {
11
12
  ref: n,
@@ -19,8 +20,8 @@ const R = o.Provider, x = s.forwardRef(({ className: t, position: e = "top-right
19
20
  ...r
20
21
  }
21
22
  ));
22
- x.displayName = o.Viewport.displayName;
23
- const m = p(
23
+ b.displayName = o.Viewport.displayName;
24
+ const g = c(
24
25
  "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",
25
26
  {
26
27
  variants: {
@@ -39,18 +40,18 @@ const m = p(
39
40
  variant: "default"
40
41
  }
41
42
  }
42
- ), b = s.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ a(
43
+ ), h = s.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ a(
43
44
  o.Root,
44
45
  {
45
46
  ref: n,
46
47
  "data-component": "toast",
47
48
  "data-variant": e ?? "default",
48
- className: i(m({ variant: e }), t),
49
+ className: i(g({ variant: e }), t),
49
50
  ...r
50
51
  }
51
52
  ));
52
- b.displayName = o.Root.displayName;
53
- const g = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
53
+ h.displayName = o.Root.displayName;
54
+ const v = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
54
55
  o.Action,
55
56
  {
56
57
  ref: r,
@@ -62,26 +63,30 @@ const g = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
62
63
  ...e
63
64
  }
64
65
  ));
65
- g.displayName = o.Action.displayName;
66
- const h = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ d(f, { children: [
67
- /* @__PURE__ */ a(l, { asChild: !0, children: /* @__PURE__ */ a(
68
- o.Close,
69
- {
70
- ref: r,
71
- "data-component": "toast-close",
72
- className: i(
73
- "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",
74
- t
75
- ),
76
- "toast-close": "",
77
- ...e,
78
- children: /* @__PURE__ */ a(c, { className: "h-4 w-4" })
79
- }
80
- ) }),
81
- /* @__PURE__ */ a(u, { variant: "tertiary", side: "top", children: "Close" })
82
- ] }));
83
- h.displayName = o.Close.displayName;
84
- const v = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
66
+ v.displayName = o.Action.displayName;
67
+ const w = s.forwardRef(({ className: t, ...e }, r) => {
68
+ const { t: n } = x(), d = n("aria.close");
69
+ return /* @__PURE__ */ p(l, { children: [
70
+ /* @__PURE__ */ a(u, { asChild: !0, children: /* @__PURE__ */ a(
71
+ o.Close,
72
+ {
73
+ ref: r,
74
+ "data-component": "toast-close",
75
+ className: i(
76
+ "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",
77
+ t
78
+ ),
79
+ "toast-close": "",
80
+ "aria-label": d,
81
+ ...e,
82
+ children: /* @__PURE__ */ a(f, { className: "h-4 w-4" })
83
+ }
84
+ ) }),
85
+ /* @__PURE__ */ a(m, { variant: "tertiary", side: "top", children: d })
86
+ ] });
87
+ });
88
+ w.displayName = o.Close.displayName;
89
+ const y = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
85
90
  o.Title,
86
91
  {
87
92
  ref: r,
@@ -90,8 +95,8 @@ const v = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
90
95
  ...e
91
96
  }
92
97
  ));
93
- v.displayName = o.Title.displayName;
94
- const w = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
98
+ y.displayName = o.Title.displayName;
99
+ const _ = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
95
100
  o.Description,
96
101
  {
97
102
  ref: r,
@@ -100,13 +105,13 @@ const w = s.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
100
105
  ...e
101
106
  }
102
107
  ));
103
- w.displayName = o.Description.displayName;
108
+ _.displayName = o.Description.displayName;
104
109
  export {
105
- b as Toast,
106
- g as ToastAction,
107
- h as ToastClose,
108
- w as ToastDescription,
109
- R as ToastProvider,
110
- v as ToastTitle,
111
- x as ToastViewport
110
+ h as Toast,
111
+ v as ToastAction,
112
+ w as ToastClose,
113
+ _ as ToastDescription,
114
+ A as ToastProvider,
115
+ y as ToastTitle,
116
+ b as ToastViewport
112
117
  };