@epam/ai-dial-ui-kit 0.15.0-dev.4 → 0.15.0-dev.6
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 +155 -150
- package/dist/components/New/Notification/Notification.js +18 -18
- package/dist/components/ProgressBar/ProgressBar.js +1 -3
- package/dist/components-manifest.json +8 -2
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/src/components/New/Calendar/Calendar.d.ts +7 -1
- package/package.json +1 -1
|
@@ -1,65 +1,65 @@
|
|
|
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
|
|
9
|
-
import { CalendarMode as
|
|
10
|
-
import { ElementSize as
|
|
11
|
-
import { useThemeScope as
|
|
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
12
|
import { mergeClasses as d } from "../../../utils/merge-classes.js";
|
|
13
|
-
import { getTimezoneLabel as
|
|
14
|
-
import { DEFAULT_CALENDAR_LOCALE as
|
|
15
|
-
import { getWeekdayShortLabels as
|
|
16
|
-
const
|
|
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 = ({
|
|
17
17
|
id: s,
|
|
18
18
|
disabled: a,
|
|
19
|
-
invalid:
|
|
20
|
-
trigger:
|
|
21
|
-
panelClassName:
|
|
22
|
-
fieldClassName:
|
|
23
|
-
panel:
|
|
24
|
-
labelledBy:
|
|
25
|
-
panelLabel:
|
|
19
|
+
invalid: p,
|
|
20
|
+
trigger: C,
|
|
21
|
+
panelClassName: i,
|
|
22
|
+
fieldClassName: I,
|
|
23
|
+
panel: x,
|
|
24
|
+
labelledBy: y,
|
|
25
|
+
panelLabel: L
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
28
|
-
open:
|
|
29
|
-
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),
|
|
30
30
|
placement: "bottom-start",
|
|
31
|
-
whileElementsMounted:
|
|
32
|
-
middleware: [
|
|
33
|
-
}),
|
|
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,
|
|
34
35
|
n,
|
|
35
|
-
w
|
|
36
|
-
b
|
|
36
|
+
w
|
|
37
37
|
]);
|
|
38
38
|
return /* @__PURE__ */ c(O, { children: [
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
42
|
id: s,
|
|
43
|
-
ref:
|
|
43
|
+
ref: l.setReference,
|
|
44
44
|
role: "button",
|
|
45
45
|
"aria-haspopup": "dialog",
|
|
46
|
-
"aria-expanded":
|
|
46
|
+
"aria-expanded": u,
|
|
47
47
|
"aria-disabled": a,
|
|
48
|
-
"aria-labelledby":
|
|
48
|
+
"aria-labelledby": y,
|
|
49
49
|
tabIndex: a ? -1 : 0,
|
|
50
50
|
className: d(
|
|
51
|
-
|
|
51
|
+
Q,
|
|
52
52
|
"focus-visible:outline focus-visible:outline-focus",
|
|
53
|
-
|
|
54
|
-
a &&
|
|
55
|
-
|
|
53
|
+
p && J,
|
|
54
|
+
a && H,
|
|
55
|
+
I
|
|
56
56
|
),
|
|
57
|
-
...
|
|
58
|
-
children:
|
|
57
|
+
...b(),
|
|
58
|
+
children: C
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
u && /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(
|
|
62
|
+
be,
|
|
63
63
|
{
|
|
64
64
|
context: o,
|
|
65
65
|
modal: !1,
|
|
@@ -68,35 +68,36 @@ const G = ({
|
|
|
68
68
|
children: /* @__PURE__ */ e(
|
|
69
69
|
"div",
|
|
70
70
|
{
|
|
71
|
-
ref:
|
|
72
|
-
style:
|
|
73
|
-
"aria-label":
|
|
71
|
+
ref: l.setFloating,
|
|
72
|
+
style: v,
|
|
73
|
+
"aria-label": L,
|
|
74
74
|
className: d(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
Ae,
|
|
76
|
+
f,
|
|
77
|
+
i
|
|
78
78
|
),
|
|
79
|
-
...
|
|
80
|
-
children:
|
|
79
|
+
...S(),
|
|
80
|
+
children: x(() => h(!1))
|
|
81
81
|
}
|
|
82
82
|
)
|
|
83
83
|
}
|
|
84
84
|
) })
|
|
85
85
|
] });
|
|
86
|
-
},
|
|
86
|
+
}, q = ({
|
|
87
87
|
id: s,
|
|
88
88
|
value: a,
|
|
89
|
-
onChange:
|
|
89
|
+
onChange: p,
|
|
90
|
+
onBlur: C,
|
|
90
91
|
disabled: i,
|
|
91
|
-
invalid:
|
|
92
|
+
invalid: I,
|
|
92
93
|
className: x,
|
|
93
94
|
ariaLabel: y,
|
|
94
|
-
placeholder:
|
|
95
|
+
placeholder: L = "--:--",
|
|
95
96
|
timezoneLabel: f
|
|
96
97
|
}) => {
|
|
97
|
-
const [
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
const [u, h] = B(a);
|
|
99
|
+
ve(() => {
|
|
100
|
+
h(a);
|
|
100
101
|
}, [a]);
|
|
101
102
|
const l = /* @__PURE__ */ e(
|
|
102
103
|
"input",
|
|
@@ -106,17 +107,18 @@ const G = ({
|
|
|
106
107
|
inputMode: "numeric",
|
|
107
108
|
autoComplete: "off",
|
|
108
109
|
"aria-label": y,
|
|
109
|
-
placeholder:
|
|
110
|
+
placeholder: L,
|
|
110
111
|
disabled: i,
|
|
111
|
-
value:
|
|
112
|
-
onChange: (
|
|
113
|
-
const
|
|
114
|
-
|
|
112
|
+
value: u,
|
|
113
|
+
onChange: (v) => {
|
|
114
|
+
const o = je(v.target.value);
|
|
115
|
+
h(o), Ve(o) && p(o);
|
|
115
116
|
},
|
|
117
|
+
onBlur: C,
|
|
116
118
|
className: d(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
i &&
|
|
119
|
+
Q,
|
|
120
|
+
I && J,
|
|
121
|
+
i && H,
|
|
120
122
|
x
|
|
121
123
|
)
|
|
122
124
|
}
|
|
@@ -125,76 +127,78 @@ const G = ({
|
|
|
125
127
|
l,
|
|
126
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 })
|
|
127
129
|
] }) : l;
|
|
128
|
-
},
|
|
129
|
-
mode: s =
|
|
130
|
+
}, lt = ({
|
|
131
|
+
mode: s = D.Date,
|
|
130
132
|
value: a,
|
|
131
|
-
onChange:
|
|
133
|
+
onChange: p,
|
|
134
|
+
onBlur: C,
|
|
132
135
|
labelProps: i,
|
|
133
|
-
placeholder:
|
|
136
|
+
placeholder: I,
|
|
134
137
|
disabled: x = !1,
|
|
135
138
|
invalid: y = !1,
|
|
136
|
-
id:
|
|
139
|
+
id: L,
|
|
137
140
|
className: f,
|
|
138
|
-
minDate:
|
|
139
|
-
maxDate:
|
|
140
|
-
locale: l =
|
|
141
|
-
fieldClassName:
|
|
142
|
-
showTimezone:
|
|
141
|
+
minDate: u,
|
|
142
|
+
maxDate: h,
|
|
143
|
+
locale: l = Te,
|
|
144
|
+
fieldClassName: v,
|
|
145
|
+
showTimezone: o = !1
|
|
143
146
|
}) => {
|
|
144
|
-
const
|
|
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(
|
|
145
148
|
() => n ?? /* @__PURE__ */ new Date()
|
|
146
|
-
),
|
|
147
|
-
() =>
|
|
148
|
-
[
|
|
149
|
-
),
|
|
150
|
-
() =>
|
|
149
|
+
), ee = F(() => /* @__PURE__ */ new Date(), []), te = F(
|
|
150
|
+
() => o ? Le({ locale: l }) : null,
|
|
151
|
+
[o, l]
|
|
152
|
+
), ae = F(
|
|
153
|
+
() => Be(l),
|
|
151
154
|
[l]
|
|
152
|
-
),
|
|
153
|
-
() =>
|
|
155
|
+
), R = F(() => _e(l), [l]), le = F(
|
|
156
|
+
() => Re(T.getFullYear(), T.getMonth()),
|
|
154
157
|
[T]
|
|
155
|
-
),
|
|
156
|
-
|
|
158
|
+
), z = (r) => {
|
|
159
|
+
X(
|
|
157
160
|
(t) => new Date(t.getFullYear(), t.getMonth() + r, 1)
|
|
158
161
|
);
|
|
159
|
-
},
|
|
160
|
-
if (
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
if (s ===
|
|
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) {
|
|
167
170
|
const r = typeof a == "string" ? a : n ? M(n) : "";
|
|
168
171
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
169
|
-
|
|
172
|
+
A,
|
|
170
173
|
/* @__PURE__ */ e(
|
|
171
|
-
|
|
174
|
+
q,
|
|
172
175
|
{
|
|
173
176
|
id: b,
|
|
174
177
|
value: r,
|
|
175
|
-
onChange: (t) =>
|
|
178
|
+
onChange: (t) => p?.(t),
|
|
179
|
+
onBlur: C,
|
|
176
180
|
disabled: x,
|
|
177
181
|
invalid: y,
|
|
178
|
-
placeholder:
|
|
179
|
-
className:
|
|
180
|
-
timezoneLabel:
|
|
182
|
+
placeholder: g,
|
|
183
|
+
className: v,
|
|
184
|
+
timezoneLabel: te
|
|
181
185
|
}
|
|
182
186
|
)
|
|
183
187
|
] });
|
|
184
188
|
}
|
|
185
|
-
if (s ===
|
|
186
|
-
const r = typeof a == "string" ? a : void 0, t =
|
|
189
|
+
if (s === D.Weekday) {
|
|
190
|
+
const r = typeof a == "string" ? a : void 0, t = R.find((N) => N.value === r);
|
|
187
191
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
188
|
-
|
|
192
|
+
A,
|
|
189
193
|
/* @__PURE__ */ e(
|
|
190
|
-
|
|
194
|
+
Z,
|
|
191
195
|
{
|
|
192
196
|
id: b,
|
|
193
197
|
disabled: x,
|
|
194
198
|
invalid: y,
|
|
195
|
-
labelledBy:
|
|
196
|
-
panelLabel:
|
|
197
|
-
fieldClassName:
|
|
199
|
+
labelledBy: _,
|
|
200
|
+
panelLabel: E ?? g,
|
|
201
|
+
fieldClassName: v,
|
|
198
202
|
trigger: /* @__PURE__ */ c(O, { children: [
|
|
199
203
|
/* @__PURE__ */ e(
|
|
200
204
|
"span",
|
|
@@ -203,42 +207,42 @@ const G = ({
|
|
|
203
207
|
"truncate",
|
|
204
208
|
!t && "text-secondary"
|
|
205
209
|
),
|
|
206
|
-
children: t?.label ??
|
|
210
|
+
children: t?.label ?? g
|
|
207
211
|
}
|
|
208
212
|
),
|
|
209
213
|
/* @__PURE__ */ e(
|
|
210
|
-
|
|
214
|
+
xe,
|
|
211
215
|
{
|
|
212
|
-
size:
|
|
213
|
-
stroke:
|
|
216
|
+
size: Ce.MD,
|
|
217
|
+
stroke: De,
|
|
214
218
|
"aria-hidden": "true",
|
|
215
|
-
className:
|
|
219
|
+
className: Se
|
|
216
220
|
}
|
|
217
221
|
)
|
|
218
222
|
] }),
|
|
219
|
-
panel: (
|
|
223
|
+
panel: (N) => /* @__PURE__ */ e(
|
|
220
224
|
"div",
|
|
221
225
|
{
|
|
222
226
|
role: "listbox",
|
|
223
|
-
"aria-label":
|
|
227
|
+
"aria-label": E ?? g,
|
|
224
228
|
className: "flex flex-col gap-0.5",
|
|
225
|
-
children:
|
|
229
|
+
children: R.map((m) => /* @__PURE__ */ e(
|
|
226
230
|
"button",
|
|
227
231
|
{
|
|
228
232
|
type: "button",
|
|
229
233
|
role: "option",
|
|
230
|
-
"aria-selected":
|
|
234
|
+
"aria-selected": m.value === r,
|
|
231
235
|
className: d(
|
|
232
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",
|
|
233
237
|
"focus-visible:outline focus-visible:outline-focus",
|
|
234
|
-
|
|
238
|
+
m.value === r && "bg-control-accent-alpha-hover"
|
|
235
239
|
),
|
|
236
240
|
onClick: () => {
|
|
237
|
-
|
|
241
|
+
p?.(m.value), N();
|
|
238
242
|
},
|
|
239
|
-
children:
|
|
243
|
+
children: m.label
|
|
240
244
|
},
|
|
241
|
-
|
|
245
|
+
m.value
|
|
242
246
|
))
|
|
243
247
|
}
|
|
244
248
|
)
|
|
@@ -247,16 +251,16 @@ const G = ({
|
|
|
247
251
|
] });
|
|
248
252
|
}
|
|
249
253
|
return /* @__PURE__ */ c("div", { className: d("flex flex-col gap-y-3", f), children: [
|
|
250
|
-
|
|
254
|
+
A,
|
|
251
255
|
/* @__PURE__ */ e(
|
|
252
|
-
|
|
256
|
+
Z,
|
|
253
257
|
{
|
|
254
258
|
id: b,
|
|
255
259
|
disabled: x,
|
|
256
260
|
invalid: y,
|
|
257
|
-
labelledBy:
|
|
258
|
-
panelLabel:
|
|
259
|
-
fieldClassName:
|
|
261
|
+
labelledBy: _,
|
|
262
|
+
panelLabel: E ?? g,
|
|
263
|
+
fieldClassName: v,
|
|
260
264
|
trigger: /* @__PURE__ */ c(O, { children: [
|
|
261
265
|
/* @__PURE__ */ e(
|
|
262
266
|
"span",
|
|
@@ -265,20 +269,20 @@ const G = ({
|
|
|
265
269
|
"truncate",
|
|
266
270
|
!n && "text-secondary"
|
|
267
271
|
),
|
|
268
|
-
children:
|
|
272
|
+
children: se()
|
|
269
273
|
}
|
|
270
274
|
),
|
|
271
|
-
|
|
275
|
+
Ee
|
|
272
276
|
] }),
|
|
273
277
|
panel: (r) => /* @__PURE__ */ c(O, { children: [
|
|
274
278
|
/* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
|
|
275
279
|
/* @__PURE__ */ e(
|
|
276
|
-
|
|
280
|
+
V,
|
|
277
281
|
{
|
|
278
282
|
"aria-label": "Previous month",
|
|
279
|
-
icon:
|
|
280
|
-
size:
|
|
281
|
-
onClick: () =>
|
|
283
|
+
icon: W.prev,
|
|
284
|
+
size: P.Small,
|
|
285
|
+
onClick: () => z(-1)
|
|
282
286
|
}
|
|
283
287
|
),
|
|
284
288
|
/* @__PURE__ */ e(
|
|
@@ -286,21 +290,21 @@ const G = ({
|
|
|
286
290
|
{
|
|
287
291
|
className: "dial-small-semi-text text-primary",
|
|
288
292
|
"aria-live": "polite",
|
|
289
|
-
children:
|
|
293
|
+
children: ze(T, l)
|
|
290
294
|
}
|
|
291
295
|
),
|
|
292
296
|
/* @__PURE__ */ e(
|
|
293
|
-
|
|
297
|
+
V,
|
|
294
298
|
{
|
|
295
299
|
"aria-label": "Next month",
|
|
296
|
-
icon:
|
|
297
|
-
size:
|
|
298
|
-
onClick: () =>
|
|
300
|
+
icon: W.next,
|
|
301
|
+
size: P.Small,
|
|
302
|
+
onClick: () => z(1)
|
|
299
303
|
}
|
|
300
304
|
)
|
|
301
305
|
] }),
|
|
302
306
|
/* @__PURE__ */ c("div", { className: "grid grid-cols-7 gap-y-1 text-center", children: [
|
|
303
|
-
|
|
307
|
+
ae.map((t) => /* @__PURE__ */ e(
|
|
304
308
|
"div",
|
|
305
309
|
{
|
|
306
310
|
"aria-hidden": "true",
|
|
@@ -309,38 +313,39 @@ const G = ({
|
|
|
309
313
|
},
|
|
310
314
|
t
|
|
311
315
|
)),
|
|
312
|
-
|
|
313
|
-
const
|
|
316
|
+
le.map((t) => {
|
|
317
|
+
const N = t.getMonth() !== T.getMonth(), m = K(t, n), $ = K(t, ee), j = U(t, u, h);
|
|
314
318
|
return /* @__PURE__ */ e(
|
|
315
319
|
"button",
|
|
316
320
|
{
|
|
317
321
|
type: "button",
|
|
318
|
-
disabled:
|
|
319
|
-
"aria-label":
|
|
320
|
-
"aria-pressed":
|
|
321
|
-
"aria-current":
|
|
322
|
+
disabled: j,
|
|
323
|
+
"aria-label": $e(t, l),
|
|
324
|
+
"aria-pressed": m,
|
|
325
|
+
"aria-current": $ ? "date" : void 0,
|
|
322
326
|
className: d(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
327
|
+
ke,
|
|
328
|
+
N && we,
|
|
329
|
+
$ && !m && Oe,
|
|
330
|
+
m && Me,
|
|
331
|
+
j && "cursor-not-allowed opacity-40 hover:bg-transparent"
|
|
328
332
|
),
|
|
329
|
-
onClick: () =>
|
|
333
|
+
onClick: () => ne(t, r),
|
|
330
334
|
children: t.getDate()
|
|
331
335
|
},
|
|
332
336
|
t.toISOString()
|
|
333
337
|
);
|
|
334
338
|
})
|
|
335
339
|
] }),
|
|
336
|
-
s ===
|
|
340
|
+
s === D.DateTime && /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-3 border-t border-secondary pt-3", children: [
|
|
337
341
|
/* @__PURE__ */ e("span", { className: "dial-small-text text-primary", children: "Time" }),
|
|
338
342
|
/* @__PURE__ */ e(
|
|
339
|
-
|
|
343
|
+
q,
|
|
340
344
|
{
|
|
341
345
|
ariaLabel: "Time",
|
|
342
346
|
value: n ? M(n) : "",
|
|
343
|
-
onChange:
|
|
347
|
+
onChange: re,
|
|
348
|
+
onBlur: C,
|
|
344
349
|
className: "w-[120px] px-3 py-1.5"
|
|
345
350
|
}
|
|
346
351
|
)
|
|
@@ -351,5 +356,5 @@ const G = ({
|
|
|
351
356
|
] });
|
|
352
357
|
};
|
|
353
358
|
export {
|
|
354
|
-
|
|
359
|
+
lt as Calendar
|
|
355
360
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { DialIcon as
|
|
2
|
+
import { useMemo as C } from "react";
|
|
3
|
+
import { DialIcon as k } from "../../Icon/Icon.js";
|
|
4
4
|
import { NotificationVariant as n, NotificationType as s } from "../../../types/notification.js";
|
|
5
5
|
import { mergeClasses as c } from "../../../utils/merge-classes.js";
|
|
6
|
-
import { CloseButton as
|
|
7
|
-
import { variantIcons as
|
|
8
|
-
const
|
|
6
|
+
import { CloseButton as u } from "../CloseButton/CloseButton.js";
|
|
7
|
+
import { variantIcons as M, notificationVariantRoleMap as v, notificationVariantClassNameMap as T, alertBaseClassName as I } from "./constants.js";
|
|
8
|
+
const q = ({
|
|
9
9
|
variant: e = n.Info,
|
|
10
10
|
type: i = s.Toast,
|
|
11
11
|
title: o,
|
|
@@ -13,18 +13,18 @@ const R = ({
|
|
|
13
13
|
className: d,
|
|
14
14
|
iconSize: t = 24,
|
|
15
15
|
iconStroke: m = 2,
|
|
16
|
-
closable:
|
|
17
|
-
onClose:
|
|
16
|
+
closable: f = !1,
|
|
17
|
+
onClose: p,
|
|
18
18
|
children: x,
|
|
19
19
|
textClassName: h,
|
|
20
|
-
...
|
|
20
|
+
...w
|
|
21
21
|
}) => {
|
|
22
|
-
const
|
|
22
|
+
const N = C(() => M({ size: t, stroke: m })[e], [e, t, m]), g = h ?? (i === s.SectionMessage ? "flex-row flex-wrap items-baseline gap-x-1" : "flex-col");
|
|
23
23
|
return /* @__PURE__ */ r(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
role:
|
|
27
|
-
...
|
|
26
|
+
role: v[e],
|
|
27
|
+
...w,
|
|
28
28
|
className: c(
|
|
29
29
|
I,
|
|
30
30
|
T[e],
|
|
@@ -34,7 +34,7 @@ const R = ({
|
|
|
34
34
|
),
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
|
|
37
|
-
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(
|
|
37
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex shrink-0", children: /* @__PURE__ */ a(k, { icon: N }) }),
|
|
38
38
|
o ? /* @__PURE__ */ r(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
@@ -50,18 +50,18 @@ const R = ({
|
|
|
50
50
|
) : /* @__PURE__ */ a("div", { className: "dial-small-paragraph-text min-w-0 text-primary break-words", children: l })
|
|
51
51
|
] }),
|
|
52
52
|
x,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
f && /* @__PURE__ */ a(
|
|
54
|
+
u,
|
|
55
55
|
{
|
|
56
|
-
className: "
|
|
56
|
+
className: "shrink-0 self-start",
|
|
57
57
|
ariaLabel: "Close notification",
|
|
58
|
-
onClose: (b) =>
|
|
58
|
+
onClose: (b) => p?.(b)
|
|
59
59
|
}
|
|
60
|
-
)
|
|
60
|
+
)
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
q as Notification
|
|
67
67
|
};
|
|
@@ -46,9 +46,7 @@ const A = ({
|
|
|
46
46
|
return !l && !i ? c : /* @__PURE__ */ m("div", { className: "flex w-full flex-col gap-1", children: [
|
|
47
47
|
/* @__PURE__ */ m("div", { className: "flex items-baseline gap-2", children: [
|
|
48
48
|
e && /* @__PURE__ */ r(y, { ...e, id: n }),
|
|
49
|
-
i &&
|
|
50
|
-
// at the end when there is no label beside it.
|
|
51
|
-
/* @__PURE__ */ r("span", { className: "dial-tiny-text text-secondary ml-auto shrink-0", children: i })
|
|
49
|
+
i && /* @__PURE__ */ r("span", { className: "dial-tiny-text text-secondary ml-auto shrink-0", children: i })
|
|
52
50
|
] }),
|
|
53
51
|
c
|
|
54
52
|
] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.15.0-dev.
|
|
3
|
-
"generatedAt": "2026-09-
|
|
2
|
+
"version": "0.15.0-dev.6",
|
|
3
|
+
"generatedAt": "2026-09-17T21:39:44.989Z",
|
|
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",
|