@epam/ai-dial-starter-buttons 1.3.0-dev.28 → 1.3.0-dev.282

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 +1 @@
1
- {"version":3,"file":"StarterButtons.d.ts","sourceRoot":"","sources":["../../../src/components/StarterButtons/StarterButtons.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAsKlD,CAAC"}
1
+ {"version":3,"file":"StarterButtons.d.ts","sourceRoot":"","sources":["../../../src/components/StarterButtons/StarterButtons.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwKlD,CAAC"}
package/index.css CHANGED
@@ -1 +1,2 @@
1
- .visible{visibility:visible}.collapse{visibility:collapse}.mb-4{margin-bottom:1rem}.flex{display:flex}.w-full{width:100%}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ .collapse{visibility:collapse}.visible{visibility:visible}.mb-4{margin-bottom:1rem}.flex{display:flex}.w-full{width:100%}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}
package/index.js CHANGED
@@ -7,82 +7,83 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
7
7
  var g = {
8
8
  root: "dial-starter-buttons-root",
9
9
  list: "dial-starter-buttons-list"
10
- }, _ = 4, v = 8, y = ({ starters: y, onSelect: b, isMobile: x, isCollapsible: S = !0, labels: C, styles: w }) => {
11
- let T = f(null), E = f([]), D = f([]), [O, k] = p(() => Math.min(y.length, _)), A = l((e) => {
12
- let t = T.current;
10
+ }, _ = 4, v = 8, y = ({ starters: y, onSelect: b, isMobile: x, isCollapsible: S = !0, isIconHidden: C, labels: w, styles: T }) => {
11
+ let E = f(null), D = f([]), O = f([]), [k, A] = p(() => Math.min(y.length, _)), j = l((e) => {
12
+ let t = E.current;
13
13
  if (!t || !S) return;
14
14
  let n = t.getBoundingClientRect().width;
15
15
  if (n === 0) return;
16
16
  let r = Math.min(e, _);
17
- E.current.slice(0, r).every((e) => e != null) && (D.current = E.current.slice(0, r).map((e) => e?.getBoundingClientRect().width ?? 0));
18
- let i = (e) => D.current[e] ?? 120, a = 0, o = 0;
17
+ D.current.slice(0, r).every((e) => e != null) && (O.current = D.current.slice(0, r).map((e) => e?.getBoundingClientRect().width ?? 0));
18
+ let i = (e) => O.current[e] ?? 120, a = 0, o = 0;
19
19
  for (let t = 0; t < r; t++) {
20
20
  let r = i(t), s = e - (t + 1) > 0;
21
21
  if (a + (t > 0 ? v : 0) + r + (s ? 64 : 0) > n) break;
22
22
  a += (t > 0 ? v : 0) + r, o = t + 1;
23
23
  }
24
- k(Math.max(1, o));
24
+ A(Math.max(1, o));
25
25
  }, [S]);
26
26
  u(() => {
27
- D.current = [], k(Math.min(y.length, _));
27
+ O.current = [], A(Math.min(y.length, _));
28
28
  }, [y.length]), u(() => {
29
- let e = T.current;
29
+ let e = E.current;
30
30
  if (!e || !S) return;
31
31
  let t = new ResizeObserver(() => {
32
- A(y.length);
32
+ j(y.length);
33
33
  });
34
34
  return t.observe(e), () => t.disconnect();
35
35
  }, [
36
- A,
36
+ j,
37
37
  S,
38
38
  y.length
39
39
  ]), u(() => {
40
- A(y.length);
40
+ j(y.length);
41
41
  }, [
42
- A,
42
+ j,
43
43
  y.length,
44
- O
44
+ k
45
45
  ]);
46
- let j = d(() => ({
46
+ let M = d(() => ({
47
47
  ...e,
48
- stroke: w?.iconStrokeWidth ?? e.stroke,
49
- size: w?.iconSize ?? e.size
50
- }), [w?.iconStrokeWidth, w?.iconSize]);
48
+ stroke: T?.iconStrokeWidth ?? e.stroke,
49
+ size: T?.iconSize ?? e.size
50
+ }), [T?.iconStrokeWidth, T?.iconSize]);
51
51
  if (y.length === 0) return null;
52
- let M = S ? y.slice(0, O) : y, N = S ? y.slice(O) : [], P = N.map((e, t) => ({
52
+ let N = S ? y.slice(0, k) : y, P = S ? y.slice(k) : [], F = P.map((e, t) => ({
53
53
  key: String(t),
54
54
  label: e.title,
55
55
  onClick: () => b(e)
56
56
  }));
57
57
  return /* @__PURE__ */ m("div", {
58
- ref: T,
58
+ ref: E,
59
59
  className: o("mb-4 w-full", g.root),
60
60
  children: /* @__PURE__ */ h("div", {
61
61
  role: "list",
62
- "aria-label": C.list,
62
+ "aria-label": w.list,
63
63
  className: o(S ? "flex flex-wrap justify-center gap-2" : "flex flex-col items-center gap-2", g.list),
64
- children: [M.map((e, t) => /* @__PURE__ */ m("div", {
64
+ children: [N.map((e, t) => /* @__PURE__ */ m("div", {
65
65
  role: "listitem",
66
66
  ref: (e) => {
67
- E.current[t] = e;
67
+ D.current[t] = e;
68
68
  },
69
69
  children: /* @__PURE__ */ m(a, {
70
70
  label: e.title,
71
- onClick: () => b(e)
71
+ onClick: () => b(e),
72
+ iconBefore: C ? null : void 0
72
73
  })
73
- }, e.const)), N.length > 0 && /* @__PURE__ */ m("div", {
74
+ }, e.const)), P.length > 0 && /* @__PURE__ */ m("div", {
74
75
  role: "listitem",
75
76
  children: /* @__PURE__ */ m(r, {
76
- items: P,
77
+ items: F,
77
78
  placement: "bottom-end",
78
79
  matchReferenceWidth: !1,
79
80
  children: /* @__PURE__ */ m(i, {
80
81
  appearance: t.Outlined,
81
82
  icon: m(x ? s : c, {
82
- ...j,
83
+ ...M,
83
84
  stroke: n
84
85
  }),
85
- "aria-label": C.overflow
86
+ "aria-label": w.overflow
86
87
  })
87
88
  })
88
89
  })]
@@ -28,6 +28,11 @@ export interface StarterButtonsProps {
28
28
  * own row, and no overflow menu appears.
29
29
  */
30
30
  isCollapsible?: boolean;
31
+ /**
32
+ * When `true`, renders each starter pill as a label-only button, omitting
33
+ * the sparkles icon the UI kit's `StarterButton` renders by default.
34
+ */
35
+ isIconHidden?: boolean;
31
36
  /** Localized labels used within the component. */
32
37
  labels: StarterButtonsLabels;
33
38
  /** Optional style overrides. */
@@ -1 +1 @@
1
- {"version":3,"file":"starter-props.d.ts","sourceRoot":"","sources":["../../src/models/starter-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,gCAAgC;IAChC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
1
+ {"version":3,"file":"starter-props.d.ts","sourceRoot":"","sources":["../../src/models/starter-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,MAAM,EAAE,oBAAoB,CAAC;IAC7B,gCAAgC;IAChC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-starter-buttons",
3
3
  "description": "Responsive starter prompt buttons that overflow into a dropdown when space is limited",
4
- "version": "1.3.0-dev.28",
4
+ "version": "1.3.0-dev.282",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -17,12 +17,12 @@
17
17
  }
18
18
  },
19
19
  "dependencies": {
20
- "@tabler/icons-react": "^3.44.0"
20
+ "@tabler/icons-react": "^3.50.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@epam/ai-dial-chat-shared": "1.3.0-dev.28",
23
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.282",
24
24
  "react": "^19.2.8",
25
- "@epam/ai-dial-ui-kit": "^0.15.3"
25
+ "@epam/ai-dial-ui-kit": "^0.16.0-dev.62"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",