impact-nova 2.0.5 → 2.0.7
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.
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +175 -175
- package/dist/components/ui/ag-grid-react/index.js +58 -58
- package/dist/components/ui/calendar.js +3 -2
- package/dist/components/ui/date-picker/date-picker.js +53 -53
- package/dist/components/ui/date-picker/date-range-picker.js +93 -93
- package/dist/components/ui/date-picker/month-picker.js +38 -38
- package/dist/components/ui/date-picker/month-range-picker.js +104 -104
- package/dist/components/ui/date-picker/multi-date-picker.js +31 -28
- package/dist/components/ui/date-picker/multi-month-picker.js +37 -34
- package/dist/components/ui/date-picker/multi-week-picker.js +35 -32
- package/dist/components/ui/date-picker/week-picker.js +62 -62
- package/dist/components/ui/date-picker/week-range-picker.js +62 -62
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/real-world-patterns.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/package.json +1 -1
|
@@ -11,13 +11,13 @@ import { GridHeaderContext as Ae } from "./headers/context/grid-header-context.j
|
|
|
11
11
|
import { convertToAgGridFilterModel as Re, getMultiFilterIndices as Ge, convertFromAgGridFilterModel as ke } from "./headers/utils/filter-utils.js";
|
|
12
12
|
import { ColumnSettingsMenu as je } from "./headers/column-menu/column-settings-menu.js";
|
|
13
13
|
import { AG_GRID_VALUE_FORMATTERS as we } from "./value-formatters.js";
|
|
14
|
-
import { useGridAutoSizeStrategyOnResize as
|
|
14
|
+
import { useGridAutoSizeStrategyOnResize as Ie } from "./useGridAutoSizeStrategyOnResize.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
import { refreshGridAutoSizeStrategy as et } from "./refreshGridAutoSizeStrategy.js";
|
|
17
17
|
import { subscribeGridApiEvent as rt, subscribeGridApiEvents as nt } from "./grid-api-event-subscription.js";
|
|
18
|
-
const
|
|
18
|
+
const Te = me(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
|
|
19
19
|
Ce.registerModules([ye, be, ve]);
|
|
20
|
-
const F = "",
|
|
20
|
+
const F = "", H = "";
|
|
21
21
|
function K(i) {
|
|
22
22
|
return i.getColumns()?.some((n) => n.getColDef().headerCheckboxSelection) ?? !1;
|
|
23
23
|
}
|
|
@@ -35,18 +35,18 @@ const U = (i) => {
|
|
|
35
35
|
l.push("");
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
38
|
+
const u = i[m];
|
|
39
|
+
if (u == null) {
|
|
40
40
|
l.push("");
|
|
41
41
|
continue;
|
|
42
42
|
}
|
|
43
|
-
if (typeof
|
|
44
|
-
const c =
|
|
43
|
+
if (typeof u == "object" && "value" in u) {
|
|
44
|
+
const c = u.value;
|
|
45
45
|
l.push(c == null ? "" : String(c));
|
|
46
46
|
continue;
|
|
47
47
|
}
|
|
48
|
-
if (typeof
|
|
49
|
-
l.push(String(
|
|
48
|
+
if (typeof u != "object") {
|
|
49
|
+
l.push(String(u));
|
|
50
50
|
continue;
|
|
51
51
|
}
|
|
52
52
|
l.push("");
|
|
@@ -74,18 +74,18 @@ function Qe({
|
|
|
74
74
|
defaultColGroupDef: l,
|
|
75
75
|
columnDefs: h,
|
|
76
76
|
valueFormatters: m,
|
|
77
|
-
onGridReady:
|
|
77
|
+
onGridReady: u,
|
|
78
78
|
onGridPreDestroyed: c,
|
|
79
79
|
onFilterChanged: b,
|
|
80
80
|
onSelectionChanged: C,
|
|
81
81
|
onModelUpdated: M,
|
|
82
|
-
ensureDomOrder:
|
|
83
|
-
autoSizeStrategy:
|
|
82
|
+
ensureDomOrder: I = !0,
|
|
83
|
+
autoSizeStrategy: T,
|
|
84
84
|
...g
|
|
85
85
|
}) {
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const [
|
|
86
|
+
const a = S(null), O = S(null), [P, L] = w(null);
|
|
87
|
+
Ie(P, O, T);
|
|
88
|
+
const [B, N] = w(!1), [J, _] = w(null), [X, V] = w(!1), E = S(null), D = S(null), A = S(null), Q = f(() => [], []), Y = y(() => ({
|
|
89
89
|
numericColumn: {
|
|
90
90
|
cellClass: "ag-right-aligned-cell",
|
|
91
91
|
headerClass: "ag-right-aligned-header",
|
|
@@ -108,14 +108,14 @@ function Qe({
|
|
|
108
108
|
}
|
|
109
109
|
}), []), R = y(() => ({
|
|
110
110
|
openSearch: (e) => {
|
|
111
|
-
if (!
|
|
112
|
-
const t =
|
|
113
|
-
|
|
111
|
+
if (!a.current) return;
|
|
112
|
+
const t = a.current.getGridOption("context") || {};
|
|
113
|
+
a.current.setGridOption("context", { ...t, activeSearchColumnId: e }), a.current.refreshHeader();
|
|
114
114
|
},
|
|
115
115
|
closeSearch: () => {
|
|
116
|
-
if (!
|
|
117
|
-
const e =
|
|
118
|
-
|
|
116
|
+
if (!a.current) return;
|
|
117
|
+
const e = a.current.getGridOption("context") || {};
|
|
118
|
+
a.current.setGridOption("context", { ...e, activeSearchColumnId: null }), a.current.refreshHeader();
|
|
119
119
|
},
|
|
120
120
|
openAdvancedFilter: (e) => {
|
|
121
121
|
_(e || null), N(!0);
|
|
@@ -124,15 +124,15 @@ function Qe({
|
|
|
124
124
|
N(!1), _(null);
|
|
125
125
|
},
|
|
126
126
|
applyAdvancedFilter: (e) => {
|
|
127
|
-
if (!
|
|
127
|
+
if (!a.current) return;
|
|
128
128
|
const t = Re(e);
|
|
129
|
-
|
|
129
|
+
a.current.setFilterModel(t), a.current.onFilterChanged(), a.current.refreshHeader();
|
|
130
130
|
},
|
|
131
131
|
openMenu: (e, t, o = "column") => {
|
|
132
|
-
E.current = e,
|
|
132
|
+
E.current = e, D.current = t, A.current = o, V(!0);
|
|
133
133
|
},
|
|
134
134
|
closeMenu: () => {
|
|
135
|
-
E.current = null,
|
|
135
|
+
E.current = null, D.current = null, A.current = null, V(!1);
|
|
136
136
|
},
|
|
137
137
|
// Getters read from refs - O(1) per header, no memory allocation
|
|
138
138
|
get activeMenuColumnId() {
|
|
@@ -142,17 +142,17 @@ function Qe({
|
|
|
142
142
|
return A.current;
|
|
143
143
|
}
|
|
144
144
|
}), []), Z = f((e) => {
|
|
145
|
-
|
|
145
|
+
a.current = e.api, L(e.api);
|
|
146
146
|
const t = e.api.getGridOption("context") || {};
|
|
147
|
-
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }),
|
|
148
|
-
}, [
|
|
147
|
+
e.api.setGridOption("context", { ...t, activeSearchColumnId: null }), u && u(e);
|
|
148
|
+
}, [u]), ee = f(
|
|
149
149
|
(e) => {
|
|
150
|
-
|
|
150
|
+
a.current = null, L(null), c?.(e);
|
|
151
151
|
},
|
|
152
152
|
[c]
|
|
153
153
|
), te = f(
|
|
154
154
|
(e) => {
|
|
155
|
-
e.api.refreshHeader(), b?.(e);
|
|
155
|
+
e.api.getGridOption("context")?.activeSearchColumnId || e.api.refreshHeader(), b?.(e);
|
|
156
156
|
},
|
|
157
157
|
[b]
|
|
158
158
|
), re = f(
|
|
@@ -167,7 +167,7 @@ function Qe({
|
|
|
167
167
|
[M]
|
|
168
168
|
);
|
|
169
169
|
ge(() => {
|
|
170
|
-
const e =
|
|
170
|
+
const e = O.current;
|
|
171
171
|
if (!e) return;
|
|
172
172
|
const t = (o) => {
|
|
173
173
|
if (o.key !== "Enter" && o.key !== " ") return;
|
|
@@ -227,11 +227,11 @@ function Qe({
|
|
|
227
227
|
const d = o[0]?.field?.split(".").pop(), x = d ? t[d] : void 0;
|
|
228
228
|
return x && typeof x == "object" && "value" in x ? x.value ?? "" : r[0];
|
|
229
229
|
}
|
|
230
|
-
return
|
|
230
|
+
return H + r.join(F);
|
|
231
231
|
}
|
|
232
232
|
const s = Object.entries(t).map(([, r]) => r && typeof r == "object" && "value" in r ? r.value : typeof r != "object" && typeof r < "u" ? r : null).filter((r) => r != null);
|
|
233
233
|
return s.length === 0 ? "" : s.length === 1 ? s[0] : s.join(F);
|
|
234
|
-
}, []),
|
|
234
|
+
}, []), ae = f((e) => {
|
|
235
235
|
if (typeof e.value == "string") {
|
|
236
236
|
const t = e.value.trim();
|
|
237
237
|
if (t.startsWith("{") || t.startsWith("["))
|
|
@@ -242,9 +242,9 @@ function Qe({
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
return e.value;
|
|
245
|
-
}, []),
|
|
245
|
+
}, []), ue = f((e) => {
|
|
246
246
|
const t = e?.data ?? "";
|
|
247
|
-
if (!t.includes(F) && !t.includes(
|
|
247
|
+
if (!t.includes(F) && !t.includes(H)) {
|
|
248
248
|
$(t);
|
|
249
249
|
return;
|
|
250
250
|
}
|
|
@@ -256,7 +256,7 @@ function Qe({
|
|
|
256
256
|
o.push("");
|
|
257
257
|
continue;
|
|
258
258
|
}
|
|
259
|
-
const k = d.split(" ").map((p) => p.startsWith(
|
|
259
|
+
const k = d.split(" ").map((p) => p.startsWith(H) ? { isSplit: !0, slots: p.slice(1).split(F) } : { isSplit: !1, slots: p.split(F) }), W = Math.max(1, ...k.map((p) => p.slots.length));
|
|
260
260
|
if (W === 1) {
|
|
261
261
|
o.push(k.map((p) => p.slots[0] ?? "").join(" "));
|
|
262
262
|
continue;
|
|
@@ -298,7 +298,7 @@ function Qe({
|
|
|
298
298
|
...g.defaultExcelExportParams ?? {}
|
|
299
299
|
}), [G, g.defaultExcelExportParams]);
|
|
300
300
|
return /* @__PURE__ */ fe(Ae.Provider, { value: R, children: [
|
|
301
|
-
/* @__PURE__ */ v("div", { ref:
|
|
301
|
+
/* @__PURE__ */ v("div", { ref: O, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ v(
|
|
302
302
|
xe,
|
|
303
303
|
{
|
|
304
304
|
theme: Se,
|
|
@@ -313,16 +313,16 @@ function Qe({
|
|
|
313
313
|
onModelUpdated: ne,
|
|
314
314
|
components: ie,
|
|
315
315
|
processCellForClipboard: se,
|
|
316
|
-
processCellFromClipboard:
|
|
317
|
-
sendToClipboard:
|
|
318
|
-
ensureDomOrder:
|
|
316
|
+
processCellFromClipboard: ae,
|
|
317
|
+
sendToClipboard: ue,
|
|
318
|
+
ensureDomOrder: I,
|
|
319
319
|
suppressHeaderFocus: !1,
|
|
320
320
|
suppressFocusAfterRefresh: !0,
|
|
321
321
|
suppressGroupRowsSticky: !0,
|
|
322
322
|
hidePaddedHeaderRows: !0,
|
|
323
323
|
suppressServerSideFullWidthLoadingRow: !0,
|
|
324
324
|
columnTypes: Y,
|
|
325
|
-
autoSizeStrategy:
|
|
325
|
+
autoSizeStrategy: T,
|
|
326
326
|
...g,
|
|
327
327
|
defaultCsvExportParams: ce,
|
|
328
328
|
defaultExcelExportParams: de,
|
|
@@ -331,29 +331,29 @@ function Qe({
|
|
|
331
331
|
) }),
|
|
332
332
|
i,
|
|
333
333
|
/* @__PURE__ */ v(
|
|
334
|
-
|
|
334
|
+
Oe,
|
|
335
335
|
{
|
|
336
|
-
isOpen:
|
|
337
|
-
columnId:
|
|
338
|
-
gridApi:
|
|
336
|
+
isOpen: B,
|
|
337
|
+
columnId: J,
|
|
338
|
+
gridApi: P,
|
|
339
339
|
onClose: R.closeAdvancedFilter,
|
|
340
340
|
onApply: R.applyAdvancedFilter
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
343
|
/* @__PURE__ */ v(
|
|
344
|
-
|
|
344
|
+
Pe,
|
|
345
345
|
{
|
|
346
|
-
isOpen:
|
|
346
|
+
isOpen: X,
|
|
347
347
|
columnId: E.current,
|
|
348
|
-
gridApi:
|
|
349
|
-
anchor:
|
|
348
|
+
gridApi: P,
|
|
349
|
+
anchor: D.current,
|
|
350
350
|
variant: A.current,
|
|
351
351
|
onClose: R.closeMenu
|
|
352
352
|
}
|
|
353
353
|
)
|
|
354
354
|
] });
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function Oe({
|
|
357
357
|
isOpen: i,
|
|
358
358
|
columnId: n,
|
|
359
359
|
gridApi: l,
|
|
@@ -361,11 +361,11 @@ function Ie({
|
|
|
361
361
|
onApply: m
|
|
362
362
|
}) {
|
|
363
363
|
if (!i || !n || !l) return null;
|
|
364
|
-
const
|
|
365
|
-
if (!
|
|
366
|
-
const c =
|
|
364
|
+
const u = l.getColumn(n);
|
|
365
|
+
if (!u) return null;
|
|
366
|
+
const c = u.getColDef(), b = c.headerComponentParams, C = Ge(c), M = C.text !== -1 || C.number !== -1 || C.date !== -1, I = C.set !== -1, g = c.filter === "agMultiColumnFilter" && (M || I) ? "multi" : c.filter === "agNumberColumnFilter" ? "number" : c.filter === "agDateColumnFilter" ? "date" : c.filter === "agSetColumnFilter" || b?.selectOptions ? "select" : "text", a = ke(l.getFilterModel());
|
|
367
367
|
return /* @__PURE__ */ v(he, { fallback: null, children: /* @__PURE__ */ v(
|
|
368
|
-
|
|
368
|
+
Te,
|
|
369
369
|
{
|
|
370
370
|
isOpen: i,
|
|
371
371
|
onClose: h,
|
|
@@ -375,18 +375,18 @@ function Ie({
|
|
|
375
375
|
columnType: g,
|
|
376
376
|
selectOptions: b?.selectOptions,
|
|
377
377
|
isMultiSelect: b?.isMultiSelect,
|
|
378
|
-
initialModel:
|
|
378
|
+
initialModel: a,
|
|
379
379
|
api: l
|
|
380
380
|
}
|
|
381
381
|
) });
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function Pe({
|
|
384
384
|
isOpen: i,
|
|
385
385
|
columnId: n,
|
|
386
386
|
gridApi: l,
|
|
387
387
|
anchor: h,
|
|
388
388
|
variant: m,
|
|
389
|
-
onClose:
|
|
389
|
+
onClose: u
|
|
390
390
|
}) {
|
|
391
391
|
return !i || !n || !l ? null : /* @__PURE__ */ v(
|
|
392
392
|
je,
|
|
@@ -396,7 +396,7 @@ function De({
|
|
|
396
396
|
gridApi: l,
|
|
397
397
|
anchor: h,
|
|
398
398
|
variant: m || "column",
|
|
399
|
-
onClose:
|
|
399
|
+
onClose: u
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
@@ -4,6 +4,7 @@ import { getDefaultClassNames as Ke, DayPicker as We } from "react-day-picker";
|
|
|
4
4
|
import { ChevronRight as oe } from "impact-nova-icons";
|
|
5
5
|
import { cn as m } from "../../lib/utils.js";
|
|
6
6
|
import { Button as O } from "./button.js";
|
|
7
|
+
import "./button-variants.js";
|
|
7
8
|
import me from "./select/select.js";
|
|
8
9
|
import { FISCAL_PATTERNS as Ge, resolveWeekSelection as qe } from "../../lib/fiscal-calendar.js";
|
|
9
10
|
import { getIntlLocale as Je, getDateFnsLocale as Qe } from "../../i18n/getDateFnsLocale.js";
|
|
@@ -32,7 +33,7 @@ function Ve({ children: A }) {
|
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function ft({
|
|
36
37
|
className: A,
|
|
37
38
|
classNames: B,
|
|
38
39
|
showOutsideDays: p = !1,
|
|
@@ -892,6 +893,6 @@ function et({
|
|
|
892
893
|
);
|
|
893
894
|
}
|
|
894
895
|
export {
|
|
895
|
-
|
|
896
|
+
ft as Calendar,
|
|
896
897
|
et as CalendarDayButton
|
|
897
898
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as P, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
3
|
import { Cross as Z, CalendarMonth as _ } from "impact-nova-icons";
|
|
4
|
-
import { format as h, isValid as I, parse as
|
|
4
|
+
import { format as h, isValid as I, parse as N } 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
7
|
import { Popover as ne, PopoverAnchor as re, PopoverContent as oe } from "../popover.js";
|
|
@@ -9,78 +9,78 @@ import { Calendar as ce } from "../calendar.js";
|
|
|
9
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
|
-
const ae =
|
|
12
|
+
const ae = o.forwardRef(
|
|
13
13
|
({
|
|
14
14
|
value: t,
|
|
15
|
-
onChange:
|
|
15
|
+
onChange: u,
|
|
16
16
|
format: n = "MM/dd/yyyy",
|
|
17
17
|
placeholder: j,
|
|
18
18
|
minDate: L,
|
|
19
19
|
maxDate: K,
|
|
20
20
|
startMonth: z,
|
|
21
21
|
endMonth: B,
|
|
22
|
-
showFooter:
|
|
23
|
-
weekStartsOn:
|
|
24
|
-
disabled:
|
|
22
|
+
showFooter: d = !0,
|
|
23
|
+
weekStartsOn: R,
|
|
24
|
+
disabled: a,
|
|
25
25
|
className: O,
|
|
26
26
|
...H
|
|
27
27
|
}, q) => {
|
|
28
|
-
const { locale:
|
|
29
|
-
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, [p]),
|
|
34
|
-
|
|
35
|
-
}, [t, n,
|
|
36
|
-
|
|
37
|
-
}, [
|
|
28
|
+
const { locale: b, t: m } = le(), i = o.useMemo(() => ie(b), [b]), G = j ?? m("datePicker.selectDate"), g = o.useRef(null), D = o.useRef(null);
|
|
29
|
+
o.useImperativeHandle(q, () => g.current);
|
|
30
|
+
const [c, l] = o.useState(!1), k = o.useRef(!1), [v, s] = o.useState(t), [p, f] = o.useState(t ? h(t, n, { locale: i }) : ""), [J, w] = o.useState(t || /* @__PURE__ */ new Date());
|
|
31
|
+
o.useEffect(() => {
|
|
32
|
+
g.current && D.current !== null && (g.current.setSelectionRange(D.current, D.current), D.current = null);
|
|
33
|
+
}, [p]), o.useEffect(() => {
|
|
34
|
+
c || (f(t ? h(t, n, { locale: i }) : ""), s(t));
|
|
35
|
+
}, [t, n, c, i]), o.useEffect(() => {
|
|
36
|
+
c && (s(t), w(t || /* @__PURE__ */ new Date()));
|
|
37
|
+
}, [c, t]);
|
|
38
38
|
const Q = (e) => {
|
|
39
|
-
|
|
39
|
+
s(e), e && f(h(e, n, { locale: i })), d || (u?.(e), l(!1));
|
|
40
40
|
}, U = (e) => {
|
|
41
|
-
|
|
41
|
+
u?.(e !== void 0 ? e : v), l(!1);
|
|
42
42
|
}, V = () => {
|
|
43
|
-
|
|
43
|
+
s(t), f(t ? h(t, n, { locale: i }) : ""), l(!1);
|
|
44
44
|
}, A = () => {
|
|
45
|
-
|
|
45
|
+
s(void 0), f(""), u?.(void 0), d || l(!1);
|
|
46
46
|
}, W = (e) => {
|
|
47
|
-
const
|
|
47
|
+
const y = e.target.value, C = ee(y, n, p);
|
|
48
48
|
if (f(C), C === "") {
|
|
49
|
-
|
|
49
|
+
s(void 0), d || u?.(void 0);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
I(
|
|
52
|
+
const x = N(C, n, /* @__PURE__ */ new Date(), { locale: i });
|
|
53
|
+
I(x) && C.length === n.length && (s(x), w(x), d || u?.(x));
|
|
54
54
|
}, X = () => {
|
|
55
|
-
if (
|
|
56
|
-
const e = F(p, n),
|
|
57
|
-
!I(
|
|
58
|
-
}, M = (t ? h(t, n, { locale: i }) : "") !== p, Y = p.length === n.length && !I(
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
|
|
55
|
+
if (c) return;
|
|
56
|
+
const e = F(p, n), y = N(e, n, /* @__PURE__ */ new Date(), { locale: i });
|
|
57
|
+
!I(y) || e.length !== n.length ? (f(t ? h(t, n, { locale: i }) : ""), s(t)) : (f(e), d || u?.(y));
|
|
58
|
+
}, M = (t ? h(t, n, { locale: i }) : "") !== p, Y = p.length === n.length && !I(N(p, n, /* @__PURE__ */ new Date(), { locale: i }));
|
|
59
|
+
return /* @__PURE__ */ P(ne, { open: a ? !1 : c, onOpenChange: (e) => {
|
|
60
|
+
a || l(e);
|
|
61
61
|
}, children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ r(re, { asChild: !0, children: /* @__PURE__ */ r("div", { "data-component": "date-picker", "data-state": c ? "open" : "closed", "data-pending": M || void 0, children: /* @__PURE__ */ r(
|
|
63
63
|
te,
|
|
64
64
|
{
|
|
65
|
-
ref:
|
|
65
|
+
ref: g,
|
|
66
66
|
value: p,
|
|
67
67
|
onChange: W,
|
|
68
68
|
onBlur: X,
|
|
69
|
-
onClick: (
|
|
69
|
+
onClick: () => !a && l(!0),
|
|
70
70
|
onKeyDown: (e) => {
|
|
71
|
-
(e.key === "Enter" || e.key === "ArrowDown") && !
|
|
71
|
+
(e.key === "Enter" || e.key === "ArrowDown") && !c && !a && (e.preventDefault(), k.current = !0, l(!0)), e.key === "Escape" && c && (e.preventDefault(), V());
|
|
72
72
|
},
|
|
73
|
-
placeholder:
|
|
74
|
-
disabled:
|
|
73
|
+
placeholder: c ? n : G,
|
|
74
|
+
disabled: a,
|
|
75
75
|
"data-form-control": "input",
|
|
76
76
|
className: $(
|
|
77
77
|
"cursor-pointer",
|
|
78
78
|
Y ? "text-destructive" : M ? "text-content-muted" : "",
|
|
79
79
|
O
|
|
80
80
|
),
|
|
81
|
-
suffix: /* @__PURE__ */
|
|
82
|
-
t && !
|
|
83
|
-
/* @__PURE__ */
|
|
81
|
+
suffix: /* @__PURE__ */ P("div", { className: "flex items-center gap-1", children: [
|
|
82
|
+
t && !a && /* @__PURE__ */ P(S, { children: [
|
|
83
|
+
/* @__PURE__ */ r(E, { asChild: !0, children: /* @__PURE__ */ r(
|
|
84
84
|
"button",
|
|
85
85
|
{
|
|
86
86
|
type: "button",
|
|
@@ -90,24 +90,24 @@ const ae = c.forwardRef(
|
|
|
90
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
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ r(Z, { className: "size-3 hover:text-content" })
|
|
94
94
|
}
|
|
95
95
|
) }),
|
|
96
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ r(T, { variant: "tertiary", side: "top", children: m("calendar.clear") })
|
|
97
97
|
] }),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
e.stopPropagation(),
|
|
98
|
+
/* @__PURE__ */ P(S, { children: [
|
|
99
|
+
/* @__PURE__ */ r(E, { asChild: !0, children: /* @__PURE__ */ r("button", { type: "button", tabIndex: 0, "aria-label": m("datePicker.selectDate"), onClick: (e) => {
|
|
100
|
+
e.stopPropagation(), a || l(!c);
|
|
101
101
|
}, onKeyDown: (e) => {
|
|
102
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(),
|
|
103
|
-
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
102
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), a || (k.current = !0, l(!c)));
|
|
103
|
+
}, className: "inline-flex items-center justify-center bg-transparent border-none p-0 cursor-pointer", children: /* @__PURE__ */ r(_, { className: "h-4 w-4 text-secondary-foreground" }) }) }),
|
|
104
|
+
/* @__PURE__ */ r(T, { variant: "tertiary", side: "top", children: m("datePicker.selectDate") })
|
|
105
105
|
] })
|
|
106
106
|
] }),
|
|
107
107
|
...H
|
|
108
108
|
}
|
|
109
109
|
) }) }),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ r(
|
|
111
111
|
oe,
|
|
112
112
|
{
|
|
113
113
|
className: "w-auto p-0",
|
|
@@ -115,7 +115,7 @@ const ae = c.forwardRef(
|
|
|
115
115
|
onOpenAutoFocus: (e) => {
|
|
116
116
|
k.current || e.preventDefault(), k.current = !1;
|
|
117
117
|
},
|
|
118
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ r(
|
|
119
119
|
ce,
|
|
120
120
|
{
|
|
121
121
|
mode: "single",
|
|
@@ -126,12 +126,12 @@ const ae = c.forwardRef(
|
|
|
126
126
|
disabled: { before: L, after: K },
|
|
127
127
|
startMonth: z,
|
|
128
128
|
endMonth: B,
|
|
129
|
-
showFooter:
|
|
129
|
+
showFooter: d,
|
|
130
130
|
onApply: U,
|
|
131
131
|
onCancel: V,
|
|
132
132
|
onClear: A,
|
|
133
133
|
captionLayout: "dropdown",
|
|
134
|
-
...
|
|
134
|
+
...R !== void 0 ? { weekStartsOn: R } : {}
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
}
|