@epam/ai-dial-ui-kit 0.15.0 → 0.15.2

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,160 +1,183 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
- import { useFloating as Q, useRole as U, useDismiss as W, useInteractions as X, FloatingPortal as Y, FloatingOverlay as ee, FloatingFocusManager as oe } from "@floating-ui/react";
3
- import { useRef as re, useId as se } from "react";
4
- import { Button as ae } from "../Button/Button.js";
5
- import { CloseButton as ie } from "../CloseButton/CloseButton.js";
6
- import { GhostIconButton as le } from "../IconButton/IconButtonWrappers.js";
7
- import { Tooltip as te } from "../Tooltip/Tooltip.js";
8
- import { DIAL_KIT_ICON_STROKE as ne } from "../constants/icon.js";
9
- import { DIAL_ICON_SIZE as pe } from "../../../constants/icon.js";
10
- import { ButtonVariant as me } from "../../../types/button.js";
11
- import { PopupSize as ce } from "../../../types/popup.js";
12
- import { ElementSize as de } from "../../../types/size.js";
13
- import { useThemeScope as ue } from "../ThemeScope/ThemeScope.js";
14
- import { mergeClasses as r } from "../../../utils/merge-classes.js";
15
- import { IconChevronLeft as fe } from "@tabler/icons-react";
16
- import { popupActionsGroupClassName as l, popupHeaderDividerClassName as ge, popupHeaderClassName as he, popupSizeClassMap as Ne, popupBaseClassName as Ce, popupOverlayBaseClassName as ve, popupTitleClassName as Ie, popupFooterDividerClassName as Fe, popupFooterClassName as Se } from "./constants.js";
17
- import { DIAL_KIT_CLASS as xe } from "../../../constants/public-class-names.js";
18
- const je = ({
19
- open: t = !1,
20
- header: n,
21
- ariaLabel: F,
22
- portalId: S,
23
- className: x,
24
- overlayClassName: T,
25
- overlayStyle: _,
26
- titleClassName: b,
27
- headerClassName: y,
28
- bodyClassName: z,
1
+ import { jsx as o, jsxs as r } from "react/jsx-runtime";
2
+ import { useFloating as X, useRole as Y, useDismiss as ee, useInteractions as oe, FloatingPortal as se, FloatingOverlay as re, FloatingFocusManager as ae } from "@floating-ui/react";
3
+ import { useRef as ie, useId as le } from "react";
4
+ import { Button as te } from "../Button/Button.js";
5
+ import { CloseButton as ne } from "../CloseButton/CloseButton.js";
6
+ import { GhostIconButton as pe } from "../IconButton/IconButtonWrappers.js";
7
+ import { Tooltip as me } from "../Tooltip/Tooltip.js";
8
+ import { DIAL_KIT_ICON_STROKE as ce } from "../constants/icon.js";
9
+ import { DIAL_ICON_SIZE as ue } from "../../../constants/icon.js";
10
+ import { ButtonVariant as de } from "../../../types/button.js";
11
+ import { PopupSize as fe } from "../../../types/popup.js";
12
+ import { ElementSize as Ne } from "../../../types/size.js";
13
+ import { useThemeScope as ge } from "../ThemeScope/ThemeScope.js";
14
+ import { mergeClasses as s } from "../../../utils/merge-classes.js";
15
+ import { IconChevronLeft as he } from "@tabler/icons-react";
16
+ import { popupActionsGroupClassName as t, popupHeaderDividerClassName as Ce, popupHeaderClassName as ve, popupSizeClassMap as Ie, popupBaseClassName as Fe, popupOverlayBaseClassName as Se, popupTitleClassName as xe, popupMainActionsGroupClassName as Te, popupFooterDividerClassName as _e, popupFooterClassName as be, popupMainActionButtonClassName as F } from "./constants.js";
17
+ import { DIAL_KIT_CLASS as ye } from "../../../constants/public-class-names.js";
18
+ const Ve = ({
19
+ open: n = !1,
20
+ header: p,
21
+ ariaLabel: S,
22
+ portalId: x,
23
+ className: T,
24
+ overlayClassName: _,
25
+ overlayStyle: b,
26
+ titleClassName: y,
27
+ headerClassName: z,
28
+ bodyClassName: A,
29
29
  children: D,
30
- footer: p,
31
- footerClassName: B,
32
- onClose: m,
33
- onBack: c,
34
- backAriaLabel: L = "Back",
30
+ footer: m,
31
+ footerClassName: M,
32
+ onClose: c,
33
+ onBack: u,
34
+ backAriaLabel: B = "Back",
35
35
  headerActions: d,
36
36
  headerDivider: P = !1,
37
- mainButtons: u,
38
- additionalButtons: f,
39
- additionalButtonsOnLeft: g = !1,
40
- footerDivider: A = !1,
41
- size: M = ce.Md,
37
+ mainButtons: f,
38
+ additionalButtons: N,
39
+ additionalButtonsOnLeft: a = !1,
40
+ footerDivider: G = !1,
41
+ size: L = fe.Md,
42
42
  hideClose: R = !1,
43
43
  closeAriaLabel: w = "Close dialog",
44
44
  closeOnOutsideClick: E = !0,
45
- preventKeyboardOnOpen: h = !1
45
+ preventKeyboardOnOpen: g = !1
46
46
  }) => {
47
- const G = ue(), N = re(null), O = se(), { refs: C, context: a } = Q({
48
- open: t,
47
+ const $ = ge(), h = ie(null), j = le(), { refs: C, context: i } = X({
48
+ open: n,
49
49
  onOpenChange: (e) => {
50
- e || m?.(null);
50
+ e || c?.(null);
51
51
  }
52
- }), $ = U(a, { role: "dialog" }), j = W(a, { outsidePress: E }), { getFloatingProps: k } = X([$, j]);
53
- if (!t) return null;
54
- const i = typeof n == "string" ? `popup-heading-${O}` : void 0, H = (e) => e ? typeof e == "string" ? /* @__PURE__ */ o(
52
+ }), k = Y(i, { role: "dialog" }), H = ee(i, { outsidePress: E }), { getFloatingProps: K } = oe([k, H]);
53
+ if (!n) return null;
54
+ const l = typeof p == "string" ? `popup-heading-${j}` : void 0, O = (e) => e ? typeof e == "string" ? /* @__PURE__ */ o(
55
55
  "h2",
56
56
  {
57
- id: i,
58
- className: r(Ie, b),
59
- children: /* @__PURE__ */ o(te, { tooltip: e, triggerClassName: "truncate", children: e })
57
+ id: l,
58
+ className: s(xe, y),
59
+ children: /* @__PURE__ */ o(me, { tooltip: e, triggerClassName: "truncate", children: e })
60
60
  }
61
- ) : e : /* @__PURE__ */ o("span", {}), v = R ? null : /* @__PURE__ */ o(ie, { ariaLabel: w, onClose: (e) => m?.(e) }), I = (e, V = []) => V.map(({ variant: Z = me.Neutral, ...q }, J) => /* @__PURE__ */ o(ae, { variant: Z, ...q }, `${e}-${J}`)), K = () => {
62
- if (p !== void 0) return p;
63
- if (!u?.length && !f?.length) return null;
64
- const e = I("additional", f);
65
- return /* @__PURE__ */ s(
61
+ ) : e : /* @__PURE__ */ o("span", {}), v = R ? null : /* @__PURE__ */ o(ne, { ariaLabel: w, onClose: (e) => c?.(e) }), I = (e, Z = [], q) => Z.map(
62
+ ({ variant: J = de.Neutral, className: Q, ...U }, W) => /* @__PURE__ */ o(
63
+ te,
64
+ {
65
+ variant: J,
66
+ className: s(q, Q),
67
+ ...U
68
+ },
69
+ `${e}-${W}`
70
+ )
71
+ ), V = () => {
72
+ if (m !== void 0) return m;
73
+ if (!f?.length && !N?.length) return null;
74
+ const e = I(
75
+ "additional",
76
+ N,
77
+ a ? void 0 : F
78
+ );
79
+ return /* @__PURE__ */ r(
66
80
  "div",
67
81
  {
68
- className: r(
69
- Se,
70
- A && Fe,
71
- B
82
+ className: s(
83
+ be,
84
+ G && _e,
85
+ M
72
86
  ),
73
87
  children: [
74
- g && e.length > 0 && /* @__PURE__ */ o("div", { className: l, children: e }),
75
- /* @__PURE__ */ s("div", { className: r(l, "ml-auto"), children: [
76
- !g && e,
77
- I("main", u)
78
- ] })
88
+ a && e.length > 0 && /* @__PURE__ */ o("div", { className: t, children: e }),
89
+ /* @__PURE__ */ r(
90
+ "div",
91
+ {
92
+ className: s(
93
+ t,
94
+ Te
95
+ ),
96
+ children: [
97
+ !a && e,
98
+ I("main", f, F)
99
+ ]
100
+ }
101
+ )
79
102
  ]
80
103
  }
81
104
  );
82
105
  };
83
- return /* @__PURE__ */ o(Y, { id: S, children: /* @__PURE__ */ o(
84
- ee,
106
+ return /* @__PURE__ */ o(se, { id: x, children: /* @__PURE__ */ o(
107
+ re,
85
108
  {
86
- style: _,
87
- className: r(
88
- ve,
89
- G,
90
- T
109
+ style: b,
110
+ className: s(
111
+ Se,
112
+ $,
113
+ _
91
114
  ),
92
115
  children: /* @__PURE__ */ o(
93
- oe,
116
+ ae,
94
117
  {
95
- context: a,
96
- initialFocus: h ? N : C.floating,
97
- children: /* @__PURE__ */ s(
118
+ context: i,
119
+ initialFocus: g ? h : C.floating,
120
+ children: /* @__PURE__ */ r(
98
121
  "div",
99
122
  {
100
123
  ref: C.setFloating,
101
- ...k(),
124
+ ...K(),
102
125
  role: "dialog",
103
126
  "aria-modal": "true",
104
- "aria-labelledby": i,
105
- "aria-label": i ? void 0 : F,
106
- className: r(
107
- Ce,
108
- Ne[M],
109
- x,
110
- xe.popup
127
+ "aria-labelledby": l,
128
+ "aria-label": l ? void 0 : S,
129
+ className: s(
130
+ Fe,
131
+ Ie[L],
132
+ T,
133
+ ye.popup
111
134
  ),
112
135
  children: [
113
- h && /* @__PURE__ */ o(
136
+ g && /* @__PURE__ */ o(
114
137
  "div",
115
138
  {
116
- ref: N,
139
+ ref: h,
117
140
  tabIndex: -1,
118
141
  "aria-hidden": !0,
119
142
  className: "absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"
120
143
  }
121
144
  ),
122
- /* @__PURE__ */ s(
145
+ /* @__PURE__ */ r(
123
146
  "div",
124
147
  {
125
- className: r(
126
- he,
127
- P && ge,
128
- y
148
+ className: s(
149
+ ve,
150
+ P && Ce,
151
+ z
129
152
  ),
130
153
  children: [
131
- c && /* @__PURE__ */ o(
132
- le,
154
+ u && /* @__PURE__ */ o(
155
+ pe,
133
156
  {
134
- "aria-label": L,
135
- size: de.Small,
157
+ "aria-label": B,
158
+ size: Ne.Small,
136
159
  className: "mr-2",
137
- onClick: c,
160
+ onClick: u,
138
161
  icon: /* @__PURE__ */ o(
139
- fe,
162
+ he,
140
163
  {
141
- size: pe.SM,
142
- stroke: ne,
164
+ size: ue.SM,
165
+ stroke: ce,
143
166
  "aria-hidden": "true"
144
167
  }
145
168
  )
146
169
  }
147
170
  ),
148
- H(n),
149
- d ? /* @__PURE__ */ s("div", { className: l, children: [
171
+ O(p),
172
+ d ? /* @__PURE__ */ r("div", { className: t, children: [
150
173
  d,
151
174
  v
152
175
  ] }) : v
153
176
  ]
154
177
  }
155
178
  ),
156
- /* @__PURE__ */ o("div", { className: r("grow overflow-auto", z), children: D }),
157
- K()
179
+ /* @__PURE__ */ o("div", { className: s("grow overflow-auto", A), children: D }),
180
+ V()
158
181
  ]
159
182
  }
160
183
  )
@@ -164,5 +187,5 @@ const je = ({
164
187
  ) });
165
188
  };
166
189
  export {
167
- je as Popup
190
+ Ve as Popup
168
191
  };
@@ -1,17 +1,19 @@
1
1
  import { PopupSize as e } from "../../../types/popup.js";
2
- const a = "z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6", r = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto", o = "flex flex-row items-center justify-between px-6 py-4", t = "flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary", s = "border-b border-tertiary", l = "flex flex-row items-center gap-2 px-6 py-4", m = "border-t border-tertiary", x = "flex shrink-0 flex-row items-center gap-2", i = {
2
+ const o = "z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6", a = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto", t = "flex flex-row items-center justify-between px-6 py-4", s = "flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary", l = "border-b border-tertiary", r = "flex flex-row items-center gap-2 px-6 py-4", m = "border-t border-tertiary", i = "flex shrink-0 flex-row items-center gap-2", x = "ml-auto mobile:flex-1", n = "mobile:flex-1", u = {
3
3
  [e.Sm]: "max-w-full md:max-w-[400px]",
4
4
  [e.Md]: "max-w-full md:max-w-[800px]",
5
5
  [e.Lg]: "max-w-full md:max-w-[1200px]"
6
6
  };
7
7
  export {
8
- x as popupActionsGroupClassName,
9
- r as popupBaseClassName,
10
- l as popupFooterClassName,
8
+ i as popupActionsGroupClassName,
9
+ a as popupBaseClassName,
10
+ r as popupFooterClassName,
11
11
  m as popupFooterDividerClassName,
12
- o as popupHeaderClassName,
13
- s as popupHeaderDividerClassName,
14
- a as popupOverlayBaseClassName,
15
- i as popupSizeClassMap,
16
- t as popupTitleClassName
12
+ t as popupHeaderClassName,
13
+ l as popupHeaderDividerClassName,
14
+ n as popupMainActionButtonClassName,
15
+ x as popupMainActionsGroupClassName,
16
+ o as popupOverlayBaseClassName,
17
+ u as popupSizeClassMap,
18
+ s as popupTitleClassName
17
19
  };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.15.0",
3
- "generatedAt": "2026-10-08T15:16:08.527Z",
2
+ "version": "0.15.2",
3
+ "generatedAt": "2026-10-12T14:06:18.751Z",
4
4
  "kit": {
5
5
  "name": "@epam/ai-dial-ui-kit",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",
@@ -5204,10 +5204,17 @@
5204
5204
  "required": false,
5205
5205
  "defaultValue": "'Select all rows'",
5206
5206
  "description": "Accessible name of the select-all control."
5207
+ },
5208
+ {
5209
+ "name": "colorScheme",
5210
+ "type": "GridColorScheme",
5211
+ "required": false,
5212
+ "defaultValue": "GridColorScheme.Light",
5213
+ "description": "AG Grid color scheme. `dark` paints native controls dark."
5207
5214
  }
5208
5215
  ],
5209
5216
  "examples": [
5210
- "interface Product { id: string; name: string; price: number }\n\nconst columns: ColDef<Product>[] = [\n { field: 'name', headerName: 'Product', flex: 1 },\n { field: 'price', headerName: 'Price', width: 120 },\n];\n\n<Grid<Product> columnDefs={columns} rowData={products} />\n\n// With selection and a context menu\n<Grid<Product>\n columnDefs={columns}\n rowData={products}\n selectionMode={GridSelectionMode.MULTIPLE}\n selectedRowIds={selectedIds}\n onSelectionChange={(ids) => setSelectedIds(ids)}\n selectRowLabel={(row) => `Select ${row.name}`}\n getContextMenuItems={(row) => [{ key: 'edit', label: 'Edit' }]}\n/>"
5217
+ "interface Product { id: string; name: string; price: number }\n\nconst columns: ColDef<Product>[] = [\n { field: 'name', headerName: 'Product', flex: 1 },\n { field: 'price', headerName: 'Price', width: 120 },\n];\n\n<Grid<Product> columnDefs={columns} rowData={products} />\n\n// With selection and a context menu\n<Grid<Product>\n columnDefs={columns}\n rowData={products}\n selectionMode={GridSelectionMode.MULTIPLE}\n selectedRowIds={selectedIds}\n onSelectionChange={(ids) => setSelectedIds(ids)}\n selectRowLabel={(row) => `Select ${row.name}`}\n getContextMenuItems={(row) => [{ key: 'edit', label: 'Edit' }]}\n/>\n\n// Dark native controls, including the date-filter calendar\n<Grid<Product> columnDefs={columns} rowData={products} colorScheme={GridColorScheme.Dark} />"
5211
5218
  ],
5212
5219
  "sourceFile": "components/New/Grid/Grid.tsx"
5213
5220
  },
@@ -12334,6 +12341,22 @@
12334
12341
  ],
12335
12342
  "sourceFile": "types/transfer-queue.ts",
12336
12343
  "description": "Lifecycle status of one item in a `TransferQueue`."
12344
+ },
12345
+ {
12346
+ "name": "GridColorScheme",
12347
+ "kind": "enum",
12348
+ "members": [
12349
+ {
12350
+ "name": "Light",
12351
+ "value": "'light'"
12352
+ },
12353
+ {
12354
+ "name": "Dark",
12355
+ "value": "'dark'"
12356
+ }
12357
+ ],
12358
+ "sourceFile": "types/grid.ts",
12359
+ "description": "Color scheme `Grid` passes to AG Grid. It selects the light or dark theme\npart and the browser `color-scheme` native controls inside the grid follow."
12337
12360
  }
12338
12361
  ],
12339
12362
  "hooks": [
@@ -12453,7 +12476,7 @@
12453
12476
  "name": "GRID_THEME_PARAMS",
12454
12477
  "sourceFile": "components/New/Grid/constants.ts",
12455
12478
  "description": "ag-Grid theme parameters, resolved from the 2.0 colour tokens with the same\nliteral fallbacks the Tailwind config carries, so a consumer that defines no\nCSS variables still gets the intended palette.\n\nHover uses the subtle accent tint and selection the slightly stronger\nselected tint, as in the grid cell design.",
12456
- "signature": "GRID_THEME_PARAMS = {\n accentColor: 'var(--bg-control-accent, #1D4ED8)',\n backgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n oddRowBackgroundColor: 'var(--bg-layer-sunken, #EEF1F7)',\n selectedRowBackgroundColor:\n 'var(--bg-control-accent-alpha-active-subtle, #2764D914)',\n rowHoverColor: 'var(--bg-control-accent-alpha-hover-subtle, #2764D90A)',\n borderColor: 'var(--stroke-tertiary, #E0E6F0)',\n // Dividers inside the table sit on the thin stroke (0.5px) rather than the\n // 1px main stroke that controls and standalone dividers use, so a dense grid\n // reads as rows of data instead of a set of boxes. Sub-pixel widths are\n // antialiased rather than snapped, which is what makes the line look lighter.\n // `wrapperBorder` and the pinned-column boundary are left on the main stroke\n // by the theme: those frame the table and separate its regions rather than\n // dividing rows and columns.\n rowBorder: THIN_TABLE_DIVIDER,\n // Off: ag-Grid draws this one both under the header and between the title\n // row and the filter row, and the design has no line between those two. The\n // line under the header is drawn at 1px in `styles/grid.scss`.\n headerRowBorder: false,\n headerColumnBorder: THIN_TABLE_DIVIDER,\n // The design's header divider is a short 12px mark centred in the cell, not\n // the 20px (half the row) ag-Grid draws by default.\n headerColumnBorderHeight: 12,\n chromeBackgroundColor: 'var(--bg-layer-base, #F5F7FA)',\n headerBackgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n foregroundColor: 'var(--text-primary, #161B2D)',\n headerTextColor: 'var(--text-secondary, #57647A)',\n // 1.0 asked the browser for dark native widgets while painting a light\n // theme; the scheme now matches the palette it is used with.\n browserColorScheme: 'light',\n headerFontSize: 14,\n headerFontWeight: 600,\n fontSize: 14,\n fontFamily: 'var(--theme-font, var(--font-inter))',\n spacing: 4,\n borderRadius: 4,\n // Search fields in the header and filter popups: `rounded-lg`.\n inputBorderRadius: 8,\n wrapperBorderRadius: 8,\n}"
12479
+ "signature": "GRID_THEME_PARAMS = {\n accentColor: 'var(--bg-control-accent, #1D4ED8)',\n backgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n oddRowBackgroundColor: 'var(--bg-layer-sunken, #EEF1F7)',\n selectedRowBackgroundColor:\n 'var(--bg-control-accent-alpha-active-subtle, #2764D914)',\n rowHoverColor: 'var(--bg-control-accent-alpha-hover-subtle, #2764D90A)',\n borderColor: 'var(--stroke-tertiary, #E0E6F0)',\n // Dividers inside the table sit on the thin stroke (0.5px) rather than the\n // 1px main stroke that controls and standalone dividers use, so a dense grid\n // reads as rows of data instead of a set of boxes. Sub-pixel widths are\n // antialiased rather than snapped, which is what makes the line look lighter.\n // `wrapperBorder` and the pinned-column boundary are left on the main stroke\n // by the theme: those frame the table and separate its regions rather than\n // dividing rows and columns.\n rowBorder: THIN_TABLE_DIVIDER,\n // Off: ag-Grid draws this one both under the header and between the title\n // row and the filter row, and the design has no line between those two. The\n // line under the header is drawn at 1px in `styles/grid.scss`.\n headerRowBorder: false,\n headerColumnBorder: THIN_TABLE_DIVIDER,\n // The design's header divider is a short 12px mark centred in the cell, not\n // the 20px (half the row) ag-Grid draws by default.\n headerColumnBorderHeight: 12,\n chromeBackgroundColor: 'var(--bg-layer-base, #F5F7FA)',\n headerBackgroundColor: 'var(--bg-layer-raised, #FCFCFC)',\n foregroundColor: 'var(--text-primary, #161B2D)',\n headerTextColor: 'var(--text-secondary, #57647A)',\n // Native form controls inside the grid, including the date filter's\n // calendar, follow this value. The light default matches the token\n // fallbacks. `Grid` sets it again after this object is spread, because a\n // dark `colorScheme` has to replace this light value or the browser keeps\n // painting those controls light.\n browserColorScheme: 'light',\n headerFontSize: 14,\n headerFontWeight: 600,\n fontSize: 14,\n fontFamily: 'var(--theme-font, var(--font-inter))',\n spacing: 4,\n borderRadius: 4,\n // Search fields in the header and filter popups: `rounded-lg`.\n inputBorderRadius: 8,\n wrapperBorderRadius: 8,\n}"
12457
12480
  },
12458
12481
  {
12459
12482
  "name": "GRID_ROW_HEIGHT",