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