@epam/ai-dial-ui-kit 0.16.0-dev.62 → 0.16.0-dev.66

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