@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.
@@ -1,79 +1,84 @@
1
- import { jsxs as x, jsx as r } from "react/jsx-runtime";
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 A } from "../Popup/Popup.js";
6
- import { Spinner as _ } from "../../Spinner/Spinner.js";
7
- import { ConfirmationPopupVariant as D } from "../../../types/confirmation-popup.js";
8
- import { PopupSize as F } from "../../../types/popup.js";
9
- import { mergeClasses as f } from "../../../utils/merge-classes.js";
10
- import { actionsBaseClassName as K, defaultCancelLabel as L, defaultConfirmLabel as T, variantConfig as s, loaderContainerClassName as V, descriptionBaseClassName as q } from "./constants.js";
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 X = ({
13
- header: p,
13
+ const Z = ({
14
+ header: u,
14
15
  description: a,
15
- descriptionClassName: m,
16
- open: u = !1,
17
- confirmLabel: c = T,
18
- cancelLabel: C = L,
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: N,
22
- confirmClassName: b,
23
- onClose: t,
24
- onConfirm: v,
25
- onCancel: l,
22
+ className: b,
23
+ confirmClassName: v,
24
+ onClose: l,
25
+ onConfirm: B,
26
+ onCancel: n,
26
27
  children: e,
27
- variant: n = D.Info,
28
- size: P = F.Sm,
29
- footer: i,
28
+ variant: i = F.Info,
29
+ size: P = K.Sm,
30
+ footer: s,
30
31
  hideClose: S,
31
- ...B
32
+ ...h
32
33
  }) => {
33
- const h = o ? null : /* @__PURE__ */ x("div", { className: K, children: [
34
+ const k = o ? null : /* @__PURE__ */ A("div", { className: L, children: [
34
35
  /* @__PURE__ */ r(
35
36
  z,
36
37
  {
37
- label: C,
38
- onClick: () => l ? l() : t?.()
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: s[n].confirm.variant,
45
- appearance: s[n].confirm.appearance,
46
- className: b,
47
- label: c,
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: v
54
+ onClick: B
50
55
  }
51
56
  )
52
- ] }), k = I(() => o ? /* @__PURE__ */ r("div", { className: V, children: /* @__PURE__ */ r(_, { size: 40 }) }) : e ?? (a ? /* @__PURE__ */ r(
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: f(
60
+ className: m(
56
61
  q,
57
- m
62
+ t
58
63
  ),
59
64
  children: a
60
65
  }
61
- ) : null), [e, a, o, m]);
66
+ ) : null), [e, a, o, t]);
62
67
  return /* @__PURE__ */ r(
63
- A,
68
+ _,
64
69
  {
65
- ...B,
66
- open: u,
67
- header: p,
68
- className: f(N, w.confirmationPopup),
69
- onClose: () => t?.(),
70
- footer: i ?? h,
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 && i === void 0),
73
- children: k()
77
+ hideClose: S ?? (!o && s === void 0),
78
+ children: x()
74
79
  }
75
80
  );
76
81
  };
77
82
  export {
78
- X as ConfirmationPopup
83
+ Z as ConfirmationPopup
79
84
  };