@epam/ai-dial-builder-form 1.1.0-dev.372 → 1.1.0-dev.373
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/BuilderFormContainer/BuilderFormContainer.d.ts.map +1 -1
- package/components/BuilderFormHeader/BuilderFormHeader.d.ts.map +1 -1
- package/index.js +65 -50
- package/models/builder-form-container-props.d.ts +2 -0
- package/models/builder-form-container-props.d.ts.map +1 -1
- package/models/builder-form-header-props.d.ts +4 -0
- package/models/builder-form-header-props.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuilderFormContainer.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormContainer/BuilderFormContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAK3F,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"BuilderFormContainer.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormContainer/BuilderFormContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAK3F,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAyC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuilderFormHeader.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormHeader/BuilderFormHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BuilderFormHeader.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormHeader/BuilderFormHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGrF,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAiFxD,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { buildCssVars as e, mergeClasses as t } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import { DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, GhostIconButton as o, NeutralButton as s, PrimaryButton as c } from "@epam/ai-dial-ui-kit";
|
|
4
|
-
import { IconArrowLeft as
|
|
3
|
+
import { DIAL_ICON_SIZE as i, DIAL_KIT_ICON_STROKE as a, GhostIconButton as o, NeutralButton as s, PrimaryButton as c, Spinner as l } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconArrowLeft as u } from "@tabler/icons-react";
|
|
5
5
|
//#region src/components/BuilderFormBody/BuilderFormBody.tsx
|
|
6
|
-
var
|
|
6
|
+
var d = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", f = ({ left: e, children: t, metadata: i }) => /* @__PURE__ */ r("div", {
|
|
7
7
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
8
8
|
children: [
|
|
9
9
|
e != null && /* @__PURE__ */ n("div", {
|
|
10
|
-
className:
|
|
10
|
+
className: d,
|
|
11
11
|
children: e
|
|
12
12
|
}),
|
|
13
13
|
/* @__PURE__ */ n("div", {
|
|
@@ -15,7 +15,7 @@ var u = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", d = ({ left:
|
|
|
15
15
|
children: t
|
|
16
16
|
}),
|
|
17
17
|
i != null && /* @__PURE__ */ n("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: d,
|
|
19
19
|
children: i
|
|
20
20
|
}),
|
|
21
21
|
e != null && i == null && /* @__PURE__ */ n("div", {
|
|
@@ -23,67 +23,82 @@ var u = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", d = ({ left:
|
|
|
23
23
|
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
24
24
|
})
|
|
25
25
|
]
|
|
26
|
-
}),
|
|
26
|
+
}), p = {
|
|
27
27
|
header: "_header_1m5zp_1",
|
|
28
28
|
title: "_title_1m5zp_5"
|
|
29
|
-
},
|
|
30
|
-
let { colors:
|
|
29
|
+
}, m = ({ labels: d, onBack: f, onCancel: m, onSubmit: h, isCancelDisabled: g = !1, isSubmitDisabled: _ = !1, isSubmitting: v = !1, styles: y }) => {
|
|
30
|
+
let { colors: b, typography: x } = y ?? {}, S = x?.fontClassName ?? "dial-h1-text", C = !!x?.fontClassName;
|
|
31
31
|
return /* @__PURE__ */ r("div", {
|
|
32
32
|
style: e({
|
|
33
|
-
"--bfh-border":
|
|
34
|
-
"--bfh-font-family":
|
|
33
|
+
"--bfh-border": b?.borderColor,
|
|
34
|
+
"--bfh-font-family": C ? void 0 : x?.fontFamily
|
|
35
35
|
}),
|
|
36
|
-
className: t("flex h-16 items-center justify-between gap-6 border-b px-8",
|
|
37
|
-
children: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
36
|
+
className: t("flex h-16 items-center justify-between gap-6 border-b px-8", p.header),
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ r("div", {
|
|
39
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
40
|
+
children: [/* @__PURE__ */ n(o, {
|
|
41
|
+
icon: /* @__PURE__ */ n(u, {
|
|
42
|
+
size: i.LG,
|
|
43
|
+
className: "rtl:scale-x-[-1]",
|
|
44
|
+
"aria-hidden": !0,
|
|
45
|
+
stroke: a
|
|
46
|
+
}),
|
|
47
|
+
"aria-label": d.backButtonLabel,
|
|
48
|
+
onClick: f
|
|
49
|
+
}), /* @__PURE__ */ n("h1", {
|
|
50
|
+
className: t("truncate", p.title, S),
|
|
51
|
+
children: d.title
|
|
52
|
+
})]
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ r("div", {
|
|
55
|
+
className: "flex items-center gap-2",
|
|
56
|
+
children: [/* @__PURE__ */ n(s, {
|
|
57
|
+
label: d.cancelButtonLabel,
|
|
58
|
+
onClick: m,
|
|
59
|
+
disabled: g
|
|
60
|
+
}), /* @__PURE__ */ n(c, {
|
|
61
|
+
label: d.submitButtonLabel,
|
|
62
|
+
onClick: h,
|
|
63
|
+
disabled: _,
|
|
64
|
+
"aria-busy": v,
|
|
65
|
+
iconBefore: v ? /* @__PURE__ */ n("span", {
|
|
66
|
+
"aria-hidden": !0,
|
|
67
|
+
children: /* @__PURE__ */ n(l, { size: i.SM })
|
|
68
|
+
}) : void 0
|
|
69
|
+
})]
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ n("span", {
|
|
72
|
+
role: "status",
|
|
73
|
+
"aria-live": "polite",
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: v ? d.submittingLabel ?? "Submitting" : ""
|
|
76
|
+
})
|
|
77
|
+
]
|
|
64
78
|
});
|
|
65
|
-
},
|
|
66
|
-
let { colors:
|
|
79
|
+
}, h = { container: "_container_apxt7_1" }, g = ({ labels: i, onBack: a, onCancel: o, onSubmit: s, isCancelDisabled: c = !1, isSubmitDisabled: l = !1, isSubmitting: u = !1, left: d, children: p, metadata: g, styles: _ }) => {
|
|
80
|
+
let { colors: v, header: y, cssVars: b } = _ ?? {};
|
|
67
81
|
return /* @__PURE__ */ r("div", {
|
|
68
82
|
style: {
|
|
69
|
-
...e({ "--bfc-bg":
|
|
70
|
-
...
|
|
83
|
+
...e({ "--bfc-bg": v?.background }),
|
|
84
|
+
...b
|
|
71
85
|
},
|
|
72
|
-
className: t("flex h-full w-full flex-col overflow-y-auto",
|
|
73
|
-
children: [/* @__PURE__ */ n(
|
|
86
|
+
className: t("flex h-full w-full flex-col overflow-y-auto", h.container),
|
|
87
|
+
children: [/* @__PURE__ */ n(m, {
|
|
74
88
|
labels: i,
|
|
75
89
|
onBack: a,
|
|
76
90
|
onCancel: o,
|
|
77
91
|
onSubmit: s,
|
|
78
92
|
isCancelDisabled: c,
|
|
79
93
|
isSubmitDisabled: l,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
94
|
+
isSubmitting: u,
|
|
95
|
+
styles: y
|
|
96
|
+
}), /* @__PURE__ */ n(f, {
|
|
97
|
+
left: d,
|
|
98
|
+
metadata: g,
|
|
99
|
+
children: p
|
|
85
100
|
})]
|
|
86
101
|
});
|
|
87
102
|
};
|
|
88
103
|
//#endregion
|
|
89
|
-
export {
|
|
104
|
+
export { g as BuilderFormContainer };
|
|
@@ -35,6 +35,8 @@ export interface BuilderFormContainerProps {
|
|
|
35
35
|
isCancelDisabled?: boolean;
|
|
36
36
|
/** When `true`, the header's submit action is disabled. Defaults to `false`. */
|
|
37
37
|
isSubmitDisabled?: boolean;
|
|
38
|
+
/** When `true`, the header's submit action shows a spinner and reports `aria-busy`. Defaults to `false`. */
|
|
39
|
+
isSubmitting?: boolean;
|
|
38
40
|
/** Body's start-edge column. Full width on mobile, a fixed-width column on desktop. */
|
|
39
41
|
left?: ReactNode;
|
|
40
42
|
/** Body's main column, filling the space left by `left` and `metadata`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-form-container-props.d.ts","sourceRoot":"","sources":["../../src/models/builder-form-container-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IACvC,MAAM,EAAE,uBAAuB,CAAC;IAChC,gEAAgE;IAChE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uFAAuF;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAC;IACpB,oLAAoL;IACpL,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uBAAuB;IACvB,MAAM,CAAC,EAAE,0BAA0B,CAAC;CACrC"}
|
|
1
|
+
{"version":3,"file":"builder-form-container-props.d.ts","sourceRoot":"","sources":["../../src/models/builder-form-container-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,uCAAuC;IACvC,MAAM,EAAE,uBAAuB,CAAC;IAChC,gEAAgE;IAChE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4GAA4G;IAC5G,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uFAAuF;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAC;IACpB,oLAAoL;IACpL,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uBAAuB;IACvB,MAAM,CAAC,EAAE,0BAA0B,CAAC;CACrC"}
|
|
@@ -8,6 +8,8 @@ export interface BuilderFormHeaderLabels {
|
|
|
8
8
|
cancelButtonLabel: string;
|
|
9
9
|
/** Label for the submit action. */
|
|
10
10
|
submitButtonLabel: string;
|
|
11
|
+
/** Accessible name for the submit action's busy indicator, announced while `isSubmitting` is `true`. Defaults to `'Submitting'`. */
|
|
12
|
+
submittingLabel?: string;
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Color overrides for the {@link BuilderFormHeader} component, applied as CSS
|
|
@@ -45,6 +47,8 @@ export interface BuilderFormHeaderProps {
|
|
|
45
47
|
isCancelDisabled?: boolean;
|
|
46
48
|
/** When `true`, the submit action is disabled. Defaults to `false`. */
|
|
47
49
|
isSubmitDisabled?: boolean;
|
|
50
|
+
/** When `true`, the submit action shows a spinner and reports `aria-busy`. Defaults to `false`. */
|
|
51
|
+
isSubmitting?: boolean;
|
|
48
52
|
/** Style overrides. */
|
|
49
53
|
styles?: BuilderFormHeaderStyles;
|
|
50
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder-form-header-props.d.ts","sourceRoot":"","sources":["../../src/models/builder-form-header-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mCAAmC;IACnC,iBAAiB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"builder-form-header-props.d.ts","sourceRoot":"","sources":["../../src/models/builder-form-header-props.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mCAAmC;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oIAAoI;IACpI,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wEAAwE;AACxE,MAAM,WAAW,2BAA2B;IAC1C,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,mEAAmE;AACnE,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,iDAAiD;IACjD,UAAU,CAAC,EAAE,2BAA2B,CAAC;CAC1C;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,wBAAwB;IACxB,MAAM,EAAE,uBAAuB,CAAC;IAChC,uDAAuD;IACvD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mGAAmG;IACnG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uBAAuB;IACvB,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-builder-form",
|
|
3
3
|
"description": "Presentational builder form components for composing and editing DIAL entities",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.373",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.373",
|
|
21
21
|
"@epam/ai-dial-ui-kit": "^0.14.0-dev.15",
|
|
22
22
|
"@tabler/icons-react": "^3.44.0",
|
|
23
23
|
"react": "^19.0.0"
|