impact-nova 2.0.1 → 2.0.3

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 (60) hide show
  1. package/dist/assets/empty-state-1-3H9kriwm.webp +0 -0
  2. package/dist/assets/empty-state-2-Brn6WD3e.webp +0 -0
  3. package/dist/assets/empty-state-3-CqLldG5q.webp +0 -0
  4. package/dist/assets/empty-state-4-Br-xaUJO.webp +0 -0
  5. package/dist/assets/empty-state-5-BanvbHv1.webp +0 -0
  6. package/dist/assets/empty-state-6-Egbfj9Fe.webp +0 -0
  7. package/dist/components/ui/accordion.d.ts +13 -0
  8. package/dist/components/ui/accordion.js +50 -33
  9. package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +24 -23
  10. package/dist/components/ui/ag-grid-react/headers/components/header-info.d.ts +8 -6
  11. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +69 -60
  12. package/dist/components/ui/ag-grid-react/headers/custom-header.js +23 -22
  13. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +43 -35
  14. package/dist/components/ui/ag-grid-react/index.js +44 -42
  15. package/dist/components/ui/breadcrumb.d.ts +5 -1
  16. package/dist/components/ui/breadcrumb.js +59 -51
  17. package/dist/components/ui/date-picker/date-picker.js +14 -14
  18. package/dist/components/ui/date-picker/date-range-picker.js +25 -25
  19. package/dist/components/ui/date-picker/month-picker.js +4 -4
  20. package/dist/components/ui/date-picker/month-range-picker.js +7 -7
  21. package/dist/components/ui/date-picker/multi-date-picker.js +9 -9
  22. package/dist/components/ui/date-picker/multi-month-picker.js +29 -29
  23. package/dist/components/ui/date-picker/multi-week-picker.js +20 -20
  24. package/dist/components/ui/date-picker/week-picker.js +31 -31
  25. package/dist/components/ui/date-picker/week-range-picker.js +22 -22
  26. package/dist/components/ui/dynamic-layout.d.ts +1 -1
  27. package/dist/components/ui/empty-container/assets/empty-state-1.webp.js +1 -1
  28. package/dist/components/ui/empty-container/assets/empty-state-2.webp.js +2 -2
  29. package/dist/components/ui/empty-container/assets/empty-state-3.webp.js +1 -1
  30. package/dist/components/ui/empty-container/assets/empty-state-4.webp.js +1 -1
  31. package/dist/components/ui/empty-container/assets/empty-state-5.webp.js +1 -1
  32. package/dist/components/ui/empty-container/assets/empty-state-6.webp.js +2 -2
  33. package/dist/components/ui/empty-container/emptyStateIllustrations.d.ts +2 -2
  34. package/dist/components/ui/empty-container/emptyStateIllustrations.js +32 -20
  35. package/dist/components/ui/empty-container.js +82 -58
  36. package/dist/components/ui/filter-strip/filter-summary.js +28 -29
  37. package/dist/components/ui/filter-strip/filter-tag-list.js +87 -96
  38. package/dist/components/ui/radio-group.js +19 -19
  39. package/dist/components/ui/select/select.js +29 -28
  40. package/dist/components/ui/sidebar.d.ts +2 -1
  41. package/dist/components/ui/sidebar.js +212 -202
  42. package/dist/components/ui/tag.d.ts +3 -1
  43. package/dist/components/ui/tag.js +65 -44
  44. package/dist/components/ui/types/empty-container.types.d.ts +2 -0
  45. package/dist/i18n/defaultMessages.d.ts +1 -0
  46. package/dist/i18n/defaultMessages.js +1 -0
  47. package/dist/i18n/locales/de.js +1 -0
  48. package/dist/i18n/locales/es.js +1 -0
  49. package/dist/i18n/locales/hi.js +1 -0
  50. package/dist/i18n/locales/kn.js +1 -0
  51. package/dist/impact-nova-components.css +4 -0
  52. package/dist/impact-nova.css +1 -1
  53. package/dist/index.js +441 -439
  54. package/package.json +4 -1
  55. package/dist/assets/empty-state-1-Bqh-20pq.webp +0 -0
  56. package/dist/assets/empty-state-2-DPMRkOBw.webp +0 -0
  57. package/dist/assets/empty-state-3-BqSOh0-t.webp +0 -0
  58. package/dist/assets/empty-state-4-CjN-c01q.webp +0 -0
  59. package/dist/assets/empty-state-5-D4RMA1H1.webp +0 -0
  60. package/dist/assets/empty-state-6-Dlnf1-2W.webp +0 -0
@@ -4,9 +4,9 @@ import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
4
4
  import { format as h, isValid as I, parse as b } from "date-fns";
5
5
  import { cn as $, padValidDateString as F, maskDate as ee } from "../../../lib/utils.js";
6
6
  import { Input as te } from "../input.js";
