@epam/ai-dial-chat-shared 1.3.0-dev.141 → 1.3.0-dev.147
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/components/ConfirmationDialog/ConfirmationDialog.d.ts +6 -1
- package/components/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/components/ConfirmationDialog/ConfirmationDialog.js +11 -9
- package/components/ConfirmationView/ConfirmationView.d.ts +2 -0
- package/components/ConfirmationView/ConfirmationView.d.ts.map +1 -1
- package/components/ConfirmationView/ConfirmationView.js +10 -10
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PopupSize } from '@epam/ai-dial-ui-kit';
|
|
2
2
|
import { FC } from 'react';
|
|
3
|
+
import { ConfirmationFooterStyles } from '../ConfirmationView/ConfirmationFooter';
|
|
3
4
|
import { ConfirmationViewProps } from '../ConfirmationView/ConfirmationView';
|
|
4
5
|
/** Props for `ConfirmationDialog`. */
|
|
5
|
-
export interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
6
|
+
export interface ConfirmationDialogProps extends Omit<ConfirmationViewProps, 'className'> {
|
|
6
7
|
/** Whether the dialog is open. */
|
|
7
8
|
open: boolean;
|
|
8
9
|
/** Dialog title. A string rather than a node, so the kit names the dialog with it. */
|
|
@@ -27,6 +28,10 @@ export interface ConfirmationDialogProps extends ConfirmationViewProps {
|
|
|
27
28
|
popupClassName?: string;
|
|
28
29
|
/** CSS class applied to the dialog title. */
|
|
29
30
|
titleClassName?: string;
|
|
31
|
+
/** CSS class applied to the content view root, e.g. a `pt-0` override of its default top padding. */
|
|
32
|
+
viewClassName?: string;
|
|
33
|
+
/** Style overrides forwarded to the action row, e.g. a transparent top border. */
|
|
34
|
+
footerStyles?: ConfirmationFooterStyles;
|
|
30
35
|
/** Called when the user confirms. */
|
|
31
36
|
onConfirm: () => void;
|
|
32
37
|
/** Called when the dialog is dismissed — Cancel, the header close control, Escape, or an outside click. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationDialog/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAC;AAS9C,sCAAsC;AACtC,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CACnD,qBAAqB,EACrB,WAAW,CACZ;IACC,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oIAAoI;IACpI,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iHAAiH;IACjH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qGAAqG;IACrG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,qCAAqC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,2GAA2G;IAC3G,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAwD1D,CAAC"}
|
|
@@ -3,9 +3,9 @@ import { ConfirmationFooter as t } from "../ConfirmationView/ConfirmationFooter.
|
|
|
3
3
|
import { ConfirmationPopupVariant as n, Popup as r, PopupSize as i } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ConfirmationDialog/ConfirmationDialog.tsx
|
|
6
|
-
var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1, isConfirmDisabled: d = !1, loadingStatusLabel: f, size: p = i.Sm, popupClassName: m, titleClassName: h,
|
|
7
|
-
let
|
|
8
|
-
u ||
|
|
6
|
+
var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1, isConfirmDisabled: d = !1, loadingStatusLabel: f, size: p = i.Sm, popupClassName: m, titleClassName: h, viewClassName: g, footerStyles: _, variant: v = n.Info, onConfirm: y, onClose: b, ...x }) => {
|
|
7
|
+
let S = () => {
|
|
8
|
+
u || b();
|
|
9
9
|
};
|
|
10
10
|
return /* @__PURE__ */ a(r, {
|
|
11
11
|
open: o,
|
|
@@ -13,20 +13,22 @@ var o = ({ open: o, title: s, confirmLabel: c, cancelLabel: l, isLoading: u = !1
|
|
|
13
13
|
size: p,
|
|
14
14
|
className: m,
|
|
15
15
|
titleClassName: h,
|
|
16
|
-
onClose:
|
|
16
|
+
onClose: S,
|
|
17
17
|
footer: /* @__PURE__ */ a(t, {
|
|
18
|
-
variant:
|
|
18
|
+
variant: v,
|
|
19
19
|
confirmLabel: c,
|
|
20
20
|
cancelLabel: l,
|
|
21
21
|
isLoading: u,
|
|
22
22
|
isConfirmDisabled: d,
|
|
23
23
|
loadingStatusLabel: f,
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
styles: _,
|
|
25
|
+
onConfirm: y,
|
|
26
|
+
onCancel: S
|
|
26
27
|
}),
|
|
27
28
|
children: /* @__PURE__ */ a(e, {
|
|
28
|
-
variant:
|
|
29
|
-
|
|
29
|
+
variant: v,
|
|
30
|
+
className: g,
|
|
31
|
+
...x
|
|
30
32
|
})
|
|
31
33
|
});
|
|
32
34
|
};
|
|
@@ -40,6 +40,8 @@ export interface ConfirmationViewProps {
|
|
|
40
40
|
variant?: ConfirmationPopupVariant;
|
|
41
41
|
/** Typography class applied to the message and the bullet list. Defaults to `'dial-small-text'`. */
|
|
42
42
|
messageClassName?: string;
|
|
43
|
+
/** CSS class applied to the view root, e.g. a `pt-0` override of the default top padding. */
|
|
44
|
+
className?: string;
|
|
43
45
|
/** Style overrides. */
|
|
44
46
|
styles?: ConfirmationViewStyles;
|
|
45
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,wJAAwJ;IACxJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oIAAoI;AACpI,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ConfirmationView.d.ts","sourceRoot":"","sources":["../../../src/components/ConfirmationView/ConfirmationView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,MAAM,CAAC,EAAE,sBAAsB,CAAC;CACjC;AAED,oCAAoC;AACpC,MAAM,WAAW,qBAAqB;IACpC,wJAAwJ;IACxJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,6HAA6H;IAC7H,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kGAAkG;IAClG,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,oGAAoG;IACpG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,oIAAoI;AACpI,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsEtD,CAAC"}
|
|
@@ -5,22 +5,22 @@ import r from "./ConfirmationView.module.scss.js";
|
|
|
5
5
|
import { ConfirmationPopupVariant as i } from "@epam/ai-dial-ui-kit";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ConfirmationView/ConfirmationView.tsx
|
|
8
|
-
var s = ({ item: s, identity: c, message: l, details: u, consequences: d, variant: f = i.Info, messageClassName: p = "dial-small-text",
|
|
9
|
-
let
|
|
10
|
-
"--cfm-message-text":
|
|
11
|
-
"--cfm-consequence-text":
|
|
8
|
+
var s = ({ item: s, identity: c, message: l, details: u, consequences: d, variant: f = i.Info, messageClassName: p = "dial-small-text", className: m, styles: h, children: g }) => {
|
|
9
|
+
let _ = h?.colors, v = t({
|
|
10
|
+
"--cfm-message-text": _?.messageText,
|
|
11
|
+
"--cfm-consequence-text": _?.consequenceText
|
|
12
12
|
});
|
|
13
13
|
return /* @__PURE__ */ o("div", {
|
|
14
|
-
style:
|
|
15
|
-
className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
|
|
14
|
+
style: v,
|
|
15
|
+
className: e("flex flex-col gap-4 px-4 py-4 desktop:px-6", m),
|
|
16
16
|
children: [
|
|
17
17
|
c ?? (s != null && /* @__PURE__ */ a(n, {
|
|
18
18
|
item: s,
|
|
19
19
|
variant: f,
|
|
20
20
|
styles: { colors: {
|
|
21
|
-
background:
|
|
22
|
-
dangerBackground:
|
|
23
|
-
dangerBorder:
|
|
21
|
+
background: _?.cardBackground,
|
|
22
|
+
dangerBackground: _?.cardDangerBackground,
|
|
23
|
+
dangerBorder: _?.cardDangerBorder
|
|
24
24
|
} }
|
|
25
25
|
})),
|
|
26
26
|
/* @__PURE__ */ a("p", {
|
|
@@ -32,7 +32,7 @@ var s = ({ item: s, identity: c, message: l, details: u, consequences: d, varian
|
|
|
32
32
|
className: e("flex list-disc flex-col gap-2 ps-5", p, r.consequences),
|
|
33
33
|
children: d.map((e) => /* @__PURE__ */ a("li", { children: e }, e))
|
|
34
34
|
}),
|
|
35
|
-
|
|
35
|
+
g
|
|
36
36
|
]
|
|
37
37
|
});
|
|
38
38
|
};
|
package/package.json
CHANGED