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.
- package/dist/components/data/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/flows/filter-panel/filter-panel.js +36 -35
- package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -1,116 +1,122 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import * as
|
|
4
|
-
import { createComponent as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useFieldChrome as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (l
|
|
1
|
+
import { jsx as a, jsxs as we } from "react/jsx-runtime";
|
|
2
|
+
import { useId as J, useMemo as _, useState as C, useCallback as c, useRef as E, useEffect as ye } from "react";
|
|
3
|
+
import * as O from "@radix-ui/react-popover";
|
|
4
|
+
import { createComponent as Ce } from "../../../lib/primitives/create-component.js";
|
|
5
|
+
import { cn as P } from "../../../lib/utils.js";
|
|
6
|
+
import { useFieldChrome as Ie } from "../../../lib/primitives/use-field-chrome.js";
|
|
7
|
+
import { useOverlayNestedLayerDismiss as De, useOverlayPortalContainer as Le } from "../../../lib/overlay/overlay-portal-context.js";
|
|
8
|
+
import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as ke } from "../../../lib/overlay/overlay-host.constants.js";
|
|
9
|
+
import { comboboxSizeVariants as Ae } from "./combobox.variants.js";
|
|
10
|
+
function Se(l) {
|
|
11
|
+
if (l.options) return l.options;
|
|
12
|
+
const { min: u, max: d, step: f } = l;
|
|
13
|
+
if (u == null || d == null || f == null || f <= 0 || u > d) return [];
|
|
12
14
|
const I = [];
|
|
13
|
-
for (let b =
|
|
14
|
-
const
|
|
15
|
-
I.push(String(
|
|
15
|
+
for (let b = u; b <= d; b += f) {
|
|
16
|
+
const D = Math.round(b * 1e10) / 1e10;
|
|
17
|
+
I.push(String(D));
|
|
16
18
|
}
|
|
17
19
|
return I;
|
|
18
20
|
}
|
|
19
|
-
function
|
|
20
|
-
if (!
|
|
21
|
-
const d =
|
|
22
|
-
return
|
|
21
|
+
function Ne(l, u) {
|
|
22
|
+
if (!u) return l;
|
|
23
|
+
const d = u.toLowerCase();
|
|
24
|
+
return l.filter((f) => f.toLowerCase().includes(d));
|
|
23
25
|
}
|
|
24
|
-
const
|
|
26
|
+
const je = Ce(
|
|
25
27
|
"Combobox",
|
|
26
28
|
({
|
|
27
|
-
options:
|
|
28
|
-
min:
|
|
29
|
+
options: l,
|
|
30
|
+
min: u,
|
|
29
31
|
max: d,
|
|
30
32
|
step: f,
|
|
31
33
|
defaultValue: I = "",
|
|
32
34
|
value: b,
|
|
33
|
-
onChange:
|
|
35
|
+
onChange: D,
|
|
34
36
|
onBlur: F,
|
|
35
|
-
placeholder:
|
|
36
|
-
label:
|
|
37
|
-
helperText:
|
|
38
|
-
helperTextPosition:
|
|
39
|
-
error:
|
|
37
|
+
placeholder: $,
|
|
38
|
+
label: L,
|
|
39
|
+
helperText: Q,
|
|
40
|
+
helperTextPosition: X = "absolute",
|
|
41
|
+
error: Z,
|
|
40
42
|
isError: ee,
|
|
41
43
|
disabled: m,
|
|
42
|
-
isNumeric:
|
|
44
|
+
isNumeric: H,
|
|
43
45
|
size: te = "default",
|
|
44
46
|
className: oe,
|
|
45
47
|
emptyMessage: ne = "No options found",
|
|
46
|
-
allowFreeText:
|
|
47
|
-
required:
|
|
48
|
+
allowFreeText: k = !1,
|
|
49
|
+
required: z,
|
|
48
50
|
labelOrientation: re
|
|
49
|
-
},
|
|
50
|
-
const se =
|
|
51
|
-
label:
|
|
52
|
-
helperText:
|
|
53
|
-
helperTextPosition:
|
|
51
|
+
}, v) => {
|
|
52
|
+
const se = J(), A = J(), R = typeof L == "string" ? L : $ ?? "Options", T = Ie({
|
|
53
|
+
label: L,
|
|
54
|
+
helperText: Q,
|
|
55
|
+
helperTextPosition: X,
|
|
54
56
|
labelOrientation: re,
|
|
55
|
-
error:
|
|
56
|
-
required:
|
|
57
|
+
error: Z ?? ee,
|
|
58
|
+
required: z,
|
|
57
59
|
disabled: m,
|
|
58
60
|
id: se,
|
|
59
61
|
className: oe
|
|
60
|
-
}),
|
|
61
|
-
() =>
|
|
62
|
-
[
|
|
63
|
-
),
|
|
62
|
+
}), B = _(
|
|
63
|
+
() => Se({ options: l, min: u, max: d, step: f }),
|
|
64
|
+
[l, u, d, f]
|
|
65
|
+
), V = b !== void 0, [ie, ae] = C(I), S = V ? b : ie, [ce, K] = C(""), [o, x] = C(!1), le = c((e) => {
|
|
66
|
+
x(e);
|
|
67
|
+
}, []);
|
|
68
|
+
De(o && !m, le);
|
|
69
|
+
const ue = Le(), n = o ? ce : S, [M, p] = C(-1), U = E(-1), [de, w] = C("keyboard"), W = E(null), N = E(null), fe = c(
|
|
64
70
|
(e) => {
|
|
65
|
-
|
|
71
|
+
W.current = e, typeof v == "function" ? v(e) : v && (v.current = e);
|
|
66
72
|
},
|
|
67
|
-
[
|
|
68
|
-
), r =
|
|
69
|
-
() =>
|
|
70
|
-
[
|
|
71
|
-
),
|
|
73
|
+
[v]
|
|
74
|
+
), r = _(
|
|
75
|
+
() => Ne(B, n),
|
|
76
|
+
[B, n]
|
|
77
|
+
), q = E(r), me = _(() => {
|
|
72
78
|
if (!o || !n) return -1;
|
|
73
79
|
const e = r.findIndex(
|
|
74
80
|
(t) => t.toLowerCase() === n.toLowerCase()
|
|
75
81
|
);
|
|
76
82
|
return e >= 0 ? e : -1;
|
|
77
|
-
}, [o, n, r]), h =
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
}, [o, n, r]), h = M >= 0 ? M : me, G = M >= 0 ? de : "mouse", pe = o && h >= 0 ? `${A}-option-${h}` : void 0;
|
|
84
|
+
ye(() => {
|
|
85
|
+
U.current = h, q.current = r, o && h >= 0 && N.current && N.current.querySelectorAll("[data-combobox-item]")[h]?.scrollIntoView({ block: "nearest" });
|
|
80
86
|
}, [h, o, r]);
|
|
81
|
-
const i =
|
|
87
|
+
const i = c(
|
|
82
88
|
(e) => {
|
|
83
|
-
|
|
89
|
+
V || ae(e), D?.(e), x(!1), p(-1);
|
|
84
90
|
},
|
|
85
|
-
[
|
|
86
|
-
), y =
|
|
87
|
-
|
|
88
|
-
}, []),
|
|
91
|
+
[V, D]
|
|
92
|
+
), y = c(() => {
|
|
93
|
+
x(!1), p(-1);
|
|
94
|
+
}, []), he = c(
|
|
89
95
|
(e) => {
|
|
90
96
|
const t = e.target.value;
|
|
91
|
-
|
|
97
|
+
K(t), p(-1), w("mouse"), o || x(!0);
|
|
92
98
|
},
|
|
93
99
|
[o]
|
|
94
|
-
),
|
|
95
|
-
m || (
|
|
96
|
-
}, [m, S]),
|
|
100
|
+
), ge = c(() => {
|
|
101
|
+
m || (K(S), x(!0));
|
|
102
|
+
}, [m, S]), be = c(
|
|
97
103
|
(e) => {
|
|
98
104
|
const t = e.relatedTarget;
|
|
99
|
-
if (!
|
|
105
|
+
if (!N.current?.contains(t)) {
|
|
100
106
|
if (o) {
|
|
101
107
|
const s = r.find(
|
|
102
108
|
(g) => g.toLowerCase() === n.toLowerCase()
|
|
103
109
|
);
|
|
104
|
-
s ? i(s) : r.length === 1 ? i(r[0]) :
|
|
110
|
+
s ? i(s) : r.length === 1 ? i(r[0]) : k && n ? i(n) : y();
|
|
105
111
|
}
|
|
106
112
|
F?.(e);
|
|
107
113
|
}
|
|
108
114
|
},
|
|
109
|
-
[o, r, n, i, y,
|
|
110
|
-
),
|
|
115
|
+
[o, r, n, i, y, k, F]
|
|
116
|
+
), xe = c(
|
|
111
117
|
(e) => {
|
|
112
118
|
if (!o) {
|
|
113
|
-
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(),
|
|
119
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), x(!0));
|
|
114
120
|
return;
|
|
115
121
|
}
|
|
116
122
|
if (e.key === "Escape") {
|
|
@@ -131,25 +137,25 @@ const He = we(
|
|
|
131
137
|
}
|
|
132
138
|
if (e.key === "Enter" || e.key === "Tab") {
|
|
133
139
|
e.preventDefault();
|
|
134
|
-
const t =
|
|
140
|
+
const t = U.current, s = q.current;
|
|
135
141
|
if (t >= 0 && t < s.length)
|
|
136
142
|
i(s[t]);
|
|
137
143
|
else {
|
|
138
144
|
const g = s.find(
|
|
139
145
|
(j) => j.toLowerCase() === n.toLowerCase()
|
|
140
146
|
);
|
|
141
|
-
g ? i(g) : s.length === 1 ? i(s[0]) :
|
|
147
|
+
g ? i(g) : s.length === 1 ? i(s[0]) : k && n ? i(n) : y();
|
|
142
148
|
}
|
|
143
149
|
return;
|
|
144
150
|
}
|
|
145
151
|
},
|
|
146
|
-
[o, r, n, i, y,
|
|
147
|
-
),
|
|
152
|
+
[o, r, n, i, y, k]
|
|
153
|
+
), Y = c(
|
|
148
154
|
(e) => {
|
|
149
|
-
i(e), setTimeout(() =>
|
|
155
|
+
i(e), setTimeout(() => W.current?.focus(), 0);
|
|
150
156
|
},
|
|
151
157
|
[i]
|
|
152
|
-
),
|
|
158
|
+
), ve = c(
|
|
153
159
|
(e) => {
|
|
154
160
|
const t = e.target.closest(
|
|
155
161
|
"[data-combobox-item]"
|
|
@@ -158,48 +164,48 @@ const He = we(
|
|
|
158
164
|
if (e.button !== 0) return;
|
|
159
165
|
e.preventDefault();
|
|
160
166
|
const s = t.getAttribute("data-combobox-value");
|
|
161
|
-
s != null &&
|
|
167
|
+
s != null && Y(s);
|
|
162
168
|
return;
|
|
163
169
|
}
|
|
164
170
|
e.preventDefault();
|
|
165
171
|
},
|
|
166
|
-
[
|
|
172
|
+
[Y]
|
|
167
173
|
);
|
|
168
|
-
return /* @__PURE__ */ a("div", { "data-component": "combobox", "data-numeric":
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */ a(
|
|
174
|
+
return /* @__PURE__ */ a("div", { "data-component": "combobox", "data-numeric": H || void 0, children: T.wrapControl(
|
|
175
|
+
/* @__PURE__ */ we(O.Root, { open: o && !m, modal: !1, children: [
|
|
176
|
+
/* @__PURE__ */ a(O.Anchor, { asChild: !0, children: /* @__PURE__ */ a(
|
|
171
177
|
"div",
|
|
172
178
|
{
|
|
173
179
|
"data-component": "combobox-input-border",
|
|
174
180
|
tabIndex: -1,
|
|
175
|
-
className:
|
|
181
|
+
className: P(
|
|
176
182
|
"flex w-full items-center gap-1 rounded-md border bg-transparent px-3 text-sm transition-colors outline-none ring-0 focus:outline-none focus:ring-0",
|
|
177
183
|
"focus-within:outline-none focus-within:ring-0 focus-within:border-brand hover:border-brand",
|
|
178
|
-
|
|
184
|
+
T.hasError ? "border-destructive hover:border-destructive" : "border-field",
|
|
179
185
|
m && "pointer-events-none opacity-100 bg-disabled-surface border-stroke text-disabled-foreground hover:border-stroke",
|
|
180
|
-
|
|
186
|
+
Ae({ size: te }),
|
|
181
187
|
"bg-canvas"
|
|
182
188
|
),
|
|
183
189
|
children: /* @__PURE__ */ a(
|
|
184
190
|
"input",
|
|
185
191
|
{
|
|
186
|
-
ref:
|
|
192
|
+
ref: fe,
|
|
187
193
|
type: "text",
|
|
188
194
|
value: n,
|
|
189
|
-
onChange:
|
|
190
|
-
onFocus:
|
|
191
|
-
onBlur:
|
|
192
|
-
onKeyDown:
|
|
193
|
-
placeholder:
|
|
195
|
+
onChange: he,
|
|
196
|
+
onFocus: ge,
|
|
197
|
+
onBlur: be,
|
|
198
|
+
onKeyDown: xe,
|
|
199
|
+
placeholder: $,
|
|
194
200
|
disabled: !!m,
|
|
195
|
-
className:
|
|
201
|
+
className: P(
|
|
196
202
|
"flex h-full w-full bg-transparent p-0 text-sm font-medium",
|
|
197
203
|
"outline-none ring-0 shadow-none border-none",
|
|
198
204
|
"focus:outline-none focus:ring-0 focus:shadow-none focus:border-none",
|
|
199
205
|
"focus-visible:outline-none focus-visible:ring-0 focus-visible:shadow-none focus-visible:border-none",
|
|
200
206
|
"placeholder:font-medium placeholder:text-content-empty",
|
|
201
207
|
m && "opacity-100 text-disabled-foreground placeholder:text-disabled-foreground cursor-not-allowed",
|
|
202
|
-
|
|
208
|
+
H && "text-right"
|
|
203
209
|
),
|
|
204
210
|
style: { boxShadow: "none", outline: "none" },
|
|
205
211
|
autoComplete: "off",
|
|
@@ -208,16 +214,16 @@ const He = we(
|
|
|
208
214
|
"aria-autocomplete": "list",
|
|
209
215
|
"aria-haspopup": "listbox",
|
|
210
216
|
"aria-controls": o ? A : void 0,
|
|
211
|
-
"aria-activedescendant":
|
|
212
|
-
"aria-required":
|
|
213
|
-
"aria-label":
|
|
214
|
-
...
|
|
217
|
+
"aria-activedescendant": pe,
|
|
218
|
+
"aria-required": z || void 0,
|
|
219
|
+
"aria-label": L ? void 0 : R,
|
|
220
|
+
...T.controlAria
|
|
215
221
|
}
|
|
216
222
|
)
|
|
217
223
|
}
|
|
218
224
|
) }),
|
|
219
|
-
/* @__PURE__ */ a(
|
|
220
|
-
|
|
225
|
+
/* @__PURE__ */ a(O.Portal, { container: ue, children: /* @__PURE__ */ a(
|
|
226
|
+
O.Content,
|
|
221
227
|
{
|
|
222
228
|
align: "start",
|
|
223
229
|
side: "bottom",
|
|
@@ -225,25 +231,29 @@ const He = we(
|
|
|
225
231
|
avoidCollisions: !0,
|
|
226
232
|
collisionPadding: 8,
|
|
227
233
|
"aria-label": R,
|
|
234
|
+
"data-component": "combobox-content",
|
|
228
235
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
229
236
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
230
237
|
onInteractOutside: () => {
|
|
231
238
|
},
|
|
232
239
|
onWheel: (e) => e.stopPropagation(),
|
|
233
|
-
className:
|
|
240
|
+
className: P(
|
|
241
|
+
"z-[9999] overflow-hidden rounded-[12px] bg-canvas text-base shadow-elevation-select focus:outline-none sm:text-sm flex flex-col border-none w-[var(--radix-popover-trigger-width)]",
|
|
242
|
+
ke
|
|
243
|
+
),
|
|
234
244
|
style: {
|
|
235
245
|
maxHeight: "var(--radix-popover-content-available-height)"
|
|
236
246
|
},
|
|
237
247
|
children: /* @__PURE__ */ a(
|
|
238
248
|
"div",
|
|
239
249
|
{
|
|
240
|
-
ref:
|
|
250
|
+
ref: N,
|
|
241
251
|
id: A,
|
|
242
252
|
className: "flex-1 overflow-auto py-1 px-[6px]",
|
|
243
253
|
style: { maxHeight: 240, overscrollBehavior: "contain" },
|
|
244
254
|
role: "listbox",
|
|
245
255
|
"aria-label": R,
|
|
246
|
-
onPointerDown:
|
|
256
|
+
onPointerDown: ve,
|
|
247
257
|
onWheel: (e) => e.stopPropagation(),
|
|
248
258
|
onMouseLeave: () => {
|
|
249
259
|
w("mouse"), p(-1);
|
|
@@ -258,10 +268,10 @@ const He = we(
|
|
|
258
268
|
id: j,
|
|
259
269
|
role: "option",
|
|
260
270
|
"aria-selected": g,
|
|
261
|
-
className:
|
|
271
|
+
className: P(
|
|
262
272
|
"cursor-default select-none py-[6px] px-3 flex items-center transition-colors rounded-md",
|
|
263
|
-
|
|
264
|
-
s &&
|
|
273
|
+
H ? "justify-end text-right" : "justify-between",
|
|
274
|
+
s && G === "keyboard" ? "ring-2 ring-inset ring-primary bg-accent text-content" : s && G === "mouse" ? "bg-canvas-muted text-content" : g ? "bg-accent text-content" : "text-content hover:bg-canvas-muted cursor-pointer"
|
|
265
275
|
),
|
|
266
276
|
onMouseEnter: () => {
|
|
267
277
|
w("mouse"), p(t);
|
|
@@ -279,5 +289,5 @@ const He = we(
|
|
|
279
289
|
}
|
|
280
290
|
);
|
|
281
291
|
export {
|
|
282
|
-
|
|
292
|
+
je as Combobox
|
|
283
293
|
};
|
|
@@ -27,6 +27,15 @@ export declare function createRangePickerOpenChangeHandler(options: {
|
|
|
27
27
|
}): (newOpen: boolean) => void;
|
|
28
28
|
/** True when the outside-dismiss event originated on the picker field chrome (not a real outside click). */
|
|
29
29
|
export declare function isEventOnPickerSurface(event: Event, surfaceRef: RefObject<HTMLElement | null>): boolean;
|
|
30
|
+
export type PickerSurfaceField = "start" | "end";
|
|
31
|
+
export interface PickerSurfacePointerDownOptions {
|
|
32
|
+
disabled?: boolean | null;
|
|
33
|
+
event: React.PointerEvent<HTMLElement>;
|
|
34
|
+
onOpen: () => void;
|
|
35
|
+
focusField?: (field: PickerSurfaceField) => void;
|
|
36
|
+
}
|
|
37
|
+
/** Opens the picker when clicking dead zones on the field shell (padding, gaps, icon gutter). */
|
|
38
|
+
export declare function handlePickerSurfacePointerDown({ disabled, event, onOpen, focusField, }: PickerSurfacePointerDownOptions): void;
|
|
30
39
|
/** Block Radix outside-dismiss when the calendar footer requires explicit Apply/Cancel. */
|
|
31
40
|
export declare function preventOutsideDismissWhenFooter(showFooter: boolean, dismissActionsRef?: RefObject<{
|
|
32
41
|
onDismiss: () => void;
|
|
@@ -2,7 +2,7 @@ import { parse as h, isValid as D } from "date-fns";
|
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import { resolveRangeFooterFlashTarget as v } from "../../data-display/calendar/calendar-footer-emphasis.js";
|
|
4
4
|
import { padValidDateString as y, maskDate as k } from "../../../lib/utils.js";
|
|
5
|
-
function
|
|
5
|
+
function T(e, t, n) {
|
|
6
6
|
return k(e, t, n);
|
|
7
7
|
}
|
|
8
8
|
function f(e, t, n) {
|
|
@@ -14,7 +14,7 @@ function f(e, t, n) {
|
|
|
14
14
|
isValid: a
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function C(e, t, n) {
|
|
18
18
|
return !e || e.length !== t.length ? !1 : !f(e, t, n).isValid;
|
|
19
19
|
}
|
|
20
20
|
function m(e, t) {
|
|
@@ -42,6 +42,18 @@ function O(e, t) {
|
|
|
42
42
|
const n = e.target;
|
|
43
43
|
return n instanceof Node ? !!t.current?.contains(n) : !1;
|
|
44
44
|
}
|
|
45
|
+
function V({
|
|
46
|
+
disabled: e,
|
|
47
|
+
event: t,
|
|
48
|
+
onOpen: n,
|
|
49
|
+
focusField: r
|
|
50
|
+
}) {
|
|
51
|
+
if (e) return;
|
|
52
|
+
const s = t.target;
|
|
53
|
+
if (!(s instanceof HTMLElement) || s.closest("button") || (n(), !r)) return;
|
|
54
|
+
const i = s.closest("[data-field]")?.getAttribute("data-field");
|
|
55
|
+
r(i === "end" ? "end" : "start");
|
|
56
|
+
}
|
|
45
57
|
function F(e, t, n, r) {
|
|
46
58
|
return e ? {
|
|
47
59
|
onInteractOutside: (i) => {
|
|
@@ -62,7 +74,7 @@ function F(e, t, n, r) {
|
|
|
62
74
|
} : void 0
|
|
63
75
|
} : {};
|
|
64
76
|
}
|
|
65
|
-
function
|
|
77
|
+
function b(e, t, n) {
|
|
66
78
|
const r = e == null, s = t == null;
|
|
67
79
|
return r && s || !r && !s && n(e, t) ? "dismiss" : r ? "cancel" : "apply";
|
|
68
80
|
}
|
|
@@ -88,7 +100,7 @@ function q() {
|
|
|
88
100
|
resolveFlash: () => "cancel"
|
|
89
101
|
});
|
|
90
102
|
}
|
|
91
|
-
function
|
|
103
|
+
function M(e, t, n, r) {
|
|
92
104
|
const [s, a] = d.useState({ key: 0, target: "cancel" }), i = d.useRef(t);
|
|
93
105
|
d.useLayoutEffect(() => {
|
|
94
106
|
i.current !== t && (i.current = t, a({ key: 0, target: "cancel" }));
|
|
@@ -111,12 +123,12 @@ function b(e, t, n, r) {
|
|
|
111
123
|
popoverHandlers: o
|
|
112
124
|
};
|
|
113
125
|
}
|
|
114
|
-
function
|
|
126
|
+
function N(e, t, n) {
|
|
115
127
|
queueMicrotask(() => {
|
|
116
128
|
m(e, t) || n();
|
|
117
129
|
});
|
|
118
130
|
}
|
|
119
|
-
function
|
|
131
|
+
function P(e, t, n, r) {
|
|
120
132
|
if (!e)
|
|
121
133
|
return { display: "", parsed: void 0, resetToCommitted: !1 };
|
|
122
134
|
const s = f(e, t, r);
|
|
@@ -127,7 +139,7 @@ function R(e, t, n, r) {
|
|
|
127
139
|
} : e.length < t.length ? { display: e, parsed: void 0, resetToCommitted: !1 } : { display: n, parsed: void 0, resetToCommitted: !0 };
|
|
128
140
|
}
|
|
129
141
|
function X(e, t, n, r) {
|
|
130
|
-
const s =
|
|
142
|
+
const s = P(e, t, n, r);
|
|
131
143
|
return {
|
|
132
144
|
...s,
|
|
133
145
|
isPartial: !!e && e.length < t.length && !s.resetToCommitted
|
|
@@ -137,13 +149,13 @@ function x(e, t, n) {
|
|
|
137
149
|
const r = f(e, t, n);
|
|
138
150
|
return r.isValid && r.parsed ? { parsed: r.parsed, shouldOpenPopover: !1 } : { parsed: void 0, shouldOpenPopover: !0 };
|
|
139
151
|
}
|
|
140
|
-
function
|
|
152
|
+
function H(e, t, n) {
|
|
141
153
|
return e === void 0 || t === void 0 ? { from: e, to: t, swapped: !1 } : n(e, t) <= 0 ? { from: e, to: t, swapped: !1 } : { from: t, to: e, swapped: !0 };
|
|
142
154
|
}
|
|
143
|
-
function
|
|
155
|
+
function K(e, t) {
|
|
144
156
|
return e.year * 12 + e.month - (t.year * 12 + t.month);
|
|
145
157
|
}
|
|
146
|
-
function
|
|
158
|
+
function L(e, t) {
|
|
147
159
|
return e.getTime() - t.getTime();
|
|
148
160
|
}
|
|
149
161
|
function z(e) {
|
|
@@ -161,23 +173,24 @@ function z(e) {
|
|
|
161
173
|
));
|
|
162
174
|
}
|
|
163
175
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
176
|
+
L as compareDates,
|
|
177
|
+
K as compareMonthSelection,
|
|
166
178
|
S as createRangePickerOpenChangeHandler,
|
|
167
|
-
|
|
179
|
+
N as deferRangeInputBlur,
|
|
168
180
|
z as flashRangeReorder,
|
|
169
|
-
|
|
181
|
+
V as handlePickerSurfacePointerDown,
|
|
182
|
+
C as isDateInputInvalid,
|
|
170
183
|
O as isEventOnPickerSurface,
|
|
171
184
|
m as isFocusInsidePicker,
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
T as maskDateInput,
|
|
186
|
+
H as normalizeOrderedRange,
|
|
174
187
|
f as parseDateInput,
|
|
175
188
|
F as preventOutsideDismissWhenFooter,
|
|
176
|
-
|
|
189
|
+
P as resolveDateInputOnBlur,
|
|
177
190
|
x as resolveDateInputOnEnter,
|
|
178
191
|
X as resolveRangeFieldBlur,
|
|
179
192
|
B as resolveRangePickerDismissFlash,
|
|
180
|
-
|
|
193
|
+
b as resolveSingleValueDismissFlash,
|
|
181
194
|
q as usePickerDismissActionsRef,
|
|
182
|
-
|
|
195
|
+
M as usePickerFooterDismissNudge
|
|
183
196
|
};
|