@epam/ai-dial-ui-kit 0.15.0-dev.2 → 0.15.0-dev.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/New/Calendar/Calendar.js +218 -206
- package/dist/components-manifest.json +19 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +202 -200
- package/dist/index.css +1 -1
- package/dist/src/components/New/Calendar/Calendar.d.ts +7 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/utils/__tests__/timezone.spec.d.ts +1 -0
- package/dist/src/utils/timezone.d.ts +24 -0
- package/dist/utils/timezone.js +19 -0
- package/package.json +2 -2
|
@@ -1,232 +1,244 @@
|
|
|
1
|
-
import { jsx 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
|
|
12
|
-
import { mergeClasses as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as se, autoUpdate as ie, offset as oe, flip as ce, shift as de, useClick as me, useDismiss as pe, useRole as ue, useInteractions as fe, FloatingPortal as he, FloatingFocusManager as ge } from "@floating-ui/react";
|
|
3
|
+
import { IconChevronDown as be } from "@tabler/icons-react";
|
|
4
|
+
import { useId as xe, useState as E, useMemo as F, useEffect as ye } from "react";
|
|
5
|
+
import { Label as ve } from "../Label/Label.js";
|
|
6
|
+
import { StaticIconButton as j } from "../IconButton/IconButtonWrappers.js";
|
|
7
|
+
import { DIAL_KIT_ICON_STROKE as Ne } from "../constants/icon.js";
|
|
8
|
+
import { DIAL_ICON_SIZE as De } from "../../../constants/icon.js";
|
|
9
|
+
import { CalendarMode as N } from "../../../types/calendar.js";
|
|
10
|
+
import { ElementSize as V } from "../../../types/size.js";
|
|
11
|
+
import { useThemeScope as Ce } from "../ThemeScope/ThemeScope.js";
|
|
12
|
+
import { mergeClasses as d } from "../../../utils/merge-classes.js";
|
|
13
|
+
import { getTimezoneLabel as Ie } from "../../../utils/timezone.js";
|
|
14
|
+
import { DEFAULT_CALENDAR_LOCALE as Le, calendarModeDefaultPlaceholder as Te, calendarFieldIconClassName as Fe, calendarNavIcons as P, calendarDaySelectedClassName as Se, calendarDayTodayClassName as Me, calendarDayOutsideClassName as Oe, calendarDayButtonBaseClassName as we, calendarIcon as ke, calendarFieldDisabledClassName as q, calendarFieldInvalidClassName as H, calendarFieldBaseClassName as J, calendarPopoverClassName as Be } from "./constants.js";
|
|
15
|
+
import { getWeekdayShortLabels as Ee, getWeekdayOptions as Ae, getMonthGrid as _e, formatTimeLabel as M, formatMonthLabel as Re, isSameDay as W, isDateOutOfRange as K, formatDayAriaLabel as ze, sanitizeTimeInput as $e, isCompleteTimeString as je, setTimeOnDate as U, formatDateLabel as Y } from "./utils.js";
|
|
16
|
+
const G = ({
|
|
16
17
|
id: s,
|
|
17
|
-
disabled:
|
|
18
|
-
invalid:
|
|
18
|
+
disabled: a,
|
|
19
|
+
invalid: u,
|
|
19
20
|
trigger: i,
|
|
20
|
-
panelClassName:
|
|
21
|
-
fieldClassName:
|
|
22
|
-
panel:
|
|
23
|
-
labelledBy:
|
|
24
|
-
panelLabel:
|
|
21
|
+
panelClassName: C,
|
|
22
|
+
fieldClassName: x,
|
|
23
|
+
panel: y,
|
|
24
|
+
labelledBy: I,
|
|
25
|
+
panelLabel: f
|
|
25
26
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
open:
|
|
28
|
-
onOpenChange: (
|
|
27
|
+
const D = Ce(), [m, l] = E(!1), { refs: h, floatingStyles: g, context: o } = se({
|
|
28
|
+
open: m,
|
|
29
|
+
onOpenChange: (L) => l(a ? !1 : L),
|
|
29
30
|
placement: "bottom-start",
|
|
30
|
-
whileElementsMounted:
|
|
31
|
-
middleware: [
|
|
32
|
-
}),
|
|
31
|
+
whileElementsMounted: ie,
|
|
32
|
+
middleware: [oe(8), ce({ padding: 8 }), de({ padding: 8 })]
|
|
33
|
+
}), n = me(o, { enabled: !a }), w = pe(o), b = ue(o, { role: "dialog" }), { getReferenceProps: S, getFloatingProps: k } = fe([
|
|
34
|
+
n,
|
|
33
35
|
w,
|
|
34
|
-
|
|
35
|
-
T
|
|
36
|
+
b
|
|
36
37
|
]);
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ c(O, { children: [
|
|
39
|
+
/* @__PURE__ */ e(
|
|
39
40
|
"div",
|
|
40
41
|
{
|
|
41
42
|
id: s,
|
|
42
|
-
ref:
|
|
43
|
+
ref: h.setReference,
|
|
43
44
|
role: "button",
|
|
44
45
|
"aria-haspopup": "dialog",
|
|
45
|
-
"aria-expanded":
|
|
46
|
-
"aria-disabled":
|
|
47
|
-
"aria-labelledby":
|
|
48
|
-
tabIndex:
|
|
49
|
-
className:
|
|
50
|
-
|
|
46
|
+
"aria-expanded": m,
|
|
47
|
+
"aria-disabled": a,
|
|
48
|
+
"aria-labelledby": I,
|
|
49
|
+
tabIndex: a ? -1 : 0,
|
|
50
|
+
className: d(
|
|
51
|
+
J,
|
|
51
52
|
"focus-visible:outline focus-visible:outline-focus",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
u && H,
|
|
54
|
+
a && q,
|
|
55
|
+
x
|
|
55
56
|
),
|
|
56
|
-
...
|
|
57
|
+
...S(),
|
|
57
58
|
children: i
|
|
58
59
|
}
|
|
59
60
|
),
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
m && /* @__PURE__ */ e(he, { children: /* @__PURE__ */ e(
|
|
62
|
+
ge,
|
|
62
63
|
{
|
|
63
|
-
context:
|
|
64
|
+
context: o,
|
|
64
65
|
modal: !1,
|
|
65
66
|
initialFocus: -1,
|
|
66
67
|
returnFocus: !0,
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ e(
|
|
68
69
|
"div",
|
|
69
70
|
{
|
|
70
|
-
ref:
|
|
71
|
-
style:
|
|
72
|
-
"aria-label":
|
|
73
|
-
className:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
ref: h.setFloating,
|
|
72
|
+
style: g,
|
|
73
|
+
"aria-label": f,
|
|
74
|
+
className: d(
|
|
75
|
+
Be,
|
|
76
|
+
D,
|
|
77
|
+
C
|
|
77
78
|
),
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
79
|
+
...k(),
|
|
80
|
+
children: y(() => l(!1))
|
|
80
81
|
}
|
|
81
82
|
)
|
|
82
83
|
}
|
|
83
84
|
) })
|
|
84
85
|
] });
|
|
85
|
-
},
|
|
86
|
+
}, Z = ({
|
|
86
87
|
id: s,
|
|
87
|
-
value:
|
|
88
|
-
onChange:
|
|
88
|
+
value: a,
|
|
89
|
+
onChange: u,
|
|
89
90
|
disabled: i,
|
|
90
|
-
invalid:
|
|
91
|
-
className:
|
|
92
|
-
ariaLabel:
|
|
93
|
-
placeholder:
|
|
91
|
+
invalid: C,
|
|
92
|
+
className: x,
|
|
93
|
+
ariaLabel: y,
|
|
94
|
+
placeholder: I = "--:--",
|
|
95
|
+
timezoneLabel: f
|
|
94
96
|
}) => {
|
|
95
|
-
const [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, [
|
|
97
|
+
const [D, m] = E(a);
|
|
98
|
+
ye(() => {
|
|
99
|
+
m(a);
|
|
100
|
+
}, [a]);
|
|
101
|
+
const l = /* @__PURE__ */ e(
|
|
99
102
|
"input",
|
|
100
103
|
{
|
|
101
104
|
id: s,
|
|
102
105
|
type: "text",
|
|
103
106
|
inputMode: "numeric",
|
|
104
107
|
autoComplete: "off",
|
|
105
|
-
"aria-label":
|
|
106
|
-
placeholder:
|
|
108
|
+
"aria-label": y,
|
|
109
|
+
placeholder: I,
|
|
107
110
|
disabled: i,
|
|
108
|
-
value:
|
|
109
|
-
onChange: (
|
|
110
|
-
const
|
|
111
|
-
|
|
111
|
+
value: D,
|
|
112
|
+
onChange: (h) => {
|
|
113
|
+
const g = $e(h.target.value);
|
|
114
|
+
m(g), je(g) && u(g);
|
|
112
115
|
},
|
|
113
|
-
className:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
i &&
|
|
117
|
-
|
|
116
|
+
className: d(
|
|
117
|
+
J,
|
|
118
|
+
C && H,
|
|
119
|
+
i && q,
|
|
120
|
+
x
|
|
118
121
|
)
|
|
119
122
|
}
|
|
120
123
|
);
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
return f ? /* @__PURE__ */ c("div", { className: "relative w-full", children: [
|
|
125
|
+
l,
|
|
126
|
+
/* @__PURE__ */ e("span", { className: "dial-small-paragraph-text pointer-events-none absolute end-4 top-1/2 -translate-y-1/2 truncate text-secondary", children: f })
|
|
127
|
+
] }) : l;
|
|
128
|
+
}, at = ({
|
|
129
|
+
mode: s = N.Date,
|
|
130
|
+
value: a,
|
|
131
|
+
onChange: u,
|
|
125
132
|
labelProps: i,
|
|
126
|
-
placeholder:
|
|
127
|
-
disabled:
|
|
128
|
-
invalid:
|
|
129
|
-
id:
|
|
130
|
-
className:
|
|
131
|
-
minDate:
|
|
132
|
-
maxDate:
|
|
133
|
-
locale:
|
|
134
|
-
fieldClassName:
|
|
133
|
+
placeholder: C,
|
|
134
|
+
disabled: x = !1,
|
|
135
|
+
invalid: y = !1,
|
|
136
|
+
id: I,
|
|
137
|
+
className: f,
|
|
138
|
+
minDate: D,
|
|
139
|
+
maxDate: m,
|
|
140
|
+
locale: l = Le,
|
|
141
|
+
fieldClassName: h,
|
|
142
|
+
showTimezone: g = !1
|
|
135
143
|
}) => {
|
|
136
|
-
const
|
|
137
|
-
() =>
|
|
138
|
-
),
|
|
139
|
-
() =>
|
|
140
|
-
[
|
|
141
|
-
),
|
|
142
|
-
() =>
|
|
143
|
-
[
|
|
144
|
-
), _ = (
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
const o = C ?? Te[s], n = a instanceof Date ? a : null, w = xe(), b = I ?? w, S = i?.id ?? `${b}-label`, k = !!i?.label, L = typeof i?.label == "string" ? i.label : void 0, A = k ? `${S} ${b}` : void 0, B = i ? /* @__PURE__ */ e(ve, { ...i, id: S, htmlFor: b }) : null, [T, Q] = E(
|
|
145
|
+
() => n ?? /* @__PURE__ */ new Date()
|
|
146
|
+
), X = F(() => /* @__PURE__ */ new Date(), []), ee = F(
|
|
147
|
+
() => g ? Ie({ locale: l }) : null,
|
|
148
|
+
[g, l]
|
|
149
|
+
), te = F(
|
|
150
|
+
() => Ee(l),
|
|
151
|
+
[l]
|
|
152
|
+
), _ = F(() => Ae(l), [l]), ae = F(
|
|
153
|
+
() => _e(T.getFullYear(), T.getMonth()),
|
|
154
|
+
[T]
|
|
155
|
+
), R = (r) => {
|
|
156
|
+
Q(
|
|
157
|
+
(t) => new Date(t.getFullYear(), t.getMonth() + r, 1)
|
|
147
158
|
);
|
|
148
|
-
},
|
|
149
|
-
if (
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
if (s ===
|
|
156
|
-
const r = typeof
|
|
157
|
-
return /* @__PURE__ */
|
|
159
|
+
}, le = (r, t) => {
|
|
160
|
+
if (K(r, D, m)) return;
|
|
161
|
+
const v = s === N.DateTime && n ? U(r, M(n)) : r;
|
|
162
|
+
u?.(v), s === N.Date && t();
|
|
163
|
+
}, ne = (r) => {
|
|
164
|
+
u?.(U(n ?? /* @__PURE__ */ new Date(), r));
|
|
165
|
+
}, re = () => n ? s === N.DateTime ? `${Y(n, l)}, ${M(n)}` : Y(n, l) : o;
|
|
166
|
+
if (s === N.Time) {
|
|
167
|
+
const r = typeof a == "string" ? a : n ? M(n) : "";
|
|
168
|
+
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
158
169
|
B,
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
|
|
170
|
+
/* @__PURE__ */ e(
|
|
171
|
+
Z,
|
|
161
172
|
{
|
|
162
|
-
id:
|
|
173
|
+
id: b,
|
|
163
174
|
value: r,
|
|
164
|
-
onChange: (
|
|
165
|
-
disabled:
|
|
166
|
-
invalid:
|
|
167
|
-
placeholder:
|
|
168
|
-
className:
|
|
175
|
+
onChange: (t) => u?.(t),
|
|
176
|
+
disabled: x,
|
|
177
|
+
invalid: y,
|
|
178
|
+
placeholder: o,
|
|
179
|
+
className: h,
|
|
180
|
+
timezoneLabel: ee
|
|
169
181
|
}
|
|
170
182
|
)
|
|
171
183
|
] });
|
|
172
184
|
}
|
|
173
|
-
if (s ===
|
|
174
|
-
const r = typeof
|
|
175
|
-
return /* @__PURE__ */
|
|
185
|
+
if (s === N.Weekday) {
|
|
186
|
+
const r = typeof a == "string" ? a : void 0, t = _.find((v) => v.value === r);
|
|
187
|
+
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
176
188
|
B,
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
189
|
+
/* @__PURE__ */ e(
|
|
190
|
+
G,
|
|
179
191
|
{
|
|
180
|
-
id:
|
|
181
|
-
disabled:
|
|
182
|
-
invalid:
|
|
183
|
-
labelledBy:
|
|
184
|
-
panelLabel:
|
|
185
|
-
fieldClassName:
|
|
186
|
-
trigger: /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
192
|
+
id: b,
|
|
193
|
+
disabled: x,
|
|
194
|
+
invalid: y,
|
|
195
|
+
labelledBy: A,
|
|
196
|
+
panelLabel: L ?? o,
|
|
197
|
+
fieldClassName: h,
|
|
198
|
+
trigger: /* @__PURE__ */ c(O, { children: [
|
|
199
|
+
/* @__PURE__ */ e(
|
|
188
200
|
"span",
|
|
189
201
|
{
|
|
190
|
-
className:
|
|
202
|
+
className: d(
|
|
191
203
|
"truncate",
|
|
192
|
-
!
|
|
204
|
+
!t && "text-secondary"
|
|
193
205
|
),
|
|
194
|
-
children:
|
|
206
|
+
children: t?.label ?? o
|
|
195
207
|
}
|
|
196
208
|
),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
|
|
209
|
+
/* @__PURE__ */ e(
|
|
210
|
+
be,
|
|
199
211
|
{
|
|
200
|
-
size:
|
|
201
|
-
stroke:
|
|
212
|
+
size: De.MD,
|
|
213
|
+
stroke: Ne,
|
|
202
214
|
"aria-hidden": "true",
|
|
203
|
-
className:
|
|
215
|
+
className: Fe
|
|
204
216
|
}
|
|
205
217
|
)
|
|
206
218
|
] }),
|
|
207
|
-
panel: (
|
|
219
|
+
panel: (v) => /* @__PURE__ */ e(
|
|
208
220
|
"div",
|
|
209
221
|
{
|
|
210
222
|
role: "listbox",
|
|
211
|
-
"aria-label":
|
|
223
|
+
"aria-label": L ?? o,
|
|
212
224
|
className: "flex flex-col gap-0.5",
|
|
213
|
-
children:
|
|
225
|
+
children: _.map((p) => /* @__PURE__ */ e(
|
|
214
226
|
"button",
|
|
215
227
|
{
|
|
216
228
|
type: "button",
|
|
217
229
|
role: "option",
|
|
218
|
-
"aria-selected":
|
|
219
|
-
className:
|
|
230
|
+
"aria-selected": p.value === r,
|
|
231
|
+
className: d(
|
|
220
232
|
"flex w-full items-center rounded-lg px-3 py-2 text-left dial-small-text text-primary hover:bg-control-accent-alpha-hover",
|
|
221
233
|
"focus-visible:outline focus-visible:outline-focus",
|
|
222
|
-
|
|
234
|
+
p.value === r && "bg-control-accent-alpha-hover"
|
|
223
235
|
),
|
|
224
236
|
onClick: () => {
|
|
225
|
-
|
|
237
|
+
u?.(p.value), v();
|
|
226
238
|
},
|
|
227
|
-
children:
|
|
239
|
+
children: p.label
|
|
228
240
|
},
|
|
229
|
-
|
|
241
|
+
p.value
|
|
230
242
|
))
|
|
231
243
|
}
|
|
232
244
|
)
|
|
@@ -234,101 +246,101 @@ const Y = ({
|
|
|
234
246
|
)
|
|
235
247
|
] });
|
|
236
248
|
}
|
|
237
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
238
250
|
B,
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
|
|
251
|
+
/* @__PURE__ */ e(
|
|
252
|
+
G,
|
|
241
253
|
{
|
|
242
|
-
id:
|
|
243
|
-
disabled:
|
|
244
|
-
invalid:
|
|
245
|
-
labelledBy:
|
|
246
|
-
panelLabel:
|
|
247
|
-
fieldClassName:
|
|
248
|
-
trigger: /* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
254
|
+
id: b,
|
|
255
|
+
disabled: x,
|
|
256
|
+
invalid: y,
|
|
257
|
+
labelledBy: A,
|
|
258
|
+
panelLabel: L ?? o,
|
|
259
|
+
fieldClassName: h,
|
|
260
|
+
trigger: /* @__PURE__ */ c(O, { children: [
|
|
261
|
+
/* @__PURE__ */ e(
|
|
250
262
|
"span",
|
|
251
263
|
{
|
|
252
|
-
className:
|
|
264
|
+
className: d(
|
|
253
265
|
"truncate",
|
|
254
|
-
!
|
|
266
|
+
!n && "text-secondary"
|
|
255
267
|
),
|
|
256
|
-
children:
|
|
268
|
+
children: re()
|
|
257
269
|
}
|
|
258
270
|
),
|
|
259
|
-
|
|
271
|
+
ke
|
|
260
272
|
] }),
|
|
261
|
-
panel: (r) => /* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
|
|
273
|
+
panel: (r) => /* @__PURE__ */ c(O, { children: [
|
|
274
|
+
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
275
|
+
/* @__PURE__ */ e(
|
|
276
|
+
j,
|
|
265
277
|
{
|
|
266
278
|
"aria-label": "Previous month",
|
|
267
|
-
icon:
|
|
268
|
-
size:
|
|
269
|
-
onClick: () =>
|
|
279
|
+
icon: P.prev,
|
|
280
|
+
size: V.Small,
|
|
281
|
+
onClick: () => R(-1)
|
|
270
282
|
}
|
|
271
283
|
),
|
|
272
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ e(
|
|
273
285
|
"div",
|
|
274
286
|
{
|
|
275
287
|
className: "dial-small-semi-text text-primary",
|
|
276
288
|
"aria-live": "polite",
|
|
277
|
-
children:
|
|
289
|
+
children: Re(T, l)
|
|
278
290
|
}
|
|
279
291
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
|
|
292
|
+
/* @__PURE__ */ e(
|
|
293
|
+
j,
|
|
282
294
|
{
|
|
283
295
|
"aria-label": "Next month",
|
|
284
|
-
icon:
|
|
285
|
-
size:
|
|
286
|
-
onClick: () =>
|
|
296
|
+
icon: P.next,
|
|
297
|
+
size: V.Small,
|
|
298
|
+
onClick: () => R(1)
|
|
287
299
|
}
|
|
288
300
|
)
|
|
289
301
|
] }),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
|
|
302
|
+
/* @__PURE__ */ c("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
303
|
+
te.map((t) => /* @__PURE__ */ e(
|
|
292
304
|
"div",
|
|
293
305
|
{
|
|
294
306
|
"aria-hidden": "true",
|
|
295
307
|
className: "dial-tiny-text py-1 text-secondary",
|
|
296
|
-
children:
|
|
308
|
+
children: t
|
|
297
309
|
},
|
|
298
|
-
|
|
310
|
+
t
|
|
299
311
|
)),
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
return /* @__PURE__ */
|
|
312
|
+
ae.map((t) => {
|
|
313
|
+
const v = t.getMonth() !== T.getMonth(), p = W(t, n), z = W(t, X), $ = K(t, D, m);
|
|
314
|
+
return /* @__PURE__ */ e(
|
|
303
315
|
"button",
|
|
304
316
|
{
|
|
305
317
|
type: "button",
|
|
306
|
-
disabled:
|
|
307
|
-
"aria-label":
|
|
308
|
-
"aria-pressed":
|
|
309
|
-
"aria-current":
|
|
310
|
-
className:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
318
|
+
disabled: $,
|
|
319
|
+
"aria-label": ze(t, l),
|
|
320
|
+
"aria-pressed": p,
|
|
321
|
+
"aria-current": z ? "date" : void 0,
|
|
322
|
+
className: d(
|
|
323
|
+
we,
|
|
324
|
+
v && Oe,
|
|
325
|
+
z && !p && Me,
|
|
326
|
+
p && Se,
|
|
327
|
+
$ && "cursor-not-allowed opacity-40 hover:bg-transparent"
|
|
316
328
|
),
|
|
317
|
-
onClick: () =>
|
|
318
|
-
children:
|
|
329
|
+
onClick: () => le(t, r),
|
|
330
|
+
children: t.getDate()
|
|
319
331
|
},
|
|
320
|
-
|
|
332
|
+
t.toISOString()
|
|
321
333
|
);
|
|
322
334
|
})
|
|
323
335
|
] }),
|
|
324
|
-
s ===
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
|
|
336
|
+
s === N.DateTime && /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-3 border-t border-secondary pt-3", children: [
|
|
337
|
+
/* @__PURE__ */ e("span", { className: "dial-small-text text-primary", children: "Time" }),
|
|
338
|
+
/* @__PURE__ */ e(
|
|
339
|
+
Z,
|
|
328
340
|
{
|
|
329
341
|
ariaLabel: "Time",
|
|
330
|
-
value:
|
|
331
|
-
onChange:
|
|
342
|
+
value: n ? M(n) : "",
|
|
343
|
+
onChange: ne,
|
|
332
344
|
className: "w-[120px] px-3 py-1.5"
|
|
333
345
|
}
|
|
334
346
|
)
|
|
@@ -339,5 +351,5 @@ const Y = ({
|
|
|
339
351
|
] });
|
|
340
352
|
};
|
|
341
353
|
export {
|
|
342
|
-
|
|
354
|
+
at as Calendar
|
|
343
355
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-09-
|
|
2
|
+
"version": "0.15.0-dev.4",
|
|
3
|
+
"generatedAt": "2026-09-16T07:40:41.827Z",
|
|
4
4
|
"kit": {
|
|
5
5
|
"name": "@epam/ai-dial-ui-kit",
|
|
6
6
|
"description": "A modern UI kit for building AI DIAL interfaces with React",
|
|
@@ -491,6 +491,13 @@
|
|
|
491
491
|
"type": "string",
|
|
492
492
|
"required": false,
|
|
493
493
|
"description": "Additional classes merged onto the trigger field, overriding conflicting defaults"
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"name": "showTimezone",
|
|
497
|
+
"type": "boolean",
|
|
498
|
+
"required": false,
|
|
499
|
+
"defaultValue": "false",
|
|
500
|
+
"description": "Shows the viewer's timezone (e.g. `(GMT+01:00) Europe/Berlin`) at the trailing edge of the `time` field"
|
|
494
501
|
}
|
|
495
502
|
],
|
|
496
503
|
"examples": [
|
|
@@ -10686,6 +10693,16 @@
|
|
|
10686
10693
|
"sourceFile": "utils/flat-to-hierarchy-convertor.ts",
|
|
10687
10694
|
"description": "Helper to create a root folder wrapping flat items.\nUseful when you want the entire tree to be nested under a single root.",
|
|
10688
10695
|
"signature": "function wrapInRootFolder(flatItems: FlatFileItem[], rootName = 'Prompts', rootPath = 'prompts/public/', rootFolderId = 'root'): DialFile[]"
|
|
10696
|
+
},
|
|
10697
|
+
{
|
|
10698
|
+
"name": "getTimezoneLabel",
|
|
10699
|
+
"sourceFile": "utils/timezone.ts",
|
|
10700
|
+
"description": "Returns a timezone as a hint label for time-of-day fields, e.g.\n`(GMT+01:00) Europe/Berlin`: the UTC offset in effect at `options.date`\nrendered by `Intl` (`timeZoneName: 'longOffset'`), followed by the IANA\ntimezone name.",
|
|
10701
|
+
"signature": "({\n locale,\n timeZone,\n date = new Date(),\n}: TimezoneLabelOptions = {}) => string"
|
|
10702
|
+
},
|
|
10703
|
+
{
|
|
10704
|
+
"name": "TimezoneLabelOptions",
|
|
10705
|
+
"sourceFile": "utils/timezone.ts"
|
|
10689
10706
|
}
|
|
10690
10707
|
],
|
|
10691
10708
|
"constants": [
|