impact-nova 1.8.1 → 1.8.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 (29) hide show
  1. package/dist/components/ui/ag-grid-react/cell-renderers/default-text-cell-renderer.d.ts +6 -0
  2. package/dist/components/ui/ag-grid-react/cell-renderers/default-text-cell-renderer.js +9 -0
  3. package/dist/components/ui/ag-grid-react/headers/custom-header-group.d.ts +5 -6
  4. package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +19 -19
  5. package/dist/components/ui/ag-grid-react/index.d.ts +1 -1
  6. package/dist/components/ui/ag-grid-react/index.js +164 -165
  7. package/dist/components/ui/button-group.d.ts +10 -6
  8. package/dist/components/ui/button-group.js +1 -2
  9. package/dist/components/ui/calendar.js +2 -3
  10. package/dist/components/ui/combobox.d.ts +1 -0
  11. package/dist/components/ui/combobox.js +116 -102
  12. package/dist/components/ui/date-picker/date-picker.js +52 -50
  13. package/dist/components/ui/date-picker/date-range-picker.js +92 -90
  14. package/dist/components/ui/date-picker/month-picker.js +57 -55
  15. package/dist/components/ui/date-picker/month-range-picker.js +84 -82
  16. package/dist/components/ui/date-picker/multi-date-picker.js +45 -43
  17. package/dist/components/ui/date-picker/week-range-picker.js +77 -75
  18. package/dist/components/ui/expandable-sku/expandable-sku.js +10 -10
  19. package/dist/components/ui/filter-strip/filter-tag-list.d.ts +8 -1
  20. package/dist/components/ui/filter-strip/filter-tag-list.js +99 -85
  21. package/dist/components/ui/input.js +12 -13
  22. package/dist/components/ui/smart-input.d.ts +2 -2
  23. package/dist/components/ui/smart-input.js +52 -51
  24. package/dist/components/ui/textarea.d.ts +10 -8
  25. package/dist/components/ui/textarea.js +52 -52
  26. package/dist/components/ui/types/ag-grid.types.d.ts +5 -0
  27. package/dist/components/ui/types/button-group.types.d.ts +1 -1
  28. package/dist/index.js +425 -426
  29. package/package.json +1 -1
@@ -1,82 +1,84 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import { X as j } from "lucide-react";
4
4
  import { CalendarMonth as R } from "../../../icons/index.js";
5
- import { format as b } from "date-fns";
6
- import { cn as E } from "../../../lib/utils.js";
7
- import { Input as F } from "../input.js";
8
- import { Popover as V, PopoverTrigger as X, PopoverContent as $ } from "../popover.js";
9
- import { Calendar as q } from "../calendar.js";
5
+ import { format as E } from "date-fns";
6
+ import { cn as F } from "../../../lib/utils.js";
7
+ import { Input as V } from "../input.js";
8
+ import { Popover as X, PopoverTrigger as $, PopoverContent as q } from "../popover.js";
9
+ import { Calendar as z } from "../calendar.js";
10
10
  import { Tooltip as u, TooltipTrigger as y, TooltipContent as g } from "../tooltip.js";
