@adyen/bento-vue2 1.60.1 → 1.61.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 (182) hide show
  1. package/dist/@types/index.d.ts +114 -7
  2. package/dist/action-bar.js +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/button.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/dashed-underline.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/dropdown.css +1 -1
  13. package/dist/assets/file-uploader.css +1 -1
  14. package/dist/assets/filter-bar.css +1 -1
  15. package/dist/assets/header-with-views.css +1 -1
  16. package/dist/assets/inspector.css +1 -1
  17. package/dist/assets/menu.css +1 -1
  18. package/dist/assets/modal-fullscreen.css +1 -1
  19. package/dist/assets/popover.css +1 -1
  20. package/dist/assets/radio-group.css +1 -1
  21. package/dist/assets/sidepanel.css +1 -1
  22. package/dist/button.js +3 -3
  23. package/dist/card.js +1 -1
  24. package/dist/chunks/{action-bar.CMqiD6vc.js → action-bar.Bgd_D2d9.js} +5 -5
  25. package/dist/chunks/{action-bar.CMqiD6vc.js.map → action-bar.Bgd_D2d9.js.map} +1 -1
  26. package/dist/chunks/{alert.Du9NfW-V.js → alert.C1QHvbmJ.js} +2 -2
  27. package/dist/chunks/{alert.Du9NfW-V.js.map → alert.C1QHvbmJ.js.map} +1 -1
  28. package/dist/chunks/{base-modal.xA_DhHx9.js → base-modal.BKjjZPZw.js} +4 -4
  29. package/dist/chunks/{base-modal.xA_DhHx9.js.map → base-modal.BKjjZPZw.js.map} +1 -1
  30. package/dist/chunks/{button-actions-with-menu.S7i4V-8E.js → button-actions-with-menu.YN379eYi.js} +4 -4
  31. package/dist/chunks/{button-actions-with-menu.S7i4V-8E.js.map → button-actions-with-menu.YN379eYi.js.map} +1 -1
  32. package/dist/chunks/{button-actions.BFtzsfNe.js → button-actions.CHZ2BT5_.js} +2 -2
  33. package/dist/chunks/{button-actions.BFtzsfNe.js.map → button-actions.CHZ2BT5_.js.map} +1 -1
  34. package/dist/chunks/{button.BuD-IsW5.js → button.CvgJ_0_Z.js} +21 -10
  35. package/dist/chunks/button.CvgJ_0_Z.js.map +1 -0
  36. package/dist/chunks/{calendar.DQiq_EoU.js → calendar.CjVkJzjc.js} +2 -2
  37. package/dist/chunks/{calendar.DQiq_EoU.js.map → calendar.CjVkJzjc.js.map} +1 -1
  38. package/dist/chunks/{card.Bk7Lz1GS.js → card.CcDdIUvd.js} +2 -2
  39. package/dist/chunks/{card.Bk7Lz1GS.js.map → card.CcDdIUvd.js.map} +1 -1
  40. package/dist/chunks/{code-snippet.BlYhf-Dt.js → code-snippet.gRALClm3.js} +5 -5
  41. package/dist/chunks/{code-snippet.BlYhf-Dt.js.map → code-snippet.gRALClm3.js.map} +1 -1
  42. package/dist/chunks/{copy.Bod4H2Dk.js → copy.qU5LvaNi.js} +2 -2
  43. package/dist/chunks/{copy.Bod4H2Dk.js.map → copy.qU5LvaNi.js.map} +1 -1
  44. package/dist/chunks/{dashboard-section.Dx6eYon4.js → dashboard-section.Bn5RJCPR.js} +3 -3
  45. package/dist/chunks/{dashboard-section.Dx6eYon4.js.map → dashboard-section.Bn5RJCPR.js.map} +1 -1
  46. package/dist/chunks/dashed-underline._q5UFPSC.js +78 -0
  47. package/dist/chunks/dashed-underline._q5UFPSC.js.map +1 -0
  48. package/dist/chunks/{data-grid-template.CVl3PU0v.js → data-grid-template.CrpwSZRE.js} +4 -4
  49. package/dist/chunks/{data-grid-template.CVl3PU0v.js.map → data-grid-template.CrpwSZRE.js.map} +1 -1
  50. package/dist/chunks/{data-grid.BZaXKTLk.js → data-grid.ZBzlPPcj.js} +351 -348
  51. package/dist/chunks/data-grid.ZBzlPPcj.js.map +1 -0
  52. package/dist/chunks/{date-picker.lrT6LXe-.js → date-picker.BOEKZKFp.js} +3 -3
  53. package/dist/chunks/{date-picker.lrT6LXe-.js.map → date-picker.BOEKZKFp.js.map} +1 -1
  54. package/dist/chunks/{date-range-picker.Djt5mYvh.js → date-range-picker.DMHCqAZA.js} +6 -6
  55. package/dist/chunks/{date-range-picker.Djt5mYvh.js.map → date-range-picker.DMHCqAZA.js.map} +1 -1
  56. package/dist/chunks/delight.CDBAFnwC.js +5 -0
  57. package/dist/chunks/delight.CDBAFnwC.js.map +1 -0
  58. package/dist/chunks/delight.xKDCvvaS.js +5 -0
  59. package/dist/chunks/delight.xKDCvvaS.js.map +1 -0
  60. package/dist/chunks/{dialog-page.C5r6tM57.js → dialog-page.CDV828kt.js} +2 -2
  61. package/dist/chunks/{dialog-page.C5r6tM57.js.map → dialog-page.CDV828kt.js.map} +1 -1
  62. package/dist/chunks/{dropdown-tag.CY3nZ50z.js → dropdown-tag.CaEPpy4R.js} +2 -2
  63. package/dist/chunks/{dropdown-tag.CY3nZ50z.js.map → dropdown-tag.CaEPpy4R.js.map} +1 -1
  64. package/dist/chunks/{dropdown.Cx-3TGBk.js → dropdown.3c5SsPV1.js} +89 -74
  65. package/dist/chunks/{dropdown.Cx-3TGBk.js.map → dropdown.3c5SsPV1.js.map} +1 -1
  66. package/dist/chunks/empty-state.DXDb-S58.js +151 -0
  67. package/dist/chunks/empty-state.DXDb-S58.js.map +1 -0
  68. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  69. package/dist/chunks/{file-uploader.E18P6eyS.js → file-uploader.ChDPu4V7.js} +3 -3
  70. package/dist/chunks/{file-uploader.E18P6eyS.js.map → file-uploader.ChDPu4V7.js.map} +1 -1
  71. package/dist/chunks/{filter-bar.D6IL1UDu.js → filter-bar.BVRAteKx.js} +545 -540
  72. package/dist/chunks/filter-bar.BVRAteKx.js.map +1 -0
  73. package/dist/chunks/{fixed-scroller.D0a6q8_i.js → fixed-scroller.DPiQh_o-.js} +2 -2
  74. package/dist/chunks/{fixed-scroller.D0a6q8_i.js.map → fixed-scroller.DPiQh_o-.js.map} +1 -1
  75. package/dist/chunks/{footer-actions.BgpSnSSn.js → footer-actions.B3pFu9GM.js} +3 -3
  76. package/dist/chunks/{footer-actions.BgpSnSSn.js.map → footer-actions.B3pFu9GM.js.map} +1 -1
  77. package/dist/chunks/{form-layout-title.DBCY18f8.js → form-layout-title.Ck5QqPkA.js} +2 -2
  78. package/dist/chunks/{form-layout-title.DBCY18f8.js.map → form-layout-title.Ck5QqPkA.js.map} +1 -1
  79. package/dist/chunks/{header-with-views.DAdbhhG9.js → header-with-views.BlEEUDWs.js} +486 -484
  80. package/dist/chunks/{header-with-views.DAdbhhG9.js.map → header-with-views.BlEEUDWs.js.map} +1 -1
  81. package/dist/chunks/{header.8SId1U5r.js → header.BfxNBVCD.js} +4 -4
  82. package/dist/chunks/{header.8SId1U5r.js.map → header.BfxNBVCD.js.map} +1 -1
  83. package/dist/chunks/{info-icon-with-popover.XZqkxPsB.js → info-icon-with-popover.B4Q8jmW7.js} +2 -2
  84. package/dist/chunks/{info-icon-with-popover.XZqkxPsB.js.map → info-icon-with-popover.B4Q8jmW7.js.map} +1 -1
  85. package/dist/chunks/{input-field-password.lK0Im1eg.js → input-field-password.Ciw4TWWq.js} +5 -5
  86. package/dist/chunks/{input-field-password.lK0Im1eg.js.map → input-field-password.Ciw4TWWq.js.map} +1 -1
  87. package/dist/chunks/{input-field-phone-number.BnjBqUKg.js → input-field-phone-number.CRx64sme.js} +3 -3
  88. package/dist/chunks/{input-field-phone-number.BnjBqUKg.js.map → input-field-phone-number.CRx64sme.js.map} +1 -1
  89. package/dist/chunks/{input-field.B8HxtNIv.js → input-field.DOnqD_Fx.js} +2 -2
  90. package/dist/chunks/{input-field.B8HxtNIv.js.map → input-field.DOnqD_Fx.js.map} +1 -1
  91. package/dist/chunks/{inspector.CegHqvEW.js → inspector.tn1wr5hV.js} +2 -2
  92. package/dist/chunks/{inspector.CegHqvEW.js.map → inspector.tn1wr5hV.js.map} +1 -1
  93. package/dist/chunks/{menu.CT0SIn4v.js → menu.B_DCBdeN.js} +3 -3
  94. package/dist/chunks/{menu.CT0SIn4v.js.map → menu.B_DCBdeN.js.map} +1 -1
  95. package/dist/chunks/{modal-fullscreen.tofT1h0P.js → modal-fullscreen.cBUMfJhU.js} +4 -4
  96. package/dist/chunks/{modal-fullscreen.tofT1h0P.js.map → modal-fullscreen.cBUMfJhU.js.map} +1 -1
  97. package/dist/chunks/{modal.CiYtGu6u.js → modal.DWkmyvRc.js} +5 -5
  98. package/dist/chunks/{modal.CiYtGu6u.js.map → modal.DWkmyvRc.js.map} +1 -1
  99. package/dist/chunks/{pagination.B-EP9Lkq.js → pagination.pzY_1Qqp.js} +3 -3
  100. package/dist/chunks/{pagination.B-EP9Lkq.js.map → pagination.pzY_1Qqp.js.map} +1 -1
  101. package/dist/chunks/{popover.COaHa4ES.js → popover.BN2VK6KG.js} +3 -3
  102. package/dist/chunks/{popover.COaHa4ES.js.map → popover.BN2VK6KG.js.map} +1 -1
  103. package/dist/chunks/{promo-banner.DJpA7Whg.js → promo-banner.Cua4uX1x.js} +2 -2
  104. package/dist/chunks/{promo-banner.DJpA7Whg.js.map → promo-banner.Cua4uX1x.js.map} +1 -1
  105. package/dist/chunks/{rich-text-editor.C4NdjtLA.js → rich-text-editor.BRlygI8q.js} +2 -2
  106. package/dist/chunks/{rich-text-editor.C4NdjtLA.js.map → rich-text-editor.BRlygI8q.js.map} +1 -1
  107. package/dist/chunks/{search-bar.B4u_IgiI.js → search-bar.C10szx9Q.js} +3 -3
  108. package/dist/chunks/{search-bar.B4u_IgiI.js.map → search-bar.C10szx9Q.js.map} +1 -1
  109. package/dist/chunks/{secondary-nav.EROJ_sJQ.js → secondary-nav.Bdxei6WP.js} +2 -2
  110. package/dist/chunks/{secondary-nav.EROJ_sJQ.js.map → secondary-nav.Bdxei6WP.js.map} +1 -1
  111. package/dist/chunks/{sidepanel.3EBWM8JV.js → sidepanel.X5Te2FiT.js} +4 -4
  112. package/dist/chunks/{sidepanel.3EBWM8JV.js.map → sidepanel.X5Te2FiT.js.map} +1 -1
  113. package/dist/chunks/{structured-list-item.rOTJM0uc.js → structured-list-item.n5vrbuW9.js} +3 -3
  114. package/dist/chunks/{structured-list-item.rOTJM0uc.js.map → structured-list-item.n5vrbuW9.js.map} +1 -1
  115. package/dist/chunks/{summary-grid.types.Bg1Y7i-F.js → summary-grid.types.D23lQ-e5.js} +3 -3
  116. package/dist/chunks/{summary-grid.types.Bg1Y7i-F.js.map → summary-grid.types.D23lQ-e5.js.map} +1 -1
  117. package/dist/chunks/{tabs.DX_Gq12z.js → tabs.DKehFLDL.js} +2 -2
  118. package/dist/chunks/{tabs.DX_Gq12z.js.map → tabs.DKehFLDL.js.map} +1 -1
  119. package/dist/chunks/{textarea.0PapD8Nl.js → textarea.D09495Nz.js} +2 -2
  120. package/dist/chunks/{textarea.0PapD8Nl.js.map → textarea.D09495Nz.js.map} +1 -1
  121. package/dist/chunks/{timeline-item.IFw76Qeh.js → timeline-item.DKPI-4iu.js} +5 -5
  122. package/dist/chunks/{timeline-item.IFw76Qeh.js.map → timeline-item.DKPI-4iu.js.map} +1 -1
  123. package/dist/chunks/{toast.B2u2W_TQ.js → toast.C_uVjJnK.js} +2 -2
  124. package/dist/chunks/{toast.B2u2W_TQ.js.map → toast.C_uVjJnK.js.map} +1 -1
  125. package/dist/chunks/{toggle-button.ChDbeBZ8.js → toggle-button.COEDg5Ym.js} +2 -2
  126. package/dist/chunks/{toggle-button.ChDbeBZ8.js.map → toggle-button.COEDg5Ym.js.map} +1 -1
  127. package/dist/chunks/{tutorial.suIRmXta.js → tutorial.DgmK5EEo.js} +4 -4
  128. package/dist/chunks/{tutorial.suIRmXta.js.map → tutorial.DgmK5EEo.js.map} +1 -1
  129. package/dist/chunks/{use-cached-selected-values.9OnD_j5F.js → use-cached-selected-values.C-umGJXi.js} +451 -445
  130. package/dist/chunks/use-cached-selected-values.C-umGJXi.js.map +1 -0
  131. package/dist/code-snippet.js +1 -1
  132. package/dist/dashboard-template.js +1 -1
  133. package/dist/dashed-underline.js +1 -1
  134. package/dist/data-grid-template.js +1 -1
  135. package/dist/data-grid.js +1 -1
  136. package/dist/date-picker.js +2 -2
  137. package/dist/date-range-picker.js +2 -2
  138. package/dist/dropdown.js +3 -3
  139. package/dist/empty-state.js +1 -1
  140. package/dist/file-uploader.js +1 -1
  141. package/dist/filter-bar.js +1 -1
  142. package/dist/form-layout.js +1 -1
  143. package/dist/header-with-views.js +1 -1
  144. package/dist/header.js +1 -1
  145. package/dist/index.js +45 -45
  146. package/dist/input-field-password.js +1 -1
  147. package/dist/input-field-phone-number.js +1 -1
  148. package/dist/input-field.js +1 -1
  149. package/dist/inspector.js +1 -1
  150. package/dist/internal.js +8 -8
  151. package/dist/menu.js +1 -1
  152. package/dist/modal-fullscreen.js +1 -1
  153. package/dist/modal.js +2 -2
  154. package/dist/pagination.js +1 -1
  155. package/dist/popover.js +1 -1
  156. package/dist/promo-banner.js +1 -1
  157. package/dist/rich-text-editor.js +1 -1
  158. package/dist/search-bar.js +2 -2
  159. package/dist/secondary-nav.js +1 -1
  160. package/dist/sidepanel.js +1 -1
  161. package/dist/structured-list.js +1 -1
  162. package/dist/styles/bento-dark.css +1 -0
  163. package/dist/styles/bento-light.css +1 -0
  164. package/dist/styles/bento.css +1 -0
  165. package/dist/styles/legacy.css +1 -0
  166. package/dist/styles/styleguide.css +1 -0
  167. package/dist/summary-grid.js +1 -1
  168. package/dist/tabs.js +1 -1
  169. package/dist/textarea.js +1 -1
  170. package/dist/timeline.js +1 -1
  171. package/dist/toast.js +1 -1
  172. package/dist/tutorial.js +1 -1
  173. package/dist/web-types.json +20 -1
  174. package/package.json +5 -5
  175. package/dist/chunks/button.BuD-IsW5.js.map +0 -1
  176. package/dist/chunks/dashed-underline.CY5J4pZp.js +0 -65
  177. package/dist/chunks/dashed-underline.CY5J4pZp.js.map +0 -1
  178. package/dist/chunks/data-grid.BZaXKTLk.js.map +0 -1
  179. package/dist/chunks/empty-state.IvvHHQ35.js +0 -151
  180. package/dist/chunks/empty-state.IvvHHQ35.js.map +0 -1
  181. package/dist/chunks/filter-bar.D6IL1UDu.js.map +0 -1
  182. package/dist/chunks/use-cached-selected-values.9OnD_j5F.js.map +0 -1
