impact-nova 1.3.0 → 1.5.2

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 (117) 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.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -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 -86
  84. package/dist/components/ui/select/select.js +206 -209
  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/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,242 +1,244 @@
1
- import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import * as r from "react";
3
- import { X as he } from "lucide-react";
4
- import { CalendarMonth as ge, Info as xe } from "../../../icons/index.js";
5
- import { format as x, isValid as S, parse as C } from "date-fns";
6
- import { cn as R, padValidDateString as X, maskDate as q } from "../../../lib/utils.js";
7
- import { Popover as be, PopoverTrigger as we, PopoverContent as ye } from "../popover.js";
8
- import { Calendar as ke } from "../calendar.js";
9
- import { Tooltip as G, TooltipTrigger as J, TooltipContent as K } from "../tooltip.js";
10
- import { resolveWeekSelection as De } from "../../../lib/fiscal-calendar.js";
11
- const g = (e, i = "MM/dd/yyyy") => {
12
- const t = x(e.startDate, i), W = x(e.endDate, i);
13
- return `${t} - ${W}`;
14
- }, Se = r.forwardRef(
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { X as we } from "lucide-react";
4
+ import { CalendarMonth as ke, Info as ye } from "../../../icons/index.js";
5
+ import { format as b, isValid as S, parse as C } from "date-fns";
6
+ import { cn as N, padValidDateString as Q, maskDate as U } from "../../../lib/utils.js";
7
+ import { Popover as De, PopoverTrigger as Re, PopoverContent as Se } from "../popover.js";
8
+ import { Calendar as Ce } from "../calendar.js";
9
+ import { Tooltip as Z, TooltipTrigger as Y, TooltipContent as _ } from "../tooltip.js";
10
+ import { resolveWeekSelection as Ne } from "../../../lib/fiscal-calendar.js";
11
+ import { getDateFnsLocale as Ie } from "../../../i18n/getDateFnsLocale.js";
12
+ import { useImpactNovaI18n as We } from "../../../i18n/ImpactNovaI18nContext.js";
13
+ const x = (t, l = "MM/dd/yyyy", e) => {
14
+ const V = b(t.startDate, l, e ? { locale: e } : {}), v = b(t.endDate, l, e ? { locale: e } : {});
15
+ return `${V} - ${v}`;
16
+ }, Pe = s.forwardRef(
15
17
  ({
16
- value: e,
17
- onChange: i,
18
- format: t = "MM/dd/yyyy",
19
- placeholder: W = "Select Week Range",
20
- minDate: Q,
21
- maxDate: U,
22
- startMonth: Z,
23
- endMonth: Y,
24
- showFooter: m = !0,
25
- calendarType: v = "calendar",
26
- fiscalMode: T = "basic",
27
- selectionMode: E = "week",
28
- fiscalMonthPattern: A,
29
- fiscalYearStartMonth: M = 1,
30
- weekStartsOn: j = 1,
31
- disabled: w,
32
- className: _,
33
- isError: N,
34
- size: B,
35
- label: L,
36
- helperText: O,
37
- required: F,
38
- prefix: Ce,
39
- prefixClick: Re,
40
- ...ee
41
- }, te) => {
42
- const $ = r.useRef(null), ne = r.useRef(null);
43
- r.useRef(null), r.useRef(null), r.useImperativeHandle(te, () => $.current);
44
- const [d, I] = r.useState(!1), [y, c] = r.useState(e), [k, u] = r.useState(e?.from ? x(e.from.startDate, t) : ""), [D, h] = r.useState(e?.to ? x(e.to.endDate, t) : ""), [oe, V] = r.useState(e?.from?.startDate || /* @__PURE__ */ new Date());
45
- r.useEffect(() => {
46
- d || (u(e?.from ? x(e.from.startDate, t) : ""), h(e?.to ? x(e.to.endDate, t) : ""), c(e));
47
- }, [e, t, d]), r.useEffect(() => {
48
- d && (c(e), u(e?.from ? x(e.from.startDate, t) : ""), h(e?.to ? x(e.to.endDate, t) : ""), V(e?.from?.startDate || /* @__PURE__ */ new Date()));
49
- }, [d, e, t]);
50
- const re = (n) => {
51
- c(n), n?.from && u(g(n.from, t)), n?.to && h(g(n.to, t)), !m && n?.from && n?.to && n.from.startDate.getTime() !== n.to.startDate.getTime() && (i?.(n), I(!1));
52
- }, se = (n) => {
53
- i?.(n !== void 0 ? n : y), I(!1);
54
- }, ie = () => {
55
- c(e), u(e?.from ? g(e.from, t) : ""), h(e?.to ? g(e.to, t) : ""), I(!1);
56
- }, z = () => {
57
- c(void 0), u(""), h(""), i?.(void 0), m || I(!1);
58
- }, P = (n) => De(n, {
59
- calendarType: v,
60
- fiscalMode: T,
61
- selectionMode: E,
62
- fiscalMonthPattern: A,
63
- fiscalYearStartMonth: M,
64
- weekStartsOn: j
65
- }), de = (n) => {
66
- const f = n.target.value, s = q(f, t, k);
67
- if (u(s), s === "") {
68
- const a = { from: void 0, to: y?.to };
69
- c(a), m || i?.(a);
18
+ value: t,
19
+ onChange: l,
20
+ format: e = "MM/dd/yyyy",
21
+ placeholder: V,
22
+ minDate: v,
23
+ maxDate: F,
24
+ startMonth: ee,
25
+ endMonth: te,
26
+ showFooter: u = !0,
27
+ calendarType: M = "calendar",
28
+ fiscalMode: A = "basic",
29
+ selectionMode: L = "week",
30
+ fiscalMonthPattern: j,
31
+ fiscalYearStartMonth: B = 1,
32
+ weekStartsOn: O = 1,
33
+ disabled: k,
34
+ className: ne,
35
+ isError: I,
36
+ size: $,
37
+ label: z,
38
+ helperText: H,
39
+ required: oe,
40
+ prefix: Ve,
41
+ prefixClick: ve,
42
+ ...re
43
+ }, se) => {
44
+ const { locale: X, t: T } = We(), o = s.useMemo(() => Ie(X), [X]), q = V ?? T("datePicker.selectWeekRange"), G = s.useRef(null), ie = s.useRef(null);
45
+ s.useRef(null), s.useRef(null), s.useImperativeHandle(se, () => G.current);
46
+ const [c, W] = s.useState(!1), [y, d] = s.useState(t), [D, h] = s.useState(t?.from ? b(t.from.startDate, e, { locale: o }) : ""), [R, g] = s.useState(t?.to ? b(t.to.endDate, e, { locale: o }) : ""), [le, E] = s.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
47
+ s.useEffect(() => {
48
+ c || (h(t?.from ? b(t.from.startDate, e, { locale: o }) : ""), g(t?.to ? b(t.to.endDate, e, { locale: o }) : ""), d(t));
49
+ }, [t, e, c, o]), s.useEffect(() => {
50
+ c && (d(t), h(t?.from ? b(t.from.startDate, e, { locale: o }) : ""), g(t?.to ? b(t.to.endDate, e, { locale: o }) : ""), E(t?.from?.startDate || /* @__PURE__ */ new Date()));
51
+ }, [c, t, e, o]);
52
+ const ce = (n) => {
53
+ d(n), n?.from && h(x(n.from, e, o)), n?.to && g(x(n.to, e, o)), !u && n?.from && n?.to && n.from.startDate.getTime() !== n.to.startDate.getTime() && (l?.(n), W(!1));
54
+ }, de = (n) => {
55
+ l?.(n !== void 0 ? n : y), W(!1);
56
+ }, ae = () => {
57
+ d(t), h(t?.from ? x(t.from, e, o) : ""), g(t?.to ? x(t.to, e, o) : ""), W(!1);
58
+ }, J = () => {
59
+ d(void 0), h(""), g(""), l?.(void 0), u || W(!1);
60
+ }, P = (n) => Ne(n, {
61
+ calendarType: M,
62
+ fiscalMode: A,
63
+ selectionMode: L,
64
+ fiscalMonthPattern: j,
65
+ fiscalYearStartMonth: B,
66
+ weekStartsOn: O
67
+ }), fe = (n) => {
68
+ const p = n.target.value, i = U(p, e, D);
69
+ if (h(i), i === "") {
70
+ const f = { from: void 0, to: y?.to };
71
+ d(f), u || l?.(f);
70
72
  return;
71
73
  }
72
- const l = C(s, t, /* @__PURE__ */ new Date());
73
- if (S(l) && s.length === t.length) {
74
- const b = { from: P(l), to: y?.to };
75
- c(b), m || i?.(b);
74
+ const a = C(i, e, /* @__PURE__ */ new Date(), { locale: o });
75
+ if (S(a) && i.length === e.length) {
76
+ const w = { from: P(a), to: y?.to };
77
+ d(w), u || l?.(w);
76
78
  }
77
- }, ce = (n) => {
78
- const f = n.target.value, s = q(f, t, D);
79
- if (h(s), s === "") {
80
- const a = { from: y?.from, to: void 0 };
81
- c(a), m || i?.(a);
79
+ }, pe = (n) => {
80
+ const p = n.target.value, i = U(p, e, R);
81
+ if (g(i), i === "") {
82
+ const f = { from: y?.from, to: void 0 };
83
+ d(f), u || l?.(f);
82
84
  return;
83
85
  }
84
- const l = C(s, t, /* @__PURE__ */ new Date());
85
- if (S(l) && s.length === t.length) {
86
- const a = P(l), b = { from: y?.from, to: a };
87
- c(b), l && V(l), m || i?.(b);
86
+ const a = C(i, e, /* @__PURE__ */ new Date(), { locale: o });
87
+ if (S(a) && i.length === e.length) {
88
+ const f = P(a), w = { from: y?.from, to: f };
89
+ d(w), a && E(a), u || l?.(w);
88
90
  }
89
- }, H = () => {
90
- if (d) return;
91
- const n = X(k, t), f = X(D, t), s = C(n, t, /* @__PURE__ */ new Date()), l = C(f, t, /* @__PURE__ */ new Date()), a = S(s) && n.length === t.length, b = S(l) && f.length === t.length;
92
- if (!a || !b)
93
- u(e?.from ? g(e.from, t) : ""), h(e?.to ? g(e.to, t) : ""), c(e);
94
- else if (u(n), h(f), !m) {
95
- const me = P(s), ue = P(l);
96
- i?.({ from: me, to: ue });
91
+ }, K = () => {
92
+ if (c) return;
93
+ const n = Q(D, e), p = Q(R, e), i = C(n, e, /* @__PURE__ */ new Date(), { locale: o }), a = C(p, e, /* @__PURE__ */ new Date(), { locale: o }), f = S(i) && n.length === e.length, w = S(a) && p.length === e.length;
94
+ if (!f || !w)
95
+ h(t?.from ? x(t.from, e, o) : ""), g(t?.to ? x(t.to, e, o) : ""), d(t);
96
+ else if (h(n), g(p), !u) {
97
+ const xe = P(i), be = P(a);
98
+ l?.({ from: xe, to: be });
97
99
  }
98
- }, le = (e?.from ? g(e.from, t) : "") !== k, ae = (e?.to ? g(e.to, t) : "") !== D, fe = k.length === t.length && !S(C(k, t, /* @__PURE__ */ new Date())), pe = D.length === t.length && !S(C(D, t, /* @__PURE__ */ new Date()));
99
- return /* @__PURE__ */ p("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "week-range-picker", "data-disabled": w || void 0, children: [
100
- L && /* @__PURE__ */ p(
100
+ }, me = (t?.from ? x(t.from, e, o) : "") !== D, ue = (t?.to ? x(t.to, e, o) : "") !== R, he = D.length === e.length && !S(C(D, e, /* @__PURE__ */ new Date(), { locale: o })), ge = R.length === e.length && !S(C(R, e, /* @__PURE__ */ new Date(), { locale: o }));
101
+ return /* @__PURE__ */ m("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "week-range-picker", "data-disabled": k || void 0, children: [
102
+ z && /* @__PURE__ */ m(
101
103
  "label",
102
104
  {
103
- className: R(
105
+ className: N(
104
106
  "text-xs font-medium leading-[18px] text-[#60697d]",
105
- w && "opacity-70",
106
- N && "text-destructive"
107
+ k && "opacity-70",
108
+ I && "text-destructive"
107
109
  ),
108
110
  children: [
109
- L,
111
+ z,
110
112
  " ",
111
- F && /* @__PURE__ */ o("span", { className: "text-destructive", children: "*" })
113
+ oe && /* @__PURE__ */ r("span", { className: "text-destructive", children: "*" })
112
114
  ]
113
115
  }
114
116
  ),
115
- /* @__PURE__ */ p(be, { open: d, onOpenChange: I, children: [
116
- /* @__PURE__ */ o(we, { asChild: !0, children: /* @__PURE__ */ p(
117
+ /* @__PURE__ */ m(De, { open: c, onOpenChange: W, children: [
118
+ /* @__PURE__ */ r(Re, { asChild: !0, children: /* @__PURE__ */ m(
117
119
  "div",
118
120
  {
119
- "data-state": d ? "open" : "closed",
120
- className: R(
121
+ "data-state": c ? "open" : "closed",
122
+ className: N(
121
123
  "flex w-full items-center justify-between gap-2 rounded-md border bg-white px-3 text-sm shadow-sm transition-colors hover:border-primary disabled:cursor-not-allowed disabled:bg-disabled-secondary-bg disabled:text-disabled-text disabled:border-border",
122
- N ? "border-destructive hover:border-destructive" : "border-input",
123
- B === "sm" ? "h-6" : B === "md" ? "h-[28px]" : "h-8",
124
- w && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
124
+ I ? "border-destructive hover:border-destructive" : "border-input",
125
+ $ === "sm" ? "h-6" : $ === "md" ? "h-[28px]" : "h-8",
126
+ k && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
125
127
  "cursor-pointer",
126
- _
128
+ ne
127
129
  ),
128
130
  children: [
129
- /* @__PURE__ */ p("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
130
- /* @__PURE__ */ o(
131
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
132
+ /* @__PURE__ */ r(
131
133
  "input",
132
134
  {
133
- ref: $,
135
+ ref: G,
134
136
  type: "text",
135
- value: k,
136
- onChange: de,
137
- onBlur: H,
138
- onClick: (n) => d && n.stopPropagation(),
139
- placeholder: d ? t : W,
140
- disabled: !!w,
137
+ value: D,
138
+ onChange: fe,
139
+ onBlur: K,
140
+ onClick: (n) => c && n.stopPropagation(),
141
+ placeholder: c ? e : q,
142
+ disabled: !!k,
141
143
  "data-field": "start",
142
- className: R(
144
+ className: N(
143
145
  "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
144
- fe ? "text-destructive" : le ? "text-muted-foreground" : ""
146
+ he ? "text-destructive" : me ? "text-muted-foreground" : ""
145
147
  ),
146
- ...ee
148
+ ...re
147
149
  }
148
150
  ),
149
- /* @__PURE__ */ o(
151
+ /* @__PURE__ */ r(
150
152
  "input",
151
153
  {
152
- ref: ne,
154
+ ref: ie,
153
155
  type: "text",
154
- value: D,
155
- onChange: ce,
156
- onBlur: H,
157
- onClick: (n) => d && n.stopPropagation(),
158
- placeholder: d ? t : W,
159
- disabled: !!w,
156
+ value: R,
157
+ onChange: pe,
158
+ onBlur: K,
159
+ onClick: (n) => c && n.stopPropagation(),
160
+ placeholder: c ? e : q,
161
+ disabled: !!k,
160
162
  "data-field": "end",
161
- className: R(
163
+ className: N(
162
164
  "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-[#dfe2e7] disabled:cursor-not-allowed disabled:opacity-50",
163
- pe ? "text-destructive" : ae ? "text-muted-foreground" : ""
165
+ ge ? "text-destructive" : ue ? "text-muted-foreground" : ""
164
166
  )
165
167
  }
166
168
  )
167
169
  ] }),
168
- /* @__PURE__ */ p("div", { className: "flex items-center gap-1 shrink-0", children: [
169
- e?.from && !w && /* @__PURE__ */ p(G, { children: [
170
- /* @__PURE__ */ o(J, { asChild: !0, children: /* @__PURE__ */ o(
171
- he,
170
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-1 shrink-0", children: [
171
+ t?.from && !k && /* @__PURE__ */ m(Z, { children: [
172
+ /* @__PURE__ */ r(Y, { asChild: !0, children: /* @__PURE__ */ r(
173
+ we,
172
174
  {
173
175
  className: "h-4 w-4 cursor-pointer hover:text-foreground text-muted-foreground",
174
176
  onClick: (n) => {
175
- n.stopPropagation(), z();
177
+ n.stopPropagation(), J();
176
178
  }
177
179
  }
178
180
  ) }),
179
- /* @__PURE__ */ o(K, { variant: "tertiary", side: "top", children: "Clear" })
181
+ /* @__PURE__ */ r(_, { variant: "tertiary", side: "top", children: T("calendar.clear") })
180
182
  ] }),
181
- /* @__PURE__ */ p(G, { children: [
182
- /* @__PURE__ */ o(J, { asChild: !0, children: /* @__PURE__ */ o(ge, { className: "h-4 w-4 text-secondary-foreground" }) }),
183
- /* @__PURE__ */ o(K, { variant: "tertiary", side: "top", children: "Pick a range" })
183
+ /* @__PURE__ */ m(Z, { children: [
184
+ /* @__PURE__ */ r(Y, { asChild: !0, children: /* @__PURE__ */ r(ke, { className: "h-4 w-4 text-secondary-foreground" }) }),
185
+ /* @__PURE__ */ r(_, { variant: "tertiary", side: "top", children: T("datePicker.selectWeekRange") })
184
186
  ] })
185
187
  ] })
186
188
  ]
187
189
  }
188
190
  ) }),
189
- /* @__PURE__ */ o(
190
- ye,
191
+ /* @__PURE__ */ r(
192
+ Se,
191
193
  {
192
194
  className: "w-auto p-0",
193
195
  align: "start",
194
196
  onOpenAutoFocus: (n) => n.preventDefault(),
195
- children: /* @__PURE__ */ o(
196
- ke,
197
+ children: /* @__PURE__ */ r(
198
+ Ce,
197
199
  {
198
200
  pickerType: "week",
199
201
  weekMode: "range",
200
202
  selectedWeeks: y,
201
- onWeekSelect: re,
202
- month: oe,
203
- onMonthChange: V,
204
- disabled: { before: Q, after: U },
205
- startMonth: Z,
206
- endMonth: Y,
207
- showFooter: m,
208
- calendarType: v,
209
- fiscalMode: T,
210
- selectionMode: E,
211
- fiscalMonthPattern: A,
212
- fiscalYearStartMonth: M,
213
- weekStartsOn: j,
214
- onApply: se,
215
- onCancel: ie,
216
- onClear: z,
203
+ onWeekSelect: ce,
204
+ month: le,
205
+ onMonthChange: E,
206
+ disabled: { before: v, after: F },
207
+ startMonth: ee,
208
+ endMonth: te,
209
+ showFooter: u,
210
+ calendarType: M,
211
+ fiscalMode: A,
212
+ selectionMode: L,
213
+ fiscalMonthPattern: j,
214
+ fiscalYearStartMonth: B,
215
+ weekStartsOn: O,
216
+ onApply: de,
217
+ onCancel: ae,
218
+ onClear: J,
217
219
  captionLayout: "dropdown"
218
220
  }
219
221
  )
220
222
  }
221
223
  )
222
224
  ] }),
223
- O && /* @__PURE__ */ p("div", { className: R("flex items-center gap-1", N && "text-destructive"), children: [
224
- !N && /* @__PURE__ */ o(xe, { size: 10, className: "shrink-0 text-muted-foreground" }),
225
- /* @__PURE__ */ o(
225
+ H && /* @__PURE__ */ m("div", { className: N("flex items-center gap-1", I && "text-destructive"), children: [
226
+ !I && /* @__PURE__ */ r(ye, { size: 10, className: "shrink-0 text-muted-foreground" }),
227
+ /* @__PURE__ */ r(
226
228
  "p",
227
229
  {
228
- className: R(
230
+ className: N(
229
231
  "text-[10px] text-[#7a8294]",
230
- N && "text-destructive"
232
+ I && "text-destructive"
231
233
  ),
232
- children: O
234
+ children: H
233
235
  }
234
236
  )
235
237
  ] })
236
238
  ] });
237
239
  }
238
240
  );
239
- Se.displayName = "WeekRangePicker";
241
+ Pe.displayName = "WeekRangePicker";
240
242
  export {
241
- Se as WeekRangePicker
243
+ Pe as WeekRangePicker
242
244
  };
@@ -1,58 +1,63 @@
1
1
  import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import * as a from "@radix-ui/react-dialog";
4
- import { X as m } from "lucide-react";
2
+ import * as n from "react";
3
+ import * as t from "@radix-ui/react-dialog";
4
+ import { X as f } from "lucide-react";
5
5
  import { cn as i } from "../../lib/utils.js";
6
- import { Tooltip as p, TooltipTrigger as f, TooltipContent as g } from "./tooltip.js";
7
- const R = a.Root, k = a.Trigger, x = a.Portal, z = a.Close, n = d.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
8
- a.Overlay,
6
+ import { Tooltip as g, TooltipTrigger as u, TooltipContent as x } from "./tooltip.js";
7
+ import { useImpactNovaI18n as y } from "../../i18n/ImpactNovaI18nContext.js";
8
+ const O = t.Root, P = t.Trigger, N = t.Portal, B = t.Close, r = n.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
9
+ t.Overlay,
9
10
  {
10
11
  ref: s,
11
12
  className: i(
12
13
  "fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
13
14
  e
14
15
  ),
15
- ...t
16
+ ...a
16
17
  }
17
18
  ));
18
- n.displayName = a.Overlay.displayName;
19
- const y = d.forwardRef(({ className: e, children: t, hideClose: s, ...r }, c) => /* @__PURE__ */ l(x, { children: [
20
- /* @__PURE__ */ o(n, {}),
21
- /* @__PURE__ */ l(
22
- a.Content,
23
- {
24
- ref: c,
25
- "aria-describedby": void 0,
26
- "data-component": "dialog-content",
27
- className: i(
28
- "fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg overflow-hidden",
29
- e
30
- ),
31
- ...r,
32
- children: [
33
- t,
34
- !s && /* @__PURE__ */ l(p, { children: [
35
- /* @__PURE__ */ o(f, { asChild: !0, children: /* @__PURE__ */ l(
36
- a.Close,
37
- {
38
- "data-component": "dialog-close",
39
- className: "absolute right-4 top-4 rounded-sm opacity-50 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
40
- children: [
41
- /* @__PURE__ */ o(m, { className: "h-4 w-4" }),
42
- /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
43
- ]
44
- }
45
- ) }),
46
- /* @__PURE__ */ o(g, { variant: "tertiary", side: "top", children: "Close" })
47
- ] })
48
- ]
49
- }
50
- )
51
- ] }));
52
- y.displayName = a.Content.displayName;
53
- const u = ({
19
+ r.displayName = t.Overlay.displayName;
20
+ const b = n.forwardRef(({ className: e, children: a, hideClose: s, ...c }, m) => {
21
+ const { t: p } = y(), d = p("aria.close");
22
+ return /* @__PURE__ */ l(N, { children: [
23
+ /* @__PURE__ */ o(r, {}),
24
+ /* @__PURE__ */ l(
25
+ t.Content,
26
+ {
27
+ ref: m,
28
+ "aria-describedby": void 0,
29
+ "data-component": "dialog-content",
30
+ className: i(
31
+ "fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg overflow-hidden",
32
+ e
33
+ ),
34
+ ...c,
35
+ children: [
36
+ a,
37
+ !s && /* @__PURE__ */ l(g, { children: [
38
+ /* @__PURE__ */ o(u, { asChild: !0, children: /* @__PURE__ */ l(
39
+ t.Close,
40
+ {
41
+ "data-component": "dialog-close",
42
+ className: "absolute right-4 top-4 rounded-sm opacity-50 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
43
+ "aria-label": d,
44
+ children: [
45
+ /* @__PURE__ */ o(f, { className: "h-4 w-4" }),
46
+ /* @__PURE__ */ o("span", { className: "sr-only", children: d })
47
+ ]
48
+ }
49
+ ) }),
50
+ /* @__PURE__ */ o(x, { variant: "tertiary", side: "top", children: d })
51
+ ] })
52
+ ]
53
+ }
54
+ )
55
+ ] });
56
+ });
57
+ b.displayName = t.Content.displayName;
58
+ const D = ({
54
59
  className: e,
55
- ...t
60
+ ...a
56
61
  }) => /* @__PURE__ */ o(
57
62
  "div",
58
63
  {
@@ -60,13 +65,13 @@ const u = ({
60
65
  "flex flex-col text-center sm:text-left bg-light-blue p-4 border-b",
61
66
  e
62
67
  ),
63
- ...t
68
+ ...a
64
69
  }
65
70
  );
66
- u.displayName = "DialogHeader";
67
- const N = ({
71
+ D.displayName = "DialogHeader";
72
+ const h = ({
68
73
  className: e,
69
- ...t
74
+ ...a
70
75
  }) => /* @__PURE__ */ o(
71
76
  "div",
72
77
  {
@@ -74,13 +79,13 @@ const N = ({
74
79
  "px-6 py-6 flex-1 overflow-y-auto min-h-0",
75
80
  e
76
81
  ),
77
- ...t
82
+ ...a
78
83
  }
79
84
  );
80
- N.displayName = "DialogBody";
81
- const b = ({
85
+ h.displayName = "DialogBody";
86
+ const v = ({
82
87
  className: e,
83
- ...t
88
+ ...a
84
89
  }) => /* @__PURE__ */ o(
85
90
  "div",
86
91
  {
@@ -88,12 +93,12 @@ const b = ({
88
93
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:items-center sm:space-x-2 px-4 py-3 border-t bg-white",
89
94
  e
90
95
  ),
91
- ...t
96
+ ...a
92
97
  }
93
98
  );
94
- b.displayName = "DialogFooter";
95
- const D = d.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
96
- a.Title,
99
+ v.displayName = "DialogFooter";
100
+ const w = n.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
101
+ t.Title,
97
102
  {
98
103
  ref: s,
99
104
  "data-component": "dialog-title",
@@ -101,29 +106,29 @@ const D = d.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
101
106
  "text-md font-bold leading-none tracking-tight text-slate-900",
102
107
  e
103
108
  ),
104
- ...t
109
+ ...a
105
110
  }
106
111
  ));
107
- D.displayName = a.Title.displayName;
108
- const h = d.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
109
- a.Description,
112
+ w.displayName = t.Title.displayName;
113
+ const T = n.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
114
+ t.Description,
110
115
  {
111
116
  ref: s,
112
117
  className: i("text-sm text-slate-600 leading-relaxed", e),
113
- ...t
118
+ ...a
114
119
  }
115
120
  ));
116
- h.displayName = a.Description.displayName;
121
+ T.displayName = t.Description.displayName;
117
122
  export {
118
- R as Dialog,
119
- N as DialogBody,
120
- z as DialogClose,
121
- y as DialogContent,
122
- h as DialogDescription,
123
- b as DialogFooter,
124
- u as DialogHeader,
125
- n as DialogOverlay,
126
- x as DialogPortal,
127
- D as DialogTitle,
128
- k as DialogTrigger
123
+ O as Dialog,
124
+ h as DialogBody,
125
+ B as DialogClose,
126
+ b as DialogContent,
127
+ T as DialogDescription,
128
+ v as DialogFooter,
129
+ D as DialogHeader,
130
+ r as DialogOverlay,
131
+ N as DialogPortal,
132
+ w as DialogTitle,
133
+ P as DialogTrigger
129
134
  };