impact-nova 1.5.14 → 1.6.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 (149) hide show
  1. package/dist/components/ui/accordion.d.ts +4 -1
  2. package/dist/components/ui/accordion.js +28 -22
  3. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
  4. package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
  5. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
  11. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
  12. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
  13. package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
  14. package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
  15. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
  16. package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
  17. package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
  18. package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
  19. package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
  20. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
  21. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
  22. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
  23. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
  24. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
  25. package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
  26. package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
  29. package/dist/components/ui/ag-grid-react/index.js +121 -102
  30. package/dist/components/ui/alert-dialog.js +6 -6
  31. package/dist/components/ui/alert.d.ts +4 -3
  32. package/dist/components/ui/alert.js +182 -64
  33. package/dist/components/ui/avatar.js +5 -5
  34. package/dist/components/ui/badge.d.ts +7 -2
  35. package/dist/components/ui/badge.js +105 -32
  36. package/dist/components/ui/breadcrumb.js +26 -21
  37. package/dist/components/ui/button-group.d.ts +7 -0
  38. package/dist/components/ui/button-group.js +116 -91
  39. package/dist/components/ui/button-variants.d.ts +7 -2
  40. package/dist/components/ui/button-variants.js +31 -16
  41. package/dist/components/ui/button.d.ts +2 -2
  42. package/dist/components/ui/button.js +10 -10
  43. package/dist/components/ui/calendar.js +185 -184
  44. package/dist/components/ui/card.js +24 -24
  45. package/dist/components/ui/chart/chart.js +27 -27
  46. package/dist/components/ui/chart/chart.utils.js +50 -50
  47. package/dist/components/ui/checkbox.js +22 -22
  48. package/dist/components/ui/chips.d.ts +19 -3
  49. package/dist/components/ui/chips.js +140 -41
  50. package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
  51. package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
  52. package/dist/components/ui/command-palette/command-palette.js +254 -264
  53. package/dist/components/ui/command-palette/index.d.ts +1 -1
  54. package/dist/components/ui/command-palette/index.js +42 -41
  55. package/dist/components/ui/command-palette/kbd.js +18 -18
  56. package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
  57. package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
  58. package/dist/components/ui/command-palette/utils.d.ts +6 -1
  59. package/dist/components/ui/command-palette/utils.js +81 -74
  60. package/dist/components/ui/data-table/data-table-column-list.js +31 -31
  61. package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
  62. package/dist/components/ui/data-table/data-table-constants.js +4 -0
  63. package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
  64. package/dist/components/ui/data-table/data-table-format-options.js +35 -35
  65. package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
  66. package/dist/components/ui/data-table/data-table-sheet.js +91 -58
  67. package/dist/components/ui/data-table/data-table-view-options.js +29 -29
  68. package/dist/components/ui/data-table/data-table.js +84 -52
  69. package/dist/components/ui/data-table/index.d.ts +1 -0
  70. package/dist/components/ui/data-table/index.js +15 -13
  71. package/dist/components/ui/date-picker/date-picker.js +35 -35
  72. package/dist/components/ui/date-picker/date-range-picker.js +166 -164
  73. package/dist/components/ui/date-picker/month-picker.js +14 -14
  74. package/dist/components/ui/date-picker/month-range-picker.js +198 -189
  75. package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
  76. package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
  77. package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
  78. package/dist/components/ui/date-picker/week-picker.js +2 -2
  79. package/dist/components/ui/date-picker/week-range-picker.js +164 -162
  80. package/dist/components/ui/dialog.js +25 -28
  81. package/dist/components/ui/drawer.js +40 -40
  82. package/dist/components/ui/dropdown-menu.js +72 -72
  83. package/dist/components/ui/empty-container.js +73 -69
  84. package/dist/components/ui/file-upload.js +137 -135
  85. package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
  86. package/dist/components/ui/filter-panel/filter-panel.js +175 -97
  87. package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
  88. package/dist/components/ui/filter-strip/filter-strip.js +63 -50
  89. package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
  90. package/dist/components/ui/filter-strip/filter-summary.js +230 -146
  91. package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
  92. package/dist/components/ui/header.d.ts +7 -3
  93. package/dist/components/ui/header.js +87 -79
  94. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
  95. package/dist/components/ui/hover-card.js +10 -10
  96. package/dist/components/ui/input.js +79 -70
  97. package/dist/components/ui/loader.js +16 -16
  98. package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
  99. package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
  100. package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
  101. package/dist/components/ui/notification-panel/notification-item.js +32 -32
  102. package/dist/components/ui/notification-panel/notification-list.js +24 -24
  103. package/dist/components/ui/notification-panel/notification-panel.js +26 -26
  104. package/dist/components/ui/popover.js +22 -22
  105. package/dist/components/ui/progress.js +34 -34
  106. package/dist/components/ui/prompt.js +48 -48
  107. package/dist/components/ui/radio-group.js +63 -54
  108. package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
  109. package/dist/components/ui/select/components/Submenu.js +33 -33
  110. package/dist/components/ui/select/select.js +425 -376
  111. package/dist/components/ui/sheet.js +88 -66
  112. package/dist/components/ui/sidebar.js +342 -296
  113. package/dist/components/ui/skeleton.js +6 -6
  114. package/dist/components/ui/slider.js +17 -17
  115. package/dist/components/ui/statistics-card.d.ts +86 -0
  116. package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
  117. package/dist/components/ui/statistics-card.hooks.js +100 -0
  118. package/dist/components/ui/statistics-card.js +259 -0
  119. package/dist/components/ui/stepper.js +51 -51
  120. package/dist/components/ui/switch.js +7 -7
  121. package/dist/components/ui/tabs.js +70 -70
  122. package/dist/components/ui/tag-group.d.ts +1 -0
  123. package/dist/components/ui/tag-group.js +14 -13
  124. package/dist/components/ui/tag.js +43 -43
  125. package/dist/components/ui/textarea.js +86 -58
  126. package/dist/components/ui/toast.js +39 -39
  127. package/dist/components/ui/tooltip.js +23 -23
  128. package/dist/components/ui/types/date-picker.types.d.ts +1 -0
  129. package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
  130. package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
  131. package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
  132. package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
  133. package/dist/i18n/defaultMessages.d.ts +8 -0
  134. package/dist/i18n/defaultMessages.js +15 -9
  135. package/dist/i18n/locales/de.js +7 -1
  136. package/dist/i18n/locales/es.js +7 -1
  137. package/dist/i18n/locales/hi.js +7 -1
  138. package/dist/i18n/locales/kn.js +7 -1
  139. package/dist/icons/assets/bulk-edit.svg.js +5 -0
  140. package/dist/icons/assets/clock.svg.js +5 -0
  141. package/dist/icons/assets/statistics.svg.js +5 -0
  142. package/dist/icons/index.d.ts +3 -0
  143. package/dist/icons/index.js +254 -206
  144. package/dist/impact-nova.css +1 -1
  145. package/dist/index.d.ts +1 -0
  146. package/dist/index.js +361 -347
  147. package/package.json +3 -2
  148. package/tailwind.config.js +259 -152
  149. /package/dist/icons/assets/{PivotMode.svg.js → pivotMode.svg.js} +0 -0