7
- import { Popover as ne, PopoverTrigger as re, PopoverContent as oe } from "../popover.js";
7
+ import { Popover as ne, PopoverAnchor as re, PopoverContent as oe } from "../popover.js";
8
8
  import { Calendar as ce } from "../calendar.js";
9
- import { Tooltip as T, TooltipTrigger as A, TooltipContent as E } from "../tooltip.js";
9
+ import { Tooltip as S, TooltipTrigger as E, TooltipContent as T } from "../tooltip.js";
10
10
  import { getDateFnsLocale as ie } from "../../../i18n/getDateFnsLocale.js";
11
11
  import { useImpactNovaI18n as le } from "../../../i18n/ImpactNovaI18nContext.js";
12
12
  const ae = c.forwardRef(
@@ -41,7 +41,7 @@ const ae = c.forwardRef(
41
41
  d?.(e !== void 0 ? e : v), l(!1);
42
42
  }, V = () => {
43
43
  a(t), f(t ? h(t, n, { locale: i }) : ""), l(!1);
44
- }, M = () => {
44
+ }, A = () => {
45
45
  a(void 0), f(""), d?.(void 0), u || l(!1);
46
46
  }, W = (e) => {
47
47
  const g = e.target.value, C = ee(g, n, p);
@@ -55,11 +55,11 @@ const ae = c.forwardRef(
55
55
  if (r) return;
56
56
  const e = F(p, n), g = b(e, n, /* @__PURE__ */ new Date(), { locale: i });
57
57
  !I(g) || e.length !== n.length ? (f(t ? h(t, n, { locale: i }) : ""), a(t)) : (f(e), u || d?.(g));
58
- }, S = (t ? h(t, n, { locale: i }) : "") !== p, Y = p.length === n.length && !I(b(p, n, /* @__PURE__ */ new Date(), { locale: i }));
58
+ }, M = (t ? h(t, n, { locale: i }) : "") !== p, Y = p.length === n.length && !I(b(p, n, /* @__PURE__ */ new Date(), { locale: i }));
59
59
  return /* @__PURE__ */ x(ne, { open: s ? !1 : r, onOpenChange: (e) => {
60
60
  s || l(e);
61
61
  }, children: [
62
- /* @__PURE__ */ o(re, { asChild: !0, children: /* @__PURE__ */ o("div", { "data-component": "date-picker", "data-state": r ? "open" : "closed", "data-pending": S || void 0, children: /* @__PURE__ */ o(
62
+ /* @__PURE__ */ o(re, { asChild: !0, children: /* @__PURE__ */ o("div", { "data-component": "date-picker", "data-state": r ? "open" : "closed", "data-pending": M || void 0, children: /* @__PURE__ */ o(
63
63
  te,
64
64
  {
65
65
  ref: y,
@@ -75,33 +75,33 @@ const ae = c.forwardRef(
75
75
  "data-form-control": "input",
76
76
  className: $(
77
77
  "cursor-pointer",
78
- Y ? "text-destructive" : S ? "text-content-muted" : "",
78
+ Y ? "text-destructive" : M ? "text-content-muted" : "",
79
79
  O
80
80
  ),
81
81
  suffix: /* @__PURE__ */ x("div", { className: "flex items-center gap-1", children: [
82
- t && !s && /* @__PURE__ */ x(T, { children: [
83
- /* @__PURE__ */ o(A, { asChild: !0, children: /* @__PURE__ */ o(
82
+ t && !s && /* @__PURE__ */ x(S, { children: [
83
+ /* @__PURE__ */ o(E, { asChild: !0, children: /* @__PURE__ */ o(
84
84
  "button",
85
85
  {
86
86
  type: "button",
87
87
  tabIndex: 0,
88
88
  "aria-label": m("calendar.clear"),
89
89
  onClick: (e) => {
90
- e.stopPropagation(), M();
90
+ e.stopPropagation(), A();
91
91
  },
92
92
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
93
93
  children: /* @__PURE__ */ o(Z, { className: "size-3 hover:text-content" })
94
94
  }
95
95
  ) }),
96
- /* @__PURE__ */ o(E, { variant: "tertiary", side: "top", children: m("calendar.clear") })
96
+ /* @__PURE__ */ o(T, { variant: "tertiary", side: "top", children: m("calendar.clear") })
97
97
  ] }),
98
- /* @__PURE__ */ x(T, { children: [
99
- /* @__PURE__ */ o(A, { asChild: !0, children: /* @__PURE__ */ o("button", { type: "button", tabIndex: 0, "aria-label": m("datePicker.selectDate"), onClick: (e) => {
98
+ /* @__PURE__ */ x(S, { children: [
99
+ /* @__PURE__ */ o(E, { asChild: !0, children: /* @__PURE__ */ o("button", { type: "button", tabIndex: 0, "aria-label": m("datePicker.selectDate"), onClick: (e) => {
100
100
  e.stopPropagation(), s || l(!r);
101
101
  }, onKeyDown: (e) => {
102
102
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), s || (k.current = !0, l(!r)));
103
103
  }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ o(_, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
104
- /* @__PURE__ */ o(E, { variant: "tertiary", side: "top", children: m("datePicker.selectDate") })
104
+ /* @__PURE__ */ o(T, { variant: "tertiary", side: "top", children: m("datePicker.selectDate") })
105
105
  ] })
106
106
  ] }),
107
107
  ...H
@@ -129,7 +129,7 @@ const ae = c.forwardRef(
129
129
  showFooter: u,
130
130
  onApply: U,
131
131
  onCancel: V,
132
- onClear: M,
132
+ onClear: A,
133
133
  captionLayout: "dropdown",
134
134
  ...N !== void 0 ? { weekStartsOn: N } : {}
135
135
  }
@@ -3,7 +3,7 @@ import * as d from "react";
3
3
  import { Cross as ye, CalendarMonth as be, Info as Q } from "impact-nova-icons";
4
4
  import { format as p, isValid as y, parse as b } from "date-fns";
5
5
  import { cn as x, padValidDateString as E, maskDate as U } from "../../../lib/utils.js";
6
- import { Popover as we, PopoverTrigger as De, PopoverContent as ke } from "../popover.js";
6
+ import { Popover as we, PopoverAnchor as De, PopoverContent as ke } from "../popover.js";
7
7
  import { Calendar as ve } from "../calendar.js";
8
8
  import { Tooltip as W, TooltipTrigger as X, TooltipContent as Y } from "../tooltip.js";
9
9
  import { getDateFnsLocale as Ne } from "../../../i18n/getDateFnsLocale.js";
@@ -32,9 +32,9 @@ const Pe = d.forwardRef(
32
32
  required: ne,
33
33
  className: oe,
34
34
  ...le
35
- }, re) => {
36
- const { locale: T, t: R } = Se(), o = d.useMemo(() => Ne(T), [T]), H = Z ?? R("datePicker.startDate"), q = $ ?? R("datePicker.endDate"), G = d.useRef(null), se = d.useRef(null);
37
- d.useRef(null), d.useRef(null), d.useImperativeHandle(re, () => G.current);
35
+ }, se) => {
36
+ const { locale: H, t: R } = Se(), o = d.useMemo(() => Ne(H), [H]), T = Z ?? R("datePicker.startDate"), q = $ ?? R("datePicker.endDate"), G = d.useRef(null), re = d.useRef(null);
37
+ d.useRef(null), d.useRef(null), d.useImperativeHandle(se, () => G.current);
38
38
  const [i, w] = d.useState(!1), C = d.useRef(!1), [I, D] = d.useState(n), [k, S] = d.useState(n?.from ? p(n.from, t, { locale: o }) : ""), [v, P] = d.useState(n?.to ? p(n.to, t, { locale: o }) : ""), [ie, A] = d.useState(n?.from || /* @__PURE__ */ new Date());
39
39
  d.useEffect(() => {
40
40
  i || (S(n?.from ? p(n.from, t, { locale: o }) : ""), P(n?.to ? p(n.to, t, { locale: o }) : ""), D(n));
@@ -44,40 +44,40 @@ const Pe = d.forwardRef(
44
44
  const ce = (e) => {
45
45
  D(e), e?.from && S(p(e.from, t, { locale: o })), e?.to && P(p(e.to, t, { locale: o })), h || e?.from && e?.to && e.from.getTime() !== e.to.getTime() && (f?.(e), w(!1));
46
46
  }, ae = (e) => {
47
- let r = e !== void 0 ? e : I;
48
- r?.from && !r.to && (r = { from: r.from, to: r.from }), f?.(r), w(!1);
47
+ let s = e !== void 0 ? e : I;
48
+ s?.from && !s.to && (s = { from: s.from, to: s.from }), f?.(s), w(!1);
49
49
  }, z = () => {
50
50
  D(n), S(n?.from ? p(n.from, t, { locale: o }) : ""), P(n?.to ? p(n.to, t, { locale: o }) : ""), w(!1);
51
51
  }, K = () => {
52
52
  D(void 0), S(""), P(""), f?.(void 0), h || w(!1);
53
53
  }, fe = (e) => {
54
- const r = e.target.value, c = U(r, t, k);
54
+ const s = e.target.value, c = U(s, t, k);
55
55
  if (S(c), c === "") {
56
56
  const l = { from: void 0, to: I?.to };
57
57
  D(l), h || f?.(l);
58
58
  return;
59
59
  }
60
- const s = b(c, t, /* @__PURE__ */ new Date(), { locale: o });
61
- if (y(s) && c.length === t.length) {
62
- const l = { from: s, to: I?.to };
63
- D(l), A(s), h || f?.(l);
60
+ const r = b(c, t, /* @__PURE__ */ new Date(), { locale: o });
61
+ if (y(r) && c.length === t.length) {
62
+ const l = { from: r, to: I?.to };
63
+ D(l), A(r), h || f?.(l);
64
64
  }
65
65
  }, de = (e) => {
66
- const r = e.target.value, c = U(r, t, v);
66
+ const s = e.target.value, c = U(s, t, v);
67
67
  if (P(c), c === "") {
68
68
  const l = { from: I?.from, to: void 0 };
69
69
  D(l), h || f?.(l);
70
70
  return;
71
71
  }
72
- const s = b(c, t, /* @__PURE__ */ new Date(), { locale: o });
73
- if (y(s) && c.length === t.length) {
74
- const l = { from: I?.from, to: s };
75
- D(l), s && A(s), h || f?.(l);
72
+ const r = b(c, t, /* @__PURE__ */ new Date(), { locale: o });
73
+ if (y(r) && c.length === t.length) {
74
+ const l = { from: I?.from, to: r };
75
+ D(l), r && A(r), h || f?.(l);
76
76
  }
77
77
  }, J = () => {
78
78
  if (i) return;
79
- const e = E(k, t), r = E(v, t), c = b(e, t, /* @__PURE__ */ new Date(), { locale: o }), s = b(r, t, /* @__PURE__ */ new Date(), { locale: o }), l = y(c) && e.length === t.length, g = y(s) && r.length === t.length;
80
- k && !l ? S(n?.from ? p(n.from, t, { locale: o }) : "") : l && S(e), v && !g ? P(n?.to ? p(n.to, t, { locale: o }) : "") : g && P(r), l && g && !h ? f?.({ from: c, to: s }) : l && !h ? f?.({ from: c, to: n?.to }) : g && !h && f?.({ from: n?.from, to: s });
79
+ const e = E(k, t), s = E(v, t), c = b(e, t, /* @__PURE__ */ new Date(), { locale: o }), r = b(s, t, /* @__PURE__ */ new Date(), { locale: o }), l = y(c) && e.length === t.length, g = y(r) && s.length === t.length;
80
+ k && !l ? S(n?.from ? p(n.from, t, { locale: o }) : "") : l && S(e), v && !g ? P(n?.to ? p(n.to, t, { locale: o }) : "") : g && P(s), l && g && !h ? f?.({ from: c, to: r }) : l && !h ? f?.({ from: c, to: n?.to }) : g && !h && f?.({ from: n?.from, to: r });
81
81
  }, pe = n?.from ? p(n.from, t, { locale: o }) : "", me = n?.to ? p(n.to, t, { locale: o }) : "", ue = k !== pe, xe = v !== me, he = k.length === t.length && !y(b(k, t, /* @__PURE__ */ new Date(), { locale: o })), ge = v.length === t.length && !y(b(v, t, /* @__PURE__ */ new Date(), { locale: o }));
82
82
  return /* @__PURE__ */ u("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "date-range-picker", "data-disabled": m || void 0, children: [
83
83
  /* @__PURE__ */ u("div", { className: "flex flex-col gap-[6px]", children: [
@@ -133,14 +133,14 @@ const Pe = d.forwardRef(
133
133
  onKeyDown: (e) => {
134
134
  if (e.key === "Enter" && !i) {
135
135
  e.preventDefault();
136
- const r = E(k, t), c = E(v, t), s = b(r, t, /* @__PURE__ */ new Date(), { locale: o }), l = b(c, t, /* @__PURE__ */ new Date(), { locale: o }), g = y(s) && r.length === t.length, M = y(l) && c.length === t.length;
137
- g && M ? f?.({ from: s, to: l }) : g ? f?.({ from: s, to: n?.to }) : M && f?.({ from: n?.from, to: l });
136
+ const s = E(k, t), c = E(v, t), r = b(s, t, /* @__PURE__ */ new Date(), { locale: o }), l = b(c, t, /* @__PURE__ */ new Date(), { locale: o }), g = y(r) && s.length === t.length, M = y(l) && c.length === t.length;
137
+ g && M ? f?.({ from: r, to: l }) : g ? f?.({ from: r, to: n?.to }) : M && f?.({ from: n?.from, to: l });
138
138
  }
139
139
  e.key === "ArrowDown" && !i && !m && (e.preventDefault(), C.current = !0, w(!0)), e.key === "Escape" && i && (e.preventDefault(), z());
140
140
  },
141
- placeholder: i ? t : H,
141
+ placeholder: i ? t : T,
142
142
  disabled: !!m,
143
- "aria-label": H,
143
+ "aria-label": T,
144
144
  "data-field": "start",
145
145
  className: x(
146
146
  "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",
@@ -152,7 +152,7 @@ const Pe = d.forwardRef(
152
152
  /* @__PURE__ */ a(
153
153
  "input",
154
154
  {
155
- ref: se,
155
+ ref: re,
156
156
  type: "text",
157
157
  value: v,
158
158
  onChange: de,
@@ -161,8 +161,8 @@ const Pe = d.forwardRef(
161
161
  onKeyDown: (e) => {
162
162
  if (e.key === "Enter" && !i) {
163
163
  e.preventDefault();
164
- const r = E(k, t), c = E(v, t), s = b(r, t, /* @__PURE__ */ new Date(), { locale: o }), l = b(c, t, /* @__PURE__ */ new Date(), { locale: o }), g = y(s) && r.length === t.length, M = y(l) && c.length === t.length;
165
- g && M ? f?.({ from: s, to: l }) : g ? f?.({ from: s, to: n?.to }) : M && f?.({ from: n?.from, to: l });
164
+ const s = E(k, t), c = E(v, t), r = b(s, t, /* @__PURE__ */ new Date(), { locale: o }), l = b(c, t, /* @__PURE__ */ new Date(), { locale: o }), g = y(r) && s.length === t.length, M = y(l) && c.length === t.length;
165
+ g && M ? f?.({ from: r, to: l }) : g ? f?.({ from: r, to: n?.to }) : M && f?.({ from: n?.from, to: l });
166
166
  }
167
167
  e.key === "ArrowDown" && !i && !m && (e.preventDefault(), C.current = !0, w(!0)), e.key === "Escape" && i && (e.preventDefault(), z());
168
168
  },
@@ -4,7 +4,7 @@ import { Cross as L, CalendarMonth as Q } from "impact-nova-icons";
4
4
  import { isValid as C, parse as P } from "date-fns";
5
5
  import { cn as U, padValidDateString as W, maskDate as X } from "../../../lib/utils.js";
6
6
  import { Input as Z } from "../input.js";
7
- import { Popover as _, PopoverTrigger as F, PopoverContent as v } from "../popover.js";
7
+ import { Popover as _, PopoverAnchor as F, PopoverContent as v } from "../popover.js";
8
8
  import { Calendar as tt } from "../calendar.js";
9
9
  import { Tooltip as I, TooltipTrigger as N, TooltipContent as T } from "../tooltip.js";
10
10
  import { useImpactNovaI18n as et } from "../../../i18n/ImpactNovaI18nContext.js";
@@ -13,8 +13,8 @@ const c = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, nt =
13
13
  value: t,
14
14
  onChange: s,
15
15
  placeholder: V,
16
- minDate: b,
17
- maxDate: A,
16
+ minDate: A,
17
+ maxDate: b,
18
18
  startMonth: R,
19
19
  endMonth: j,
20
20
  showFooter: l = !0,
@@ -118,7 +118,7 @@ const c = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, nt =
118
118
  onMonthSelect: $,
119
119
  month: E,
120
120
  onMonthChange: g,
121
- disabled: { before: b, after: A },
121
+ disabled: { before: A, after: b },
122
122
  startMonth: R,
123
123
  endMonth: j,
124
124
  showFooter: l,
@@ -3,7 +3,7 @@ import * as p from "react";
3
3
  import { Cross as ht, CalendarMonth as gt, Info as J } from "impact-nova-icons";
4
4
  import { isValid as M, parse as Y } from "date-fns";
5
5
  import { cn as g, padValidDateString as R, maskDate as L } from "../../../lib/utils.js";
6
- import { Popover as xt, PopoverTrigger as Mt, PopoverContent as Yt } from "../popover.js";
6
+ import { Popover as xt, PopoverAnchor as Mt, PopoverContent as Yt } from "../popover.js";
7
7
  import { Calendar as yt } from "../calendar.js";
8
8
  import { Tooltip as Q, TooltipTrigger as U, TooltipContent as W } from "../tooltip.js";
9
9
  import { useImpactNovaI18n as wt } from "../../../i18n/ImpactNovaI18nContext.js";
@@ -35,11 +35,11 @@ const m = (e, i = "MM/YYYY") => {
35
35
  }, nt) => {
36
36
  const { t: y } = wt();
37
37
  A ?? y("datePicker.selectMonthRange");
38
- const T = p.useRef(null), ot = p.useRef(null), c = p.useMemo(
38
+ const H = p.useRef(null), ot = p.useRef(null), c = p.useMemo(
39
39
  () => a === "YYYY/MM" ? "yyyy/MM" : "MM/yyyy",
40
40
  [a]
41
41
  );
42
- p.useImperativeHandle(nt, () => T.current);
42
+ p.useImperativeHandle(nt, () => H.current);
43
43
  const [s, w] = p.useState(!1), V = p.useRef(!1), [v, b] = p.useState(e), [k, N] = p.useState(e?.from ? m(e.from, a) : ""), [D, P] = p.useState(e?.to ? m(e.to, a) : ""), [rt, j] = p.useState(() => e?.from ? new Date(e.from.year, e.from.month, 1) : I || /* @__PURE__ */ new Date());
44
44
  p.useEffect(() => {
45
45
  s || (N(e?.from ? m(e.from, a) : ""), P(e?.to ? m(e.to, a) : ""), b(e));
@@ -78,7 +78,7 @@ const m = (e, i = "MM/YYYY") => {
78
78
  const o = { month: n.getMonth(), year: n.getFullYear() }, l = { from: v?.from, to: o };
79
79
  b(l), j(n), x || i?.(l);
80
80
  }
81
- }, H = () => {
81
+ }, T = () => {
82
82
  if (s) return;
83
83
  const t = R(k, c), f = R(D, c), r = Y(t, c, /* @__PURE__ */ new Date()), n = Y(f, c, /* @__PURE__ */ new Date()), o = M(r) && t.length === 7, l = M(n) && f.length === 7;
84
84
  k && !o ? N(e?.from ? m(e.from, a) : "") : o && N(t), D && !l ? P(e?.to ? m(e.to, a) : "") : l && P(f), o && l && !x ? i?.({
@@ -137,11 +137,11 @@ const m = (e, i = "MM/YYYY") => {
137
137
  /* @__PURE__ */ d(
138
138
  "input",
139
139
  {
140
- ref: T,
140
+ ref: H,
141
141
  type: "text",
142
142
  value: k,
143
143
  onChange: it,
144
- onBlur: H,
144
+ onBlur: T,
145
145
  onClick: (t) => s && t.stopPropagation(),
146
146
  onKeyDown: (t) => {
147
147
  if (t.key === "Enter" && !s) {
@@ -178,7 +178,7 @@ const m = (e, i = "MM/YYYY") => {
178
178
  type: "text",
179
179
  value: D,
180
180
  onChange: ct,
181
- onBlur: H,
181
+ onBlur: T,
182
182
  onClick: (t) => s && t.stopPropagation(),
183
183
  onKeyDown: (t) => {
184
184
  if (t.key === "Enter" && !s) {
@@ -4,7 +4,7 @@ import { Cross as j, CalendarMonth as w } from "impact-nova-icons";
4
4
  import { format as z } from "date-fns";
5
5
  import { cn as R } from "../../../lib/utils.js";
6
6
  import { Input as E } from "../input.js";
7
- import { Popover as F, PopoverTrigger as V, PopoverContent as $ } from "../popover.js";
7
+ import { Popover as F, PopoverAnchor as V, PopoverContent as $ } from "../popover.js";
8
8
  import { Calendar as q } from "../calendar.js";
9
9
  import { Tooltip as u, TooltipTrigger as y, TooltipContent as g } from "../tooltip.js";
10
10
  import { getDateFnsLocale as B } from "../../../i18n/getDateFnsLocale.js";
@@ -21,10 +21,10 @@ const H = o.forwardRef(
21
21
  endMonth: D,
22
22
  showFooter: p = !0,
23
23
  disabled: n,
24
- className: T,
25
- ...b
26
- }, k) => {
27
- const { locale: d, t: a } = G(), A = o.useMemo(() => B(d), [d]), v = x ?? a("datePicker.selectMultipleDates"), [m, l] = o.useState(!1), [f, i] = o.useState(t);
24
+ className: A,
25
+ ...T
26
+ }, b) => {
27
+ const { locale: d, t: a } = G(), k = o.useMemo(() => B(d), [d]), v = x ?? a("datePicker.selectMultipleDates"), [m, l] = o.useState(!1), [f, i] = o.useState(t);
28
28
  o.useEffect(() => {
29
29
  i(t);
30
30
  }, [m, t]);
@@ -36,19 +36,19 @@ const H = o.forwardRef(
36
36
  i(t), l(!1);
37
37
  }, h = () => {
38
38
  i(void 0), c?.(void 0), p || l(!1);
39
- }, S = t && t.length > 0 ? t.length === 1 ? z(t[0], C, { locale: A }) : `${t.length} dates selected` : "";
39
+ }, S = t && t.length > 0 ? t.length === 1 ? z(t[0], C, { locale: k }) : `${t.length} dates selected` : "";
40
40
  return /* @__PURE__ */ s(F, { open: n ? !1 : m, onOpenChange: (r) => {
41
41
  n || l(r);
42
42
  }, children: [
43
43
  /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
44
44
  E,
45
45
  {
46
- ref: k,
46
+ ref: b,
47
47
  value: S,
48
48
  placeholder: v,
49
49
  readOnly: !0,
50
50
  disabled: n,
51
- className: R("cursor-pointer", T),
51
+ className: R("cursor-pointer", A),
52
52
  suffix: /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
53
53
  t && t.length > 0 && !n && /* @__PURE__ */ s(u, { children: [
54
54
  /* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ e(
@@ -71,7 +71,7 @@ const H = o.forwardRef(
71
71
  /* @__PURE__ */ e(g, { variant: "tertiary", side: "top", children: a("datePicker.selectMultipleDates") })
72
72
  ] })
73
73
  ] }),
74
- ...b
74
+ ...T
75
75
  }
76
76
  ) }) }),
77
77
  /* @__PURE__ */ e(
@@ -1,54 +1,54 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import * as a from "react";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
+ import * as i from "react";
3
3
  import { Cross as j, CalendarMonth as v } from "impact-nova-icons";
4
4
  import { cn as w } from "../../../lib/utils.js";
5
5
  import { Input as z } from "../input.js";
6
- import { Popover as R, PopoverTrigger as $, PopoverContent as E } from "../popover.js";
6
+ import { Popover as R, PopoverAnchor as $, PopoverContent as E } from "../popover.js";
7
7
  import { Calendar as L } from "../calendar.js";
8
- import { Tooltip as u, TooltipTrigger as g, TooltipContent as y } from "../tooltip.js";
8
+ import { Tooltip as u, TooltipTrigger as y, TooltipContent as g } from "../tooltip.js";
9
9
  import { useImpactNovaI18n as V } from "../../../i18n/ImpactNovaI18nContext.js";
10
- const q = a.forwardRef(
10
+ const q = i.forwardRef(
11
11
  ({
12
12
  value: e,
13
- onChange: s,
13
+ onChange: c,
14
14
  placeholder: C,
15
15
  minDate: d,
16
16
  maxDate: M,
17
17
  startMonth: P,
18
18
  endMonth: x,
19
- showFooter: c = !0,
19
+ showFooter: s = !0,
20
20
  disabled: p,
21
21
  className: N,
22
- ...T
23
- }, k) => {
24
- const { t: o } = V(), b = C ?? o("datePicker.selectMultipleMonths"), [h, r] = a.useState(!1), [m, l] = a.useState(e);
25
- a.useEffect(() => {
22
+ ...k
23
+ }, T) => {
24
+ const { t: o } = V(), b = C ?? o("datePicker.selectMultipleMonths"), [h, r] = i.useState(!1), [m, l] = i.useState(e);
25
+ i.useEffect(() => {
26
26
  l(e);
27
27
  }, [h, e]);
28
- const O = (n) => {
29
- l(n), c || s?.(n);
30
- }, A = (n) => {
31
- s?.(n !== void 0 ? n : m), r(!1);
28
+ const A = (n) => {
29
+ l(n), s || c?.(n);
30
+ }, O = (n) => {
31
+ c?.(n !== void 0 ? n : m), r(!1);
32
32
  }, S = () => {
33
33
  l(e), r(!1);
34
34
  }, f = () => {
35
- l(void 0), s?.(void 0), c || r(!1);
35
+ l(void 0), c?.(void 0), s || r(!1);
36
36
  }, I = e && e.length > 0 ? e.length === 1 ? `${e[0].month + 1}/${e[0].year}` : o("datePicker.monthsSelected", { count: e.length }) : "";
37
- return /* @__PURE__ */ i(R, { open: h, onOpenChange: (n) => {
37
+ return /* @__PURE__ */ a(R, { open: h, onOpenChange: (n) => {
38
38
  p || r(n);
39
39
  }, children: [
40
40
  /* @__PURE__ */ t($, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
41
41
  z,
42
42
  {
43
- ref: k,
43
+ ref: T,
44
44
  value: I,
45
45
  placeholder: b,
46
46
  readOnly: !0,
47
47
  disabled: p,
48
48
  className: w("cursor-pointer", N),
49
- suffix: /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
50
- e && e.length > 0 && !p && /* @__PURE__ */ i(u, { children: [
51
- /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(
49
+ suffix: /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
50
+ e && e.length > 0 && !p && /* @__PURE__ */ a(u, { children: [
51
+ /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(
52
52
  "button",
53
53
  {
54
54
  type: "button",
@@ -61,14 +61,14 @@ const q = a.forwardRef(
61
61
  children: /* @__PURE__ */ t(j, { className: "size-3 hover:text-content" })
62
62
  }
63
63
  ) }),
64
- /* @__PURE__ */ t(y, { variant: "tertiary", side: "top", children: o("calendar.clear") })
64
+ /* @__PURE__ */ t(g, { variant: "tertiary", side: "top", children: o("calendar.clear") })
65
65
  ] }),
66
- /* @__PURE__ */ i(u, { children: [
67
- /* @__PURE__ */ t(g, { asChild: !0, children: /* @__PURE__ */ t(v, { className: "h-4 w-4 text-secondary-foreground" }) }),
68
- /* @__PURE__ */ t(y, { variant: "tertiary", side: "top", children: o("datePicker.selectMultipleMonths") })
66
+ /* @__PURE__ */ a(u, { children: [
67
+ /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(v, { className: "h-4 w-4 text-secondary-foreground" }) }),
68
+ /* @__PURE__ */ t(g, { variant: "tertiary", side: "top", children: o("datePicker.selectMultipleMonths") })
69
69
  ] })
70
70
  ] }),
71
- ...T
71
+ ...k
72
72
  }
73
73
  ) }) }),
74
74
  /* @__PURE__ */ t(
@@ -83,13 +83,13 @@ const q = a.forwardRef(
83
83
  pickerType: "month",
84
84
  monthMode: "multiple",
85
85
  selectedMonths: m,
86
- onMonthSelect: O,
86
+ onMonthSelect: A,
87
87
  disabled: { before: d, after: M },
88
88
  startMonth: P,
89
89
  endMonth: x,
90
90
  defaultMonth: d,
91
- showFooter: c,
92
- onApply: A,
91
+ showFooter: s,
92
+ onApply: O,
93
93
  onCancel: S,
94
94
  onClear: f,
95
95
  captionLayout: "dropdown"
@@ -4,7 +4,7 @@ import { Cross as V, CalendarMonth as q } from "impact-nova-icons";
4
4
  import { format as g } from "date-fns";
5
5
  import { cn as B } from "../../../lib/utils.js";
6
6
  import { Input as F } from "../input.js";
7
- import { Popover as G, PopoverTrigger as H, PopoverContent as J } from "../popover.js";
7
+ import { Popover as G, PopoverAnchor as H, PopoverContent as J } from "../popover.js";
8
8
  import { Calendar as K } from "../calendar.js";
9
9
  import { Tooltip as C, TooltipTrigger as x, TooltipContent as M } from "../tooltip.js";
10
10
  import { getDateFnsLocale as Q } from "../../../i18n/getDateFnsLocale.js";
@@ -21,33 +21,33 @@ const X = (e, n = "MM/dd/yyyy", o) => {
21
21
  minDate: p,
22
22
  maxDate: P,
23
23
  startMonth: N,
24
- endMonth: T,
24
+ endMonth: W,
25
25
  showFooter: m = !0,
26
- calendarType: W = "calendar",
27
- fiscalMode: b = "basic",
26
+ calendarType: b = "calendar",
27
+ fiscalMode: T = "basic",
28
28
  selectionMode: w = "week",
29
- fiscalMonthPattern: O,
30
- fiscalYearStartMonth: S = 1,
31
- weekStartsOn: A = 1,
29
+ fiscalMonthPattern: A,
30
+ fiscalYearStartMonth: O = 1,
31
+ weekStartsOn: S = 1,
32
32
  disabled: f,
33
33
  className: v,
34
34
  ...D
35
35
  }, I) => {
36
- const { locale: h, t: s } = U(), L = a.useMemo(() => Q(h), [h]), j = d ?? s("datePicker.selectWeeks"), [y, i] = a.useState(!1), [u, c] = a.useState(e);
36
+ const { locale: h, t: s } = U(), L = a.useMemo(() => Q(h), [h]), j = d ?? s("datePicker.selectWeeks"), [y, c] = a.useState(!1), [u, i] = a.useState(e);
37
37
  a.useEffect(() => {
38
- c(e);
38
+ i(e);
39
39
  }, [y, e]);
40
40
  const $ = (r) => {
41
- c(r), m || n?.(r);
41
+ i(r), m || n?.(r);
42
42
  }, z = (r) => {
43
- n?.(r !== void 0 ? r : u), i(!1);
43
+ n?.(r !== void 0 ? r : u), c(!1);
44
44
  }, R = () => {
45
- c(e), i(!1);
45
+ i(e), c(!1);
46
46
  }, k = () => {
47
- c(void 0), n?.(void 0), m || i(!1);
47
+ i(void 0), n?.(void 0), m || c(!1);
48
48
  }, E = e && e.length > 0 ? e.length === 1 ? X(e[0], o, L) : `${e.length} weeks selected` : "";
49
49
  return /* @__PURE__ */ l(G, { open: y, onOpenChange: (r) => {
50
- f || i(r);
50
+ f || c(r);
51
51
  }, children: [
52
52
  /* @__PURE__ */ t(H, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
53
53
  F,
@@ -98,14 +98,14 @@ const X = (e, n = "MM/dd/yyyy", o) => {
98
98
  onWeekSelect: $,
99
99
  disabled: { before: p, after: P },
100
100
  startMonth: N,
101
- endMonth: T,
101
+ endMonth: W,
102
102
  showFooter: m,
103
- calendarType: W,
104
- fiscalMode: b,
103
+ calendarType: b,
104
+ fiscalMode: T,
105
105
  selectionMode: w,
106
- fiscalMonthPattern: O,
107
- fiscalYearStartMonth: S,
108
- weekStartsOn: A,
106
+ fiscalMonthPattern: A,
107
+ fiscalYearStartMonth: O,
108
+ weekStartsOn: S,
109
109
  onApply: z,
110
110
  onCancel: R,
111
111
  onClear: k,