@epam/ai-dial-ui-kit 0.16.0-dev.20 → 0.16.0-dev.22
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/README.md +2 -0
- package/dist/CHANGELOG.md +2 -0
- package/dist/{DateCellRenderer-DDEzIi2B.cjs → DateCellRenderer-BEZLnOm0.cjs} +1 -1
- package/dist/JsonEditor-eAV7SaKu.cjs +1 -0
- package/dist/{MarkdownEditor-BKtFs714.cjs → MarkdownEditor-Cp-KX6-T.cjs} +1 -1
- package/dist/{MarkdownEditor-Bapd1ycU.cjs → MarkdownEditor-Dav_pp0T.cjs} +1 -1
- package/dist/MarkdownEditorContainer-D8YTX8EM.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Calendar/Calendar.js +288 -216
- package/dist/components/New/Calendar/TimePickerPanel.js +87 -0
- package/dist/components/New/Calendar/constants.js +26 -24
- package/dist/components/New/ResizeHandle/ResizeHandle.js +147 -0
- package/dist/components-manifest.json +78 -4
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/dial-ui-kit.js +174 -172
- package/dist/editor-BH6_A1k2.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-DMVYJhUR.cjs +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +7 -0
- package/dist/src/components/New/Calendar/TimePickerPanel.d.ts +15 -0
- package/dist/src/components/New/Calendar/constants.d.ts +2 -0
- package/dist/src/components/New/ResizeHandle/ResizeHandle.d.ts +68 -0
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/JsonEditor-Bxui5wJH.cjs +0 -1
- package/dist/MarkdownEditorContainer-DLPODjar.cjs +0 -1
- package/dist/lazy-_W6FYhKg.cjs +0 -1
|
@@ -1,234 +1,306 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { IconChevronDown as
|
|
4
|
-
import { useId as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { StaticIconButton as
|
|
7
|
-
import { DIAL_KIT_ICON_STROKE as
|
|
8
|
-
import { DIAL_ICON_SIZE as
|
|
9
|
-
import { CalendarMode as
|
|
10
|
-
import { ElementSize as
|
|
11
|
-
import { useThemeScope as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as X, autoUpdate as ee, offset as te, flip as ae, shift as le, useDismiss as ne, useRole as se, useInteractions as re, FloatingPortal as ie, FloatingFocusManager as oe, useClick as Ce } from "@floating-ui/react";
|
|
3
|
+
import { IconChevronDown as De, IconClock as Ie } from "@tabler/icons-react";
|
|
4
|
+
import { useId as Fe, useState as _, useMemo as P, useEffect as Le } from "react";
|
|
5
|
+
import { Label as Se } from "../Label/Label.js";
|
|
6
|
+
import { StaticIconButton as W } from "../IconButton/IconButtonWrappers.js";
|
|
7
|
+
import { DIAL_KIT_ICON_STROKE as ce } from "../constants/icon.js";
|
|
8
|
+
import { DIAL_ICON_SIZE as de } from "../../../constants/icon.js";
|
|
9
|
+
import { CalendarMode as F } from "../../../types/calendar.js";
|
|
10
|
+
import { ElementSize as U } from "../../../types/size.js";
|
|
11
|
+
import { useThemeScope as me } from "../ThemeScope/ThemeScope.js";
|
|
12
12
|
import { mergeClasses as i } from "../../../utils/merge-classes.js";
|
|
13
13
|
import { getTimezoneLabel as Te } from "../../../utils/timezone.js";
|
|
14
|
-
import { DEFAULT_CALENDAR_LOCALE as
|
|
15
|
-
import { getWeekdayShortLabels as
|
|
16
|
-
import { DIAL_KIT_CLASS as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
import { DEFAULT_CALENDAR_LOCALE as Me, calendarModeDefaultPlaceholder as Oe, calendarFieldIconClassName as ke, calendarNavIcons as Y, calendarDaySelectedClassName as we, calendarDayTodayClassName as Pe, calendarDayOutsideClassName as Ae, calendarDayButtonBaseClassName as Ee, calendarIcon as _e, calendarFieldDisabledClassName as pe, calendarFieldInvalidClassName as fe, calendarFieldBaseClassName as ue, timePickerButtonClassName as Be, timePickerPopoverClassName as Re, calendarPopoverClassName as ze } from "./constants.js";
|
|
15
|
+
import { getWeekdayShortLabels as $e, getWeekdayOptions as je, getMonthGrid as Ve, formatTimeLabel as E, formatMonthLabel as Ke, isSameDay as G, isDateOutOfRange as Z, formatDayAriaLabel as We, sanitizeTimeInput as Ue, isCompleteTimeString as Ye, setTimeOnDate as q, formatDateLabel as H } from "./utils.js";
|
|
16
|
+
import { DIAL_KIT_CLASS as z } from "../../../constants/public-class-names.js";
|
|
17
|
+
import { TimePickerPanel as Ge } from "./TimePickerPanel.js";
|
|
18
|
+
const J = ({
|
|
19
|
+
id: m,
|
|
20
|
+
disabled: l,
|
|
21
|
+
invalid: g,
|
|
22
|
+
trigger: L,
|
|
23
|
+
panelClassName: r,
|
|
24
|
+
fieldClassName: T,
|
|
25
|
+
panel: N,
|
|
26
|
+
labelledBy: C,
|
|
27
|
+
panelLabel: M
|
|
27
28
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
open:
|
|
30
|
-
onOpenChange: (
|
|
29
|
+
const b = me(), [v, p] = _(!1), { refs: n, floatingStyles: x, context: f } = X({
|
|
30
|
+
open: v,
|
|
31
|
+
onOpenChange: (S) => p(l ? !1 : S),
|
|
31
32
|
placement: "bottom-start",
|
|
32
|
-
whileElementsMounted:
|
|
33
|
-
middleware: [
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
whileElementsMounted: ee,
|
|
34
|
+
middleware: [te(8), ae({ padding: 8 }), le({ padding: 8 })]
|
|
35
|
+
}), D = Ce(f, { enabled: !l }), h = ne(f), a = se(f, { role: "dialog" }), { getReferenceProps: O, getFloatingProps: o } = re([
|
|
36
|
+
D,
|
|
37
|
+
h,
|
|
38
|
+
a
|
|
38
39
|
]);
|
|
39
|
-
return /* @__PURE__ */ d(
|
|
40
|
+
return /* @__PURE__ */ d(A, { children: [
|
|
40
41
|
/* @__PURE__ */ e(
|
|
41
42
|
"div",
|
|
42
43
|
{
|
|
43
|
-
id:
|
|
44
|
-
ref:
|
|
44
|
+
id: m,
|
|
45
|
+
ref: n.setReference,
|
|
45
46
|
role: "button",
|
|
46
47
|
"aria-haspopup": "dialog",
|
|
47
|
-
"aria-expanded":
|
|
48
|
-
"aria-disabled":
|
|
49
|
-
"aria-labelledby":
|
|
50
|
-
tabIndex:
|
|
48
|
+
"aria-expanded": v,
|
|
49
|
+
"aria-disabled": l,
|
|
50
|
+
"aria-labelledby": C,
|
|
51
|
+
tabIndex: l ? -1 : 0,
|
|
51
52
|
className: i(
|
|
52
|
-
|
|
53
|
+
ue,
|
|
53
54
|
"focus-visible:outline focus-visible:outline-focus",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
g && fe,
|
|
56
|
+
l && pe,
|
|
57
|
+
T
|
|
57
58
|
),
|
|
58
|
-
...
|
|
59
|
-
children:
|
|
59
|
+
...O(),
|
|
60
|
+
children: L
|
|
60
61
|
}
|
|
61
62
|
),
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
v && /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(
|
|
64
|
+
oe,
|
|
64
65
|
{
|
|
65
|
-
context:
|
|
66
|
+
context: f,
|
|
66
67
|
modal: !1,
|
|
67
68
|
initialFocus: -1,
|
|
68
69
|
returnFocus: !0,
|
|
69
70
|
children: /* @__PURE__ */ e(
|
|
70
71
|
"div",
|
|
71
72
|
{
|
|
72
|
-
ref:
|
|
73
|
-
style:
|
|
74
|
-
"aria-label":
|
|
73
|
+
ref: n.setFloating,
|
|
74
|
+
style: x,
|
|
75
|
+
"aria-label": M,
|
|
75
76
|
className: i(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
ze,
|
|
78
|
+
b,
|
|
79
|
+
r
|
|
79
80
|
),
|
|
80
|
-
...
|
|
81
|
-
children:
|
|
81
|
+
...o(),
|
|
82
|
+
children: N(() => p(!1))
|
|
82
83
|
}
|
|
83
84
|
)
|
|
84
85
|
}
|
|
85
86
|
) })
|
|
86
87
|
] });
|
|
87
|
-
},
|
|
88
|
-
id:
|
|
89
|
-
value:
|
|
90
|
-
onChange:
|
|
91
|
-
onBlur:
|
|
92
|
-
disabled:
|
|
93
|
-
invalid:
|
|
94
|
-
className:
|
|
95
|
-
ariaLabel:
|
|
96
|
-
placeholder:
|
|
97
|
-
timezoneLabel:
|
|
98
|
-
timezoneLabelClassName:
|
|
88
|
+
}, Q = ({
|
|
89
|
+
id: m,
|
|
90
|
+
value: l,
|
|
91
|
+
onChange: g,
|
|
92
|
+
onBlur: L,
|
|
93
|
+
disabled: r,
|
|
94
|
+
invalid: T,
|
|
95
|
+
className: N,
|
|
96
|
+
ariaLabel: C,
|
|
97
|
+
placeholder: M = "--:--",
|
|
98
|
+
timezoneLabel: b,
|
|
99
|
+
timezoneLabelClassName: v,
|
|
100
|
+
picker: p = !1
|
|
99
101
|
}) => {
|
|
100
|
-
const [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
const [n, x] = _(l), [f, D] = _(!1), h = me(), { refs: a, floatingStyles: O, context: o } = X({
|
|
103
|
+
open: f,
|
|
104
|
+
onOpenChange: (c) => D(r ? !1 : c),
|
|
105
|
+
placement: "bottom-start",
|
|
106
|
+
whileElementsMounted: ee,
|
|
107
|
+
middleware: [te(8), ae({ padding: 8 }), le({ padding: 8 })]
|
|
108
|
+
}), S = ne(o), B = se(o, { role: "dialog" }), { getFloatingProps: k } = re([S, B]);
|
|
109
|
+
Le(() => {
|
|
110
|
+
x(l);
|
|
111
|
+
}, [l]);
|
|
112
|
+
const w = /* @__PURE__ */ e(
|
|
105
113
|
"input",
|
|
106
114
|
{
|
|
107
|
-
id:
|
|
115
|
+
id: m,
|
|
108
116
|
type: "text",
|
|
109
117
|
inputMode: "numeric",
|
|
110
118
|
autoComplete: "off",
|
|
111
|
-
"aria-label":
|
|
112
|
-
placeholder:
|
|
113
|
-
disabled:
|
|
114
|
-
value:
|
|
115
|
-
onChange: (
|
|
116
|
-
const
|
|
117
|
-
|
|
119
|
+
"aria-label": C,
|
|
120
|
+
placeholder: M,
|
|
121
|
+
disabled: r,
|
|
122
|
+
value: n,
|
|
123
|
+
onChange: (c) => {
|
|
124
|
+
const u = Ue(c.target.value);
|
|
125
|
+
x(u), Ye(u) && g(u);
|
|
118
126
|
},
|
|
119
|
-
onBlur:
|
|
127
|
+
onBlur: L,
|
|
120
128
|
className: i(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
ue,
|
|
130
|
+
T && fe,
|
|
131
|
+
r && pe,
|
|
132
|
+
p && "pe-12",
|
|
133
|
+
N
|
|
125
134
|
)
|
|
126
135
|
}
|
|
127
136
|
);
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
return !b && !p ? w : /* @__PURE__ */ d(
|
|
138
|
+
"div",
|
|
139
|
+
{
|
|
140
|
+
ref: p ? a.setReference : void 0,
|
|
141
|
+
className: "relative w-full",
|
|
142
|
+
children: [
|
|
143
|
+
w,
|
|
144
|
+
b && /* @__PURE__ */ e(
|
|
145
|
+
"span",
|
|
146
|
+
{
|
|
147
|
+
className: i(
|
|
148
|
+
"dial-small-paragraph-text pointer-events-none absolute end-4 top-1/2 -translate-y-1/2 truncate text-secondary",
|
|
149
|
+
p && "end-12",
|
|
150
|
+
v
|
|
151
|
+
),
|
|
152
|
+
children: b
|
|
153
|
+
}
|
|
136
154
|
),
|
|
137
|
-
children:
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
p && /* @__PURE__ */ d(A, { children: [
|
|
156
|
+
/* @__PURE__ */ e(
|
|
157
|
+
"button",
|
|
158
|
+
{
|
|
159
|
+
type: "button",
|
|
160
|
+
"aria-label": "Choose time",
|
|
161
|
+
"aria-haspopup": "dialog",
|
|
162
|
+
"aria-expanded": f,
|
|
163
|
+
disabled: r,
|
|
164
|
+
className: Be,
|
|
165
|
+
onClick: () => D((c) => !c),
|
|
166
|
+
children: /* @__PURE__ */ e(
|
|
167
|
+
Ie,
|
|
168
|
+
{
|
|
169
|
+
size: de.MD,
|
|
170
|
+
stroke: ce,
|
|
171
|
+
"aria-hidden": "true"
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
f && /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e(
|
|
177
|
+
oe,
|
|
178
|
+
{
|
|
179
|
+
context: o,
|
|
180
|
+
modal: !1,
|
|
181
|
+
initialFocus: -1,
|
|
182
|
+
returnFocus: !0,
|
|
183
|
+
children: /* @__PURE__ */ e(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
ref: a.setFloating,
|
|
187
|
+
style: O,
|
|
188
|
+
"aria-label": "Choose time",
|
|
189
|
+
className: i(
|
|
190
|
+
Re,
|
|
191
|
+
h
|
|
192
|
+
),
|
|
193
|
+
...k(),
|
|
194
|
+
children: /* @__PURE__ */ e(
|
|
195
|
+
Ge,
|
|
196
|
+
{
|
|
197
|
+
value: n,
|
|
198
|
+
onSelect: (c, u) => {
|
|
199
|
+
x(c), g(c), u && D(!1);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
) })
|
|
207
|
+
] })
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
}, mt = ({
|
|
212
|
+
mode: m = F.Date,
|
|
213
|
+
value: l,
|
|
214
|
+
onChange: g,
|
|
215
|
+
onBlur: L,
|
|
216
|
+
labelProps: r,
|
|
217
|
+
placeholder: T,
|
|
218
|
+
disabled: N = !1,
|
|
219
|
+
invalid: C = !1,
|
|
220
|
+
id: M,
|
|
221
|
+
className: b,
|
|
222
|
+
minDate: v,
|
|
223
|
+
maxDate: p,
|
|
224
|
+
locale: n = Me,
|
|
225
|
+
fieldClassName: x,
|
|
226
|
+
showTimezone: f = !1,
|
|
227
|
+
showTimePicker: D = !0
|
|
157
228
|
}) => {
|
|
158
|
-
const
|
|
159
|
-
() =>
|
|
160
|
-
),
|
|
161
|
-
() =>
|
|
162
|
-
[
|
|
163
|
-
),
|
|
164
|
-
() =>
|
|
165
|
-
[
|
|
166
|
-
), $ =
|
|
167
|
-
() =>
|
|
168
|
-
[
|
|
169
|
-
), j = (
|
|
170
|
-
|
|
171
|
-
(t) => new Date(t.getFullYear(), t.getMonth() +
|
|
229
|
+
const h = T ?? Oe[m], a = l instanceof Date ? l : null, O = Fe(), o = M ?? O, S = r?.id ?? `${o}-label`, B = !!r?.label, k = typeof r?.label == "string" ? r.label : void 0, w = B ? `${S} ${o}` : void 0, c = r ? /* @__PURE__ */ e(Se, { ...r, id: S, htmlFor: o }) : null, [u, he] = _(
|
|
230
|
+
() => a ?? /* @__PURE__ */ new Date()
|
|
231
|
+
), ge = P(() => /* @__PURE__ */ new Date(), []), R = P(
|
|
232
|
+
() => f ? Te({ locale: n }) : null,
|
|
233
|
+
[f, n]
|
|
234
|
+
), be = P(
|
|
235
|
+
() => $e(n),
|
|
236
|
+
[n]
|
|
237
|
+
), $ = P(() => je(n), [n]), xe = P(
|
|
238
|
+
() => Ve(u.getFullYear(), u.getMonth()),
|
|
239
|
+
[u]
|
|
240
|
+
), j = (s) => {
|
|
241
|
+
he(
|
|
242
|
+
(t) => new Date(t.getFullYear(), t.getMonth() + s, 1)
|
|
172
243
|
);
|
|
173
|
-
},
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
},
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
244
|
+
}, ye = (s, t) => {
|
|
245
|
+
if (Z(s, v, p)) return;
|
|
246
|
+
const I = m === F.DateTime && a ? q(s, E(a)) : s;
|
|
247
|
+
g?.(I), m === F.Date && t();
|
|
248
|
+
}, ve = (s) => {
|
|
249
|
+
g?.(q(a ?? /* @__PURE__ */ new Date(), s));
|
|
250
|
+
}, Ne = () => a ? m === F.DateTime ? `${H(a, n)}, ${E(a)}` : H(a, n) : h;
|
|
251
|
+
if (m === F.Time) {
|
|
252
|
+
const s = typeof l == "string" ? l : a ? E(a) : "";
|
|
182
253
|
return /* @__PURE__ */ d(
|
|
183
254
|
"div",
|
|
184
255
|
{
|
|
185
256
|
className: i(
|
|
186
257
|
"flex flex-col gap-y-3",
|
|
187
|
-
|
|
188
|
-
|
|
258
|
+
b,
|
|
259
|
+
z.calendar
|
|
189
260
|
),
|
|
190
261
|
children: [
|
|
191
|
-
|
|
262
|
+
c,
|
|
192
263
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
264
|
+
Q,
|
|
194
265
|
{
|
|
195
|
-
id:
|
|
196
|
-
value:
|
|
197
|
-
onChange: (t) =>
|
|
198
|
-
onBlur:
|
|
199
|
-
disabled:
|
|
200
|
-
invalid:
|
|
201
|
-
placeholder:
|
|
202
|
-
className:
|
|
203
|
-
timezoneLabel:
|
|
266
|
+
id: o,
|
|
267
|
+
value: s,
|
|
268
|
+
onChange: (t) => g?.(t),
|
|
269
|
+
onBlur: L,
|
|
270
|
+
disabled: N,
|
|
271
|
+
invalid: C,
|
|
272
|
+
placeholder: h,
|
|
273
|
+
className: x,
|
|
274
|
+
timezoneLabel: R,
|
|
275
|
+
picker: D
|
|
204
276
|
}
|
|
205
277
|
)
|
|
206
278
|
]
|
|
207
279
|
}
|
|
208
280
|
);
|
|
209
281
|
}
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
282
|
+
if (m === F.Weekday) {
|
|
283
|
+
const s = typeof l == "string" ? l : void 0, t = $.find((I) => I.value === s);
|
|
212
284
|
return /* @__PURE__ */ d(
|
|
213
285
|
"div",
|
|
214
286
|
{
|
|
215
287
|
className: i(
|
|
216
288
|
"flex flex-col gap-y-3",
|
|
217
|
-
|
|
218
|
-
|
|
289
|
+
b,
|
|
290
|
+
z.calendar
|
|
219
291
|
),
|
|
220
292
|
children: [
|
|
221
|
-
|
|
293
|
+
c,
|
|
222
294
|
/* @__PURE__ */ e(
|
|
223
|
-
|
|
295
|
+
J,
|
|
224
296
|
{
|
|
225
|
-
id:
|
|
226
|
-
disabled:
|
|
227
|
-
invalid:
|
|
228
|
-
labelledBy:
|
|
229
|
-
panelLabel:
|
|
230
|
-
fieldClassName:
|
|
231
|
-
trigger: /* @__PURE__ */ d(
|
|
297
|
+
id: o,
|
|
298
|
+
disabled: N,
|
|
299
|
+
invalid: C,
|
|
300
|
+
labelledBy: w,
|
|
301
|
+
panelLabel: k ?? h,
|
|
302
|
+
fieldClassName: x,
|
|
303
|
+
trigger: /* @__PURE__ */ d(A, { children: [
|
|
232
304
|
/* @__PURE__ */ e(
|
|
233
305
|
"span",
|
|
234
306
|
{
|
|
@@ -236,42 +308,42 @@ const H = ({
|
|
|
236
308
|
"truncate",
|
|
237
309
|
!t && "text-secondary"
|
|
238
310
|
),
|
|
239
|
-
children: t?.label ??
|
|
311
|
+
children: t?.label ?? h
|
|
240
312
|
}
|
|
241
313
|
),
|
|
242
314
|
/* @__PURE__ */ e(
|
|
243
|
-
|
|
315
|
+
De,
|
|
244
316
|
{
|
|
245
|
-
size:
|
|
246
|
-
stroke:
|
|
317
|
+
size: de.MD,
|
|
318
|
+
stroke: ce,
|
|
247
319
|
"aria-hidden": "true",
|
|
248
|
-
className:
|
|
320
|
+
className: ke
|
|
249
321
|
}
|
|
250
322
|
)
|
|
251
323
|
] }),
|
|
252
|
-
panel: (
|
|
324
|
+
panel: (I) => /* @__PURE__ */ e(
|
|
253
325
|
"div",
|
|
254
326
|
{
|
|
255
327
|
role: "listbox",
|
|
256
|
-
"aria-label":
|
|
328
|
+
"aria-label": k ?? h,
|
|
257
329
|
className: "flex flex-col gap-0.5",
|
|
258
|
-
children: $.map((
|
|
330
|
+
children: $.map((y) => /* @__PURE__ */ e(
|
|
259
331
|
"button",
|
|
260
332
|
{
|
|
261
333
|
type: "button",
|
|
262
334
|
role: "option",
|
|
263
|
-
"aria-selected":
|
|
335
|
+
"aria-selected": y.value === s,
|
|
264
336
|
className: i(
|
|
265
337
|
"flex w-full items-center rounded-lg px-3 py-2 text-left dial-small-text text-primary hover:bg-control-accent-alpha-hover",
|
|
266
338
|
"focus-visible:outline focus-visible:outline-focus",
|
|
267
|
-
|
|
339
|
+
y.value === s && "bg-control-accent-alpha-hover"
|
|
268
340
|
),
|
|
269
341
|
onClick: () => {
|
|
270
|
-
|
|
342
|
+
g?.(y.value), I();
|
|
271
343
|
},
|
|
272
|
-
children:
|
|
344
|
+
children: y.label
|
|
273
345
|
},
|
|
274
|
-
|
|
346
|
+
y.value
|
|
275
347
|
))
|
|
276
348
|
}
|
|
277
349
|
)
|
|
@@ -286,41 +358,41 @@ const H = ({
|
|
|
286
358
|
{
|
|
287
359
|
className: i(
|
|
288
360
|
"flex flex-col gap-y-3",
|
|
289
|
-
|
|
290
|
-
|
|
361
|
+
b,
|
|
362
|
+
z.calendar
|
|
291
363
|
),
|
|
292
364
|
children: [
|
|
293
|
-
|
|
365
|
+
c,
|
|
294
366
|
/* @__PURE__ */ e(
|
|
295
|
-
|
|
367
|
+
J,
|
|
296
368
|
{
|
|
297
|
-
id:
|
|
298
|
-
disabled:
|
|
299
|
-
invalid:
|
|
300
|
-
labelledBy:
|
|
301
|
-
panelLabel:
|
|
302
|
-
fieldClassName:
|
|
303
|
-
trigger: /* @__PURE__ */ d(
|
|
369
|
+
id: o,
|
|
370
|
+
disabled: N,
|
|
371
|
+
invalid: C,
|
|
372
|
+
labelledBy: w,
|
|
373
|
+
panelLabel: k ?? h,
|
|
374
|
+
fieldClassName: x,
|
|
375
|
+
trigger: /* @__PURE__ */ d(A, { children: [
|
|
304
376
|
/* @__PURE__ */ e(
|
|
305
377
|
"span",
|
|
306
378
|
{
|
|
307
379
|
className: i(
|
|
308
380
|
"truncate",
|
|
309
|
-
!
|
|
381
|
+
!a && "text-secondary"
|
|
310
382
|
),
|
|
311
|
-
children:
|
|
383
|
+
children: Ne()
|
|
312
384
|
}
|
|
313
385
|
),
|
|
314
386
|
_e
|
|
315
387
|
] }),
|
|
316
|
-
panel: (
|
|
388
|
+
panel: (s) => /* @__PURE__ */ d(A, { children: [
|
|
317
389
|
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
318
390
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
391
|
+
W,
|
|
320
392
|
{
|
|
321
393
|
"aria-label": "Previous month",
|
|
322
|
-
icon:
|
|
323
|
-
size:
|
|
394
|
+
icon: Y.prev,
|
|
395
|
+
size: U.Small,
|
|
324
396
|
onClick: () => j(-1)
|
|
325
397
|
}
|
|
326
398
|
),
|
|
@@ -329,21 +401,21 @@ const H = ({
|
|
|
329
401
|
{
|
|
330
402
|
className: "dial-small-semi-text text-primary",
|
|
331
403
|
"aria-live": "polite",
|
|
332
|
-
children:
|
|
404
|
+
children: Ke(u, n)
|
|
333
405
|
}
|
|
334
406
|
),
|
|
335
407
|
/* @__PURE__ */ e(
|
|
336
|
-
|
|
408
|
+
W,
|
|
337
409
|
{
|
|
338
410
|
"aria-label": "Next month",
|
|
339
|
-
icon:
|
|
340
|
-
size:
|
|
411
|
+
icon: Y.next,
|
|
412
|
+
size: U.Small,
|
|
341
413
|
onClick: () => j(1)
|
|
342
414
|
}
|
|
343
415
|
)
|
|
344
416
|
] }),
|
|
345
417
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
346
|
-
|
|
418
|
+
be.map((t) => /* @__PURE__ */ e(
|
|
347
419
|
"div",
|
|
348
420
|
{
|
|
349
421
|
"aria-hidden": "true",
|
|
@@ -352,44 +424,44 @@ const H = ({
|
|
|
352
424
|
},
|
|
353
425
|
t
|
|
354
426
|
)),
|
|
355
|
-
|
|
356
|
-
const
|
|
427
|
+
xe.map((t) => {
|
|
428
|
+
const I = t.getMonth() !== u.getMonth(), y = G(t, a), V = G(t, ge), K = Z(t, v, p);
|
|
357
429
|
return /* @__PURE__ */ e(
|
|
358
430
|
"button",
|
|
359
431
|
{
|
|
360
432
|
type: "button",
|
|
361
433
|
disabled: K,
|
|
362
|
-
"aria-label":
|
|
363
|
-
"aria-pressed":
|
|
434
|
+
"aria-label": We(t, n),
|
|
435
|
+
"aria-pressed": y,
|
|
364
436
|
"aria-current": V ? "date" : void 0,
|
|
365
437
|
className: i(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
V && !
|
|
369
|
-
|
|
438
|
+
Ee,
|
|
439
|
+
I && Ae,
|
|
440
|
+
V && !y && Pe,
|
|
441
|
+
y && we,
|
|
370
442
|
K && "cursor-not-allowed opacity-40 hover:bg-transparent"
|
|
371
443
|
),
|
|
372
|
-
onClick: () =>
|
|
444
|
+
onClick: () => ye(t, s),
|
|
373
445
|
children: t.getDate()
|
|
374
446
|
},
|
|
375
447
|
t.toISOString()
|
|
376
448
|
);
|
|
377
449
|
})
|
|
378
450
|
] }),
|
|
379
|
-
|
|
451
|
+
m === F.DateTime && /* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-3 border-t border-secondary pt-3", children: [
|
|
380
452
|
/* @__PURE__ */ e("span", { className: "dial-small-text text-primary", children: "Time" }),
|
|
381
453
|
/* @__PURE__ */ e(
|
|
382
|
-
|
|
454
|
+
Q,
|
|
383
455
|
{
|
|
384
456
|
ariaLabel: "Time",
|
|
385
|
-
value:
|
|
386
|
-
onChange:
|
|
387
|
-
onBlur:
|
|
457
|
+
value: a ? E(a) : "",
|
|
458
|
+
onChange: ve,
|
|
459
|
+
onBlur: L,
|
|
388
460
|
className: i(
|
|
389
|
-
!
|
|
461
|
+
!R && "w-[120px]",
|
|
390
462
|
"px-3 py-1.5"
|
|
391
463
|
),
|
|
392
|
-
timezoneLabel:
|
|
464
|
+
timezoneLabel: R,
|
|
393
465
|
timezoneLabelClassName: "end-3 max-w-[60%]"
|
|
394
466
|
}
|
|
395
467
|
)
|
|
@@ -402,5 +474,5 @@ const H = ({
|
|
|
402
474
|
);
|
|
403
475
|
};
|
|
404
476
|
export {
|
|
405
|
-
|
|
477
|
+
mt as Calendar
|
|
406
478
|
};
|