impact-nova 2.2.3 → 2.2.4

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 (51) hide show
  1. package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
  2. package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
  3. package/dist/components/data/ag-grid-react/index.js +202 -206
  4. package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
  5. package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
  6. package/dist/components/data/data-table/data-table-column-list.js +64 -61
  7. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
  8. package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
  9. package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
  10. package/dist/components/data/data-table/data-table-constants.js +3 -2
  11. package/dist/components/data/data-table/data-table-sheet.js +46 -49
  12. package/dist/components/data/data-table/data-table.js +137 -119
  13. package/dist/components/data/data-table/index.js +24 -23
  14. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
  15. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
  16. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
  17. package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
  18. package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
  19. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
  20. package/dist/components/data/nested-list/nested-list-constants.js +6 -0
  21. package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
  22. package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
  23. package/dist/components/data/nested-list/nested-list.js +214 -215
  24. package/dist/components/data-display/card/card.js +6 -5
  25. package/dist/components/feedback/dialog/dialog.js +7 -5
  26. package/dist/components/feedback/sheet/sheet.js +28 -27
  27. package/dist/components/flows/filter-panel/filter-panel.js +36 -35
  28. package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
  29. package/dist/components/forms/combobox/combobox.js +110 -100
  30. package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
  31. package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
  32. package/dist/components/forms/date-picker/date-picker.js +96 -90
  33. package/dist/components/forms/date-picker/date-range-picker.js +160 -152
  34. package/dist/components/forms/date-picker/month-picker.js +71 -65
  35. package/dist/components/forms/date-picker/month-range-picker.js +153 -145
  36. package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
  37. package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
  38. package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
  39. package/dist/components/forms/date-picker/week-picker.js +82 -76
  40. package/dist/components/forms/date-picker/week-range-picker.js +127 -119
  41. package/dist/impact-nova-base.scss +10 -5
  42. package/dist/impact-nova-components.css +9 -5
  43. package/dist/impact-nova.css +1 -1
  44. package/dist/index.js +189 -188
  45. package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
  46. package/dist/lib/overlay/overlay-portal-context.js +39 -28
  47. package/dist/lib/primitives/create-compound.d.ts +5 -0
  48. package/dist/lib/primitives/create-compound.js +17 -16
  49. package/dist/llms/rules/installation.js +1 -1
  50. package/dist/llms/rules/requirements.js +1 -1
  51. package/package.json +1 -1
@@ -1,251 +1,259 @@
1
1
  import { jsx as u, jsxs as D } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
3
  import { Cross as Ne, CalendarMonth as Ae } from "impact-nova-icons";
4
- import { cn as $ } from "../../../lib/utils.js";
5
- import { usePickerDismissActionsRef as Ve, usePickerFooterDismissNudge as Oe, createRangePickerOpenChangeHandler as Ke, parseDateInput as z, normalizeOrderedRange as F, compareMonthSelection as O, flashRangeReorder as ee, isDateInputInvalid as te, resolveRangeFieldBlur as A, resolveRangePickerDismissFlash as je, deferRangeInputBlur as $e, maskDateInput as re, resolveDateInputOnBlur as V } from "./date-input-behavior.js";
6
- import { useFieldChrome as ze } from "../../../lib/primitives/use-field-chrome.js";
7
- import { Popover as He, PopoverAnchor as qe, PopoverContent as Le } from "../../feedback/popover/popover.js";
8
- import { Calendar as Ge } from "../../data-display/calendar/calendar.js";
9
- import { Tooltip as oe, TooltipTrigger as ne, TooltipContent as se } from "../../feedback/tooltip/tooltip.js";
10
- import { useImpactNovaI18n as Je } from "../../../i18n/use-impact-nova-i18n.js";
11
- import { coerceMonthRangeApply as Qe, isMonthRangeSelection as Ue } from "./calendar-selection-adapters.js";
12
- import { buildDateBoundsMatcher as We } from "../../../lib/date-bounds-matcher.js";
4
+ import { cn as z } from "../../../lib/utils.js";
5
+ import { usePickerDismissActionsRef as Oe, usePickerFooterDismissNudge as Ve, createRangePickerOpenChangeHandler as Ke, parseDateInput as H, normalizeOrderedRange as ee, compareMonthSelection as V, flashRangeReorder as te, isDateInputInvalid as re, resolveRangeFieldBlur as A, resolveRangePickerDismissFlash as je, handlePickerSurfacePointerDown as $e, deferRangeInputBlur as ze, maskDateInput as oe, resolveDateInputOnBlur as O } from "./date-input-behavior.js";
6
+ import { useFieldChrome as He } from "../../../lib/primitives/use-field-chrome.js";
7
+ import { Popover as qe, PopoverAnchor as Le, PopoverContent as Ge } from "../../feedback/popover/popover.js";
8
+ import { Calendar as Je } from "../../data-display/calendar/calendar.js";
9
+ import { Tooltip as ne, TooltipTrigger as se, TooltipContent as ie } from "../../feedback/tooltip/tooltip.js";
10
+ import { useImpactNovaI18n as Qe } from "../../../i18n/use-impact-nova-i18n.js";
11
+ import { coerceMonthRangeApply as Ue, isMonthRangeSelection as We } from "./calendar-selection-adapters.js";
12
+ import { buildDateBoundsMatcher as Xe } from "../../../lib/date-bounds-matcher.js";
13
13
  const h = (t, n = "MM/YYYY") => {
14
14
  const E = (t.month + 1).toString().padStart(2, "0");
15
15
  return n === "YYYY/MM" ? `${t.year}/${E}` : `${E}/${t.year}`;
16
16
  };