11
- import { getDateFnsLocale as z } from "../../../i18n/getDateFnsLocale.js";
12
- import { useImpactNovaI18n as B } from "../../../i18n/ImpactNovaI18nContext.js";
13
- const G = r.forwardRef(
11
+ import { getDateFnsLocale as B } from "../../../i18n/getDateFnsLocale.js";
12
+ import { useImpactNovaI18n as G } from "../../../i18n/ImpactNovaI18nContext.js";
13
+ const H = r.forwardRef(
14
14
  ({
15
15
  value: e,
16
- onChange: i,
16
+ onChange: c,
17
17
  format: C = "MM/dd/yyyy",
18
18
  placeholder: P,
19
19
  minDate: M,
20
20
  maxDate: x,
21
21
  startMonth: D,
22
22
  endMonth: N,
23
- showFooter: c = !0,
24
- disabled: p,
23
+ showFooter: s = !0,
24
+ disabled: n,
25
25
  className: T,
26
26
  ...k
27
27
  }, A) => {
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);
28
+ const { locale: d, t: p } = G(), v = r.useMemo(() => B(d), [d]), L = P ?? p("datePicker.selectMultipleDates"), [m, a] = r.useState(!1), [f, l] = r.useState(e);
29
29
  r.useEffect(() => {
30
- a(e);
30
+ l(e);
31
31
  }, [m, e]);
32
- const O = (o) => {
33
- a(o), c || i?.(o);
34
- }, S = (o) => {
35
- i?.(o !== void 0 ? o : f), n(!1);
32
+ const O = (t) => {
33
+ l(t), s || c?.(t);
34
+ }, S = (t) => {
35
+ c?.(t !== void 0 ? t : f), a(!1);
36
36
  }, w = () => {
37
- a(e), n(!1);
37
+ l(e), a(!1);
38
38
  }, h = () => {
39
- a(void 0), i?.(void 0), c || n(!1);
40
- }, I = e && e.length > 0 ? e.length === 1 ? b(e[0], C, { locale: v }) : `${e.length} dates selected` : "";
41
- return /* @__PURE__ */ l(V, { open: m, onOpenChange: n, children: [
42
- /* @__PURE__ */ t(X, { asChild: !0, children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
43
- F,
39
+ l(void 0), c?.(void 0), s || a(!1);
40
+ }, I = e && e.length > 0 ? e.length === 1 ? E(e[0], C, { locale: v }) : `${e.length} dates selected` : "";
41
+ return /* @__PURE__ */ i(X, { open: n ? !1 : m, onOpenChange: (t) => {
42
+ n || a(t);
43
+ }, children: [
44
+ /* @__PURE__ */ o($, { asChild: !0, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
45
+ V,
44
46
  {
45
47
  ref: A,
46
48
  value: I,
47
49
  placeholder: L,
48
50
  readOnly: !0,
49
- disabled: p,
50
- className: E("cursor-pointer", T),
51
- suffix: /* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
52
- e && e.length > 0 && !p && /* @__PURE__ */ l(u, { children: [
53
- /* @__PURE__ */ t(y, { asChild: !0, children: /* @__PURE__ */ t(
51
+ disabled: n,
52
+ className: F("cursor-pointer", T),
53
+ suffix: /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
54
+ e && e.length > 0 && !n && /* @__PURE__ */ i(u, { children: [
55
+ /* @__PURE__ */ o(y, { asChild: !0, children: /* @__PURE__ */ o(
54
56
  j,
55
57
  {
56
58
  className: "h-4 w-4 cursor-pointer hover:text-content",
57
- onClick: (o) => {
58
- o.stopPropagation(), h();
59
+ onClick: (t) => {
60
+ t.stopPropagation(), h();
59
61
  }
60
62
  }
61
63
  ) }),
62
- /* @__PURE__ */ t(g, { variant: "tertiary", side: "top", children: s("calendar.clear") })
64
+ /* @__PURE__ */ o(g, { variant: "tertiary", side: "top", children: p("calendar.clear") })
63
65
  ] }),
64
- /* @__PURE__ */ l(u, { children: [
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") })
66
+ /* @__PURE__ */ i(u, { children: [
67
+ /* @__PURE__ */ o(y, { asChild: !0, children: /* @__PURE__ */ o(R, { className: "h-4 w-4 text-secondary-foreground" }) }),
68
+ /* @__PURE__ */ o(g, { variant: "tertiary", side: "top", children: p("datePicker.selectMultipleDates") })
67
69
  ] })
68
70
  ] }),
69
71
  ...k
70
72
  }
71
73
  ) }) }),
72
- /* @__PURE__ */ t(
73
- $,
74
+ /* @__PURE__ */ o(
75
+ q,
74
76
  {
75
77
  className: "w-auto p-0",
76
78
  align: "start",
77
- onOpenAutoFocus: (o) => o.preventDefault(),
78
- children: /* @__PURE__ */ t(
79
- q,
79
+ onOpenAutoFocus: (t) => t.preventDefault(),
80
+ children: /* @__PURE__ */ o(
81
+ z,
80
82
  {
81
83
  mode: "multiple",
82
84
  selected: f,
@@ -84,7 +86,7 @@ const G = r.forwardRef(
84
86
  disabled: { before: M, after: x },
85
87
  startMonth: D,
86
88
  endMonth: N,
87
- showFooter: c,
89
+ showFooter: s,
88
90
  onApply: S,
89
91
  onCancel: w,
90
92
  onClear: h,
@@ -96,7 +98,7 @@ const G = r.forwardRef(
96
98
  ] });
97
99
  }
98
100
  );
99
- G.displayName = "MultiDatePicker";
101
+ H.displayName = "MultiDatePicker";
100
102
  export {
101
- G as MultiDatePicker
103
+ H as MultiDatePicker
102
104
  };
@@ -1,9 +1,9 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
3
  import { X as Ne } from "lucide-react";
4
4
  import { CalendarMonth as Re, Info as Z } from "../../../icons/index.js";
5
5
  import { format as s, isValid as C, parse as P } from "date-fns";
6
- import { cn as f, padValidDateString as $, maskDate as Y } from "../../../lib/utils.js";
6
+ import { cn as p, padValidDateString as $, maskDate as Y } from "../../../lib/utils.js";
7
7
  import { Popover as Se, PopoverTrigger as Ce, PopoverContent as Pe } from "../popover.js";
8
8
  import { Calendar as Ie } from "../calendar.js";
9
9
  import { Tooltip as _, TooltipTrigger as F, TooltipContent as ee } from "../tooltip.js";
@@ -13,23 +13,23 @@ import { useImpactNovaI18n as Ee } from "../../../i18n/ImpactNovaI18nContext.js"
13
13
  const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c.forwardRef(
14
14
  ({
15
15
  value: t,
16
- onChange: w,
16
+ onChange: D,
17
17
  format: n = "MM/dd/yyyy",
18
18
  placeholder: te,
19
19
  minDate: ne,
20
20
  maxDate: oe,
21
21
  startMonth: le,
22
22
  endMonth: re,
23
- showFooter: b = !0,
23
+ showFooter: y = !0,
24
24
  calendarType: K = "calendar",
25
25
  fiscalMode: M = "basic",
26
26
  selectionMode: z = "week",
27
27
  fiscalMonthPattern: B,
28
28
  fiscalYearStartMonth: T = 1,
29
29
  weekStartsOn: O = 1,
30
- disabled: N,
30
+ disabled: i,
31
31
  className: se,
32
- isError: D,
32
+ isError: b,
33
33
  size: H,
34
34
  label: X,
35
35
  helperText: I,
@@ -41,20 +41,20 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
41
41
  }, ie) => {
42
42
  const { locale: q, t: V } = Ee(), o = c.useMemo(() => Ve(q), [q]), G = te ?? V("datePicker.selectWeekRange"), J = c.useRef(null), de = c.useRef(null);
43
43
  c.useRef(null), c.useRef(null), c.useImperativeHandle(ie, () => J.current);
44
- const [l, g] = c.useState(!1), W = c.useRef(!1), [y, p] = c.useState(t), [R, m] = c.useState(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), [S, u] = c.useState(a(t) ? s(a(t), n, { locale: o }) : ""), [fe, L] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
44
+ const [l, k] = c.useState(!1), W = c.useRef(!1), [v, m] = c.useState(t), [R, u] = c.useState(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), [S, x] = c.useState(a(t) ? s(a(t), n, { locale: o }) : ""), [fe, L] = c.useState(t?.from?.startDate || /* @__PURE__ */ new Date());
45
45
  c.useEffect(() => {
46
- l || (m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), p(t));
46
+ l || (u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), m(t));
47
47
  }, [t, n, l, o]), c.useEffect(() => {
48
- l && (p(t), m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), L(t?.from?.startDate || /* @__PURE__ */ new Date()));
48
+ l && (m(t), u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), L(t?.from?.startDate || /* @__PURE__ */ new Date()));
49
49
  }, [l, t, n, o]);
50
50
  const pe = (e) => {
51
- p(e), e?.from ? (m(s(e.from.startDate, n, { locale: o })), u(s(a(e), n, { locale: o }))) : (m(""), u("")), !b && e?.from && e?.to && e.from.startDate.getTime() !== e.to.startDate.getTime() && (w?.(e), g(!1));
51
+ m(e), e?.from ? (u(s(e.from.startDate, n, { locale: o })), x(s(a(e), n, { locale: o }))) : (u(""), x("")), !y && e?.from && e?.to && e.from.startDate.getTime() !== e.to.startDate.getTime() && (D?.(e), k(!1));
52
52
  }, me = (e) => {
53
- w?.(e !== void 0 ? e : y), g(!1);
53
+ D?.(e !== void 0 ? e : v), k(!1);
54
54
  }, j = () => {
55
- p(t), m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), g(!1);
55
+ m(t), u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), k(!1);
56
56
  }, Q = () => {
57
- p(void 0), m(""), u(""), w?.(void 0), b || g(!1);
57
+ m(void 0), u(""), x(""), D?.(void 0), y || k(!1);
58
58
  }, E = (e) => We(e, {
59
59
  calendarType: K,
60
60
  fiscalMode: M,
@@ -63,48 +63,48 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
63
63
  fiscalYearStartMonth: T,
64
64
  weekStartsOn: O
65
65
  }), ue = (e) => {
66
- const k = e.target.value, i = Y(k, n, R);
67
- if (m(i), i === "") {
68
- const h = { from: void 0, to: y?.to };
69
- p(h), b || w?.(h);
66
+ const w = e.target.value, d = Y(w, n, R);
67
+ if (u(d), d === "") {
68
+ const g = { from: void 0, to: v?.to };
69
+ m(g), y || D?.(g);
70
70
  return;
71
71
  }
72
- const x = P(i, n, /* @__PURE__ */ new Date(), { locale: o });
73
- if (C(x) && i.length === n.length) {
74
- const v = { from: E(x), to: y?.to };
75
- p(v), u(s(a(v), n, { locale: o })), b || w?.(v);
72
+ const h = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
73
+ if (C(h) && d.length === n.length) {
74
+ const N = { from: E(h), to: v?.to };
75
+ m(N), x(s(a(N), n, { locale: o })), y || D?.(N);
76
76
  }
77
77
  }, xe = (e) => {
78
- const k = e.target.value, i = Y(k, n, S);
79
- if (u(i), i === "") {
80
- const h = { from: y?.from, to: void 0 };
81
- p(h), b || w?.(h);
78
+ const w = e.target.value, d = Y(w, n, S);
79
+ if (x(d), d === "") {
80
+ const g = { from: v?.from, to: void 0 };
81
+ m(g), y || D?.(g);
82
82
  return;
83
83
  }
84
- const x = P(i, n, /* @__PURE__ */ new Date(), { locale: o });
85
- if (C(x) && i.length === n.length) {
86
- const h = E(x), v = { from: y?.from, to: h };
87
- p(v), y?.from && m(s(y.from.startDate, n, { locale: o })), x && L(x), b || w?.(v);
84
+ const h = P(d, n, /* @__PURE__ */ new Date(), { locale: o });
85
+ if (C(h) && d.length === n.length) {
86
+ const g = E(h), N = { from: v?.from, to: g };
87
+ m(N), v?.from && u(s(v.from.startDate, n, { locale: o })), h && L(h), y || D?.(N);
88
88
  }
89
89
  }, U = () => {
90
90
  if (l) return;
91
- const e = $(R, n), k = $(S, n), i = P(e, n, /* @__PURE__ */ new Date(), { locale: o }), x = P(k, n, /* @__PURE__ */ new Date(), { locale: o }), h = C(i) && e.length === n.length, v = C(x) && k.length === n.length;
92
- if (!h || !v)
93
- m(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), u(a(t) ? s(a(t), n, { locale: o }) : ""), p(t);
94
- else if (m(e), u(k), !b) {
95
- const ye = E(i), ve = E(x);
96
- w?.({ from: ye, to: ve });
91
+ const e = $(R, n), w = $(S, n), d = P(e, n, /* @__PURE__ */ new Date(), { locale: o }), h = P(w, n, /* @__PURE__ */ new Date(), { locale: o }), g = C(d) && e.length === n.length, N = C(h) && w.length === n.length;
92
+ if (!g || !N)
93
+ u(t?.from ? s(t.from.startDate, n, { locale: o }) : ""), x(a(t) ? s(a(t), n, { locale: o }) : ""), m(t);
94
+ else if (u(e), x(w), !y) {
95
+ const be = E(d), ve = E(h);
96
+ D?.({ from: be, to: ve });
97
97
  }
98
- }, he = t?.from ? s(t.from.startDate, n, { locale: o }) : "", ge = a(t) ? s(a(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S, be = R.length === n.length && !C(P(R, n, /* @__PURE__ */ new Date(), { locale: o })), De = S.length === n.length && !C(P(S, n, /* @__PURE__ */ new Date(), { locale: o }));
99
- return /* @__PURE__ */ d("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "week-range-picker", "data-disabled": N || void 0, children: [
100
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-[6px]", children: [
101
- X && /* @__PURE__ */ d(
98
+ }, he = t?.from ? s(t.from.startDate, n, { locale: o }) : "", ge = a(t) ? s(a(t), n, { locale: o }) : "", ke = he !== R, we = ge !== S, De = R.length === n.length && !C(P(R, n, /* @__PURE__ */ new Date(), { locale: o })), ye = S.length === n.length && !C(P(S, n, /* @__PURE__ */ new Date(), { locale: o }));
99
+ return /* @__PURE__ */ f("div", { className: "flex w-full min-w-[240px] flex-col gap-[6px]", "data-component": "week-range-picker", "data-disabled": i || void 0, children: [
100
+ /* @__PURE__ */ f("div", { className: "flex flex-col gap-[6px]", children: [
101
+ X && /* @__PURE__ */ f(
102
102
  "label",
103
103
  {
104
- className: f(
104
+ className: p(
105
105
  "text-xs font-medium leading-[18px] text-content-tertiary",
106
- N && "opacity-70",
107
- D && "text-destructive"
106
+ i && "opacity-70",
107
+ b && "text-destructive"
108
108
  ),
109
109
  children: [
110
110
  X,
@@ -113,29 +113,31 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
113
113
  ]
114
114
  }
115
115
  ),
116
- /* @__PURE__ */ d(
116
+ /* @__PURE__ */ f(
117
117
  "div",
118
118
  {
119
- className: f(
119
+ className: p(
120
120
  "w-full",
121
121
  I && A === "absolute" && "relative"
122
122
  ),
123
123
  children: [
124
- /* @__PURE__ */ d(Se, { open: l, onOpenChange: g, children: [
125
- /* @__PURE__ */ r(Ce, { asChild: !0, children: /* @__PURE__ */ d(
124
+ /* @__PURE__ */ f(Se, { open: i ? !1 : l, onOpenChange: (e) => {
125
+ i || k(e);
126
+ }, children: [
127
+ /* @__PURE__ */ r(Ce, { asChild: !0, children: /* @__PURE__ */ f(
126
128
  "div",
127
129
  {
128
130
  "data-state": l ? "open" : "closed",
129
- className: f(
131
+ className: p(
130
132
  "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",
131
- D ? "border-destructive hover:border-destructive" : "border-field",
133
+ b ? "border-destructive hover:border-destructive" : "border-field",
132
134
  H === "sm" ? "h-6" : H === "md" ? "h-[28px]" : "h-8",
133
- N && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
135
+ i && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
134
136
  "cursor-pointer",
135
137
  se
136
138
  ),
137
139
  children: [
138
- /* @__PURE__ */ d("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
140
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
139
141
  /* @__PURE__ */ r(
140
142
  "input",
141
143
  {
@@ -146,15 +148,15 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
146
148
  onBlur: U,
147
149
  onClick: (e) => l && e.stopPropagation(),
148
150
  onKeyDown: (e) => {
149
- (e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0, g(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
151
+ (e.key === "Enter" || e.key === "ArrowDown") && !l && !i && (e.preventDefault(), W.current = !0, k(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
150
152
  },
151
153
  placeholder: l ? n : G,
152
- disabled: !!N,
154
+ disabled: !!i,
153
155
  "aria-label": "Start Date",
154
156
  "data-field": "start",
155
- className: f(
157
+ className: p(
156
158
  "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",
157
- be ? "text-destructive" : ke ? "text-content-muted" : ""
159
+ De ? "text-destructive" : ke ? "text-content-muted" : ""
158
160
  ),
159
161
  ...ae
160
162
  }
@@ -169,21 +171,21 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
169
171
  onBlur: U,
170
172
  onClick: (e) => l && e.stopPropagation(),
171
173
  onKeyDown: (e) => {
172
- (e.key === "Enter" || e.key === "ArrowDown") && !l && (e.preventDefault(), W.current = !0, g(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
174
+ (e.key === "Enter" || e.key === "ArrowDown") && !l && !i && (e.preventDefault(), W.current = !0, k(!0)), e.key === "Escape" && l && (e.preventDefault(), j());
173
175
  },
174
176
  placeholder: l ? n : G,
175
- disabled: !!N,
177
+ disabled: !!i,
176
178
  "aria-label": "End Date",
177
179
  "data-field": "end",
178
- className: f(
180
+ className: p(
179
181
  "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",
180
- De ? "text-destructive" : we ? "text-content-muted" : ""
182
+ ye ? "text-destructive" : we ? "text-content-muted" : ""
181
183
  )
182
184
  }
183
185
  )
184
186
  ] }),
185
- /* @__PURE__ */ d("div", { className: "flex items-center gap-1 shrink-0", children: [
186
- t?.from && !N && /* @__PURE__ */ d(_, { children: [
187
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-1 shrink-0", children: [
188
+ t?.from && !i && /* @__PURE__ */ f(_, { children: [
187
189
  /* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r(
188
190
  Ne,
189
191
  {
@@ -195,11 +197,11 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
195
197
  ) }),
196
198
  /* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("calendar.clear") })
197
199
  ] }),
198
- /* @__PURE__ */ d(_, { children: [
200
+ /* @__PURE__ */ f(_, { children: [
199
201
  /* @__PURE__ */ r(F, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": V("datePicker.selectWeekRange"), onClick: (e) => {
200
- e.stopPropagation(), g(!l);
202
+ e.stopPropagation(), i || k(!l);
201
203
  }, onKeyDown: (e) => {
202
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), W.current = !0, g(!l));
204
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), i || (W.current = !0, k(!l)));
203
205
  }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(Re, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
204
206
  /* @__PURE__ */ r(ee, { variant: "tertiary", side: "top", children: V("datePicker.selectWeekRange") })
205
207
  ] })
@@ -220,14 +222,14 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
220
222
  {
221
223
  pickerType: "week",
222
224
  weekMode: "range",
223
- selectedWeeks: y,
225
+ selectedWeeks: v,
224
226
  onWeekSelect: pe,
225
227
  month: fe,
226
228
  onMonthChange: L,
227
229
  disabled: { before: ne, after: oe },
228
230
  startMonth: le,
229
231
  endMonth: re,
230
- showFooter: b,
232
+ showFooter: y,
231
233
  calendarType: K,
232
234
  fiscalMode: M,
233
235
  selectionMode: z,
@@ -243,23 +245,23 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
243
245
  }
244
246
  )
245
247
  ] }),
246
- I && A === "absolute" && /* @__PURE__ */ d("div", { className: f("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", D && "text-destructive"), children: [
248
+ I && A === "absolute" && /* @__PURE__ */ f("div", { className: p("absolute left-0 top-full z-10 mt-1 flex min-w-0 max-w-full items-center gap-[6px]", b && "text-destructive"), children: [
247
249
  /* @__PURE__ */ r(
248
250
  Z,
249
251
  {
250
252
  size: "xs",
251
- className: f(
253
+ className: p(
252
254
  "shrink-0",
253
- D ? "text-destructive" : "text-content-muted"
255
+ b ? "text-destructive" : "text-content-muted"
254
256
  )
255
257
  }
256
258
  ),
257
259
  /* @__PURE__ */ r(
258
260
  "p",
259
261
  {
260
- className: f(
262
+ className: p(
261
263
  "min-w-0 text-[12px] font-medium leading-[18px] text-navigation-muted",
262
- D && "text-destructive"
264
+ b && "text-destructive"
263
265
  ),
264
266
  children: I
265
267
  }
@@ -269,23 +271,23 @@ const a = (t) => t?.from ? t.to ? t.to.endDate : t.from.endDate : void 0, Ae = c
269
271
  }
270
272
  )
271
273
  ] }),
272
- I && A === "flow" && /* @__PURE__ */ d("div", { className: f("flex items-center gap-[6px]", D && "text-destructive"), children: [
274
+ I && A === "flow" && /* @__PURE__ */ f("div", { className: p("flex items-center gap-[6px]", b && "text-destructive"), children: [
273
275
  /* @__PURE__ */ r(
274
276
  Z,
275
277
  {
276
278
  size: "xs",
277
- className: f(
279
+ className: p(
278
280
  "shrink-0",
279
- D ? "text-destructive" : "text-content-muted"
281
+ b ? "text-destructive" : "text-content-muted"
280
282
  )
281
283
  }
282
284
  ),
283
285
  /* @__PURE__ */ r(
284
286
  "p",
285
287
  {
286
- className: f(
288
+ className: p(
287
289
  "text-[12px] font-medium leading-[18px] text-navigation-muted",
288
- D && "text-destructive"
290
+ b && "text-destructive"
289
291
  ),
290
292
  children: I
291
293
  }
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import * as B from "react";
3
3
  import { ChevronDown as E } from "lucide-react";
4
- import { Accordion as P, AccordionItem as V, AccordionTrigger as _, AccordionContent as R } from "../accordion.js";
5
- import { Badge as I } from "../badge.js";
4
+ import { Accordion as P, AccordionItem as V, AccordionTrigger as R, AccordionContent as I } from "../accordion.js";
5
+ import { Badge as _ } from "../badge.js";
6
6
  import { Checkbox as z } from "../checkbox.js";
7
7
  import { FilterPopoverContent as D } from "../filter-strip/filter-tag-list.js";
8
8
  import { Popover as M, PopoverTrigger as j } from "../popover.js";
@@ -28,7 +28,7 @@ function X({ section: a }) {
28
28
  /* @__PURE__ */ e("p", { className: "text-xs font-semibold leading-5 text-content-heading", children: a.title ?? "Attributes" }),
29
29
  /* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap gap-1.5", children: [
30
30
  s.map((c, u) => /* @__PURE__ */ e(
31
- I,
31
+ _,
32
32
  {
33
33
  variant: "subtle",
34
34
  color: "neutral",
@@ -107,7 +107,7 @@ const H = B.forwardRef(
107
107
  collapseAriaLabel: T = "Collapse details",
108
108
  ...b
109
109
  }, g) => {
110
- const w = d !== void 0, S = w ? d ? h : "" : void 0, m = !!(o || n?.checked), $ = f != null && f.length > 0 || v != null, N = (r) => /* @__PURE__ */ t(
110
+ const N = d !== void 0, S = N ? d ? h : "" : void 0, m = !!(o || n?.checked), $ = f != null && f.length > 0 || v != null, w = (r) => /* @__PURE__ */ t(
111
111
  "div",
112
112
  {
113
113
  className: p(
@@ -172,7 +172,7 @@ const H = B.forwardRef(
172
172
  type: "single",
173
173
  collapsible: !0,
174
174
  disabled: x,
175
- ...w ? { value: S } : {
175
+ ...N ? { value: S } : {
176
176
  defaultValue: c ? h : void 0
177
177
  },
178
178
  onValueChange: (r) => u?.(r === h),
@@ -185,7 +185,7 @@ const H = B.forwardRef(
185
185
  /* @__PURE__ */ t("div", { className: "flex items-start gap-3 px-3 py-3", children: [
186
186
  C,
187
187
  /* @__PURE__ */ t(
188
- _,
188
+ R,
189
189
  {
190
190
  variant: "plain",
191
191
  className: p(
@@ -193,11 +193,11 @@ const H = B.forwardRef(
193
193
  x && "pointer-events-none opacity-50"
194
194
  ),
195
195
  children: [
196
- N(!1),
196
+ w(!1),
197
197
  /* @__PURE__ */ e(
198
198
  "span",
199
199
  {
200
- className: "expandable-sku-row__chev mt-0.5 inline-flex shrink-0 text-content-muted transition-transform duration-200 group-data-[state=open]:rotate-180",
200
+ className: "mt-0.5 inline-flex shrink-0 text-content-muted transition-transform duration-200 group-data-[state=open]:rotate-180",
201
201
  "aria-hidden": !0,
202
202
  children: /* @__PURE__ */ e(E, { className: "size-4" })
203
203
  }
@@ -211,7 +211,7 @@ const H = B.forwardRef(
211
211
  }
212
212
  )
213
213
  ] }),
214
- /* @__PURE__ */ e(R, { className: "border-0 bg-transparent p-0 pb-[0.01rem]", children: /* @__PURE__ */ t("div", { className: "mx-2 mb-2 overflow-hidden bg-[#f8f9fb] pt-2 rounded-lg", children: [
214
+ /* @__PURE__ */ e(I, { className: "border-0 bg-transparent p-0 pb-[0.01rem]", children: /* @__PURE__ */ t("div", { className: "mx-2 mb-2 overflow-hidden bg-[#f8f9fb] pt-2 rounded-lg", children: [
215
215
  f?.map((r) => G(r)),
216
216
  v ? /* @__PURE__ */ e("div", { className: "px-4 py-3 sm:px-5", children: v }) : null
217
217
  ] }) })
@@ -233,7 +233,7 @@ const H = B.forwardRef(
233
233
  ...b,
234
234
  children: /* @__PURE__ */ t("div", { className: "flex items-start gap-3 px-3 py-3", children: [
235
235
  C,
236
- N(!!x)
236
+ w(!!x)
237
237
  ] })
238
238
  }
239
239
  );
@@ -1,17 +1,24 @@
1
1
  import { FilterItem } from '../types/filter-strip.types';
2
+ import * as React from "react";
2
3
  interface FilterTagListProps {
3
4
  filters: FilterItem[];
4
5
  onFilterRemove: (id: string, value?: string | number) => void;
5
6
  onOverflowClick?: (id: string) => void;
6
7
  onViewAll?: () => void;
7
8
  }
8
- declare const FilterPopoverContent: ({ remainingValues, viewAllTrigger, onViewAll, onItemRemove, isRemovable, isCopyable }: {
9
+ interface ExternalCopyFunctionProps {
10
+ e: React.MouseEvent<HTMLButtonElement>;
11
+ val: string | number;
12
+ index: number;
13
+ }
14
+ declare const FilterPopoverContent: ({ remainingValues, viewAllTrigger, onViewAll, onItemRemove, isRemovable, isCopyable, externalCopyFunction }: {
9
15
  remainingValues: (string | number)[];
10
16
  viewAllTrigger?: "expand" | "custom";
11
17
  onViewAll?: () => void;
12
18
  onItemRemove: (val: string | number) => void;
13
19
  isRemovable?: boolean;
14
20
  isCopyable?: boolean;
21
+ externalCopyFunction?: (props: ExternalCopyFunctionProps) => void;
15
22
  }) => import("react/jsx-runtime").JSX.Element;
16
23
  declare const FilterTagList: ({ filters, onFilterRemove: _onFilterRemove, onOverflowClick, onViewAll, }: FilterTagListProps) => import("react/jsx-runtime").JSX.Element;
17
24
  export { FilterTagList, FilterPopoverContent };