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,58 +1,65 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import { useContext as d, createContext as f } from "react";
3
- import { Sheet as m, SheetContent as h, SheetDescription as p, SheetTitle as x, SheetClose as u } from "../sheet.js";
4
- import { Button as N } from "../button.js";
5
- import { Bell as w, X as b } from "lucide-react";
6
- import { cn as a } from "../../../lib/utils.js";
7
- const l = f(null), S = () => {
8
- const e = d(l);
9
- if (!e)
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { useContext as m, createContext as h } from "react";
3
+ import { Sheet as p, SheetContent as x, SheetDescription as u, SheetTitle as N, SheetClose as w } from "../sheet.js";
4
+ import { Button as b } from "../button.js";
5
+ import { Bell as v, X as g } from "lucide-react";
6
+ import { cn as r } from "../../../lib/utils.js";
7
+ import { useImpactNovaI18n as s } from "../../../i18n/ImpactNovaI18nContext.js";
8
+ const d = h(null), B = () => {
9
+ const t = m(d);
10
+ if (!t)
10
11
  throw new Error("useNotificationContext must be used within a NotificationPanel");
11
- return e;
12
- }, D = ({
13
- open: e,
12
+ return t;
13
+ }, I = ({
14
+ open: t,
14
15
  onOpenChange: n,
15
- children: i,
16
- className: s,
17
- preventClose: c = !1
18
- }) => /* @__PURE__ */ t(l.Provider, { value: { setPreventClose: () => {
19
- } }, children: /* @__PURE__ */ t(m, { open: e, onOpenChange: n, children: /* @__PURE__ */ o(
20
- h,
21
- {
22
- side: "right",
23
- className: a(
24
- "w-full !max-w-[640px] p-0 sm:!max-w-[640px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-white",
25
- s
26
- ),
27
- onInteractOutside: (r) => {
28
- c && r.preventDefault();
29
- },
30
- onEscapeKeyDown: (r) => {
31
- c && r.preventDefault();
32
- },
33
- children: [
34
- /* @__PURE__ */ t(p, { className: "sr-only", children: "Notifications" }),
35
- i
36
- ]
37
- }
38
- ) }) }), k = ({ children: e, className: n }) => /* @__PURE__ */ t("div", { "data-component": "notification-panel-content", className: a("flex h-full flex-col bg-white", n), children: e }), B = ({ title: e = "Notifications", children: n, className: i }) => /* @__PURE__ */ o("div", { "data-component": "notification-panel-header", className: a("flex shrink-0 items-center justify-between border-b px-4 py-3 bg-white", i), children: [
39
- /* @__PURE__ */ o("div", { className: "flex items-center gap-3", children: [
40
- /* @__PURE__ */ t("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ t(w, { className: "h-5 w-5 text-gray-500" }) }),
41
- typeof e == "string" ? /* @__PURE__ */ t(x, { className: "text-lg font-bold text-[#1f2b4d]", children: e }) : e
42
- ] }),
43
- /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
44
- n,
45
- /* @__PURE__ */ t(u, { asChild: !0, children: /* @__PURE__ */ t(N, { variant: "secondary", size: "icon", "aria-label": "Close", "data-component": "notification-panel-close", children: /* @__PURE__ */ t(b, { className: "h-4 w-4" }) }) })
46
- ] })
47
- ] }), E = ({ children: e, className: n }) => /* @__PURE__ */ t("div", { "data-component": "notification-panel-body", className: a("flex flex-1 flex-col overflow-hidden bg-background", n), children: e }), z = ({ children: e, className: n, leftAction: i }) => /* @__PURE__ */ o("div", { "data-component": "notification-panel-footer", className: a("flex items-center justify-between border-t p-4 bg-white shrink-0 mt-auto shadow-md", n), children: [
48
- /* @__PURE__ */ t("div", { children: i }),
49
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: e })
16
+ children: o,
17
+ className: l,
18
+ preventClose: i = !1
19
+ }) => {
20
+ const { t: f } = s();
21
+ return /* @__PURE__ */ e(d.Provider, { value: { setPreventClose: () => {
22
+ } }, children: /* @__PURE__ */ e(p, { open: t, onOpenChange: n, children: /* @__PURE__ */ a(
23
+ x,
24
+ {
25
+ side: "right",
26
+ className: r(
27
+ "w-full !max-w-[640px] p-0 sm:!max-w-[640px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-white",
28
+ l
29
+ ),
30
+ onInteractOutside: (c) => {
31
+ i && c.preventDefault();
32
+ },
33
+ onEscapeKeyDown: (c) => {
34
+ i && c.preventDefault();
35
+ },
36
+ children: [
37
+ /* @__PURE__ */ e(u, { className: "sr-only", children: f("notificationPanel.description") }),
38
+ o
39
+ ]
40
+ }
41
+ ) }) });
42
+ }, E = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-content", className: r("flex h-full flex-col bg-white", n), children: t }), T = ({ title: t, children: n, className: o }) => {
43
+ const { t: l } = s(), i = t ?? l("notificationPanel.title");
44
+ return /* @__PURE__ */ a("div", { "data-component": "notification-panel-header", className: r("flex shrink-0 items-center justify-between border-b px-4 py-3 bg-white", o), children: [
45
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
46
+ /* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(v, { className: "h-5 w-5 text-gray-500" }) }),
47
+ typeof i == "string" ? /* @__PURE__ */ e(N, { className: "text-lg font-bold text-[#1f2b4d]", children: i }) : i
48
+ ] }),
49
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
50
+ n,
51
+ /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(b, { variant: "secondary", size: "icon", "aria-label": l("aria.close"), "data-component": "notification-panel-close", children: /* @__PURE__ */ e(g, { className: "h-4 w-4" }) }) })
52
+ ] })
53
+ ] });
54
+ }, z = ({ children: t, className: n }) => /* @__PURE__ */ e("div", { "data-component": "notification-panel-body", className: r("flex flex-1 flex-col overflow-hidden bg-background", n), children: t }), F = ({ children: t, className: n, leftAction: o }) => /* @__PURE__ */ a("div", { "data-component": "notification-panel-footer", className: r("flex items-center justify-between border-t p-4 bg-white shrink-0 mt-auto shadow-md", n), children: [
55
+ /* @__PURE__ */ e("div", { children: o }),
56
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: t })
50
57
  ] });
