@adyen/bento-vue3 1.64.0 → 1.65.0

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.
Files changed (64) hide show
  1. package/dist/assets/accordion-item.css +1 -1
  2. package/dist/assets/action-bar.css +1 -1
  3. package/dist/assets/base-modal.css +1 -1
  4. package/dist/assets/card.css +1 -1
  5. package/dist/assets/data-grid.css +1 -1
  6. package/dist/assets/date-picker.css +1 -1
  7. package/dist/assets/dialog-page.css +1 -1
  8. package/dist/assets/dropdown.css +1 -1
  9. package/dist/assets/file-uploader.css +1 -1
  10. package/dist/assets/inspector.css +1 -1
  11. package/dist/assets/menu.css +1 -1
  12. package/dist/assets/modal-fullscreen.css +1 -1
  13. package/dist/assets/popover.css +1 -1
  14. package/dist/assets/sidepanel.css +1 -1
  15. package/dist/assets/use-cached-selected-values.css +1 -1
  16. package/dist/chunks/{code-snippet.CcWkFdEq.js → code-snippet.Bj5SAyT-.js} +2 -2
  17. package/dist/chunks/{code-snippet.CcWkFdEq.js.map → code-snippet.Bj5SAyT-.js.map} +1 -1
  18. package/dist/chunks/{data-grid.D0De1biC.js → data-grid.DroQMKSc.js} +660 -654
  19. package/dist/chunks/{data-grid.D0De1biC.js.map → data-grid.DroQMKSc.js.map} +1 -1
  20. package/dist/chunks/{date-picker.BLYOus7e.js → date-picker.BuX2J2OW.js} +19 -19
  21. package/dist/chunks/date-picker.BuX2J2OW.js.map +1 -0
  22. package/dist/chunks/{date-range-picker._0XU4TRk.js → date-range-picker.C2x1_xoz.js} +3 -3
  23. package/dist/chunks/{date-range-picker._0XU4TRk.js.map → date-range-picker.C2x1_xoz.js.map} +1 -1
  24. package/dist/chunks/{dropdown-tag.JTxCvtZL.js → dropdown-tag.Dm-1VD3B.js} +2 -2
  25. package/dist/chunks/{dropdown-tag.JTxCvtZL.js.map → dropdown-tag.Dm-1VD3B.js.map} +1 -1
  26. package/dist/chunks/{dropdown.Bz5hTRFH.js → dropdown.Bj6DK-2v.js} +323 -312
  27. package/dist/chunks/dropdown.Bj6DK-2v.js.map +1 -0
  28. package/dist/chunks/{filter-bar.ChPG7oJN.js → filter-bar.BvInaVGL.js} +7 -7
  29. package/dist/chunks/{filter-bar.ChPG7oJN.js.map → filter-bar.BvInaVGL.js.map} +1 -1
  30. package/dist/chunks/{header-with-views.DkoDjkyK.js → header-with-views.De0oVJXS.js} +2 -2
  31. package/dist/chunks/{header-with-views.DkoDjkyK.js.map → header-with-views.De0oVJXS.js.map} +1 -1
  32. package/dist/chunks/{input-field-password.nYZBZ1bM.js → input-field-password.CJOf1GlS.js} +3 -3
  33. package/dist/chunks/{input-field-password.nYZBZ1bM.js.map → input-field-password.CJOf1GlS.js.map} +1 -1
  34. package/dist/chunks/{input-field-phone-number.Ck_1WdgH.js → input-field-phone-number.DVliTkE3.js} +3 -3
  35. package/dist/chunks/{input-field-phone-number.Ck_1WdgH.js.map → input-field-phone-number.DVliTkE3.js.map} +1 -1
  36. package/dist/chunks/{input-field.BdDrm776.js → input-field.xUQT0LXI.js} +2 -2
  37. package/dist/chunks/{input-field.BdDrm776.js.map → input-field.xUQT0LXI.js.map} +1 -1
  38. package/dist/chunks/{pagination.DbuaT-4D.js → pagination.D6A7TX6J.js} +2 -2
  39. package/dist/chunks/{pagination.DbuaT-4D.js.map → pagination.D6A7TX6J.js.map} +1 -1
  40. package/dist/chunks/{search-bar.DzVNjmpW.js → search-bar.Cngs3uYZ.js} +3 -3
  41. package/dist/chunks/{search-bar.DzVNjmpW.js.map → search-bar.Cngs3uYZ.js.map} +1 -1
  42. package/dist/chunks/{secondary-nav.tId-4Wy2.js → secondary-nav.ByCa4wiA.js} +2 -2
  43. package/dist/chunks/{secondary-nav.tId-4Wy2.js.map → secondary-nav.ByCa4wiA.js.map} +1 -1
  44. package/dist/chunks/{use-cached-selected-values.CatIU1_1.js → use-cached-selected-values.CEwKqYIe.js} +616 -607
  45. package/dist/chunks/{use-cached-selected-values.CatIU1_1.js.map → use-cached-selected-values.CEwKqYIe.js.map} +1 -1
  46. package/dist/code-snippet.js +1 -1
  47. package/dist/data-grid.js +1 -1
  48. package/dist/date-picker.js +1 -1
  49. package/dist/date-range-picker.js +1 -1
  50. package/dist/dropdown.js +3 -3
  51. package/dist/filter-bar.js +1 -1
  52. package/dist/header-with-views.js +1 -1
  53. package/dist/index.js +15 -15
  54. package/dist/input-field-password.js +1 -1
  55. package/dist/input-field-phone-number.js +1 -1
  56. package/dist/input-field.js +1 -1
  57. package/dist/internal.js +1 -1
  58. package/dist/pagination.js +1 -1
  59. package/dist/search-bar.js +2 -2
  60. package/dist/secondary-nav.js +1 -1
  61. package/dist/web-types.json +1 -1
  62. package/package.json +5 -5
  63. package/dist/chunks/date-picker.BLYOus7e.js.map +0 -1
  64. package/dist/chunks/dropdown.Bz5hTRFH.js.map +0 -1
@@ -1,88 +1,88 @@
1
- import { computed as p, ref as B, onMounted as Ze, onUnmounted as Qe, watch as ne, defineComponent as J, resolveComponent as L, createElementBlock as O, openBlock as d, createVNode as P, createElementVNode as z, withCtx as I, createTextVNode as K, toDisplayString as F, renderSlot as W, mergeProps as Y, withKeys as Ce, createCommentVNode as X, createBlock as R, withModifiers as ae, normalizeProps as ie, guardReactiveProps as be, withDirectives as re, vShow as Pe, nextTick as Me, resolveDirective as xe, toHandlers as te, Fragment as se, renderList as q, createSlots as me, normalizeClass as ve, unref as N, toRef as _e, useSlots as et, useAttrs as tt } from "vue";
1
+ import { computed as p, ref as B, onMounted as et, onUnmounted as tt, watch as ne, defineComponent as Z, resolveComponent as k, createElementBlock as O, openBlock as d, createVNode as x, createElementVNode as z, withCtx as I, createTextVNode as K, toDisplayString as F, renderSlot as W, mergeProps as w, withKeys as Ce, createCommentVNode as J, createBlock as R, withModifiers as ae, normalizeProps as ie, guardReactiveProps as ue, withDirectives as re, vShow as Pe, nextTick as Me, resolveDirective as xe, toHandlers as se, Fragment as le, renderList as H, createSlots as be, normalizeClass as me, unref as M, toRef as _e, useSlots as st, useAttrs as lt } from "vue";
2
2
  import { B as V, a as pe } from "./keyboard-navigation.CqgGzfZQ.js";
3
3
  import "./events.FNmSWp_P.js";
4
4
  import { B as ce } from "./typography.DN5eC5ch.js";
5
- import { B as st } from "./loading-indicator.DEepb9Wl.js";
6
- import { B as lt } from "./empty-state.D7llINgF.js";
5
+ import { B as ot } from "./loading-indicator.DEepb9Wl.js";
6
+ import { B as it } from "./empty-state.D7llINgF.js";
7
7
  import { u as Oe } from "./i18n.B6g5VX0q.js";
8
- import { d as ot } from "./debounce.DUTu11PS.js";
9
- import { B as it } from "./chip.CneNX2_j.js";
10
- import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
- import { C as fe, N as nt } from "./minus-small.DYIyF5XW.js";
12
- import { C as at } from "./checkmark-small.x-gmK2Dt.js";
13
- import { C as rt } from "./chevron-down.DCQ6ZLaq.js";
14
- import { C as ct } from "./chevron-up.kfuLRpZb.js";
15
- import { d as dt, e as De } from "./button-actions.D1pXI1AJ.js";
8
+ import { d as nt } from "./debounce.DUTu11PS.js";
9
+ import { B as at } from "./chip.CneNX2_j.js";
10
+ import { _ as j } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
+ import { C as fe, N as rt } from "./minus-small.DYIyF5XW.js";
12
+ import { C as ct } from "./checkmark-small.x-gmK2Dt.js";
13
+ import { C as dt } from "./chevron-down.DCQ6ZLaq.js";
14
+ import { C as ut } from "./chevron-up.kfuLRpZb.js";
15
+ import { d as bt, e as De } from "./button-actions.D1pXI1AJ.js";
16
16
  /* empty css */
17
- import { o as ut } from "./resize.Bqks3WUm.js";
17
+ import { o as mt } from "./resize.Bqks3WUm.js";
18
18
  import "../assets/use-cached-selected-values.css";
