@adyen/bento-vue2 1.65.0 → 1.66.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 (181) hide show
  1. package/dist/@types/index.d.ts +416 -234
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/copy.css +1 -1
  9. package/dist/assets/data-grid-template.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header.css +1 -1
  17. package/dist/assets/info-icon.css +1 -1
  18. package/dist/assets/input-field-password.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/pagination.css +1 -1
  23. package/dist/assets/popover.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/step.css +1 -1
  26. package/dist/assets/summary-grid.css +1 -1
  27. package/dist/assets/tab.css +1 -0
  28. package/dist/assets/textarea.css +1 -1
  29. package/dist/assets/use-cached-selected-values.css +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.C8zeHAJG.js} +31 -31
  32. package/dist/chunks/action-bar.C8zeHAJG.js.map +1 -0
  33. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js +83 -0
  34. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js.map +1 -0
  35. package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
  36. package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
  37. package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
  38. package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
  39. package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
  40. package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
  41. package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.BcoVTIs2.js} +3 -3
  42. package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.BcoVTIs2.js.map} +1 -1
  43. package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
  44. package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
  45. package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
  46. package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
  47. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.CcEIwDqX.js} +3 -3
  48. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.CcEIwDqX.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.DJQcVuPs.js} +16 -14
  50. package/dist/chunks/data-grid-template.DJQcVuPs.js.map +1 -0
  51. package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.t4fCoE2Y.js} +10 -10
  52. package/dist/chunks/{data-grid.D4oeTUhn.js.map → data-grid.t4fCoE2Y.js.map} +1 -1
  53. package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.DOAWsba5.js} +6 -7
  54. package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.DOAWsba5.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.DYxZygbL.js} +22 -23
  56. package/dist/chunks/{date-range-picker.D9lyIoO-.js.map → date-range-picker.DYxZygbL.js.map} +1 -1
  57. package/dist/chunks/date.BfyWX2PY.js +160 -0
  58. package/dist/chunks/date.BfyWX2PY.js.map +1 -0
  59. package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYg5l6HT.js} +2 -2
  60. package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYg5l6HT.js.map} +1 -1
  61. package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.BWsU98dn.js} +265 -270
  62. package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.BWsU98dn.js.map} +1 -1
  63. package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
  64. package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
  65. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  66. package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
  67. package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
  68. package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.Bx3wivl8.js} +664 -649
  69. package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.Bx3wivl8.js.map} +1 -1
  70. package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
  71. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
  72. package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.B6mwBJjk.js} +13 -13
  73. package/dist/chunks/{header-with-views.Ds9mcwmp.js.map → header-with-views.B6mwBJjk.js.map} +1 -1
  74. package/dist/chunks/{header.Cb644uAi.js → header.hTMmMN8n.js} +25 -24
  75. package/dist/chunks/{header.Cb644uAi.js.map → header.hTMmMN8n.js.map} +1 -1
  76. package/dist/chunks/index.BrH1t1iu.js +407 -0
  77. package/dist/chunks/index.BrH1t1iu.js.map +1 -0
  78. package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
  79. package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
  80. package/dist/chunks/input-field-password.B8qWGzaB.js +252 -0
  81. package/dist/chunks/input-field-password.B8qWGzaB.js.map +1 -0
  82. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Bi4TJhbX.js} +3 -3
  83. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Bi4TJhbX.js.map} +1 -1
  84. package/dist/chunks/{input-field.B_3nZFYz.js → input-field.L5bWjTpB.js} +3 -3
  85. package/dist/chunks/{input-field.B_3nZFYz.js.map → input-field.L5bWjTpB.js.map} +1 -1
  86. package/dist/chunks/{pagination.Cl7SzoId.js → pagination.CW_1yX5C.js} +115 -115
  87. package/dist/chunks/pagination.CW_1yX5C.js.map +1 -0
  88. package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
  89. package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
  90. package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.BpaFd2-y.js} +3 -3
  91. package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.BpaFd2-y.js.map} +1 -1
  92. package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.5JHI6li0.js} +3 -3
  93. package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.5JHI6li0.js.map} +1 -1
  94. package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.D4hrWvf7.js} +2 -2
  95. package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.D4hrWvf7.js.map} +1 -1
  96. package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
  97. package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
  98. package/dist/chunks/step.DMMofD4B.js +217 -0
  99. package/dist/chunks/step.DMMofD4B.js.map +1 -0
  100. package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
  101. package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
  102. package/dist/chunks/summary-grid.types.Cwri2Y3T.js +337 -0
  103. package/dist/chunks/summary-grid.types.Cwri2Y3T.js.map +1 -0
  104. package/dist/chunks/tab.BhWPBxcB.js +192 -0
  105. package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
  106. package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
  107. package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
  108. package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
  109. package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
  110. package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.DK2d00rt.js} +10 -11
  111. package/dist/chunks/timeline-item.DK2d00rt.js.map +1 -0
  112. package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.CusB5KBl.js} +568 -528
  113. package/dist/chunks/use-cached-selected-values.CusB5KBl.js.map +1 -0
  114. package/dist/code-snippet.js +1 -1
  115. package/dist/dashboard-template.js +1 -1
  116. package/dist/data-grid-template.js +1 -1
  117. package/dist/data-grid.js +1 -1
  118. package/dist/date-picker.js +2 -2
  119. package/dist/date-range-picker.js +2 -2
  120. package/dist/date.js +1 -1
  121. package/dist/dropdown.js +3 -3
  122. package/dist/file-uploader.js +1 -1
  123. package/dist/filter-bar.js +1 -1
  124. package/dist/header-with-views.js +1 -1
  125. package/dist/header.js +1 -1
  126. package/dist/index.js +34 -34
  127. package/dist/info-icon.js +1 -1
  128. package/dist/input-field-password.js +1 -1
  129. package/dist/input-field-phone-number.js +1 -1
  130. package/dist/input-field.js +1 -1
  131. package/dist/internal.js +6 -6
  132. package/dist/pagination.js +1 -1
  133. package/dist/radio-group.js +1 -1
  134. package/dist/rich-text-editor.js +1 -1
  135. package/dist/search-bar.js +2 -2
  136. package/dist/secondary-nav.js +1 -1
  137. package/dist/selection-card.js +1 -1
  138. package/dist/stepper.js +1 -1
  139. package/dist/structured-list.js +1 -1
  140. package/dist/styles/bento-dark.css +1 -0
  141. package/dist/styles/bento-light.css +1 -0
  142. package/dist/styles/bento.css +1 -0
  143. package/dist/styles/legacy.css +1 -0
  144. package/dist/styles/styleguide.css +1 -0
  145. package/dist/summary-grid.js +1 -1
  146. package/dist/tabs.js +1 -1
  147. package/dist/textarea.js +1 -1
  148. package/dist/timeline.js +1 -1
  149. package/dist/web-types.json +197 -79
  150. package/package.json +5 -5
  151. package/dist/assets/tabs.css +0 -1
  152. package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
  153. package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
  154. package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
  155. package/dist/chunks/calendar.DbTC35rM.js +0 -1167
  156. package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
  157. package/dist/chunks/copy.CXeLbvUP.js +0 -129
  158. package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
  159. package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
  160. package/dist/chunks/date.dYFFEunA.js +0 -987
  161. package/dist/chunks/date.dYFFEunA.js.map +0 -1
  162. package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
  163. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  164. package/dist/chunks/index.BDuTpjD8.js +0 -40
  165. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  166. package/dist/chunks/index.DD7TppDb.js +0 -10
  167. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  168. package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
  169. package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
  170. package/dist/chunks/input-field-password.Bloa-rqx.js +0 -252
  171. package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
  172. package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
  173. package/dist/chunks/step.dNTg2rtW.js +0 -217
  174. package/dist/chunks/step.dNTg2rtW.js.map +0 -1
  175. package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
  176. package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
  177. package/dist/chunks/tabs.Dx6teJGW.js +0 -205
  178. package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
  179. package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
  180. package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
  181. package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
@@ -1,115 +1,115 @@
1
- import { computed as o, ref as A, onMounted as Te, onUnmounted as Ae, watch as z, defineComponent as w, nextTick as fe, toRef as Q, useSlots as Ie, useAttrs as Le } from "vue";
1
+ import { computed as i, ref as E, onMounted as Ne, onUnmounted as $e, watch as q, defineComponent as w, nextTick as me, toRef as j, useSlots as Me, useAttrs as we } from "vue";
2
2
  import { B as W } from "./typography.J1v_SPG3.js";
3
- import { B as ke } from "./loading-indicator.z8COalOc.js";
4
- import { B as De } from "./empty-state.mtXfb1BB.js";
5
- import { u as ee } from "./i18n.BQkEbtPM.js";
6
- import { d as Re } from "./debounce.DUTu11PS.js";
3
+ import { B as Ge } from "./loading-indicator.z8COalOc.js";
4
+ import { B as Pe } from "./empty-state.mtXfb1BB.js";
5
+ import { u as se } from "./i18n.BQkEbtPM.js";
6
+ import { d as Fe } from "./debounce.DUTu11PS.js";
7
7
  import "./index.Cl4_42j5.js";