51
58
  export {
52
- D as NotificationPanel,
53
- E as NotificationPanelBody,
54
- k as NotificationPanelContent,
55
- z as NotificationPanelFooter,
56
- B as NotificationPanelHeader,
57
- S as useNotificationContext
59
+ I as NotificationPanel,
60
+ z as NotificationPanelBody,
61
+ E as NotificationPanelContent,
62
+ F as NotificationPanelFooter,
63
+ T as NotificationPanelHeader,
64
+ B as useNotificationContext
58
65
  };
@@ -1,25 +1,26 @@
1
- import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
+ import * as l from "react";
3
3
  import * as a from "@radix-ui/react-popover";
4
4
  import { X as p } from "lucide-react";
5
5
  import { Tooltip as m, TooltipTrigger as c, TooltipContent as f } from "./tooltip.js";
6
6
  import { cn as r } from "../../lib/utils.js";
7
- const w = a.Root, T = a.Trigger, j = a.Anchor, v = s.forwardRef(({ className: e, align: o = "center", sideOffset: n = 4, ...d }, l) => /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
7
+ import { useImpactNovaI18n as v } from "../../i18n/ImpactNovaI18nContext.js";
8
+ const j = a.Root, R = a.Trigger, z = a.Anchor, h = l.forwardRef(({ className: e, align: o = "center", sideOffset: i = 4, ...s }, n) => /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(
8
9
  a.Content,
9
10
  {
10
- ref: l,
11
+ ref: n,
11
12
  align: o,
12
- sideOffset: n,
13
+ sideOffset: i,
13
14
  "data-component": "popover-content",
14
15
  className: r(
15
16
  "z-50 min-w-[240px] rounded-xl border bg-popover p-3 text-popover-foreground shadow-md outline-none overflow-hidden 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin] pointer-events-auto",
16
17
  e
17
18
  ),
18
- ...d
19
+ ...s
19
20
  }
20
21
  ) }));