17
- function Xe(t, n) {
17
+ function Ze(t, n) {
18
18
  if (!t && !n) return !0;
19
19
  if (!t || !n) return !1;
20
- const E = t.from === void 0 && n.from === void 0 || t.from !== void 0 && n.from !== void 0 && O(t.from, n.from) === 0, b = t.to === void 0 && n.to === void 0 || t.to !== void 0 && n.to !== void 0 && O(t.to, n.to) === 0;
20
+ const E = t.from === void 0 && n.from === void 0 || t.from !== void 0 && n.from !== void 0 && V(t.from, n.from) === 0, b = t.to === void 0 && n.to === void 0 || t.to !== void 0 && n.to !== void 0 && V(t.to, n.to) === 0;
21
21
  return E && b;
22
22
  }
23
- function I(t) {
23
+ function P(t) {
24
24
  return { month: t.getMonth(), year: t.getFullYear() };
25
25
  }
26
- const Ze = s.forwardRef(
26
+ const _e = s.forwardRef(
27
27
  ({
28
28
  value: t,
29
29
  onChange: n,
30
30
  placeholder: E,
31
31
  minDate: b,
32
- maxDate: ie,
33
- startMonth: ae,
34
- endMonth: ce,
32
+ maxDate: ae,
33
+ startMonth: ce,
34
+ endMonth: fe,
35
35
  showFooter: g = !0,
36
- disabled: f,
37
- className: fe,
38
- error: de,
39
- isError: le,
40
- size: H,
36
+ disabled: c,
37
+ className: de,
38
+ error: le,
39
+ isError: pe,
40
+ size: q,
41
41
  label: me,
42
- helperText: pe,
43
- helperTextPosition: ue = "absolute",
44
- required: he,
45
- prefix: _e,
46
- prefixClick: Fe,
42
+ helperText: ue,
43
+ helperTextPosition: he = "absolute",
44
+ required: ge,
45
+ prefix: Fe,
46
+ prefixClick: et,
47
47
  displayFormat: i = "MM/YYYY",
48
- ...ge
49
- }, Me) => {
50
- const q = de ?? le, Re = ze({
48
+ ...Me
49
+ }, Re) => {
50
+ const L = le ?? pe, ye = He({
51
51
  label: me,
52
- helperText: pe,
53
- helperTextPosition: ue,
54
- error: q,
55
- required: he,
56
- disabled: f ?? void 0,
52
+ helperText: ue,
53
+ helperTextPosition: he,
54
+ error: L,
55
+ required: ge,
56
+ disabled: c ?? void 0,
57
57
  rootClassName: "w-full min-w-[240px]"
58
- }), { t: x } = Je(), L = s.useRef(null), ye = s.useRef(null), G = s.useRef(null), S = s.useRef(null), K = s.useRef(null), d = s.useMemo(
58
+ }), { t: x } = Qe(), K = s.useRef(null), G = s.useRef(null), J = s.useRef(null), S = s.useRef(null), j = s.useRef(null), d = s.useMemo(
59
59
  () => i === "YYYY/MM" ? "yyyy/MM" : "MM/yyyy",
60
60
  [i]
61
61
  );
62
- s.useImperativeHandle(Me, () => L.current);
63
- const [m, M] = s.useState(!1), J = Ve(), { footerFlashKey: ke, footerFlashTarget: ve, popoverHandlers: xe } = Oe(g, m, J, G), w = s.useRef(!1), [c, R] = s.useState(t), [p, k] = s.useState(t?.from ? h(t.from, i) : ""), [y, v] = s.useState(t?.to ? h(t.to, i) : ""), [Ye, P] = s.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : b || /* @__PURE__ */ new Date());
62
+ s.useImperativeHandle(Re, () => K.current);
63
+ const [p, M] = s.useState(!1), Q = Oe(), { footerFlashKey: ke, footerFlashTarget: ve, popoverHandlers: xe } = Ve(g, p, Q, J), I = s.useRef(!1), [f, R] = s.useState(t), [m, k] = s.useState(t?.from ? h(t.from, i) : ""), [y, v] = s.useState(t?.to ? h(t.to, i) : ""), [Ye, w] = s.useState(() => t?.from ? new Date(t.from.year, t.from.month, 1) : b || /* @__PURE__ */ new Date());
64
64
  s.useEffect(() => {
65
65
  k(t?.from ? h(t.from, i) : ""), v(t?.to ? h(t.to, i) : ""), R(t);
66
66
  }, [t, i]);
67
67
  const Ce = s.useCallback(
68
68
  (e) => Ke({
69
- disabled: f ?? void 0,
69
+ disabled: c ?? void 0,
70
70
  showFooter: g,
71
71
  containerRef: S,
72
- popoverContentRef: K,
72
+ popoverContentRef: j,
73
73
  setOpen: M
74
74
  })(e),
75
- [f, g]
76
- ), Q = s.useRef(!1);
75
+ [c, g]
76
+ ), U = s.useRef(!1);
77
77
  s.useEffect(() => {
78
- if (m && !Q.current) {
79
- const e = z(p, d);
80
- e.parsed ? P(e.parsed) : c?.from ? P(new Date(c.from.year, c.from.month, 1)) : t?.from ? P(new Date(t.from.year, t.from.month, 1)) : b && P(b);
78
+ if (p && !U.current) {
79
+ const e = H(m, d);
80
+ e.parsed ? w(e.parsed) : f?.from ? w(new Date(f.from.year, f.from.month, 1)) : t?.from ? w(new Date(t.from.year, t.from.month, 1)) : b && w(b);
81
81
  }
82
- Q.current = m;
83
- }, [m, p, d, c?.from, t?.from, b]);
82
+ U.current = p;
83
+ }, [p, m, d, f?.from, t?.from, b]);
84
84
  const be = (e) => {
85
- const r = Ue(e) ? e : void 0;
85
+ const r = We(e) ? e : void 0;
86
86
  R(r), r?.from && k(h(r.from, i)), r?.to && v(h(r.to, i)), !g && r?.from && r?.to && (r.from.month !== r.to.month || r.from.year !== r.to.year) && (n?.(r), M(!1));
87
- }, U = (e) => {
88
- const r = Qe(e, c), o = F(r?.from, r?.to, O);
89
- o.swapped && (o.from && k(h(o.from, i)), o.to && v(h(o.to, i)), R({ from: o.from, to: o.to }), ee(S.current)), n?.({ from: o.from, to: o.to }), M(!1);
87
+ }, W = (e) => {
88
+ const r = Ue(e, f), o = ee(r?.from, r?.to, V);
89
+ o.swapped && (o.from && k(h(o.from, i)), o.to && v(h(o.to, i)), R({ from: o.from, to: o.to }), te(S.current)), n?.({ from: o.from, to: o.to }), M(!1);
90
90
  }, B = () => {
91
91
  R(t), k(t?.from ? h(t.from, i) : ""), v(t?.to ? h(t.to, i) : ""), M(!1);
92
- }, j = () => {
92
+ }, $ = () => {
93
93
  R(void 0), k(""), v(""), n?.(void 0), g || M(!1);
94
- }, Ie = (e) => {
95
- const r = re(e.target.value, d, p);
94
+ }, Pe = (e) => {
95
+ const r = oe(e.target.value, d, m);
96
96
  if (k(r), r === "") {
97
- const l = { from: void 0, to: c?.to };
97
+ const l = { from: void 0, to: f?.to };
98
98
  R(l), g || n?.(l);
99
99
  return;
100
100
  }
101
- const { parsed: o, isValid: a } = z(r, d);
101
+ const { parsed: o, isValid: a } = H(r, d);
102
102
  if (a && o) {
103
- const T = { from: I(o), to: c?.to };
104
- R(T), P(o), g || n?.(T);
103
+ const T = { from: P(o), to: f?.to };
104
+ R(T), w(o), g || n?.(T);
105
105
  }
106
- }, Pe = (e) => {
107
- const r = re(e.target.value, d, y);
106
+ }, we = (e) => {
107
+ const r = oe(e.target.value, d, y);
108
108
  if (v(r), r === "") {
109
- const l = { from: c?.from, to: void 0 };
109
+ const l = { from: f?.from, to: void 0 };
110
110
  R(l), g || n?.(l);
111
111
  return;
112
112
  }
113
- const { parsed: o, isValid: a } = z(r, d);
113
+ const { parsed: o, isValid: a } = H(r, d);
114
114
  if (a && o) {
115
- const l = I(o), T = { from: c?.from, to: l };
116
- R(T), P(o), g || n?.(T);
115
+ const l = P(o), T = { from: f?.from, to: l };
116
+ R(T), w(o), g || n?.(T);
117
117
  }
118
118
  }, N = s.useCallback((e, r) => {
119
- const o = F(e, r, O);
120
- return o.swapped && (o.from && k(h(o.from, i)), o.to && v(h(o.to, i)), ee(S.current)), { from: o.from, to: o.to };
121
- }, [i]), we = () => {
122
- const e = V(p, d, Y), r = V(y, d, C);
119
+ const o = ee(e, r, V);
120
+ return o.swapped && (o.from && k(h(o.from, i)), o.to && v(h(o.to, i)), te(S.current)), { from: o.from, to: o.to };
121
+ }, [i]), Ie = () => {
122
+ const e = O(m, d, Y), r = O(y, d, C);
123
123
  e.resetToCommitted ? k(Y) : e.parsed && k(e.display), r.resetToCommitted ? v(C) : r.parsed && v(r.display);
124
- let o = e.parsed ? I(e.parsed) : c?.from, a = r.parsed ? I(r.parsed) : c?.to;
124
+ let o = e.parsed ? P(e.parsed) : f?.from, a = r.parsed ? P(r.parsed) : f?.to;
125
125
  if ({ from: o, to: a } = N(o, a), o || a) {
126
126
  const l = { from: o, to: a };
127
127
  R(l), n?.(l);
128
- } else !p && !y && (R(void 0), n?.(void 0));
129
- }, W = () => {
130
- $e(
128
+ } else !m && !y && (R(void 0), n?.(void 0));
129
+ }, X = () => {
130
+ ze(
131
131
  S,
132
- K,
132
+ j,
133
133
  () => {
134
- const e = A(p, d, Y), r = A(y, d, C);
134
+ const e = A(m, d, Y), r = A(y, d, C);
135
135
  e.resetToCommitted ? k(Y) : e.parsed && k(e.display), r.resetToCommitted ? v(C) : r.parsed && v(r.display);
136
- let o = e.parsed ? I(e.parsed) : e.resetToCommitted ? t?.from : c?.from, a = r.parsed ? I(r.parsed) : r.resetToCommitted ? t?.to : c?.to;
136
+ let o = e.parsed ? P(e.parsed) : e.resetToCommitted ? t?.from : f?.from, a = r.parsed ? P(r.parsed) : r.resetToCommitted ? t?.to : f?.to;
137
137
  o && a && ({ from: o, to: a } = N(o, a));
138
138
  const l = o || a ? { from: o, to: a } : void 0;
139
- R(l), g || (l ? n?.(l) : !p && !y && n?.(void 0));
139
+ R(l), g || (l ? n?.(l) : !m && !y && n?.(void 0));
140
140
  }
141
141
  );
142
- }, X = () => {
143
- if (m && g) {
144
- U();
142
+ }, Z = () => {
143
+ if (p && g) {
144
+ W();
145
145
  return;
146
146
  }
147
- if (!m) {
147
+ if (!p) {
148
148
  if (g) {
149
- we();
149
+ Ie();
150
150
  return;
151
151
  }
152
- const e = V(p, d, Y), r = V(y, d, C);
152
+ const e = O(m, d, Y), r = O(y, d, C);
153
153
  if (e.parsed || r.parsed) return;
154
- w.current = !0, M(!0);
154
+ I.current = !0, M(!0);
155
155
  }
156
- }, Y = t?.from ? h(t.from, i) : "", C = t?.to ? h(t.to, i) : "", De = p !== Y, Ee = y !== C, Se = te(p, d), Te = te(y, d), Z = x("datePicker.startMonth"), _ = x("datePicker.endMonth"), Be = s.useCallback(() => {
157
- const e = A(p, d, Y), r = A(y, d, C);
158
- let o = e.parsed ? I(e.parsed) : e.resetToCommitted ? t?.from : c?.from, a = r.parsed ? I(r.parsed) : r.resetToCommitted ? t?.to : c?.to;
156
+ }, Y = t?.from ? h(t.from, i) : "", C = t?.to ? h(t.to, i) : "", De = m !== Y, Ee = y !== C, Se = re(m, d), Te = re(y, d), _ = x("datePicker.startMonth"), F = x("datePicker.endMonth"), Be = s.useCallback(() => {
157
+ const e = A(m, d, Y), r = A(y, d, C);
158
+ let o = e.parsed ? P(e.parsed) : e.resetToCommitted ? t?.from : f?.from, a = r.parsed ? P(r.parsed) : r.resetToCommitted ? t?.to : f?.to;
159
159
  o && a && ({ from: o, to: a } = N(o, a));
160
160
  const l = o || a ? { from: o, to: a } : void 0;
161
161
  return je({
162
- startInput: p,
162
+ startInput: m,
163
163
  endInput: y,
164
164
  committedStart: Y,
165
165
  committedEnd: C,
166
166
  committedRange: t,
167
- pendingRange: c,
167
+ pendingRange: f,
168
168
  computeEffectiveRange: () => l,
169
- rangesEqual: Xe
169
+ rangesEqual: Ze
170
170
  });
171
171
  }, [
172
- p,
172
+ m,
173
173
  y,
174
174
  Y,
175
175
  C,
176
176
  t,
177
- c,
177
+ f,
178
178
  d,
179
179
  N
180
180
  ]);
181
181
  return s.useLayoutEffect(() => {
182
- J.current = {
182
+ Q.current = {
183
183
  onDismiss: B,
184
184
  resolveFlash: Be
185
185
  };
186
186
  }), /* @__PURE__ */ u(
187
187
  "div",
188
188
  {
189
- ref: G,
189
+ ref: J,
190
190
  "data-component": "month-range-picker",
191
- "data-disabled": f || void 0,
192
- children: Re.wrapControl(
193
- /* @__PURE__ */ D(He, { open: f ? !1 : m, onOpenChange: Ce, children: [
194
- /* @__PURE__ */ u(qe, { asChild: !0, children: /* @__PURE__ */ D(
191
+ "data-disabled": c || void 0,
192
+ children: ye.wrapControl(
193
+ /* @__PURE__ */ D(qe, { open: c ? !1 : p, onOpenChange: Ce, children: [
194
+ /* @__PURE__ */ u(Le, { asChild: !0, children: /* @__PURE__ */ D(
195
195
  "div",
196
196
  {
197
197
  ref: S,
198
- "data-state": m ? "open" : "closed",
199
- className: $(
198
+ "data-state": p ? "open" : "closed",
199
+ onPointerDown: (e) => $e({
200
+ disabled: c,
201
+ event: e,
202
+ onOpen: () => M(!0),
203
+ focusField: (r) => {
204
+ r === "end" ? G.current?.focus() : K.current?.focus();
205
+ }
206
+ }),
207
+ className: z(
200
208
  "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",
201
- q ? "border-destructive hover:border-destructive" : "border-field",
202
- H === "sm" ? "h-6" : H === "md" ? "h-[28px]" : "h-8",
203
- f && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
209
+ L ? "border-destructive hover:border-destructive" : "border-field",
210
+ q === "sm" ? "h-6" : q === "md" ? "h-[28px]" : "h-8",
211
+ c && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
204
212
  "cursor-pointer",
205
- fe
213
+ de
206
214
  ),
207
215
  children: [
208
216
  /* @__PURE__ */ D("div", { className: "flex items-center gap-4 flex-1 min-w-0", children: [
209
217
  /* @__PURE__ */ u(
210
218
  "input",
211
219
  {
212
- ref: L,
220
+ ref: K,
213
221
  type: "text",
214
- value: p,
215
- onChange: Ie,
216
- onBlur: W,
217
- onClick: () => !f && M(!0),
222
+ value: m,
223
+ onChange: Pe,
224
+ onBlur: X,
225
+ onClick: () => !c && M(!0),
218
226
  onKeyDown: (e) => {
219
- e.key === "Enter" && !f && (e.preventDefault(), X()), e.key === "ArrowDown" && !m && !f && (e.preventDefault(), w.current = !0, M(!0)), e.key === "Escape" && m && (e.preventDefault(), B());
227
+ e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !p && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
220
228
  },
221
- placeholder: m ? i === "YYYY/MM" ? "YYYY/MM" : x("datePicker.monthYearFormat") : Z,
222
- disabled: !!f,
223
- "aria-label": Z,
229
+ placeholder: p ? i === "YYYY/MM" ? "YYYY/MM" : x("datePicker.monthYearFormat") : _,
230
+ disabled: !!c,
231
+ "aria-label": _,
224
232
  "data-field": "start",
225
- className: $(
233
+ className: z(
226
234
  "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",
227
235
  Se ? "text-destructive" : De ? "text-content-placeholder" : ""
228
236
  ),
229
- ...ge
237
+ ...Me
230
238
  }
231
239
  ),
232
240
  /* @__PURE__ */ u(
233
241
  "input",
234
242
  {
235
- ref: ye,
243
+ ref: G,
236
244
  type: "text",
237
245
  value: y,
238
- onChange: Pe,
239
- onBlur: W,
240
- onClick: () => !f && M(!0),
246
+ onChange: we,
247
+ onBlur: X,
248
+ onClick: () => !c && M(!0),
241
249
  onKeyDown: (e) => {
242
- e.key === "Enter" && !f && (e.preventDefault(), X()), e.key === "ArrowDown" && !m && !f && (e.preventDefault(), w.current = !0, M(!0)), e.key === "Escape" && m && (e.preventDefault(), B());
250
+ e.key === "Enter" && !c && (e.preventDefault(), Z()), e.key === "ArrowDown" && !p && !c && (e.preventDefault(), I.current = !0, M(!0)), e.key === "Escape" && p && (e.preventDefault(), B());
243
251
  },
244
- placeholder: m ? i === "YYYY/MM" ? "YYYY/MM" : x("datePicker.monthYearFormat") : _,
245
- disabled: !!f,
246
- "aria-label": _,
252
+ placeholder: p ? i === "YYYY/MM" ? "YYYY/MM" : x("datePicker.monthYearFormat") : F,
253
+ disabled: !!c,
254
+ "aria-label": F,
247
255
  "data-field": "end",
248
- className: $(
256
+ className: z(
249
257
  "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",
250
258
  Te ? "text-destructive" : Ee ? "text-content-placeholder" : ""
251
259
  )
@@ -253,66 +261,66 @@ const Ze = s.forwardRef(
253
261
  )
254
262
  ] }),
255
263
  /* @__PURE__ */ D("div", { className: "flex items-center gap-1 shrink-0", children: [
256
- t?.from && !f && /* @__PURE__ */ D(oe, { children: [
257
- /* @__PURE__ */ u(ne, { asChild: !0, children: /* @__PURE__ */ u(
264
+ t?.from && !c && /* @__PURE__ */ D(ne, { children: [
265
+ /* @__PURE__ */ u(se, { asChild: !0, children: /* @__PURE__ */ u(
258
266
  "button",
259
267
  {
260
268
  type: "button",
261
269
  tabIndex: 0,
262
270
  "aria-label": x("calendar.clear"),
263
271
  onClick: (e) => {
264
- e.stopPropagation(), j();
272
+ e.stopPropagation(), $();
265
273
  },
266
274
  onKeyDown: (e) => {
267
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), j());
275
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), $());
268
276
  },
269
277
  className: "inline-flex size-4 items-center justify-center bg-transparent border-none p-0 cursor-pointer",
270
278
  children: /* @__PURE__ */ u(Ne, { className: "size-3 hover:text-content text-content-icon" })
271
279
  }
272
280
  ) }),
273
- /* @__PURE__ */ u(se, { variant: "tertiary", side: "top", children: x("calendar.clear") })
281
+ /* @__PURE__ */ u(ie, { variant: "tertiary", side: "top", children: x("calendar.clear") })
274
282
  ] }),
275
- /* @__PURE__ */ D(oe, { children: [
276
- /* @__PURE__ */ u(ne, { asChild: !0, children: /* @__PURE__ */ u("button", { type: "button", tabIndex: 0, "aria-label": x("datePicker.selectMonthRange"), onClick: (e) => {
277
- e.stopPropagation(), f || M(!m);
283
+ /* @__PURE__ */ D(ne, { children: [
284
+ /* @__PURE__ */ u(se, { asChild: !0, children: /* @__PURE__ */ u("button", { type: "button", tabIndex: 0, "aria-label": x("datePicker.selectMonthRange"), onClick: (e) => {
285
+ e.stopPropagation(), c || M(!p);
278
286
  }, onKeyDown: (e) => {
279
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), f || (w.current = !0, M(!m)));
287
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), c || (I.current = !0, M(!p)));
280
288
  }, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ u(Ae, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
281
- /* @__PURE__ */ u(se, { variant: "tertiary", side: "top", children: x("datePicker.selectMonthRange") })
289
+ /* @__PURE__ */ u(ie, { variant: "tertiary", side: "top", children: x("datePicker.selectMonthRange") })
282
290
  ] })
283
291
  ] })
284
292
  ]
285
293
  }
286
294
  ) }),
287
295
  /* @__PURE__ */ u(
288
- Le,
296
+ Ge,
289
297
  {
290
- ref: K,
298
+ ref: j,
291
299
  className: "w-auto p-0",
292
300
  align: "start",
293
301
  "aria-label": x("datePicker.selectMonthRange"),
294
302
  onOpenAutoFocus: (e) => {
295
- w.current || e.preventDefault(), w.current = !1;
303
+ I.current || e.preventDefault(), I.current = !1;
296
304
  },
297
305
  ...xe,
298
306
  children: /* @__PURE__ */ u(
299
- Ge,
307
+ Je,
300
308
  {
301
309
  pickerType: "month",
302
310
  monthMode: "range",
303
- selectedMonths: c,
311
+ selectedMonths: f,
304
312
  footerFlashKey: ke,
305
313
  footerFlashTarget: ve,
306
314
  onMonthSelect: be,
307
315
  month: Ye,
308
- onMonthChange: P,
309
- disabled: We(b, ie),
310
- startMonth: ae,
311
- endMonth: ce,
316
+ onMonthChange: w,
317
+ disabled: Xe(b, ae),
318
+ startMonth: ce,
319
+ endMonth: fe,
312
320
  showFooter: g,
313
- onApply: U,
321
+ onApply: W,
314
322
  onCancel: B,
315
- onClear: j
323
+ onClear: $
316
324
  }
317
325
  )
318
326
  }
@@ -323,7 +331,7 @@ const Ze = s.forwardRef(
323
331
  );
324
332
  }
325
333
  );
326
- Ze.displayName = "MonthRangePicker";
334
+ _e.displayName = "MonthRangePicker";
327
335
  export {
328
- Ze as MonthRangePicker
336
+ _e as MonthRangePicker
329
337
  };