@epam/ai-dial-ui-kit 0.16.0-dev.12 → 0.16.0-dev.14
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 +1 -0
- package/dist/CHANGELOG.md +4 -0
- package/dist/{DateCellRenderer-xHilQEYj.cjs → DateCellRenderer-CkDF66wX.cjs} +28 -28
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +49 -44
- package/dist/components/New/Dropdown/Dropdown.js +320 -251
- package/dist/components/New/Dropdown/constants.js +20 -17
- package/dist/components/New/Dropdown/search.js +37 -0
- package/dist/components-manifest.json +56 -4
- package/dist/constants/public-class-names.js +2 -0
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/grid.cjs +1 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +42 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +6 -0
- package/dist/src/components/New/Dropdown/search.d.ts +9 -0
- package/dist/src/constants/public-class-names.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,79 +1,84 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as A, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as I } from "react";
|
|
3
3
|
import { Button as j } from "../Button/Button.js";
|
|
4
4
|
import { NeutralButton as z } from "../Button/ButtonWrappers.js";
|
|
5
|
-
import { Popup as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { Popup as _ } from "../Popup/Popup.js";
|
|
6
|
+
import { popupMainActionButtonClassName as f } from "../Popup/constants.js";
|
|
7
|
+
import { Spinner as D } from "../../Spinner/Spinner.js";
|
|
8
|
+
import { ConfirmationPopupVariant as F } from "../../../types/confirmation-popup.js";
|
|
9
|
+
import { PopupSize as K } from "../../../types/popup.js";
|
|
10
|
+
import { mergeClasses as m } from "../../../utils/merge-classes.js";
|
|
11
|
+
import { actionsBaseClassName as L, defaultCancelLabel as M, defaultConfirmLabel as T, variantConfig as p, loaderContainerClassName as V, descriptionBaseClassName as q } from "./constants.js";
|
|
11
12
|
import { DIAL_KIT_CLASS as w } from "../../../constants/public-class-names.js";
|
|
12
|
-
const
|
|
13
|
-
header:
|
|
13
|
+
const Z = ({
|
|
14
|
+
header: u,
|
|
14
15
|
description: a,
|
|
15
|
-
descriptionClassName:
|
|
16
|
-
open:
|
|
17
|
-
confirmLabel:
|
|
18
|
-
cancelLabel:
|
|
16
|
+
descriptionClassName: t,
|
|
17
|
+
open: c = !1,
|
|
18
|
+
confirmLabel: C = T,
|
|
19
|
+
cancelLabel: N = M,
|
|
19
20
|
isLoading: o = !1,
|
|
20
21
|
disableConfirmButton: d = !1,
|
|
21
|
-
className:
|
|
22
|
-
confirmClassName:
|
|
23
|
-
onClose:
|
|
24
|
-
onConfirm:
|
|
25
|
-
onCancel:
|
|
22
|
+
className: b,
|
|
23
|
+
confirmClassName: v,
|
|
24
|
+
onClose: l,
|
|
25
|
+
onConfirm: B,
|
|
26
|
+
onCancel: n,
|
|
26
27
|
children: e,
|
|
27
|
-
variant:
|
|
28
|
-
size: P =
|
|
29
|
-
footer:
|
|
28
|
+
variant: i = F.Info,
|
|
29
|
+
size: P = K.Sm,
|
|
30
|
+
footer: s,
|
|
30
31
|
hideClose: S,
|
|
31
|
-
...
|
|
32
|
+
...h
|
|
32
33
|
}) => {
|
|
33
|
-
const
|
|
34
|
+
const k = o ? null : /* @__PURE__ */ A("div", { className: L, children: [
|
|
34
35
|
/* @__PURE__ */ r(
|
|
35
36
|
z,
|
|
36
37
|
{
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
className: f,
|
|
39
|
+
label: N,
|
|
40
|
+
onClick: () => n ? n() : l?.()
|
|
39
41
|
}
|
|
40
42
|
),
|
|
41
43
|
/* @__PURE__ */ r(
|
|
42
44
|
j,
|
|
43
45
|
{
|
|
44
|
-
variant:
|
|
45
|
-
appearance:
|
|
46
|
-
className:
|
|
47
|
-
|
|
46
|
+
variant: p[i].confirm.variant,
|
|
47
|
+
appearance: p[i].confirm.appearance,
|
|
48
|
+
className: m(
|
|
49
|
+
f,
|
|
50
|
+
v
|
|
51
|
+
),
|
|
52
|
+
label: C,
|
|
48
53
|
disabled: d,
|
|
49
|
-
onClick:
|
|
54
|
+
onClick: B
|
|
50
55
|
}
|
|
51
56
|
)
|
|
52
|
-
] }),
|
|
57
|
+
] }), x = I(() => o ? /* @__PURE__ */ r("div", { className: V, children: /* @__PURE__ */ r(D, { size: 40 }) }) : e ?? (a ? /* @__PURE__ */ r(
|
|
53
58
|
"div",
|
|
54
59
|
{
|
|
55
|
-
className:
|
|
60
|
+
className: m(
|
|
56
61
|
q,
|
|
57
|
-
|
|
62
|
+
t
|
|
58
63
|
),
|
|
59
64
|
children: a
|
|
60
65
|
}
|
|
61
|
-
) : null), [e, a, o,
|
|
66
|
+
) : null), [e, a, o, t]);
|
|
62
67
|
return /* @__PURE__ */ r(
|
|
63
|
-
|
|
68
|
+
_,
|
|
64
69
|
{
|
|
65
|
-
...
|
|
66
|
-
open:
|
|
67
|
-
header:
|
|
68
|
-
className:
|
|
69
|
-
onClose: () =>
|
|
70
|
-
footer:
|
|
70
|
+
...h,
|
|
71
|
+
open: c,
|
|
72
|
+
header: u,
|
|
73
|
+
className: m(b, w.confirmationPopup),
|
|
74
|
+
onClose: () => l?.(),
|
|
75
|
+
footer: s ?? k,
|
|
71
76
|
size: P,
|
|
72
|
-
hideClose: S ?? (!o &&
|
|
73
|
-
children:
|
|
77
|
+
hideClose: S ?? (!o && s === void 0),
|
|
78
|
+
children: x()
|
|
74
79
|
}
|
|
75
80
|
);
|
|
76
81
|
};
|
|
77
82
|
export {
|
|
78
|
-
|
|
83
|
+
Z as ConfirmationPopup
|
|
79
84
|
};
|