21
- v.displayName = a.Content.displayName;
22
- const h = ({
22
+ h.displayName = a.Content.displayName;
23
+ const N = ({
23
24
  className: e,
24
25
  ...o
25
26
  }) => /* @__PURE__ */ t(
@@ -29,7 +30,7 @@ const h = ({
29
30
  ...o
30
31
  }
31
32
  );
32
- h.displayName = "PopoverHeader";
33
+ N.displayName = "PopoverHeader";
33
34
  const g = ({
34
35
  className: e,
35
36
  ...o
@@ -45,47 +46,51 @@ const g = ({
45
46
  }
46
47
  );
47
48
  g.displayName = "PopoverTitle";
48
- const x = s.forwardRef(({ className: e, ...o }, n) => /* @__PURE__ */ i(m, { children: [
49
- /* @__PURE__ */ t(c, { asChild: !0, children: /* @__PURE__ */ i(
50
- a.Close,
51
- {
52
- ref: n,
53
- "data-component": "popover-close",
54
- className: r(
55
- "rounded-sm opacity-70 transition-opacity hover:opacity-100 outline-none focus:ring-0 disabled:pointer-events-none",
56
- e
57
- ),
58
- ...o,
59
- children: [
60
- /* @__PURE__ */ t(p, { className: "h-4 w-4 text-[#60697d]" }),
61
- /* @__PURE__ */ t("span", { className: "sr-only", children: "Close" })
62
- ]
63
- }
64
- ) }),
65
- /* @__PURE__ */ t(f, { variant: "tertiary", side: "top", children: "Close" })
66
- ] }));
49
+ const x = l.forwardRef(({ className: e, ...o }, i) => {
50
+ const { t: s } = v(), n = s("aria.close");
51
+ return /* @__PURE__ */ d(m, { children: [
52
+ /* @__PURE__ */ t(c, { asChild: !0, children: /* @__PURE__ */ d(
53
+ a.Close,
54
+ {
55
+ ref: i,
56
+ "data-component": "popover-close",
57
+ className: r(
58
+ "rounded-sm opacity-70 transition-opacity hover:opacity-100 outline-none focus:ring-0 disabled:pointer-events-none",
59
+ e
60
+ ),
61
+ "aria-label": n,
62
+ ...o,
63
+ children: [
64
+ /* @__PURE__ */ t(p, { className: "h-4 w-4 text-[#60697d]" }),
65
+ /* @__PURE__ */ t("span", { className: "sr-only", children: n })
66
+ ]
67
+ }
68
+ ) }),
69
+ /* @__PURE__ */ t(f, { variant: "tertiary", side: "top", children: n })
70
+ ] });
71
+ });
67
72
  x.displayName = a.Close.displayName;
68
- const N = ({
73
+ const y = ({
69
74
  className: e,
70
75
  ...o
71
76
  }) => /* @__PURE__ */ t("div", { className: r("text-sm", e), ...o });
72
- N.displayName = "PopoverBody";
73
- const y = ({
77
+ y.displayName = "PopoverBody";
78
+ const u = ({
74
79
  className: e,
75
80
  ...o
76
- }) => /* @__PURE__ */ i("div", { className: r("mt-4 flex flex-col gap-3", e), ...o, children: [
81
+ }) => /* @__PURE__ */ d("div", { className: r("mt-4 flex flex-col gap-3", e), ...o, children: [
77
82
  /* @__PURE__ */ t("div", { className: "h-[1px] w-full bg-[#f0f2f5]" }),
78
83
  /* @__PURE__ */ t("div", { className: "flex justify-end gap-2", children: o.children })
79
84
  ] });
80
- y.displayName = "PopoverFooter";
85
+ u.displayName = "PopoverFooter";
81
86
  export {
82
- w as Popover,
83
- j as PopoverAnchor,
84
- N as PopoverBody,
87
+ j as Popover,
88
+ z as PopoverAnchor,
89
+ y as PopoverBody,
85
90
  x as PopoverClose,
86
- v as PopoverContent,
87
- y as PopoverFooter,
88
- h as PopoverHeader,
91
+ h as PopoverContent,
92
+ u as PopoverFooter,
93
+ N as PopoverHeader,
89
94
  g as PopoverTitle,
90
- T as PopoverTrigger
95
+ R as PopoverTrigger
91
96
  };
@@ -1,12 +1,14 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { cva as P } from "class-variance-authority";
4
- import { Info as k, CheckCircle2 as R, AlertTriangle as V, Trash2 as A, X as B } from "lucide-react";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import * as p from "react";
3
+ import { cva as V } from "class-variance-authority";
4
+ import { X as k } from "lucide-react";
5
+ import { Info3d as B, Success3d as F, Warning3d as H, Delete3d as S } from "../../icons/index.js";
5
6
  import { cn as r } from "../../lib/utils.js";
6
- import { Tooltip as F, TooltipTrigger as H, TooltipContent as I } from "./tooltip.js";
7
- import { Button as f } from "./button.js";
8
- import { Dialog as X, DialogContent as q, DialogHeader as E, DialogTitle as G, DialogDescription as J, DialogFooter as K } from "./dialog.js";
9
- const $ = P("", {
7
+ import { Tooltip as W, TooltipTrigger as X, TooltipContent as q } from "./tooltip.js";
8
+ import { Button as m } from "./button.js";
9
+ import { Dialog as A, DialogContent as E, DialogHeader as G, DialogTitle as J, DialogDescription as K, DialogFooter as M } from "./dialog.js";
10
+ import { useImpactNovaI18n as u } from "../../i18n/ImpactNovaI18nContext.js";
11
+ const se = V("", {
10
12
  variants: {
11
13
  variant: {
12
14
  default: "",
@@ -19,64 +21,67 @@ const $ = P("", {
19
21
  defaultVariants: {
20
22
  variant: "default"
21
23
  }
22
- }), L = m.forwardRef(({ className: l, ...i }, a) => /* @__PURE__ */ o(F, { children: [
23
- /* @__PURE__ */ e(H, { asChild: !0, children: /* @__PURE__ */ e(
24
- "button",
25
- {
26
- ref: a,
27
- className: r("text-[#60697d] hover:text-[#0d152c] transition-colors", l),
28
- type: "button",
29
- "aria-label": "Close",
30
- ...i,
31
- children: /* @__PURE__ */ e(B, { size: 16 })
32
- }
33
- ) }),
34
- /* @__PURE__ */ e(I, { side: "top", variant: "tertiary", children: "Close" })
35
- ] }));
36
- L.displayName = "PromptClose";
37
- const M = m.forwardRef(
24
+ }), Q = p.forwardRef(({ className: c, ...s }, l) => {
25
+ const { t: i } = u();
26
+ return /* @__PURE__ */ a(W, { children: [
27
+ /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(
28
+ "button",
29
+ {
30
+ ref: l,
31
+ className: r("text-[#60697d] hover:text-[#0d152c] transition-colors", c),
32
+ type: "button",
33
+ "aria-label": i("aria.close"),
34
+ ...s,
35
+ children: /* @__PURE__ */ e(k, { size: 16 })
36
+ }
37
+ ) }),
38
+ /* @__PURE__ */ e(q, { side: "top", variant: "tertiary", children: i("aria.close") })
39
+ ] });
40
+ });
41
+ Q.displayName = "PromptClose";
42
+ const U = p.forwardRef(
38
43
  ({
39
- open: l,
40
- onOpenChange: i,
41
- title: a,
42
- description: c,
43
- confirmLabel: p = "Confirm",
44
- cancelLabel: u = "Cancel",
45
- onConfirm: x,
46
- onCancel: h,
47
- confirmVariant: b,
48
- cancelVariant: g = "secondary",
44
+ open: c,
45
+ onOpenChange: s,
46
+ title: l,
47
+ description: i,
48
+ confirmLabel: x,
49
+ cancelLabel: b,
50
+ onConfirm: h,
51
+ onCancel: g,
52
+ confirmVariant: N,
53
+ cancelVariant: w = "secondary",
49
54
  variant: t = "default",
50
- showClose: C = !0,
51
- preventOutsideClick: w = !1,
55
+ showClose: v = !0,
56
+ preventOutsideClick: y = !1,
52
57
  footer: n,
53
58
  children: d,
54
- className: N,
55
- ...y
56
- }, v) => {
57
- const D = () => {
58
- x?.(), i?.(!1);
59
- }, T = () => {
60
- h?.(), i?.(!1);
61
- }, s = t !== "default", j = b || (t === "destructive" ? "destructive" : "default");
62
- return /* @__PURE__ */ e(X, { open: l, onOpenChange: i, ...y, children: /* @__PURE__ */ o(
63
- q,
59
+ className: C,
60
+ ...D
61
+ }, j) => {
62
+ const { t: f } = u(), z = b ?? f("prompt.cancel"), P = x ?? f("prompt.confirm"), T = () => {
63
+ h?.(), s?.(!1);
64
+ }, I = () => {
65
+ g?.(), s?.(!1);
66
+ }, o = t !== "default", L = N || (t === "destructive" ? "destructive" : "default");
67
+ return /* @__PURE__ */ e(A, { open: c, onOpenChange: s, ...D, children: /* @__PURE__ */ a(
68
+ E,
64
69
  {
65
- ref: v,
70
+ ref: j,
66
71
  "aria-describedby": void 0,
67
- hideClose: !C,
68
- onPointerDownOutside: (z) => {
69
- w && z.preventDefault();
72
+ hideClose: !v,
73
+ onPointerDownOutside: (R) => {
74
+ y && R.preventDefault();
70
75
  },
71
76
  className: r(
72
77
  "max-w-[400px] gap-0",
73
- s && "flex flex-col items-center p-6 pt-6 text-center",
74
- N
78
+ o && "flex flex-col items-center p-6 pt-6 text-center",
79
+ C
75
80
  ),
76
81
  "data-component": "prompt",
77
82
  "data-variant": t,
78
83
  children: [
79
- s && /* @__PURE__ */ o(
84
+ o && /* @__PURE__ */ a(
80
85
  "div",
81
86
  {
82
87
  className: r(
@@ -87,61 +92,61 @@ const M = m.forwardRef(
87
92
  t === "destructive" && "bg-[#fceeee] text-[#ef4444]"
88
93
  ),
89
94
  children: [
90
- t === "info" && /* @__PURE__ */ e(k, { size: 24 }),
91
- t === "success" && /* @__PURE__ */ e(R, { size: 24 }),
92
- t === "warning" && /* @__PURE__ */ e(V, { size: 24 }),
93
- t === "destructive" && /* @__PURE__ */ e(A, { size: 24 })
95
+ t === "info" && /* @__PURE__ */ e(B, { size: 24 }),
96
+ t === "success" && /* @__PURE__ */ e(F, { size: 24 }),
97
+ t === "warning" && /* @__PURE__ */ e(H, { size: 24 }),
98
+ t === "destructive" && /* @__PURE__ */ e(S, { size: 24 })
94
99
  ]
95
100
  }
96
101
  ),
97
- /* @__PURE__ */ o(
98
- E,
102
+ /* @__PURE__ */ a(
103
+ G,
99
104
  {
100
- className: r(s && "space-y-2 items-center bg-white border-none"),
105
+ className: r(o && "space-y-2 items-center bg-white border-none"),
101
106
  children: [
102
107
  /* @__PURE__ */ e(
103
- G,
108
+ J,
104
109
  {
105
110
  className: r(
106
- s && "text-[18px] font-extrabold text-[#1f2b4d]"
111
+ o && "text-[18px] font-extrabold text-[#1f2b4d]"
107
112
  ),
108
- children: a
113
+ children: l
109
114
  }
110
115
  ),
111
- c && /* @__PURE__ */ e(
112
- J,
116
+ i && /* @__PURE__ */ e(
117
+ K,
113
118
  {
114
- className: r(s && "text-sm text-[#60697d]"),
115
- children: c
119
+ className: r(o && "text-sm text-[#60697d]"),
120
+ children: i
116
121
  }
117
122
  )
118
123
  ]
119
124
  }
120
125
  ),
121
- d && /* @__PURE__ */ e("div", { className: r("w-full py-2", s && "text-center"), children: d }),
122
- n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */ o(
123
- K,
126
+ d && /* @__PURE__ */ e("div", { className: r("w-full py-2", o && "text-center"), children: d }),
127
+ n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */ a(
128
+ M,
124
129
  {
125
130
  className: r(
126
- s && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
131
+ o && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
127
132
  ),
128
133
  children: [
129
134
  /* @__PURE__ */ e(
130
- f,
135
+ m,
131
136
  {
132
- variant: g,
133
- onClick: T,
134
- className: r(s && "h-10 px-6"),
135
- children: u
137
+ variant: w,
138
+ onClick: I,
139
+ className: r(o && "h-10 px-6"),
140
+ children: z
136
141
  }
137
142
  ),
138
143
  /* @__PURE__ */ e(
139
- f,
144
+ m,
140
145
  {
141
- variant: j,
142
- onClick: D,
143
- className: r(s && "h-10 px-6"),
144
- children: p
146
+ variant: L,
147
+ onClick: T,
148
+ className: r(o && "h-10 px-6"),
149
+ children: P
145
150
  }
146
151
  )
147
152
  ]
@@ -152,9 +157,9 @@ const M = m.forwardRef(
152
157
  ) });
153
158
  }
154
159
  );
155
- M.displayName = "Prompt";
160
+ U.displayName = "Prompt";
156
161
  export {
157
- M as Prompt,
158
- L as PromptClose,
159
- $ as promptVariants
162
+ U as Prompt,
163
+ Q as PromptClose,
164
+ se as promptVariants
160
165
  };