19
- const Ge = (e, t, s, o) => {
20
- const n = p(
19
+ const Ge = (e, t, n, s) => {
20
+ const a = p(
21
21
  () => {
22
- var g, S;
23
- return !!((g = e.value) != null && g.length) && ((S = e.value) == null ? void 0 : S.length) === t.value.length;
22
+ var m, h;
23
+ return !!((m = e.value) != null && m.length) && ((h = e.value) == null ? void 0 : h.length) === t.value.length;
24
24
  }
25
- ), a = p(() => {
26
- var g;
27
- return e.value == null || e.value.length === 0 ? !1 : ((g = e.value) == null ? void 0 : g.length) !== t.value.length;
25
+ ), i = p(() => {
26
+ var m;
27
+ return e.value == null || e.value.length === 0 ? !1 : ((m = e.value) == null ? void 0 : m.length) !== t.value.length;
28
28
  });
29
29
  return {
30
- isAllSelected: n,
31
- isIndeterminate: a,
32
- toggleSelectAll: (g) => {
33
- g ? s() : o();
30
+ isAllSelected: a,
31
+ isIndeterminate: i,
32
+ toggleSelectAll: (m) => {
33
+ m ? n() : s();
34
34
  }
35
35
  };
36
36
  };
37
- function bt(e, { disabled: t, itemHeight: s, overscan: o = 5, prefixHeight: n }) {
38
- const a = B(null), r = B([]), g = B(0), S = B(0), i = B(0);
39
- let c;
40
- const l = p(() => {
41
- const A = typeof s == "number" ? e.value.length * s : e.value.reduce(($, k, h) => $ + s(h), 0), x = typeof s == "number" ? g.value * s : e.value.slice(0, g.value).reduce(($, k, h) => $ + s(h), 0);
37
+ function vt(e, { disabled: t, itemHeight: n, overscan: s = 5, prefixHeight: a }) {
38
+ const i = B(null), c = B([]), m = B(0), h = B(0), l = B(0);
39
+ let r;
40
+ const o = p(() => {
41
+ const A = typeof n == "number" ? e.value.length * n : e.value.reduce((L, $, C) => L + n(C), 0), P = typeof n == "number" ? m.value * n : e.value.slice(0, m.value).reduce((L, $, C) => L + n(C), 0);
42
42
  return {
43
43
  style: {
44
- marginTop: `${x}px`,
45
- height: `${A - x}px`
44
+ marginTop: `${P}px`,
45
+ height: `${A - P}px`
46
46
  }
47
47
  };
48
- }), m = () => {
49
- const A = (n == null ? void 0 : n.value) ?? 0, x = Math.max(a.value.scrollTop - A, 0);
50
- if (typeof s == "number")
51
- return Math.floor(x / s);
52
- let $ = 0, k = 0;
53
- for (let h = 0; h < e.value.length; h += 1) {
54
- const C = s(h);
55
- if ($ += C, $ >= x) {
56
- k = h;
48
+ }), y = () => {
49
+ const A = (a == null ? void 0 : a.value) ?? 0, P = Math.max(i.value.scrollTop - A, 0);
50
+ if (typeof n == "number")
51
+ return Math.floor(P / n);
52
+ let L = 0, $ = 0;
53
+ for (let C = 0; C < e.value.length; C += 1) {
54
+ const S = n(C);
55
+ if (L += S, L >= P) {
56
+ $ = C;
57
57
  break;
58
58
  }
59
59
  }
60
- return k;
61
- }, y = () => {
62
- if (i.value = a.value.clientHeight, typeof s == "number")
63
- return Math.ceil(i.value / s);
64
- const A = g.value ?? 0;
65
- let x = 0, $ = 0;
66
- for (let k = A; k < e.value.length; k += 1) {
67
- const h = s(k);
68
- if (x += h, $ = k, x > i.value)
60
+ return $;
61
+ }, g = () => {
62
+ if (l.value = i.value.clientHeight, typeof n == "number")
63
+ return Math.ceil(l.value / n);
64
+ const A = m.value ?? 0;
65
+ let P = 0, L = 0;
66
+ for (let $ = A; $ < e.value.length; $ += 1) {
67
+ const C = n($);
68
+ if (P += C, L = $, P > l.value)
69
69
  break;
70
70
  }
71
- return $ - A;
71
+ return L - A;
72
72
  }, T = () => {
73
- if (a.value) {
74
- const A = y();
75
- g.value = m(), S.value = Math.min(g.value + A + o, e.value.length), r.value = e.value.slice(g.value, S.value);
73
+ if (i.value) {
74
+ const A = g();
75
+ m.value = y(), h.value = Math.min(m.value + A + s, e.value.length), c.value = e.value.slice(m.value, h.value);
76
76
  }
77
- }, M = () => {
77
+ }, N = () => {
78
78
  T();
79
79
  };
80
- t || (Ze(() => {
81
- a.value && (i.value = a.value.clientHeight, c = ut(a.value, ({ clientHeight: A }) => {
82
- i.value = A, T();
80
+ t || (et(() => {
81
+ i.value && (l.value = i.value.clientHeight, r = mt(i.value, ({ clientHeight: A }) => {
82
+ l.value = A, T();
83
83
  }), T());
84
- }), Qe(() => {
85
- c == null || c.disconnect();
84
+ }), tt(() => {
85
+ r == null || r.disconnect();
86
86
  }), ne(
87
87
  () => e.value,
88
88
  () => {
@@ -90,26 +90,26 @@ function bt(e, { disabled: t, itemHeight: s, overscan: o = 5, prefixHeight: n })
90
90
  }
91
91
  ));
92
92
  const D = {
93
- ref: a,
93
+ ref: i,
94
94
  style: { overflowY: "auto" }
95
95
  };
96
96
  return t ? {
97
- containerRef: a,
97
+ containerRef: i,
98
98
  containerProps: D,
99
99
  // eslint-disable-next-line @typescript-eslint/no-empty-function
100
100
  onScroll: () => {
101
101
  },
102
102
  list: e
103
103
  } : {
104
- containerRef: a,
104
+ containerRef: i,
105
105
  containerProps: D,
106
- onScroll: M,
107
- list: r,
108
- wrapperProps: l
106
+ onScroll: N,
107
+ list: c,
108
+ wrapperProps: o
109
109
  };
110
110
  }
111
111
  var v = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(v || {}), oe = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(oe || {});
112
- const mt = J({
112
+ const ft = Z({
113
113
  name: "bento-listbox-static-category",
114
114
  components: {
115
115
  BentoTypography: ce
@@ -123,11 +123,11 @@ const mt = J({
123
123
  required: !0
124
124
  }
125
125
  }
126
- }), vt = { class: "b-listbox-single-select-category" };
127
- function ft(e, t, s, o, n, a) {
128
- const r = L("bento-typography");
129
- return d(), O("div", vt, [
130
- P(r, {
126
+ }), pt = { class: "b-listbox-single-select-category" };
127
+ function gt(e, t, n, s, a, i) {
128
+ const c = k("bento-typography");
129
+ return d(), O("div", pt, [
130
+ x(c, {
131
131
  variant: "caption",
132
132
  el: "span",
133
133
  class: "b-listbox-single-select-category__label-text"
@@ -142,7 +142,7 @@ function ft(e, t, s, o, n, a) {
142
142
  ])
143
143
  ]);
144
144
  }
145
- const pt = /* @__PURE__ */ H(mt, [["render", ft], ["__scopeId", "data-v-a90eff17"]]), gt = J({
145
+ const yt = /* @__PURE__ */ j(ft, [["render", gt], ["__scopeId", "data-v-a90eff17"]]), St = Z({
146
146
  name: "bento-listbox-option",
147
147
  props: {
148
148
  /**
@@ -156,7 +156,7 @@ const pt = /* @__PURE__ */ H(mt, [["render", ft], ["__scopeId", "data-v-a90eff17
156
156
  },
157
157
  emits: [v.CLICK, v.ENTER, v.SPACE, v.TAB],
158
158
  setup(e, { emit: t }) {
159
- const s = p(() => ({
159
+ const n = p(() => ({
160
160
  "b-listbox-option--disabled": e.disabled,
161
161
  "b-listbox-option--selected": e.selected
162
162
  }));
@@ -165,60 +165,60 @@ const pt = /* @__PURE__ */ H(mt, [["render", ft], ["__scopeId", "data-v-a90eff17
165
165
  BentoKeyboardNavigationKeyDownEvent: V,
166
166
  BentoListboxEvent: v,
167
167
  // Values
168
- conditionalClasses: s,
168
+ conditionalClasses: n,
169
169
  // Events
170
- onClick: (a) => {
171
- t(v.CLICK, a);
170
+ onClick: (i) => {
171
+ t(v.CLICK, i);
172
172
  },
173
- onOptionSelected: (a, r) => {
174
- t(a, r);
173
+ onOptionSelected: (i, c) => {
174
+ t(i, c);
175
175
  }
176
176
  };
177
177
  }
178
178
  });
179
- function yt(e, t, s, o, n, a) {
180
- return d(), O("div", Y({
179
+ function ht(e, t, n, s, a, i) {
180
+ return d(), O("div", w({
181
181
  class: ["b-listbox-option", e.conditionalClasses],
182
182
  role: "option"
183
183
  }, e.$attrs, {
184
- onClick: t[0] || (t[0] = (...r) => e.onClick && e.onClick(...r)),
184
+ onClick: t[0] || (t[0] = (...c) => e.onClick && e.onClick(...c)),
185
185
  onKeydown: [
186
- t[1] || (t[1] = Ce((r) => e.onOptionSelected(e.BentoListboxEvent.ENTER, r), ["enter"])),
187
- t[2] || (t[2] = Ce((r) => e.onOptionSelected(e.BentoListboxEvent.SPACE, r), ["space"])),
188
- t[3] || (t[3] = Ce((r) => e.onOptionSelected(e.BentoListboxEvent.TAB, r), ["tab"]))
186
+ t[1] || (t[1] = Ce((c) => e.onOptionSelected(e.BentoListboxEvent.ENTER, c), ["enter"])),
187
+ t[2] || (t[2] = Ce((c) => e.onOptionSelected(e.BentoListboxEvent.SPACE, c), ["space"])),
188
+ t[3] || (t[3] = Ce((c) => e.onOptionSelected(e.BentoListboxEvent.TAB, c), ["tab"]))
189
189
  ]
190
190
  }), [
191
191
  W(e.$slots, "default", {}, void 0, !0)
192
192
  ], 16);
193
193
  }
194
- const ge = /* @__PURE__ */ H(gt, [["render", yt], ["__scopeId", "data-v-b7af43a6"]]);
194
+ const ge = /* @__PURE__ */ j(St, [["render", ht], ["__scopeId", "data-v-b7af43a6"]]);
195
195
  let Be = 0;
196
- const St = {
196
+ const Ct = {
197
197
  beforeCreate() {
198
198
  this.uuid = Be.toString(), Be += 1;
199
199
  }
200
- }, ht = { key: 0 };
201
- function Ct(e, t, s, o, n, a) {
202
- return d(), O("svg", Y({ role: "img" }, e.$attrs, {
200
+ }, Et = { key: 0 };
201
+ function _t(e, t, n, s, a, i) {
202
+ return d(), O("svg", w({ role: "img" }, e.$attrs, {
203
203
  class: "ui-assets-icons-16",
204
204
  xmlns: "http://www.w3.org/2000/svg",
205
205
  width: "16",
206
206
  height: "16",
207
207
  fill: "none"
208
208
  }), [
209
- e.$attrs["svg-title"] ? (d(), O("title", ht, F(e.$attrs["svg-title"]), 1)) : X("", !0),
209
+ e.$attrs["svg-title"] ? (d(), O("title", Et, F(e.$attrs["svg-title"]), 1)) : J("", !0),
210
210
  t[0] || (t[0] = z("path", {
211
211
  fill: "#001222",
212
212
  d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
213
213
  }, null, -1))
214
214
  ], 16);
215
215
  }
216
- const Et = /* @__PURE__ */ H(St, [["render", Ct]]), _t = J({
216
+ const Ot = /* @__PURE__ */ j(Ct, [["render", _t]]), Tt = Z({
217
217
  name: "bento-listbox-single-select-option",
218
218
  components: {
219
219
  BentoListboxOption: ge,
220
220
  BentoTypography: ce,
221
- CheckmarkIcon: Et
221
+ CheckmarkIcon: Ot
222
222
  },
223
223
  props: {
224
224
  /**
@@ -240,45 +240,45 @@ const Et = /* @__PURE__ */ H(St, [["render", Ct]]), _t = J({
240
240
  },
241
241
  emits: [v.ENTER, v.SELECT, v.SPACE, v.TAB],
242
242
  setup(e, { emit: t }) {
243
- const s = (r) => {
244
- e.disabled || t(r, e.option);
245
- }, o = p(() => e.disabled ? !0 : null), n = p(() => e.selected ? !0 : null), a = p(() => e.disabled ? -1 : 0);
243
+ const n = (c) => {
244
+ e.disabled || t(c, e.option);
245
+ }, s = p(() => e.disabled ? !0 : null), a = p(() => e.selected ? !0 : null), i = p(() => e.disabled ? -1 : 0);
246
246
  return {
247
247
  // Values
248
- ariaDisabled: o,
249
- ariaSelected: n,
250
- tabIndex: a,
248
+ ariaDisabled: s,
249
+ ariaSelected: a,
250
+ tabIndex: i,
251
251
  // Enums
252
252
  BentoListboxEvent: v,
253
253
  // Events
254
- onOptionSelected: s
254
+ onOptionSelected: n
255
255
  };
256
256
  }
257
- }), Ot = { class: "b-listbox-single-select-option__text" }, Tt = { class: "b-listbox-single-select-option__check-icon" };
258
- function It(e, t, s, o, n, a) {
259
- const r = L("bento-typography"), g = L("checkmark-icon"), S = L("bento-listbox-option");
260
- return d(), R(S, {
257
+ }), It = { class: "b-listbox-single-select-option__text" }, At = { class: "b-listbox-single-select-option__check-icon" };
258
+ function kt(e, t, n, s, a, i) {
259
+ const c = k("bento-typography"), m = k("checkmark-icon"), h = k("bento-listbox-option");
260
+ return d(), R(h, {
261
261
  class: "b-listbox-single-select-option",
262
262
  disabled: e.disabled,
263
263
  selected: e.selected,
264
264
  "aria-selected": e.ariaSelected,
265
265
  "aria-disabled": e.ariaDisabled,
266
266
  tabindex: e.tabIndex,
267
- onClick: t[0] || (t[0] = (i) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
268
- onEnterPressed: t[1] || (t[1] = (i) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
269
- onSpacePressed: t[2] || (t[2] = ae((i) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
270
- onTabPressed: t[3] || (t[3] = (i) => e.onOptionSelected(e.BentoListboxEvent.TAB))
267
+ onClick: t[0] || (t[0] = (l) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
268
+ onEnterPressed: t[1] || (t[1] = (l) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
269
+ onSpacePressed: t[2] || (t[2] = ae((l) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
270
+ onTabPressed: t[3] || (t[3] = (l) => e.onOptionSelected(e.BentoListboxEvent.TAB))
271
271
  }, {
272
272
  default: I(() => [
273
- W(e.$slots, "default", ie(be(e.option)), () => [
274
- z("span", Ot, [
275
- P(r, { el: "span" }, {
273
+ W(e.$slots, "default", ie(ue(e.option)), () => [
274
+ z("span", It, [
275
+ x(c, { el: "span" }, {
276
276
  default: I(() => [
277
277
  K(F(e.option.label), 1)
278
278
  ]),
279
279
  _: 1
280
280
  }),
281
- e.option.description ? (d(), R(r, {
281
+ e.option.description ? (d(), R(c, {
282
282
  key: 0,
283
283
  class: "b-listbox-single-select-option__description",
284
284
  el: "span"
@@ -287,11 +287,11 @@ function It(e, t, s, o, n, a) {
287
287
  K(F(e.option.description), 1)
288
288
  ]),
289
289
  _: 1
290
- })) : X("", !0)
290
+ })) : J("", !0)
291
291
  ])
292
292
  ], !0),
293
- z("span", Tt, [
294
- re(P(g, { "svg-title": "selected" }, null, 512), [
293
+ z("span", At, [
294
+ re(x(m, { "svg-title": "selected" }, null, 512), [
295
295
  [Pe, e.selected]
296
296
  ])
297
297
  ])
@@ -299,58 +299,58 @@ function It(e, t, s, o, n, a) {
299
299
  _: 3
300
300
  }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
301
301
  }
302
- const At = /* @__PURE__ */ H(_t, [["render", It], ["__scopeId", "data-v-226f4c84"]]), we = ({ items: e }, t) => {
303
- const s = p(() => e.value.length - 1), o = B(0), n = (m) => {
304
- switch (m) {
302
+ const Lt = /* @__PURE__ */ j(Tt, [["render", kt], ["__scopeId", "data-v-226f4c84"]]), we = ({ items: e }, t) => {
303
+ const n = p(() => e.value.length - 1), s = B(0), a = (y) => {
304
+ switch (y) {
305
305
  case "increase":
306
- o.value += 1;
306
+ s.value += 1;
307
307
  break;
308
308
  case "decrease":
309
- o.value -= 1;
309
+ s.value -= 1;
310
310
  break;
311
311
  }
312
- }, a = ({ edgeCaseItem: m }, y) => {
313
- o.value !== m && (n(y), t(o.value));
314
- }, r = (m) => {
315
- l(m), a(
312
+ }, i = ({ edgeCaseItem: y }, g) => {
313
+ s.value !== y && (a(g), t(s.value));
314
+ }, c = (y) => {
315
+ o(y), i(
316
316
  {
317
- edgeCaseItem: s.value
317
+ edgeCaseItem: n.value
318
318
  },
319
319
  "increase"
320
320
  /* INCREASE */
321
321
  );
322
- }, g = (m) => {
323
- l(m), a(
322
+ }, m = (y) => {
323
+ o(y), i(
324
324
  {
325
325
  edgeCaseItem: 0
326
326
  },
327
327
  "decrease"
328
328
  /* DECREASE */
329
329
  );
330
- }, S = () => {
331
- o.value = 0, t(o.value);
332
- }, i = () => {
333
- o.value = s.value, t(o.value);
334
- }, c = (m) => {
335
- o.value = m;
336
- }, l = (m) => {
337
- var y;
338
- (y = m == null ? void 0 : m.detail) == null || y.preventDefault();
330
+ }, h = () => {
331
+ s.value = 0, t(s.value);
332
+ }, l = () => {
333
+ s.value = n.value, t(s.value);
334
+ }, r = (y) => {
335
+ s.value = y;
336
+ }, o = (y) => {
337
+ var g;
338
+ (g = y == null ? void 0 : y.detail) == null || g.preventDefault();
339
339
  };
340
340
  return {
341
- moveToFirstElement: S,
342
- moveToLastElement: i,
343
- moveToNextElement: r,
344
- moveToPreviousElement: g,
345
- setListboxFocusedIndex: c,
346
- preventDefault: l,
347
- focusedIndex: o
341
+ moveToFirstElement: h,
342
+ moveToLastElement: l,
343
+ moveToNextElement: c,
344
+ moveToPreviousElement: m,
345
+ setListboxFocusedIndex: r,
346
+ preventDefault: o,
347
+ focusedIndex: s
348
348
  };
349
- }, kt = J({
349
+ }, $t = Z({
350
350
  name: "bento-listbox-single-select",
351
351
  components: {
352
- BentoListboxSingleSelectCategory: pt,
353
- BentoListboxSingleSelectOption: At
352
+ BentoListboxSingleSelectCategory: yt,
353
+ BentoListboxSingleSelectOption: Lt
354
354
  },
355
355
  directives: { BentoKeyboardNavigationDirective: pe },
356
356
  inheritAttrs: !1,
@@ -394,136 +394,136 @@ const At = /* @__PURE__ */ H(_t, [["render", It], ["__scopeId", "data-v-226f4c84
394
394
  staticCategories: { type: Boolean, default: !1 }
395
395
  },
396
396
  emits: [v.SELECT, v.ENTER, v.SPACE, v.TAB],
397
- setup(e, { emit: t, expose: s, slots: o, attrs: n }) {
398
- const a = B(null), r = B([]), g = p(() => {
399
- var h;
400
- return !!((h = e.selectedValue) != null && h.length) && e.selectedValue.at(0);
401
- }), S = p(
397
+ setup(e, { emit: t, expose: n, slots: s, attrs: a }) {
398
+ const i = B(null), c = B([]), m = p(() => {
399
+ var C;
400
+ return !!((C = e.selectedValue) != null && C.length) && e.selectedValue.at(0);
401
+ }), h = p(
402
402
  () => {
403
- var h, C, U, G;
403
+ var C, S, Y, U;
404
404
  return {
405
- "aria-label": (h = n["aria-label"]) == null ? void 0 : h.toString(),
406
- "aria-busy": (C = n["aria-busy"]) == null ? void 0 : C.toString(),
407
- "aria-atomic": (U = n["aria-atomic"]) == null ? void 0 : U.toString(),
408
- "aria-live": (G = n["aria-live"]) == null ? void 0 : G.toString()
405
+ "aria-label": (C = a["aria-label"]) == null ? void 0 : C.toString(),
406
+ "aria-busy": (S = a["aria-busy"]) == null ? void 0 : S.toString(),
407
+ "aria-atomic": (Y = a["aria-atomic"]) == null ? void 0 : Y.toString(),
408
+ "aria-live": (U = a["aria-live"]) == null ? void 0 : U.toString()
409
409
  };
410
410
  }
411
- ), i = p(() => !!e.items.some(({ items: h }) => !!h)), c = (h) => (C) => {
412
- t(h, [C]);
413
- }, l = async () => {
414
- await Me(), a.value && (m.value = Array.from(a.value.querySelectorAll('[role="option"]')));
415
- }, m = B([]), y = (h) => {
416
- var C;
417
- (C = m.value[h]) == null || C.focus();
411
+ ), l = p(() => !!e.items.some(({ items: C }) => !!C)), r = (C) => (S) => {
412
+ t(C, [S]);
413
+ }, o = async () => {
414
+ await Me(), i.value && (y.value = Array.from(i.value.querySelectorAll('[role="option"]')));
415
+ }, y = B([]), g = (C) => {
416
+ var S;
417
+ (S = y.value[C]) == null || S.focus();
418
418
  }, {
419
419
  moveToNextElement: T,
420
- moveToPreviousElement: M,
420
+ moveToPreviousElement: N,
421
421
  moveToFirstElement: D,
422
422
  moveToLastElement: A,
423
- setListboxFocusedIndex: x
423
+ setListboxFocusedIndex: P
424
424
  } = we(
425
425
  {
426
- items: m
426
+ items: y
427
427
  },
428
- y
428
+ g
429
429
  );
430
430
  ne(
431
431
  () => e.items,
432
432
  () => {
433
- l();
433
+ o();
434
434
  },
435
435
  { immediate: !0 }
436
436
  );
437
- const $ = {
438
- [V.ARROW_UP]: M,
437
+ const L = {
438
+ [V.ARROW_UP]: N,
439
439
  [V.ARROW_DOWN]: T,
440
440
  [V.HOME]: D,
441
441
  [V.END]: A
442
- }, k = {
443
- [v.SELECT]: c(v.SELECT),
444
- [v.SPACE]: c(v.SPACE),
445
- [v.TAB]: c(v.TAB),
446
- [v.ENTER]: c(v.ENTER)
442
+ }, $ = {
443
+ [v.SELECT]: r(v.SELECT),
444
+ [v.SPACE]: r(v.SPACE),
445
+ [v.TAB]: r(v.TAB),
446
+ [v.ENTER]: r(v.ENTER)
447
447
  };
448
- return s({
448
+ return n({
449
449
  /**
450
450
  * Reference for a single listbox item.
451
451
  * Required for keyboard navigation in dropdown as $children is removed in vue@3
452
452
  */
453
- listboxItemRef: r,
453
+ listboxItemRef: c,
454
454
  /**
455
455
  * Method to set the index of the item to be focused on
456
456
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
457
457
  */
458
- setListboxFocusedIndex: x
458
+ setListboxFocusedIndex: P
459
459
  }), {
460
460
  // Enums
461
461
  BentoListboxEvent: v,
462
462
  // Values
463
- listboxRef: a,
464
- listboxItemRef: r,
465
- selectedItem: g,
466
- slots: o,
467
- ariaAttributes: S,
463
+ listboxRef: i,
464
+ listboxItemRef: c,
465
+ selectedItem: m,
466
+ slots: s,
467
+ ariaAttributes: h,
468
468
  // Computed
469
- hasCategories: i,
469
+ hasCategories: l,
470
470
  // Methods
471
- onOptionSelected: c,
471
+ onOptionSelected: r,
472
472
  // Keyboard navigation
473
- listboxListeners: $,
474
- listboxOptionListeners: k
473
+ listboxListeners: L,
474
+ listboxOptionListeners: $
475
475
  };
476
476
  }
477
477
  });
478
- function Lt(e, t, s, o, n, a) {
479
- const r = L("bento-listbox-single-select-option"), g = L("bento-listbox-single-select-category"), S = xe("bento-keyboard-navigation-directive");
480
- return re((d(), O("div", Y({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, te(e.listboxListeners, !0)), [
481
- e.hasCategories && e.staticCategories ? (d(!0), O(se, { key: 0 }, q(e.items, (i) => (d(), R(g, {
482
- key: i.value,
483
- "category-label": i.label,
478
+ function Dt(e, t, n, s, a, i) {
479
+ const c = k("bento-listbox-single-select-option"), m = k("bento-listbox-single-select-category"), h = xe("bento-keyboard-navigation-directive");
480
+ return re((d(), O("div", w({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, se(e.listboxListeners, !0)), [
481
+ e.hasCategories && e.staticCategories ? (d(!0), O(le, { key: 0 }, H(e.items, (l) => (d(), R(m, {
482
+ key: l.value,
483
+ "category-label": l.label,
484
484
  role: "group"
485
485
  }, {
486
486
  default: I(() => [
487
- (d(!0), O(se, null, q(i.items, (c) => (d(), R(r, Y({
488
- key: c.value,
487
+ (d(!0), O(le, null, H(l.items, (r) => (d(), R(c, w({
488
+ key: r.value,
489
489
  ref_for: !0,
490
490
  ref: "listboxItemRef",
491
491
  role: "option",
492
- option: c,
493
- disabled: e.isOptionDisabled ? e.isOptionDisabled(c) : null,
494
- selected: c.value === e.selectedItem.value
495
- }, te(e.listboxOptionListeners)), me({ _: 2 }, [
496
- q(e.slots, (l, m) => ({
497
- name: m,
498
- fn: I((y) => [
499
- W(e.$slots, m, Y({ ref_for: !0 }, y))
492
+ option: r,
493
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
494
+ selected: r.value === e.selectedItem.value
495
+ }, se(e.listboxOptionListeners)), be({ _: 2 }, [
496
+ H(e.slots, (o, y) => ({
497
+ name: y,
498
+ fn: I((g) => [
499
+ W(e.$slots, y, w({ ref_for: !0 }, g))
500
500
  ])
501
501
  }))
502
502
  ]), 1040, ["option", "disabled", "selected"]))), 128))
503
503
  ]),
504
504
  _: 2
505
- }, 1032, ["category-label"]))), 128)) : (d(!0), O(se, { key: 1 }, q(e.items, (i) => (d(), R(r, Y({
506
- key: i.value,
505
+ }, 1032, ["category-label"]))), 128)) : (d(!0), O(le, { key: 1 }, H(e.items, (l) => (d(), R(c, w({
506
+ key: l.value,
507
507
  ref_for: !0,
508
508
  ref: "listboxItemRef",
509
509
  role: "option",
510
- option: i,
511
- disabled: e.isOptionDisabled ? e.isOptionDisabled(i) : null,
512
- selected: i.value === e.selectedItem.value
513
- }, te(e.listboxOptionListeners)), me({ _: 2 }, [
514
- q(e.slots, (c, l) => ({
515
- name: l,
516
- fn: I((m) => [
517
- W(e.$slots, l, Y({ ref_for: !0 }, m))
510
+ option: l,
511
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
512
+ selected: l.value === e.selectedItem.value
513
+ }, se(e.listboxOptionListeners)), be({ _: 2 }, [
514
+ H(e.slots, (r, o) => ({
515
+ name: o,
516
+ fn: I((y) => [
517
+ W(e.$slots, o, w({ ref_for: !0 }, y))
518
518
  ])
519
519
  }))
520
520
  ]), 1040, ["option", "disabled", "selected"]))), 128))
521
521
  ], 16)), [
522
- [S]
522
+ [h]
523
523
  ]);
524
524
  }
525
- const $t = /* @__PURE__ */ H(kt, [["render", Lt]]), Dt = {}, Bt = /* @__PURE__ */ J({
526
- ...Dt,
525
+ const Bt = /* @__PURE__ */ j($t, [["render", Dt]]), Rt = {}, Nt = /* @__PURE__ */ Z({
526
+ ...Rt,
527
527
  __name: "listbox-decorative-checkbox",
528
528
  props: {
529
529
  disabled: { type: Boolean, default: !1 },
@@ -531,48 +531,48 @@ const $t = /* @__PURE__ */ H(kt, [["render", Lt]]), Dt = {}, Bt = /* @__PURE__ *
531
531
  checked: { type: Boolean, default: !1 }
532
532
  },
533
533
  setup(e) {
534
- const t = e, s = p(() => ({
534
+ const t = e, n = p(() => ({
535
535
  [`b-checkbox-input--${fe.DISABLED}`]: t.disabled
536
- })), o = p(() => ({
536
+ })), s = p(() => ({
537
537
  [`b-checkbox-input__outline--${fe.UNCHECKED}`]: !t.checked && !t.indeterminate,
538
538
  [`b-checkbox-input__outline--${fe.CHECKED}`]: t.checked && !t.indeterminate,
539
539
  [`b-checkbox-input__outline--${fe.INDETERMINATE}`]: t.indeterminate
540
540
  }));
541
- return (n, a) => (d(), O("div", {
542
- class: ve(["b-checkbox-input", s.value]),
541
+ return (a, i) => (d(), O("div", {
542
+ class: me(["b-checkbox-input", n.value]),
543
543
  role: "presentation"
544
544
  }, [
545
- n.indeterminate ? (d(), R(N(nt), {
545
+ a.indeterminate ? (d(), R(M(rt), {
546
546
  key: 0,
547
547
  class: "b-checkbox-input__icon",
548
548
  "svg-title": "",
549
549
  "aria-hidden": "true"
550
- })) : n.checked ? (d(), R(N(at), {
550
+ })) : a.checked ? (d(), R(M(ct), {
551
551
  key: 1,
552
552
  class: "b-checkbox-input__icon",
553
553
  "svg-title": "",
554
554
  "aria-hidden": "true"
555
- })) : X("", !0),
555
+ })) : J("", !0),
556
556
  z("div", {
557
- class: ve(["b-checkbox-input__outline", o.value])
557
+ class: me(["b-checkbox-input__outline", s.value])
558
558
  }, null, 2)
559
559
  ], 2));
560
560
  }
561
- }), Te = /* @__PURE__ */ H(Bt, [["__scopeId", "data-v-c604b68a"]]);
562
- var Ye = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(Ye || {}), ee = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(ee || {});
563
- const Rt = {
561
+ }), Te = /* @__PURE__ */ j(Nt, [["__scopeId", "data-v-c604b68a"]]);
562
+ var Ye = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(Ye || {}), te = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(te || {});
563
+ const Pt = {
564
564
  "en-US": {
565
565
  categoryClosed: "{category} closed",
566
566
  categoryOpened: "{category} opened"
567
567
  }
568
- }, Nt = J({
569
- i18n: { messages: Rt },
568
+ }, Mt = Z({
569
+ i18n: { messages: Pt },
570
570
  name: "bento-listbox-multi-select-category",
571
571
  components: {
572
572
  BentoTypography: ce,
573
573
  BentoListboxOption: ge,
574
- ChevronDownIcon: rt,
575
- ChevronUpIcon: ct,
574
+ ChevronDownIcon: dt,
575
+ ChevronUpIcon: ut,
576
576
  ListboxDecorativeCheckbox: Te
577
577
  },
578
578
  props: {
@@ -619,81 +619,81 @@ const Rt = {
619
619
  tabindex: { type: Number, default: -1 }
620
620
  },
621
621
  emits: [
622
- ee.SELECT_CATEGORY,
623
- ee.UNSELECT_CATEGORY,
624
- ee.TOGGLE_CATEGORY_VISIBILITY
622
+ te.SELECT_CATEGORY,
623
+ te.UNSELECT_CATEGORY,
624
+ te.TOGGLE_CATEGORY_VISIBILITY
625
625
  ],
626
626
  setup(e, { emit: t }) {
627
- const s = B(!1), { t: o } = Oe(), n = (C) => e.isOptionDisabled ? e.isOptionDisabled(C) : !1, a = p(
628
- () => e.category.items.every((C) => n(C))
629
- ), r = _e(e, "staticCategories"), g = p(() => s.value || e.staticCategories), S = p(() => ({
630
- [`b-listbox-multi-select-category--${Ye.DISABLED}`]: a.value
631
- })), i = (C) => {
632
- C.preventDefault(), s.value = !s.value, t(ee.TOGGLE_CATEGORY_VISIBILITY);
633
- }, c = (C) => {
634
- var Q;
635
- const U = n(C), G = ((Q = e.selectedItemsList) == null ? void 0 : Q.includes(C.value)) || !1;
636
- return { isDisabled: U, isPreSelected: G };
637
- }, l = p(
638
- () => e.category.items.filter((C) => {
639
- const { isDisabled: U, isPreSelected: G } = c(C);
640
- return U && G || !U;
627
+ const n = B(!1), { t: s } = Oe(), a = (S) => e.isOptionDisabled ? e.isOptionDisabled(S) : !1, i = p(
628
+ () => e.category.items.every((S) => a(S))
629
+ ), c = _e(e, "staticCategories"), m = p(() => n.value || e.staticCategories), h = p(() => ({
630
+ [`b-listbox-multi-select-category--${Ye.DISABLED}`]: i.value
631
+ })), l = (S) => {
632
+ S.preventDefault(), n.value = !n.value, t(te.TOGGLE_CATEGORY_VISIBILITY);
633
+ }, r = (S) => {
634
+ var q;
635
+ const Y = a(S), U = ((q = e.selectedItemsList) == null ? void 0 : q.includes(S.value)) || !1;
636
+ return { isDisabled: Y, isPreSelected: U };
637
+ }, o = p(
638
+ () => e.category.items.filter((S) => {
639
+ const { isDisabled: Y, isPreSelected: U } = r(S);
640
+ return Y && U || !Y;
641
641
  })
642
- ), m = p(
642
+ ), y = p(
643
643
  () => {
644
- var C;
645
- return (C = l.value) == null ? void 0 : C.filter(
646
- ({ value: U }) => {
647
- var G;
648
- return (G = e.selectedItemsList) == null ? void 0 : G.includes(U);
644
+ var S;
645
+ return (S = o.value) == null ? void 0 : S.filter(
646
+ ({ value: Y }) => {
647
+ var U;
648
+ return (U = e.selectedItemsList) == null ? void 0 : U.includes(Y);
649
649
  }
650
650
  );
651
651
  }
652
- ), y = p(() => {
653
- const C = s.value ? "categoryOpened" : "categoryClosed";
654
- return o(C, { category: e.category.label });
652
+ ), g = p(() => {
653
+ const S = n.value ? "categoryOpened" : "categoryClosed";
654
+ return s(S, { category: e.category.label });
655
655
  }), T = () => {
656
- t(ee.SELECT_CATEGORY);
657
- }, M = () => {
658
- t(ee.UNSELECT_CATEGORY);
659
- }, { isAllSelected: D, isIndeterminate: A, toggleSelectAll: x } = Ge(
660
- m,
661
- l,
656
+ t(te.SELECT_CATEGORY);
657
+ }, N = () => {
658
+ t(te.UNSELECT_CATEGORY);
659
+ }, { isAllSelected: D, isIndeterminate: A, toggleSelectAll: P } = Ge(
660
+ y,
661
+ o,
662
662
  T,
663
- M
664
- ), $ = p(() => A.value ? "mixed" : `${D.value}`), k = B(D.value), h = () => {
665
- k.value = !k.value, x(k.value);
663
+ N
664
+ ), L = p(() => A.value ? "mixed" : `${D.value}`), $ = B(D.value), C = () => {
665
+ $.value = !$.value, P($.value);
666
666
  };
667
667
  return ne(D, () => {
668
- k.value = D.value;
668
+ $.value = D.value;
669
669
  }), {
670
670
  // Values
671
- chevronTitle: y,
672
- conditionalClass: S,
673
- hasAllPropsDisabled: a,
674
- isOpen: s,
671
+ chevronTitle: g,
672
+ conditionalClass: h,
673
+ hasAllPropsDisabled: i,
674
+ isOpen: n,
675
675
  isAllSelected: D,
676
676
  isIndeterminate: A,
677
- isStaticCategory: r,
677
+ isStaticCategory: c,
678
678
  // Computed
679
- showItemChildren: g,
680
- ariaCheckedComputed: $,
679
+ showItemChildren: m,
680
+ ariaCheckedComputed: L,
681
681
  // Methods
682
- handleSelectAll: h,
683
- toggleOpen: i,
684
- toggleSelectAll: x
682
+ handleSelectAll: C,
683
+ toggleOpen: l,
684
+ toggleSelectAll: P
685
685
  };
686
686
  }
687
- }), Pt = { class: "b-listbox-multi-select-category__label" }, Mt = {
687
+ }), xt = { class: "b-listbox-multi-select-category__label" }, Gt = {
688
688
  key: 1,
689
689
  class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category"
690
- }, xt = { class: "b-listbox-multi-select-category__label" };
691
- function Gt(e, t, s, o, n, a) {
692
- const r = L("listbox-decorative-checkbox"), g = L("bento-typography"), S = L("chevron-up-icon"), i = L("chevron-down-icon"), c = L("bento-listbox-option");
690
+ }, wt = { class: "b-listbox-multi-select-category__label" };
691
+ function Yt(e, t, n, s, a, i) {
692
+ const c = k("listbox-decorative-checkbox"), m = k("bento-typography"), h = k("chevron-up-icon"), l = k("chevron-down-icon"), r = k("bento-listbox-option");
693
693
  return d(), O("div", null, [
694
- e.isStaticCategory ? (d(), O("div", Mt, [
695
- z("span", xt, [
696
- P(g, {
694
+ e.isStaticCategory ? (d(), O("div", Gt, [
695
+ z("span", wt, [
696
+ x(m, {
697
697
  el: "span",
698
698
  variant: "caption",
699
699
  class: "b-listbox-multi-select-category__label-text"
@@ -704,9 +704,9 @@ function Gt(e, t, s, o, n, a) {
704
704
  _: 1
705
705
  })
706
706
  ])
707
- ])) : (d(), R(c, {
707
+ ])) : (d(), R(r, {
708
708
  key: 0,
709
- class: ve(["b-listbox-multi-select-category__option", e.conditionalClass]),
709
+ class: me(["b-listbox-multi-select-category__option", e.conditionalClass]),
710
710
  tabindex: e.tabindex,
711
711
  "aria-checked": e.ariaCheckedComputed,
712
712
  "aria-disabled": e.hasAllPropsDisabled,
@@ -715,13 +715,13 @@ function Gt(e, t, s, o, n, a) {
715
715
  onSpacePressed: ae(e.handleSelectAll, ["prevent"])
716
716
  }, {
717
717
  default: I(() => [
718
- P(r, {
718
+ x(c, {
719
719
  indeterminate: e.isIndeterminate,
720
720
  disabled: e.hasAllPropsDisabled,
721
721
  checked: e.isAllSelected
722
722
  }, null, 8, ["indeterminate", "disabled", "checked"]),
723
- z("span", Pt, [
724
- P(g, {
723
+ z("span", xt, [
724
+ x(m, {
725
725
  el: "span",
726
726
  class: "b-listbox-multi-select-category__label-text"
727
727
  }, {
@@ -733,12 +733,12 @@ function Gt(e, t, s, o, n, a) {
733
733
  z("div", {
734
734
  class: "b-listbox-multi-select-category__label-chevron",
735
735
  "data-testid": "toggle-listbox",
736
- onClickCapture: t[0] || (t[0] = ae((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
736
+ onClickCapture: t[0] || (t[0] = ae((...o) => e.toggleOpen && e.toggleOpen(...o), ["stop"]))
737
737
  }, [
738
- e.isOpen ? (d(), R(S, {
738
+ e.isOpen ? (d(), R(h, {
739
739
  key: 0,
740
740
  "svg-title": e.chevronTitle
741
- }, null, 8, ["svg-title"])) : (d(), R(i, {
741
+ }, null, 8, ["svg-title"])) : (d(), R(l, {
742
742
  key: 1,
743
743
  "svg-title": e.chevronTitle
744
744
  }, null, 8, ["svg-title"]))
@@ -754,14 +754,14 @@ function Gt(e, t, s, o, n, a) {
754
754
  ])
755
755
  ]);
756
756
  }
757
- const wt = /* @__PURE__ */ H(Nt, [["render", Gt], ["__scopeId", "data-v-40db801f"]]);
758
- var j = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(j || {});
759
- const Yt = J({
757
+ const Ut = /* @__PURE__ */ j(Mt, [["render", Yt], ["__scopeId", "data-v-40db801f"]]);
758
+ var X = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(X || {});
759
+ const zt = Z({
760
760
  name: "listbox-multi-select-options",
761
761
  components: {
762
762
  BentoListboxOption: ge,
763
763
  BentoTypography: ce,
764
- ListboxMultiSelectCategory: wt,
764
+ ListboxMultiSelectCategory: Ut,
765
765
  ListboxDecorativeCheckbox: Te
766
766
  },
767
767
  props: {
@@ -824,23 +824,23 @@ const Yt = J({
824
824
  staticCategories: { type: Boolean, default: !1 }
825
825
  },
826
826
  emits: [
827
- j.TOGGLE_CHECKBOX_SELECTION,
828
- j.SELECT_CATEGORY,
829
- j.UNSELECT_CATEGORY,
830
- j.TOGGLE_CATEGORY_VISIBILITY
827
+ X.TOGGLE_CHECKBOX_SELECTION,
828
+ X.SELECT_CATEGORY,
829
+ X.UNSELECT_CATEGORY,
830
+ X.TOGGLE_CATEGORY_VISIBILITY
831
831
  ],
832
832
  setup(e, { emit: t }) {
833
- const s = (i) => {
834
- e.isOptionDisabled(i) || t(j.TOGGLE_CHECKBOX_SELECTION, i);
835
- }, o = (i) => !!i.items, n = (i) => {
836
- const c = e.isMultiLevel && e.searching;
837
- return i.description && (!e.isMultiLevel || c);
838
- }, a = (i) => i.items ? !!i.items.find((c) => e.selectedItemsList.includes(c.value)) : e.selectedItemsList.includes(i.value), r = (i) => {
839
- if (o(i)) {
840
- const c = a(i) ? j.UNSELECT_CATEGORY : j.SELECT_CATEGORY;
841
- t(c, i);
833
+ const n = (l) => {
834
+ e.isOptionDisabled(l) || t(X.TOGGLE_CHECKBOX_SELECTION, l);
835
+ }, s = (l) => !!l.items, a = (l) => {
836
+ const r = e.isMultiLevel && e.searching;
837
+ return l.description && (!e.isMultiLevel || r);
838
+ }, i = (l) => l.items ? !!l.items.find((r) => e.selectedItemsList.includes(r.value)) : e.selectedItemsList.includes(l.value), c = (l) => {
839
+ if (s(l)) {
840
+ const r = i(l) ? X.UNSELECT_CATEGORY : X.SELECT_CATEGORY;
841
+ t(r, l);
842
842
  } else
843
- s(i);
843
+ n(l);
844
844
  };
845
845
  return {
846
846
  // Values
@@ -849,121 +849,121 @@ const Yt = J({
849
849
  "b-listbox-multi-select-options__category-option": e.categoryItems
850
850
  })),
851
851
  // Methods
852
- isOptionSelected: a,
853
- shouldShowDescription: n,
854
- toggleCheckboxSelection: s,
855
- toggleSearchOption: r,
856
- computedTabindex: (i) => i + 1 === e.focusedIndex ? 0 : -1,
852
+ isOptionSelected: i,
853
+ shouldShowDescription: a,
854
+ toggleCheckboxSelection: n,
855
+ toggleSearchOption: c,
856
+ computedTabindex: (l) => l + 1 === e.focusedIndex ? 0 : -1,
857
857
  // Enums
858
858
  BentoListboxEvent: v,
859
- ListboxMultiSelectOptionsEvent: j
859
+ ListboxMultiSelectOptionsEvent: X
860
860
  };
861
861
  }
862
- }), Ut = { class: "b-listbox-multi-select__option-text" }, zt = { class: "b-listbox-multi-select__option-text" };
863
- function Ft(e, t, s, o, n, a) {
864
- const r = L("listbox-decorative-checkbox"), g = L("bento-typography"), S = L("bento-listbox-option"), i = L("listbox-multi-select-options", !0), c = L("listbox-multi-select-category");
862
+ }), Ft = { class: "b-listbox-multi-select__option-text" }, Vt = { class: "b-listbox-multi-select__option-text" };
863
+ function Kt(e, t, n, s, a, i) {
864
+ const c = k("listbox-decorative-checkbox"), m = k("bento-typography"), h = k("bento-listbox-option"), l = k("listbox-multi-select-options", !0), r = k("listbox-multi-select-category");
865
865
  return d(), O("div", null, [
866
- (d(!0), O(se, null, q(e.items, (l, m) => (d(), O("div", {
867
- key: `selected-${l.value}`
866
+ (d(!0), O(le, null, H(e.items, (o, y) => (d(), O("div", {
867
+ key: `selected-${o.value}`
868
868
  }, [
869
- e.searching && e.isMultiLevel ? (d(), R(S, {
869
+ e.searching && e.isMultiLevel ? (d(), R(h, {
870
870
  key: 0,
871
- class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
872
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
873
- tabindex: e.computedTabindex(m),
874
- "aria-checked": `${e.isOptionSelected(l)}`,
875
- "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
876
- onClick: (y) => e.toggleSearchOption(l),
877
- onEnterPressed: (y) => e.toggleSearchOption(l),
878
- onSpacePressed: ae((y) => e.toggleSearchOption(l), ["prevent"])
871
+ class: me(["b-listbox-multi-select-options", e.conditionalClasses]),
872
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
873
+ tabindex: e.computedTabindex(y),
874
+ "aria-checked": `${e.isOptionSelected(o)}`,
875
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(o) : null,
876
+ onClick: (g) => e.toggleSearchOption(o),
877
+ onEnterPressed: (g) => e.toggleSearchOption(o),
878
+ onSpacePressed: ae((g) => e.toggleSearchOption(o), ["prevent"])
879
879
  }, {
880
880
  default: I(() => [
881
- P(r, {
882
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
883
- checked: e.isOptionSelected(l)
881
+ x(c, {
882
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
883
+ checked: e.isOptionSelected(o)
884
884
  }, null, 8, ["disabled", "checked"]),
885
- W(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
886
- z("span", Ut, [
887
- P(g, { el: "span" }, {
885
+ W(e.$slots, "default", w({ ref_for: !0 }, o), () => [
886
+ z("span", Ft, [
887
+ x(m, { el: "span" }, {
888
888
  default: I(() => [
889
- K(F(l.label), 1)
889
+ K(F(o.label), 1)
890
890
  ]),
891
891
  _: 2
892
892
  }, 1024),
893
- e.shouldShowDescription(l) ? (d(), R(g, {
893
+ e.shouldShowDescription(o) ? (d(), R(m, {
894
894
  key: 0,
895
895
  class: "b-listbox-multi-select__option-description",
896
896
  el: "span"
897
897
  }, {
898
898
  default: I(() => [
899
- K(F(l.description), 1)
899
+ K(F(o.description), 1)
900
900
  ]),
901
901
  _: 2
902
- }, 1024)) : X("", !0)
902
+ }, 1024)) : J("", !0)
903
903
  ])
904
904
  ], !0)
905
905
  ]),
906
906
  _: 2
907
- }, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "onClick", "onEnterPressed", "onSpacePressed"])) : (d(), O(se, { key: 1 }, [
908
- l.items ? (d(), R(c, {
907
+ }, 1032, ["class", "disabled", "tabindex", "aria-checked", "aria-disabled", "onClick", "onEnterPressed", "onSpacePressed"])) : (d(), O(le, { key: 1 }, [
908
+ o.items ? (d(), R(r, {
909
909
  key: 0,
910
- category: l,
910
+ category: o,
911
911
  "static-categories": e.staticCategories,
912
912
  "is-option-disabled": e.isOptionDisabled,
913
913
  "selected-items-list": e.selectedItemsList,
914
- tabindex: e.computedTabindex(m),
915
- onSelectCategory: (y) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l),
916
- onUnselectCategory: (y) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l),
917
- onToggleCategoryVisibility: t[1] || (t[1] = (y) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY))
914
+ tabindex: e.computedTabindex(y),
915
+ onSelectCategory: (g) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
916
+ onUnselectCategory: (g) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o),
917
+ onToggleCategoryVisibility: t[1] || (t[1] = (g) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY))
918
918
  }, {
919
919
  default: I(() => [
920
- P(i, {
920
+ x(l, {
921
921
  "category-items": "",
922
- items: l.items,
922
+ items: o.items,
923
923
  "is-option-disabled": e.isOptionDisabled,
924
924
  "focused-index": e.focusedIndex,
925
925
  "is-multi-level": e.isMultiLevel,
926
926
  "static-categories": e.staticCategories,
927
927
  "selected-items-list": e.selectedItemsList,
928
928
  searching: e.searching,
929
- onToggleCheckboxSelection: t[0] || (t[0] = (y) => e.toggleCheckboxSelection(y))
929
+ onToggleCheckboxSelection: t[0] || (t[0] = (g) => e.toggleCheckboxSelection(g))
930
930
  }, null, 8, ["items", "is-option-disabled", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching"])
931
931
  ]),
932
932
  _: 2
933
- }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), R(S, {
933
+ }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), R(h, {
934
934
  key: 1,
935
- class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
936
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
937
- tabindex: e.computedTabindex(m),
938
- "aria-checked": `${e.isOptionSelected(l)}`,
939
- "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
940
- onClick: (y) => e.toggleCheckboxSelection(l),
941
- onEnterPressed: (y) => e.toggleCheckboxSelection(l),
942
- onSpacePressed: ae((y) => e.toggleCheckboxSelection(l), ["prevent"])
935
+ class: me(["b-listbox-multi-select-options", e.conditionalClasses]),
936
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
937
+ tabindex: e.computedTabindex(y),
938
+ "aria-checked": `${e.isOptionSelected(o)}`,
939
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(o) : null,
940
+ onClick: (g) => e.toggleCheckboxSelection(o),
941
+ onEnterPressed: (g) => e.toggleCheckboxSelection(o),
942
+ onSpacePressed: ae((g) => e.toggleCheckboxSelection(o), ["prevent"])
943
943
  }, {
944
944
  default: I(() => [
945
- P(r, {
946
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
947
- checked: e.isOptionSelected(l)
945
+ x(c, {
946
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
947
+ checked: e.isOptionSelected(o)
948
948
  }, null, 8, ["disabled", "checked"]),
949
- W(e.$slots, "default", Y({ ref_for: !0 }, l), () => [
950
- z("span", zt, [
951
- P(g, { el: "span" }, {
949
+ W(e.$slots, "default", w({ ref_for: !0 }, o), () => [
950
+ z("span", Vt, [
951
+ x(m, { el: "span" }, {
952
952
  default: I(() => [
953
- K(F(l.label), 1)
953
+ K(F(o.label), 1)
954
954
  ]),
955
955
  _: 2
956
956
  }, 1024),
957
- e.shouldShowDescription(l) ? (d(), R(g, {
957
+ e.shouldShowDescription(o) ? (d(), R(m, {
958
958
  key: 0,
959
959
  class: "b-listbox-multi-select__option-description",
960
960
  el: "span"
961
961
  }, {
962
962
  default: I(() => [
963
- K(F(l.description), 1)
963
+ K(F(o.description), 1)
964
964
  ]),
965
965
  _: 2
966
- }, 1024)) : X("", !0)
966
+ }, 1024)) : J("", !0)
967
967
  ])
968
968
  ], !0)
969
969
  ]),
@@ -973,17 +973,17 @@ function Ft(e, t, s, o, n, a) {
973
973
  ]))), 128))
974
974
  ]);
975
975
  }
976
- const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d"]]), Kt = (e) => {
976
+ const Wt = /* @__PURE__ */ j(zt, [["render", Kt], ["__scopeId", "data-v-e26ceb2d"]]), qt = (e) => {
977
977
  const t = p(() => {
978
- var o;
979
- return !!((o = e.value) != null && o.find(({ items: n }) => !!n));
980
- }), s = p(() => {
981
- var o;
982
- return t.value ? (o = e.value) == null ? void 0 : o.reduce((n, a) => (a.items ? n.push(...a.items.flat()) : n.push(a), n), []) : e.value;
978
+ var s;
979
+ return !!((s = e.value) != null && s.find(({ items: a }) => !!a));
980
+ }), n = p(() => {
981
+ var s;
982
+ return t.value ? (s = e.value) == null ? void 0 : s.reduce((a, i) => (i.items ? a.push(...i.items.flat()) : a.push(i), a), []) : e.value;
983
983
  });
984
984
  return {
985
985
  isMultiLevelSelect: t,
986
- flattenedItemsList: s
986
+ flattenedItemsList: n
987
987
  };
988
988
  }, Ue = {
989
989
  "en-US": {
@@ -992,12 +992,12 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
992
992
  numbersSelected: "{number} selected",
993
993
  selectAll: "Select all ({total})"
994
994
  }
995
- }, Wt = { key: 0 }, qt = {
995
+ }, Ht = { key: 0 }, jt = {
996
996
  key: 1,
997
997
  class: "b-listbox-multi-select__divider",
998
998
  "aria-hidden": "true"
999
- }, Ht = { i18n: { messages: Ue } }, jt = /* @__PURE__ */ J({
1000
- ...Ht,
999
+ }, Xt = { i18n: { messages: Ue } }, Jt = /* @__PURE__ */ Z({
1000
+ ...Xt,
1001
1001
  __name: "listbox-multi-select",
1002
1002
  props: {
1003
1003
  hasMoreItems: { type: Boolean, default: !1 },
@@ -1009,116 +1009,125 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
1009
1009
  staticCategories: { type: Boolean, default: !1 }
1010
1010
  },
1011
1011
  emits: ["select"],
1012
- setup(e, { emit: t }) {
1013
- const s = e, o = t, { t: n } = Oe({ messages: Ue }), a = et(), r = tt(), g = p(
1012
+ setup(e, { expose: t, emit: n }) {
1013
+ const s = e, a = n, { t: i } = Oe({ messages: Ue }), c = st(), m = lt(), h = p(
1014
1014
  () => {
1015
1015
  var u, f, b, _;
1016
1016
  return {
1017
- "aria-label": (u = r["aria-label"]) == null ? void 0 : u.toString(),
1018
- "aria-busy": (f = r["aria-busy"]) == null ? void 0 : f.toString(),
1019
- "aria-atomic": (b = r["aria-atomic"]) == null ? void 0 : b.toString(),
1020
- "aria-live": (_ = r["aria-live"]) == null ? void 0 : _.toString()
1017
+ "aria-label": (u = m["aria-label"]) == null ? void 0 : u.toString(),
1018
+ "aria-busy": (f = m["aria-busy"]) == null ? void 0 : f.toString(),
1019
+ "aria-atomic": (b = m["aria-atomic"]) == null ? void 0 : b.toString(),
1020
+ "aria-live": (_ = m["aria-live"]) == null ? void 0 : _.toString()
1021
1021
  };
1022
1022
  }
1023
- ), S = B(null), i = B(null), c = B(null), l = B(null), m = p(() => s.selectedValues.map(({ value: u }) => u)), { isMultiLevelSelect: y, flattenedItemsList: T } = Kt(_e(s, "items")), M = (u) => {
1023
+ ), l = B(null), r = B(null), o = B(null), y = B(null), g = p(() => s.selectedValues.map(({ value: u }) => u)), { isMultiLevelSelect: T, flattenedItemsList: N } = qt(_e(s, "items")), D = (u) => {
1024
1024
  var _;
1025
- const f = s.isOptionDisabled(u), b = ((_ = m.value) == null ? void 0 : _.includes(u.value)) || !1;
1025
+ const f = s.isOptionDisabled(u), b = ((_ = g.value) == null ? void 0 : _.includes(u.value)) || !1;
1026
1026
  return { isDisabled: f, isPreSelected: b };
1027
- }, D = p(() => {
1028
- if (s.searching && y)
1027
+ }, A = p(() => {
1028
+ if (s.searching && T)
1029
1029
  return s.items;
1030
- const u = T.value.filter((f) => {
1031
- const { isDisabled: b, isPreSelected: _ } = M(f);
1030
+ const u = N.value.filter((f) => {
1031
+ const { isDisabled: b, isPreSelected: _ } = D(f);
1032
1032
  return b && _ || !b;
1033
1033
  });
1034
1034
  return s.selectedValues.forEach((f) => {
1035
1035
  u.find((b) => b.value === f.value) || u.push(f);
1036
1036
  }), u;
1037
- }), A = p(
1037
+ }), P = p(
1038
1038
  () => {
1039
1039
  var u;
1040
- return (u = D.value) == null ? void 0 : u.filter((f) => {
1040
+ return (u = A.value) == null ? void 0 : u.filter((f) => {
1041
1041
  var b;
1042
- return f.items && y.value && s.searching ? f.items.filter(
1042
+ return f.items && T.value && s.searching ? f.items.filter(
1043
1043
  (E) => (s.selectedValues ?? []).includes(E.value)
1044
- ).length === f.items.length : (b = m.value) == null ? void 0 : b.includes(f.value);
1044
+ ).length === f.items.length : (b = g.value) == null ? void 0 : b.includes(f.value);
1045
1045
  });
1046
1046
  }
1047
- ), x = () => y.value && !s.searching ? T.value.length : s.items.length, $ = p(() => {
1047
+ ), L = () => T.value && !s.searching ? N.value.length : s.items.length, $ = p(() => {
1048
1048
  var _;
1049
- const u = D.value.length, f = x(), b = ((_ = A.value) == null ? void 0 : _.length) || 0;
1050
- return b === 0 ? n("selectAll", { total: u }) : b === f ? n("allSelected", { total: f }) : b <= f ? n("numberOfTotalSelected", { number: b, total: f }) : n("numbersSelected", { number: b });
1051
- }), k = (u) => {
1049
+ const u = A.value.length, f = L(), b = ((_ = P.value) == null ? void 0 : _.length) || 0;
1050
+ return b === 0 ? i("selectAll", { total: u }) : b === f ? i("allSelected", { total: f }) : b <= f ? i("numberOfTotalSelected", { number: b, total: f }) : i("numbersSelected", { number: b });
1051
+ }), C = (u) => {
1052
1052
  const f = (_) => {
1053
- const { isDisabled: E, isPreSelected: Z } = M(_);
1054
- return E && Z || !E;
1055
- }, b = u.filter(f).filter((_) => !m.value.includes(_.value));
1056
- o("select", [...s.selectedValues, ...b]);
1057
- }, h = (u) => {
1053
+ const { isDisabled: E, isPreSelected: Q } = D(_);
1054
+ return E && Q || !E;
1055
+ }, b = u.filter(f).filter((_) => !g.value.includes(_.value));
1056
+ a("select", [...s.selectedValues, ...b]);
1057
+ }, S = (u) => {
1058
1058
  const f = (E) => {
1059
- const { isDisabled: Z, isPreSelected: Je } = M(E);
1060
- return !(Z && Je);
1059
+ const { isDisabled: Q, isPreSelected: Qe } = D(E);
1060
+ return !(Q && Qe);
1061
1061
  }, b = u.filter(f).map(({ value: E }) => E), _ = s.selectedValues.filter((E) => !(b != null && b.includes(E.value)));
1062
- o("select", _);
1063
- }, C = () => {
1064
- k(T.value);
1062
+ a("select", _);
1063
+ }, Y = () => {
1064
+ C(N.value);
1065
1065
  }, U = () => {
1066
- h(T.value);
1067
- }, { isAllSelected: G, isIndeterminate: Q, toggleSelectAll: ye } = Ge(
1066
+ S(N.value);
1067
+ }, { isAllSelected: q, isIndeterminate: ve, toggleSelectAll: ye } = Ge(
1068
+ P,
1068
1069
  A,
1069
- D,
1070
- C,
1070
+ Y,
1071
1071
  U
1072
- ), Se = p(() => Q.value ? "mixed" : `${G.value}`), le = B(G.value), w = () => {
1073
- le.value = !le.value, ye(le.value);
1072
+ ), Se = p(() => ve.value ? "mixed" : `${q.value}`), G = B(q.value), ee = () => {
1073
+ G.value = !G.value, ye(G.value);
1074
1074
  };
1075
- ne(G, () => {
1076
- le.value = G.value;
1075
+ ne(q, () => {
1076
+ G.value = q.value;
1077
1077
  });
1078
- const de = (u) => {
1079
- k(u.items);
1078
+ const ze = (u) => {
1079
+ C(u.items);
1080
1080
  }, Ie = (u) => {
1081
- h(u.items);
1082
- }, ue = (u, f) => {
1081
+ S(u.items);
1082
+ }, de = (u, f) => {
1083
1083
  let b = !1;
1084
1084
  const _ = s.selectedValues.filter(({ value: E }) => f.value === E ? (b = !0, !1) : !0);
1085
- b || _.push(f), o(u, _);
1086
- }, ze = p(() => {
1087
- if (!y.value)
1085
+ b || _.push(f), a(u, _);
1086
+ }, Fe = p(() => {
1087
+ if (!T.value)
1088
1088
  return s.selectedValues;
1089
- const u = (E) => m.value.includes(E.value), f = (E) => !s.staticCategories && E.every((Z) => u(Z));
1089
+ const u = (E) => g.value.includes(E.value), f = (E) => !s.staticCategories && E.every((Q) => u(Q));
1090
1090
  return s.items.flatMap(
1091
1091
  (E) => E.items && !f(E.items) ? E.items : E
1092
1092
  ).filter((E) => E.items ? !0 : u(E));
1093
- }), Fe = p(() => {
1094
- var b, _, E, Z;
1095
- const u = ["automatic", "button"].includes(s.lazyLoadType), f = ((b = s.selectedValues) == null ? void 0 : b.length) > 0 && ((_ = A.value) == null ? void 0 : _.length) !== ((E = T.value) == null ? void 0 : E.length);
1096
- return u && s.hasMoreItems ? !!((Z = s.selectedValues) != null && Z.length) : f;
1093
+ }), Ve = p(() => {
1094
+ var b, _, E, Q;
1095
+ const u = ["automatic", "button"].includes(s.lazyLoadType), f = ((b = s.selectedValues) == null ? void 0 : b.length) > 0 && ((_ = P.value) == null ? void 0 : _.length) !== ((E = N.value) == null ? void 0 : E.length);
1096
+ return u && s.hasMoreItems ? !!((Q = s.selectedValues) != null && Q.length) : f;
1097
1097
  }), Ae = p(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), he = B([]), ke = async () => {
1098
- await Me(), S.value && (he.value = Array.from(
1099
- S.value.querySelectorAll('[role="option"]')
1098
+ await Me(), l.value && (he.value = Array.from(
1099
+ l.value.querySelectorAll('[role="option"]')
1100
1100
  ).filter((u) => u.checkVisibility()));
1101
- }, Ve = (u) => {
1101
+ }, Ke = (u) => {
1102
1102
  var f;
1103
1103
  (f = he.value[u]) == null || f.focus();
1104
1104
  }, {
1105
- moveToNextElement: Ke,
1106
- moveToPreviousElement: We,
1107
- moveToFirstElement: qe,
1108
- moveToLastElement: He,
1105
+ moveToNextElement: We,
1106
+ moveToPreviousElement: qe,
1107
+ moveToFirstElement: He,
1108
+ moveToLastElement: je,
1109
1109
  preventDefault: Le,
1110
- focusedIndex: $e
1110
+ focusedIndex: $e,
1111
+ setListboxFocusedIndex: Xe
1111
1112
  } = we(
1112
1113
  {
1113
1114
  items: he
1114
1115
  },
1115
- Ve
1116
- ), je = {
1117
- [V.ARROW_UP]: (u) => We(u),
1118
- [V.ARROW_DOWN]: (u) => Ke(u),
1119
- [V.HOME]: qe,
1120
- [V.END]: He
1121
- }, Xe = {
1116
+ Ke
1117
+ ), Je = {
1118
+ [V.ARROW_UP]: (u) => qe(u),
1119
+ [V.ARROW_DOWN]: (u) => We(u),
1120
+ [V.HOME]: He,
1121
+ [V.END]: je
1122
+ };
1123
+ t({
1124
+ /**
1125
+ * Method to set the index of the item to be focused on
1126
+ * Used for focus management to be kept in-sync with parent e.g. dropdowns
1127
+ */
1128
+ setListboxFocusedIndex: Xe
1129
+ });
1130
+ const Ze = {
1122
1131
  [V.ARROW_UP]: Le,
1123
1132
  [V.ARROW_DOWN]: Le
1124
1133
  };
@@ -1130,50 +1139,50 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
1130
1139
  { immediate: !0 }
1131
1140
  ), (u, f) => (d(), O("div", {
1132
1141
  ref_key: "listboxRef",
1133
- ref: S,
1142
+ ref: l,
1134
1143
  class: "b-listbox-multi-select"
1135
1144
  }, [
1136
- Fe.value ? (d(), O("div", Wt, [
1137
- re((d(), O("ul", Y({ class: "b-listbox-multi-select__chips" }, te(Xe, !0)), [
1138
- (d(!0), O(se, null, q(ze.value, (b) => (d(), O("li", {
1145
+ Ve.value ? (d(), O("div", Ht, [
1146
+ re((d(), O("ul", w({ class: "b-listbox-multi-select__chips" }, se(Ze, !0)), [
1147
+ (d(!0), O(le, null, H(Fe.value, (b) => (d(), O("li", {
1139
1148
  key: b.value
1140
1149
  }, [
1141
- P(N(it), {
1150
+ x(M(at), {
1142
1151
  ref_for: !0,
1143
1152
  ref_key: "selectedListboxItemsRef",
1144
- ref: c,
1153
+ ref: o,
1145
1154
  disabled: u.isOptionDisabled(b),
1146
1155
  label: b.label,
1147
1156
  condensed: "",
1148
- onClick: (_) => b.items ? Ie(b) : ue("select", b)
1157
+ onClick: (_) => b.items ? Ie(b) : de("select", b)
1149
1158
  }, null, 8, ["disabled", "label", "onClick"])
1150
1159
  ]))), 128))
1151
1160
  ], 16)), [
1152
- [N(pe)]
1161
+ [M(pe)]
1153
1162
  ]),
1154
1163
  f[4] || (f[4] = z("hr", {
1155
1164
  class: "b-listbox-multi-select__divider",
1156
1165
  "aria-hidden": "true"
1157
1166
  }, null, -1))
1158
- ])) : X("", !0),
1159
- re((d(), O("div", Y(g.value, { role: "listbox" }, te(je, !0)), [
1160
- Ae.value ? (d(), R(N(ge), {
1167
+ ])) : J("", !0),
1168
+ re((d(), O("div", w(h.value, { role: "listbox" }, se(Je, !0)), [
1169
+ Ae.value ? (d(), R(M(ge), {
1161
1170
  key: 0,
1162
1171
  ref_key: "selectAllListboxItemsRef",
1163
- ref: i,
1172
+ ref: r,
1164
1173
  class: "b-listbox-multi-select__option",
1165
- tabindex: N($e) === 0 ? 0 : -1,
1174
+ tabindex: M($e) === 0 ? 0 : -1,
1166
1175
  "aria-checked": Se.value,
1167
- onClick: w,
1168
- onEnterPressed: w,
1169
- onSpacePressed: ae(w, ["prevent"])
1176
+ onClick: ee,
1177
+ onEnterPressed: ee,
1178
+ onSpacePressed: ae(ee, ["prevent"])
1170
1179
  }, {
1171
1180
  default: I(() => [
1172
- P(N(Te), {
1173
- checked: N(G),
1174
- indeterminate: N(Q)
1181
+ x(M(Te), {
1182
+ checked: M(q),
1183
+ indeterminate: M(ve)
1175
1184
  }, null, 8, ["checked", "indeterminate"]),
1176
- P(N(ce), { el: "span" }, {
1185
+ x(M(ce), { el: "span" }, {
1177
1186
  default: I(() => [
1178
1187
  K(F($.value), 1)
1179
1188
  ]),
@@ -1181,39 +1190,39 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
1181
1190
  })
1182
1191
  ]),
1183
1192
  _: 1
1184
- }, 8, ["tabindex", "aria-checked"])) : X("", !0),
1185
- Ae.value ? (d(), O("hr", qt)) : X("", !0),
1186
- P(N(Vt), {
1193
+ }, 8, ["tabindex", "aria-checked"])) : J("", !0),
1194
+ Ae.value ? (d(), O("hr", jt)) : J("", !0),
1195
+ x(M(Wt), {
1187
1196
  ref_key: "listboxItemsRef",
1188
- ref: l,
1197
+ ref: y,
1189
1198
  items: u.items,
1190
1199
  "is-option-disabled": u.isOptionDisabled,
1191
- "is-multi-level": N(y),
1200
+ "is-multi-level": M(T),
1192
1201
  "static-categories": u.staticCategories,
1193
1202
  searching: u.searching,
1194
- "selected-items-list": m.value,
1195
- "focused-index": N($e),
1196
- onToggleCheckboxSelection: f[0] || (f[0] = (b) => ue("select", b)),
1197
- onSelectCategory: de,
1203
+ "selected-items-list": g.value,
1204
+ "focused-index": M($e),
1205
+ onToggleCheckboxSelection: f[0] || (f[0] = (b) => de("select", b)),
1206
+ onSelectCategory: ze,
1198
1207
  onUnselectCategory: Ie,
1199
1208
  onToggleCategoryVisibility: ke,
1200
- onSpacePressed: f[1] || (f[1] = (b) => ue(N(v).SPACE, b)),
1201
- onTabPressed: f[2] || (f[2] = (b) => ue(N(v).TAB, b)),
1202
- onEnterPressed: f[3] || (f[3] = (b) => ue(N(v).ENTER, b))
1203
- }, me({ _: 2 }, [
1204
- q(N(a), (b, _) => ({
1209
+ onSpacePressed: f[1] || (f[1] = (b) => de(M(v).SPACE, b)),
1210
+ onTabPressed: f[2] || (f[2] = (b) => de(M(v).TAB, b)),
1211
+ onEnterPressed: f[3] || (f[3] = (b) => de(M(v).ENTER, b))
1212
+ }, be({ _: 2 }, [
1213
+ H(M(c), (b, _) => ({
1205
1214
  name: _,
1206
1215
  fn: I((E) => [
1207
- W(u.$slots, _, ie(be(E)), void 0, !0)
1216
+ W(u.$slots, _, ie(ue(E)), void 0, !0)
1208
1217
  ])
1209
1218
  }))
1210
1219
  ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index"])
1211
1220
  ], 16)), [
1212
- [N(pe)]
1221
+ [M(pe)]
1213
1222
  ])
1214
1223
  ], 512));
1215
1224
  }
1216
- }), Re = /* @__PURE__ */ H(jt, [["__scopeId", "data-v-5a19f9fe"]]), Ne = {
1225
+ }), Re = /* @__PURE__ */ j(Jt, [["__scopeId", "data-v-2a854443"]]), Ne = {
1217
1226
  "en-US": {
1218
1227
  loading: "Loading",
1219
1228
  showMore: "Show more"
@@ -1226,15 +1235,15 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
1226
1235
  loading: "Carregando",
1227
1236
  showMore: "Mostrar mais"
1228
1237
  }
1229
- }, Xt = 36, Jt = J({
1238
+ }, Zt = 36, Qt = Z({
1230
1239
  name: "bento-listbox",
1231
1240
  components: {
1232
- BentoEmptyState: lt,
1233
- BentoListboxSingleSelect: $t,
1241
+ BentoEmptyState: it,
1242
+ BentoListboxSingleSelect: Bt,
1234
1243
  BentoListboxMultiSelect: Re,
1235
1244
  BentoTypography: ce,
1236
- BentoLoadingIndicator: st,
1237
- BentoLoadingButton: dt
1245
+ BentoLoadingIndicator: ot,
1246
+ BentoLoadingButton: bt
1238
1247
  },
1239
1248
  directives: { BentoKeyboardNavigationDirective: pe },
1240
1249
  i18n: { messages: Ne },
@@ -1345,124 +1354,124 @@ const Vt = /* @__PURE__ */ H(Yt, [["render", Ft], ["__scopeId", "data-v-e26ceb2d
1345
1354
  v.ESCAPE,
1346
1355
  v.TAB
1347
1356
  ],
1348
- setup(e, { emit: t, slots: s }) {
1349
- const o = B([]), n = _e(e, "items"), { t: a } = Oe({ messages: Ne }), r = p(() => e.lazyLoadType !== oe.AUTOMATIC), g = p(() => e.lazyLoadType === oe.AUTOMATIC), S = () => {
1350
- var w;
1351
- return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((w = e == null ? void 0 : e.virtualScroll) != null && w.itemHeight) ? e.virtualScroll.itemHeight : Xt;
1357
+ setup(e, { emit: t, slots: n }) {
1358
+ const s = B([]), a = _e(e, "items"), { t: i } = Oe({ messages: Ne }), c = p(() => e.lazyLoadType !== oe.AUTOMATIC), m = p(() => e.lazyLoadType === oe.AUTOMATIC), h = () => {
1359
+ var G;
1360
+ return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((G = e == null ? void 0 : e.virtualScroll) != null && G.itemHeight) ? e.virtualScroll.itemHeight : Zt;
1352
1361
  }, {
1353
- containerRef: i,
1354
- containerProps: c,
1355
- onScroll: l,
1356
- list: m,
1357
- wrapperProps: y
1358
- } = bt(n, {
1359
- itemHeight: S(),
1362
+ containerRef: l,
1363
+ containerProps: r,
1364
+ onScroll: o,
1365
+ list: y,
1366
+ wrapperProps: g
1367
+ } = vt(a, {
1368
+ itemHeight: h(),
1360
1369
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1361
1370
  disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1362
1371
  }), T = p(
1363
- () => e.componentLoading !== void 0 || r.value ? "true" : void 0
1364
- ), M = p(
1365
- () => r.value && e.loading || e.componentLoading ? "true" : "false"
1372
+ () => e.componentLoading !== void 0 || c.value ? "true" : void 0
1373
+ ), N = p(
1374
+ () => c.value && e.loading || e.componentLoading ? "true" : "false"
1366
1375
  ), D = p(
1367
- () => r.value || e.componentLoading !== void 0 ? "polite" : void 0
1376
+ () => c.value || e.componentLoading !== void 0 ? "polite" : void 0
1368
1377
  ), A = p(
1369
1378
  () => ({
1370
1379
  "aria-label": e.ariaLabel,
1371
- "aria-busy": M.value,
1380
+ "aria-busy": N.value,
1372
1381
  "aria-atomic": T.value,
1373
1382
  "aria-live": D.value
1374
1383
  })
1375
- ), x = p(
1384
+ ), P = p(
1376
1385
  () => e.componentLoading ? {
1377
1386
  ...A.value,
1378
1387
  role: "alert"
1379
1388
  } : {}
1380
- ), $ = (w) => (de) => {
1381
- t(w, de);
1382
- }, k = () => {
1389
+ ), L = (G) => (ee) => {
1390
+ t(G, ee);
1391
+ }, $ = () => {
1383
1392
  t(v.SHOW_MORE);
1384
- }, h = ot(() => {
1385
- const w = i.value;
1386
- if (!w)
1393
+ }, C = nt(() => {
1394
+ const G = l.value;
1395
+ if (!G)
1387
1396
  return;
1388
- const de = Math.round(w.scrollTop) + w.clientHeight >= w.scrollHeight;
1389
- e.hasMoreItems && de && !e.loading && k();
1390
- }), C = () => {
1391
- g.value ? h() : l();
1392
- }, U = p(() => {
1393
- var w;
1394
- return ((w = e.items) == null ? void 0 : w.length) === 0;
1395
- }), G = p(
1397
+ const ee = Math.round(G.scrollTop) + G.clientHeight >= G.scrollHeight;
1398
+ e.hasMoreItems && ee && !e.loading && $();
1399
+ }), S = () => {
1400
+ m.value ? C() : o();
1401
+ }, Y = p(() => {
1402
+ var G;
1403
+ return ((G = e.items) == null ? void 0 : G.length) === 0;
1404
+ }), U = p(
1396
1405
  () => e.lazyLoadType === oe.BUTTON && e.hasMoreItems
1397
- ), Q = p(
1406
+ ), q = p(
1398
1407
  () => e.loading ? De.LOADING : De.START
1399
- ), ye = p(() => e.loading ? a("loading") : a("showMore")), Se = p(() => ({
1408
+ ), ve = p(() => e.loading ? i("loading") : i("showMore")), ye = p(() => ({
1400
1409
  ...e.emptyState,
1401
1410
  variant: "condensed"
1402
- })), le = {
1403
- [v.SELECT]: $(v.SELECT),
1404
- [v.SPACE]: $(v.SPACE),
1405
- [v.TAB]: $(v.TAB),
1406
- [v.ENTER]: $(v.ENTER)
1411
+ })), Se = {
1412
+ [v.SELECT]: L(v.SELECT),
1413
+ [v.SPACE]: L(v.SPACE),
1414
+ [v.TAB]: L(v.TAB),
1415
+ [v.ENTER]: L(v.ENTER)
1407
1416
  };
1408
1417
  return {
1409
1418
  // Refs
1410
- listboxRef: i,
1411
- listboxItemRef: o,
1419
+ listboxRef: l,
1420
+ listboxItemRef: s,
1412
1421
  // a11y
1413
1422
  ariaAttributes: A,
1414
- listboxContainerAttributes: x,
1423
+ listboxContainerAttributes: P,
1415
1424
  // Values
1416
- containerProps: c,
1417
- isSearchResultEmpty: U,
1418
- limitedEmptyStateProps: Se,
1419
- loadingButtonState: Q,
1420
- slots: s,
1421
- shouldDisplayShowMoreButton: G,
1422
- showMoreButtonText: ye,
1423
- virtualisedItems: m,
1424
- wrapperProps: y,
1425
+ containerProps: r,
1426
+ isSearchResultEmpty: Y,
1427
+ limitedEmptyStateProps: ye,
1428
+ loadingButtonState: q,
1429
+ slots: n,
1430
+ shouldDisplayShowMoreButton: U,
1431
+ showMoreButtonText: ve,
1432
+ virtualisedItems: y,
1433
+ wrapperProps: g,
1425
1434
  // Enums
1426
1435
  BentoKeyboardNavigationKeyDownEvent: V,
1427
1436
  BentoListboxEvent: v,
1428
1437
  // Methods
1429
- onListboxContainerScroll: C,
1430
- onOptionSelected: $,
1431
- emitShowMore: k,
1432
- listboxListeners: le
1438
+ onListboxContainerScroll: S,
1439
+ onOptionSelected: L,
1440
+ emitShowMore: $,
1441
+ listboxListeners: Se
1433
1442
  };
1434
1443
  }
1435
- }), Zt = ["id"], Qt = {
1444
+ }), es = ["id"], ts = {
1436
1445
  key: 0,
1437
1446
  class: "b-listbox__loading-filtered-items"
1438
- }, es = {
1447
+ }, ss = {
1439
1448
  key: 1,
1440
1449
  class: "b-listbox__empty-search-message"
1441
- }, ts = {
1450
+ }, ls = {
1442
1451
  key: 2,
1443
1452
  class: "b-listbox__lazy-load"
1444
- }, ss = {
1453
+ }, os = {
1445
1454
  key: 3,
1446
1455
  class: "b-listbox__lazy-load"
1447
1456
  };
1448
- function ls(e, t, s, o, n, a) {
1449
- var y;
1450
- const r = L("bento-loading-indicator"), g = L("bento-empty-state"), S = L("bento-typography"), i = L("bento-listbox-multi-select"), c = L("bento-listbox-single-select"), l = L("bento-loading-button"), m = xe("bento-keyboard-navigation-directive");
1451
- return re((d(), O("div", Y({
1457
+ function is(e, t, n, s, a, i) {
1458
+ var g;
1459
+ const c = k("bento-loading-indicator"), m = k("bento-empty-state"), h = k("bento-typography"), l = k("bento-listbox-multi-select"), r = k("bento-listbox-single-select"), o = k("bento-loading-button"), y = xe("bento-keyboard-navigation-directive");
1460
+ return re((d(), O("div", w({
1452
1461
  id: e.id,
1453
1462
  ref: "listboxRef",
1454
1463
  class: "b-listbox",
1455
1464
  tabindex: "-1"
1456
1465
  }, e.listboxContainerAttributes, {
1457
- style: (y = e.containerProps) == null ? void 0 : y.style,
1466
+ style: (g = e.containerProps) == null ? void 0 : g.style,
1458
1467
  "data-testid": "listbox-container",
1459
1468
  onScroll: t[0] || (t[0] = (...T) => e.onListboxContainerScroll && e.onListboxContainerScroll(...T))
1460
1469
  }), [
1461
- z("div", ie(be(e.wrapperProps)), [
1462
- e.componentLoading ? (d(), O("div", Qt, [
1463
- P(r)
1464
- ])) : e.isSearchResultEmpty ? (d(), O("div", es, [
1465
- e.emptyState ? (d(), R(g, ie(Y({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), R(S, {
1470
+ z("div", ie(ue(e.wrapperProps)), [
1471
+ e.componentLoading ? (d(), O("div", ts, [
1472
+ x(c)
1473
+ ])) : e.isSearchResultEmpty ? (d(), O("div", ss, [
1474
+ e.emptyState ? (d(), R(m, ie(w({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), R(h, {
1466
1475
  key: 1,
1467
1476
  el: "span"
1468
1477
  }, {
@@ -1471,8 +1480,8 @@ function ls(e, t, s, o, n, a) {
1471
1480
  ]),
1472
1481
  _: 1
1473
1482
  }))
1474
- ])) : (d(), O(se, { key: 2 }, [
1475
- e.multiple ? (d(), R(i, Y({
1483
+ ])) : (d(), O(le, { key: 2 }, [
1484
+ e.multiple ? (d(), R(l, w({
1476
1485
  key: 0,
1477
1486
  ref: "listboxItemRef",
1478
1487
  "has-more-items": e.hasMoreItems
@@ -1483,14 +1492,14 @@ function ls(e, t, s, o, n, a) {
1483
1492
  "selected-values": e.selectedValue,
1484
1493
  searching: e.searching,
1485
1494
  "is-option-disabled": e.isOptionDisabled
1486
- }, te(e.listboxListeners)), me({ _: 2 }, [
1487
- q(e.slots, (T, M) => ({
1488
- name: M,
1495
+ }, se(e.listboxListeners)), be({ _: 2 }, [
1496
+ H(e.slots, (T, N) => ({
1497
+ name: N,
1489
1498
  fn: I((D) => [
1490
- W(e.$slots, M, ie(be(D)), void 0, !0)
1499
+ W(e.$slots, N, ie(ue(D)), void 0, !0)
1491
1500
  ])
1492
1501
  }))
1493
- ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), R(c, Y({
1502
+ ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), R(r, w({
1494
1503
  key: 1,
1495
1504
  ref: "listboxItemRef",
1496
1505
  items: e.virtualisedItems
@@ -1498,16 +1507,16 @@ function ls(e, t, s, o, n, a) {
1498
1507
  "selected-value": e.selectedValue,
1499
1508
  "static-categories": e.staticCategories,
1500
1509
  "is-option-disabled": e.isOptionDisabled
1501
- }, te(e.listboxListeners)), me({ _: 2 }, [
1502
- q(e.slots, (T, M) => ({
1503
- name: M,
1510
+ }, se(e.listboxListeners)), be({ _: 2 }, [
1511
+ H(e.slots, (T, N) => ({
1512
+ name: N,
1504
1513
  fn: I((D) => [
1505
- W(e.$slots, M, ie(be(D)), void 0, !0)
1514
+ W(e.$slots, N, ie(ue(D)), void 0, !0)
1506
1515
  ])
1507
1516
  }))
1508
1517
  ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1509
- e.shouldDisplayShowMoreButton ? (d(), O("div", ts, [
1510
- P(l, {
1518
+ e.shouldDisplayShowMoreButton ? (d(), O("div", ls, [
1519
+ x(o, {
1511
1520
  state: e.loadingButtonState,
1512
1521
  variant: "secondary",
1513
1522
  onClickCapture: e.emitShowMore
@@ -1517,75 +1526,75 @@ function ls(e, t, s, o, n, a) {
1517
1526
  ]),
1518
1527
  _: 1
1519
1528
  }, 8, ["state", "onClickCapture"])
1520
- ])) : e.loading ? (d(), O("div", ss, [
1521
- P(r)
1522
- ])) : X("", !0)
1529
+ ])) : e.loading ? (d(), O("div", os, [
1530
+ x(c)
1531
+ ])) : J("", !0)
1523
1532
  ], 64))
1524
1533
  ], 16)
1525
- ], 16, Zt)), [
1526
- [m]
1534
+ ], 16, es)), [
1535
+ [y]
1527
1536
  ]);
1528
1537
  }
1529
- const Es = /* @__PURE__ */ H(Jt, [["render", ls], ["__scopeId", "data-v-c9aaa0e3"]]), Ee = (e, t) => {
1530
- for (const s of e) {
1531
- if (s.value === t)
1532
- return s;
1533
- if (s.items) {
1534
- const o = Ee(s.items, t);
1535
- if (o)
1536
- return o;
1538
+ const Os = /* @__PURE__ */ j(Qt, [["render", is], ["__scopeId", "data-v-c9aaa0e3"]]), Ee = (e, t) => {
1539
+ for (const n of e) {
1540
+ if (n.value === t)
1541
+ return n;
1542
+ if (n.items) {
1543
+ const s = Ee(n.items, t);
1544
+ if (s)
1545
+ return s;
1537
1546
  }
1538
1547
  }
1539
1548
  return null;
1540
- }, os = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, _s = (e, t, s, o) => {
1541
- const n = B([]), a = B(), r = (c) => {
1542
- s.value ? a.value = c.map(({ value: l }) => l) : a.value = c.length > 0 ? c[0].value : null;
1543
- }, g = (c) => {
1544
- s.value ? a.value = c.map(({ value: l, label: m }) => ({ value: l, label: m })) : a.value = c.length > 0 ? { value: c[0].value, label: c[0].label } : null;
1545
- }, S = (c) => {
1546
- n.value = c, o != null && o.value ? g(c) : r(c);
1547
- }, i = () => {
1548
- n.value = [], a.value = null;
1549
+ }, ns = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, Ts = (e, t, n, s) => {
1550
+ const a = B([]), i = B(), c = (r) => {
1551
+ n.value ? i.value = r.map(({ value: o }) => o) : i.value = r.length > 0 ? r[0].value : null;
1552
+ }, m = (r) => {
1553
+ n.value ? i.value = r.map(({ value: o, label: y }) => ({ value: o, label: y })) : i.value = r.length > 0 ? { value: r[0].value, label: r[0].label } : null;
1554
+ }, h = (r) => {
1555
+ a.value = r, s != null && s.value ? m(r) : c(r);
1556
+ }, l = () => {
1557
+ a.value = [], i.value = null;
1549
1558
  };
1550
1559
  return ne(
1551
1560
  () => t.value,
1552
1561
  () => {
1553
1562
  if (!t.value && t.value !== 0) {
1554
- i();
1563
+ l();
1555
1564
  return;
1556
1565
  }
1557
- const c = !Array.isArray(t.value), l = [...n.value];
1558
- i();
1559
- const m = (y) => {
1560
- if (os(y))
1561
- n.value.push(y);
1566
+ const r = !Array.isArray(t.value), o = [...a.value];
1567
+ l();
1568
+ const y = (g) => {
1569
+ if (ns(g))
1570
+ a.value.push(g);
1562
1571
  else {
1563
- let T = Ee(e.value, y);
1564
- T || (T = Ee(l, y)), T || (T = { value: y, label: y.toString() }), n.value.push(T);
1572
+ let T = Ee(e.value, g);
1573
+ T || (T = Ee(o, g)), T || (T = { value: g, label: g.toString() }), a.value.push(T);
1565
1574
  }
1566
1575
  };
1567
- if (c) {
1568
- const y = t.value;
1569
- m(y), o != null && o.value ? g(n.value) : r(n.value);
1576
+ if (r) {
1577
+ const g = t.value;
1578
+ y(g), s != null && s.value ? m(a.value) : c(a.value);
1570
1579
  return;
1571
1580
  }
1572
- t.value.forEach(m), o != null && o.value ? g(n.value) : r(n.value);
1581
+ t.value.forEach(y), s != null && s.value ? m(a.value) : c(a.value);
1573
1582
  },
1574
1583
  { immediate: !0 }
1575
1584
  ), {
1576
1585
  // Values
1577
- cachedSelectedListboxOptions: n,
1578
- cachedListboxSelectedValues: a,
1586
+ cachedSelectedListboxOptions: a,
1587
+ cachedListboxSelectedValues: i,
1579
1588
  // Methods
1580
- resetCache: i,
1581
- setCachedValues: S
1589
+ resetCache: l,
1590
+ setCachedValues: h
1582
1591
  };
1583
1592
  };
1584
1593
  export {
1585
1594
  oe as B,
1586
1595
  v as a,
1587
- Es as b,
1588
- _s as c,
1589
- Kt as u
1596
+ Os as b,
1597
+ Ts as c,
1598
+ qt as u
1590
1599
  };
1591
- //# sourceMappingURL=use-cached-selected-values.CatIU1_1.js.map
1600
+ //# sourceMappingURL=use-cached-selected-values.CEwKqYIe.js.map