8
- import { B as Be } from "./chip.OV0EWIP3.js";
9
- import { C as j, N as $e } from "./minus-small.DJacLGTw.js";
10
- import { C as Ne } from "./checkmark-small.DVDtD4HQ.js";
11
- import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
- import { C as Me } from "./chevron-down.eYtgv5ly.js";
13
- import { C as we } from "./chevron-up.d8cwIlA_.js";
14
- import { B as $, a as te } from "./keyboard-navigation.pB8weElW.js";
15
- import { d as Ge, e as ue } from "./button-actions._OIvTdKt.js";
8
+ import { B as Ye } from "./chip.OV0EWIP3.js";
9
+ import { C as J, N as Ue } from "./minus-small.DJacLGTw.js";
10
+ import { C as ze } from "./checkmark-small.DVDtD4HQ.js";
11
+ import { n as $ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
+ import { C as Ve } from "./chevron-down.eYtgv5ly.js";
13
+ import { C as We } from "./chevron-up.d8cwIlA_.js";
14
+ import { B as N, a as le } from "./keyboard-navigation.pB8weElW.js";
15
+ import { d as Ke, e as be } from "./button-actions._OIvTdKt.js";
16
16
  /* empty css */
17
- import { o as Pe } from "./resize.Bqks3WUm.js";
17
+ import { o as je } from "./resize.Bqks3WUm.js";
18
18
  import "../assets/use-cached-selected-values.css";
19
- const ve = (s, e, l, t) => {
20
- const n = o(
19
+ const _e = (s, e, l, t) => {
20
+ const n = i(
21
21
  () => {
22
- var v, O;
23
- return !!((v = s.value) != null && v.length) && ((O = s.value) == null ? void 0 : O.length) === e.value.length;
22
+ var f, I;
23
+ return !!((f = s.value) != null && f.length) && ((I = s.value) == null ? void 0 : I.length) === e.value.length;
24
24
  }
25
- ), i = o(() => {
26
- var v;
27
- return s.value == null || s.value.length === 0 ? !1 : ((v = s.value) == null ? void 0 : v.length) !== e.value.length;
25
+ ), o = i(() => {
26
+ var f;
27
+ return s.value == null || s.value.length === 0 ? !1 : ((f = s.value) == null ? void 0 : f.length) !== e.value.length;
28
28
  });
29
29
  return {
30
30
  isAllSelected: n,
31
- isIndeterminate: i,
32
- toggleSelectAll: (v) => {
33
- v ? l() : t();
31
+ isIndeterminate: o,
32
+ toggleSelectAll: (f) => {
33
+ f ? l() : t();
34
34
  }
35
35
  };
36
36
  };
37
- function Fe(s, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: n }) {
38
- const i = A(null), c = A([]), v = A(0), O = A(0), d = A(0);
39
- let u;
40
- const T = o(() => {
41
- const C = typeof l == "number" ? s.value.length * l : s.value.reduce((E, S, m) => E + l(m), 0), I = typeof l == "number" ? v.value * l : s.value.slice(0, v.value).reduce((E, S, m) => E + l(m), 0);
37
+ function qe(s, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: n }) {
38
+ const o = E(null), r = E([]), f = E(0), I = E(0), d = E(0);
39
+ let b;
40
+ const O = i(() => {
41
+ const T = typeof l == "number" ? s.value.length * l : s.value.reduce((S, m, y) => S + l(y), 0), A = typeof l == "number" ? f.value * l : s.value.slice(0, f.value).reduce((S, m, y) => S + l(y), 0);
42
42
  return {
43
43
  style: {
44
- marginTop: `${I}px`,
45
- height: `${C - I}px`
44
+ marginTop: `${A}px`,
45
+ height: `${T - A}px`
46
46
  }
47
47
  };
48
- }), b = () => {
49
- const C = (n == null ? void 0 : n.value) ?? 0, I = Math.max(i.value.scrollTop - C, 0);
48
+ }), p = () => {
49
+ const T = (n == null ? void 0 : n.value) ?? 0, A = Math.max(o.value.scrollTop - T, 0);
50
50
  if (typeof l == "number")
51
- return Math.floor(I / l);
52
- let E = 0, S = 0;
53
- for (let m = 0; m < s.value.length; m += 1) {
54
- const p = l(m);
55
- if (E += p, E >= I) {
56
- S = m;
51
+ return Math.floor(A / l);
52
+ let S = 0, m = 0;
53
+ for (let y = 0; y < s.value.length; y += 1) {
54
+ const h = l(y);
55
+ if (S += h, S >= A) {
56
+ m = y;
57
57
  break;
58
58
  }
59
59
  }
60
- return S;
60
+ return m;
61
61
  }, g = () => {
62
- if (d.value = i.value.clientHeight, typeof l == "number")
62
+ if (d.value = o.value.clientHeight, typeof l == "number")
63
63
  return Math.ceil(d.value / l);
64
- const C = v.value ?? 0;
65
- let I = 0, E = 0;
66
- for (let S = C; S < s.value.length; S += 1) {
67
- const m = l(S);
68
- if (I += m, E = S, I > d.value)
64
+ const T = f.value ?? 0;
65
+ let A = 0, S = 0;
66
+ for (let m = T; m < s.value.length; m += 1) {
67
+ const y = l(m);
68
+ if (A += y, S = m, A > d.value)
69
69
  break;
70
70
  }
71
- return E - C;
72
- }, h = () => {
73
- if (i.value) {
74
- const C = g();
75
- v.value = b(), O.value = Math.min(v.value + C + t, s.value.length), c.value = s.value.slice(v.value, O.value);
71
+ return S - T;
72
+ }, C = () => {
73
+ if (o.value) {
74
+ const T = g();
75
+ f.value = p(), I.value = Math.min(f.value + T + t, s.value.length), r.value = s.value.slice(f.value, I.value);
76
76
  }
77
- }, B = () => {
78
- h();
77
+ }, D = () => {
78
+ C();
79
79
  };
80
- e || (Te(() => {
81
- i.value && (d.value = i.value.clientHeight, u = Pe(i.value, ({ clientHeight: C }) => {
82
- d.value = C, h();
83
- }), h());
84
- }), Ae(() => {
85
- u == null || u.disconnect();
86
- }), z(
80
+ e || (Ne(() => {
81
+ o.value && (d.value = o.value.clientHeight, b = je(o.value, ({ clientHeight: T }) => {
82
+ d.value = T, C();
83
+ }), C());
84
+ }), $e(() => {
85
+ b == null || b.disconnect();
86
+ }), q(
87
87
  () => s.value,
88
88
  () => {
89
- h();
89
+ C();
90
90
  }
91
91
  ));
92
92
  const L = {
93
- ref: i,
93
+ ref: o,
94
94
  style: { overflowY: "auto" }
95
95
  };
96
96
  return e ? {
97
- containerRef: i,
97
+ containerRef: o,
98
98
  containerProps: L,
99
99
  // eslint-disable-next-line @typescript-eslint/no-empty-function
100
100
  onScroll: () => {
101
101
  },
102
102
  list: s
103
103
  } : {
104
- containerRef: i,
104
+ containerRef: o,
105
105
  containerProps: L,
106
- onScroll: B,
107
- list: c,
108
- wrapperProps: T
106
+ onScroll: D,
107
+ list: r,
108
+ wrapperProps: O
109
109
  };
110
110
  }
111
- var a = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(a || {}), U = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(U || {});
112
- const Ye = w({
111
+ var c = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(c || {}), V = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(V || {});
112
+ const He = w({
113
113
  name: "bento-listbox-static-category",
114
114
  components: {
115
115
  BentoTypography: W
@@ -124,18 +124,18 @@ const Ye = w({
124
124
  }
125
125
  }
126
126
  });
127
- var Ue = function() {
127
+ var Xe = function() {
128
128
  var e = this, l = e._self._c;
129
129
  return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category" }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
130
- }, ze = [], We = /* @__PURE__ */ N(
131
- Ye,
132
- Ue,
133
- ze,
130
+ }, Je = [], Ze = /* @__PURE__ */ $(
131
+ He,
132
+ Xe,
133
+ Je,
134
134
  !1,
135
135
  null,
136
136
  "4aa8cc6e"
137
137
  );
138
- const Ke = We.exports, Ve = w({
138
+ const Qe = Ze.exports, et = w({
139
139
  name: "bento-listbox-option",
140
140
  props: {
141
141
  /**
@@ -147,29 +147,29 @@ const Ke = We.exports, Ve = w({
147
147
  */
148
148
  selected: { type: Boolean, default: !1 }
149
149
  },
150
- emits: [a.CLICK, a.ENTER, a.SPACE, a.TAB],
150
+ emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
151
151
  setup(s, { emit: e }) {
152
- const l = o(() => ({
152
+ const l = i(() => ({
153
153
  "b-listbox-option--disabled": s.disabled,
154
154
  "b-listbox-option--selected": s.selected
155
155
  }));
156
156
  return {
157
157
  // Enums
158
- BentoKeyboardNavigationKeyDownEvent: $,
159
- BentoListboxEvent: a,
158
+ BentoKeyboardNavigationKeyDownEvent: N,
159
+ BentoListboxEvent: c,
160
160
  // Values
161
161
  conditionalClasses: l,
162
162
  // Events
163
- onClick: (i) => {
164
- e(a.CLICK, i);
163
+ onClick: (o) => {
164
+ e(c.CLICK, o);
165
165
  },
166
- onOptionSelected: (i, c) => {
167
- e(i, c);
166
+ onOptionSelected: (o, r) => {
167
+ e(o, r);
168
168
  }
169
169
  };
170
170
  }
171
171
  });
172
- var qe = function() {
172
+ var tt = function() {
173
173
  var e = this, l = e._self._c;
174
174
  return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
175
175
  return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
@@ -178,38 +178,38 @@ var qe = function() {
178
178
  }, function(t) {
179
179
  return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
180
180
  }] } }, "div", e.$attrs, !1), [e._t("default")], 2);
181
- }, je = [], He = /* @__PURE__ */ N(
182
- Ve,
183
- qe,
184
- je,
181
+ }, st = [], lt = /* @__PURE__ */ $(
182
+ et,
183
+ tt,
184
+ st,
185
185
  !1,
186
186
  null,
187
187
  "a1e9ebff"
188
188
  );
189
- const H = He.exports;
190
- let de = 0;
191
- const Xe = {
189
+ const Z = lt.exports;
190
+ let fe = 0;
191
+ const nt = {
192
192
  beforeCreate() {
193
- this.uuid = de.toString(), de += 1;
193
+ this.uuid = fe.toString(), fe += 1;
194
194
  }
195
195
  };
196
- var Je = function() {
196
+ var ot = function() {
197
197
  var e = this, l = e._self._c;
198
198
  return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
199
- }, Ze = [], Qe = /* @__PURE__ */ N(
200
- Xe,
201
- Je,
202
- Ze,
199
+ }, it = [], at = /* @__PURE__ */ $(
200
+ nt,
201
+ ot,
202
+ it,
203
203
  !1,
204
204
  null,
205
205
  null
206
206
  );
207
- const et = Qe.exports, tt = w({
207
+ const ct = at.exports, rt = w({
208
208
  name: "bento-listbox-single-select-option",
209
209
  components: {
210
- BentoListboxOption: H,
210
+ BentoListboxOption: Z,
211
211
  BentoTypography: W,
212
- CheckmarkIcon: et
212
+ CheckmarkIcon: ct
213
213
  },
214
214
  props: {
215
215
  /**
@@ -229,24 +229,24 @@ const et = Qe.exports, tt = w({
229
229
  */
230
230
  selected: { type: Boolean, default: !1 }
231
231
  },
232
- emits: [a.ENTER, a.SELECT, a.SPACE, a.TAB],
232
+ emits: [c.ENTER, c.SELECT, c.SPACE, c.TAB],
233
233
  setup(s, { emit: e }) {
234
- const l = (c) => {
235
- s.disabled || e(c, s.option);
236
- }, t = o(() => s.disabled ? !0 : null), n = o(() => s.selected ? !0 : null), i = o(() => s.disabled ? -1 : 0);
234
+ const l = (r) => {
235
+ s.disabled || e(r, s.option);
236
+ }, t = i(() => s.disabled ? !0 : null), n = i(() => s.selected ? !0 : null), o = i(() => s.disabled ? -1 : 0);
237
237
  return {
238
238
  // Values
239
239
  ariaDisabled: t,
240
240
  ariaSelected: n,
241
- tabIndex: i,
241
+ tabIndex: o,
242
242
  // Enums
243
- BentoListboxEvent: a,
243
+ BentoListboxEvent: c,
244
244
  // Events
245
245
  onOptionSelected: l
246
246
  };
247
247
  }
248
248
  });
249
- var st = function() {
249
+ var ut = function() {
250
250
  var e = this, l = e._self._c;
251
251
  return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
252
252
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
@@ -259,17 +259,17 @@ var st = function() {
259
259
  } } }, [e._t("default", function() {
260
260
  return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
261
261
  }, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
262
- }, lt = [], nt = /* @__PURE__ */ N(
263
- tt,
264
- st,
265
- lt,
262
+ }, dt = [], bt = /* @__PURE__ */ $(
263
+ rt,
264
+ ut,
265
+ dt,
266
266
  !1,
267
267
  null,
268
268
  "5a5ff36a"
269
269
  );
270
- const it = nt.exports, _e = ({ items: s }, e) => {
271
- const l = o(() => s.value.length - 1), t = A(0), n = (b) => {
272
- switch (b) {
270
+ const ft = bt.exports, pe = ({ items: s }, e) => {
271
+ const l = i(() => s.value.length - 1), t = E(0), n = (p) => {
272
+ switch (p) {
273
273
  case "increase":
274
274
  t.value += 1;
275
275
  break;
@@ -277,50 +277,69 @@ const it = nt.exports, _e = ({ items: s }, e) => {
277
277
  t.value -= 1;
278
278
  break;
279
279
  }
280
- }, i = ({ edgeCaseItem: b }, g) => {
281
- t.value !== b && (n(g), e(t.value));
282
- }, c = (b) => {
283
- T(b), i(
280
+ }, o = ({ edgeCaseItem: p }, g) => {
281
+ t.value !== p && (n(g), e(t.value));
282
+ }, r = (p) => {
283
+ O(p), o(
284
284
  {
285
285
  edgeCaseItem: l.value
286
286
  },
287
287
  "increase"
288
288
  /* INCREASE */
289
289
  );
290
- }, v = (b) => {
291
- T(b), i(
290
+ }, f = (p) => {
291
+ O(p), o(
292
292
  {
293
293
  edgeCaseItem: 0
294
294
  },
295
295
  "decrease"
296
296
  /* DECREASE */
297
297
  );
298
- }, O = () => {
298
+ }, I = () => {
299
299
  t.value = 0, e(t.value);
300
300
  }, d = () => {
301
301
  t.value = l.value, e(t.value);
302
- }, u = (b) => {
303
- t.value = b;
304
- }, T = (b) => {
302
+ }, b = (p) => {
303
+ t.value = p;
304
+ }, O = (p) => {
305
305
  var g;
306
- (g = b == null ? void 0 : b.detail) == null || g.preventDefault();
306
+ (g = p == null ? void 0 : p.detail) == null || g.preventDefault();
307
307
  };
308
308
  return {
309
- moveToFirstElement: O,
309
+ moveToFirstElement: I,
310
310
  moveToLastElement: d,
311
- moveToNextElement: c,
312
- moveToPreviousElement: v,
313
- setListboxFocusedIndex: u,
314
- preventDefault: T,
311
+ moveToNextElement: r,
312
+ moveToPreviousElement: f,
313
+ setListboxFocusedIndex: b,
314
+ preventDefault: O,
315
315
  focusedIndex: t
316
316
  };
317
- }, ot = w({
317
+ }, ge = (s, e, l = E("option"), t = !0) => {
318
+ const n = E([]), o = async () => {
319
+ if (!s.value || s.value.nodeType === Node.COMMENT_NODE)
320
+ return;
321
+ const r = Array.from(s.value.querySelectorAll(`[role="${l.value}"]`));
322
+ n.value = t ? r.filter((f) => f.checkVisibility()) : r;
323
+ };
324
+ return q(
325
+ e,
326
+ () => {
327
+ me(() => {
328
+ o();
329
+ });
330
+ },
331
+ { immediate: !0 }
332
+ ), {
333
+ visibleDomOptions: n,
334
+ updateVisibleDomOptions: o
335
+ };
336
+ }, vt = w({
318
337
  name: "bento-listbox-single-select",
319
338
  components: {
320
- BentoListboxSingleSelectCategory: Ke,
321
- BentoListboxSingleSelectOption: it
339
+ BentoListboxSingleSelectCategory: Qe,
340
+ BentoListboxSingleSelectOption: ft
322
341
  },
323
- directives: { BentoKeyboardNavigationDirective: te },
342
+ directives: { BentoKeyboardNavigationDirective: le },
324
343
  inheritAttrs: !1,
325
344
  props: {
326
345
  /**
@@ -361,115 +380,105 @@ const it = nt.exports, _e = ({ items: s }, e) => {
361
380
  */
362
381
  staticCategories: { type: Boolean, default: !1 }
363
382
  },
364
- emits: [a.SELECT, a.ENTER, a.SPACE, a.TAB],
383
+ emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
365
384
  setup(s, { emit: e, expose: l, slots: t, attrs: n }) {
366
- const i = A(null), c = A([]), v = o(() => {
385
+ const o = E(null), r = E([]), f = i(() => {
367
386
  var m;
368
387
  return !!((m = s.selectedValue) != null && m.length) && s.selectedValue.at(0);
369
- }), O = o(
388
+ }), I = i(
370
389
  () => {
371
- var m, p, D, k;
390
+ var m, y, h, k;
372
391
  return {
373
392
  "aria-label": (m = n["aria-label"]) == null ? void 0 : m.toString(),
374
- "aria-busy": (p = n["aria-busy"]) == null ? void 0 : p.toString(),
375
- "aria-atomic": (D = n["aria-atomic"]) == null ? void 0 : D.toString(),
393
+ "aria-busy": (y = n["aria-busy"]) == null ? void 0 : y.toString(),
394
+ "aria-atomic": (h = n["aria-atomic"]) == null ? void 0 : h.toString(),
376
395
  "aria-live": (k = n["aria-live"]) == null ? void 0 : k.toString()
377
396
  };
378
397
  }
379
- ), d = o(() => !!s.items.some(({ items: m }) => !!m)), u = (m) => (p) => {
380
- e(m, [p]);
381
- }, T = async () => {
382
- await fe(), i.value && (b.value = Array.from(i.value.querySelectorAll('[role="option"]')));
383
- }, b = A([]), g = (m) => {
384
- var p;
385
- (p = b.value[m]) == null || p.focus();
398
+ ), d = i(() => !!s.items.some(({ items: m }) => !!m)), b = (m) => (y) => {
399
+ e(m, [y]);
400
+ }, { visibleDomOptions: O } = ge(o, j(s, "items"), E("option"), !1), p = (m) => {
401
+ var y;
402
+ (y = O.value[m]) == null || y.focus();
386
403
  }, {
387
- moveToNextElement: h,
388
- moveToPreviousElement: B,
389
- moveToFirstElement: L,
390
- moveToLastElement: C,
391
- setListboxFocusedIndex: I
392
- } = _e(
404
+ moveToNextElement: g,
405
+ moveToPreviousElement: C,
406
+ moveToFirstElement: D,
407
+ moveToLastElement: L,
408
+ setListboxFocusedIndex: T
409
+ } = pe(
393
410
  {
394
- items: b
395
- },
396
- g
397
- );
398
- z(
399
- () => s.items,
400
- () => {
401
- T();
411
+ items: O
402
412
  },
403
- { immediate: !0 }
404
- );
405
- const E = {
406
- [$.ARROW_UP]: B,
407
- [$.ARROW_DOWN]: h,
408
- [$.HOME]: L,
409
- [$.END]: C
413
+ p
414
+ ), A = {
415
+ [N.ARROW_UP]: C,
416
+ [N.ARROW_DOWN]: g,
417
+ [N.HOME]: D,
418
+ [N.END]: L
410
419
  }, S = {
411
- [a.SELECT]: u(a.SELECT),
412
- [a.SPACE]: u(a.SPACE),
413
- [a.TAB]: u(a.TAB),
414
- [a.ENTER]: u(a.ENTER)
420
+ [c.SELECT]: b(c.SELECT),
421
+ [c.SPACE]: b(c.SPACE),
422
+ [c.TAB]: b(c.TAB),
423
+ [c.ENTER]: b(c.ENTER)
415
424
  };
416
425
  return l({
417
426
  /**
418
427
  * Reference for a single listbox item.
419
428
  * Required for keyboard navigation in dropdown as $children is removed in vue@3
420
429
  */
421
- listboxItemRef: c,
430
+ listboxItemRef: r,
422
431
  /**
423
432
  * Method to set the index of the item to be focused on
424
433
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
425
434
  */
426
- setListboxFocusedIndex: I
435
+ setListboxFocusedIndex: T
427
436
  }), {
428
437
  // Enums
429
- BentoListboxEvent: a,
438
+ BentoListboxEvent: c,
430
439
  // Values
431
- listboxRef: i,
432
- listboxItemRef: c,
433
- selectedItem: v,
440
+ listboxRef: o,
441
+ listboxItemRef: r,
442
+ selectedItem: f,
434
443
  slots: t,
435
- ariaAttributes: O,
444
+ ariaAttributes: I,
436
445
  // Computed
437
446
  hasCategories: d,
438
447
  // Methods
439
- onOptionSelected: u,
448
+ onOptionSelected: b,
440
449
  // Keyboard navigation
441
- listboxListeners: E,
450
+ listboxListeners: A,
442
451
  listboxOptionListeners: S
443
452
  };
444
453
  }
445
454
  });
446
- var at = function() {
455
+ var mt = function() {
447
456
  var e = this, l = e._self._c;
448
457
  return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(t) {
449
458
  return l("bento-listbox-single-select-category", { key: t.value, attrs: { "category-label": t.label, role: "group" } }, e._l(t.items, function(n) {
450
- return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(i, c) {
451
- return { key: c, fn: function(v) {
452
- return [e._t(c, null, null, v)];
459
+ return l("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, r) {
460
+ return { key: r, fn: function(f) {
461
+ return [e._t(r, null, null, f)];
453
462
  } };
454
463
  })], null, !0) }, e.listboxOptionListeners));
455
464
  }), 1);
456
465
  }) : e._l(e.items, function(t) {
457
- return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, i) {
458
- return { key: i, fn: function(c) {
459
- return [e._t(i, null, null, c)];
466
+ return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
467
+ return { key: o, fn: function(r) {
468
+ return [e._t(o, null, null, r)];
460
469
  } };
461
470
  })], null, !0) }, e.listboxOptionListeners));
462
471
  })], 2);
463
- }, ct = [], rt = /* @__PURE__ */ N(
464
- ot,
465
- at,
466
- ct,
472
+ }, _t = [], pt = /* @__PURE__ */ $(
473
+ vt,
474
+ mt,
475
+ _t,
467
476
  !1,
468
477
  null,
469
478
  null
470
479
  );
471
- const ut = rt.exports, dt = {}, bt = /* @__PURE__ */ w({
472
- ...dt,
480
+ const gt = pt.exports, yt = {}, xt = /* @__PURE__ */ w({
481
+ ...yt,
473
482
  __name: "listbox-decorative-checkbox",
474
483
  props: {
475
484
  disabled: { type: Boolean, default: !1 },
@@ -477,43 +486,43 @@ const ut = rt.exports, dt = {}, bt = /* @__PURE__ */ w({
477
486
  checked: { type: Boolean, default: !1 }
478
487
  },
479
488
  setup(s) {
480
- const e = s, l = o(() => ({
481
- [`b-checkbox-input--${j.DISABLED}`]: e.disabled
482
- })), t = o(() => ({
483
- [`b-checkbox-input__outline--${j.UNCHECKED}`]: !e.checked && !e.indeterminate,
484
- [`b-checkbox-input__outline--${j.CHECKED}`]: e.checked && !e.indeterminate,
485
- [`b-checkbox-input__outline--${j.INDETERMINATE}`]: e.indeterminate
489
+ const e = s, l = i(() => ({
490
+ [`b-checkbox-input--${J.DISABLED}`]: e.disabled
491
+ })), t = i(() => ({
492
+ [`b-checkbox-input__outline--${J.UNCHECKED}`]: !e.checked && !e.indeterminate,
493
+ [`b-checkbox-input__outline--${J.CHECKED}`]: e.checked && !e.indeterminate,
494
+ [`b-checkbox-input__outline--${J.INDETERMINATE}`]: e.indeterminate
486
495
  }));
487
- return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: Ne, MinusSmallIcon: $e };
496
+ return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: ze, MinusSmallIcon: Ue };
488
497
  }
489
498
  });
490
- var ft = function() {
499
+ var ht = function() {
491
500
  var e = this, l = e._self._c, t = e._self._setupProxy;
492
501
  return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
493
- }, vt = [], _t = /* @__PURE__ */ N(
494
- bt,
495
- ft,
496
- vt,
502
+ }, Ct = [], St = /* @__PURE__ */ $(
503
+ xt,
504
+ ht,
505
+ Ct,
497
506
  !1,
498
507
  null,
499
508
  "5dc60f05"
500
509
  );
501
- const se = _t.exports;
502
- var me = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(me || {}), Y = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(Y || {});
503
- const mt = {
510
+ const ne = St.exports;
511
+ var ye = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(ye || {}), Y = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(Y || {});
512
+ const Et = {
504
513
  "en-US": {
505
514
  categoryClosed: "{category} closed",
506
515
  categoryOpened: "{category} opened"
507
516
  }
508
- }, pt = w({
509
- i18n: { messages: mt },
517
+ }, Ot = w({
518
+ i18n: { messages: Et },
510
519
  name: "bento-listbox-multi-select-category",
511
520
  components: {
512
521
  BentoTypography: W,
513
- BentoListboxOption: H,
514
- ChevronDownIcon: Me,
515
- ChevronUpIcon: we,
516
- ListboxDecorativeCheckbox: se
522
+ BentoListboxOption: Z,
523
+ ChevronDownIcon: Ve,
524
+ ChevronUpIcon: We,
525
+ ListboxDecorativeCheckbox: ne
517
526
  },
518
527
  props: {
519
528
  /**
@@ -564,92 +573,97 @@ const mt = {
564
573
  Y.TOGGLE_CATEGORY_VISIBILITY
565
574
  ],
566
575
  setup(s, { emit: e }) {
567
- const l = A(!1), { t } = ee(), n = (p) => s.isOptionDisabled ? s.isOptionDisabled(p) : !1, i = o(
568
- () => s.category.items.every((p) => n(p))
569
- ), c = Q(s, "staticCategories"), v = o(() => l.value || s.staticCategories), O = o(() => ({
570
- [`b-listbox-multi-select-category--${me.DISABLED}`]: i.value
571
- })), d = (p) => {
572
- p.preventDefault(), l.value = !l.value, e(Y.TOGGLE_CATEGORY_VISIBILITY);
573
- }, u = (p) => {
574
- var P;
575
- const D = n(p), k = ((P = s.selectedItemsList) == null ? void 0 : P.includes(p.value)) || !1;
576
- return { isDisabled: D, isPreSelected: k };
577
- }, T = o(
578
- () => s.category.items.filter((p) => {
579
- const { isDisabled: D, isPreSelected: k } = u(p);
580
- return D && k || !D;
576
+ const l = E(!1), { t } = se(), n = (h) => s.isOptionDisabled ? s.isOptionDisabled(h) : !1, o = i(
577
+ () => s.category.items.every((h) => n(h))
578
+ ), r = j(s, "staticCategories"), f = i(() => l.value || s.staticCategories), I = i(() => ({
579
+ [`b-listbox-multi-select-category--${ye.DISABLED}`]: o.value
580
+ })), d = (h, k) => {
581
+ h.preventDefault(), l.value = k !== void 0 ? k : !l.value, e(Y.TOGGLE_CATEGORY_VISIBILITY, s.category.value);
582
+ }, b = (h) => {
583
+ var G;
584
+ const k = n(h), B = ((G = s.selectedItemsList) == null ? void 0 : G.includes(h.value)) || !1;
585
+ return { isDisabled: k, isPreSelected: B };
586
+ }, O = i(
587
+ () => s.category.items.filter((h) => {
588
+ const { isDisabled: k, isPreSelected: B } = b(h);
589
+ return k && B || !k;
581
590
  })
582
- ), b = o(
591
+ ), p = i(
583
592
  () => {
584
- var p;
585
- return (p = T.value) == null ? void 0 : p.filter(
586
- ({ value: D }) => {
587
- var k;
588
- return (k = s.selectedItemsList) == null ? void 0 : k.includes(D);
593
+ var h;
594
+ return (h = O.value) == null ? void 0 : h.filter(
595
+ ({ value: k }) => {
596
+ var B;
597
+ return (B = s.selectedItemsList) == null ? void 0 : B.includes(k);
589
598
  }
590
599
  );
591
600
  }
592
- ), g = o(() => {
593
- const p = l.value ? "categoryOpened" : "categoryClosed";
594
- return t(p, { category: s.category.label });
595
- }), h = () => {
601
+ ), g = i(() => {
602
+ const h = l.value ? "categoryOpened" : "categoryClosed";
603
+ return t(h, { category: s.category.label });
604
+ }), C = () => {
596
605
  e(Y.SELECT_CATEGORY);
597
- }, B = () => {
606
+ }, D = () => {
598
607
  e(Y.UNSELECT_CATEGORY);
599
- }, { isAllSelected: L, isIndeterminate: C, toggleSelectAll: I } = ve(
600
- b,
601
- T,
602
- h,
603
- B
604
- ), E = o(() => C.value ? "mixed" : `${L.value}`), S = A(L.value), m = () => {
605
- S.value = !S.value, I(S.value);
608
+ }, { isAllSelected: L, isIndeterminate: T, toggleSelectAll: A } = _e(
609
+ p,
610
+ O,
611
+ C,
612
+ D
613
+ ), S = i(() => T.value ? "mixed" : `${L.value}`), m = E(L.value), y = () => {
614
+ m.value = !m.value, A(m.value);
606
615
  };
607
- return z(L, () => {
608
- S.value = L.value;
616
+ return q(L, () => {
617
+ m.value = L.value;
609
618
  }), {
610
619
  // Values
611
620
  chevronTitle: g,
612
- conditionalClass: O,
613
- hasAllPropsDisabled: i,
621
+ conditionalClass: I,
622
+ hasAllPropsDisabled: o,
614
623
  isOpen: l,
615
624
  isAllSelected: L,
616
- isIndeterminate: C,
617
- isStaticCategory: c,
625
+ isIndeterminate: T,
626
+ isStaticCategory: r,
618
627
  // Computed
619
- showItemChildren: v,
620
- ariaCheckedComputed: E,
628
+ showItemChildren: f,
629
+ ariaCheckedComputed: S,
621
630
  // Methods
622
- handleSelectAll: m,
631
+ handleSelectAll: y,
623
632
  toggleOpen: d,
624
- toggleSelectAll: I
633
+ toggleSelectAll: A
625
634
  };
626
635
  }
627
636
  });
628
- var gt = function() {
637
+ var Tt = function() {
629
638
  var e = this, l = e._self._c;
630
- return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category" }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
639
+ return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category" }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": e.isOpen, role: "treeitem" }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
631
640
  return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
632
- } } }, [l("listbox-decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
641
+ } }, nativeOn: { keydown: [function(t) {
642
+ return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-left", void 0, t.key, void 0) ? null : e.toggleOpen(t, !1);
643
+ }, function(t) {
644
+ return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
645
+ }] } }, [l("listbox-decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
633
646
  return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
634
647
  } } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
635
- }, yt = [], ht = /* @__PURE__ */ N(
636
- pt,
637
- gt,
638
- yt,
648
+ }, It = [], At = /* @__PURE__ */ $(
649
+ Ot,
650
+ Tt,
651
+ It,
639
652
  !1,
640
653
  null,
641
- "a2ed984e"
654
+ "e1e7494c"
642
655
  );
643
- const xt = ht.exports;
656
+ const Lt = At.exports;
644
657
  var M = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(M || {});
645
- const Ct = w({
658
+ const kt = w({
646
659
  name: "listbox-multi-select-options",
647
660
  components: {
648
- BentoListboxOption: H,
661
+ BentoListboxOption: Z,
649
662
  BentoTypography: W,
650
- ListboxMultiSelectCategory: xt,
651
- ListboxDecorativeCheckbox: se
663
+ ListboxMultiSelectCategory: Lt,
664
+ ListboxDecorativeCheckbox: ne
652
665
  },
666
+ inheritAttrs: !1,
653
667
  props: {
654
668
  /**
655
669
  * Indicates if the items listed are inside a category
@@ -707,7 +721,14 @@ const Ct = w({
707
721
  /**
708
722
  * If enabled, dropdown will display non-selectable, static categories
709
723
  */
710
- staticCategories: { type: Boolean, default: !1 }
724
+ staticCategories: { type: Boolean, default: !1 },
725
+ /**
726
+ * Object with the index of each item.
727
+ */
728
+ itemsIndex: {
729
+ type: Object,
730
+ default: () => ({})
731
+ }
711
732
  },
712
733
  emits: [
713
734
  M.TOGGLE_CHECKBOX_SELECTION,
@@ -719,89 +740,101 @@ const Ct = w({
719
740
  const l = (d) => {
720
741
  s.isOptionDisabled(d) || e(M.TOGGLE_CHECKBOX_SELECTION, d);
721
742
  }, t = (d) => !!d.items, n = (d) => {
722
- const u = s.isMultiLevel && s.searching;
723
- return d.description && (!s.isMultiLevel || u);
724
- }, i = (d) => d.items ? !!d.items.find((u) => s.selectedItemsList.includes(u.value)) : s.selectedItemsList.includes(d.value), c = (d) => {
743
+ const b = s.isMultiLevel && s.searching;
744
+ return d.description && (!s.isMultiLevel || b);
745
+ }, o = (d) => d.items ? !!d.items.find((b) => s.selectedItemsList.includes(b.value)) : s.selectedItemsList.includes(d.value), r = (d) => {
725
746
  if (t(d)) {
726
- const u = i(d) ? M.UNSELECT_CATEGORY : M.SELECT_CATEGORY;
727
- e(u, d);
747
+ const b = o(d) ? M.UNSELECT_CATEGORY : M.SELECT_CATEGORY;
748
+ e(b, d);
728
749
  } else
729
750
  l(d);
730
751
  };
731
752
  return {
732
753
  // Values
733
- conditionalClasses: o(() => ({
754
+ conditionalClasses: i(() => ({
734
755
  "b-listbox-multi-select-options__static-category-option": s.staticCategories,
735
756
  "b-listbox-multi-select-options__category-option": s.categoryItems
736
757
  })),
737
758
  // Methods
738
- isOptionSelected: i,
759
+ isOptionSelected: o,
739
760
  shouldShowDescription: n,
740
761
  toggleCheckboxSelection: l,
741
- toggleSearchOption: c,
742
- computedTabindex: (d) => d + 1 === s.focusedIndex ? 0 : -1,
762
+ toggleSearchOption: r,
763
+ computedTabindex: (d) => s.itemsIndex[d] === s.focusedIndex ? 0 : -1,
743
764
  // Enums
744
- BentoListboxEvent: a,
765
+ BentoListboxEvent: c,
745
766
  ListboxMultiSelectOptionsEvent: M
746
767
  };
747
768
  }
748
769
  });
749
- var St = function() {
770
+ var Rt = function() {
750
771
  var e = this, l = e._self._c;
751
- return e._self._setupProxy, l("div", e._l(e.items, function(t, n) {
752
- return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(n), "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null }, on: { click: function(i) {
772
+ return e._self._setupProxy, l("div", e._l(e.items, function(t) {
773
+ return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role }, on: { click: function(n) {
753
774
  return e.toggleSearchOption(t);
754
- }, "enter-pressed": function(i) {
775
+ }, "enter-pressed": function(n) {
755
776
  return e.toggleSearchOption(t);
756
- }, "space-pressed": function(i) {
757
- return i.preventDefault(), e.toggleSearchOption(t);
777
+ }, "space-pressed": function(n) {
778
+ return n.preventDefault(), e.toggleSearchOption(t);
758
779
  } } }, [l("listbox-decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
759
780
  return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
760
- }, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(n) }, on: { "select-category": function(i) {
781
+ }, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(n) {
761
782
  return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
762
- }, "unselect-category": function(i) {
783
+ }, "unselect-category": function(n) {
763
784
  return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
764
- }, "toggle-category-visibility": function(i) {
765
- return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY);
766
- } } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (i) => e.toggleCheckboxSelection(i) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(n), "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null }, on: { click: function(i) {
785
+ }, "toggle-category-visibility": function(n) {
786
+ return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, n);
787
+ } } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, role: e.$attrs.role }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role }, on: { click: function(n) {
767
788
  return e.toggleCheckboxSelection(t);
768
- }, "enter-pressed": function(i) {
789
+ }, "enter-pressed": function(n) {
769
790
  return e.toggleCheckboxSelection(t);
770
- }, "space-pressed": function(i) {
771
- return i.preventDefault(), e.toggleCheckboxSelection(t);
791
+ }, "space-pressed": function(n) {
792
+ return n.preventDefault(), e.toggleCheckboxSelection(t);
772
793
  } } }, [l("listbox-decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
773
794
  return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
774
795
  }, null, t)], 2)]], 2);
775
796
  }), 0);
776
- }, Et = [], Ot = /* @__PURE__ */ N(
777
- Ct,
778
- St,
779
- Et,
797
+ }, Dt = [], Bt = /* @__PURE__ */ $(
798
+ kt,
799
+ Rt,
800
+ Dt,
780
801
  !1,
781
802
  null,
782
- "e4488ed3"
803
+ "4c869a48"
783
804
  );
784
- const Tt = Ot.exports, At = (s) => {
785
- const e = o(() => {
805
+ const Nt = Bt.exports, $t = (s) => {
806
+ const e = i(() => {
786
807
  var t;
787
808
  return !!((t = s.value) != null && t.find(({ items: n }) => !!n));
788
- }), l = o(() => {
809
+ }), l = i(() => {
789
810
  var t;
790
- return e.value ? (t = s.value) == null ? void 0 : t.reduce((n, i) => (i.items ? n.push(...i.items.flat()) : n.push(i), n), []) : s.value;
811
+ return e.value ? (t = s.value) == null ? void 0 : t.reduce((n, o) => (o.items ? n.push(...o.items.flat()) : n.push(o), n), []) : s.value;
791
812
  });
792
813
  return {
793
814
  isMultiLevelSelect: e,
794
815
  flattenedItemsList: l
795
816
  };
796
- }, It = {
817
+ }, Mt = {
797
818
  "en-US": {
798
819
  allSelected: "All selected ({total})",
799
820
  numberOfTotalSelected: "{number} of {total} selected",
800
821
  numbersSelected: "{number} selected",
801
822
  selectAll: "Select all ({total})"
823
+ },
824
+ "ja-JP": {
825
+ allSelected: "すべて選択済み ({total})",
826
+ numberOfTotalSelected: "{total}件中{number}件を選択済み",
827
+ numbersSelected: "{number}件を選択済み",
828
+ selectAll: "すべて選択 ({total})"
829
+ },
830
+ "pt-BR": {
831
+ allSelected: "Todos selecionados ({total})",
832
+ numberOfTotalSelected: "{number} de {total} selecionados",
833
+ numbersSelected: "{number} selecionados",
834
+ selectAll: "Selecionar todos ({total})"
802
835
  }
803
- }, Lt = { i18n: { messages: It } }, kt = /* @__PURE__ */ w({
804
- ...Lt,
836
+ }, wt = { i18n: { messages: Mt } }, Gt = /* @__PURE__ */ w({
837
+ ...wt,
805
838
  __name: "listbox-multi-select",
806
839
  props: {
807
840
  hasMoreItems: { type: Boolean, default: !1 },
@@ -814,166 +847,172 @@ const Tt = Ot.exports, At = (s) => {
814
847
  },
815
848
  emits: ["select"],
816
849
  setup(s, { expose: e, emit: l }) {
817
- const t = s, { t: n } = ee(), i = Ie(), c = Le(), v = o(
850
+ const t = s, { t: n, n: o } = se(), r = Me(), f = we(), I = i(
818
851
  () => {
819
- var r, f, _, x;
852
+ var a, u, v, x;
820
853
  return {
821
- "aria-label": (r = c["aria-label"]) == null ? void 0 : r.toString(),
822
- "aria-busy": (f = c["aria-busy"]) == null ? void 0 : f.toString(),
823
- "aria-atomic": (_ = c["aria-atomic"]) == null ? void 0 : _.toString(),
824
- "aria-live": (x = c["aria-live"]) == null ? void 0 : x.toString()
854
+ "aria-label": (a = f["aria-label"]) == null ? void 0 : a.toString(),
855
+ "aria-busy": (u = f["aria-busy"]) == null ? void 0 : u.toString(),
856
+ "aria-atomic": (v = f["aria-atomic"]) == null ? void 0 : v.toString(),
857
+ "aria-live": (x = f["aria-live"]) == null ? void 0 : x.toString(),
858
+ "aria-multiselectable": !0
825
859
  };
826
860
  }
827
- ), O = A(null), d = A(null), u = A(null), T = A(null), b = o(() => t.selectedValues.map(({ value: r }) => r)), { isMultiLevelSelect: g, flattenedItemsList: h } = At(Q(t, "items")), B = (r) => {
861
+ ), d = E(null), b = E(null), O = E(null), p = E(null), g = i(() => t.selectedValues.map(({ value: a }) => a)), { isMultiLevelSelect: C, flattenedItemsList: D } = $t(j(t, "items")), L = i(() => C.value && !t.staticCategories), T = i(() => L.value ? "tree" : "listbox"), A = i(() => L.value ? "treeitem" : "option"), S = (a) => {
828
862
  var x;
829
- const f = t.isOptionDisabled(r), _ = ((x = b.value) == null ? void 0 : x.includes(r.value)) || !1;
830
- return { isDisabled: f, isPreSelected: _ };
831
- }, L = o(() => {
832
- if (t.searching && g)
863
+ const u = t.isOptionDisabled(a), v = ((x = g.value) == null ? void 0 : x.includes(a.value)) || !1;
864
+ return { isDisabled: u, isPreSelected: v };
865
+ }, m = i(() => {
866
+ if (t.searching && C)
833
867
  return t.items;
834
- const r = h.value.filter((f) => {
835
- const { isDisabled: _, isPreSelected: x } = B(f);
836
- return _ && x || !_;
868
+ const a = D.value.filter((u) => {
869
+ const { isDisabled: v, isPreSelected: x } = S(u);
870
+ return v && x || !v;
837
871
  });
838
- return t.selectedValues.forEach((f) => {
839
- r.find((_) => _.value === f.value) || r.push(f);
840
- }), r;
841
- }), C = o(
872
+ return t.selectedValues.forEach((u) => {
873
+ a.find((v) => v.value === u.value) || a.push(u);
874
+ }), a;
875
+ }), y = i(
842
876
  () => {
843
- var r;
844
- return (r = L.value) == null ? void 0 : r.filter((f) => {
845
- var _;
846
- return f.items && g.value && t.searching ? f.items.filter(
847
- (y) => (t.selectedValues ?? []).includes(y.value)
848
- ).length === f.items.length : (_ = b.value) == null ? void 0 : _.includes(f.value);
877
+ var a;
878
+ return (a = m.value) == null ? void 0 : a.filter((u) => {
879
+ var v;
880
+ return u.items && C.value && t.searching ? u.items.filter(
881
+ (_) => (t.selectedValues ?? []).includes(_.value)
882
+ ).length === u.items.length : (v = g.value) == null ? void 0 : v.includes(u.value);
849
883
  });
850
884
  }
851
- ), I = () => g.value && !t.searching ? h.value.length : t.items.length, E = o(() => {
885
+ ), h = () => C.value && !t.searching ? D.value.length : t.items.length, k = i(() => {
852
886
  var x;
853
- const r = L.value.length, f = I(), _ = ((x = C.value) == null ? void 0 : x.length) || 0;
854
- return _ === 0 ? n("selectAll", { total: r }) : _ === f ? n("allSelected", { total: f }) : _ <= f ? n("numberOfTotalSelected", { number: _, total: f }) : n("numbersSelected", { number: _ });
855
- }), S = (r) => {
856
- const f = (x) => {
857
- const { isDisabled: y, isPreSelected: G } = B(x);
858
- return y && G || !y;
859
- }, _ = r.filter(f).filter((x) => !b.value.includes(x.value));
860
- l("select", [...t.selectedValues, ..._]);
861
- }, m = (r) => {
862
- const f = (y) => {
863
- const { isDisabled: G, isPreSelected: Oe } = B(y);
864
- return !(G && Oe);
865
- }, _ = r.filter(f).map(({ value: y }) => y), x = t.selectedValues.filter((y) => !(_ != null && _.includes(y.value)));
887
+ const a = m.value.length, u = h(), v = ((x = y.value) == null ? void 0 : x.length) || 0;
888
+ return v === 0 ? n("selectAll", { total: o(a) }) : v === u ? n("allSelected", { total: o(u) }) : v <= u ? n("numberOfTotalSelected", { number: o(v), total: o(u) }) : n("numbersSelected", { number: o(v) });
889
+ }), B = (a) => {
890
+ const u = (x) => {
891
+ const { isDisabled: _, isPreSelected: P } = S(x);
892
+ return _ && P || !_;
893
+ }, v = a.filter(u).filter((x) => !g.value.includes(x.value));
894
+ l("select", [...t.selectedValues, ...v]);
895
+ }, G = (a) => {
896
+ const u = (_) => {
897
+ const { isDisabled: P, isPreSelected: Be } = S(_);
898
+ return !(P && Be);
899
+ }, v = a.filter(u).map(({ value: _ }) => _), x = t.selectedValues.filter((_) => !(v != null && v.includes(_.value)));
866
900
  l("select", x);
867
- }, p = () => {
868
- S(h.value);
869
- }, D = () => {
870
- m(h.value);
871
- }, { isAllSelected: k, isIndeterminate: P, toggleSelectAll: V } = ve(
872
- C,
873
- L,
874
- p,
875
- D
876
- ), X = o(() => P.value ? "mixed" : `${k.value}`), F = A(k.value), R = () => {
877
- F.value = !F.value, V(F.value);
901
+ }, H = () => {
902
+ B(D.value);
903
+ }, X = () => {
904
+ G(D.value);
905
+ }, { isAllSelected: F, isIndeterminate: R, toggleSelectAll: U } = _e(
906
+ y,
907
+ m,
908
+ H,
909
+ X
910
+ ), xe = i(() => R.value ? "mixed" : `${F.value}`), K = E(F.value), he = () => {
911
+ K.value = !K.value, U(K.value);
878
912
  };
879
- z(k, () => {
880
- F.value = k.value;
913
+ q(F, () => {
914
+ K.value = F.value;
881
915
  });
882
- const K = (r) => {
883
- S(r.items);
884
- }, pe = (r) => {
885
- m(r.items);
886
- }, ge = (r, f) => {
887
- let _ = !1;
888
- const x = t.selectedValues.filter(({ value: y }) => f.value === y ? (_ = !0, !1) : !0);
889
- _ || x.push(f), l(r, x);
890
- }, ye = o(() => {
891
- if (!g.value)
916
+ const Ce = (a) => {
917
+ B(a.items);
918
+ }, Se = (a) => {
919
+ G(a.items);
920
+ }, Ee = (a, u) => {
921
+ let v = !1;
922
+ const x = t.selectedValues.filter(({ value: _ }) => u.value === _ ? (v = !0, !1) : !0);
923
+ v || x.push(u), l(a, x);
924
+ }, Oe = i(() => {
925
+ if (!C.value)
892
926
  return t.selectedValues;
893
- const r = (y) => b.value.includes(y.value), f = (y) => !t.staticCategories && y.every((G) => r(G));
927
+ const a = (_) => g.value.includes(_.value), u = (_) => !t.staticCategories && _.every((P) => a(P));
894
928
  return t.items.flatMap(
895
- (y) => y.items && !f(y.items) ? y.items : y
896
- ).filter((y) => y.items ? !0 : r(y));
897
- }), he = o(() => {
898
- var _, x, y, G;
899
- const r = ["automatic", "button"].includes(t.lazyLoadType), f = ((_ = t.selectedValues) == null ? void 0 : _.length) > 0 && ((x = C.value) == null ? void 0 : x.length) !== ((y = h.value) == null ? void 0 : y.length);
900
- return r && t.hasMoreItems ? !!((G = t.selectedValues) != null && G.length) : f;
901
- }), xe = o(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), q = A([]), le = async () => {
902
- await fe(), O.value && (q.value = Array.from(
903
- O.value.querySelectorAll('[role="option"]')
904
- ).filter((r) => r.checkVisibility()));
905
- }, ne = (r) => {
906
- var f;
907
- (f = q.value[r]) == null || f.focus();
929
+ (_) => _.items && !u(_.items) ? _.items : _
930
+ ).filter((_) => _.items ? !0 : a(_));
931
+ }), Te = i(() => {
932
+ var v, x, _, P;
933
+ const a = ["automatic", "button"].includes(t.lazyLoadType), u = ((v = t.selectedValues) == null ? void 0 : v.length) > 0 && ((x = y.value) == null ? void 0 : x.length) !== ((_ = D.value) == null ? void 0 : _.length);
934
+ return a && t.hasMoreItems ? !!((P = t.selectedValues) != null && P.length) : u;
935
+ }), Ie = i(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), z = E([]), { visibleDomOptions: Q, updateVisibleDomOptions: oe } = ge(
936
+ d,
937
+ j(t, "items"),
938
+ A
939
+ ), Ae = (a) => {
940
+ z.value.includes(a) ? z.value = z.value.filter((u) => u !== a) : z.value.push(a), me(() => {
941
+ oe();
942
+ });
943
+ }, ie = (a) => {
944
+ var u;
945
+ (u = Q.value[a]) == null || u.focus();
908
946
  }, {
909
- moveToNextElement: ie,
910
- moveToPreviousElement: oe,
911
- moveToFirstElement: ae,
912
- moveToLastElement: ce,
913
- preventDefault: J,
914
- focusedIndex: Ce,
915
- setListboxFocusedIndex: re
916
- } = _e(
947
+ moveToNextElement: ae,
948
+ moveToPreviousElement: ce,
949
+ moveToFirstElement: re,
950
+ moveToLastElement: ue,
951
+ preventDefault: ee,
952
+ focusedIndex: Le,
953
+ setListboxFocusedIndex: de
954
+ } = pe(
917
955
  {
918
- items: q
956
+ items: Q
919
957
  },
920
- ne
921
- ), Se = {
922
- [$.ARROW_UP]: (r) => oe(r),
923
- [$.ARROW_DOWN]: (r) => ie(r),
924
- [$.HOME]: ae,
925
- [$.END]: ce
958
+ ie
959
+ ), ke = {
960
+ [N.ARROW_UP]: (a) => ce(a),
961
+ [N.ARROW_DOWN]: (a) => ae(a),
962
+ [N.HOME]: re,
963
+ [N.END]: ue
926
964
  };
927
965
  e({
928
966
  /**
929
967
  * Method to set the index of the item to be focused on
930
968
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
931
969
  */
932
- setListboxFocusedIndex: re
970
+ setListboxFocusedIndex: de
933
971
  });
934
- const Ee = {
935
- [$.ARROW_UP]: J,
936
- [$.ARROW_DOWN]: J
937
- };
938
- return z(
939
- () => t.items,
940
- () => {
941
- le();
942
- },
943
- { immediate: !0 }
944
- ), { __sfc: !0, props: t, emit: l, t: n, slots: i, attrs: c, ariaAttributes: v, listboxRef: O, selectAllListboxItemsRef: d, selectedListboxItemsRef: u, listboxItemsRef: T, selectedItemsList: b, isMultiLevelSelect: g, flattenedItemsList: h, optionStates: B, enabledItems: L, visibleSelectedList: C, calculateTotalItems: I, selectAllCheckboxText: E, selectAll: S, unselectAll: m, selectAllItems: p, unselectAllItems: D, isAllSelected: k, isIndeterminate: P, toggleSelectAll: V, ariaCheckedComputed: X, isSelectAllOn: F, handleSelectAll: R, selectAllCategory: K, unselectAllCategory: pe, toggleCheckboxSelection: ge, selectedOptions: ye, showSelectedItems: he, showSelectAllCheckbox: xe, visibleDomOptions: q, updateVisibleDomOptions: le, focusItem: ne, moveToNextElement: ie, moveToPreviousElement: oe, moveToFirstElement: ae, moveToLastElement: ce, preventDefault: J, focusedIndex: Ce, setListboxFocusedIndex: re, listboxListeners: Se, chipsSectionListeners: Ee, ListboxDecorativeCheckbox: se, BentoTypography: W, BentoChip: Be, BentoListboxOption: H, ListboxMultiSelectOptions: Tt, vBentoKeyboardNavigationDirective: te, BentoListboxEvent: a };
972
+ const Re = {
973
+ [N.ARROW_UP]: ee,
974
+ [N.ARROW_DOWN]: ee
975
+ }, De = i(() => {
976
+ let a = 1;
977
+ const u = {};
978
+ return t.items.forEach((v) => {
979
+ let x = z.value.includes(v.value);
980
+ v.items ? (t.staticCategories ? x = !0 : u[v.value] = a++, x && v.items.forEach((_) => u[_.value] = a++)) : u[v.value] = a++;
981
+ }), u;
982
+ });
983
+ return { __sfc: !0, props: t, emit: l, t: n, n: o, slots: r, attrs: f, ariaAttributes: I, listboxRef: d, selectAllListboxItemsRef: b, selectedListboxItemsRef: O, listboxItemsRef: p, selectedItemsList: g, isMultiLevelSelect: C, flattenedItemsList: D, isTreePattern: L, computedRole: T, computedOptionRole: A, optionStates: S, enabledItems: m, visibleSelectedList: y, calculateTotalItems: h, selectAllCheckboxText: k, selectAll: B, unselectAll: G, selectAllItems: H, unselectAllItems: X, isAllSelected: F, isIndeterminate: R, toggleSelectAll: U, ariaCheckedComputed: xe, isSelectAllOn: K, handleSelectAll: he, selectAllCategory: Ce, unselectAllCategory: Se, toggleCheckboxSelection: Ee, selectedOptions: Oe, showSelectedItems: Te, showSelectAllCheckbox: Ie, expandedCategories: z, visibleDomOptions: Q, updateVisibleDomOptions: oe, toggleCategoryVisibility: Ae, focusItem: ie, moveToNextElement: ae, moveToPreviousElement: ce, moveToFirstElement: re, moveToLastElement: ue, preventDefault: ee, focusedIndex: Le, setListboxFocusedIndex: de, listboxListeners: ke, chipsSectionListeners: Re, computedItemsIndex: De, ListboxDecorativeCheckbox: ne, BentoTypography: W, BentoChip: Ye, BentoListboxOption: Z, ListboxMultiSelectOptions: Nt, vBentoKeyboardNavigationDirective: le, BentoListboxEvent: c };
945
984
  }
946
985
  });
947
- var Dt = function() {
986
+ var Pt = function() {
948
987
  var e = this, l = e._self._c, t = e._self._setupProxy;
949
988
  return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(n) {
950
- return l("li", { key: n.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(n), label: n.label, condensed: "" }, on: { click: function(i) {
989
+ return l("li", { key: n.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(n), label: n.label, condensed: "" }, on: { click: function(o) {
951
990
  n.items ? t.unselectAllCategory(n) : t.toggleCheckboxSelection("select", n);
952
991
  } } })], 1);
953
- }), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: "listbox" } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-checked": t.ariaCheckedComputed }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(n) {
992
+ }), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(n) {
954
993
  return n.preventDefault(), t.handleSelectAll.apply(null, arguments);
955
- } } }, [l(t.ListboxDecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex }, on: { "toggle-checkbox-selection": function(n) {
994
+ } } }, [l(t.ListboxDecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(n) {
956
995
  return t.toggleCheckboxSelection("select", n);
957
- }, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.updateVisibleDomOptions, "space-pressed": function(n) {
996
+ }, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(n) {
958
997
  return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, n);
959
998
  }, "tab-pressed": function(n) {
960
999
  return t.toggleCheckboxSelection(t.BentoListboxEvent.TAB, n);
961
1000
  }, "enter-pressed": function(n) {
962
1001
  return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, n);
963
- } }, scopedSlots: e._u([e._l(t.slots, function(n, i) {
964
- return { key: i, fn: function(c) {
965
- return [e._t(i, null, null, c)];
1002
+ } }, scopedSlots: e._u([e._l(t.slots, function(n, o) {
1003
+ return { key: o, fn: function(r) {
1004
+ return [e._t(o, null, null, r)];
966
1005
  } };
967
1006
  })], null, !0) })], 1)]);
968
- }, Rt = [], Bt = /* @__PURE__ */ N(
969
- kt,
970
- Dt,
971
- Rt,
1007
+ }, Ft = [], Yt = /* @__PURE__ */ $(
1008
+ Gt,
1009
+ Pt,
1010
+ Ft,
972
1011
  !1,
973
1012
  null,
974
- "d866c0f0"
1013
+ "904fc859"
975
1014
  );
976
- const be = Bt.exports, $t = {
1015
+ const ve = Yt.exports, Ut = {
977
1016
  "en-US": {
978
1017
  loading: "Loading",
979
1018
  showMore: "Show more"
@@ -986,18 +1025,18 @@ const be = Bt.exports, $t = {
986
1025
  loading: "Carregando",
987
1026
  showMore: "Mostrar mais"
988
1027
  }
989
- }, Nt = 36, Mt = w({
1028
+ }, zt = 36, Vt = w({
990
1029
  name: "bento-listbox",
991
1030
  components: {
992
- BentoEmptyState: De,
993
- BentoListboxSingleSelect: ut,
994
- BentoListboxMultiSelect: be,
1031
+ BentoEmptyState: Pe,
1032
+ BentoListboxSingleSelect: gt,
1033
+ BentoListboxMultiSelect: ve,
995
1034
  BentoTypography: W,
996
- BentoLoadingIndicator: ke,
997
- BentoLoadingButton: Ge
1035
+ BentoLoadingIndicator: Ge,
1036
+ BentoLoadingButton: Ke
998
1037
  },
999
- directives: { BentoKeyboardNavigationDirective: te },
1000
- i18n: { messages: $t },
1038
+ directives: { BentoKeyboardNavigationDirective: le },
1039
+ i18n: { messages: Ut },
1001
1040
  props: {
1002
1041
  /**
1003
1042
  * Defines a string value that labels an interactive element.
@@ -1053,8 +1092,8 @@ const be = Bt.exports, $t = {
1053
1092
  */
1054
1093
  lazyLoadType: {
1055
1094
  type: String,
1056
- default: U.NONE,
1057
- validator: (s) => Object.values(U).includes(s)
1095
+ default: V.NONE,
1096
+ validator: (s) => Object.values(V).includes(s)
1058
1097
  },
1059
1098
  /**
1060
1099
  * Indicates the listbox is loading filtered items.
@@ -1078,7 +1117,7 @@ const be = Bt.exports, $t = {
1078
1117
  *
1079
1118
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
1080
1119
  */
1081
- searching: be.props.searching,
1120
+ searching: ve.props.searching,
1082
1121
  /**
1083
1122
  * The `input` value.
1084
1123
  * Providing an empty string or empty array will select no options.
@@ -1098,183 +1137,184 @@ const be = Bt.exports, $t = {
1098
1137
  }
1099
1138
  },
1100
1139
  emits: [
1101
- a.SELECT,
1102
- a.SPACE,
1103
- a.SHOW_MORE,
1104
- a.ENTER,
1105
- a.ESCAPE,
1106
- a.TAB
1140
+ c.SELECT,
1141
+ c.SPACE,
1142
+ c.SHOW_MORE,
1143
+ c.ENTER,
1144
+ c.ESCAPE,
1145
+ c.TAB
1107
1146
  ],
1108
1147
  setup(s, { emit: e, slots: l }) {
1109
- const t = A([]), n = Q(s, "items"), { t: i } = ee(), c = o(() => s.lazyLoadType !== U.AUTOMATIC), v = o(() => s.lazyLoadType === U.AUTOMATIC), O = () => {
1148
+ const t = E([]), n = j(s, "items"), { t: o } = se(), r = i(() => s.lazyLoadType !== V.AUTOMATIC), f = i(() => s.lazyLoadType === V.AUTOMATIC), I = () => {
1110
1149
  var R;
1111
- return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((R = s == null ? void 0 : s.virtualScroll) != null && R.itemHeight) ? s.virtualScroll.itemHeight : Nt;
1150
+ return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((R = s == null ? void 0 : s.virtualScroll) != null && R.itemHeight) ? s.virtualScroll.itemHeight : zt;
1112
1151
  }, {
1113
1152
  containerRef: d,
1114
- containerProps: u,
1115
- onScroll: T,
1116
- list: b,
1153
+ containerProps: b,
1154
+ onScroll: O,
1155
+ list: p,
1117
1156
  wrapperProps: g
1118
- } = Fe(n, {
1119
- itemHeight: O(),
1157
+ } = qe(n, {
1158
+ itemHeight: I(),
1120
1159
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1121
1160
  disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
1122
- }), h = o(
1123
- () => s.componentLoading !== void 0 || c.value ? "true" : void 0
1124
- ), B = o(
1125
- () => c.value && s.loading || s.componentLoading ? "true" : "false"
1126
- ), L = o(
1127
- () => c.value || s.componentLoading !== void 0 ? "polite" : void 0
1128
- ), C = o(
1161
+ }), C = i(
1162
+ () => s.componentLoading !== void 0 || r.value ? "true" : void 0
1163
+ ), D = i(
1164
+ () => r.value && s.loading || s.componentLoading ? "true" : "false"
1165
+ ), L = i(
1166
+ () => r.value || s.componentLoading !== void 0 ? "polite" : void 0
1167
+ ), T = i(
1129
1168
  () => ({
1130
1169
  "aria-label": s.ariaLabel,
1131
- "aria-busy": B.value,
1132
- "aria-atomic": h.value,
1170
+ "aria-busy": D.value,
1171
+ "aria-atomic": C.value,
1133
1172
  "aria-live": L.value
1134
1173
  })
1135
- ), I = o(
1174
+ ), A = i(
1136
1175
  () => s.componentLoading ? {
1137
- ...C.value,
1176
+ ...T.value,
1138
1177
  role: "alert"
1139
1178
  } : {}
1140
- ), E = (R) => (K) => {
1141
- e(R, K);
1142
- }, S = () => {
1143
- e(a.SHOW_MORE);
1144
- }, m = Re(() => {
1179
+ ), S = (R) => (U) => {
1180
+ e(R, U);
1181
+ }, m = () => {
1182
+ e(c.SHOW_MORE);
1183
+ }, y = Fe(() => {
1145
1184
  const R = d.value;
1146
1185
  if (!R)
1147
1186
  return;
1148
- const K = Math.round(R.scrollTop) + R.clientHeight >= R.scrollHeight;
1149
- s.hasMoreItems && K && !s.loading && S();
1150
- }), p = () => {
1151
- v.value ? m() : T();
1152
- }, D = o(() => {
1187
+ const U = Math.round(R.scrollTop) + R.clientHeight >= R.scrollHeight;
1188
+ s.hasMoreItems && U && !s.loading && m();
1189
+ }), h = () => {
1190
+ f.value ? y() : O();
1191
+ }, k = i(() => {
1153
1192
  var R;
1154
1193
  return ((R = s.items) == null ? void 0 : R.length) === 0;
1155
- }), k = o(
1156
- () => s.lazyLoadType === U.BUTTON && s.hasMoreItems
1157
- ), P = o(
1158
- () => s.loading ? ue.LOADING : ue.START
1159
- ), V = o(() => s.loading ? i("loading") : i("showMore")), X = o(() => ({
1194
+ }), B = i(
1195
+ () => s.lazyLoadType === V.BUTTON && s.hasMoreItems
1196
+ ), G = i(
1197
+ () => s.loading ? be.LOADING : be.START
1198
+ ), H = i(() => s.loading ? o("loading") : o("showMore")), X = i(() => ({
1160
1199
  ...s.emptyState,
1161
1200
  variant: "condensed"
1162
1201
  })), F = {
1163
- [a.SELECT]: E(a.SELECT),
1164
- [a.SPACE]: E(a.SPACE),
1165
- [a.TAB]: E(a.TAB),
1166
- [a.ENTER]: E(a.ENTER)
1202
+ [c.SELECT]: S(c.SELECT),
1203
+ [c.SPACE]: S(c.SPACE),
1204
+ [c.TAB]: S(c.TAB),
1205
+ [c.ENTER]: S(c.ENTER)
1167
1206
  };
1168
1207
  return {
1169
1208
  // Refs
1170
1209
  listboxRef: d,
1171
1210
  listboxItemRef: t,
1172
1211
  // a11y
1173
- ariaAttributes: C,
1174
- listboxContainerAttributes: I,
1212
+ ariaAttributes: T,
1213
+ listboxContainerAttributes: A,
1175
1214
  // Values
1176
- containerProps: u,
1177
- isSearchResultEmpty: D,
1215
+ containerProps: b,
1216
+ isSearchResultEmpty: k,
1178
1217
  limitedEmptyStateProps: X,
1179
- loadingButtonState: P,
1218
+ loadingButtonState: G,
1180
1219
  slots: l,
1181
- shouldDisplayShowMoreButton: k,
1182
- showMoreButtonText: V,
1183
- virtualisedItems: b,
1220
+ shouldDisplayShowMoreButton: B,
1221
+ showMoreButtonText: H,
1222
+ virtualisedItems: p,
1184
1223
  wrapperProps: g,
1185
1224
  // Enums
1186
- BentoKeyboardNavigationKeyDownEvent: $,
1187
- BentoListboxEvent: a,
1225
+ BentoKeyboardNavigationKeyDownEvent: N,
1226
+ BentoListboxEvent: c,
1188
1227
  // Methods
1189
- onListboxContainerScroll: p,
1190
- onOptionSelected: E,
1191
- emitShowMore: S,
1228
+ onListboxContainerScroll: h,
1229
+ onOptionSelected: S,
1230
+ emitShowMore: m,
1192
1231
  listboxListeners: F
1193
1232
  };
1194
1233
  }
1195
1234
  });
1196
- var wt = function() {
1235
+ var Wt = function() {
1197
1236
  var t;
1198
1237
  var e = this, l = e._self._c;
1199
- return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, i) {
1200
- return { key: i, fn: function(c) {
1201
- return [e._t(i, null, null, c)];
1238
+ return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
1239
+ return { key: o, fn: function(r) {
1240
+ return [e._t(o, null, null, r)];
1202
1241
  } };
1203
- })], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, i) {
1204
- return { key: i, fn: function(c) {
1205
- return [e._t(i, null, null, c)];
1242
+ })], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, o) {
1243
+ return { key: o, fn: function(r) {
1244
+ return [e._t(o, null, null, r)];
1206
1245
  } };
1207
1246
  })], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(n) {
1208
1247
  return e.emitShowMore.apply(null, arguments);
1209
1248
  } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
1210
- }, Gt = [], Pt = /* @__PURE__ */ N(
1211
- Mt,
1212
- wt,
1213
- Gt,
1249
+ }, Kt = [], jt = /* @__PURE__ */ $(
1250
+ Vt,
1251
+ Wt,
1252
+ Kt,
1214
1253
  !1,
1215
1254
  null,
1216
1255
  "46b000a2"
1217
1256
  );
1218
- const ns = Pt.exports, Z = (s, e) => {
1257
+ const bs = jt.exports, te = (s, e) => {
1219
1258
  for (const l of s) {
1220
1259
  if (l.value === e)
1221
1260
  return l;
1222
1261
  if (l.items) {
1223
- const t = Z(l.items, e);
1262
+ const t = te(l.items, e);
1224
1263
  if (t)
1225
1264
  return t;
1226
1265
  }
1227
1266
  }
1228
1267
  return null;
1229
- }, Ft = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, is = (s, e, l, t) => {
1230
- const n = A([]), i = A(), c = (u) => {
1231
- l.value ? i.value = u.map(({ value: T }) => T) : i.value = u.length > 0 ? u[0].value : null;
1232
- }, v = (u) => {
1233
- l.value ? i.value = u.map(({ value: T, label: b }) => ({ value: T, label: b })) : i.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
1234
- }, O = (u) => {
1235
- n.value = u, t != null && t.value ? v(u) : c(u);
1268
+ }, qt = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, fs = (s, e, l, t) => {
1269
+ const n = E([]), o = E(), r = (b) => {
1270
+ l.value ? o.value = b.map(({ value: O }) => O) : o.value = b.length > 0 ? b[0].value : null;
1271
+ }, f = (b) => {
1272
+ l.value ? o.value = b.map(({ value: O, label: p }) => ({ value: O, label: p })) : o.value = b.length > 0 ? { value: b[0].value, label: b[0].label } : null;
1273
+ }, I = (b) => {
1274
+ n.value = b, t != null && t.value ? f(b) : r(b);
1236
1275
  }, d = () => {
1237
- n.value = [], i.value = null;
1276
+ n.value = [], o.value = null;
1238
1277
  };
1239
- return z(
1278
+ return q(
1240
1279
  () => e.value,
1241
1280
  () => {
1242
1281
  if (!e.value && e.value !== 0) {
1243
1282
  d();
1244
1283
  return;
1245
1284
  }
1246
- const u = !Array.isArray(e.value), T = [...n.value];
1285
+ const b = !Array.isArray(e.value), O = [...n.value];
1247
1286
  d();
1248
- const b = (g) => {
1249
- if (Ft(g))
1287
+ const p = (g) => {
1288
+ if (qt(g))
1250
1289
  n.value.push(g);
1251
1290
  else {
1252
- let h = Z(s.value, g);
1253
- h || (h = Z(T, g)), h || (h = { value: g, label: g.toString() }), n.value.push(h);
1291
+ let C = te(s.value, g);
1292
+ C || (C = te(O, g)), C || (C = { value: g, label: g.toString() }), n.value.push(C);
1254
1293
  }
1255
1294
  };
1256
- if (u) {
1295
+ if (b) {
1257
1296
  const g = e.value;
1258
- b(g), t != null && t.value ? v(n.value) : c(n.value);
1297
+ p(g), t != null && t.value ? f(n.value) : r(n.value);
1259
1298
  return;
1260
1299
  }
1261
- e.value.forEach(b), t != null && t.value ? v(n.value) : c(n.value);
1300
+ e.value.forEach(p), t != null && t.value ? f(n.value) : r(n.value);
1262
1301
  },
1263
1302
  { immediate: !0 }
1264
1303
  ), {
1265
1304
  // Values
1266
1305
  cachedSelectedListboxOptions: n,
1267
- cachedListboxSelectedValues: i,
1306
+ cachedListboxSelectedValues: o,
1268
1307
  // Methods
1269
1308
  resetCache: d,
1270
- setCachedValues: O
1309
+ setCachedValues: I
1271
1310
  };
1272
1311
  };
1273
1312
  export {
1274
- U as B,
1275
- a,
1276
- ns as b,
1277
- is as c,
1278
- At as u
1313
+ V as B,
1314
+ c as a,
1315
+ bs as b,
1316
+ fs as c,
1317
+ ge as d,
1318
+ $t as u
1279
1319
  };
1280
- //# sourceMappingURL=use-cached-selected-values.DNOmzQVy.js.map
1320
+ //# sourceMappingURL=use-cached-selected-values.CusB5KBl.js.map