@@ -1,218 +1,227 @@
1
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
- import * as d from "react";
3
- import { X as ct } from "lucide-react";
4
- import { CalendarMonth as lt, Info as mt } from "../../../icons/index.js";
5
- import { isValid as w, parse as S } from "date-fns";
6
- import { cn as P, padValidDateString as A, maskDate as j } from "../../../lib/utils.js";
7
- import { Popover as ft, PopoverTrigger as pt, PopoverContent as ht } from "../popover.js";
8
- import { Calendar as yt } from "../calendar.js";
9
- import { Tooltip as B, TooltipTrigger as O, TooltipContent as $ } from "../tooltip.js";
10
- import { useImpactNovaI18n as ut } from "../../../i18n/ImpactNovaI18nContext.js";
11
- const n = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, gt = d.forwardRef(
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { X as ft } from "lucide-react";
4
+ import { CalendarMonth as mt, Info as pt } from "../../../icons/index.js";
5
+ import { isValid as P, parse as S } from "date-fns";
6
+ import { cn as y, padValidDateString as j, maskDate as B } from "../../../lib/utils.js";
7
+ import { Popover as ht, PopoverTrigger as ut, PopoverContent as xt } from "../popover.js";
8
+ import { Calendar as gt } from "../calendar.js";
9
+ import { Tooltip as O, TooltipTrigger as z, TooltipContent as H } from "../tooltip.js";
10
+ import { useImpactNovaI18n as Mt } from "../../../i18n/ImpactNovaI18nContext.js";
11
+ const r = (t, i = "MM/YYYY") => {
12
+ const I = (t.month + 1).toString().padStart(2, "0");
13
+ return i === "YYYY/MM" ? `${t.year}/${I}` : `${I}/${t.year}`;
14
+ }, Yt = a.forwardRef(
12
15
  ({
13
16
  value: t,
14
- onChange: l,
15
- placeholder: z,
16
- minDate: H,
17
- maxDate: X,
18
- startMonth: q,
19
- endMonth: v,
20
- showFooter: p = !0,
21
- disabled: x,
22
- className: F,
23
- isError: k,
24
- size: N,
25
- label: I,
26
- helperText: D,
27
- required: G,
28
- prefix: xt,
29
- prefixClick: Mt,
30
- ...J
31
- }, K) => {
32
- const { t: u } = ut();
33
- z ?? u("datePicker.selectMonthRange");
34
- const V = d.useRef(null), L = d.useRef(null);
35
- d.useRef(null), d.useRef(null), d.useImperativeHandle(K, () => V.current);
36
- const [s, R] = d.useState(!1), [E, i] = d.useState(t), [M, h] = d.useState(t?.from ? n(t.from) : ""), [b, y] = d.useState(t?.to ? n(t.to) : ""), [Q, C] = d.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : /* @__PURE__ */ new Date());
37
- d.useEffect(() => {
38
- s || (h(t?.from ? n(t.from) : ""), y(t?.to ? n(t.to) : ""), i(t));
39
- }, [s, t]), d.useEffect(() => {
40
- s && (i(t), h(t?.from ? n(t.from) : ""), y(t?.to ? n(t.to) : ""), C(t?.from ? new Date(t.from.year, t.from.month, 1) : /* @__PURE__ */ new Date()));
41
- }, [s, t]);
42
- const U = (e) => {
43
- i(e), e?.from && h(n(e.from)), e?.to && y(n(e.to)), !p && e?.from && e?.to && (e.from.month !== e.to.month || e.from.year !== e.to.year) && (l?.(e), R(!1));
44
- }, W = (e) => {
45
- l?.(e !== void 0 ? e : E), R(!1);
46
- }, Z = () => {
47
- i(t), h(t?.from ? n(t.from) : ""), y(t?.to ? n(t.to) : ""), R(!1);
48
- }, T = () => {
49
- i(void 0), h(""), y(""), l?.(void 0), p || R(!1);
50
- }, _ = (e) => {
51
- const m = e.target.value, r = j(m, "MM/yyyy", M);
52
- if (h(r), r === "") {
53
- const c = { from: void 0, to: t?.to };
54
- i(c), p || l?.(c);
17
+ onChange: i,
18
+ placeholder: I,
19
+ minDate: X,
20
+ maxDate: q,
21
+ startMonth: G,
22
+ endMonth: J,
23
+ showFooter: u = !0,
24
+ disabled: w,
25
+ className: K,
26
+ isError: N,
27
+ size: D,
28
+ label: V,
29
+ helperText: E,
30
+ required: L,
31
+ prefix: wt,
32
+ prefixClick: bt,
33
+ displayFormat: n = "MM/YYYY",
34
+ ...Q
35
+ }, U) => {
36
+ const { t: M } = Mt();
37
+ I ?? M("datePicker.selectMonthRange");
38
+ const T = a.useRef(null), W = a.useRef(null), l = a.useMemo(
39
+ () => n === "YYYY/MM" ? "yyyy/MM" : "MM/yyyy",
40
+ [n]
41
+ );
42
+ a.useImperativeHandle(U, () => T.current);
43
+ const [d, C] = a.useState(!1), [A, f] = a.useState(t), [b, x] = a.useState(t?.from ? r(t.from, n) : ""), [k, g] = a.useState(t?.to ? r(t.to, n) : ""), [Z, R] = a.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : /* @__PURE__ */ new Date());
44
+ a.useEffect(() => {
45
+ d || (x(t?.from ? r(t.from, n) : ""), g(t?.to ? r(t.to, n) : ""), f(t));
46
+ }, [d, t, n]), a.useEffect(() => {
47
+ d && (f(t), x(t?.from ? r(t.from, n) : ""), g(t?.to ? r(t.to, n) : ""), R(t?.from ? new Date(t.from.year, t.from.month, 1) : /* @__PURE__ */ new Date()));
48
+ }, [d, t, n]);
49
+ const _ = (e) => {
50
+ f(e), e?.from && x(r(e.from, n)), e?.to && g(r(e.to, n)), !u && e?.from && e?.to && (e.from.month !== e.to.month || e.from.year !== e.to.year) && (i?.(e), C(!1));
51
+ }, F = (e) => {
52
+ i?.(e !== void 0 ? e : A), C(!1);
53
+ }, tt = () => {
54
+ f(t), x(t?.from ? r(t.from, n) : ""), g(t?.to ? r(t.to, n) : ""), C(!1);
55
+ }, v = () => {
56
+ f(void 0), x(""), g(""), i?.(void 0), u || C(!1);
57
+ }, et = (e) => {
58
+ const h = e.target.value, s = B(h, l, b);
59
+ if (x(s), s === "") {
60
+ const m = { from: void 0, to: t?.to };
61
+ f(m), u || i?.(m);
55
62
  return;
56
63
  }
57
- const a = S(r, "MM/yyyy", /* @__PURE__ */ new Date());
58
- if (w(a) && r.length === 7) {
59
- const g = { from: { month: a.getMonth(), year: a.getFullYear() }, to: t?.to };
60
- i(g), C(a), p || l?.(g);
64
+ const c = S(s, l, /* @__PURE__ */ new Date());
65
+ if (P(c) && s.length === 7) {
66
+ const Y = { from: { month: c.getMonth(), year: c.getFullYear() }, to: t?.to };
67
+ f(Y), R(c), u || i?.(Y);
61
68
  }
62
- }, tt = (e) => {
63
- const m = e.target.value, r = j(m, "MM/yyyy", b);
64
- if (y(r), r === "") {
65
- const c = { from: t?.from, to: void 0 };
66
- i(c), p || l?.(c);
69
+ }, nt = (e) => {
70
+ const h = e.target.value, s = B(h, l, k);
71
+ if (g(s), s === "") {
72
+ const m = { from: t?.from, to: void 0 };
73
+ f(m), u || i?.(m);
67
74
  return;
68
75
  }
69
- const a = S(r, "MM/yyyy", /* @__PURE__ */ new Date());
70
- if (w(a) && r.length === 7) {
71
- const c = { month: a.getMonth(), year: a.getFullYear() }, g = { from: t?.from, to: c };
72
- i(g), C(a), p || l?.(g);
76
+ const c = S(s, l, /* @__PURE__ */ new Date());
77
+ if (P(c) && s.length === 7) {
78
+ const m = { month: c.getMonth(), year: c.getFullYear() }, Y = { from: t?.from, to: m };
79
+ f(Y), R(c), u || i?.(Y);
73
80
  }
74
- }, Y = () => {
75
- if (s) return;
76
- const e = A(M, "MM/yyyy"), m = A(b, "MM/yyyy"), r = S(e, "MM/yyyy", /* @__PURE__ */ new Date()), a = S(m, "MM/yyyy", /* @__PURE__ */ new Date()), c = w(r) && e.length === 7, g = w(a) && m.length === 7;
77
- !c || !g ? (h(t?.from ? n(t.from) : ""), y(t?.to ? n(t.to) : ""), i(t)) : (h(e), y(m), p || l?.({
78
- from: { month: r.getMonth(), year: r.getFullYear() },
79
- to: { month: a.getMonth(), year: a.getFullYear() }
81
+ }, $ = () => {
82
+ if (d) return;
83
+ const e = j(b, l), h = j(k, l), s = S(e, l, /* @__PURE__ */ new Date()), c = S(h, l, /* @__PURE__ */ new Date()), m = P(s) && e.length === 7, Y = P(c) && h.length === 7;
84
+ !m || !Y ? (x(t?.from ? r(t.from, n) : ""), g(t?.to ? r(t.to, n) : ""), f(t)) : (x(e), g(h), u || i?.({
85
+ from: { month: s.getMonth(), year: s.getFullYear() },
86
+ to: { month: c.getMonth(), year: c.getFullYear() }
80
87
  }));
81
- }, et = t?.from ? n(t.from) : "", ot = t?.to ? n(t.to) : "", nt = M !== et, rt = b !== ot, at = M.length === 7 && !w(S(M, "MM/yyyy", /* @__PURE__ */ new Date())), dt = b.length === 7 && !w(S(b, "MM/yyyy", /* @__PURE__ */ new Date())), st = u("datePicker.startMonth"), it = u("datePicker.endMonth");
82
- return /* @__PURE__ */ f("div", { className: "w-full space-y-1.5 min-w-[240px]", "data-component": "month-range-picker", "data-disabled": x || void 0, children: [
83
- I && /* @__PURE__ */ f(
84
- "label",
85
- {
86
- className: P(
87
- "text-xs font-medium leading-[18px] text-[#60697d]",
88
- x && "opacity-70",
89
- k && "text-destructive"
90
- ),
91
- children: [
92
- I,
93
- " ",
94
- G && /* @__PURE__ */ o("span", { className: "text-destructive", children: "*" })
95
- ]
96
- }
97
- ),
98
- /* @__PURE__ */ f(ft, { open: s, onOpenChange: R, children: [
99
- /* @__PURE__ */ o(pt, { asChild: !0, children: /* @__PURE__ */ f(
100
- "div",
88
+ }, ot = t?.from ? r(t.from, n) : "", rt = t?.to ? r(t.to, n) : "", st = b !== ot, ct = k !== rt, at = b.length === 7 && !P(S(b, l, /* @__PURE__ */ new Date())), dt = k.length === 7 && !P(S(k, l, /* @__PURE__ */ new Date())), it = M("datePicker.startMonth"), lt = M("datePicker.endMonth");
89
+ return /* @__PURE__ */ p("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "month-range-picker", "data-disabled": w || void 0, children: [
90
+ /* @__PURE__ */ p("div", { className: "flex flex-col gap-[6px]", children: [
91
+ V && /* @__PURE__ */ p(
92
+ "label",
101
93
  {
102
- "data-state": s ? "open" : "closed",
103
- className: P(
104
- "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",
105
- k ? "border-destructive hover:border-destructive" : "border-input",
106
- N === "sm" ? "h-6" : N === "md" ? "h-[28px]" : "h-8",
107
- x && "pointer-events-none opacity-100 bg-disabled-secondary-bg border-border text-disabled-text hover:border-border",
108
- "cursor-pointer",
109
- F
94
+ className: y(
95
+ "text-xs font-medium leading-[18px] text-content-tertiary",
96
+ w && "opacity-70",
97
+ N && "text-destructive"
110
98
  ),
111
99
  children: [
112
- /* @__PURE__ */ f("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
113
- /* @__PURE__ */ o(
114
- "input",
115
- {
116
- ref: V,
117
- type: "text",
118
- value: M,
119
- onChange: _,
120
- onBlur: Y,
121
- onClick: (e) => s && e.stopPropagation(),
122
- placeholder: s ? u("datePicker.monthYearFormat") : st,
123
- disabled: !!x,
124
- "data-field": "start",
125
- className: P(
126
- "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",
127
- at ? "text-destructive" : nt ? "text-muted-foreground" : ""
128
- ),
129
- ...J
130
- }
131
- ),
132
- /* @__PURE__ */ o(
133
- "input",
134
- {
135
- ref: L,
136
- type: "text",
137
- value: b,
138
- onChange: tt,
139
- onBlur: Y,
140
- onClick: (e) => s && e.stopPropagation(),
141
- placeholder: s ? u("datePicker.monthYearFormat") : it,
142
- disabled: !!x,
143
- "data-field": "end",
144
- className: P(
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",
146
- dt ? "text-destructive" : rt ? "text-muted-foreground" : ""
147
- )
148
- }
149
- )
150
- ] }),
151
- /* @__PURE__ */ f("div", { className: "flex items-center gap-1 shrink-0", children: [
152
- t?.from && !x && /* @__PURE__ */ f(B, { children: [
153
- /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(
154
- ct,
100
+ V,
101
+ " ",
102
+ L && /* @__PURE__ */ o("span", { className: "text-destructive", children: "*" })
103
+ ]
104
+ }
105
+ ),
106
+ /* @__PURE__ */ p(ht, { open: d, onOpenChange: C, children: [
107
+ /* @__PURE__ */ o(ut, { asChild: !0, children: /* @__PURE__ */ p(
108
+ "div",
109
+ {
110
+ "data-state": d ? "open" : "closed",
111
+ className: y(
112
+ "flex w-full items-center justify-between gap-2 rounded-md border bg-canvas-elevated px-3 text-sm shadow-sm transition-colors hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
113
+ N ? "border-destructive hover:border-destructive" : "border-field",
114
+ D === "sm" ? "h-6" : D === "md" ? "h-[28px]" : "h-8",
115
+ w && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
116
+ "cursor-pointer",
117
+ K
118
+ ),
119
+ children: [
120
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
121
+ /* @__PURE__ */ o(
122
+ "input",
155
123
  {
156
- className: "h-4 w-4 cursor-pointer hover:text-foreground text-muted-foreground",
157
- onClick: (e) => {
158
- e.stopPropagation(), T();
159
- }
124
+ ref: T,
125
+ type: "text",
126
+ value: b,
127
+ onChange: et,
128
+ onBlur: $,
129
+ onClick: (e) => d && e.stopPropagation(),
130
+ placeholder: d ? n === "YYYY/MM" ? "YYYY/MM" : M("datePicker.monthYearFormat") : it,
131
+ disabled: !!w,
132
+ "data-field": "start",
133
+ className: y(
134
+ "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
135
+ at ? "text-destructive" : st ? "text-content-muted" : ""
136
+ ),
137
+ ...Q
160
138
  }
161
- ) }),
162
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: u("calendar.clear") })
139
+ ),
140
+ /* @__PURE__ */ o(
141
+ "input",
142
+ {
143
+ ref: W,
144
+ type: "text",
145
+ value: k,
146
+ onChange: nt,
147
+ onBlur: $,
148
+ onClick: (e) => d && e.stopPropagation(),
149
+ placeholder: d ? n === "YYYY/MM" ? "YYYY/MM" : M("datePicker.monthYearFormat") : lt,
150
+ disabled: !!w,
151
+ "data-field": "end",
152
+ className: y(
153
+ "flex-1 min-w-0 bg-transparent p-0 text-sm font-medium outline-none placeholder:font-medium placeholder:text-content-empty disabled:cursor-not-allowed disabled:opacity-50",
154
+ dt ? "text-destructive" : ct ? "text-content-muted" : ""
155
+ )
156
+ }
157
+ )
163
158
  ] }),
164
- /* @__PURE__ */ f(B, { children: [
165
- /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(lt, { className: "h-4 w-4 text-secondary-foreground" }) }),
166
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: u("datePicker.selectMonthRange") })
159
+ /* @__PURE__ */ p("div", { className: "flex items-center gap-1 shrink-0", children: [
160
+ t?.from && !w && /* @__PURE__ */ p(O, { children: [
161
+ /* @__PURE__ */ o(z, { asChild: !0, children: /* @__PURE__ */ o(
162
+ ft,
163
+ {
164
+ className: "h-4 w-4 cursor-pointer hover:text-content text-content-muted",
165
+ onClick: (e) => {
166
+ e.stopPropagation(), v();
167
+ }
168
+ }
169
+ ) }),
170
+ /* @__PURE__ */ o(H, { variant: "tertiary", side: "top", children: M("calendar.clear") })
171
+ ] }),
172
+ /* @__PURE__ */ p(O, { children: [
173
+ /* @__PURE__ */ o(z, { asChild: !0, children: /* @__PURE__ */ o(mt, { className: "h-4 w-4 text-secondary-foreground" }) }),
174
+ /* @__PURE__ */ o(H, { variant: "tertiary", side: "top", children: M("datePicker.selectMonthRange") })
175
+ ] })
167
176
  ] })
168
- ] })
169
- ]
170
- }
171
- ) }),
172
- /* @__PURE__ */ o(
173
- ht,
174
- {
175
- className: "w-auto p-0",
176
- align: "start",
177
- onOpenAutoFocus: (e) => e.preventDefault(),
178
- children: /* @__PURE__ */ o(
179
- yt,
180
- {
181
- pickerType: "month",
182
- monthMode: "range",
183
- selectedMonths: E,
184
- onMonthSelect: U,
185
- month: Q,
186
- onMonthChange: C,
187
- disabled: { before: H, after: X },
188
- startMonth: q,
189
- endMonth: v,
190
- showFooter: p,
191
- onApply: W,
192
- onCancel: Z,
193
- onClear: T
194
- }
195
- )
196
- }
197
- )
177
+ ]
178
+ }
179
+ ) }),
180
+ /* @__PURE__ */ o(
181
+ xt,
182
+ {
183
+ className: "w-auto p-0",
184
+ align: "start",
185
+ onOpenAutoFocus: (e) => e.preventDefault(),
186
+ children: /* @__PURE__ */ o(
187
+ gt,
188
+ {
189
+ pickerType: "month",
190
+ monthMode: "range",
191
+ selectedMonths: A,
192
+ onMonthSelect: _,
193
+ month: Z,
194
+ onMonthChange: R,
195
+ disabled: { before: X, after: q },
196
+ startMonth: G,
197
+ endMonth: J,
198
+ showFooter: u,
199
+ onApply: F,
200
+ onCancel: tt,
201
+ onClear: v
202
+ }
203
+ )
204
+ }
205
+ )
206
+ ] })
198
207
  ] }),
199
- D && /* @__PURE__ */ f("div", { className: P("flex items-center gap-1", k && "text-destructive"), children: [
200
- !k && /* @__PURE__ */ o(mt, { size: 10, className: "shrink-0 text-muted-foreground" }),
208
+ E && /* @__PURE__ */ p("div", { className: y("flex items-center gap-[6px]", N && "text-destructive"), children: [
209
+ !N && /* @__PURE__ */ o(pt, { size: 10, className: "shrink-0 text-content-muted" }),
201
210
  /* @__PURE__ */ o(
202
211
  "p",
203
212
  {
204
- className: P(
205
- "text-[10px] text-[#7a8294]",
206
- k && "text-destructive"
213
+ className: y(
214
+ "text-[10px] leading-4 text-navigation-muted",
215
+ N && "text-destructive"
207
216
  ),
208
- children: D
217
+ children: E
209
218
  }
210
219
  )
211
220
  ] })
212
221
  ] });
213
222
  }
214
223
  );
215
- gt.displayName = "MonthRangePicker";
224
+ Yt.displayName = "MonthRangePicker";
216
225
  export {
217
- gt as MonthRangePicker
226
+ Yt as MonthRangePicker
218
227
  };
@@ -7,7 +7,7 @@ import { cn as E } from "../../../lib/utils.js";
7
7
  import { Input as F } from "../input.js";
8
8
  import { Popover as V, PopoverTrigger as X, PopoverContent as $ } from "../popover.js";
9
9
  import { Calendar as q } from "../calendar.js";
10
- import { Tooltip as u, TooltipTrigger as g, TooltipContent as y } from "../tooltip.js";
10
+ import { Tooltip as u, TooltipTrigger as y, TooltipContent as g } from "../tooltip.js";
11
11
  import { getDateFnsLocale as z } from "../../../i18n/getDateFnsLocale.js";
12
12
  import { useImpactNovaI18n as B } from "../../../i18n/ImpactNovaI18nContext.js";
13
13
  const G = r.forwardRef(
@@ -20,23 +20,23 @@ const G = r.forwardRef(
20
20
  maxDate: x,
21
21
  startMonth: D,
22
22
  endMonth: N,
23
- showFooter: s = !0,
24
- disabled: d,
23
+ showFooter: c = !0,
24
+ disabled: p,
25
25
  className: T,
26
26
  ...k
27
27
  }, A) => {
28
- const { locale: p, t: c } = B(), v = r.useMemo(() => z(p), [p]), L = P ?? c("datePicker.selectMultipleDates"), [m, n] = r.useState(!1), [f, a] = r.useState(e);
28
+ const { locale: d, t: s } = B(), v = r.useMemo(() => z(d), [d]), L = P ?? s("datePicker.selectMultipleDates"), [m, n] = r.useState(!1), [f, a] = r.useState(e);
29
29
  r.useEffect(() => {
30
30
  a(e);
31
31
  }, [m, e]);
32
32
  const O = (o) => {
33
- a(o), s || i?.(o);
33
+ a(o), c || i?.(o);
34
34
  }, S = (o) => {
35
35
  i?.(o !== void 0 ? o : f), n(!1);
36
36
  }, w = () => {
37
37
  a(e), n(!1);
38
38
  }, h = () => {
39
- a(void 0), i?.(void 0), s || n(!1);
39
+ a(void 0), i?.(void 0), c || n(!1);
40
40
  }, I = e && e.length > 0 ? e.length === 1 ? b(e[0], C, { locale: v }) : `${e.length} dates selected` : "";
41
41
  return /* @__PURE__ */ l(V, { open: m, onOpenChange: n, children: [
42
42
  /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
@@ -46,24 +46,24 @@ const G = r.forwardRef(
46
46
  value: I,
47
47
  placeholder: L,
48
48
  readOnly: !0,
49
- disabled: d,
49
+ disabled: p,
50
50
  className: E("cursor-pointer", T),
51
51
  suffix: /* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
52
- e && e.length > 0 && !d && /* @__PURE__ */ l(u, { children: [
53
- /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
52
+ e && e.length > 0 && !p && /* @__PURE__ */ l(u, { children: [
53
+ /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(
54
54
  j,
55
55
  {
56
- className: "h-4 w-4 cursor-pointer hover:text-foreground",
56
+ className: "h-4 w-4 cursor-pointer hover:text-content",
57
57
  onClick: (o) => {
58
58
  o.stopPropagation(), h();
59
59
  }
60
60
  }
61
61
  ) }),
62
- /* @__PURE__ */ t(y, { variant: "tertiary", side: "top", children: c("calendar.clear") })
62
+ /* @__PURE__ */ t(g, { variant: "tertiary", side: "top", children: s("calendar.clear") })
63
63
  ] }),
64
64
  /* @__PURE__ */ l(u, { children: [
65
- /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(R, { className: "h-4 w-4 text-secondary-foreground" }) }),
66
- /* @__PURE__ */ t(y, { variant: "tertiary", side: "top", children: c("datePicker.selectMultipleDates") })
65
+ /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(R, { className: "h-4 w-4 text-secondary-foreground" }) }),
66
+ /* @__PURE__ */ t(g, { variant: "tertiary", side: "top", children: s("datePicker.selectMultipleDates") })
67
67
  ] })
68
68
  ] }),
69
69
  ...k
@@ -84,7 +84,7 @@ const G = r.forwardRef(
84
84
  disabled: { before: M, after: x },
85
85
  startMonth: D,
86
86
  endMonth: N,
87
- showFooter: s,
87
+ showFooter: c,
88
88
  onApply: S,
89
89
  onCancel: w,
90
90
  onClear: h,
@@ -50,7 +50,7 @@ const X = c.forwardRef(
50
50
  /* @__PURE__ */ t(u, { asChild: !0, children: /* @__PURE__ */ t(
51
51
  I,
52
52
  {
53
- className: "h-4 w-4 cursor-pointer hover:text-foreground",
53
+ className: "h-4 w-4 cursor-pointer hover:text-content",
54
54
  onClick: (o) => {
55
55
  o.stopPropagation(), m();
56
56
  }
@@ -62,7 +62,7 @@ const U = (e, o = "MM/dd/yyyy", n) => {
62
62
  /* @__PURE__ */ t(M, { asChild: !0, children: /* @__PURE__ */ t(
63
63
  X,
64
64
  {
65
- className: "h-4 w-4 cursor-pointer hover:text-foreground",
65
+ className: "h-4 w-4 cursor-pointer hover:text-content",
66
66
  onClick: (r) => {
67
67
  r.stopPropagation(), u();
68
68
  }
@@ -93,7 +93,7 @@ const a = (e, s = "MM/dd/yyyy", n) => {
93
93
  "data-form-control": "input",
94
94
  className: re(
95
95
  "cursor-pointer",
96
- ne ? "text-destructive" : j ? "text-muted-foreground" : "",
96
+ ne ? "text-destructive" : j ? "text-content-muted" : "",
97
97
  G
98
98
  ),
99
99
  suffix: /* @__PURE__ */ g("div", { className: "flex items-center gap-1", children: [
@@ -101,7 +101,7 @@ const a = (e, s = "MM/dd/yyyy", n) => {
101
101
  /* @__PURE__ */ r($, { asChild: !0, children: /* @__PURE__ */ r(
102
102
  te,
103
103
  {
104
- className: "h-4 w-4 cursor-pointer hover:text-foreground",
104
+ className: "h-4 w-4 cursor-pointer hover:text-content",
105
105
  onClick: (t) => {
106
106
  t.stopPropagation(), v();
107
107
  }