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