@epam/ai-dial-starter-buttons 1.1.0-dev.112 → 1.1.0-dev.114

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":"AASA,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,uIAAuI;AACvI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAkJlD,CAAC"}
1
+ {"version":3,"file":"StarterButtons.d.ts","sourceRoot":"","sources":["../../../src/components/StarterButtons/StarterButtons.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,uIAAuI;AACvI,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAqJlD,CAAC"}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { StarterButtons } from './components/StarterButtons/StarterButtons';
2
- export type { StarterButtonsProps, StarterButtonsLabels, } from './models/starter-props';
2
+ export type { StarterButtonsProps, StarterButtonsLabels, StarterButtonsStyles, } from './models/starter-props';
3
3
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
package/index.js CHANGED
@@ -31,14 +31,18 @@ var m = 4, h = 8, g = ({ starters: g, onSelect: _, isMobile: v, labels: y, style
31
31
  return t.observe(e), () => t.disconnect();
32
32
  }, [E, g.length]), c(() => {
33
33
  E(g.length);
34
- });
34
+ }, [
35
+ E,
36
+ g.length,
37
+ w
38
+ ]);
35
39
  let D = l(() => ({
36
40
  ...e,
37
41
  stroke: b?.iconStrokeWidth ?? e.stroke,
38
42
  size: b?.iconSize ?? e.size
39
43
  }), [b?.iconStrokeWidth, b?.iconSize]);
40
44
  if (g.length === 0) return null;
41
- let O = Math.min(w, m), k = g.slice(0, O), A = g.slice(O), j = A.map((e, t) => ({
45
+ let O = g.slice(0, w), k = g.slice(w), A = k.map((e, t) => ({
42
46
  key: String(t),
43
47
  label: e.title,
44
48
  onClick: () => _(e)
@@ -50,7 +54,7 @@ var m = 4, h = 8, g = ({ starters: g, onSelect: _, isMobile: v, labels: y, style
50
54
  role: "list",
51
55
  "aria-label": y.list,
52
56
  className: "flex flex-wrap justify-center gap-2",
53
- children: [k.map((e, n) => /* @__PURE__ */ f("div", {
57
+ children: [O.map((e, n) => /* @__PURE__ */ f("div", {
54
58
  role: "listitem",
55
59
  ref: (e) => {
56
60
  S.current[n] = e;
@@ -60,10 +64,10 @@ var m = 4, h = 8, g = ({ starters: g, onSelect: _, isMobile: v, labels: y, style
60
64
  appearance: t.Outlined,
61
65
  onClick: () => _(e)
62
66
  })
63
- }, e.const)), A.length > 0 && /* @__PURE__ */ f("div", {
67
+ }, e.const)), k.length > 0 && /* @__PURE__ */ f("div", {
64
68
  role: "listitem",
65
69
  children: /* @__PURE__ */ f(n, {
66
- items: j,
70
+ items: A,
67
71
  placement: "bottom-end",
68
72
  matchReferenceWidth: !1,
69
73
  listClassName: "cp-dropdown-overlay",
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.1.0-dev.112",
4
+ "version": "1.1.0-dev.114",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@epam/ai-dial-chat-shared": "1.1.0-dev.112",
19
+ "@epam/ai-dial-chat-shared": "1.1.0-dev.114",
20
20
  "@tabler/icons-react": "^3.44.0",
21
21
  "react": "^19.0.0",
22
22
  "@epam/ai-dial-ui-kit": "^0.13.0-dev.26"