@box-kite/react 2.2.15 → 2.2.17
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/.claude/rules/box-kite-rules.md +1 -1
- package/.claude/skills/box-kite/SKILL.md +1 -1
- package/.claude/skills/box-kite/references/styling.md +1 -1
- package/.cursor/rules/box-kite.mdc +1 -1
- package/AGENTS.md +1 -1
- package/BOX_AI_CONTEXT.md +16 -0
- package/BOX_KITE_AI_CONTEXT.md +16 -0
- package/behavior.cjs +1 -1
- package/behavior.mjs +16 -16
- package/catalog.cjs +1 -1
- package/catalog.mjs +1 -1
- package/client.cjs +1 -1
- package/client.mjs +10 -10
- package/components/accordion.cjs +1 -1
- package/components/accordion.mjs +95 -91
- package/components/calendar.cjs +1 -1
- package/components/calendar.mjs +212 -210
- package/components/chart.cjs +1 -1
- package/components/chart.d.ts +8 -3
- package/components/chart.mjs +70 -65
- package/components/combobox.cjs +1 -1
- package/components/combobox.mjs +187 -186
- package/components/dashboard.cjs +1 -1
- package/components/dashboard.d.ts +1 -44
- package/components/dashboard.mjs +202 -201
- package/components/dataGrid/components/dataGridListLayout.d.ts +1 -1
- package/components/dataGrid/contracts/dataGridContract.d.ts +1 -1
- package/components/dataGrid/models/gridModel.d.ts +1 -1
- package/components/dataGrid.cjs +2 -2
- package/components/dataGrid.mjs +10 -10
- package/components/dateField.cjs +1 -1
- package/components/dateField.mjs +96 -96
- package/components/datePicker.cjs +1 -1
- package/components/datePicker.mjs +286 -285
- package/components/dialog.cjs +1 -1
- package/components/dialog.d.ts +2 -64
- package/components/dialog.mjs +131 -126
- package/components/form.cjs +1 -1
- package/components/form.d.ts +4 -3
- package/components/form.mjs +25 -22
- package/components/menu.cjs +1 -1
- package/components/menu.d.ts +2 -73
- package/components/menu.mjs +220 -215
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +44 -43
- package/components/popover.cjs +1 -1
- package/components/popover.d.ts +1 -41
- package/components/popover.mjs +56 -51
- package/components/presence.cjs +1 -1
- package/components/presence.mjs +1 -1
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +59 -55
- package/components/semantics.d.ts +29 -29
- package/components/slider.cjs +1 -1
- package/components/slider.d.ts +1 -55
- package/components/slider.mjs +92 -90
- package/components/sortableList.cjs +1 -1
- package/components/sortableList.mjs +149 -148
- package/components/swipeItem.cjs +1 -1
- package/components/swipeItem.mjs +100 -100
- package/components/tabs.cjs +1 -1
- package/components/tabs.mjs +135 -132
- package/components/toaster.cjs +1 -1
- package/components/toaster.d.ts +1 -37
- package/components/toaster.mjs +130 -128
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +1 -34
- package/components/tooltip.mjs +73 -69
- package/components/virtualList.cjs +1 -1
- package/components/virtualList.mjs +88 -87
- package/docs/props.md +2 -2
- package/interactionListening.cjs +1 -1
- package/interactionListening.mjs +3 -3
- package/layer.cjs +1 -1
- package/layer.mjs +1 -1
- package/motion.cjs +1 -1
- package/motion.mjs +30 -20
- package/package.json +41 -40
- package/placement.cjs +1 -1
- package/placement.mjs +1 -1
- package/platform.cjs +1 -1
- package/platform.mjs +17 -14
- package/react/animation/useHeldContent.d.ts +6 -0
- package/react/animation/usePresence.d.ts +4 -0
- package/react/componentsContext.d.ts +1 -1
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +1 -1
- package/scrolling.cjs +1 -1
- package/scrolling.mjs +1 -1
- package/utils/chart/chartUtils.d.ts +3 -2
- package/utils/dashboard/dashboardUtils.d.ts +1 -1
- package/utils/dom/domUtils.d.ts +6 -0
- package/create/src/agents.d.ts +0 -22
- package/create/src/agents.test.d.ts +0 -1
- package/create/src/index.d.ts +0 -1
- package/create/src/options.d.ts +0 -31
- package/create/src/options.test.d.ts +0 -1
- package/create/src/packageManager.d.ts +0 -5
- package/create/src/project.d.ts +0 -27
- package/create/src/project.test.d.ts +0 -1
- package/create/templates/ts/designs/azure.d.ts +0 -5
- package/create/templates/ts/designs/ember.d.ts +0 -5
- package/create/templates/ts/designs/mono.d.ts +0 -5
- package/create/templates/ts/src/App.d.ts +0 -2
- package/create/templates/ts/src/design.d.ts +0 -5
- package/create/templates/ts/src/main.d.ts +0 -0
- package/mcp/src/data.d.ts +0 -90
- package/mcp/src/data.test.d.ts +0 -1
- package/mcp/src/engine.d.ts +0 -23
- package/mcp/src/index.d.ts +0 -1
- package/mcp/src/search.d.ts +0 -38
- package/mcp/src/search.test.d.ts +0 -1
- package/mcp/src/server.d.ts +0 -18
- package/mcp/src/server.test.d.ts +0 -1
- package/mcp/src/styles.d.ts +0 -27
- package/mcp/src/styles.test.d.ts +0 -1
- package/mcp/src/tools.d.ts +0 -18
- package/mcp/src/vocabulary.d.ts +0 -41
- package/registry/blocks/dashboard-shell/dashboard-shell.d.ts +0 -24
- package/registry/blocks/dashboard-shell/dashboard-stats.d.ts +0 -13
- package/registry/blocks/data-grid/invoice-rows.d.ts +0 -15
- package/registry/blocks/data-grid/invoices-grid.d.ts +0 -1
- package/registry/blocks/settings-form/settings-form.d.ts +0 -17
- package/registry/designs/store/address-form.d.ts +0 -11
- package/registry/designs/store/cart-items.d.ts +0 -10
- package/registry/designs/store/cart-page.d.ts +0 -4
- package/registry/designs/store/checkout-page.d.ts +0 -7
- package/registry/designs/store/credit-card-form.d.ts +0 -10
- package/registry/designs/store/form-field.d.ts +0 -19
- package/registry/designs/store/order-summary.d.ts +0 -18
- package/registry/designs/store/product-art.d.ts +0 -26
- package/registry/designs/store/product-card.d.ts +0 -11
- package/registry/designs/store/product-gallery.d.ts +0 -11
- package/registry/designs/store/product-grid.d.ts +0 -10
- package/registry/designs/store/product-page.d.ts +0 -5
- package/registry/designs/store/quantity-stepper.d.ts +0 -13
- package/registry/designs/store/shipping-method.d.ts +0 -14
- package/registry/designs/store/store-data.d.ts +0 -53
- package/registry/designs/store/store-design.d.ts +0 -63
- package/registry/designs/store/store-shell.d.ts +0 -12
- package/registry/designs/store/storefront-page.d.ts +0 -4
- package/registry/designs/store/variant-picker.d.ts +0 -15
- package/supabase/functions/collect/index.d.ts +0 -30
- package/supabase/functions/collect/index.test.d.ts +0 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { f as e } from "../react-shared.mjs";
|
|
3
|
-
import t from "../
|
|
4
|
-
import
|
|
5
|
-
import { t as i } from "../
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { l as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import ee from "
|
|
13
|
-
import
|
|
14
|
-
import S from "
|
|
15
|
-
import C from "./
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
3
|
+
import { l as t } from "../platform.mjs";
|
|
4
|
+
import n from "../box.mjs";
|
|
5
|
+
import { a as r, t as i } from "../behavior.mjs";
|
|
6
|
+
import { t as a } from "../placement.mjs";
|
|
7
|
+
import { n as o, s, t as c } from "../dates.mjs";
|
|
8
|
+
import { A as l, N as u, O as d, i as f, r as p, x as m } from "../date-math.mjs";
|
|
9
|
+
import { l as h, s as g } from "../date-input.mjs";
|
|
10
|
+
import { a as _, t as v } from "../reporting.mjs";
|
|
11
|
+
import { Path as y, Svg as b } from "./svg.mjs";
|
|
12
|
+
import { n as ee } from "../date-environment.mjs";
|
|
13
|
+
import x from "./calendar.mjs";
|
|
14
|
+
import { t as S } from "../layer.mjs";
|
|
15
|
+
import C from "./overlay.mjs";
|
|
16
|
+
import { n as w } from "../motion.mjs";
|
|
17
|
+
import te from "./dateField.mjs";
|
|
18
|
+
import { useCallback as T, useEffect as E, useMemo as D, useRef as ne, useState as re } from "react";
|
|
19
|
+
import { Fragment as ie, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
18
20
|
//#region src/components/datePicker.tsx
|
|
19
|
-
function
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
+
function A() {
|
|
22
|
+
return /* @__PURE__ */ O(b, {
|
|
21
23
|
viewBox: "0 0 16 16",
|
|
22
24
|
width: "1rem",
|
|
23
25
|
height: "1rem",
|
|
24
26
|
props: { fill: "none" },
|
|
25
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ O(y, {
|
|
26
28
|
d: "M3 3.5h10a1 1 0 0 1 1 1V13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1ZM2 7h12M5.5 2v3M10.5 2v3",
|
|
27
29
|
stroke: "currentColor",
|
|
28
30
|
strokeWidth: 1.5,
|
|
@@ -30,13 +32,13 @@ function ne() {
|
|
|
30
32
|
})
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
+
function j() {
|
|
36
|
+
return /* @__PURE__ */ O(b, {
|
|
35
37
|
viewBox: "0 0 16 16",
|
|
36
38
|
width: "1rem",
|
|
37
39
|
height: "1rem",
|
|
38
40
|
props: { fill: "none" },
|
|
39
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ O(y, {
|
|
40
42
|
d: "M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12ZM8 5v3l2 1.5",
|
|
41
43
|
stroke: "currentColor",
|
|
42
44
|
strokeWidth: 1.5,
|
|
@@ -45,13 +47,13 @@ function re() {
|
|
|
45
47
|
})
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
|
-
function
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
+
function ae() {
|
|
51
|
+
return /* @__PURE__ */ O(b, {
|
|
50
52
|
viewBox: "0 0 16 16",
|
|
51
53
|
width: "0.875rem",
|
|
52
54
|
height: "0.875rem",
|
|
53
55
|
props: { fill: "none" },
|
|
54
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ O(y, {
|
|
55
57
|
d: "m4.5 4.5 7 7m0-7-7 7",
|
|
56
58
|
stroke: "currentColor",
|
|
57
59
|
strokeWidth: 1.5,
|
|
@@ -59,13 +61,10 @@ function ie() {
|
|
|
59
61
|
})
|
|
60
62
|
});
|
|
61
63
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let [r, a] = O(null), o = e.ref, s = w((e) => {
|
|
67
|
-
a(e), j(o, e);
|
|
68
|
-
}, [o]), c = (e) => {
|
|
64
|
+
function oe(e) {
|
|
65
|
+
let [i, o] = re(null), s = e.ref, c = T((e) => {
|
|
66
|
+
o(e), t(s, e);
|
|
67
|
+
}, [s]), l = (e) => {
|
|
69
68
|
if (!e || e.contains(document.activeElement) && document.activeElement !== e) return;
|
|
70
69
|
let t = [
|
|
71
70
|
"[data-date][tabindex=\"0\"]",
|
|
@@ -73,7 +72,7 @@ function ae(e) {
|
|
|
73
72
|
"button:not([disabled])"
|
|
74
73
|
].map((t) => e.querySelector(t)).find(Boolean), n = e.querySelector("[role=\"listbox\"]"), r = n?.querySelector("[role=\"option\"][tabindex=\"0\"]");
|
|
75
74
|
n && r && (n.scrollTop = r.offsetTop - n.clientHeight / 2 + r.offsetHeight / 2), (t ?? e).focus({ preventScroll: !0 });
|
|
76
|
-
},
|
|
75
|
+
}, u = r((e) => l(e)), { platform: d, isOpen: f, id: p, setPanel: m, setOpen: h, trigger: g, triggerElement: _, panelElement: v } = S({
|
|
77
76
|
haspopup: "dialog",
|
|
78
77
|
idPrefix: "date-picker",
|
|
79
78
|
open: e.open,
|
|
@@ -83,84 +82,86 @@ function ae(e) {
|
|
|
83
82
|
component: "datePicker",
|
|
84
83
|
type: "openChange"
|
|
85
84
|
},
|
|
86
|
-
onOpened:
|
|
85
|
+
onOpened: u,
|
|
87
86
|
onClosing: (e, t) => {
|
|
88
87
|
e && t?.focus();
|
|
89
88
|
}
|
|
90
|
-
}),
|
|
89
|
+
}), y = a({
|
|
91
90
|
side: e.side,
|
|
92
91
|
align: e.align,
|
|
93
92
|
offset: 1,
|
|
94
93
|
flip: !0,
|
|
95
94
|
matchWidth: e.matchWidth,
|
|
96
|
-
anchor:
|
|
95
|
+
anchor: i
|
|
97
96
|
});
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
E(() => {
|
|
98
|
+
f && l(v);
|
|
99
|
+
}, [f, v]);
|
|
100
|
+
let b = T(() => v, [v]), ee = w(f, b);
|
|
101
|
+
return {
|
|
102
|
+
attachTrigger: g.ref,
|
|
103
|
+
triggerAttributes: g.props,
|
|
104
|
+
triggerElement: _,
|
|
104
105
|
closeOnChoice: (e) => {
|
|
105
|
-
|
|
106
|
+
_?.focus(), h(!1, {
|
|
106
107
|
reason: "select",
|
|
107
108
|
event: e
|
|
108
109
|
});
|
|
109
110
|
},
|
|
110
|
-
id:
|
|
111
|
-
attachField:
|
|
112
|
-
panel: (
|
|
113
|
-
let
|
|
111
|
+
id: p,
|
|
112
|
+
attachField: c,
|
|
113
|
+
panel: (t) => {
|
|
114
|
+
let r = {
|
|
114
115
|
role: "dialog",
|
|
115
116
|
"aria-label": e.label,
|
|
116
117
|
tabIndex: -1
|
|
117
118
|
};
|
|
118
|
-
return
|
|
119
|
-
ref:
|
|
119
|
+
return d ? /* @__PURE__ */ O(n, {
|
|
120
|
+
ref: m,
|
|
120
121
|
component: "popover",
|
|
121
122
|
variant: { topLayer: !0 },
|
|
122
123
|
p: 3,
|
|
123
|
-
...
|
|
124
|
-
id:
|
|
124
|
+
...y.layerProps,
|
|
125
|
+
id: p,
|
|
125
126
|
props: {
|
|
126
127
|
popover: "auto",
|
|
127
|
-
...
|
|
128
|
+
...r
|
|
128
129
|
},
|
|
129
|
-
children:
|
|
130
|
-
}) :
|
|
131
|
-
contentRef:
|
|
132
|
-
anchor:
|
|
130
|
+
children: ee === "closed" ? null : t
|
|
131
|
+
}) : f && /* @__PURE__ */ O(C, {
|
|
132
|
+
contentRef: m,
|
|
133
|
+
anchor: i,
|
|
133
134
|
side: e.side,
|
|
134
135
|
align: e.align,
|
|
135
136
|
offset: 1,
|
|
136
137
|
matchWidth: e.matchWidth,
|
|
137
138
|
component: "popover",
|
|
138
139
|
p: 3,
|
|
139
|
-
id:
|
|
140
|
-
props:
|
|
141
|
-
children:
|
|
140
|
+
id: p,
|
|
141
|
+
props: r,
|
|
142
|
+
children: t
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
-
let { value:
|
|
147
|
+
function se(e) {
|
|
148
|
+
let { value: t, step: r, locale: a, hourCycle: o, onSelect: s, label: l, min: u, max: d, emptyLabel: f, separated: p } = e, m = D(() => h(r, {
|
|
148
149
|
min: u,
|
|
149
150
|
max: d
|
|
150
151
|
}), [
|
|
151
|
-
|
|
152
|
+
r,
|
|
152
153
|
u,
|
|
153
154
|
d
|
|
154
|
-
]), _ =
|
|
155
|
-
count:
|
|
155
|
+
]), _ = g(t, r), v = Math.max(0, _ ? m.indexOf(_) : m.indexOf("09:00:00")), y = i({
|
|
156
|
+
count: m.length,
|
|
156
157
|
defaultActiveIndex: v,
|
|
157
158
|
loop: !1,
|
|
158
|
-
onSelect: (e, t) =>
|
|
159
|
+
onSelect: (e, t) => s(m[e], t)
|
|
159
160
|
}), b = p ? {
|
|
160
161
|
ps: 2,
|
|
161
162
|
bs: 1
|
|
162
163
|
} : {};
|
|
163
|
-
return
|
|
164
|
+
return m.length === 0 ? /* @__PURE__ */ O(n, {
|
|
164
165
|
component: "datePicker.empty",
|
|
165
166
|
flexGrow: 1,
|
|
166
167
|
px: 3,
|
|
@@ -169,7 +170,7 @@ function oe(e) {
|
|
|
169
170
|
...b,
|
|
170
171
|
props: { role: "status" },
|
|
171
172
|
children: f
|
|
172
|
-
}) : /* @__PURE__ */
|
|
173
|
+
}) : /* @__PURE__ */ O(n, {
|
|
173
174
|
component: "datePicker.times",
|
|
174
175
|
position: "relative",
|
|
175
176
|
display: "flex",
|
|
@@ -185,7 +186,7 @@ function oe(e) {
|
|
|
185
186
|
"aria-label": l,
|
|
186
187
|
onKeyDown: y.onKeyDown
|
|
187
188
|
},
|
|
188
|
-
children:
|
|
189
|
+
children: m.map((e, t) => /* @__PURE__ */ O(n, {
|
|
189
190
|
component: "datePicker.time",
|
|
190
191
|
variant: { selected: e === _ },
|
|
191
192
|
px: 3,
|
|
@@ -198,10 +199,10 @@ function oe(e) {
|
|
|
198
199
|
props: {
|
|
199
200
|
role: "option",
|
|
200
201
|
"aria-selected": e === _,
|
|
201
|
-
...y.itemProps(
|
|
202
|
-
onClick: (t) =>
|
|
202
|
+
...y.itemProps(t),
|
|
203
|
+
onClick: (t) => s(e, t)
|
|
203
204
|
},
|
|
204
|
-
children:
|
|
205
|
+
children: c(e, {
|
|
205
206
|
locale: a,
|
|
206
207
|
hour: "numeric",
|
|
207
208
|
minute: "2-digit",
|
|
@@ -210,8 +211,8 @@ function oe(e) {
|
|
|
210
211
|
}, e))
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
-
return /* @__PURE__ */
|
|
214
|
+
function ce(e) {
|
|
215
|
+
return /* @__PURE__ */ O(n, {
|
|
215
216
|
component: "datePicker.presets",
|
|
216
217
|
display: "flex",
|
|
217
218
|
d: "column",
|
|
@@ -219,10 +220,10 @@ function se(e) {
|
|
|
219
220
|
pe: 2,
|
|
220
221
|
be: 1,
|
|
221
222
|
props: { role: "group" },
|
|
222
|
-
children: e.presets.map((
|
|
223
|
+
children: e.presets.map((t) => /* @__PURE__ */ O(n, {
|
|
223
224
|
tag: "button",
|
|
224
225
|
component: "datePicker.preset",
|
|
225
|
-
variant: { selected: e.isSelected(
|
|
226
|
+
variant: { selected: e.isSelected(t.value) },
|
|
226
227
|
px: 3,
|
|
227
228
|
py: 1.5,
|
|
228
229
|
borderRadius: 2,
|
|
@@ -231,18 +232,18 @@ function se(e) {
|
|
|
231
232
|
whiteSpace: "nowrap",
|
|
232
233
|
props: {
|
|
233
234
|
type: "button",
|
|
234
|
-
onClick: (
|
|
235
|
+
onClick: (n) => e.onSelect(t.value, n)
|
|
235
236
|
},
|
|
236
|
-
children:
|
|
237
|
-
},
|
|
237
|
+
children: t.label
|
|
238
|
+
}, t.label))
|
|
238
239
|
});
|
|
239
240
|
}
|
|
240
|
-
function
|
|
241
|
-
let { frame:
|
|
242
|
-
return
|
|
241
|
+
function le(e) {
|
|
242
|
+
let { frame: t, attachField: i, attachTrigger: a, triggerAttributes: o, triggerElement: s, id: c, label: l, labelledBy: u, describedBy: d } = e, { text: f, placeholder: p, icon: m, clear: h, disabled: g, invalid: _, required: v = !1, tabIndex: y, inputs: b, onReset: ee } = e, x = ne(null), S = l === void 0 ? void 0 : `${c}-label`, C = `${c}-value`, w = r(ee);
|
|
243
|
+
return E(() => {
|
|
243
244
|
let e = x.current?.form;
|
|
244
245
|
if (e) return e.addEventListener("reset", w), () => e.removeEventListener("reset", w);
|
|
245
|
-
}, [w]), /* @__PURE__ */
|
|
246
|
+
}, [w]), /* @__PURE__ */ k(ie, { children: [l !== void 0 && /* @__PURE__ */ O(n, {
|
|
246
247
|
component: "dateField.label",
|
|
247
248
|
display: "block",
|
|
248
249
|
mb: 1.5,
|
|
@@ -250,7 +251,7 @@ function ce(e) {
|
|
|
250
251
|
id: S,
|
|
251
252
|
props: { onClick: () => s?.focus() },
|
|
252
253
|
children: l
|
|
253
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ k(n, {
|
|
254
255
|
ref: i,
|
|
255
256
|
component: "dateField",
|
|
256
257
|
display: "inline-flex",
|
|
@@ -258,13 +259,13 @@ function ce(e) {
|
|
|
258
259
|
position: "relative",
|
|
259
260
|
cursor: "pointer",
|
|
260
261
|
css: { fontVariantNumeric: "tabular-nums" },
|
|
261
|
-
...
|
|
262
|
-
variant: [
|
|
262
|
+
...t,
|
|
263
|
+
variant: [t.variant, {
|
|
263
264
|
disabled: g,
|
|
264
265
|
invalid: _
|
|
265
266
|
}],
|
|
266
267
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ O(n, {
|
|
268
269
|
tag: "button",
|
|
269
270
|
ref: a,
|
|
270
271
|
component: "datePicker.value",
|
|
@@ -290,17 +291,17 @@ function ce(e) {
|
|
|
290
291
|
"aria-invalid": _ || void 0,
|
|
291
292
|
...o
|
|
292
293
|
},
|
|
293
|
-
children: /* @__PURE__ */
|
|
294
|
+
children: /* @__PURE__ */ O("span", {
|
|
294
295
|
id: C,
|
|
295
296
|
children: f || p
|
|
296
297
|
})
|
|
297
298
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ k(n, {
|
|
299
300
|
display: "inline-flex",
|
|
300
301
|
ai: "center",
|
|
301
302
|
gap: 1,
|
|
302
303
|
ms: 2,
|
|
303
|
-
children: [h, /* @__PURE__ */
|
|
304
|
+
children: [h, /* @__PURE__ */ O(n, {
|
|
304
305
|
component: "datePicker.icon",
|
|
305
306
|
display: "inline-flex",
|
|
306
307
|
ai: "center",
|
|
@@ -312,9 +313,9 @@ function ce(e) {
|
|
|
312
313
|
children: m
|
|
313
314
|
})]
|
|
314
315
|
}),
|
|
315
|
-
b.map((e,
|
|
316
|
+
b.map((e, t) => v ? /* @__PURE__ */ O(n, {
|
|
316
317
|
tag: "input",
|
|
317
|
-
ref:
|
|
318
|
+
ref: t === 0 ? x : void 0,
|
|
318
319
|
component: "dateField.validation",
|
|
319
320
|
required: !0,
|
|
320
321
|
disabled: g,
|
|
@@ -327,72 +328,72 @@ function ce(e) {
|
|
|
327
328
|
onChange: () => {},
|
|
328
329
|
onFocus: () => s?.focus()
|
|
329
330
|
}
|
|
330
|
-
},
|
|
331
|
-
ref:
|
|
331
|
+
}, t) : e.name === void 0 ? null : /* @__PURE__ */ O("input", {
|
|
332
|
+
ref: t === 0 ? x : void 0,
|
|
332
333
|
type: "hidden",
|
|
333
334
|
name: e.name,
|
|
334
335
|
value: e.value,
|
|
335
336
|
disabled: g
|
|
336
|
-
},
|
|
337
|
+
}, t))
|
|
337
338
|
]
|
|
338
339
|
})] });
|
|
339
340
|
}
|
|
340
|
-
function M(e,
|
|
341
|
-
let { type: r = "date", value: i, defaultValue: a = null, onValueChange:
|
|
342
|
-
locale:
|
|
341
|
+
function M(e, t) {
|
|
342
|
+
let { type: r = "date", value: i, defaultValue: a = null, onValueChange: o, zone: h, locale: g, hourCycle: y, granularity: b, disambiguation: S, min: C, max: w, isDateUnavailable: T, disabled: E = !1, readOnly: D = !1, required: ne, invalid: re, name: M, label: N, labelledBy: P, describedBy: F, open: ue, defaultOpen: de, onOpenChange: fe, closeOnSelect: I = !0, firstDayOfWeek: L, weekNumbers: pe, side: R = "bottom", align: me = "start", matchWidth: he = r === "time", emptyTimesLabel: ge = "No times available", clearable: _e = !1, pickOnly: z = !1, triggerLabel: ve, clearLabel: ye = "Clear", tabIndex: B, step: V = 30, defaultTime: H = "00:00", presets: U, showZone: W, ...be } = e, G = ee({
|
|
343
|
+
locale: g,
|
|
343
344
|
zone: h === "none" ? void 0 : h
|
|
344
|
-
}), { locale:
|
|
345
|
+
}), { locale: K } = G, q = r === "datetime" && h !== "none" ? G.zone : null, J = q ?? G.zone, [Y, X] = _({
|
|
345
346
|
value: i,
|
|
346
347
|
defaultValue: a,
|
|
347
|
-
onChange: (e, t) =>
|
|
348
|
+
onChange: (e, t) => o?.(e, {
|
|
348
349
|
...t,
|
|
349
|
-
...
|
|
350
|
+
...m(e, J)
|
|
350
351
|
}),
|
|
351
352
|
interaction: {
|
|
352
353
|
component: "datePicker",
|
|
353
354
|
type: "valueChange",
|
|
354
355
|
content: ["value"]
|
|
355
356
|
}
|
|
356
|
-
}),
|
|
357
|
-
ref:
|
|
358
|
-
open:
|
|
359
|
-
defaultOpen:
|
|
360
|
-
onOpenChange:
|
|
361
|
-
side:
|
|
362
|
-
align:
|
|
357
|
+
}), Z = ve ?? (r === "time" ? "Choose time" : "Choose date"), xe = typeof N == "string" ? N : Z, { attachTrigger: Q, triggerAttributes: Se, triggerElement: Ce, closeOnChoice: we, id: Te, attachField: Ee, panel: De } = oe({
|
|
358
|
+
ref: t,
|
|
359
|
+
open: ue,
|
|
360
|
+
defaultOpen: de,
|
|
361
|
+
onOpenChange: fe,
|
|
362
|
+
side: R,
|
|
363
|
+
align: me,
|
|
363
364
|
matchWidth: he,
|
|
364
|
-
label:
|
|
365
|
-
}), $ =
|
|
366
|
-
locale:
|
|
367
|
-
zone:
|
|
365
|
+
label: xe
|
|
366
|
+
}), $ = Y && r !== "time" ? d(Y, { zone: J }) : null, Oe = Y && r !== "date" ? l(Y, { zone: J }) : null, ke = r === "datetime" ? $ ?? u(J) : null, Ae = (e) => e && (ke === null || d(e, { zone: J }) === ke) ? l(e, { zone: J }) : null, je = Y ? c(Y, {
|
|
367
|
+
locale: K,
|
|
368
|
+
zone: J,
|
|
368
369
|
hourCycle: y === void 0 ? void 0 : y === 12 ? "h12" : "h23",
|
|
369
370
|
...r === "date" ? { dateStyle: "medium" } : r === "time" ? { timeStyle: "short" } : {
|
|
370
371
|
dateStyle: "medium",
|
|
371
372
|
timeStyle: "short"
|
|
372
373
|
}
|
|
373
|
-
}) : "", Me =
|
|
374
|
-
locale:
|
|
374
|
+
}) : "", Me = z && Y && q && (W ?? q !== G.readerZone) ? s(q, {
|
|
375
|
+
locale: K,
|
|
375
376
|
style: "short",
|
|
376
|
-
at:
|
|
377
|
-
}) : null, Ne = we, Pe = (e, t) =>
|
|
378
|
-
zone:
|
|
377
|
+
at: Y
|
|
378
|
+
}) : null, Ne = we, Pe = (e, t) => p(e, t, q ? {
|
|
379
|
+
zone: q,
|
|
379
380
|
disambiguation: S
|
|
380
381
|
} : {}), Fe = (e, t) => {
|
|
381
|
-
e && (r === "date" ? (
|
|
382
|
+
e && (r === "date" ? (X(e, {
|
|
382
383
|
reason: "select",
|
|
383
384
|
event: t
|
|
384
|
-
}),
|
|
385
|
+
}), I && Ne(t)) : X(Pe(e, Oe ?? H), {
|
|
385
386
|
reason: "select",
|
|
386
387
|
event: t
|
|
387
388
|
}));
|
|
388
389
|
}, Ie = (e, t) => {
|
|
389
|
-
|
|
390
|
+
X(r === "time" ? e : Pe($ ?? u(J), e), {
|
|
390
391
|
reason: "select",
|
|
391
392
|
event: t
|
|
392
|
-
}),
|
|
393
|
-
}, Le = /* @__PURE__ */
|
|
393
|
+
}), I && Ne(t);
|
|
394
|
+
}, Le = /* @__PURE__ */ O(n, {
|
|
394
395
|
tag: "button",
|
|
395
|
-
ref:
|
|
396
|
+
ref: Q,
|
|
396
397
|
component: "datePicker.trigger",
|
|
397
398
|
display: "inline-flex",
|
|
398
399
|
ai: "center",
|
|
@@ -402,15 +403,15 @@ function M(e, n) {
|
|
|
402
403
|
ms: 2,
|
|
403
404
|
me: -1.5,
|
|
404
405
|
borderRadius: 1.5,
|
|
405
|
-
disabled:
|
|
406
|
+
disabled: E || D,
|
|
406
407
|
props: {
|
|
407
408
|
type: "button",
|
|
408
|
-
"aria-label": je ? `${
|
|
409
|
-
tabIndex:
|
|
409
|
+
"aria-label": je ? `${Z}, ${je}` : Z,
|
|
410
|
+
tabIndex: B,
|
|
410
411
|
...Se
|
|
411
412
|
},
|
|
412
|
-
children:
|
|
413
|
-
}), Re =
|
|
413
|
+
children: O(r === "time" ? j : A, {})
|
|
414
|
+
}), Re = _e && Y && !E && !D && /* @__PURE__ */ O(n, {
|
|
414
415
|
tag: "button",
|
|
415
416
|
component: "datePicker.clear",
|
|
416
417
|
display: "inline-flex",
|
|
@@ -424,165 +425,165 @@ function M(e, n) {
|
|
|
424
425
|
zIndex: 1,
|
|
425
426
|
props: {
|
|
426
427
|
type: "button",
|
|
427
|
-
"aria-label":
|
|
428
|
-
tabIndex:
|
|
429
|
-
onClick: (e) =>
|
|
428
|
+
"aria-label": ye,
|
|
429
|
+
tabIndex: B,
|
|
430
|
+
onClick: (e) => X(null, {
|
|
430
431
|
reason: "clear",
|
|
431
432
|
event: e
|
|
432
433
|
})
|
|
433
434
|
},
|
|
434
|
-
children: /* @__PURE__ */
|
|
435
|
-
}), ze =
|
|
436
|
-
frame:
|
|
435
|
+
children: /* @__PURE__ */ O(ae, {})
|
|
436
|
+
}), ze = Y !== null && (C != null && f(Y, C) < 0 || w != null && f(Y, w) > 0), Be = z ? /* @__PURE__ */ O(le, {
|
|
437
|
+
frame: be,
|
|
437
438
|
attachField: Ee,
|
|
438
|
-
attachTrigger:
|
|
439
|
-
triggerAttributes:
|
|
439
|
+
attachTrigger: D ? void 0 : Q,
|
|
440
|
+
triggerAttributes: D ? void 0 : Se,
|
|
440
441
|
triggerElement: Ce,
|
|
441
442
|
id: Te,
|
|
442
|
-
label:
|
|
443
|
-
labelledBy:
|
|
444
|
-
describedBy:
|
|
443
|
+
label: N,
|
|
444
|
+
labelledBy: P,
|
|
445
|
+
describedBy: F,
|
|
445
446
|
text: Me ? `${je} ${Me}` : je,
|
|
446
|
-
placeholder:
|
|
447
|
-
icon:
|
|
447
|
+
placeholder: Z,
|
|
448
|
+
icon: O(r === "time" ? j : A, {}),
|
|
448
449
|
clear: Re,
|
|
449
|
-
disabled:
|
|
450
|
-
invalid:
|
|
451
|
-
required:
|
|
452
|
-
tabIndex:
|
|
450
|
+
disabled: E,
|
|
451
|
+
invalid: re ?? (ze || $ !== null && !!T?.($)),
|
|
452
|
+
required: ne,
|
|
453
|
+
tabIndex: B,
|
|
453
454
|
inputs: [{
|
|
454
|
-
name:
|
|
455
|
-
value:
|
|
455
|
+
name: M,
|
|
456
|
+
value: Y ?? ""
|
|
456
457
|
}],
|
|
457
|
-
onReset: (e) =>
|
|
458
|
+
onReset: (e) => X(a, {
|
|
458
459
|
reason: "reset",
|
|
459
460
|
event: e
|
|
460
461
|
})
|
|
461
|
-
}) : /* @__PURE__ */
|
|
462
|
+
}) : /* @__PURE__ */ O(te, {
|
|
462
463
|
ref: Ee,
|
|
463
|
-
...
|
|
464
|
+
...be,
|
|
464
465
|
type: r,
|
|
465
|
-
value:
|
|
466
|
-
onValueChange: (e, t) =>
|
|
466
|
+
value: Y,
|
|
467
|
+
onValueChange: (e, t) => X(e, {
|
|
467
468
|
reason: t.reason,
|
|
468
469
|
event: t.event
|
|
469
470
|
}),
|
|
470
471
|
zone: h,
|
|
471
|
-
locale:
|
|
472
|
+
locale: g,
|
|
472
473
|
hourCycle: y,
|
|
473
|
-
granularity:
|
|
474
|
+
granularity: b,
|
|
474
475
|
disambiguation: S,
|
|
475
|
-
min:
|
|
476
|
-
max:
|
|
477
|
-
isDateUnavailable:
|
|
478
|
-
disabled:
|
|
479
|
-
readOnly:
|
|
480
|
-
required:
|
|
481
|
-
invalid:
|
|
482
|
-
name:
|
|
483
|
-
label:
|
|
484
|
-
labelledBy:
|
|
485
|
-
describedBy:
|
|
486
|
-
showZone:
|
|
487
|
-
tabIndex:
|
|
488
|
-
end: /* @__PURE__ */
|
|
476
|
+
min: C,
|
|
477
|
+
max: w,
|
|
478
|
+
isDateUnavailable: T,
|
|
479
|
+
disabled: E,
|
|
480
|
+
readOnly: D,
|
|
481
|
+
required: ne,
|
|
482
|
+
invalid: re,
|
|
483
|
+
name: M,
|
|
484
|
+
label: N,
|
|
485
|
+
labelledBy: P,
|
|
486
|
+
describedBy: F,
|
|
487
|
+
showZone: W,
|
|
488
|
+
tabIndex: B,
|
|
489
|
+
end: /* @__PURE__ */ k(ie, { children: [Re, Le] })
|
|
489
490
|
});
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ k(v, { children: [Be, De(/* @__PURE__ */ k(n, {
|
|
491
492
|
display: "flex",
|
|
492
493
|
gap: 3,
|
|
493
494
|
ai: "stretch",
|
|
494
495
|
children: [
|
|
495
|
-
|
|
496
|
-
presets:
|
|
497
|
-
isSelected: (e) =>
|
|
496
|
+
U && U.length > 0 && /* @__PURE__ */ O(ce, {
|
|
497
|
+
presets: U,
|
|
498
|
+
isSelected: (e) => Y !== null && f(e, Y, { zone: J }) === 0,
|
|
498
499
|
onSelect: (e, t) => {
|
|
499
|
-
|
|
500
|
+
X(e, {
|
|
500
501
|
reason: "preset",
|
|
501
502
|
event: t
|
|
502
|
-
}),
|
|
503
|
+
}), I && Ne(t);
|
|
503
504
|
}
|
|
504
505
|
}),
|
|
505
|
-
r !== "time" && /* @__PURE__ */
|
|
506
|
+
r !== "time" && /* @__PURE__ */ O(x, {
|
|
506
507
|
value: $,
|
|
507
508
|
onValueChange: (e, t) => Fe(e, t.event),
|
|
508
|
-
min:
|
|
509
|
-
max:
|
|
510
|
-
isDateUnavailable:
|
|
511
|
-
locale:
|
|
509
|
+
min: C ? d(C, { zone: J }) : void 0,
|
|
510
|
+
max: w ? d(w, { zone: J }) : void 0,
|
|
511
|
+
isDateUnavailable: T,
|
|
512
|
+
locale: g,
|
|
512
513
|
zone: h === "none" ? void 0 : h,
|
|
513
|
-
firstDayOfWeek:
|
|
514
|
-
weekNumbers:
|
|
514
|
+
firstDayOfWeek: L,
|
|
515
|
+
weekNumbers: pe
|
|
515
516
|
}),
|
|
516
|
-
r !== "date" && /* @__PURE__ */
|
|
517
|
+
r !== "date" && /* @__PURE__ */ O(se, {
|
|
517
518
|
value: Oe,
|
|
518
|
-
step:
|
|
519
|
-
locale:
|
|
519
|
+
step: V,
|
|
520
|
+
locale: K,
|
|
520
521
|
hourCycle: y,
|
|
521
|
-
label: r === "time" ?
|
|
522
|
-
min: Ae(
|
|
523
|
-
max: Ae(
|
|
524
|
-
emptyLabel:
|
|
522
|
+
label: r === "time" ? xe : "Time",
|
|
523
|
+
min: Ae(C),
|
|
524
|
+
max: Ae(w),
|
|
525
|
+
emptyLabel: ge,
|
|
525
526
|
separated: r === "datetime",
|
|
526
527
|
onSelect: Ie
|
|
527
528
|
})
|
|
528
529
|
]
|
|
529
530
|
}))] });
|
|
530
531
|
}
|
|
531
|
-
function N(e,
|
|
532
|
-
let { value: r, defaultValue: i = null, onValueChange:
|
|
532
|
+
function N(e, t) {
|
|
533
|
+
let { value: r, defaultValue: i = null, onValueChange: a, locale: s, min: c, max: l, isDateUnavailable: u, disabled: d = !1, readOnly: p = !1, required: m, invalid: h, startName: g, endName: y, label: b, labelledBy: S, describedBy: C, startLabel: w = "Start date", endLabel: T = "End date", open: E, defaultOpen: D, onOpenChange: ne, closeOnSelect: j = !0, firstDayOfWeek: se, weekNumbers: M, months: N = 2, side: P = "bottom", align: F = "start", matchWidth: ue = !1, emptyTimesLabel: de, clearable: fe = !1, pickOnly: I = !1, triggerLabel: L = "Choose dates", clearLabel: pe = "Clear", tabIndex: R, presets: me, props: he, ...ge } = e, { locale: _e } = ee({ locale: s }), [z, ve] = _({
|
|
533
534
|
value: r,
|
|
534
535
|
defaultValue: i,
|
|
535
|
-
onChange:
|
|
536
|
+
onChange: a,
|
|
536
537
|
interaction: {
|
|
537
538
|
component: "dateRangePicker",
|
|
538
539
|
type: "valueChange",
|
|
539
540
|
content: ["value"]
|
|
540
541
|
}
|
|
541
|
-
}), [
|
|
542
|
-
start:
|
|
543
|
-
end:
|
|
544
|
-
source:
|
|
545
|
-
}), { start:
|
|
546
|
-
|
|
547
|
-
start:
|
|
548
|
-
end:
|
|
549
|
-
source:
|
|
542
|
+
}), [ye, B] = re({
|
|
543
|
+
start: z?.start ?? null,
|
|
544
|
+
end: z?.end ?? null,
|
|
545
|
+
source: z
|
|
546
|
+
}), { start: V, end: H } = ye;
|
|
547
|
+
ye.source !== z && (V = z?.start ?? null, H = z?.end ?? null, B({
|
|
548
|
+
start: V,
|
|
549
|
+
end: H,
|
|
550
|
+
source: z
|
|
550
551
|
}));
|
|
551
|
-
let { attachTrigger:
|
|
552
|
-
ref:
|
|
553
|
-
open:
|
|
554
|
-
defaultOpen:
|
|
555
|
-
onOpenChange:
|
|
556
|
-
side:
|
|
557
|
-
align:
|
|
558
|
-
matchWidth:
|
|
559
|
-
label: typeof
|
|
560
|
-
}),
|
|
561
|
-
let i = e && t &&
|
|
552
|
+
let { attachTrigger: U, triggerAttributes: W, triggerElement: be, closeOnChoice: G, id: K, attachField: q, panel: J } = oe({
|
|
553
|
+
ref: t,
|
|
554
|
+
open: E,
|
|
555
|
+
defaultOpen: D,
|
|
556
|
+
onOpenChange: ne,
|
|
557
|
+
side: P,
|
|
558
|
+
align: F,
|
|
559
|
+
matchWidth: ue,
|
|
560
|
+
label: typeof b == "string" ? b : L
|
|
561
|
+
}), Y = z ? o(z.start, z.end, { locale: _e }) : "", X = V !== null && H !== null && f(V, H) > 0, Z = (e, t, n, r) => {
|
|
562
|
+
let i = e && t && f(e, t) <= 0 ? {
|
|
562
563
|
start: e,
|
|
563
564
|
end: t
|
|
564
565
|
} : null;
|
|
565
|
-
|
|
566
|
+
B({
|
|
566
567
|
start: e,
|
|
567
568
|
end: t,
|
|
568
569
|
source: i
|
|
569
|
-
}),
|
|
570
|
+
}), ve(i, {
|
|
570
571
|
reason: n,
|
|
571
572
|
event: r
|
|
572
573
|
});
|
|
573
|
-
},
|
|
574
|
+
}, xe = G, Q = {
|
|
574
575
|
locale: s,
|
|
575
576
|
min: c,
|
|
576
577
|
max: l,
|
|
577
578
|
isDateUnavailable: u,
|
|
578
|
-
disabled:
|
|
579
|
+
disabled: d,
|
|
579
580
|
readOnly: p,
|
|
580
581
|
required: m,
|
|
581
582
|
component: "datePicker.part",
|
|
582
583
|
px: 0,
|
|
583
584
|
py: 0,
|
|
584
|
-
tabIndex:
|
|
585
|
-
}, Se =
|
|
585
|
+
tabIndex: R
|
|
586
|
+
}, Se = fe && z && !d && !p && /* @__PURE__ */ O(n, {
|
|
586
587
|
tag: "button",
|
|
587
588
|
component: "datePicker.clear",
|
|
588
589
|
display: "inline-flex",
|
|
@@ -595,97 +596,97 @@ function N(e, n) {
|
|
|
595
596
|
zIndex: 1,
|
|
596
597
|
props: {
|
|
597
598
|
type: "button",
|
|
598
|
-
"aria-label":
|
|
599
|
-
tabIndex:
|
|
600
|
-
onClick: (e) =>
|
|
599
|
+
"aria-label": pe,
|
|
600
|
+
tabIndex: R,
|
|
601
|
+
onClick: (e) => Z(null, null, "clear", e)
|
|
601
602
|
},
|
|
602
|
-
children: /* @__PURE__ */
|
|
603
|
-
}), Ce =
|
|
603
|
+
children: /* @__PURE__ */ O(ae, {})
|
|
604
|
+
}), Ce = z !== null && (c != null && f(z.start, c) < 0 || l != null && f(z.end, l) > 0), we = I ? /* @__PURE__ */ O(le, {
|
|
604
605
|
frame: {
|
|
605
|
-
...
|
|
606
|
+
...ge,
|
|
606
607
|
props: he
|
|
607
608
|
},
|
|
608
|
-
attachField:
|
|
609
|
-
attachTrigger: p ? void 0 :
|
|
610
|
-
triggerAttributes: p ? void 0 :
|
|
611
|
-
triggerElement:
|
|
612
|
-
id:
|
|
613
|
-
label:
|
|
609
|
+
attachField: q,
|
|
610
|
+
attachTrigger: p ? void 0 : U,
|
|
611
|
+
triggerAttributes: p ? void 0 : W,
|
|
612
|
+
triggerElement: be,
|
|
613
|
+
id: K,
|
|
614
|
+
label: b,
|
|
614
615
|
labelledBy: S,
|
|
615
|
-
describedBy:
|
|
616
|
-
text:
|
|
617
|
-
placeholder:
|
|
618
|
-
icon: /* @__PURE__ */
|
|
616
|
+
describedBy: C,
|
|
617
|
+
text: Y,
|
|
618
|
+
placeholder: L,
|
|
619
|
+
icon: /* @__PURE__ */ O(A, {}),
|
|
619
620
|
clear: Se,
|
|
620
|
-
disabled:
|
|
621
|
+
disabled: d,
|
|
621
622
|
invalid: h ?? Ce,
|
|
622
623
|
required: m,
|
|
623
|
-
tabIndex:
|
|
624
|
+
tabIndex: R,
|
|
624
625
|
inputs: [{
|
|
625
|
-
name:
|
|
626
|
-
value:
|
|
626
|
+
name: g,
|
|
627
|
+
value: z?.start ?? ""
|
|
627
628
|
}, {
|
|
628
629
|
name: y,
|
|
629
|
-
value:
|
|
630
|
+
value: z?.end ?? ""
|
|
630
631
|
}],
|
|
631
|
-
onReset: (e) =>
|
|
632
|
-
}) : /* @__PURE__ */
|
|
632
|
+
onReset: (e) => Z(i?.start ?? null, i?.end ?? null, "reset", e)
|
|
633
|
+
}) : /* @__PURE__ */ k(ie, { children: [b !== void 0 && /* @__PURE__ */ O(n, {
|
|
633
634
|
component: "dateField.label",
|
|
634
635
|
display: "block",
|
|
635
636
|
mb: 1.5,
|
|
636
637
|
fontSize: 14,
|
|
637
|
-
id: `${
|
|
638
|
-
children:
|
|
639
|
-
}), /* @__PURE__ */
|
|
640
|
-
ref:
|
|
638
|
+
id: `${K}-label`,
|
|
639
|
+
children: b
|
|
640
|
+
}), /* @__PURE__ */ k(n, {
|
|
641
|
+
ref: q,
|
|
641
642
|
component: "dateField",
|
|
642
643
|
display: "inline-flex",
|
|
643
644
|
ai: "center",
|
|
644
645
|
gap: 2,
|
|
645
646
|
px: 3,
|
|
646
647
|
py: 2,
|
|
647
|
-
...
|
|
648
|
-
variant: [
|
|
649
|
-
disabled:
|
|
650
|
-
invalid: h ??
|
|
648
|
+
...ge,
|
|
649
|
+
variant: [ge.variant, {
|
|
650
|
+
disabled: d,
|
|
651
|
+
invalid: h ?? X
|
|
651
652
|
}],
|
|
652
653
|
props: {
|
|
653
654
|
role: "group",
|
|
654
|
-
"aria-labelledby": [
|
|
655
|
-
"aria-invalid": (h ??
|
|
656
|
-
"aria-describedby":
|
|
655
|
+
"aria-labelledby": [b === void 0 ? void 0 : `${K}-label`, S].filter(Boolean).join(" ") || void 0,
|
|
656
|
+
"aria-invalid": (h ?? X) || void 0,
|
|
657
|
+
"aria-describedby": C,
|
|
657
658
|
...he
|
|
658
659
|
},
|
|
659
660
|
children: [
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
...
|
|
662
|
-
value:
|
|
663
|
-
onValueChange: (e, t) =>
|
|
664
|
-
name:
|
|
665
|
-
props: { "aria-label":
|
|
666
|
-
invalid: h ??
|
|
661
|
+
/* @__PURE__ */ O(te, {
|
|
662
|
+
...Q,
|
|
663
|
+
value: V,
|
|
664
|
+
onValueChange: (e, t) => Z(e, H, t.reason, t.event),
|
|
665
|
+
name: g,
|
|
666
|
+
props: { "aria-label": w },
|
|
667
|
+
invalid: h ?? X
|
|
667
668
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ O(n, {
|
|
669
670
|
component: "dateField.literal",
|
|
670
671
|
props: { "aria-hidden": !0 },
|
|
671
672
|
children: "–"
|
|
672
673
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
...
|
|
675
|
-
value:
|
|
676
|
-
onValueChange: (e, t) =>
|
|
674
|
+
/* @__PURE__ */ O(te, {
|
|
675
|
+
...Q,
|
|
676
|
+
value: H,
|
|
677
|
+
onValueChange: (e, t) => Z(V, e, t.reason, t.event),
|
|
677
678
|
name: y,
|
|
678
|
-
props: { "aria-label":
|
|
679
|
-
invalid: h ??
|
|
679
|
+
props: { "aria-label": T },
|
|
680
|
+
invalid: h ?? X
|
|
680
681
|
}),
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ k(n, {
|
|
682
683
|
display: "inline-flex",
|
|
683
684
|
ai: "center",
|
|
684
685
|
gap: 2,
|
|
685
686
|
ms: "auto",
|
|
686
|
-
children: [Se, /* @__PURE__ */
|
|
687
|
+
children: [Se, /* @__PURE__ */ O(n, {
|
|
687
688
|
tag: "button",
|
|
688
|
-
ref:
|
|
689
|
+
ref: U,
|
|
689
690
|
component: "datePicker.trigger",
|
|
690
691
|
display: "inline-flex",
|
|
691
692
|
ai: "center",
|
|
@@ -694,45 +695,45 @@ function N(e, n) {
|
|
|
694
695
|
height: 7,
|
|
695
696
|
me: -1.5,
|
|
696
697
|
borderRadius: 1.5,
|
|
697
|
-
disabled:
|
|
698
|
+
disabled: d || p,
|
|
698
699
|
props: {
|
|
699
700
|
type: "button",
|
|
700
|
-
"aria-label":
|
|
701
|
-
tabIndex:
|
|
702
|
-
...
|
|
701
|
+
"aria-label": Y ? `${L}, ${Y}` : L,
|
|
702
|
+
tabIndex: R,
|
|
703
|
+
...W
|
|
703
704
|
},
|
|
704
|
-
children: /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ O(A, {})
|
|
705
706
|
})]
|
|
706
707
|
})
|
|
707
708
|
]
|
|
708
709
|
})] });
|
|
709
|
-
return /* @__PURE__ */
|
|
710
|
+
return /* @__PURE__ */ k(v, { children: [we, J(/* @__PURE__ */ k(n, {
|
|
710
711
|
display: "flex",
|
|
711
712
|
gap: 3,
|
|
712
713
|
ai: "stretch",
|
|
713
|
-
children: [
|
|
714
|
-
presets:
|
|
715
|
-
isSelected: (e) =>
|
|
714
|
+
children: [me && me.length > 0 && /* @__PURE__ */ O(ce, {
|
|
715
|
+
presets: me,
|
|
716
|
+
isSelected: (e) => z !== null && e.start === z.start && e.end === z.end,
|
|
716
717
|
onSelect: (e, t) => {
|
|
717
|
-
|
|
718
|
+
Z(e.start, e.end, "preset", t), j && xe(t);
|
|
718
719
|
}
|
|
719
|
-
}), /* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ O(x, {
|
|
720
721
|
mode: "range",
|
|
721
|
-
months:
|
|
722
|
-
value:
|
|
723
|
-
defaultFocusedDate:
|
|
722
|
+
months: N,
|
|
723
|
+
value: z,
|
|
724
|
+
defaultFocusedDate: V ?? void 0,
|
|
724
725
|
onValueChange: (e, t) => {
|
|
725
|
-
|
|
726
|
+
Z(e?.start ?? null, e?.end ?? null, "select", t.event), j && e && t.event && xe(t.event);
|
|
726
727
|
},
|
|
727
728
|
min: c,
|
|
728
729
|
max: l,
|
|
729
730
|
isDateUnavailable: u,
|
|
730
731
|
locale: s,
|
|
731
|
-
firstDayOfWeek:
|
|
732
|
-
weekNumbers:
|
|
732
|
+
firstDayOfWeek: se,
|
|
733
|
+
weekNumbers: M
|
|
733
734
|
})]
|
|
734
735
|
}))] });
|
|
735
736
|
}
|
|
736
|
-
var P = e(M, "DatePicker"),
|
|
737
|
+
var P = e(M, "DatePicker"), F = e(N, "DateRangePicker");
|
|
737
738
|
//#endregion
|
|
738
|
-
export {
|
|
739
|
+
export { F as DateRangePicker, P as default };
|