@epam/ai-dial-builder-form 1.0.0-rc.4

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.
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { BuilderFormBodyProps } from '../../models/builder-form-body-props';
3
+ /** Builder form body split into start, main, and end columns — stacked on mobile, side by side on desktop. */
4
+ export declare const BuilderFormBody: FC<BuilderFormBodyProps>;
5
+ //# sourceMappingURL=BuilderFormBody.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuilderFormBody.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormBody/BuilderFormBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAOjF,8GAA8G;AAC9G,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAsBpD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { BuilderFormContainerProps } from '../../models/builder-form-container-props';
3
+ /** Full-height scrollable builder form page shell with a header above the form content. */
4
+ export declare const BuilderFormContainer: FC<BuilderFormContainerProps>;
5
+ //# sourceMappingURL=BuilderFormContainer.d.ts.map
@@ -0,0 +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,CAuC9D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { BuilderFormHeaderProps } from '../../models/builder-form-header-props';
3
+ /** Builder form page header: a back control, the form title, and cancel/submit actions. */
4
+ export declare const BuilderFormHeader: FC<BuilderFormHeaderProps>;
5
+ //# sourceMappingURL=BuilderFormHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuilderFormHeader.d.ts","sourceRoot":"","sources":["../../../src/components/BuilderFormHeader/BuilderFormHeader.tsx"],"names":[],"mappings":"AAQA,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,CAyDxD,CAAC"}
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ ._header_1m5zp_1{border-bottom-color:var(--bfh-border,var(--stroke-tertiary,#e0e6f0))}._title_1m5zp_5{font-family:var(--bfh-font-family,inherit)}._container_apxt7_1{background:var(--bfc-bg,var(--bg-layer-base,#f5f7fa))}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export { BuilderFormContainer } from './components/BuilderFormContainer/BuilderFormContainer';
2
+ export type { BuilderFormContainerProps, BuilderFormContainerStyles, BuilderFormContainerColors, } from './models/builder-form-container-props';
3
+ export type { BuilderFormHeaderLabels, BuilderFormHeaderStyles, BuilderFormHeaderColors, BuilderFormHeaderTypography, } from './models/builder-form-header-props';
4
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC"}
package/index.js ADDED
@@ -0,0 +1,88 @@
1
+ import { buildCssVars as e, mergeClasses as t } from "@epam/ai-dial-chat-shared";
2
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { DIAL_ICON_SIZE as i, GhostIconButton as a, NeutralButton as o, PrimaryButton as s } from "@epam/ai-dial-ui-kit";
4
+ import { IconArrowLeft as c } from "@tabler/icons-react";
5
+ //#region src/components/BuilderFormBody/BuilderFormBody.tsx
6
+ var l = "flex w-full flex-col desktop:w-[360px] desktop:shrink-0", u = ({ left: e, children: t, metadata: i }) => /* @__PURE__ */ r("div", {
7
+ className: "flex flex-1 flex-col desktop:flex-row",
8
+ children: [
9
+ e != null && /* @__PURE__ */ n("div", {
10
+ className: l,
11
+ children: e
12
+ }),
13
+ /* @__PURE__ */ n("div", {
14
+ className: "flex w-full min-w-0 flex-1 flex-col",
15
+ children: t
16
+ }),
17
+ i != null && /* @__PURE__ */ n("div", {
18
+ className: l,
19
+ children: i
20
+ }),
21
+ e != null && i == null && /* @__PURE__ */ n("div", {
22
+ "aria-hidden": !0,
23
+ className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
24
+ })
25
+ ]
26
+ }), d = {
27
+ header: "_header_1m5zp_1",
28
+ title: "_title_1m5zp_5"
29
+ }, f = ({ labels: l, onBack: u, onCancel: f, onSubmit: p, isCancelDisabled: m = !1, isSubmitDisabled: h = !1, styles: g }) => {
30
+ let { colors: _, typography: v } = g ?? {}, y = v?.fontClassName ?? "dial-h1-text", b = !!v?.fontClassName;
31
+ return /* @__PURE__ */ r("div", {
32
+ style: e({
33
+ "--bfh-border": _?.borderColor,
34
+ "--bfh-font-family": b ? void 0 : v?.fontFamily
35
+ }),
36
+ className: t("flex h-16 items-center justify-between gap-6 border-b px-8", d.header),
37
+ children: [/* @__PURE__ */ r("div", {
38
+ className: "flex min-w-0 flex-1 items-center gap-2",
39
+ children: [/* @__PURE__ */ n(a, {
40
+ icon: /* @__PURE__ */ n(c, {
41
+ size: i.LG,
42
+ className: "rtl:scale-x-[-1]",
43
+ "aria-hidden": !0
44
+ }),
45
+ "aria-label": l.backButtonLabel,
46
+ onClick: u
47
+ }), /* @__PURE__ */ n("h1", {
48
+ className: t("truncate", d.title, y),
49
+ children: l.title
50
+ })]
51
+ }), /* @__PURE__ */ r("div", {
52
+ className: "flex items-center gap-2",
53
+ children: [/* @__PURE__ */ n(o, {
54
+ label: l.cancelButtonLabel,
55
+ onClick: f,
56
+ disabled: m
57
+ }), /* @__PURE__ */ n(s, {
58
+ label: l.submitButtonLabel,
59
+ onClick: p,
60
+ disabled: h
61
+ })]
62
+ })]
63
+ });
64
+ }, p = { container: "_container_apxt7_1" }, m = ({ labels: i, onBack: a, onCancel: o, onSubmit: s, isCancelDisabled: c = !1, isSubmitDisabled: l = !1, left: d, children: m, metadata: h, styles: g }) => {
65
+ let { colors: _, header: v, cssVars: y } = g ?? {};
66
+ return /* @__PURE__ */ r("div", {
67
+ style: {
68
+ ...e({ "--bfc-bg": _?.background }),
69
+ ...y
70
+ },
71
+ className: t("flex h-full w-full flex-col overflow-y-auto", p.container),
72
+ children: [/* @__PURE__ */ n(f, {
73
+ labels: i,
74
+ onBack: a,
75
+ onCancel: o,
76
+ onSubmit: s,
77
+ isCancelDisabled: c,
78
+ isSubmitDisabled: l,
79
+ styles: v
80
+ }), /* @__PURE__ */ n(u, {
81
+ left: d,
82
+ metadata: h,
83
+ children: m
84
+ })]
85
+ });
86
+ };
87
+ //#endregion
88
+ export { m as BuilderFormContainer };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ /** Props for the {@link BuilderFormBody} component. */
3
+ export interface BuilderFormBodyProps {
4
+ /** Start-edge column. Full width on mobile, a fixed-width column on desktop. */
5
+ left?: ReactNode;
6
+ /** Main column, filling the space left by `left` and `metadata`. */
7
+ children: ReactNode;
8
+ /** End-edge column, matching `left`'s width. When omitted while `left` is set, an empty column of the same width is reserved so the main column stays optically centered. */
9
+ metadata?: ReactNode;
10
+ }
11
+ //# sourceMappingURL=builder-form-body-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder-form-body-props.d.ts","sourceRoot":"","sources":["../../src/models/builder-form-body-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,uDAAuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oEAAoE;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,6KAA6K;IAC7K,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -0,0 +1,47 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { BuilderFormHeaderLabels, BuilderFormHeaderStyles } from './builder-form-header-props';
3
+ /**
4
+ * Color overrides for the {@link BuilderFormContainer} component, applied as
5
+ * CSS custom properties with app theme fallbacks.
6
+ */
7
+ export interface BuilderFormContainerColors {
8
+ /** Container background. Fallback: `--bg-layer-base`. */
9
+ background?: string;
10
+ }
11
+ /** Style overrides for the {@link BuilderFormContainer} component. */
12
+ export interface BuilderFormContainerStyles {
13
+ /** Color overrides applied as CSS custom properties. */
14
+ colors?: BuilderFormContainerColors;
15
+ /** Style overrides forwarded to the header. */
16
+ header?: BuilderFormHeaderStyles;
17
+ /**
18
+ * Arbitrary CSS custom properties applied to the container's root element,
19
+ * so vars read anywhere in the form cascade from a single place. Merged
20
+ * after `colors`, so they can override it.
21
+ */
22
+ cssVars?: CSSProperties;
23
+ }
24
+ /** Props for the {@link BuilderFormContainer} component. */
25
+ export interface BuilderFormContainerProps {
26
+ /** Localized labels for the header. */
27
+ labels: BuilderFormHeaderLabels;
28
+ /** Called when the user activates the header's back control. */
29
+ onBack: () => void;
30
+ /** Called when the user activates the header's cancel action. */
31
+ onCancel: () => void;
32
+ /** Called when the user activates the header's submit action. */
33
+ onSubmit: () => void;
34
+ /** When `true`, the header's cancel action is disabled. Defaults to `false`. */
35
+ isCancelDisabled?: boolean;
36
+ /** When `true`, the header's submit action is disabled. Defaults to `false`. */
37
+ isSubmitDisabled?: boolean;
38
+ /** Body's start-edge column. Full width on mobile, a fixed-width column on desktop. */
39
+ left?: ReactNode;
40
+ /** Body's main column, filling the space left by `left` and `metadata`. */
41
+ children: ReactNode;
42
+ /** Body's end-edge column, matching `left`'s width. When omitted while `left` is set, an empty column of the same width is reserved so the main column stays optically centered. */
43
+ metadata?: ReactNode;
44
+ /** Style overrides. */
45
+ styles?: BuilderFormContainerStyles;
46
+ }
47
+ //# sourceMappingURL=builder-form-container-props.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,51 @@
1
+ /** Localized labels used by the {@link BuilderFormHeader} component. */
2
+ export interface BuilderFormHeaderLabels {
3
+ /** Title shown next to the back control. */
4
+ title: string;
5
+ /** Accessible label for the back control. */
6
+ backButtonLabel: string;
7
+ /** Label for the cancel action. */
8
+ cancelButtonLabel: string;
9
+ /** Label for the submit action. */
10
+ submitButtonLabel: string;
11
+ }
12
+ /**
13
+ * Color overrides for the {@link BuilderFormHeader} component, applied as CSS
14
+ * custom properties with app theme fallbacks.
15
+ */
16
+ export interface BuilderFormHeaderColors {
17
+ /** Header's bottom border color. Fallback: `--stroke-tertiary`. */
18
+ borderColor?: string;
19
+ }
20
+ /** Typography overrides for the {@link BuilderFormHeader} component. */
21
+ export interface BuilderFormHeaderTypography {
22
+ /** CSS class applied to the title. Defaults to `'dial-h1-text'`. */
23
+ fontClassName?: string;
24
+ /** Font family applied to the title. Ignored when `fontClassName` is set. */
25
+ fontFamily?: string;
26
+ }
27
+ /** Style overrides for the {@link BuilderFormHeader} component. */
28
+ export interface BuilderFormHeaderStyles {
29
+ /** Color overrides applied as CSS custom properties. */
30
+ colors?: BuilderFormHeaderColors;
31
+ /** Typography overrides applied to the title. */
32
+ typography?: BuilderFormHeaderTypography;
33
+ }
34
+ /** Props for the {@link BuilderFormHeader} component. */
35
+ export interface BuilderFormHeaderProps {
36
+ /** Localized labels. */
37
+ labels: BuilderFormHeaderLabels;
38
+ /** Called when the user activates the back control. */
39
+ onBack: () => void;
40
+ /** Called when the user activates the cancel action. */
41
+ onCancel: () => void;
42
+ /** Called when the user activates the submit action. */
43
+ onSubmit: () => void;
44
+ /** When `true`, the cancel action is disabled. Defaults to `false`. */
45
+ isCancelDisabled?: boolean;
46
+ /** When `true`, the submit action is disabled. Defaults to `false`. */
47
+ isSubmitDisabled?: boolean;
48
+ /** Style overrides. */
49
+ styles?: BuilderFormHeaderStyles;
50
+ }
51
+ //# sourceMappingURL=builder-form-header-props.d.ts.map
@@ -0,0 +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;CAC3B;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,uBAAuB;IACvB,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@epam/ai-dial-builder-form",
3
+ "description": "Presentational builder form components for composing and editing DIAL entities",
4
+ "version": "1.0.0-rc.4",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./index.js",
8
+ "module": "./index.js",
9
+ "types": "./index.d.ts",
10
+ "exports": {
11
+ "./package.json": "./package.json",
12
+ "./styles.css": "./index.css",
13
+ ".": {
14
+ "types": "./index.d.ts",
15
+ "import": "./index.js",
16
+ "default": "./index.js"
17
+ }
18
+ },
19
+ "peerDependencies": {
20
+ "@epam/ai-dial-chat-shared": "1.0.0-rc.4",
21
+ "@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
22
+ "@tabler/icons-react": "^3.44.0",
23
+ "react": "^19.0.0"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/epam/ai-dial-chat.git",
28
+ "directory": "libs/builder-form"
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":""}