@epam/ai-dial-ui-kit 0.15.0-dev.6 → 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.
- package/README.md +139 -0
- package/dist/CHANGELOG.md +10 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-4iMidqal.cjs} +26 -26
- package/dist/DateCellRenderer-CTTAnQjB.cjs +1 -0
- 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/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +14 -12
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Accordion/Accordion.js +39 -37
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +7 -6
- package/dist/components/New/Calendar/Calendar.js +253 -222
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +4 -2
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +4 -2
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +44 -39
- package/dist/components/New/Dropdown/Dropdown.js +101 -95
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +19 -17
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/InfoButton/InfoButton.js +12 -10
- package/dist/components/New/InlineSelect/InlineSelect.js +43 -41
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +40 -38
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +20 -18
- package/dist/components/New/Notification/Notification.js +18 -16
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +45 -43
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/Search/Search.js +28 -26
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/Select.js +120 -109
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +28 -22
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +44 -42
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +25 -23
- package/dist/components/New/Tooltip/TooltipContent.js +10 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -31
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +6 -4
- package/dist/components-manifest.json +7 -2
- package/dist/constants/public-class-names.js +152 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +203 -201
- package/dist/editor-_174x-qy.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/lazy-DM-7dL0Y.cjs +1 -0
- package/dist/src/constants/public-class-names.d.ts +143 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/use-file-manager-tabs-DKmWaOlC.cjs +3 -0
- package/package.json +1 -1
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/JsonEditor-qv1Z0dLX.cjs +0 -1
- package/dist/MarkdownEditorContainer-Bzcnoemw.cjs +0 -1
- package/dist/lazy-tfN4sKhq.cjs +0 -1
- 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
|
|
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
|
|
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
|
|
11
|
+
import { useThemeScope as Le } from "../ThemeScope/ThemeScope.js";
|
|
12
12
|
import { mergeClasses as d } from "../../../utils/merge-classes.js";
|
|
13
|
-
import { getTimezoneLabel as
|
|
14
|
-
import { DEFAULT_CALENDAR_LOCALE as
|
|
15
|
-
import { getWeekdayShortLabels as Be, getWeekdayOptions as
|
|
16
|
-
|
|
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 =
|
|
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:
|
|
32
|
-
middleware: [
|
|
33
|
-
}), g =
|
|
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
|
-
|
|
52
|
+
X,
|
|
52
53
|
"focus-visible:outline focus-visible:outline-focus",
|
|
53
|
-
p &&
|
|
54
|
-
a &&
|
|
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(
|
|
62
|
-
|
|
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
|
-
|
|
76
|
+
Ee,
|
|
76
77
|
f,
|
|
77
78
|
i
|
|
78
79
|
),
|
|
79
|
-
...
|
|
80
|
+
...F(),
|
|
80
81
|
children: x(() => h(!1))
|
|
81
82
|
}
|
|
82
83
|
)
|
|
83
84
|
}
|
|
84
85
|
) })
|
|
85
86
|
] });
|
|
86
|
-
},
|
|
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
|
-
|
|
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 =
|
|
115
|
-
h(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
|
-
|
|
120
|
-
I &&
|
|
121
|
-
i &&
|
|
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
|
-
},
|
|
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 =
|
|
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 =
|
|
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
|
-
),
|
|
150
|
-
() => o ?
|
|
150
|
+
), te = S(() => /* @__PURE__ */ new Date(), []), ae = S(
|
|
151
|
+
() => o ? Te({ locale: l }) : null,
|
|
151
152
|
[o, l]
|
|
152
|
-
),
|
|
153
|
+
), le = S(
|
|
153
154
|
() => Be(l),
|
|
154
155
|
[l]
|
|
155
|
-
),
|
|
156
|
-
() =>
|
|
156
|
+
), z = S(() => Re(l), [l]), ne = S(
|
|
157
|
+
() => ze(T.getFullYear(), T.getMonth()),
|
|
157
158
|
[T]
|
|
158
|
-
),
|
|
159
|
-
|
|
159
|
+
), $ = (r) => {
|
|
160
|
+
ee(
|
|
160
161
|
(t) => new Date(t.getFullYear(), t.getMonth() + r, 1)
|
|
161
162
|
);
|
|
162
|
-
},
|
|
163
|
-
if (
|
|
164
|
-
const N = s === D.DateTime && n ?
|
|
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
|
-
},
|
|
167
|
-
p?.(
|
|
168
|
-
},
|
|
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(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
254
|
-
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
|
|
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
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
205
|
+
className: d(
|
|
206
|
+
E.calendar,
|
|
207
|
+
"flex flex-col gap-y-3",
|
|
208
|
+
f
|
|
209
|
+
),
|
|
210
|
+
children: [
|
|
211
|
+
_,
|
|
265
212
|
/* @__PURE__ */ e(
|
|
266
|
-
|
|
213
|
+
q,
|
|
267
214
|
{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
|
|
328
|
-
|
|
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
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
-
|
|
390
|
+
rt as Calendar
|
|
360
391
|
};
|
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { mergeClasses as
|
|
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
|
-
|
|
4
|
+
import { DIAL_KIT_CLASS as e } from "../../../constants/public-class-names.js";
|
|
5
|
+
const a = ({
|
|
5
6
|
text: r,
|
|
6
|
-
className:
|
|
7
|
-
variant:
|
|
8
|
-
...
|
|
9
|
-
}) => r ? /* @__PURE__ */
|
|
7
|
+
className: i,
|
|
8
|
+
variant: o = t.Description,
|
|
9
|
+
...p
|
|
10
|
+
}) => r ? /* @__PURE__ */ n(
|
|
10
11
|
"span",
|
|
11
12
|
{
|
|
12
|
-
...
|
|
13
|
+
...p,
|
|
13
14
|
role: "alert",
|
|
14
|
-
className:
|
|
15
|
+
className: s(
|
|
16
|
+
e.captionText,
|
|
17
|
+
o === t.Error && e.errorText,
|
|
15
18
|
"dial-tiny-text",
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
o === t.Error ? "text-error" : "text-secondary",
|
|
20
|
+
i
|
|
18
21
|
),
|
|
19
22
|
children: r
|
|
20
23
|
}
|
|
21
|
-
) : null,
|
|
24
|
+
) : null, T = ({
|
|
22
25
|
...r
|
|
23
|
-
}) => /* @__PURE__ */
|
|
26
|
+
}) => /* @__PURE__ */ n(a, { ...r, variant: t.Error });
|
|
24
27
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
m as CardShell
|
|
22
24
|
};
|