@@ -1,113 +1,113 @@
1
- import { computed as c, ref as O, onMounted as de, onUnmounted as ye, watch as be, defineComponent as P, toRef as w, useSlots as Ce } from "vue";
1
+ import { computed as r, ref as A, onMounted as de, onUnmounted as ye, watch as fe, defineComponent as $, toRef as w, useSlots as Ce } from "vue";
2
2
  import { B as G } from "./typography.J1v_SPG3.js";
3
- import { B as Se } from "./loading-indicator.z8COalOc.js";
4
- import { B as he } from "./empty-state.IvvHHQ35.js";
5
- import { u as X } from "./i18n.BQkEbtPM.js";
6
- import { d as xe } from "./debounce.DUTu11PS.js";
3
+ import { B as he } from "./loading-indicator.z8COalOc.js";
4
+ import { B as xe } from "./empty-state.DXDb-S58.js";
5
+ import { u as J } from "./i18n.BQkEbtPM.js";
6
+ import { d as Se } from "./debounce.DUTu11PS.js";
7
7
  import "./index.Cl4_42j5.js";
8
- import { B as J } from "./checkbox.DkDqMVeb.js";
8
+ import { B as V } from "./checkbox.DkDqMVeb.js";
9
9
  import { B as Ee } from "./chip.bZEhHfIk.js";
10
- import { C as Le, a as Oe } from "./chevron-up.CSVyoaTy.js";
10
+ import { C as Oe, a as Te } from "./chevron-up.CSVyoaTy.js";
11
11
  import { B as k, a as Z } from "./keyboard-navigation.pB8weElW.js";
12
12
  import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
13
- import { d as Te, e as ce } from "./button-actions.BFtzsfNe.js";
13
+ import { d as Le, e as ce } from "./button-actions.CHZ2BT5_.js";
14
14
  /* empty css */
15
15
  import { o as Ae } from "./resize.Bqks3WUm.js";
16
16
  import "../assets/use-cached-selected-values.css";
