impact-nova 2.0.7 → 2.0.9

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, jsx as o } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { Cross as te, CalendarMonth as re } from "impact-nova-icons";
4
- import { isValid as w, parse as I, format as B } from "date-fns";
4
+ import { isValid as w, parse as P, format as B } from "date-fns";
5
5
  import { cn as oe, padValidDateString as se, maskDate as ce } from "../../../lib/utils.js";
6
6
  import { Input as ie } from "../input.js";
7
7
  import { Popover as le, PopoverAnchor as ae, PopoverContent as pe } from "../popover.js";
@@ -24,17 +24,17 @@ const p = (e, c = "MM/dd/yyyy", n) => {
24
24
  startMonth: q,
25
25
  endMonth: G,
26
26
  showFooter: d = !0,
27
- calendarType: P = "calendar",
27
+ calendarType: I = "calendar",
28
28
  fiscalMode: S = "basic",
29
29
  selectionMode: N = "week",
30
- fiscalMonthPattern: V,
31
- fiscalYearStartMonth: b = 1,
30
+ fiscalMonthPattern: b,
31
+ fiscalYearStartMonth: V = 1,
32
32
  weekStartsOn: A = 1,
33
- disabled: k,
33
+ disabled: g,
34
34
  className: J,
35
35
  ...K
36
36
  }, Q) => {
37
- const { locale: M, t: g } = he(), r = s.useMemo(() => ue(M), [M]), U = C ?? g("datePicker.selectWeek"), T = s.useRef(null);
37
+ const { locale: M, t: m } = he(), r = s.useMemo(() => ue(M), [M]), U = C ?? m("datePicker.selectWeek"), T = s.useRef(null);
38
38
  s.useRef(null), s.useImperativeHandle(Q, () => T.current);
39
39
  const [i, f] = s.useState(!1), [L, l] = s.useState(e), [u, a] = s.useState(e ? p(e, n, r) : ""), [X, W] = s.useState(e?.startDate || /* @__PURE__ */ new Date());
40
40
  s.useEffect(() => {
@@ -51,34 +51,34 @@ const p = (e, c = "MM/dd/yyyy", n) => {
51
51
  }, R = () => {
52
52
  l(void 0), a(""), c?.(void 0), d || f(!1);
53
53
  }, j = (t) => fe(t, {
54
- calendarType: P,
54
+ calendarType: I,
55
55
  fiscalMode: S,
56
56
  selectionMode: N,
57
- fiscalMonthPattern: V,
58
- fiscalYearStartMonth: b,
57
+ fiscalMonthPattern: b,
58
+ fiscalYearStartMonth: V,
59
59
  weekStartsOn: A
60
60
  }), F = (t) => {
61
- const m = t.target.value, h = ce(m, n, u);
61
+ const k = t.target.value, h = ce(k, n, u);
62
62
  if (a(h), h === "") {
63
63
  l(void 0), d || c?.(void 0);
64
64
  return;
65
65
  }
66
- const x = I(h, n, /* @__PURE__ */ new Date(), { locale: r });
66
+ const x = P(h, n, /* @__PURE__ */ new Date(), { locale: r });
67
67
  if (w(x) && h.length === n.length) {
68
68
  const z = j(x);
69
69
  l(z), W(x), d || c?.(z);
70
70
  }
71
71
  }, ee = () => {
72
72
  if (i) return;
73
- const t = se(u, n), m = I(t, n, /* @__PURE__ */ new Date(), { locale: r });
74
- if (!w(m) || t.length !== n.length)
73
+ const t = se(u, n), k = P(t, n, /* @__PURE__ */ new Date(), { locale: r });
74
+ if (!w(k) || t.length !== n.length)
75
75
  a(e ? p(e, n, r) : ""), l(e);
76
76
  else if (a(t), !d) {
77
- const h = j(m);
77
+ const h = j(k);
78
78
  c?.(h);
79
79
  }
80
- }, v = (e ? p(e, n, r) : "") !== u, ne = u.length === n.length && !w(I(u, n, /* @__PURE__ */ new Date(), { locale: r }));
81
- return /* @__PURE__ */ y(le, { open: i, onOpenChange: (t) => !k && f(t), children: [
80
+ }, v = (e ? p(e, n, r) : "") !== u, ne = u.length === n.length && !w(P(u, n, /* @__PURE__ */ new Date(), { locale: r }));
81
+ return /* @__PURE__ */ y(le, { open: i, onOpenChange: (t) => !g && f(t), children: [
82
82
  /* @__PURE__ */ o(ae, { asChild: !0, children: /* @__PURE__ */ o("div", { "data-component": "week-picker", "data-state": i ? "open" : "closed", "data-pending": v || void 0, children: /* @__PURE__ */ o(
83
83
  ie,
84
84
  {
@@ -86,9 +86,9 @@ const p = (e, c = "MM/dd/yyyy", n) => {
86
86
  value: u,
87
87
  onChange: F,
88
88
  onBlur: ee,
89
- onClick: () => !k && f(!0),
89
+ onClick: () => !g && f(!0),
90
90
  placeholder: i ? n : U,
91
- disabled: k,
91
+ disabled: g,
92
92
  "data-form-control": "input",
93
93
  className: oe(
94
94
  "cursor-pointer",
@@ -96,13 +96,13 @@ const p = (e, c = "MM/dd/yyyy", n) => {
96
96
  J
97
97
  ),
98
98
  suffix: /* @__PURE__ */ y("div", { className: "flex items-center gap-1", children: [
99
- e && !k && /* @__PURE__ */ y(E, { children: [
99
+ e && !g && /* @__PURE__ */ y(E, { children: [
100
100
  /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(
101
101
  "button",
102
102
  {
103
103
  type: "button",
104
104
  tabIndex: 0,
105
- "aria-label": g("calendar.clear"),
105
+ "aria-label": m("calendar.clear"),
106
106
  onClick: (t) => {
107
107
  t.stopPropagation(), R();
108
108
  },
@@ -110,11 +110,11 @@ const p = (e, c = "MM/dd/yyyy", n) => {
110
110
  children: /* @__PURE__ */ o(te, { className: "size-3 hover:text-content" })
111
111
  }
112
112
  ) }),
113
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: g("calendar.clear") })
113
+ /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: m("calendar.clear") })
114
114
  ] }),
115
115
  /* @__PURE__ */ y(E, { children: [
116
116
  /* @__PURE__ */ o(O, { asChild: !0, children: /* @__PURE__ */ o(re, { className: "h-4 w-4 text-secondary-foreground" }) }),
117
- /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: g("datePicker.selectWeek") })
117
+ /* @__PURE__ */ o($, { variant: "tertiary", side: "top", children: m("datePicker.selectWeek") })
118
118
  ] })
119
119
  ] }),
120
120
  ...K
@@ -125,6 +125,7 @@ const p = (e, c = "MM/dd/yyyy", n) => {
125
125
  {
126
126
  className: "w-auto p-0",
127
127
  align: "start",
128
+ "aria-label": m("datePicker.selectWeek"),
128
129
  onOpenAutoFocus: (t) => t.preventDefault(),
129
130
  children: /* @__PURE__ */ o(
130
131
  de,
@@ -139,11 +140,11 @@ const p = (e, c = "MM/dd/yyyy", n) => {
139
140
  startMonth: q,
140
141
  endMonth: G,
141
142
  showFooter: d,
142
- calendarType: P,
143
+ calendarType: I,
143
144
  fiscalMode: S,
144
145
  selectionMode: N,
145
- fiscalMonthPattern: V,
146
- fiscalYearStartMonth: b,
146
+ fiscalMonthPattern: b,
147
+ fiscalYearStartMonth: V,
147
148
  weekStartsOn: A,
148
149
  onApply: _,
149
150
  onCancel: Y,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as f, jsx as l } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import { Cross as Ne, CalendarMonth as Re, Info as Z } from "impact-nova-icons";
4
- import { format as r, isValid as C, parse as I } from "date-fns";
4
+ import { format as r, isValid as I, parse as P } from "date-fns";
5
5
  import { cn as m, padValidDateString as $, maskDate as Y } from "../../../lib/utils.js";
6
6
  import { Popover as Se, PopoverAnchor as Ce, PopoverContent as Ie } from "../popover.js";
7
7
  import { Calendar as Pe } from "../calendar.js";
@@ -31,16 +31,16 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
31
31
  isError: D,
32
32
  size: H,
33
33
  label: q,
34
- helperText: P,
34
+ helperText: W,
35
35
  helperTextPosition: A = "absolute",
36
36
  required: ce,
37
37
  prefix: je,
38
38
  prefixClick: ze,
39
39
  ...ae
40
40
  }, ie) => {
41
- const { locale: G, t: W } = Ee(), o = c.useMemo(() => Ve(G), [G]), J = te ?? W("datePicker.selectWeekRange"), Q = c.useRef(null), de = c.useRef(null);
41
+ const { locale: G, t: R } = Ee(), o = c.useMemo(() => Ve(G), [G]), J = te ?? R("datePicker.selectWeekRange"), Q = c.useRef(null), de = c.useRef(null);
42
42
  c.useRef(null), c.useRef(null), c.useImperativeHandle(ie, () => Q.current);
43
- const [s, p] = c.useState(!1), V = c.useRef(!1), [v, u] = c.useState(t), [R, x] = c.useState(t?.from ? r(t.from.startDate, n, { locale: o }) : ""), [S, h] = c.useState(i(t) ? r(i(t), n, { locale: o }) : ""), [fe, j] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
43
+ const [s, p] = c.useState(!1), V = c.useRef(!1), [v, u] = c.useState(t), [S, x] = c.useState(t?.from ? r(t.from.startDate, n, { locale: o }) : ""), [C, h] = c.useState(i(t) ? r(i(t), n, { locale: o }) : ""), [fe, j] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
44
44
  c.useEffect(() => {
45
45
  s || (x(t?.from ? r(t.from.startDate, n, { locale: o }) : ""), h(i(t) ? r(i(t), n, { locale: o }) : ""), u(t));
46
46
  }, [t, n, s, o]), c.useEffect(() => {
@@ -62,39 +62,39 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
62
62
  fiscalYearStartMonth: O,
63
63
  weekStartsOn: T
64
64
  }), ue = (e) => {
65
- const w = e.target.value, d = Y(w, n, R);
65
+ const w = e.target.value, d = Y(w, n, S);
66
66
  if (x(d), d === "") {
67
67
  const k = { from: void 0, to: v?.to };
68
68
  u(k), y || b?.(k);
69
69
  return;
70
70
  }
71
- const g = I(d, n, /* @__PURE__ */ new Date(), { locale: o });
72
- if (C(g) && d.length === n.length) {
71
+ const g = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
72
+ if (I(g) && d.length === n.length) {
73
73
  const N = { from: E(g), to: v?.to };
74
74
  u(N), h(r(i(N), n, { locale: o })), y || b?.(N);
75
75
  }
76
76
  }, xe = (e) => {
77
- const w = e.target.value, d = Y(w, n, S);
77
+ const w = e.target.value, d = Y(w, n, C);
78
78
  if (h(d), d === "") {
79
79
  const k = { from: v?.from, to: void 0 };
80
80
  u(k), y || b?.(k);
81
81
  return;
82
82
  }
83
- const g = I(d, n, /* @__PURE__ */ new Date(), { locale: o });
84
- if (C(g) && d.length === n.length) {
83
+ const g = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
84
+ if (I(g) && d.length === n.length) {
85
85
  const k = E(g), N = { from: v?.from, to: k };
86
86
  u(N), v?.from && x(r(v.from.startDate, n, { locale: o })), g && j(g), y || b?.(N);
87
87
  }
88
88
  }, X = () => {
89
89
  if (s) return;
90
- const e = $(R, n), w = $(S, n), d = I(e, n, /* @__PURE__ */ new Date(), { locale: o }), g = I(w, n, /* @__PURE__ */ new Date(), { locale: o }), k = C(d) && e.length === n.length, N = C(g) && w.length === n.length;
90
+ const e = $(S, n), w = $(C, n), d = P(e, n, /* @__PURE__ */ new Date(), { locale: o }), g = P(w, n, /* @__PURE__ */ new Date(), { locale: o }), k = I(d) && e.length === n.length, N = I(g) && w.length === n.length;
91
91
  if (!k || !N)
92
92
  x(t?.from ? r(t.from.startDate, n, { locale: o }) : ""), h(i(t) ? r(i(t), n, { locale: o }) : ""), u(t);
93
93
  else if (x(e), h(w), !y) {
94
94
  const De = E(d), ve = E(g);
95
95
  b?.({ from: De, to: ve });
96
96
  }
97
- }, he = t?.from ? r(t.from.startDate, n, { locale: o }) : "", ge = i(t) ? r(i(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S, be = R.length === n.length && !C(I(R, n, /* @__PURE__ */ new Date(), { locale: o })), ye = S.length === n.length && !C(I(S, n, /* @__PURE__ */ new Date(), { locale: o }));
97
+ }, he = t?.from ? r(t.from.startDate, n, { locale: o }) : "", ge = i(t) ? r(i(t), n, { locale: o }) : "", ke = he !== S, we = ge !== C, be = S.length === n.length && !I(P(S, n, /* @__PURE__ */ new Date(), { locale: o })), ye = C.length === n.length && !I(P(C, n, /* @__PURE__ */ new Date(), { locale: o }));
98
98
  return /* @__PURE__ */ f("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "week-range-picker", "data-disabled": a || void 0, children: [
99
99
  /* @__PURE__ */ f("div", { className: "flex flex-col gap-[6px]", children: [
100
100
  q && /* @__PURE__ */ f(
@@ -117,7 +117,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
117
117
  {
118
118
  className: m(
119
119
  "w-full",
120
- P && A === "absolute" && "relative"
120
+ W && A === "absolute" && "relative"
121
121
  ),
122
122
  children: [
123
123
  /* @__PURE__ */ f(Se, { open: a ? !1 : s, onOpenChange: (e) => {
@@ -142,7 +142,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
142
142
  {
143
143
  ref: Q,
144
144
  type: "text",
145
- value: R,
145
+ value: S,
146
146
  onChange: ue,
147
147
  onBlur: X,
148
148
  onClick: () => !a && p(!0),
@@ -165,7 +165,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
165
165
  {
166
166
  ref: de,
167
167
  type: "text",
168
- value: S,
168
+ value: C,
169
169
  onChange: xe,
170
170
  onBlur: X,
171
171
  onClick: () => !a && p(!0),
@@ -190,7 +190,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
190
190
  {
191
191
  type: "button",
192
192
  tabIndex: 0,
193
- "aria-label": W("calendar.clear"),
193
+ "aria-label": R("calendar.clear"),
194
194
  onClick: (e) => {
195
195
  e.stopPropagation(), U();
196
196
  },
@@ -198,15 +198,15 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
198
198
  children: /* @__PURE__ */ l(Ne, { className: "size-3 hover:text-content text-content-muted" })
199
199
  }
200
200
  ) }),
201
- /* @__PURE__ */ l(ee, { variant: "tertiary", side: "top", children: W("calendar.clear") })
201
+ /* @__PURE__ */ l(ee, { variant: "tertiary", side: "top", children: R("calendar.clear") })
202
202
  ] }),
203
203
  /* @__PURE__ */ f(_, { children: [
204
- /* @__PURE__ */ l(F, { asChild: !0, children: /* @__PURE__ */ l("button", { type: "button", tabIndex: 0, "aria-label": W("datePicker.selectWeekRange"), onClick: (e) => {
204
+ /* @__PURE__ */ l(F, { asChild: !0, children: /* @__PURE__ */ l("button", { type: "button", tabIndex: 0, "aria-label": R("datePicker.selectWeekRange"), onClick: (e) => {
205
205
  e.stopPropagation(), a || p(!s);
206
206
  }, onKeyDown: (e) => {
207
207
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a || (V.current = !0, p(!s)));
208
208
  }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ l(Re, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
209
- /* @__PURE__ */ l(ee, { variant: "tertiary", side: "top", children: W("datePicker.selectWeekRange") })
209
+ /* @__PURE__ */ l(ee, { variant: "tertiary", side: "top", children: R("datePicker.selectWeekRange") })
210
210
  ] })
211
211
  ] })
212
212
  ]
@@ -217,6 +217,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
217
217
  {
218
218
  className: "w-auto p-0",
219
219
  align: "start",
220
+ "aria-label": R("datePicker.selectWeekRange"),
220
221
  onOpenAutoFocus: (e) => {
221
222
  V.current || e.preventDefault(), V.current = !1;
222
223
  },
@@ -248,7 +249,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
248
249
  }
249
250
  )
250
251
  ] }),
251
- P && A === "absolute" && /* @__PURE__ */ f("div", { className: m("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", D && "text-destructive"), children: [
252
+ W && A === "absolute" && /* @__PURE__ */ f("div", { className: m("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", D && "text-destructive"), children: [
252
253
  /* @__PURE__ */ l(
253
254
  Z,
254
255
  {
@@ -266,7 +267,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
266
267
  "min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
267
268
  D && "text-destructive"
268
269
  ),
269
- children: P
270
+ children: W
270
271
  }
271
272
  )
272
273
  ] })
@@ -274,7 +275,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
274
275
  }
275
276
  )
276
277
  ] }),
277
- P && A === "flow" && /* @__PURE__ */ f("div", { className: m("flex items-center gap-[6px]", D && "text-destructive"), children: [
278
+ W && A === "flow" && /* @__PURE__ */ f("div", { className: m("flex items-center gap-[6px]", D && "text-destructive"), children: [
278
279
  /* @__PURE__ */ l(
279
280
  Z,
280
281
  {
@@ -292,7 +293,7 @@ const i = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
292
293
  "text-[12px] font-medium leading-[18px] text-navigation-muted",
293
294
  D && "text-destructive"
294
295
  ),
295
- children: P
296
+ children: W
296
297
  }
297
298
  )
298
299
  ] })
@@ -1,5 +1,5 @@
1
1
  import { jsxs as g, jsx as a, Fragment as vt } from "react/jsx-runtime";
2
- import yt, { useState as W, useRef as M, useEffect as C } from "react";
2
+ import yt, { useState as W, useRef as M, useEffect as A } from "react";
3
3
  import * as re from "@radix-ui/react-popover";
4
4
  import { useVirtualizer as wt } from "@tanstack/react-virtual";
5
5
  import St from "./components/LabelWithSequence.js";
@@ -70,10 +70,10 @@ const zt = (Ne) => {
70
70
  onClearAll: Ee,
71
71
  onFocus: ot,
72
72
  onBlur: ct
73
- } = Ne, { t: Y } = Mt(), me = je ?? Y("select.placeholder"), [d, Me] = W(Ue), [q, Z] = W(""), [ze, Le] = W(void 0), pe = M(0), [f, v] = W(_e || (p ? [] : null)), [ut, he] = W(null), J = -2, [O, A] = W(-1), xe = M(!1), ge = M(null), be = M(null), dt = M(null), ee = M(null), j = M(null);
74
- C(() => {
73
+ } = Ne, { t: Y } = Mt(), me = je ?? Y("select.placeholder"), [d, Me] = W(Ue), [q, Z] = W(""), [ze, Le] = W(void 0), pe = M(0), [f, v] = W(_e || (p ? [] : null)), [ut, he] = W(null), J = -2, [O, I] = W(-1), xe = M(!1), ge = M(null), be = M(null), dt = M(null), ee = M(null), j = M(null);
74
+ A(() => {
75
75
  oe !== void 0 && v(oe);
76
- }, [oe]), C(() => {
76
+ }, [oe]), A(() => {
77
77
  if (!(d && $ && G === "menu")) return;
78
78
  let e = !1;
79
79
  const t = () => {
@@ -85,7 +85,7 @@ const zt = (Ne) => {
85
85
  e = !0, clearTimeout(n);
86
86
  };
87
87
  }, [d, $, G]);
88
- const { flatOptions: m, isProcessing: I, totalOptionsCount: $e, workerSelectAll: ft } = It(L, q, {
88
+ const { flatOptions: m, isProcessing: C, totalOptionsCount: $e, workerSelectAll: ft } = It(L, q, {
89
89
  ignoreCase: tt,
90
90
  ignoreAccents: nt,
91
91
  matchFrom: lt,
@@ -107,21 +107,18 @@ const zt = (Ne) => {
107
107
  estimateSize: () => 34,
108
108
  overscan: 5
109
109
  });
110
- C(() => {
110
+ A(() => {
111
111
  if (!d)
112
- A(-1);
112
+ I(-1);
113
113
  else if (xe.current)
114
114
  if (xe.current = !1, $ && G === "menu" && !h)
115
- A(-1);
115
+ I(-1);
116
116
  else {
117
- const e = !T && !I && !_ && p && Q && !h && m.length > 0;
118
- A(e ? J : 0);
117
+ const e = !T && !C && !_ && p && Q && !h && m.length > 0;
118
+ I(e ? J : 0);
119
119
  }
120
- }, [d]), C(() => {
121
- if (!d) {
122
- pe.current = 0, Le(void 0);
123
- return;
124
- }
120
+ }, [d]), A(() => {
121
+ if (pe.current = 0, Le(void 0), !d) return;
125
122
  let e = null, t = null;
126
123
  const n = () => {
127
124
  const l = be.current;
@@ -139,16 +136,16 @@ const zt = (Ne) => {
139
136
  return () => {
140
137
  cancelAnimationFrame(s), t && clearTimeout(t), e?.disconnect();
141
138
  };
142
- }, [d]), C(() => {
143
- O !== -1 && A(0);
144
- }, [q]), C(() => {
139
+ }, [d, T, C]), A(() => {
140
+ O !== -1 && I(0);
141
+ }, [q]), A(() => {
145
142
  if (!d) return;
146
143
  const e = requestAnimationFrame(() => {
147
144
  k.measure();
148
145
  });
149
146
  return () => cancelAnimationFrame(e);
150
- }, [d, k]), C(() => {
151
- if (d && ke && !I && m.length > 0) {
147
+ }, [d, k]), A(() => {
148
+ if (d && ke && !C && m.length > 0) {
152
149
  const e = m.findIndex((t) => p ? V.mode === "exclude" ? !V.set.has(t.value) : V.set.has(t.value) : f?.value === t.value);
153
150
  if (e !== -1) {
154
151
  const t = setTimeout(() => {
@@ -157,15 +154,15 @@ const zt = (Ne) => {
157
154
  return () => clearTimeout(t);
158
155
  }
159
156
  }
160
- }, [d, ke, I, m.length, p, V.mode, V.set, f, k]);
157
+ }, [d, ke, C, m.length, p, V.mode, V.set, f, k]);
161
158
  const K = M(null), Fe = k.getVirtualItems(), ye = Fe[Fe.length - 1], te = yt.useCallback(() => {
162
- T || I || K.current || F && (F(), K.current = setTimeout(() => {
159
+ T || C || K.current || F && (F(), K.current = setTimeout(() => {
163
160
  K.current = null;
164
161
  }, 500));
165
- }, [T, I, F]);
166
- C(() => () => {
162
+ }, [T, C, F]);
163
+ A(() => () => {
167
164
  K.current && (clearTimeout(K.current), K.current = null);
168
- }, []), C(() => {
165
+ }, []), A(() => {
169
166
  if (!d || !ee.current || !F) return;
170
167
  const e = () => {
171
168
  const { scrollTop: n, scrollHeight: s, clientHeight: l } = t;
@@ -178,7 +175,7 @@ const zt = (Ne) => {
178
175
  F,
179
176
  d,
180
177
  te
181
- ]), C(() => {
178
+ ]), A(() => {
182
179
  if (!d || !F || !ye) return;
183
180
  const e = m.length - 1;
184
181
  e < 0 || ye.index < e - 1 || te();
@@ -198,7 +195,7 @@ const zt = (Ne) => {
198
195
  Ae?.(t, n), Z(""), he(null);
199
196
  }
200
197
  };
201
- C(() => {
198
+ A(() => {
202
199
  if (!d) return;
203
200
  const e = (t) => {
204
201
  const n = t.target;
@@ -458,7 +455,7 @@ const zt = (Ne) => {
458
455
  f
459
456
  ), le = (e) => Oe ? Oe(e) : e.label, Ge = () => {
460
457
  const e = [];
461
- return !T && !I && !_ && p && Q && !h && m.length > 0 && e.push(J), m.forEach((n, s) => {
458
+ return !T && !C && !_ && p && Q && !h && m.length > 0 && e.push(J), m.forEach((n, s) => {
462
459
  !n.isGroup && !(w && n.isSubmenuParent) && !n.isDisabled && e.push(s);
463
460
  }), e;
464
461
  }, ht = (e) => {
@@ -481,11 +478,11 @@ const zt = (Ne) => {
481
478
  if (e.key === "ArrowDown") {
482
479
  e.preventDefault();
483
480
  const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
484
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
481
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
485
482
  } else if (e.key === "ArrowUp") {
486
483
  e.preventDefault();
487
484
  const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
488
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
485
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
489
486
  } else if (e.key === "Enter" || e.key === " ") {
490
487
  if (e.preventDefault(), O === J)
491
488
  we();
@@ -496,10 +493,10 @@ const zt = (Ne) => {
496
493
  } else if (e.key === "Escape")
497
494
  e.preventDefault(), E(!1), ge.current?.focus();
498
495
  else if (e.key === "Home")
499
- e.preventDefault(), t.length > 0 && (A(t[0]), t[0] >= 0 && k.scrollToIndex(t[0], { align: "auto" }));
496
+ e.preventDefault(), t.length > 0 && (I(t[0]), t[0] >= 0 && k.scrollToIndex(t[0], { align: "auto" }));
500
497
  else if (e.key === "End" && (e.preventDefault(), t.length > 0)) {
501
498
  const s = t[t.length - 1];
502
- A(s), s >= 0 && k.scrollToIndex(s, { align: "auto" });
499
+ I(s), s >= 0 && k.scrollToIndex(s, { align: "auto" });
503
500
  }
504
501
  }, xt = (e) => {
505
502
  const t = Ge();
@@ -508,11 +505,11 @@ const zt = (Ne) => {
508
505
  if (e.key === "ArrowDown") {
509
506
  e.preventDefault();
510
507
  const s = n < t.length - 1 ? n + 1 : 0, l = t[s];
511
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
508
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
512
509
  } else if (e.key === "ArrowUp") {
513
510
  e.preventDefault();
514
511
  const s = n > 0 ? n - 1 : t.length - 1, l = t[s];
515
- A(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
512
+ I(l), l >= 0 && k.scrollToIndex(l, { align: "auto" });
516
513
  } else if (e.key === "Enter") {
517
514
  if (e.preventDefault(), O === J)
518
515
  we();
@@ -631,7 +628,7 @@ const zt = (Ne) => {
631
628
  ]
632
629
  }
633
630
  ),
634
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !d && (T || I) ? /* @__PURE__ */ a(Nt, { size: "14px" }) : /* @__PURE__ */ g(vt, { children: [
631
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-gray-400 shrink-0", children: !d && (T || C) ? /* @__PURE__ */ a(Nt, { size: "14px" }) : /* @__PURE__ */ g(vt, { children: [
635
632
  qe && !h && !S && (p && (z(
636
633
  f
637
634
  ) && f.isAllSelected || N(f) && f.length > 0) || !p && f) && /* @__PURE__ */ a(
@@ -742,7 +739,7 @@ const zt = (Ne) => {
742
739
  ] })
743
740
  }
744
741
  ),
745
- !T && !I && !_ && p && Q && !h && m.length > 0 && /* @__PURE__ */ a(
742
+ !T && !C && !_ && p && Q && !h && m.length > 0 && /* @__PURE__ */ a(
746
743
  "div",
747
744
  {
748
745
  className: "pb-1",
@@ -823,7 +820,7 @@ const zt = (Ne) => {
823
820
  children: "Refetch"
824
821
  }
825
822
  )
826
- ] }) : m.length === 0 && !T && !I ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : T || I ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ g(
823
+ ] }) : m.length === 0 && !T && !C ? /* @__PURE__ */ a("div", { className: "flex items-center justify-center py-8 text-sm text-gray-500", children: "No options found" }) : T || C ? /* @__PURE__ */ a("div", { className: "px-1 py-1 space-y-1", children: Array.from({ length: 6 }).map((e, t) => /* @__PURE__ */ g(
827
824
  "div",
828
825
  {
829
826
  className: "flex items-center gap-2 px-3 py-2 animate-pulse",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",