@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.7

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