17
- const fe = (s, e, t, l) => {
18
- const o = c(
17
+ const ve = (t, e, s, l) => {
18
+ const o = r(
19
19
  () => {
20
- var b, v;
21
- return !!((b = s.value) != null && b.length) && ((v = s.value) == null ? void 0 : v.length) === e.value.length;
20
+ var v, y;
21
+ return !!((v = t.value) != null && v.length) && ((y = t.value) == null ? void 0 : y.length) === e.value.length;
22
22
  }
23
- ), n = c(() => {
24
- var b;
25
- return s.value == null || s.value.length === 0 ? !1 : ((b = s.value) == null ? void 0 : b.length) !== e.value.length;
23
+ ), n = r(() => {
24
+ var v;
25
+ return t.value == null || t.value.length === 0 ? !1 : ((v = t.value) == null ? void 0 : v.length) !== e.value.length;
26
26
  });
27
27
  return {
28
28
  isAllSelected: o,
29
29
  isIndeterminate: n,
30
- toggleSelectAll: (b) => {
31
- b ? t() : l();
30
+ toggleSelectAll: (v) => {
31
+ v ? s() : l();
32
32
  }
33
33
  };
34
34
  };
35
- function Ie(s, { disabled: e, itemHeight: t, overscan: l = 5, prefixHeight: o }) {
36
- const n = O(null), a = O([]), b = O(0), v = O(0), r = O(0);
37
- let m;
38
- const S = c(() => {
39
- const d = typeof t == "number" ? s.value.length * t : s.value.reduce((L, _, x) => L + t(x), 0), C = typeof t == "number" ? b.value * t : s.value.slice(0, b.value).reduce((L, _, x) => L + t(x), 0);
35
+ function Ie(t, { disabled: e, itemHeight: s, overscan: l = 5, prefixHeight: o }) {
36
+ const n = A(null), a = A([]), v = A(0), y = A(0), u = A(0);
37
+ let i;
38
+ const x = r(() => {
39
+ const f = typeof s == "number" ? t.value.length * s : t.value.reduce((T, m, E) => T + s(E), 0), C = typeof s == "number" ? v.value * s : t.value.slice(0, v.value).reduce((T, m, E) => T + s(E), 0);
40
40
  return {
41
41
  style: {
42
42
  marginTop: `${C}px`,
43
- height: `${d - C}px`
43
+ height: `${f - C}px`
44
44
  }
45
45
  };
46
- }), E = () => {
47
- const d = (o == null ? void 0 : o.value) ?? 0, C = Math.max(n.value.scrollTop - d, 0);
48
- if (typeof t == "number")
49
- return Math.floor(C / t);
50
- let L = 0, _ = 0;
51
- for (let x = 0; x < s.value.length; x += 1) {
52
- const B = t(x);
53
- if (L += B, L >= C) {
54
- _ = x;
46
+ }), L = () => {
47
+ const f = (o == null ? void 0 : o.value) ?? 0, C = Math.max(n.value.scrollTop - f, 0);
48
+ if (typeof s == "number")
49
+ return Math.floor(C / s);
50
+ let T = 0, m = 0;
51
+ for (let E = 0; E < t.value.length; E += 1) {
52
+ const B = s(E);
53
+ if (T += B, T >= C) {
54
+ m = E;
55
55
  break;
56
56
  }
57
57
  }
58
- return _;
59
- }, A = () => {
60
- if (r.value = n.value.clientHeight, typeof t == "number")
61
- return Math.ceil(r.value / t);
62
- const d = b.value ?? 0;
63
- let C = 0, L = 0;
64
- for (let _ = d; _ < s.value.length; _ += 1) {
65
- const x = t(_);
66
- if (C += x, L = _, C > r.value)
58
+ return m;
59
+ }, S = () => {
60
+ if (u.value = n.value.clientHeight, typeof s == "number")
61
+ return Math.ceil(u.value / s);
62
+ const f = v.value ?? 0;
63
+ let C = 0, T = 0;
64
+ for (let m = f; m < t.value.length; m += 1) {
65
+ const E = s(m);
66
+ if (C += E, T = m, C > u.value)
67
67
  break;
68
68
  }
69
- return L - d;
70
- }, T = () => {
69
+ return T - f;
70
+ }, O = () => {
71
71
  if (n.value) {
72
- const d = A();
73
- b.value = E(), v.value = Math.min(b.value + d + l, s.value.length), a.value = s.value.slice(b.value, v.value);
72
+ const f = S();
73
+ v.value = L(), y.value = Math.min(v.value + f + l, t.value.length), a.value = t.value.slice(v.value, y.value);
74
74
  }
75
75
  }, I = () => {
76
- T();
76
+ O();
77
77
  };
78
78
  e || (de(() => {
79
- n.value && (r.value = n.value.clientHeight, m = Ae(n.value, ({ clientHeight: d }) => {
80
- r.value = d, T();
81
- }), T());
79
+ n.value && (u.value = n.value.clientHeight, i = Ae(n.value, ({ clientHeight: f }) => {
80
+ u.value = f, O();
81
+ }), O());
82
82
  }), ye(() => {
83
- m == null || m.disconnect();
84
- }), be(
85
- () => s.value,
83
+ i == null || i.disconnect();
84
+ }), fe(
85
+ () => t.value,
86
86
  () => {
87
- T();
87
+ O();
88
88
  }
89
89
  ));
90
- const f = {
90
+ const b = {
91
91
  ref: n,
92
92
  style: { overflowY: "auto" }
93
93
  };
94
94
  return e ? {
95
95
  containerRef: n,
96
- containerProps: f,
96
+ containerProps: b,
97
97
  // eslint-disable-next-line @typescript-eslint/no-empty-function
98
98
  onScroll: () => {
99
99
  },
100
- list: s
100
+ list: t
101
101
  } : {
102
102
  containerRef: n,
103
- containerProps: f,
103
+ containerProps: b,
104
104
  onScroll: I,
105
105
  list: a,
106
- wrapperProps: S
106
+ wrapperProps: x
107
107
  };
108
108
  }
109
- var i = /* @__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))(i || {}), F = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(F || {});
110
- const Re = P({
109
+ var c = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(c || {}), F = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(F || {});
110
+ const Re = $({
111
111
  name: "bento-listbox-static-category",
112
112
  components: {
113
113
  BentoTypography: G
@@ -123,8 +123,8 @@ const Re = P({
123
123
  }
124
124
  });
125
125
  var Be = function() {
126
- var e = this, t = e._self._c;
127
- return e._self._setupProxy, t("div", { staticClass: "b-listbox-single-select-category" }, [t("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), t("div", [e._t("default")], 2)], 1);
126
+ var e = this, s = e._self._c;
127
+ return e._self._setupProxy, s("div", { staticClass: "b-listbox-single-select-category" }, [s("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), s("div", [e._t("default")], 2)], 1);
128
128
  }, ke = [], De = /* @__PURE__ */ D(
129
129
  Re,
130
130
  Be,
@@ -133,7 +133,7 @@ var Be = function() {
133
133
  null,
134
134
  "4aa8cc6e"
135
135
  );
136
- const Ne = De.exports, Me = P({
136
+ const Ne = De.exports, Me = $({
137
137
  name: "bento-listbox-option",
138
138
  props: {
139
139
  /**
@@ -145,21 +145,21 @@ const Ne = De.exports, Me = P({
145
145
  */
146
146
  selected: { type: Boolean, default: !1 }
147
147
  },
148
- emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
149
- setup(s, { emit: e }) {
150
- const t = c(() => ({
151
- "b-listbox-option--disabled": s.disabled,
152
- "b-listbox-option--selected": s.selected
148
+ emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
149
+ setup(t, { emit: e }) {
150
+ const s = r(() => ({
151
+ "b-listbox-option--disabled": t.disabled,
152
+ "b-listbox-option--selected": t.selected
153
153
  }));
154
154
  return {
155
155
  // Enums
156
156
  BentoKeyboardNavigationKeyDownEvent: k,
157
- BentoListboxEvent: i,
157
+ BentoListboxEvent: c,
158
158
  // Values
159
- conditionalClasses: t,
159
+ conditionalClasses: s,
160
160
  // Events
161
161
  onClick: (n) => {
162
- e(i.CLICK, n);
162
+ e(c.CLICK, n);
163
163
  },
164
164
  onOptionSelected: (n, a) => {
165
165
  e(n, a);
@@ -167,24 +167,24 @@ const Ne = De.exports, Me = P({
167
167
  };
168
168
  }
169
169
  });
170
- var Pe = function() {
171
- var e = this, t = e._self._c;
172
- return e._self._setupProxy, t("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(l) {
170
+ var $e = function() {
171
+ var e = this, s = e._self._c;
172
+ return e._self._setupProxy, s("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(l) {
173
173
  return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, l);
174
174
  }, function(l) {
175
175
  return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, l);
176
176
  }, function(l) {
177
177
  return !l.type.indexOf("key") && e._k(l.keyCode, "tab", 9, l.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, l);
178
178
  }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
179
- }, we = [], $e = /* @__PURE__ */ D(
179
+ }, we = [], Pe = /* @__PURE__ */ D(
180
180
  Me,
181
- Pe,
181
+ $e,
182
182
  we,
183
183
  !1,
184
184
  null,
185
185
  "d7fb415c"
186
186
  );
187
- const V = $e.exports;
187
+ const Y = Pe.exports;
188
188
  let re = 0;
189
189
  const Fe = {
190
190
  beforeCreate() {
@@ -192,8 +192,8 @@ const Fe = {
192
192
  }
193
193
  };
194
194
  var Ge = function() {
195
- var e = this, t = e._self._c;
196
- return t("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"] ? t("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), t("path", { attrs: { fill: "#00112C", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
195
+ var e = this, s = e._self._c;
196
+ return s("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"] ? s("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), s("path", { attrs: { fill: "#00112C", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
197
197
  }, Ue = [], ze = /* @__PURE__ */ D(
198
198
  Fe,
199
199
  Ge,
@@ -202,12 +202,12 @@ var Ge = function() {
202
202
  null,
203
203
  null
204
204
  );
205
- const Ve = ze.exports, Ye = P({
205
+ const Ye = ze.exports, We = $({
206
206
  name: "bento-listbox-single-select-option",
207
207
  components: {
208
- BentoListboxOption: V,
208
+ BentoListboxOption: Y,
209
209
  BentoTypography: G,
210
- CheckmarkIcon: Ve
210
+ CheckmarkIcon: Ye
211
211
  },
212
212
  props: {
213
213
  /**
@@ -227,26 +227,26 @@ const Ve = ze.exports, Ye = P({
227
227
  */
228
228
  selected: { type: Boolean, default: !1 }
229
229
  },
230
- emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
231
- setup(s, { emit: e }) {
232
- const t = (a) => {
233
- s.disabled || e(a, s.option);
234
- }, l = c(() => s.disabled ? !0 : null), o = c(() => s.selected ? !0 : null), n = c(() => s.disabled ? -1 : 0);
230
+ emits: [c.ENTER, c.SELECT, c.SPACE, c.TAB],
231
+ setup(t, { emit: e }) {
232
+ const s = (a) => {
233
+ t.disabled || e(a, t.option);
234
+ }, l = r(() => t.disabled ? !0 : null), o = r(() => t.selected ? !0 : null), n = r(() => t.disabled ? -1 : 0);
235
235
  return {
236
236
  // Values
237
237
  ariaDisabled: l,
238
238
  ariaSelected: o,
239
239
  tabIndex: n,
240
240
  // Enums
241
- BentoListboxEvent: i,
241
+ BentoListboxEvent: c,
242
242
  // Events
243
- onOptionSelected: t
243
+ onOptionSelected: s
244
244
  };
245
245
  }
246
246
  });
247
- var We = function() {
248
- var e = this, t = e._self._c;
249
- return e._self._setupProxy, t("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(l) {
247
+ var Ke = function() {
248
+ var e = this, s = e._self._c;
249
+ return e._self._setupProxy, s("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(l) {
250
250
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
251
251
  }, "enter-pressed": function(l) {
252
252
  return e.onOptionSelected(e.BentoListboxEvent.ENTER);
@@ -255,29 +255,29 @@ var We = function() {
255
255
  }, "tab-pressed": function(l) {
256
256
  return e.onOptionSelected(e.BentoListboxEvent.TAB);
257
257
  } } }, [e._t("default", function() {
258
- return [t("span", { staticClass: "b-listbox-single-select-option__text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? t("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
259
- }, null, e.option), t("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [t("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
260
- }, Ke = [], qe = /* @__PURE__ */ D(
261
- Ye,
258
+ return [s("span", { staticClass: "b-listbox-single-select-option__text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? s("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
259
+ }, null, e.option), s("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [s("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
260
+ }, qe = [], je = /* @__PURE__ */ D(
262
261
  We,
263
262
  Ke,
263
+ qe,
264
264
  !1,
265
265
  null,
266
266
  "5a5ff36a"
267
267
  );
268
- const je = qe.exports, ve = ({ items: s, isOptionDisabled: e, hasStaticCategories: t }, l) => {
269
- const o = c(
270
- () => t.value ? s.value.flatMap((f) => f.items) : s.value
271
- ), n = c(() => o.value.length - 1), a = O(0);
268
+ const He = je.exports, be = ({ items: t, isOptionDisabled: e, hasStaticCategories: s }, l) => {
269
+ const o = r(
270
+ () => s.value ? t.value.flatMap((b) => b.items) : t.value
271
+ ), n = r(() => o.value.length - 1), a = A(0);
272
272
  de(() => {
273
- e && (a.value = s.value.findIndex((f) => !e(f)));
273
+ e && (a.value = t.value.findIndex((b) => !e(b)));
274
274
  });
275
- const b = (f) => {
276
- var L, _;
277
- const C = ((_ = (L = s.value[f]) == null ? void 0 : L.items) == null ? void 0 : _.length) ? s.value[f].items.every((x) => e(x)) : e(s.value[f]);
275
+ const v = (b) => {
276
+ var T, m;
277
+ const C = ((m = (T = t.value[b]) == null ? void 0 : T.items) == null ? void 0 : m.length) ? t.value[b].items.every((E) => e(E)) : e(t.value[b]);
278
278
  return !e || !!e && C;
279
- }, v = (f) => {
280
- switch (f) {
279
+ }, y = (b) => {
280
+ switch (b) {
281
281
  case "increase":
282
282
  a.value += 1;
283
283
  break;
@@ -285,50 +285,50 @@ const je = qe.exports, ve = ({ items: s, isOptionDisabled: e, hasStaticCategorie
285
285
  a.value -= 1;
286
286
  break;
287
287
  }
288
- }, r = ({ edgeCaseItem: f }, d, C) => {
289
- a.value !== f && (v(C), b(a.value) && d(), l(a.value));
290
- }, m = (f) => {
291
- I(f), r(
288
+ }, u = ({ edgeCaseItem: b }, f, C) => {
289
+ a.value !== b && (y(C), v(a.value) && f(), l(a.value));
290
+ }, i = (b) => {
291
+ I(b), u(
292
292
  {
293
293
  edgeCaseItem: n.value
294
294
  },
295
- m,
295
+ i,
296
296
  "increase"
297
297
  /* INCREASE */
298
298
  );
299
- }, S = (f) => {
300
- I(f), r(
299
+ }, x = (b) => {
300
+ I(b), u(
301
301
  {
302
302
  edgeCaseItem: 0
303
303
  },
304
- S,
304
+ x,
305
305
  "decrease"
306
306
  /* DECREASE */
307
307
  );
308
- }, E = () => {
309
- a.value = 0, b(a.value) ? m() : l(a.value);
310
- }, A = () => {
311
- a.value = n.value, b(a.value) ? S() : l(a.value);
312
- }, T = (f) => {
313
- a.value = f;
314
- }, I = (f) => {
315
- var d;
316
- (d = f == null ? void 0 : f.detail) == null || d.preventDefault();
308
+ }, L = () => {
309
+ a.value = 0, v(a.value) ? i() : l(a.value);
310
+ }, S = () => {
311
+ a.value = n.value, v(a.value) ? x() : l(a.value);
312
+ }, O = (b) => {
313
+ a.value = b;
314
+ }, I = (b) => {
315
+ var f;
316
+ (f = b == null ? void 0 : b.detail) == null || f.preventDefault();
317
317
  };
318
318
  return {
319
- moveToFirstElement: E,
320
- moveToLastElement: A,
321
- moveToNextElement: m,
322
- moveToPreviousElement: S,
323
- setListboxFocusedIndex: T,
319
+ moveToFirstElement: L,
320
+ moveToLastElement: S,
321
+ moveToNextElement: i,
322
+ moveToPreviousElement: x,
323
+ setListboxFocusedIndex: O,
324
324
  preventDefault: I,
325
325
  focusedIndex: a
326
326
  };
327
- }, He = P({
327
+ }, Xe = $({
328
328
  name: "bento-listbox-single-select",
329
329
  components: {
330
330
  BentoListboxSingleSelectCategory: Ne,
331
- BentoListboxSingleSelectOption: je
331
+ BentoListboxSingleSelectOption: He
332
332
  },
333
333
  directives: { BentoKeyboardNavigationDirective: Z },
334
334
  inheritAttrs: !1,
@@ -371,41 +371,41 @@ const je = qe.exports, ve = ({ items: s, isOptionDisabled: e, hasStaticCategorie
371
371
  */
372
372
  staticCategories: { type: Boolean, default: !1 }
373
373
  },
374
- emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
375
- setup(s, { emit: e, expose: t, slots: l }) {
376
- const o = O(null), n = O([]), a = c(() => {
377
- var d;
378
- return !!((d = s.selectedValue) != null && d.length) && s.selectedValue.at(0);
379
- }), b = c(() => !!s.items.some(({ items: d }) => !!d)), v = (d) => (C) => {
380
- e(d, [C]);
381
- }, r = (d) => {
374
+ emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
375
+ setup(t, { emit: e, expose: s, slots: l }) {
376
+ const o = A(null), n = A([]), a = r(() => {
377
+ var f;
378
+ return !!((f = t.selectedValue) != null && f.length) && t.selectedValue.at(0);
379
+ }), v = r(() => !!t.items.some(({ items: f }) => !!f)), y = (f) => (C) => {
380
+ e(f, [C]);
381
+ }, u = (f) => {
382
382
  var C;
383
- (C = o.value.querySelectorAll('[role="option"]')[d]) == null || C.focus();
383
+ (C = o.value.querySelectorAll('[role="option"]')[f]) == null || C.focus();
384
384
  }, {
385
- moveToNextElement: m,
386
- moveToPreviousElement: S,
387
- moveToFirstElement: E,
388
- moveToLastElement: A,
389
- setListboxFocusedIndex: T
390
- } = ve(
385
+ moveToNextElement: i,
386
+ moveToPreviousElement: x,
387
+ moveToFirstElement: L,
388
+ moveToLastElement: S,
389
+ setListboxFocusedIndex: O
390
+ } = be(
391
391
  {
392
- items: w(s, "items"),
393
- isOptionDisabled: s.isOptionDisabled,
394
- hasStaticCategories: w(s, "staticCategories")
392
+ items: w(t, "items"),
393
+ isOptionDisabled: t.isOptionDisabled,
394
+ hasStaticCategories: w(t, "staticCategories")
395
395
  },
396
- r
396
+ u
397
397
  ), I = {
398
- [k.ARROW_UP]: S,
399
- [k.ARROW_DOWN]: m,
400
- [k.HOME]: E,
401
- [k.END]: A
402
- }, f = {
403
- [i.SELECT]: v(i.SELECT),
404
- [i.SPACE]: v(i.SPACE),
405
- [i.TAB]: v(i.TAB),
406
- [i.ENTER]: v(i.ENTER)
398
+ [k.ARROW_UP]: x,
399
+ [k.ARROW_DOWN]: i,
400
+ [k.HOME]: L,
401
+ [k.END]: S
402
+ }, b = {
403
+ [c.SELECT]: y(c.SELECT),
404
+ [c.SPACE]: y(c.SPACE),
405
+ [c.TAB]: y(c.TAB),
406
+ [c.ENTER]: y(c.ENTER)
407
407
  };
408
- return t({
408
+ return s({
409
409
  /**
410
410
  * Reference for a single listbox item.
411
411
  * Required for keyboard navigation in dropdown as $children is removed in vue@3
@@ -415,66 +415,66 @@ const je = qe.exports, ve = ({ items: s, isOptionDisabled: e, hasStaticCategorie
415
415
  * Method to set the index of the item to be focused on
416
416
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
417
417
  */
418
- setListboxFocusedIndex: T
418
+ setListboxFocusedIndex: O
419
419
  }), {
420
420
  // Enums
421
- BentoListboxEvent: i,
421
+ BentoListboxEvent: c,
422
422
  // Values
423
423
  listboxRef: o,
424
424
  listboxItemRef: n,
425
425
  selectedItem: a,
426
426
  slots: l,
427
427
  // Computed
428
- hasCategories: b,
428
+ hasCategories: v,
429
429
  // Methods
430
- onOptionSelected: v,
430
+ onOptionSelected: y,
431
431
  // Keyboard navigation
432
432
  listboxListeners: I,
433
- listboxOptionListeners: f
433
+ listboxOptionListeners: b
434
434
  };
435
435
  }
436
436
  });
437
- var Xe = function() {
438
- var e = this, t = e._self._c;
439
- return e._self._setupProxy, t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(l) {
440
- return t("bento-listbox-single-select-category", { key: l.value, attrs: { "category-label": l.label, role: "group" } }, e._l(l.items, function(o) {
441
- return t("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
442
- return { key: a, fn: function(b) {
443
- return [e._t(a, null, null, b)];
437
+ var Je = function() {
438
+ var e = this, s = e._self._c;
439
+ return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(l) {
440
+ return s("bento-listbox-single-select-category", { key: l.value, attrs: { "category-label": l.label, role: "group" } }, e._l(l.items, function(o) {
441
+ return s("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
442
+ return { key: a, fn: function(v) {
443
+ return [e._t(a, null, null, v)];
444
444
  } };
445
445
  })], null, !0) }, e.listboxOptionListeners));
446
446
  }), 1);
447
447
  }) : e._l(e.items, function(l) {
448
- return t("bento-listbox-single-select-option", e._g({ key: l.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: l, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, selected: l.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
448
+ return s("bento-listbox-single-select-option", e._g({ key: l.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: l, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, selected: l.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
449
449
  return { key: n, fn: function(a) {
450
450
  return [e._t(n, null, null, a)];
451
451
  } };
452
452
  })], null, !0) }, e.listboxOptionListeners));
453
453
  })], 2);
454
- }, Je = [], Ze = /* @__PURE__ */ D(
455
- He,
454
+ }, Ve = [], Ze = /* @__PURE__ */ D(
456
455
  Xe,
457
456
  Je,
457
+ Ve,
458
458
  !1,
459
459
  null,
460
460
  null
461
461
  );
462
462
  const Qe = Ze.exports;
463
- var j = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(j || {}), z = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s))(z || {});
463
+ var H = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.STATIC_CATEGORY = "static-category", t))(H || {}), z = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(z || {});
464
464
  const et = {
465
465
  "en-US": {
466
466
  categoryClosed: "{category} closed",
467
467
  categoryOpened: "{category} opened"
468
468
  }
469
- }, tt = P({
469
+ }, tt = $({
470
470
  i18n: { messages: et },
471
471
  name: "bento-listbox-multi-select-category",
472
472
  components: {
473
- BentoCheckbox: J,
473
+ BentoCheckbox: V,
474
474
  BentoTypography: G,
475
- BentoListboxOption: V,
476
- ChevronDownIcon: Oe,
477
- ChevronUpIcon: Le
475
+ BentoListboxOption: Y,
476
+ ChevronDownIcon: Te,
477
+ ChevronUpIcon: Oe
478
478
  },
479
479
  props: {
480
480
  /**
@@ -520,75 +520,75 @@ const et = {
520
520
  tabindex: { type: Number, default: -1 }
521
521
  },
522
522
  emits: [z.SELECT_CATEGORY, z.UNSELECT_CATEGORY],
523
- setup(s, { emit: e }) {
524
- const t = O(!1), { t: l } = X(), o = (_) => s.isOptionDisabled ? s.isOptionDisabled(_) : !1, n = c(
525
- () => s.category.items.every((_) => o(_))
526
- ), a = w(s, "staticCategories"), b = c(() => t.value || s.staticCategories), v = c(() => ({
527
- [`b-listbox-multi-select-category--${j.DISABLED}`]: n.value,
528
- [`b-listbox-multi-select-category--${j.STATIC_CATEGORY}`]: s.staticCategories
529
- })), r = (_) => {
530
- _.preventDefault(), t.value = !t.value;
531
- }, m = (_) => {
532
- var $;
533
- const x = o(_), B = (($ = s.selectedItemsList) == null ? void 0 : $.includes(_.value)) || !1;
534
- return { isDisabled: x, isPreSelected: B };
535
- }, S = c(
536
- () => s.category.items.filter((_) => {
537
- const { isDisabled: x, isPreSelected: B } = m(_);
538
- return x && B || !x;
523
+ setup(t, { emit: e }) {
524
+ const s = A(!1), { t: l } = J(), o = (m) => t.isOptionDisabled ? t.isOptionDisabled(m) : !1, n = r(
525
+ () => t.category.items.every((m) => o(m))
526
+ ), a = w(t, "staticCategories"), v = r(() => s.value || t.staticCategories), y = r(() => ({
527
+ [`b-listbox-multi-select-category--${H.DISABLED}`]: n.value,
528
+ [`b-listbox-multi-select-category--${H.STATIC_CATEGORY}`]: t.staticCategories
529
+ })), u = (m) => {
530
+ m.preventDefault(), s.value = !s.value;
531
+ }, i = (m) => {
532
+ var P;
533
+ const E = o(m), B = ((P = t.selectedItemsList) == null ? void 0 : P.includes(m.value)) || !1;
534
+ return { isDisabled: E, isPreSelected: B };
535
+ }, x = r(
536
+ () => t.category.items.filter((m) => {
537
+ const { isDisabled: E, isPreSelected: B } = i(m);
538
+ return E && B || !E;
539
539
  })
540
- ), E = c(
540
+ ), L = r(
541
541
  () => {
542
- var _;
543
- return (_ = S.value) == null ? void 0 : _.filter(
544
- ({ value: x }) => {
542
+ var m;
543
+ return (m = x.value) == null ? void 0 : m.filter(
544
+ ({ value: E }) => {
545
545
  var B;
546
- return (B = s.selectedItemsList) == null ? void 0 : B.includes(x);
546
+ return (B = t.selectedItemsList) == null ? void 0 : B.includes(E);
547
547
  }
548
548
  );
549
549
  }
550
- ), A = c(() => {
551
- const _ = t.value ? "categoryOpened" : "categoryClosed";
552
- return l(_, { category: s.category.label });
553
- }), T = c(
550
+ ), S = r(() => {
551
+ const m = s.value ? "categoryOpened" : "categoryClosed";
552
+ return l(m, { category: t.category.label });
553
+ }), O = r(
554
554
  () => ({
555
555
  el: "span",
556
- variant: s.staticCategories ? "caption" : "body"
556
+ variant: t.staticCategories ? "caption" : "body"
557
557
  })
558
558
  ), I = () => {
559
559
  e(z.SELECT_CATEGORY);
560
- }, f = () => {
560
+ }, b = () => {
561
561
  e(z.UNSELECT_CATEGORY);
562
- }, { isAllSelected: d, isIndeterminate: C, toggleSelectAll: L } = fe(
563
- E,
564
- S,
562
+ }, { isAllSelected: f, isIndeterminate: C, toggleSelectAll: T } = ve(
563
+ L,
564
+ x,
565
565
  I,
566
- f
566
+ b
567
567
  );
568
568
  return {
569
569
  // Values
570
- chevronTitle: A,
571
- conditionalClass: v,
570
+ chevronTitle: S,
571
+ conditionalClass: y,
572
572
  hasAllPropsDisabled: n,
573
- isOpen: t,
574
- isAllSelected: d,
573
+ isOpen: s,
574
+ isAllSelected: f,
575
575
  isIndeterminate: C,
576
576
  isStaticCategory: a,
577
577
  // Computed
578
- showItemChildren: b,
579
- categoryLabelProps: T,
578
+ showItemChildren: v,
579
+ categoryLabelProps: O,
580
580
  // Methods
581
- toggleOpen: r,
582
- toggleSelectAll: L
581
+ toggleOpen: u,
582
+ toggleSelectAll: T
583
583
  };
584
584
  }
585
585
  });
586
586
  var st = function() {
587
- var e = this, t = e._self._c;
588
- return e._self._setupProxy, t("div", [t("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : t("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value, tabindex: e.tabindex }, on: { "update:model-value": e.toggleSelectAll } }), t("span", { staticClass: "b-listbox-multi-select-category__label" }, [t("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : t("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(l) {
587
+ var e = this, s = e._self._c;
588
+ return e._self._setupProxy, s("div", [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : s("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value, tabindex: e.tabindex }, on: { "update:model-value": e.toggleSelectAll } }), s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : s("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(l) {
589
589
  return e.toggleOpen.apply(null, arguments);
590
- } } }, [e.isOpen ? t("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : t("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), t("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
591
- }, lt = [], nt = /* @__PURE__ */ D(
590
+ } } }, [e.isOpen ? s("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : s("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
591
+ }, lt = [], ot = /* @__PURE__ */ D(
592
592
  tt,
593
593
  st,
594
594
  lt,
@@ -596,15 +596,15 @@ var st = function() {
596
596
  null,
597
597
  "09983823"
598
598
  );
599
- const ot = nt.exports;
600
- var M = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", s.UNSELECT_CATEGORY = "unselect-category", s))(M || {});
601
- const at = P({
599
+ const nt = ot.exports;
600
+ var M = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(M || {});
601
+ const at = $({
602
602
  name: "listbox-multi-select-options",
603
603
  components: {
604
- BentoCheckbox: J,
605
- BentoListboxOption: V,
604
+ BentoCheckbox: V,
605
+ BentoListboxOption: Y,
606
606
  BentoTypography: G,
607
- ListboxMultiSelectCategory: ot
607
+ ListboxMultiSelectCategory: nt
608
608
  },
609
609
  props: {
610
610
  /**
@@ -670,48 +670,48 @@ const at = P({
670
670
  M.SELECT_CATEGORY,
671
671
  M.UNSELECT_CATEGORY
672
672
  ],
673
- setup(s, { emit: e }) {
674
- const t = (r) => {
675
- e(M.TOGGLE_CHECKBOX_SELECTION, r);
676
- }, l = (r) => !!r.items, o = (r) => {
677
- const m = s.isMultiLevel && s.searching;
678
- return r.description && (!s.isMultiLevel || m);
679
- }, n = (r) => r.items ? !!r.items.find((m) => s.selectedItemsList.includes(m.value)) : s.selectedItemsList.includes(r.value), a = (r, m) => {
680
- if (l(m))
681
- return e(r ? M.SELECT_CATEGORY : M.UNSELECT_CATEGORY, m);
682
- t(m.value);
673
+ setup(t, { emit: e }) {
674
+ const s = (u) => {
675
+ e(M.TOGGLE_CHECKBOX_SELECTION, u);
676
+ }, l = (u) => !!u.items, o = (u) => {
677
+ const i = t.isMultiLevel && t.searching;
678
+ return u.description && (!t.isMultiLevel || i);
679
+ }, n = (u) => u.items ? !!u.items.find((i) => t.selectedItemsList.includes(i.value)) : t.selectedItemsList.includes(u.value), a = (u, i) => {
680
+ if (l(i))
681
+ return e(u ? M.SELECT_CATEGORY : M.UNSELECT_CATEGORY, i);
682
+ s(i.value);
683
683
  };
684
684
  return {
685
685
  // Values
686
- conditionalClasses: c(() => ({
687
- "b-listbox-multi-select-options__static-category-option": s.staticCategories,
688
- "b-listbox-multi-select-options__category-option": s.categoryItems
686
+ conditionalClasses: r(() => ({
687
+ "b-listbox-multi-select-options__static-category-option": t.staticCategories,
688
+ "b-listbox-multi-select-options__category-option": t.categoryItems
689
689
  })),
690
690
  // Methods
691
691
  isOptionSelected: n,
692
692
  shouldShowDescription: o,
693
- toggleCheckboxSelection: t,
693
+ toggleCheckboxSelection: s,
694
694
  selectSearch: a,
695
- computedTabindex: (r) => r + 1 === s.focusedIndex ? 0 : -1,
695
+ computedTabindex: (u) => u + 1 === t.focusedIndex ? 0 : -1,
696
696
  // Enums
697
- BentoListboxEvent: i,
697
+ BentoListboxEvent: c,
698
698
  ListboxMultiSelectOptionsEvent: M
699
699
  };
700
700
  }
701
701
  });
702
702
  var it = function() {
703
- var e = this, t = e._self._c;
704
- return e._self._setupProxy, t("div", e._l(e.items, function(l, o) {
705
- return t("div", { key: `selected-${l.value}` }, [e.searching && e.isMultiLevel ? [t("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [t("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(l), "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": (n) => e.selectSearch(n, l) } }), e._t("default", function() {
706
- return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? t("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
707
- }, null, l)], 2)] : [l.items ? [t("listbox-multi-select-category", { attrs: { category: l, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(o) }, on: { "select-category": function(n) {
703
+ var e = this, s = e._self._c;
704
+ return e._self._setupProxy, s("div", e._l(e.items, function(l, o) {
705
+ return s("div", { key: `selected-${l.value}` }, [e.searching && e.isMultiLevel ? [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(l), "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": (n) => e.selectSearch(n, l) } }), e._t("default", function() {
706
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
707
+ }, null, l)], 2)] : [l.items ? [s("listbox-multi-select-category", { attrs: { category: l, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(o) }, on: { "select-category": function(n) {
708
708
  return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l);
709
709
  }, "unselect-category": function(n) {
710
710
  return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l);
711
- } } }, [t("listbox-multi-select-options", { attrs: { "category-items": "", items: l.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": (n) => e.toggleCheckboxSelection(n) } })], 1)] : t("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [t("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": function(n) {
711
+ } } }, [s("listbox-multi-select-options", { attrs: { "category-items": "", items: l.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": (n) => e.toggleCheckboxSelection(n) } })], 1)] : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": function(n) {
712
712
  return e.toggleCheckboxSelection(l);
713
713
  } } }), e._t("default", function() {
714
- return [t("span", { staticClass: "b-listbox-multi-select__option-text" }, [t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? t("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
714
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
715
715
  }, null, l)], 2)]], 2);
716
716
  }), 0);
717
717
  }, ct = [], rt = /* @__PURE__ */ D(
@@ -722,27 +722,27 @@ var it = function() {
722
722
  null,
723
723
  "18d7cecf"
724
724
  );
725
- const ut = rt.exports, dt = (s) => {
726
- const e = c(() => {
725
+ const ut = rt.exports, dt = (t) => {
726
+ const e = r(() => {
727
727
  var l;
728
- return !!((l = s.value) != null && l.find(({ items: o }) => !!o));
729
- }), t = c(() => {
728
+ return !!((l = t.value) != null && l.find(({ items: o }) => !!o));
729
+ }), s = r(() => {
730
730
  var l;
731
- return e.value ? (l = s.value) == null ? void 0 : l.reduce((o, n) => (n.items ? o.push(...n.items.flat()) : o.push(n), o), []) : s.value;
731
+ return e.value ? (l = t.value) == null ? void 0 : l.reduce((o, n) => (n.items ? o.push(...n.items.flat()) : o.push(n), o), []) : t.value;
732
732
  });
733
733
  return {
734
734
  isMultiLevelSelect: e,
735
- flattenedItemsList: t
735
+ flattenedItemsList: s
736
736
  };
737
- }, bt = {
737
+ }, ft = {
738
738
  "en-US": {
739
739
  allSelected: "All selected ({total})",
740
740
  numberOfTotalSelected: "{number} of {total} selected",
741
741
  numbersSelected: "{number} selected",
742
742
  selectAll: "Select all ({total})"
743
743
  }
744
- }, ft = { i18n: { messages: bt } }, vt = /* @__PURE__ */ P({
745
- ...ft,
744
+ }, vt = { i18n: { messages: ft } }, bt = /* @__PURE__ */ $({
745
+ ...vt,
746
746
  __name: "listbox-multi-select",
747
747
  props: {
748
748
  hasMoreItems: { type: Boolean, default: !1 },
@@ -754,119 +754,119 @@ const ut = rt.exports, dt = (s) => {
754
754
  staticCategories: { type: Boolean, default: !1 }
755
755
  },
756
756
  emits: ["select"],
757
- setup(s, { emit: e }) {
758
- const t = s, { t: l } = X(), o = Ce(), n = O(null), a = O(null), b = O(null), v = c(() => t.selectedValues.map(({ value: u }) => u)), { isMultiLevelSelect: r, flattenedItemsList: m } = dt(w(t, "items")), S = (u) => {
757
+ setup(t, { emit: e }) {
758
+ const s = t, { t: l } = J(), o = Ce(), n = A(null), a = A(null), v = A(null), y = r(() => s.selectedValues.map(({ value: d }) => d)), { isMultiLevelSelect: u, flattenedItemsList: i } = dt(w(s, "items")), x = (d) => {
759
759
  var h;
760
- const g = t.isOptionDisabled(u), p = ((h = v.value) == null ? void 0 : h.includes(u.value)) || !1;
761
- return { isDisabled: g, isPreSelected: p };
762
- }, E = c(() => {
763
- if (t.searching && r)
764
- return t.items;
765
- const u = m.value.filter((g) => {
766
- const { isDisabled: p, isPreSelected: h } = S(g);
767
- return p && h || !p;
760
+ const _ = s.isOptionDisabled(d), g = ((h = y.value) == null ? void 0 : h.includes(d.value)) || !1;
761
+ return { isDisabled: _, isPreSelected: g };
762
+ }, L = r(() => {
763
+ if (s.searching && u)
764
+ return s.items;
765
+ const d = i.value.filter((_) => {
766
+ const { isDisabled: g, isPreSelected: h } = x(_);
767
+ return g && h || !g;
768
768
  });
769
- return t.selectedValues.forEach((g) => {
770
- u.find((p) => p.value === g.value) || u.push(g);
771
- }), u;
772
- }), A = c(
769
+ return s.selectedValues.forEach((_) => {
770
+ d.find((g) => g.value === _.value) || d.push(_);
771
+ }), d;
772
+ }), S = r(
773
773
  () => {
774
- var u;
775
- return (u = E.value) == null ? void 0 : u.filter((g) => {
776
- var p;
777
- return g.items && r.value && t.searching ? g.items.filter(
778
- (y) => (t.selectedValues ?? []).includes(y.value)
779
- ).length === g.items.length : (p = v.value) == null ? void 0 : p.includes(g.value);
774
+ var d;
775
+ return (d = L.value) == null ? void 0 : d.filter((_) => {
776
+ var g;
777
+ return _.items && u.value && s.searching ? _.items.filter(
778
+ (p) => (s.selectedValues ?? []).includes(p.value)
779
+ ).length === _.items.length : (g = y.value) == null ? void 0 : g.includes(_.value);
780
780
  });
781
781
  }
782
- ), T = () => r.value && !t.searching ? m.value.length : t.items.length, I = c(() => {
782
+ ), O = () => u.value && !s.searching ? i.value.length : s.items.length, I = r(() => {
783
783
  var h;
784
- const u = E.value.length, g = T(), p = ((h = A.value) == null ? void 0 : h.length) || 0;
785
- return p === 0 ? l("selectAll", { total: u }) : p === g ? l("allSelected", { total: g }) : p <= g ? l("numberOfTotalSelected", { number: p, total: g }) : l("numbersSelected", { number: p });
786
- }), f = (u) => {
787
- const g = (h) => {
788
- const { isDisabled: y, isPreSelected: N } = S(h);
789
- return y && N || !y;
790
- }, p = u.filter(g).filter((h) => !v.value.includes(h.value));
791
- e("select", [...t.selectedValues, ...p]);
792
- }, d = (u) => {
793
- const g = (y) => {
794
- const { isDisabled: N, isPreSelected: pe } = S(y);
784
+ const d = L.value.length, _ = O(), g = ((h = S.value) == null ? void 0 : h.length) || 0;
785
+ return g === 0 ? l("selectAll", { total: d }) : g === _ ? l("allSelected", { total: _ }) : g <= _ ? l("numberOfTotalSelected", { number: g, total: _ }) : l("numbersSelected", { number: g });
786
+ }), b = (d) => {
787
+ const _ = (h) => {
788
+ const { isDisabled: p, isPreSelected: N } = x(h);
789
+ return p && N || !p;
790
+ }, g = d.filter(_).filter((h) => !y.value.includes(h.value));
791
+ e("select", [...s.selectedValues, ...g]);
792
+ }, f = (d) => {
793
+ const _ = (p) => {
794
+ const { isDisabled: N, isPreSelected: pe } = x(p);
795
795
  return !(N && pe);
796
- }, p = u.filter(g).map(({ value: y }) => y), h = t.selectedValues.filter((y) => !(p != null && p.includes(y.value)));
796
+ }, g = d.filter(_).map(({ value: p }) => p), h = s.selectedValues.filter((p) => !(g != null && g.includes(p.value)));
797
797
  e("select", h);
798
798
  }, C = () => {
799
- f(m.value);
800
- }, L = () => {
801
- d(m.value);
802
- }, { isAllSelected: _, isIndeterminate: x, toggleSelectAll: B } = fe(
803
- A,
804
- E,
799
+ b(i.value);
800
+ }, T = () => {
801
+ f(i.value);
802
+ }, { isAllSelected: m, isIndeterminate: E, toggleSelectAll: B } = ve(
803
+ S,
804
+ L,
805
805
  C,
806
- L
807
- ), $ = (u) => {
808
- f(u.items);
809
- }, Y = (u) => {
810
- d(u.items);
811
- }, W = (u, g) => {
812
- let p = !1;
813
- const h = t.selectedValues.filter(({ value: y }) => g.value === y ? (p = !0, !1) : !0);
814
- p || h.push(g), e(u, h);
815
- }, K = c(() => {
816
- if (!r.value)
817
- return t.selectedValues;
818
- const u = (y) => v.value.includes(y.value), g = (y) => !t.staticCategories && y.every((N) => u(N));
819
- return t.items.flatMap(
820
- (y) => y.items && !g(y.items) ? y.items : y
821
- ).filter((y) => y.items ? !0 : u(y));
822
- }), R = c(() => {
823
- var p, h, y, N;
824
- const u = ["automatic", "button"].includes(t.lazyLoadType), g = ((p = t.selectedValues) == null ? void 0 : p.length) > 0 && ((h = A.value) == null ? void 0 : h.length) !== ((y = m.value) == null ? void 0 : y.length);
825
- return u && t.hasMoreItems ? !!((N = t.selectedValues) != null && N.length) : g;
826
- }), U = c(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), Q = c(
806
+ T
807
+ ), P = (d) => {
808
+ b(d.items);
809
+ }, W = (d) => {
810
+ f(d.items);
811
+ }, K = (d, _) => {
812
+ let g = !1;
813
+ const h = s.selectedValues.filter(({ value: p }) => _.value === p ? (g = !0, !1) : !0);
814
+ g || h.push(_), e(d, h);
815
+ }, q = r(() => {
816
+ if (!u.value)
817
+ return s.selectedValues;
818
+ const d = (p) => y.value.includes(p.value), _ = (p) => !s.staticCategories && p.every((N) => d(N));
819
+ return s.items.flatMap(
820
+ (p) => p.items && !_(p.items) ? p.items : p
821
+ ).filter((p) => p.items ? !0 : d(p));
822
+ }), R = r(() => {
823
+ var g, h, p, N;
824
+ const d = ["automatic", "button"].includes(s.lazyLoadType), _ = ((g = s.selectedValues) == null ? void 0 : g.length) > 0 && ((h = S.value) == null ? void 0 : h.length) !== ((p = i.value) == null ? void 0 : p.length);
825
+ return d && s.hasMoreItems ? !!((N = s.selectedValues) != null && N.length) : _;
826
+ }), U = r(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), Q = r(
827
827
  () => n.value ? [n.value] : []
828
- ), ee = c(
828
+ ), ee = r(
829
829
  () => {
830
- var u, g;
831
- return (g = (u = b.value) == null ? void 0 : u.$children) != null && g.length ? b.value.$children : [];
830
+ var d, _;
831
+ return (_ = (d = v.value) == null ? void 0 : d.$children) != null && _.length ? v.value.$children : [];
832
832
  }
833
- ), te = c(() => ({ label: I, value: _ })), se = c(() => [te, ...w(t, "items").value]), le = (u) => {
833
+ ), te = r(() => ({ label: I, value: m })), se = r(() => [te, ...w(s, "items").value]), le = (d) => {
834
834
  var h;
835
- const g = [...Q.value, ...ee.value], p = g[u].$el;
836
- p.tagName === "LABEL" ? p.focus() : (h = p.querySelector("label")) == null || h.focus(), g[u].$el.focus();
835
+ const _ = [...Q.value, ...ee.value], g = _[d].$el;
836
+ g.tagName === "LABEL" ? g.focus() : (h = g.querySelector("label")) == null || h.focus(), _[d].$el.focus();
837
837
  }, {
838
- moveToNextElement: ne,
839
- moveToPreviousElement: oe,
838
+ moveToNextElement: oe,
839
+ moveToPreviousElement: ne,
840
840
  moveToFirstElement: ae,
841
841
  moveToLastElement: ie,
842
- preventDefault: q,
842
+ preventDefault: j,
843
843
  focusedIndex: me
844
- } = ve(
844
+ } = be(
845
845
  {
846
- items: O(se),
847
- isOptionDisabled: t.isOptionDisabled,
848
- hasStaticCategories: w(t, "staticCategories")
846
+ items: A(se),
847
+ isOptionDisabled: s.isOptionDisabled,
848
+ hasStaticCategories: w(s, "staticCategories")
849
849
  },
850
850
  le
851
851
  ), _e = {
852
- [k.ARROW_UP]: (u) => oe(u),
853
- [k.ARROW_DOWN]: (u) => ne(u),
852
+ [k.ARROW_UP]: (d) => ne(d),
853
+ [k.ARROW_DOWN]: (d) => oe(d),
854
854
  [k.HOME]: ae,
855
855
  [k.END]: ie
856
856
  }, ge = {
857
- [k.ARROW_UP]: q,
858
- [k.ARROW_DOWN]: q
857
+ [k.ARROW_UP]: j,
858
+ [k.ARROW_DOWN]: j
859
859
  };
860
- return { __sfc: !0, props: t, emit: e, t: l, slots: o, selectAllListboxItemsRef: n, selectedListboxItemsRef: a, listboxItemsRef: b, selectedItemsList: v, isMultiLevelSelect: r, flattenedItemsList: m, optionStates: S, enabledItems: E, visibleSelectedList: A, calculateTotalItems: T, selectAllCheckboxText: I, selectAll: f, unselectAll: d, selectAllItems: C, unselectAllItems: L, isAllSelected: _, isIndeterminate: x, toggleSelectAll: B, selectAllCategory: $, unselectAllCategory: Y, toggleCheckboxSelection: W, selectedOptions: K, showSelectedItems: R, showSelectAllCheckbox: U, computedSelectAllListboxItemsRefs: Q, computedlistboxItems: ee, computedselectAllItemRefs: te, computedItems: se, focusItem: le, moveToNextElement: ne, moveToPreviousElement: oe, moveToFirstElement: ae, moveToLastElement: ie, preventDefault: q, focusedIndex: me, listboxListeners: _e, chipsSectionListeners: ge, BentoCheckbox: J, BentoTypography: G, BentoChip: Ee, BentoListboxOption: V, ListboxMultiSelectOptions: ut, vBentoKeyboardNavigationDirective: Z, BentoListboxEvent: i };
860
+ return { __sfc: !0, props: s, emit: e, t: l, slots: o, selectAllListboxItemsRef: n, selectedListboxItemsRef: a, listboxItemsRef: v, selectedItemsList: y, isMultiLevelSelect: u, flattenedItemsList: i, optionStates: x, enabledItems: L, visibleSelectedList: S, calculateTotalItems: O, selectAllCheckboxText: I, selectAll: b, unselectAll: f, selectAllItems: C, unselectAllItems: T, isAllSelected: m, isIndeterminate: E, toggleSelectAll: B, selectAllCategory: P, unselectAllCategory: W, toggleCheckboxSelection: K, selectedOptions: q, showSelectedItems: R, showSelectAllCheckbox: U, computedSelectAllListboxItemsRefs: Q, computedlistboxItems: ee, computedselectAllItemRefs: te, computedItems: se, focusItem: le, moveToNextElement: oe, moveToPreviousElement: ne, moveToFirstElement: ae, moveToLastElement: ie, preventDefault: j, focusedIndex: me, listboxListeners: _e, chipsSectionListeners: ge, BentoCheckbox: V, BentoTypography: G, BentoChip: Ee, BentoListboxOption: Y, ListboxMultiSelectOptions: ut, vBentoKeyboardNavigationDirective: Z, BentoListboxEvent: c };
861
861
  }
862
862
  });
863
863
  var mt = function() {
864
- var e = this, t = e._self._c, l = e._self._setupProxy;
865
- return t("div", { staticClass: "b-listbox-multi-select" }, [l.showSelectedItems ? t("div", [t("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, l.chipsSectionListeners), e._l(l.selectedOptions, function(o) {
866
- return t("li", { key: o.value }, [t(l.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(n) {
864
+ var e = this, s = e._self._c, l = e._self._setupProxy;
865
+ return s("div", { staticClass: "b-listbox-multi-select" }, [l.showSelectedItems ? s("div", [s("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, l.chipsSectionListeners), e._l(l.selectedOptions, function(o) {
866
+ return s("li", { key: o.value }, [s(l.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(n) {
867
867
  o.items ? l.unselectAllCategory(o) : l.toggleCheckboxSelection("select", o);
868
868
  } } })], 1);
869
- }), 0), t("hr", { staticClass: "b-listbox-multi-select__divider" })]) : e._e(), t("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, l.listboxListeners), [l.showSelectAllCheckbox ? t(l.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [t(l.BentoCheckbox, { attrs: { "aria-label": l.selectAllCheckboxText, "model-value": l.isAllSelected, indeterminate: l.isIndeterminate, tabindex: l.focusedIndex === 0 ? 0 : -1 }, on: { "update:model-value": l.toggleSelectAll } }), t(l.BentoTypography, { attrs: { el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(l.selectAllCheckboxText) + " ")])], 1) : e._e(), l.showSelectAllCheckbox ? t("hr", { staticClass: "b-listbox-multi-select__divider" }) : e._e(), t(l.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": l.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": l.selectedItemsList, "focused-index": l.focusedIndex }, on: { "toggle-checkbox-selection": function(o) {
869
+ }), 0), s("hr", { staticClass: "b-listbox-multi-select__divider" })]) : e._e(), s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, l.listboxListeners), [l.showSelectAllCheckbox ? s(l.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [s(l.BentoCheckbox, { attrs: { "aria-label": l.selectAllCheckboxText, "model-value": l.isAllSelected, indeterminate: l.isIndeterminate, tabindex: l.focusedIndex === 0 ? 0 : -1 }, on: { "update:model-value": l.toggleSelectAll } }), s(l.BentoTypography, { attrs: { el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(l.selectAllCheckboxText) + " ")])], 1) : e._e(), l.showSelectAllCheckbox ? s("hr", { staticClass: "b-listbox-multi-select__divider" }) : e._e(), s(l.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": l.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": l.selectedItemsList, "focused-index": l.focusedIndex }, on: { "toggle-checkbox-selection": function(o) {
870
870
  return l.toggleCheckboxSelection("select", o);
871
871
  }, "select-category": l.selectAllCategory, "unselect-category": l.unselectAllCategory, "space-pressed": function(o) {
872
872
  return l.toggleCheckboxSelection(l.BentoListboxEvent.SPACE, o);
@@ -880,7 +880,7 @@ var mt = function() {
880
880
  } };
881
881
  })], null, !0) })], 1)]);
882
882
  }, _t = [], gt = /* @__PURE__ */ D(
883
- vt,
883
+ bt,
884
884
  mt,
885
885
  _t,
886
886
  !1,
@@ -900,15 +900,15 @@ const ue = gt.exports, pt = {
900
900
  loading: "Carregando",
901
901
  showMore: "Mostrar mais"
902
902
  }
903
- }, yt = 36, Ct = P({
903
+ }, yt = 36, Ct = $({
904
904
  name: "bento-listbox",
905
905
  components: {
906
- BentoEmptyState: he,
906
+ BentoEmptyState: xe,
907
907
  BentoListboxSingleSelect: Qe,
908
908
  BentoListboxMultiSelect: ue,
909
909
  BentoTypography: G,
910
- BentoLoadingIndicator: Se,
911
- BentoLoadingButton: Te
910
+ BentoLoadingIndicator: he,
911
+ BentoLoadingButton: Le
912
912
  },
913
913
  directives: { BentoKeyboardNavigationDirective: Z },
914
914
  i18n: { messages: pt },
@@ -968,7 +968,7 @@ const ue = gt.exports, pt = {
968
968
  lazyLoadType: {
969
969
  type: String,
970
970
  default: F.NONE,
971
- validator: (s) => Object.values(F).includes(s)
971
+ validator: (t) => Object.values(F).includes(t)
972
972
  },
973
973
  /**
974
974
  * Indicates the listbox is loading filtered items.
@@ -1012,166 +1012,172 @@ const ue = gt.exports, pt = {
1012
1012
  }
1013
1013
  },
1014
1014
  emits: [
1015
- i.SELECT,
1016
- i.SPACE,
1017
- i.SHOW_MORE,
1018
- i.ENTER,
1019
- i.ESCAPE,
1020
- i.TAB
1015
+ c.SELECT,
1016
+ c.SPACE,
1017
+ c.SHOW_MORE,
1018
+ c.ENTER,
1019
+ c.ESCAPE,
1020
+ c.TAB
1021
1021
  ],
1022
- setup(s, { emit: e, slots: t }) {
1023
- const l = O([]), o = w(s, "items"), { t: n } = X(), a = c(() => s.lazyLoadType !== F.AUTOMATIC), b = c(() => s.lazyLoadType === F.AUTOMATIC), v = () => {
1022
+ setup(t, { emit: e, slots: s }) {
1023
+ const l = A([]), o = w(t, "items"), { t: n } = J(), a = r(() => t.lazyLoadType !== F.AUTOMATIC), v = r(() => t.lazyLoadType === F.AUTOMATIC), y = () => {
1024
1024
  var R;
1025
- return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((R = s == null ? void 0 : s.virtualScroll) != null && R.itemHeight) ? s.virtualScroll.itemHeight : yt;
1025
+ return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((R = t == null ? void 0 : t.virtualScroll) != null && R.itemHeight) ? t.virtualScroll.itemHeight : yt;
1026
1026
  }, {
1027
- containerRef: r,
1028
- containerProps: m,
1029
- onScroll: S,
1030
- list: E,
1031
- wrapperProps: A
1027
+ containerRef: u,
1028
+ containerProps: i,
1029
+ onScroll: x,
1030
+ list: L,
1031
+ wrapperProps: S
1032
1032
  } = Ie(o, {
1033
- itemHeight: v(),
1033
+ itemHeight: y(),
1034
1034
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1035
- disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
1036
- }), T = c(
1037
- () => s.componentLoading !== void 0 || a.value ? "true" : void 0
1038
- ), I = c(
1039
- () => a.value && s.loading || s.componentLoading ? "true" : "false"
1040
- ), f = c(
1041
- () => a.value || s.componentLoading !== void 0 ? "polite" : void 0
1042
- ), d = (R) => (U) => {
1035
+ disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
1036
+ }), O = r(
1037
+ () => t.componentLoading !== void 0 || a.value ? "true" : void 0
1038
+ ), I = r(
1039
+ () => a.value && t.loading || t.componentLoading ? "true" : "false"
1040
+ ), b = r(
1041
+ () => a.value || t.componentLoading !== void 0 ? "polite" : void 0
1042
+ ), f = (R) => (U) => {
1043
1043
  e(R, U);
1044
1044
  }, C = () => {
1045
- e(i.SHOW_MORE);
1046
- }, L = xe(() => {
1047
- const R = r.value;
1045
+ e(c.SHOW_MORE);
1046
+ }, T = Se(() => {
1047
+ const R = u.value;
1048
1048
  if (!R)
1049
1049
  return;
1050
1050
  const U = Math.round(R.scrollTop) + R.clientHeight >= R.scrollHeight;
1051
- s.hasMoreItems && U && !s.loading && C();
1052
- }), _ = () => {
1053
- b.value ? L() : S();
1054
- }, x = c(() => {
1051
+ t.hasMoreItems && U && !t.loading && C();
1052
+ }), m = () => {
1053
+ v.value ? T() : x();
1054
+ }, E = r(() => {
1055
1055
  var R;
1056
- return ((R = s.items) == null ? void 0 : R.length) === 0;
1057
- }), B = c(
1058
- () => s.lazyLoadType === F.BUTTON && s.hasMoreItems
1059
- ), $ = c(
1060
- () => s.loading ? ce.LOADING : ce.START
1061
- ), Y = c(() => s.loading ? n("loading") : n("showMore")), W = c(() => ({
1062
- ...s.emptyState,
1056
+ return ((R = t.items) == null ? void 0 : R.length) === 0;
1057
+ }), B = r(
1058
+ () => t.lazyLoadType === F.BUTTON && t.hasMoreItems
1059
+ ), P = r(
1060
+ () => t.loading ? ce.LOADING : ce.START
1061
+ ), W = r(() => t.loading ? n("loading") : n("showMore")), K = r(() => ({
1062
+ ...t.emptyState,
1063
1063
  variant: "condensed"
1064
- })), K = {
1065
- [i.SELECT]: d(i.SELECT),
1066
- [i.SPACE]: d(i.SPACE),
1067
- [i.TAB]: d(i.TAB),
1068
- [i.ENTER]: d(i.ENTER)
1064
+ })), q = {
1065
+ [c.SELECT]: f(c.SELECT),
1066
+ [c.SPACE]: f(c.SPACE),
1067
+ [c.TAB]: f(c.TAB),
1068
+ [c.ENTER]: f(c.ENTER)
1069
1069
  };
1070
1070
  return {
1071
1071
  // Refs
1072
- listboxRef: r,
1072
+ listboxRef: u,
1073
1073
  listboxItemRef: l,
1074
1074
  // a11y
1075
- ariaAtomic: T,
1075
+ ariaAtomic: O,
1076
1076
  ariaBusy: I,
1077
- ariaLive: f,
1077
+ ariaLive: b,
1078
1078
  // Values
1079
- containerProps: m,
1080
- isSearchResultEmpty: x,
1081
- limitedEmptyStateProps: W,
1082
- loadingButtonState: $,
1083
- slots: t,
1079
+ containerProps: i,
1080
+ isSearchResultEmpty: E,
1081
+ limitedEmptyStateProps: K,
1082
+ loadingButtonState: P,
1083
+ slots: s,
1084
1084
  shouldDisplayShowMoreButton: B,
1085
- showMoreButtonText: Y,
1086
- virtualisedItems: E,
1087
- wrapperProps: A,
1085
+ showMoreButtonText: W,
1086
+ virtualisedItems: L,
1087
+ wrapperProps: S,
1088
1088
  // Enums
1089
1089
  BentoKeyboardNavigationKeyDownEvent: k,
1090
- BentoListboxEvent: i,
1090
+ BentoListboxEvent: c,
1091
1091
  // Methods
1092
- onListboxContainerScroll: _,
1093
- onOptionSelected: d,
1092
+ onListboxContainerScroll: m,
1093
+ onOptionSelected: f,
1094
1094
  emitShowMore: C,
1095
- listboxListeners: K
1095
+ listboxListeners: q
1096
1096
  };
1097
1097
  }
1098
1098
  });
1099
- var St = function() {
1099
+ var ht = function() {
1100
1100
  var l;
1101
- var e = this, t = e._self._c;
1102
- return e._self._setupProxy, t("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (l = e.containerProps) == null ? void 0 : l.style, attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, [t("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? t("div", { staticClass: "b-listbox__loading-filtered-items" }, [t("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? t("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? t("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : t("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [t("bento-listbox-multi-select", e._g({ 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(o, n) {
1101
+ var e = this, s = e._self._c;
1102
+ return e._self._setupProxy, s("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (l = e.containerProps) == null ? void 0 : l.style, attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, [s("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? s("div", { staticClass: "b-listbox__loading-filtered-items" }, [s("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? s("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? s("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [s("bento-listbox-multi-select", e._g({ 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(o, n) {
1103
1103
  return { key: n, fn: function(a) {
1104
1104
  return [e._t(n, null, null, a)];
1105
1105
  } };
1106
- })], null, !0) }, e.listboxListeners))] : [t("bento-listbox-single-select", e._g({ 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(o, n) {
1106
+ })], null, !0) }, e.listboxListeners))] : [s("bento-listbox-single-select", e._g({ 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(o, n) {
1107
1107
  return { key: n, fn: function(a) {
1108
1108
  return [e._t(n, null, null, a)];
1109
1109
  } };
1110
- })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? t("div", { staticClass: "b-listbox__lazy-load" }, [t("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
1110
+ })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
1111
1111
  return e.emitShowMore.apply(null, arguments);
1112
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? t("div", { staticClass: "b-listbox__lazy-load" }, [t("bento-loading-indicator")], 1) : e._e()]], 2)]);
1113
- }, ht = [], xt = /* @__PURE__ */ D(
1112
+ } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-indicator")], 1) : e._e()]], 2)]);
1113
+ }, xt = [], St = /* @__PURE__ */ D(
1114
1114
  Ct,
1115
- St,
1116
1115
  ht,
1116
+ xt,
1117
1117
  !1,
1118
1118
  null,
1119
1119
  "37a9ab16"
1120
1120
  );
1121
- const Ft = xt.exports, H = (s, e) => {
1122
- for (const t of s) {
1123
- if (t.value === e)
1124
- return t;
1125
- if (t.items) {
1126
- const l = H(t.items, e);
1121
+ const Gt = St.exports, X = (t, e) => {
1122
+ for (const s of t) {
1123
+ if (s.value === e)
1124
+ return s;
1125
+ if (s.items) {
1126
+ const l = X(s.items, e);
1127
1127
  if (l)
1128
1128
  return l;
1129
1129
  }
1130
1130
  }
1131
1131
  return null;
1132
- }, Gt = (s, e, t) => {
1133
- const l = O([]), o = O(), n = (v) => {
1134
- t.value ? o.value = v.map(({ value: r }) => r) : o.value = v.length > 0 ? v[0].value : null;
1135
- }, a = (v) => {
1136
- l.value = v, n(v);
1137
- }, b = () => {
1138
- l.value = [], o.value = null;
1132
+ }, Et = (t) => typeof t == "object" && t !== null && "value" in t && "label" in t, Ut = (t, e, s, l) => {
1133
+ const o = A([]), n = A(), a = (i) => {
1134
+ s.value ? n.value = i.map(({ value: x }) => x) : n.value = i.length > 0 ? i[0].value : null;
1135
+ }, v = (i) => {
1136
+ s.value ? n.value = i.map(({ value: x, label: L }) => ({ value: x, label: L })) : n.value = i.length > 0 ? { value: i[0].value, label: i[0].label } : null;
1137
+ }, y = (i) => {
1138
+ o.value = i, l != null && l.value ? v(i) : a(i);
1139
+ }, u = () => {
1140
+ o.value = [], n.value = null;
1139
1141
  };
1140
- return be(
1142
+ return fe(
1141
1143
  () => e.value,
1142
1144
  () => {
1143
1145
  if (!e.value && e.value !== 0) {
1144
- b();
1146
+ u();
1145
1147
  return;
1146
1148
  }
1147
- const v = !Array.isArray(e.value), r = [...l.value];
1148
- b();
1149
- const m = (S) => {
1150
- let E = H(s.value, S);
1151
- E || (E = H(r, S)), E || (E = { value: S, label: S.toString() }), l.value.push(E);
1149
+ const i = !Array.isArray(e.value), x = [...o.value];
1150
+ u();
1151
+ const L = (S) => {
1152
+ if (Et(S))
1153
+ o.value.push(S);
1154
+ else {
1155
+ let O = X(t.value, S);
1156
+ O || (O = X(x, S)), O || (O = { value: S, label: S.toString() }), o.value.push(O);
1157
+ }
1152
1158
  };
1153
- if (v) {
1159
+ if (i) {
1154
1160
  const S = e.value;
1155
- m(S), n(l.value);
1161
+ L(S), l != null && l.value ? v(o.value) : a(o.value);
1156
1162
  return;
1157
1163
  }
1158
- e.value.forEach(m), n(l.value);
1164
+ e.value.forEach(L), l != null && l.value ? v(o.value) : a(o.value);
1159
1165
  },
1160
1166
  { immediate: !0 }
1161
1167
  ), {
1162
1168
  // Values
1163
- cachedSelectedListboxOptions: l,
1164
- cachedListboxSelectedValues: o,
1169
+ cachedSelectedListboxOptions: o,
1170
+ cachedListboxSelectedValues: n,
1165
1171
  // Methods
1166
- resetCache: b,
1167
- setCachedValues: a
1172
+ resetCache: u,
1173
+ setCachedValues: y
1168
1174
  };
1169
1175
  };
1170
1176
  export {
1171
1177
  F as B,
1172
- i as a,
1173
- Ft as b,
1174
- Gt as c,
1178
+ c as a,
1179
+ Gt as b,
1180
+ Ut as c,
1175
1181
  dt as u
1176
1182
  };
1177
- //# sourceMappingURL=use-cached-selected-values.9OnD_j5F.js.map
1183
+ //# sourceMappingURL=use-cached-selected-values.C-umGJXi.js.map