@adyen/bento-vue3 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 (181) hide show
  1. package/dist/@types/index.d.ts +119 -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.BDF61iH-.js → action-bar.BVfkekHC.js} +5 -5
  25. package/dist/chunks/{action-bar.BDF61iH-.js.map → action-bar.BVfkekHC.js.map} +1 -1
  26. package/dist/chunks/{alert.CjegN2iG.js → alert.C0YBI66O.js} +2 -2
  27. package/dist/chunks/{alert.CjegN2iG.js.map → alert.C0YBI66O.js.map} +1 -1
  28. package/dist/chunks/{base-modal.D2tNbxw3.js → base-modal.BphJ3uEa.js} +4 -4
  29. package/dist/chunks/{base-modal.D2tNbxw3.js.map → base-modal.BphJ3uEa.js.map} +1 -1
  30. package/dist/chunks/{button-actions-with-menu.DG5t9zB7.js → button-actions-with-menu.DZVOijPY.js} +4 -4
  31. package/dist/chunks/{button-actions-with-menu.DG5t9zB7.js.map → button-actions-with-menu.DZVOijPY.js.map} +1 -1
  32. package/dist/chunks/{button-actions.1MReMMnL.js → button-actions.Cr5gxSXb.js} +2 -2
  33. package/dist/chunks/{button-actions.1MReMMnL.js.map → button-actions.Cr5gxSXb.js.map} +1 -1
  34. package/dist/chunks/{button.CVZJTZv0.js → button.BF_dGonK.js} +37 -26
  35. package/dist/chunks/button.BF_dGonK.js.map +1 -0
  36. package/dist/chunks/{calendar.ugV5Vzqs.js → calendar.CTcfG9JK.js} +2 -2
  37. package/dist/chunks/{calendar.ugV5Vzqs.js.map → calendar.CTcfG9JK.js.map} +1 -1
  38. package/dist/chunks/{card.dF_i6neN.js → card.B9AfyVI3.js} +2 -2
  39. package/dist/chunks/{card.dF_i6neN.js.map → card.B9AfyVI3.js.map} +1 -1
  40. package/dist/chunks/{code-snippet.iD36_pOw.js → code-snippet.CK52UjIT.js} +5 -5
  41. package/dist/chunks/{code-snippet.iD36_pOw.js.map → code-snippet.CK52UjIT.js.map} +1 -1
  42. package/dist/chunks/{copy.jE0EciK8.js → copy.CHnSy6IK.js} +2 -2
  43. package/dist/chunks/{copy.jE0EciK8.js.map → copy.CHnSy6IK.js.map} +1 -1
  44. package/dist/chunks/{dashboard-section.Bq1abySA.js → dashboard-section.Dmtz7Dcc.js} +3 -3
  45. package/dist/chunks/{dashboard-section.Bq1abySA.js.map → dashboard-section.Dmtz7Dcc.js.map} +1 -1
  46. package/dist/chunks/dashed-underline.BTdq4lZ4.js +114 -0
  47. package/dist/chunks/dashed-underline.BTdq4lZ4.js.map +1 -0
  48. package/dist/chunks/{data-grid-template.UkERMC7S.js → data-grid-template.CP8N6JL8.js} +4 -4
  49. package/dist/chunks/{data-grid-template.UkERMC7S.js.map → data-grid-template.CP8N6JL8.js.map} +1 -1
  50. package/dist/chunks/{data-grid.o4emi6FA.js → data-grid.mNFj1mbB.js} +338 -335
  51. package/dist/chunks/data-grid.mNFj1mbB.js.map +1 -0
  52. package/dist/chunks/{date-picker.BPLtpBbX.js → date-picker.C61tyaW9.js} +3 -3
  53. package/dist/chunks/{date-picker.BPLtpBbX.js.map → date-picker.C61tyaW9.js.map} +1 -1
  54. package/dist/chunks/{date-range-picker.BYvj1y8T.js → date-range-picker.BCD198XQ.js} +6 -6
  55. package/dist/chunks/{date-range-picker.BYvj1y8T.js.map → date-range-picker.BCD198XQ.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.Cngbnn1Z.js → dialog-page.D0E69ruX.js} +2 -2
  61. package/dist/chunks/{dialog-page.Cngbnn1Z.js.map → dialog-page.D0E69ruX.js.map} +1 -1
  62. package/dist/chunks/{dropdown-tag.DxLOtAIw.js → dropdown-tag.DstHH6nK.js} +2 -2
  63. package/dist/chunks/{dropdown-tag.DxLOtAIw.js.map → dropdown-tag.DstHH6nK.js.map} +1 -1
  64. package/dist/chunks/{dropdown.FJu_m8Tw.js → dropdown.B4yyYeuQ.js} +119 -104
  65. package/dist/chunks/{dropdown.FJu_m8Tw.js.map → dropdown.B4yyYeuQ.js.map} +1 -1
  66. package/dist/chunks/{empty-state.BGWjUH6G.js → empty-state.CEphUdux.js} +28 -28
  67. package/dist/chunks/empty-state.CEphUdux.js.map +1 -0
  68. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  69. package/dist/chunks/{file-uploader.Bp8PDPHt.js → file-uploader.DLFdbRG_.js} +3 -3
  70. package/dist/chunks/{file-uploader.Bp8PDPHt.js.map → file-uploader.DLFdbRG_.js.map} +1 -1
  71. package/dist/chunks/{filter-bar.BRB7BjbE.js → filter-bar.B4xd462M.js} +800 -794
  72. package/dist/chunks/filter-bar.B4xd462M.js.map +1 -0
  73. package/dist/chunks/{fixed-scroller.BjxA_R63.js → fixed-scroller.A-YuItwn.js} +2 -2
  74. package/dist/chunks/{fixed-scroller.BjxA_R63.js.map → fixed-scroller.A-YuItwn.js.map} +1 -1
  75. package/dist/chunks/{footer-actions.jRnnqdse.js → footer-actions.v8GdXxdM.js} +3 -3
  76. package/dist/chunks/{footer-actions.jRnnqdse.js.map → footer-actions.v8GdXxdM.js.map} +1 -1
  77. package/dist/chunks/{form-layout-title.CsmjzAje.js → form-layout-title.DTurbdqZ.js} +2 -2
  78. package/dist/chunks/{form-layout-title.CsmjzAje.js.map → form-layout-title.DTurbdqZ.js.map} +1 -1
  79. package/dist/chunks/{header-with-views.DJSGKRhj.js → header-with-views.CrR5TEJ6.js} +526 -522
  80. package/dist/chunks/{header-with-views.DJSGKRhj.js.map → header-with-views.CrR5TEJ6.js.map} +1 -1
  81. package/dist/chunks/{header.BBnN_HU9.js → header.B5gm8-_5.js} +4 -4
  82. package/dist/chunks/{header.BBnN_HU9.js.map → header.B5gm8-_5.js.map} +1 -1
  83. package/dist/chunks/{info-icon-with-popover.D6WFtFFY.js → info-icon-with-popover.DAq-iAlh.js} +2 -2
  84. package/dist/chunks/{info-icon-with-popover.D6WFtFFY.js.map → info-icon-with-popover.DAq-iAlh.js.map} +1 -1
  85. package/dist/chunks/{input-field-password.CtK2VVqL.js → input-field-password.B_khsQVP.js} +5 -5
  86. package/dist/chunks/{input-field-password.CtK2VVqL.js.map → input-field-password.B_khsQVP.js.map} +1 -1
  87. package/dist/chunks/{input-field-phone-number.Cf5nQpfS.js → input-field-phone-number.CLgA141p.js} +3 -3
  88. package/dist/chunks/{input-field-phone-number.Cf5nQpfS.js.map → input-field-phone-number.CLgA141p.js.map} +1 -1
  89. package/dist/chunks/{input-field.C94JL_Qv.js → input-field.hOqNPju4.js} +2 -2
  90. package/dist/chunks/{input-field.C94JL_Qv.js.map → input-field.hOqNPju4.js.map} +1 -1
  91. package/dist/chunks/{inspector.CxNXHV8C.js → inspector.DteTv0He.js} +2 -2
  92. package/dist/chunks/{inspector.CxNXHV8C.js.map → inspector.DteTv0He.js.map} +1 -1
  93. package/dist/chunks/{menu.BcXV6WhV.js → menu.CxYiSxSe.js} +3 -3
  94. package/dist/chunks/{menu.BcXV6WhV.js.map → menu.CxYiSxSe.js.map} +1 -1
  95. package/dist/chunks/{modal-fullscreen.D93NZCBg.js → modal-fullscreen.ByaJ5E40.js} +4 -4
  96. package/dist/chunks/{modal-fullscreen.D93NZCBg.js.map → modal-fullscreen.ByaJ5E40.js.map} +1 -1
  97. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B3uzibmr.js → modal.vue_vue_type_script_setup_true_lang.B6khnywr.js} +5 -5
  98. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B3uzibmr.js.map → modal.vue_vue_type_script_setup_true_lang.B6khnywr.js.map} +1 -1
  99. package/dist/chunks/{pagination.rrPdG7nK.js → pagination.CrwYnynf.js} +3 -3
  100. package/dist/chunks/{pagination.rrPdG7nK.js.map → pagination.CrwYnynf.js.map} +1 -1
  101. package/dist/chunks/{popover.KFyR9BXF.js → popover.DvAXLmCp.js} +3 -3
  102. package/dist/chunks/{popover.KFyR9BXF.js.map → popover.DvAXLmCp.js.map} +1 -1
  103. package/dist/chunks/{promo-banner.BfXfaCrf.js → promo-banner.Di_GK1ac.js} +2 -2
  104. package/dist/chunks/{promo-banner.BfXfaCrf.js.map → promo-banner.Di_GK1ac.js.map} +1 -1
  105. package/dist/chunks/{rich-text-editor.Ddt7IVXL.js → rich-text-editor.9z0_M-YN.js} +2 -2
  106. package/dist/chunks/{rich-text-editor.Ddt7IVXL.js.map → rich-text-editor.9z0_M-YN.js.map} +1 -1
  107. package/dist/chunks/{search-bar.ZidZj4NE.js → search-bar.ye0aeyd2.js} +3 -3
  108. package/dist/chunks/{search-bar.ZidZj4NE.js.map → search-bar.ye0aeyd2.js.map} +1 -1
  109. package/dist/chunks/{secondary-nav.Cy2JAzoO.js → secondary-nav.Dsa986cq.js} +2 -2
  110. package/dist/chunks/{secondary-nav.Cy2JAzoO.js.map → secondary-nav.Dsa986cq.js.map} +1 -1
  111. package/dist/chunks/{sidepanel.CNA3pTXy.js → sidepanel.UiX__UxV.js} +4 -4
  112. package/dist/chunks/{sidepanel.CNA3pTXy.js.map → sidepanel.UiX__UxV.js.map} +1 -1
  113. package/dist/chunks/{structured-list-item.CLpfMbkV.js → structured-list-item.BYFd1N3z.js} +3 -3
  114. package/dist/chunks/{structured-list-item.CLpfMbkV.js.map → structured-list-item.BYFd1N3z.js.map} +1 -1
  115. package/dist/chunks/{summary-grid.types.BcicwgZm.js → summary-grid.types.IkdgA45D.js} +3 -3
  116. package/dist/chunks/{summary-grid.types.BcicwgZm.js.map → summary-grid.types.IkdgA45D.js.map} +1 -1
  117. package/dist/chunks/{tabs.Bn4YIjoy.js → tabs.CVCqPMAR.js} +2 -2
  118. package/dist/chunks/{tabs.Bn4YIjoy.js.map → tabs.CVCqPMAR.js.map} +1 -1
  119. package/dist/chunks/{textarea.Dl5TFi8E.js → textarea.UtxQ22_c.js} +2 -2
  120. package/dist/chunks/{textarea.Dl5TFi8E.js.map → textarea.UtxQ22_c.js.map} +1 -1
  121. package/dist/chunks/{timeline-item.CcbL86D0.js → timeline-item.C3AkVKE8.js} +5 -5
  122. package/dist/chunks/{timeline-item.CcbL86D0.js.map → timeline-item.C3AkVKE8.js.map} +1 -1
  123. package/dist/chunks/{toast.Ae5ZoWHb.js → toast.DdAPkCce.js} +2 -2
  124. package/dist/chunks/{toast.Ae5ZoWHb.js.map → toast.DdAPkCce.js.map} +1 -1
  125. package/dist/chunks/{toggle-button.Dv1t15yj.js → toggle-button.D-jybXy-.js} +2 -2
  126. package/dist/chunks/{toggle-button.Dv1t15yj.js.map → toggle-button.D-jybXy-.js.map} +1 -1
  127. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Bcu-t4d8.js → tutorial.vue_vue_type_script_setup_true_lang.DwYfNGGI.js} +4 -4
  128. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.Bcu-t4d8.js.map → tutorial.vue_vue_type_script_setup_true_lang.DwYfNGGI.js.map} +1 -1
  129. package/dist/chunks/{use-cached-selected-values.Ber7lUiH.js → use-cached-selected-values.CRwxKmxX.js} +586 -580
  130. package/dist/chunks/use-cached-selected-values.CRwxKmxX.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 +1 -1
  174. package/package.json +4 -4
  175. package/dist/chunks/button.CVZJTZv0.js.map +0 -1
  176. package/dist/chunks/dashed-underline.DweJIpuJ.js +0 -98
  177. package/dist/chunks/dashed-underline.DweJIpuJ.js.map +0 -1
  178. package/dist/chunks/data-grid.o4emi6FA.js.map +0 -1
  179. package/dist/chunks/empty-state.BGWjUH6G.js.map +0 -1
  180. package/dist/chunks/filter-bar.BRB7BjbE.js.map +0 -1
  181. package/dist/chunks/use-cached-selected-values.Ber7lUiH.js.map +0 -1
@@ -1,112 +1,112 @@
1
- import { computed as p, ref as M, onMounted as Ae, onUnmounted as Ke, watch as Ie, defineComponent as X, resolveComponent as $, createElementBlock as T, openBlock as d, createVNode as P, createElementVNode as K, withCtx as I, createTextVNode as z, toDisplayString as G, renderSlot as Y, mergeProps as U, withKeys as ve, createCommentVNode as W, createBlock as D, withModifiers as qe, normalizeProps as le, guardReactiveProps as re, withDirectives as oe, vShow as $e, toRef as Z, resolveDirective as ke, toHandlers as Q, Fragment as ee, renderList as F, createSlots as ce, normalizeClass as fe, useSlots as je, unref as N, normalizeStyle as He } from "vue";
2
- import { B as x, a as de } from "./keyboard-navigation.CqgGzfZQ.js";
1
+ import { computed as g, ref as P, onMounted as Ae, onUnmounted as Ke, watch as Ie, defineComponent as X, resolveComponent as k, createElementBlock as O, openBlock as m, createVNode as M, createElementVNode as K, withCtx as $, createTextVNode as Y, toDisplayString as z, renderSlot as F, mergeProps as U, withKeys as ve, createCommentVNode as V, createBlock as D, withModifiers as qe, normalizeProps as le, guardReactiveProps as re, withDirectives as oe, vShow as $e, toRef as Z, resolveDirective as ke, toHandlers as Q, Fragment as ee, renderList as W, createSlots as ce, normalizeClass as fe, useSlots as je, unref as N, normalizeStyle as He } from "vue";
2
+ import { B as G, a as de } from "./keyboard-navigation.CqgGzfZQ.js";
3
3
  import "./events.FNmSWp_P.js";
4
4
  import { B as ne } from "./typography.DN5eC5ch.js";
5
5
  import { B as Xe } from "./loading-indicator.DEepb9Wl.js";
6
- import { B as Je } from "./empty-state.BGWjUH6G.js";
6
+ import { B as Je } from "./empty-state.CEphUdux.js";
7
7
  import { u as ye } from "./i18n.B6g5VX0q.js";
8
8
  import { d as Ze } from "./debounce.DUTu11PS.js";
9
9
  import { B as Se } from "./checkbox.B-jC5L05.js";
10
10
  import { B as Qe } from "./chip.BVCzNGaI.js";
11
11
  import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
12
  import { C as et, a as tt } from "./chevron-up.-0oLlHmh.js";
13
- import { d as st, e as _e } from "./button-actions.1MReMMnL.js";
13
+ import { d as st, e as _e } from "./button-actions.Cr5gxSXb.js";
14
14
  /* empty css */
15
15
  import { o as lt } from "./resize.Bqks3WUm.js";
16
16
  import "../assets/use-cached-selected-values.css";
17
- const Be = (e, t, s, r) => {
18
- const b = p(
17
+ const Be = (e, s, t, c) => {
18
+ const r = g(
19
19
  () => {
20
- var m, g;
21
- return !!((m = e.value) != null && m.length) && ((g = e.value) == null ? void 0 : g.length) === t.value.length;
20
+ var v, S;
21
+ return !!((v = e.value) != null && v.length) && ((S = e.value) == null ? void 0 : S.length) === s.value.length;
22
22
  }
23
- ), a = p(() => {
24
- var m;
25
- return e.value == null || e.value.length === 0 ? !1 : ((m = e.value) == null ? void 0 : m.length) !== t.value.length;
23
+ ), a = g(() => {
24
+ var v;
25
+ return e.value == null || e.value.length === 0 ? !1 : ((v = e.value) == null ? void 0 : v.length) !== s.value.length;
26
26
  });
27
27
  return {
28
- isAllSelected: b,
28
+ isAllSelected: r,
29
29
  isIndeterminate: a,
30
- toggleSelectAll: (m) => {
31
- m ? s() : r();
30
+ toggleSelectAll: (v) => {
31
+ v ? t() : c();
32
32
  }
33
33
  };
34
34
  };
35
- function ot(e, { disabled: t, itemHeight: s, overscan: r = 5, prefixHeight: b }) {
36
- const a = M(null), l = M([]), m = M(0), g = M(0), n = M(0);
37
- let v;
38
- const o = p(() => {
39
- const S = typeof s == "number" ? e.value.length * s : e.value.reduce((R, C, A) => R + s(A), 0), O = typeof s == "number" ? m.value * s : e.value.slice(0, m.value).reduce((R, C, A) => R + s(A), 0);
35
+ function ot(e, { disabled: s, itemHeight: t, overscan: c = 5, prefixHeight: r }) {
36
+ const a = P(null), l = P([]), v = P(0), S = P(0), o = P(0);
37
+ let i;
38
+ const n = g(() => {
39
+ const y = typeof t == "number" ? e.value.length * t : e.value.reduce((R, h, I) => R + t(I), 0), A = typeof t == "number" ? v.value * t : e.value.slice(0, v.value).reduce((R, h, I) => R + t(I), 0);
40
40
  return {
41
41
  style: {
42
- marginTop: `${O}px`,
43
- height: `${S - O}px`
42
+ marginTop: `${A}px`,
43
+ height: `${y - A}px`
44
44
  }
45
45
  };
46
- }), h = () => {
47
- const S = (b == null ? void 0 : b.value) ?? 0, O = Math.max(a.value.scrollTop - S, 0);
48
- if (typeof s == "number")
49
- return Math.floor(O / s);
50
- let R = 0, C = 0;
51
- for (let A = 0; A < e.value.length; A += 1) {
52
- const V = s(A);
53
- if (R += V, R >= O) {
54
- C = A;
46
+ }), E = () => {
47
+ const y = (r == null ? void 0 : r.value) ?? 0, A = Math.max(a.value.scrollTop - y, 0);
48
+ if (typeof t == "number")
49
+ return Math.floor(A / t);
50
+ let R = 0, h = 0;
51
+ for (let I = 0; I < e.value.length; I += 1) {
52
+ const x = t(I);
53
+ if (R += x, R >= A) {
54
+ h = I;
55
55
  break;
56
56
  }
57
57
  }
58
- return C;
59
- }, L = () => {
60
- if (n.value = a.value.clientHeight, typeof s == "number")
61
- return Math.ceil(n.value / s);
62
- const S = m.value ?? 0;
63
- let O = 0, R = 0;
64
- for (let C = S; C < e.value.length; C += 1) {
65
- const A = s(C);
66
- if (O += A, R = C, O > n.value)
58
+ return h;
59
+ }, C = () => {
60
+ if (o.value = a.value.clientHeight, typeof t == "number")
61
+ return Math.ceil(o.value / t);
62
+ const y = v.value ?? 0;
63
+ let A = 0, R = 0;
64
+ for (let h = y; h < e.value.length; h += 1) {
65
+ const I = t(h);
66
+ if (A += I, R = h, A > o.value)
67
67
  break;
68
68
  }
69
- return R - S;
70
- }, k = () => {
69
+ return R - y;
70
+ }, L = () => {
71
71
  if (a.value) {
72
- const S = L();
73
- m.value = h(), g.value = Math.min(m.value + S + r, e.value.length), l.value = e.value.slice(m.value, g.value);
72
+ const y = C();
73
+ v.value = E(), S.value = Math.min(v.value + y + c, e.value.length), l.value = e.value.slice(v.value, S.value);
74
74
  }
75
75
  }, B = () => {
76
- k();
76
+ L();
77
77
  };
78
- t || (Ae(() => {
79
- a.value && (n.value = a.value.clientHeight, v = lt(a.value, ({ clientHeight: S }) => {
80
- n.value = S, k();
81
- }), k());
78
+ s || (Ae(() => {
79
+ a.value && (o.value = a.value.clientHeight, i = lt(a.value, ({ clientHeight: y }) => {
80
+ o.value = y, L();
81
+ }), L());
82
82
  }), Ke(() => {
83
- v == null || v.disconnect();
83
+ i == null || i.disconnect();
84
84
  }), Ie(
85
85
  () => e.value,
86
86
  () => {
87
- k();
87
+ L();
88
88
  }
89
89
  ));
90
- const y = {
90
+ const p = {
91
91
  ref: a,
92
92
  style: { overflowY: "auto" }
93
93
  };
94
- return t ? {
94
+ return s ? {
95
95
  containerRef: a,
96
- containerProps: y,
96
+ containerProps: p,
97
97
  // eslint-disable-next-line @typescript-eslint/no-empty-function
98
98
  onScroll: () => {
99
99
  },
100
100
  list: e
101
101
  } : {
102
102
  containerRef: a,
103
- containerProps: y,
103
+ containerProps: p,
104
104
  onScroll: B,
105
105
  list: l,
106
- wrapperProps: o
106
+ wrapperProps: n
107
107
  };
108
108
  }
109
- var u = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(u || {}), se = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(se || {});
109
+ var b = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(b || {}), se = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(se || {});
110
110
  const nt = X({
111
111
  name: "bento-listbox-static-category",
112
112
  components: {
@@ -121,26 +121,26 @@ const nt = X({
121
121
  required: !0
122
122
  }
123
123
  }
124
- }), at = { class: "b-listbox-single-select-category" };
125
- function it(e, t, s, r, b, a) {
126
- const l = $("bento-typography");
127
- return d(), T("div", at, [
128
- P(l, {
124
+ }), it = { class: "b-listbox-single-select-category" };
125
+ function at(e, s, t, c, r, a) {
126
+ const l = k("bento-typography");
127
+ return m(), O("div", it, [
128
+ M(l, {
129
129
  variant: "caption",
130
130
  el: "span",
131
131
  class: "b-listbox-single-select-category__label-text"
132
132
  }, {
133
- default: I(() => [
134
- z(G(e.categoryLabel), 1)
133
+ default: $(() => [
134
+ Y(z(e.categoryLabel), 1)
135
135
  ]),
136
136
  _: 1
137
137
  }),
138
138
  K("div", null, [
139
- Y(e.$slots, "default", {}, void 0, !0)
139
+ F(e.$slots, "default", {}, void 0, !0)
140
140
  ])
141
141
  ]);
142
142
  }
143
- const rt = /* @__PURE__ */ q(nt, [["render", it], ["__scopeId", "data-v-a90eff17"]]), ct = X({
143
+ const rt = /* @__PURE__ */ q(nt, [["render", at], ["__scopeId", "data-v-a90eff17"]]), ct = X({
144
144
  name: "bento-listbox-option",
145
145
  props: {
146
146
  /**
@@ -152,41 +152,41 @@ const rt = /* @__PURE__ */ q(nt, [["render", it], ["__scopeId", "data-v-a90eff17
152
152
  */
153
153
  selected: { type: Boolean, default: !1 }
154
154
  },
155
- emits: [u.CLICK, u.ENTER, u.SPACE, u.TAB],
156
- setup(e, { emit: t }) {
157
- const s = p(() => ({
155
+ emits: [b.CLICK, b.ENTER, b.SPACE, b.TAB],
156
+ setup(e, { emit: s }) {
157
+ const t = g(() => ({
158
158
  "b-listbox-option--disabled": e.disabled,
159
159
  "b-listbox-option--selected": e.selected
160
160
  }));
161
161
  return {
162
162
  // Enums
163
- BentoKeyboardNavigationKeyDownEvent: x,
164
- BentoListboxEvent: u,
163
+ BentoKeyboardNavigationKeyDownEvent: G,
164
+ BentoListboxEvent: b,
165
165
  // Values
166
- conditionalClasses: s,
166
+ conditionalClasses: t,
167
167
  // Events
168
168
  onClick: (a) => {
169
- t(u.CLICK, a);
169
+ s(b.CLICK, a);
170
170
  },
171
171
  onOptionSelected: (a, l) => {
172
- t(a, l);
172
+ s(a, l);
173
173
  }
174
174
  };
175
175
  }
176
176
  });
177
- function ut(e, t, s, r, b, a) {
178
- return d(), T("label", U({
177
+ function ut(e, s, t, c, r, a) {
178
+ return m(), O("label", U({
179
179
  class: ["b-listbox-option", e.conditionalClasses],
180
180
  role: "option"
181
181
  }, e.$attrs, {
182
- onClick: t[0] || (t[0] = (...l) => e.onClick && e.onClick(...l)),
182
+ onClick: s[0] || (s[0] = (...l) => e.onClick && e.onClick(...l)),
183
183
  onKeydown: [
184
- t[1] || (t[1] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.ENTER, l), ["enter"])),
185
- t[2] || (t[2] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.SPACE, l), ["space"])),
186
- t[3] || (t[3] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.TAB, l), ["tab"]))
184
+ s[1] || (s[1] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.ENTER, l), ["enter"])),
185
+ s[2] || (s[2] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.SPACE, l), ["space"])),
186
+ s[3] || (s[3] = ve((l) => e.onOptionSelected(e.BentoListboxEvent.TAB, l), ["tab"]))
187
187
  ]
188
188
  }), [
189
- Y(e.$slots, "default", {}, void 0, !0)
189
+ F(e.$slots, "default", {}, void 0, !0)
190
190
  ], 16);
191
191
  }
192
192
  const be = /* @__PURE__ */ q(ct, [["render", ut], ["__scopeId", "data-v-18a61f5d"]]);
@@ -196,16 +196,16 @@ const dt = {
196
196
  this.uuid = Te.toString(), Te += 1;
197
197
  }
198
198
  }, bt = { key: 0 };
199
- function mt(e, t, s, r, b, a) {
200
- return d(), T("svg", U({ role: "img" }, e.$attrs, {
199
+ function mt(e, s, t, c, r, a) {
200
+ return m(), O("svg", U({ role: "img" }, e.$attrs, {
201
201
  class: "ui-assets-icons-16",
202
202
  xmlns: "http://www.w3.org/2000/svg",
203
203
  width: "16",
204
204
  height: "16",
205
205
  fill: "none"
206
206
  }), [
207
- e.$attrs["svg-title"] ? (d(), T("title", bt, G(e.$attrs["svg-title"]), 1)) : W("", !0),
208
- t[0] || (t[0] = K("path", {
207
+ e.$attrs["svg-title"] ? (m(), O("title", bt, z(e.$attrs["svg-title"]), 1)) : V("", !0),
208
+ s[0] || (s[0] = K("path", {
209
209
  fill: "#00112C",
210
210
  d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
211
211
  }, null, -1))
@@ -236,60 +236,60 @@ const vt = /* @__PURE__ */ q(dt, [["render", mt]]), ft = X({
236
236
  */
237
237
  selected: { type: Boolean, default: !1 }
238
238
  },
239
- emits: [u.ENTER, u.SELECT, u.SPACE, u.TAB],
240
- setup(e, { emit: t }) {
241
- const s = (l) => {
242
- e.disabled || t(l, e.option);
243
- }, r = p(() => e.disabled ? !0 : null), b = p(() => e.selected ? !0 : null), a = p(() => e.disabled ? -1 : 0);
239
+ emits: [b.ENTER, b.SELECT, b.SPACE, b.TAB],
240
+ setup(e, { emit: s }) {
241
+ const t = (l) => {
242
+ e.disabled || s(l, e.option);
243
+ }, c = g(() => e.disabled ? !0 : null), r = g(() => e.selected ? !0 : null), a = g(() => e.disabled ? -1 : 0);
244
244
  return {
245
245
  // Values
246
- ariaDisabled: r,
247
- ariaSelected: b,
246
+ ariaDisabled: c,
247
+ ariaSelected: r,
248
248
  tabIndex: a,
249
249
  // Enums
250
- BentoListboxEvent: u,
250
+ BentoListboxEvent: b,
251
251
  // Events
252
- onOptionSelected: s
252
+ onOptionSelected: t
253
253
  };
254
254
  }
255
255
  }), gt = { class: "b-listbox-single-select-option__text" }, pt = { class: "b-listbox-single-select-option__check-icon" };
256
- function yt(e, t, s, r, b, a) {
257
- const l = $("bento-typography"), m = $("checkmark-icon"), g = $("bento-listbox-option");
258
- return d(), D(g, {
256
+ function yt(e, s, t, c, r, a) {
257
+ const l = k("bento-typography"), v = k("checkmark-icon"), S = k("bento-listbox-option");
258
+ return m(), D(S, {
259
259
  class: "b-listbox-single-select-option",
260
260
  disabled: e.disabled,
261
261
  selected: e.selected,
262
262
  "aria-selected": e.ariaSelected,
263
263
  "aria-disabled": e.ariaDisabled,
264
264
  tabindex: e.tabIndex,
265
- onClick: t[0] || (t[0] = (n) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
266
- onEnterPressed: t[1] || (t[1] = (n) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
267
- onSpacePressed: t[2] || (t[2] = qe((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
268
- onTabPressed: t[3] || (t[3] = (n) => e.onOptionSelected(e.BentoListboxEvent.TAB))
265
+ onClick: s[0] || (s[0] = (o) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
266
+ onEnterPressed: s[1] || (s[1] = (o) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
267
+ onSpacePressed: s[2] || (s[2] = qe((o) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
268
+ onTabPressed: s[3] || (s[3] = (o) => e.onOptionSelected(e.BentoListboxEvent.TAB))
269
269
  }, {
270
- default: I(() => [
271
- Y(e.$slots, "default", le(re(e.option)), () => [
270
+ default: $(() => [
271
+ F(e.$slots, "default", le(re(e.option)), () => [
272
272
  K("span", gt, [
273
- P(l, { el: "span" }, {
274
- default: I(() => [
275
- z(G(e.option.label), 1)
273
+ M(l, { el: "span" }, {
274
+ default: $(() => [
275
+ Y(z(e.option.label), 1)
276
276
  ]),
277
277
  _: 1
278
278
  }),
279
- e.option.description ? (d(), D(l, {
279
+ e.option.description ? (m(), D(l, {
280
280
  key: 0,
281
281
  class: "b-listbox-single-select-option__description",
282
282
  el: "span"
283
283
  }, {
284
- default: I(() => [
285
- z(G(e.option.description), 1)
284
+ default: $(() => [
285
+ Y(z(e.option.description), 1)
286
286
  ]),
287
287
  _: 1
288
- })) : W("", !0)
288
+ })) : V("", !0)
289
289
  ])
290
290
  ], !0),
291
291
  K("span", pt, [
292
- oe(P(m, { "svg-title": "selected" }, null, 512), [
292
+ oe(M(v, { "svg-title": "selected" }, null, 512), [
293
293
  [$e, e.selected]
294
294
  ])
295
295
  ])
@@ -297,19 +297,19 @@ function yt(e, t, s, r, b, a) {
297
297
  _: 3
298
298
  }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
299
299
  }
300
- const St = /* @__PURE__ */ q(ft, [["render", yt], ["__scopeId", "data-v-226f4c84"]]), Re = ({ items: e, isOptionDisabled: t, hasStaticCategories: s }, r) => {
301
- const b = p(
302
- () => s.value ? e.value.flatMap((y) => y.items) : e.value
303
- ), a = p(() => b.value.length - 1), l = M(0);
300
+ const St = /* @__PURE__ */ q(ft, [["render", yt], ["__scopeId", "data-v-226f4c84"]]), Re = ({ items: e, isOptionDisabled: s, hasStaticCategories: t }, c) => {
301
+ const r = g(
302
+ () => t.value ? e.value.flatMap((p) => p.items) : e.value
303
+ ), a = g(() => r.value.length - 1), l = P(0);
304
304
  Ae(() => {
305
- t && (l.value = e.value.findIndex((y) => !t(y)));
305
+ s && (l.value = e.value.findIndex((p) => !s(p)));
306
306
  });
307
- const m = (y) => {
308
- var R, C;
309
- const O = ((C = (R = e.value[y]) == null ? void 0 : R.items) == null ? void 0 : C.length) ? e.value[y].items.every((A) => t(A)) : t(e.value[y]);
310
- return !t || !!t && O;
311
- }, g = (y) => {
312
- switch (y) {
307
+ const v = (p) => {
308
+ var R, h;
309
+ const A = ((h = (R = e.value[p]) == null ? void 0 : R.items) == null ? void 0 : h.length) ? e.value[p].items.every((I) => s(I)) : s(e.value[p]);
310
+ return !s || !!s && A;
311
+ }, S = (p) => {
312
+ switch (p) {
313
313
  case "increase":
314
314
  l.value += 1;
315
315
  break;
@@ -317,42 +317,42 @@ const St = /* @__PURE__ */ q(ft, [["render", yt], ["__scopeId", "data-v-226f4c84
317
317
  l.value -= 1;
318
318
  break;
319
319
  }
320
- }, n = ({ edgeCaseItem: y }, S, O) => {
321
- l.value !== y && (g(O), m(l.value) && S(), r(l.value));
322
- }, v = (y) => {
323
- B(y), n(
320
+ }, o = ({ edgeCaseItem: p }, y, A) => {
321
+ l.value !== p && (S(A), v(l.value) && y(), c(l.value));
322
+ }, i = (p) => {
323
+ B(p), o(
324
324
  {
325
325
  edgeCaseItem: a.value
326
326
  },
327
- v,
327
+ i,
328
328
  "increase"
329
329
  /* INCREASE */
330
330
  );
331
- }, o = (y) => {
332
- B(y), n(
331
+ }, n = (p) => {
332
+ B(p), o(
333
333
  {
334
334
  edgeCaseItem: 0
335
335
  },
336
- o,
336
+ n,
337
337
  "decrease"
338
338
  /* DECREASE */
339
339
  );
340
- }, h = () => {
341
- l.value = 0, m(l.value) ? v() : r(l.value);
342
- }, L = () => {
343
- l.value = a.value, m(l.value) ? o() : r(l.value);
344
- }, k = (y) => {
345
- l.value = y;
346
- }, B = (y) => {
347
- var S;
348
- (S = y == null ? void 0 : y.detail) == null || S.preventDefault();
340
+ }, E = () => {
341
+ l.value = 0, v(l.value) ? i() : c(l.value);
342
+ }, C = () => {
343
+ l.value = a.value, v(l.value) ? n() : c(l.value);
344
+ }, L = (p) => {
345
+ l.value = p;
346
+ }, B = (p) => {
347
+ var y;
348
+ (y = p == null ? void 0 : p.detail) == null || y.preventDefault();
349
349
  };
350
350
  return {
351
- moveToFirstElement: h,
352
- moveToLastElement: L,
353
- moveToNextElement: v,
354
- moveToPreviousElement: o,
355
- setListboxFocusedIndex: k,
351
+ moveToFirstElement: E,
352
+ moveToLastElement: C,
353
+ moveToNextElement: i,
354
+ moveToPreviousElement: n,
355
+ setListboxFocusedIndex: L,
356
356
  preventDefault: B,
357
357
  focusedIndex: l
358
358
  };
@@ -403,41 +403,41 @@ const St = /* @__PURE__ */ q(ft, [["render", yt], ["__scopeId", "data-v-226f4c84
403
403
  */
404
404
  staticCategories: { type: Boolean, default: !1 }
405
405
  },
406
- emits: [u.SELECT, u.ENTER, u.SPACE, u.TAB],
407
- setup(e, { emit: t, expose: s, slots: r }) {
408
- const b = M(null), a = M([]), l = p(() => {
409
- var S;
410
- return !!((S = e.selectedValue) != null && S.length) && e.selectedValue.at(0);
411
- }), m = p(() => !!e.items.some(({ items: S }) => !!S)), g = (S) => (O) => {
412
- t(S, [O]);
413
- }, n = (S) => {
414
- var O;
415
- (O = b.value.querySelectorAll('[role="option"]')[S]) == null || O.focus();
406
+ emits: [b.SELECT, b.ENTER, b.SPACE, b.TAB],
407
+ setup(e, { emit: s, expose: t, slots: c }) {
408
+ const r = P(null), a = P([]), l = g(() => {
409
+ var y;
410
+ return !!((y = e.selectedValue) != null && y.length) && e.selectedValue.at(0);
411
+ }), v = g(() => !!e.items.some(({ items: y }) => !!y)), S = (y) => (A) => {
412
+ s(y, [A]);
413
+ }, o = (y) => {
414
+ var A;
415
+ (A = r.value.querySelectorAll('[role="option"]')[y]) == null || A.focus();
416
416
  }, {
417
- moveToNextElement: v,
418
- moveToPreviousElement: o,
419
- moveToFirstElement: h,
420
- moveToLastElement: L,
421
- setListboxFocusedIndex: k
417
+ moveToNextElement: i,
418
+ moveToPreviousElement: n,
419
+ moveToFirstElement: E,
420
+ moveToLastElement: C,
421
+ setListboxFocusedIndex: L
422
422
  } = Re(
423
423
  {
424
424
  items: Z(e, "items"),
425
425
  isOptionDisabled: e.isOptionDisabled,
426
426
  hasStaticCategories: Z(e, "staticCategories")
427
427
  },
428
- n
428
+ o
429
429
  ), B = {
430
- [x.ARROW_UP]: o,
431
- [x.ARROW_DOWN]: v,
432
- [x.HOME]: h,
433
- [x.END]: L
434
- }, y = {
435
- [u.SELECT]: g(u.SELECT),
436
- [u.SPACE]: g(u.SPACE),
437
- [u.TAB]: g(u.TAB),
438
- [u.ENTER]: g(u.ENTER)
430
+ [G.ARROW_UP]: n,
431
+ [G.ARROW_DOWN]: i,
432
+ [G.HOME]: E,
433
+ [G.END]: C
434
+ }, p = {
435
+ [b.SELECT]: S(b.SELECT),
436
+ [b.SPACE]: S(b.SPACE),
437
+ [b.TAB]: S(b.TAB),
438
+ [b.ENTER]: S(b.ENTER)
439
439
  };
440
- return s({
440
+ return t({
441
441
  /**
442
442
  * Reference for a single listbox item.
443
443
  * Required for keyboard navigation in dropdown as $children is removed in vue@3
@@ -447,74 +447,74 @@ const St = /* @__PURE__ */ q(ft, [["render", yt], ["__scopeId", "data-v-226f4c84
447
447
  * Method to set the index of the item to be focused on
448
448
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
449
449
  */
450
- setListboxFocusedIndex: k
450
+ setListboxFocusedIndex: L
451
451
  }), {
452
452
  // Enums
453
- BentoListboxEvent: u,
453
+ BentoListboxEvent: b,
454
454
  // Values
455
- listboxRef: b,
455
+ listboxRef: r,
456
456
  listboxItemRef: a,
457
457
  selectedItem: l,
458
- slots: r,
458
+ slots: c,
459
459
  // Computed
460
- hasCategories: m,
460
+ hasCategories: v,
461
461
  // Methods
462
- onOptionSelected: g,
462
+ onOptionSelected: S,
463
463
  // Keyboard navigation
464
464
  listboxListeners: B,
465
- listboxOptionListeners: y
465
+ listboxOptionListeners: p
466
466
  };
467
467
  }
468
468
  });
469
- function ht(e, t, s, r, b, a) {
470
- const l = $("bento-listbox-single-select-option"), m = $("bento-listbox-single-select-category"), g = ke("bento-keyboard-navigation-directive");
471
- return oe((d(), T("div", U({ ref: "listboxRef" }, Q(e.listboxListeners, !0)), [
472
- e.hasCategories && e.staticCategories ? (d(!0), T(ee, { key: 0 }, F(e.items, (n) => (d(), D(m, {
473
- key: n.value,
474
- "category-label": n.label,
469
+ function ht(e, s, t, c, r, a) {
470
+ const l = k("bento-listbox-single-select-option"), v = k("bento-listbox-single-select-category"), S = ke("bento-keyboard-navigation-directive");
471
+ return oe((m(), O("div", U({ ref: "listboxRef" }, Q(e.listboxListeners, !0)), [
472
+ e.hasCategories && e.staticCategories ? (m(!0), O(ee, { key: 0 }, W(e.items, (o) => (m(), D(v, {
473
+ key: o.value,
474
+ "category-label": o.label,
475
475
  role: "group"
476
476
  }, {
477
- default: I(() => [
478
- (d(!0), T(ee, null, F(n.items, (v) => (d(), D(l, U({
479
- key: v.value,
477
+ default: $(() => [
478
+ (m(!0), O(ee, null, W(o.items, (i) => (m(), D(l, U({
479
+ key: i.value,
480
480
  ref_for: !0,
481
481
  ref: "listboxItemRef",
482
482
  role: "option",
483
- option: v,
484
- disabled: e.isOptionDisabled ? e.isOptionDisabled(v) : null,
485
- selected: v.value === e.selectedItem.value
483
+ option: i,
484
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(i) : null,
485
+ selected: i.value === e.selectedItem.value
486
486
  }, Q(e.listboxOptionListeners)), ce({ _: 2 }, [
487
- F(e.slots, (o, h) => ({
488
- name: h,
489
- fn: I((L) => [
490
- Y(e.$slots, h, U({ ref_for: !0 }, L))
487
+ W(e.slots, (n, E) => ({
488
+ name: E,
489
+ fn: $((C) => [
490
+ F(e.$slots, E, U({ ref_for: !0 }, C))
491
491
  ])
492
492
  }))
493
493
  ]), 1040, ["option", "disabled", "selected"]))), 128))
494
494
  ]),
495
495
  _: 2
496
- }, 1032, ["category-label"]))), 128)) : (d(!0), T(ee, { key: 1 }, F(e.items, (n) => (d(), D(l, U({
497
- key: n.value,
496
+ }, 1032, ["category-label"]))), 128)) : (m(!0), O(ee, { key: 1 }, W(e.items, (o) => (m(), D(l, U({
497
+ key: o.value,
498
498
  ref_for: !0,
499
499
  ref: "listboxItemRef",
500
500
  role: "option",
501
- option: n,
502
- disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
503
- selected: n.value === e.selectedItem.value
501
+ option: o,
502
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
503
+ selected: o.value === e.selectedItem.value
504
504
  }, Q(e.listboxOptionListeners)), ce({ _: 2 }, [
505
- F(e.slots, (v, o) => ({
506
- name: o,
507
- fn: I((h) => [
508
- Y(e.$slots, o, U({ ref_for: !0 }, h))
505
+ W(e.slots, (i, n) => ({
506
+ name: n,
507
+ fn: $((E) => [
508
+ F(e.$slots, n, U({ ref_for: !0 }, E))
509
509
  ])
510
510
  }))
511
511
  ]), 1040, ["option", "disabled", "selected"]))), 128))
512
512
  ], 16)), [
513
- [g]
513
+ [S]
514
514
  ]);
515
515
  }
516
516
  const Et = /* @__PURE__ */ q(Ct, [["render", ht]]);
517
- var ge = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(ge || {}), ie = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(ie || {});
517
+ var ge = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(ge || {}), ae = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(ae || {});
518
518
  const _t = {
519
519
  "en-US": {
520
520
  categoryClosed: "{category} closed",
@@ -573,78 +573,78 @@ const _t = {
573
573
  */
574
574
  tabindex: { type: Number, default: -1 }
575
575
  },
576
- emits: [ie.SELECT_CATEGORY, ie.UNSELECT_CATEGORY],
577
- setup(e, { emit: t }) {
578
- const s = M(!1), { t: r } = ye(), b = (C) => e.isOptionDisabled ? e.isOptionDisabled(C) : !1, a = p(
579
- () => e.category.items.every((C) => b(C))
580
- ), l = Z(e, "staticCategories"), m = p(() => s.value || e.staticCategories), g = p(() => ({
576
+ emits: [ae.SELECT_CATEGORY, ae.UNSELECT_CATEGORY],
577
+ setup(e, { emit: s }) {
578
+ const t = P(!1), { t: c } = ye(), r = (h) => e.isOptionDisabled ? e.isOptionDisabled(h) : !1, a = g(
579
+ () => e.category.items.every((h) => r(h))
580
+ ), l = Z(e, "staticCategories"), v = g(() => t.value || e.staticCategories), S = g(() => ({
581
581
  [`b-listbox-multi-select-category--${ge.DISABLED}`]: a.value,
582
582
  [`b-listbox-multi-select-category--${ge.STATIC_CATEGORY}`]: e.staticCategories
583
- })), n = (C) => {
584
- C.preventDefault(), s.value = !s.value;
585
- }, v = (C) => {
583
+ })), o = (h) => {
584
+ h.preventDefault(), t.value = !t.value;
585
+ }, i = (h) => {
586
586
  var te;
587
- const A = b(C), V = ((te = e.selectedItemsList) == null ? void 0 : te.includes(C.value)) || !1;
588
- return { isDisabled: A, isPreSelected: V };
589
- }, o = p(
590
- () => e.category.items.filter((C) => {
591
- const { isDisabled: A, isPreSelected: V } = v(C);
592
- return A && V || !A;
587
+ const I = r(h), x = ((te = e.selectedItemsList) == null ? void 0 : te.includes(h.value)) || !1;
588
+ return { isDisabled: I, isPreSelected: x };
589
+ }, n = g(
590
+ () => e.category.items.filter((h) => {
591
+ const { isDisabled: I, isPreSelected: x } = i(h);
592
+ return I && x || !I;
593
593
  })
594
- ), h = p(
594
+ ), E = g(
595
595
  () => {
596
- var C;
597
- return (C = o.value) == null ? void 0 : C.filter(
598
- ({ value: A }) => {
599
- var V;
600
- return (V = e.selectedItemsList) == null ? void 0 : V.includes(A);
596
+ var h;
597
+ return (h = n.value) == null ? void 0 : h.filter(
598
+ ({ value: I }) => {
599
+ var x;
600
+ return (x = e.selectedItemsList) == null ? void 0 : x.includes(I);
601
601
  }
602
602
  );
603
603
  }
604
- ), L = p(() => {
605
- const C = s.value ? "categoryOpened" : "categoryClosed";
606
- return r(C, { category: e.category.label });
607
- }), k = p(
604
+ ), C = g(() => {
605
+ const h = t.value ? "categoryOpened" : "categoryClosed";
606
+ return c(h, { category: e.category.label });
607
+ }), L = g(
608
608
  () => ({
609
609
  el: "span",
610
610
  variant: e.staticCategories ? "caption" : "body"
611
611
  })
612
612
  ), B = () => {
613
- t(ie.SELECT_CATEGORY);
614
- }, y = () => {
615
- t(ie.UNSELECT_CATEGORY);
616
- }, { isAllSelected: S, isIndeterminate: O, toggleSelectAll: R } = Be(
617
- h,
618
- o,
613
+ s(ae.SELECT_CATEGORY);
614
+ }, p = () => {
615
+ s(ae.UNSELECT_CATEGORY);
616
+ }, { isAllSelected: y, isIndeterminate: A, toggleSelectAll: R } = Be(
617
+ E,
618
+ n,
619
619
  B,
620
- y
620
+ p
621
621
  );
622
622
  return {
623
623
  // Values
624
- chevronTitle: L,
625
- conditionalClass: g,
624
+ chevronTitle: C,
625
+ conditionalClass: S,
626
626
  hasAllPropsDisabled: a,
627
- isOpen: s,
628
- isAllSelected: S,
629
- isIndeterminate: O,
627
+ isOpen: t,
628
+ isAllSelected: y,
629
+ isIndeterminate: A,
630
630
  isStaticCategory: l,
631
631
  // Computed
632
- showItemChildren: m,
633
- categoryLabelProps: k,
632
+ showItemChildren: v,
633
+ categoryLabelProps: L,
634
634
  // Methods
635
- toggleOpen: n,
635
+ toggleOpen: o,
636
636
  toggleSelectAll: R
637
637
  };
638
638
  }
639
- }), Lt = { class: "b-listbox-multi-select-category__label" };
640
- function Ot(e, t, s, r, b, a) {
641
- const l = $("bento-checkbox"), m = $("bento-typography"), g = $("chevron-up-icon"), n = $("chevron-down-icon"), v = $("bento-listbox-option");
642
- return d(), T("div", null, [
643
- P(v, {
639
+ }), Ot = { class: "b-listbox-multi-select-category__label" };
640
+ function Lt(e, s, t, c, r, a) {
641
+ const l = k("bento-checkbox"), v = k("bento-typography"), S = k("chevron-up-icon"), o = k("chevron-down-icon"), i = k("bento-listbox-option");
642
+ return m(), O("div", null, [
643
+ M(i, {
644
644
  class: fe(["b-listbox-multi-select-category__option", e.conditionalClass])
645
645
  }, {
646
- default: I(() => [
647
- e.isStaticCategory ? W("", !0) : (d(), D(l, {
646
+ default: $(() => [
647
+ e.isStaticCategory ? V("", !0) : (m(), D(l, {
648
648
  key: 0,
649
649
  "model-value": e.isAllSelected,
650
650
  indeterminate: e.isIndeterminate,
@@ -654,23 +654,23 @@ function Ot(e, t, s, r, b, a) {
654
654
  tabindex: e.tabindex,
655
655
  "onUpdate:modelValue": e.toggleSelectAll
656
656
  }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "value", "tabindex", "onUpdate:modelValue"])),
657
- K("span", Lt, [
658
- P(m, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
659
- default: I(() => [
660
- z(G(e.category.label), 1)
657
+ K("span", Ot, [
658
+ M(v, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
659
+ default: $(() => [
660
+ Y(z(e.category.label), 1)
661
661
  ]),
662
662
  _: 1
663
663
  }, 16),
664
- e.isStaticCategory ? W("", !0) : (d(), T("div", {
664
+ e.isStaticCategory ? V("", !0) : (m(), O("div", {
665
665
  key: 0,
666
666
  class: "b-listbox-multi-select-category__label-chevron",
667
667
  "data-testid": "toggle-listbox",
668
- onClickCapture: t[0] || (t[0] = (...o) => e.toggleOpen && e.toggleOpen(...o))
668
+ onClickCapture: s[0] || (s[0] = (...n) => e.toggleOpen && e.toggleOpen(...n))
669
669
  }, [
670
- e.isOpen ? (d(), D(g, {
670
+ e.isOpen ? (m(), D(S, {
671
671
  key: 0,
672
672
  "svg-title": e.chevronTitle
673
- }, null, 8, ["svg-title"])) : (d(), D(n, {
673
+ }, null, 8, ["svg-title"])) : (m(), D(o, {
674
674
  key: 1,
675
675
  "svg-title": e.chevronTitle
676
676
  }, null, 8, ["svg-title"]))
@@ -680,13 +680,13 @@ function Ot(e, t, s, r, b, a) {
680
680
  _: 1
681
681
  }, 8, ["class"]),
682
682
  oe(K("div", null, [
683
- Y(e.$slots, "default", {}, void 0, !0)
683
+ F(e.$slots, "default", {}, void 0, !0)
684
684
  ], 512), [
685
685
  [$e, e.showItemChildren]
686
686
  ])
687
687
  ]);
688
688
  }
689
- const At = /* @__PURE__ */ q(Tt, [["render", Ot], ["__scopeId", "data-v-9681c80b"]]);
689
+ const At = /* @__PURE__ */ q(Tt, [["render", Lt], ["__scopeId", "data-v-9681c80b"]]);
690
690
  var H = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(H || {});
691
691
  const It = X({
692
692
  name: "listbox-multi-select-options",
@@ -760,134 +760,134 @@ const It = X({
760
760
  H.SELECT_CATEGORY,
761
761
  H.UNSELECT_CATEGORY
762
762
  ],
763
- setup(e, { emit: t }) {
764
- const s = (n) => {
765
- t(H.TOGGLE_CHECKBOX_SELECTION, n);
766
- }, r = (n) => !!n.items, b = (n) => {
767
- const v = e.isMultiLevel && e.searching;
768
- return n.description && (!e.isMultiLevel || v);
769
- }, a = (n) => n.items ? !!n.items.find((v) => e.selectedItemsList.includes(v.value)) : e.selectedItemsList.includes(n.value), l = (n, v) => {
770
- if (r(v))
771
- return t(n ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, v);
772
- s(v.value);
763
+ setup(e, { emit: s }) {
764
+ const t = (o) => {
765
+ s(H.TOGGLE_CHECKBOX_SELECTION, o);
766
+ }, c = (o) => !!o.items, r = (o) => {
767
+ const i = e.isMultiLevel && e.searching;
768
+ return o.description && (!e.isMultiLevel || i);
769
+ }, a = (o) => o.items ? !!o.items.find((i) => e.selectedItemsList.includes(i.value)) : e.selectedItemsList.includes(o.value), l = (o, i) => {
770
+ if (c(i))
771
+ return s(o ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, i);
772
+ t(i.value);
773
773
  };
774
774
  return {
775
775
  // Values
776
- conditionalClasses: p(() => ({
776
+ conditionalClasses: g(() => ({
777
777
  "b-listbox-multi-select-options__static-category-option": e.staticCategories,
778
778
  "b-listbox-multi-select-options__category-option": e.categoryItems
779
779
  })),
780
780
  // Methods
781
781
  isOptionSelected: a,
782
- shouldShowDescription: b,
783
- toggleCheckboxSelection: s,
782
+ shouldShowDescription: r,
783
+ toggleCheckboxSelection: t,
784
784
  selectSearch: l,
785
- computedTabindex: (n) => n + 1 === e.focusedIndex ? 0 : -1,
785
+ computedTabindex: (o) => o + 1 === e.focusedIndex ? 0 : -1,
786
786
  // Enums
787
- BentoListboxEvent: u,
787
+ BentoListboxEvent: b,
788
788
  ListboxMultiSelectOptionsEvent: H
789
789
  };
790
790
  }
791
791
  }), $t = { class: "b-listbox-multi-select__option-text" }, kt = { class: "b-listbox-multi-select__option-text" };
792
- function Bt(e, t, s, r, b, a) {
793
- const l = $("bento-checkbox"), m = $("bento-typography"), g = $("bento-listbox-option"), n = $("listbox-multi-select-options", !0), v = $("listbox-multi-select-category");
794
- return d(), T("div", null, [
795
- (d(!0), T(ee, null, F(e.items, (o, h) => (d(), T("div", {
796
- key: `selected-${o.value}`
792
+ function Bt(e, s, t, c, r, a) {
793
+ const l = k("bento-checkbox"), v = k("bento-typography"), S = k("bento-listbox-option"), o = k("listbox-multi-select-options", !0), i = k("listbox-multi-select-category");
794
+ return m(), O("div", null, [
795
+ (m(!0), O(ee, null, W(e.items, (n, E) => (m(), O("div", {
796
+ key: `selected-${n.value}`
797
797
  }, [
798
- e.searching && e.isMultiLevel ? (d(), D(g, {
798
+ e.searching && e.isMultiLevel ? (m(), D(S, {
799
799
  key: 0,
800
800
  class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
801
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
801
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null
802
802
  }, {
803
- default: I(() => [
804
- P(l, {
805
- "model-value": e.isOptionSelected(o),
806
- "aria-label": o.label,
807
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
808
- value: o.value,
809
- tabindex: e.computedTabindex(h),
810
- "onUpdate:modelValue": (L) => e.selectSearch(L, o)
803
+ default: $(() => [
804
+ M(l, {
805
+ "model-value": e.isOptionSelected(n),
806
+ "aria-label": n.label,
807
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
808
+ value: n.value,
809
+ tabindex: e.computedTabindex(E),
810
+ "onUpdate:modelValue": (C) => e.selectSearch(C, n)
811
811
  }, null, 8, ["model-value", "aria-label", "disabled", "value", "tabindex", "onUpdate:modelValue"]),
812
- Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
812
+ F(e.$slots, "default", U({ ref_for: !0 }, n), () => [
813
813
  K("span", $t, [
814
- P(m, { el: "span" }, {
815
- default: I(() => [
816
- z(G(o.label), 1)
814
+ M(v, { el: "span" }, {
815
+ default: $(() => [
816
+ Y(z(n.label), 1)
817
817
  ]),
818
818
  _: 2
819
819
  }, 1024),
820
- e.shouldShowDescription(o) ? (d(), D(m, {
820
+ e.shouldShowDescription(n) ? (m(), D(v, {
821
821
  key: 0,
822
822
  class: "b-listbox-multi-select__option-description",
823
823
  el: "span"
824
824
  }, {
825
- default: I(() => [
826
- z(G(o.description), 1)
825
+ default: $(() => [
826
+ Y(z(n.description), 1)
827
827
  ]),
828
828
  _: 2
829
- }, 1024)) : W("", !0)
829
+ }, 1024)) : V("", !0)
830
830
  ])
831
831
  ], !0)
832
832
  ]),
833
833
  _: 2
834
- }, 1032, ["class", "disabled"])) : (d(), T(ee, { key: 1 }, [
835
- o.items ? (d(), D(v, {
834
+ }, 1032, ["class", "disabled"])) : (m(), O(ee, { key: 1 }, [
835
+ n.items ? (m(), D(i, {
836
836
  key: 0,
837
- category: o,
837
+ category: n,
838
838
  "static-categories": e.staticCategories,
839
839
  "is-option-disabled": e.isOptionDisabled,
840
840
  "selected-items-list": e.selectedItemsList,
841
- tabindex: e.computedTabindex(h),
842
- onSelectCategory: (L) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
843
- onUnselectCategory: (L) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o)
841
+ tabindex: e.computedTabindex(E),
842
+ onSelectCategory: (C) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, n),
843
+ onUnselectCategory: (C) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, n)
844
844
  }, {
845
- default: I(() => [
846
- P(n, {
845
+ default: $(() => [
846
+ M(o, {
847
847
  "category-items": "",
848
- items: o.items,
848
+ items: n.items,
849
849
  "is-option-disabled": e.isOptionDisabled,
850
850
  "focused-index": e.focusedIndex,
851
851
  "is-multi-level": e.isMultiLevel,
852
852
  "static-categories": e.staticCategories,
853
853
  "selected-items-list": e.selectedItemsList,
854
854
  searching: e.searching,
855
- onToggleCheckboxSelection: t[0] || (t[0] = (L) => e.toggleCheckboxSelection(L))
855
+ onToggleCheckboxSelection: s[0] || (s[0] = (C) => e.toggleCheckboxSelection(C))
856
856
  }, null, 8, ["items", "is-option-disabled", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching"])
857
857
  ]),
858
858
  _: 2
859
- }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), D(g, {
859
+ }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (m(), D(S, {
860
860
  key: 1,
861
861
  class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
862
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
862
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null
863
863
  }, {
864
- default: I(() => [
865
- P(l, {
864
+ default: $(() => [
865
+ M(l, {
866
866
  "model-value": e.selectedItemsList,
867
- "aria-label": o.label,
868
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
869
- value: o.value,
870
- tabindex: e.computedTabindex(h),
871
- "onUpdate:modelValue": (L) => e.toggleCheckboxSelection(o)
867
+ "aria-label": n.label,
868
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
869
+ value: n.value,
870
+ tabindex: e.computedTabindex(E),
871
+ "onUpdate:modelValue": (C) => e.toggleCheckboxSelection(n)
872
872
  }, null, 8, ["model-value", "aria-label", "disabled", "value", "tabindex", "onUpdate:modelValue"]),
873
- Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
873
+ F(e.$slots, "default", U({ ref_for: !0 }, n), () => [
874
874
  K("span", kt, [
875
- P(m, { el: "span" }, {
876
- default: I(() => [
877
- z(G(o.label), 1)
875
+ M(v, { el: "span" }, {
876
+ default: $(() => [
877
+ Y(z(n.label), 1)
878
878
  ]),
879
879
  _: 2
880
880
  }, 1024),
881
- e.shouldShowDescription(o) ? (d(), D(m, {
881
+ e.shouldShowDescription(n) ? (m(), D(v, {
882
882
  key: 0,
883
883
  class: "b-listbox-multi-select__option-description",
884
884
  el: "span"
885
885
  }, {
886
- default: I(() => [
887
- z(G(o.description), 1)
886
+ default: $(() => [
887
+ Y(z(n.description), 1)
888
888
  ]),
889
889
  _: 2
890
- }, 1024)) : W("", !0)
890
+ }, 1024)) : V("", !0)
891
891
  ])
892
892
  ], !0)
893
893
  ]),
@@ -898,16 +898,16 @@ function Bt(e, t, s, r, b, a) {
898
898
  ]);
899
899
  }
900
900
  const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab"]]), Dt = (e) => {
901
- const t = p(() => {
902
- var r;
903
- return !!((r = e.value) != null && r.find(({ items: b }) => !!b));
904
- }), s = p(() => {
905
- var r;
906
- return t.value ? (r = e.value) == null ? void 0 : r.reduce((b, a) => (a.items ? b.push(...a.items.flat()) : b.push(a), b), []) : e.value;
901
+ const s = g(() => {
902
+ var c;
903
+ return !!((c = e.value) != null && c.find(({ items: r }) => !!r));
904
+ }), t = g(() => {
905
+ var c;
906
+ return s.value ? (c = e.value) == null ? void 0 : c.reduce((r, a) => (a.items ? r.push(...a.items.flat()) : r.push(a), r), []) : e.value;
907
907
  });
908
908
  return {
909
- isMultiLevelSelect: t,
910
- flattenedItemsList: s
909
+ isMultiLevelSelect: s,
910
+ flattenedItemsList: t
911
911
  };
912
912
  }, De = {
913
913
  "en-US": {
@@ -916,7 +916,7 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
916
916
  numbersSelected: "{number} selected",
917
917
  selectAll: "Select all ({total})"
918
918
  }
919
- }, Nt = { class: "b-listbox-multi-select" }, Pt = { key: 0 }, Mt = {
919
+ }, Nt = { class: "b-listbox-multi-select" }, Mt = { key: 0 }, Pt = {
920
920
  key: 1,
921
921
  class: "b-listbox-multi-select__divider"
922
922
  }, wt = { i18n: { messages: De } }, Ut = /* @__PURE__ */ X({
@@ -932,179 +932,179 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
932
932
  staticCategories: { type: Boolean, default: !1 }
933
933
  },
934
934
  emits: ["select"],
935
- setup(e, { emit: t }) {
936
- const s = e, r = t, { t: b } = ye({ messages: De }), a = je(), l = M(null), m = M(null), g = M(null), n = p(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: v, flattenedItemsList: o } = Dt(Z(s, "items")), h = (c) => {
937
- var _;
938
- const f = s.isOptionDisabled(c), i = ((_ = n.value) == null ? void 0 : _.includes(c.value)) || !1;
939
- return { isDisabled: f, isPreSelected: i };
940
- }, L = p(() => {
941
- if (s.searching && v)
942
- return s.items;
943
- const c = o.value.filter((f) => {
944
- const { isDisabled: i, isPreSelected: _ } = h(f);
945
- return i && _ || !i;
935
+ setup(e, { emit: s }) {
936
+ const t = e, c = s, { t: r } = ye({ messages: De }), a = je(), l = P(null), v = P(null), S = P(null), o = g(() => t.selectedValues.map(({ value: d }) => d)), { isMultiLevelSelect: i, flattenedItemsList: n } = Dt(Z(t, "items")), E = (d) => {
937
+ var T;
938
+ const f = t.isOptionDisabled(d), u = ((T = o.value) == null ? void 0 : T.includes(d.value)) || !1;
939
+ return { isDisabled: f, isPreSelected: u };
940
+ }, C = g(() => {
941
+ if (t.searching && i)
942
+ return t.items;
943
+ const d = n.value.filter((f) => {
944
+ const { isDisabled: u, isPreSelected: T } = E(f);
945
+ return u && T || !u;
946
946
  });
947
- return s.selectedValues.forEach((f) => {
948
- c.find((i) => i.value === f.value) || c.push(f);
949
- }), c;
950
- }), k = p(
947
+ return t.selectedValues.forEach((f) => {
948
+ d.find((u) => u.value === f.value) || d.push(f);
949
+ }), d;
950
+ }), L = g(
951
951
  () => {
952
- var c;
953
- return (c = L.value) == null ? void 0 : c.filter((f) => {
954
- var i;
955
- return f.items && v.value && s.searching ? f.items.filter(
956
- (E) => (s.selectedValues ?? []).includes(E.value)
957
- ).length === f.items.length : (i = n.value) == null ? void 0 : i.includes(f.value);
952
+ var d;
953
+ return (d = C.value) == null ? void 0 : d.filter((f) => {
954
+ var u;
955
+ return f.items && i.value && t.searching ? f.items.filter(
956
+ (_) => (t.selectedValues ?? []).includes(_.value)
957
+ ).length === f.items.length : (u = o.value) == null ? void 0 : u.includes(f.value);
958
958
  });
959
959
  }
960
- ), B = () => v.value && !s.searching ? o.value.length : s.items.length, y = p(() => {
961
- var _;
962
- const c = L.value.length, f = B(), i = ((_ = k.value) == null ? void 0 : _.length) || 0;
963
- return i === 0 ? b("selectAll", { total: c }) : i === f ? b("allSelected", { total: f }) : i <= f ? b("numberOfTotalSelected", { number: i, total: f }) : b("numbersSelected", { number: i });
964
- }), S = (c) => {
960
+ ), B = () => i.value && !t.searching ? n.value.length : t.items.length, p = g(() => {
961
+ var T;
962
+ const d = C.value.length, f = B(), u = ((T = L.value) == null ? void 0 : T.length) || 0;
963
+ return u === 0 ? r("selectAll", { total: d }) : u === f ? r("allSelected", { total: f }) : u <= f ? r("numberOfTotalSelected", { number: u, total: f }) : r("numbersSelected", { number: u });
964
+ }), y = (d) => {
965
+ const f = (T) => {
966
+ const { isDisabled: _, isPreSelected: j } = E(T);
967
+ return _ && j || !_;
968
+ }, u = d.filter(f).filter((T) => !o.value.includes(T.value));
969
+ c("select", [...t.selectedValues, ...u]);
970
+ }, A = (d) => {
965
971
  const f = (_) => {
966
- const { isDisabled: E, isPreSelected: j } = h(_);
967
- return E && j || !E;
968
- }, i = c.filter(f).filter((_) => !n.value.includes(_.value));
969
- r("select", [...s.selectedValues, ...i]);
970
- }, O = (c) => {
971
- const f = (E) => {
972
- const { isDisabled: j, isPreSelected: We } = h(E);
973
- return !(j && We);
974
- }, i = c.filter(f).map(({ value: E }) => E), _ = s.selectedValues.filter((E) => !(i != null && i.includes(E.value)));
975
- r("select", _);
972
+ const { isDisabled: j, isPreSelected: Ve } = E(_);
973
+ return !(j && Ve);
974
+ }, u = d.filter(f).map(({ value: _ }) => _), T = t.selectedValues.filter((_) => !(u != null && u.includes(_.value)));
975
+ c("select", T);
976
976
  }, R = () => {
977
- S(o.value);
978
- }, C = () => {
979
- O(o.value);
980
- }, { isAllSelected: A, isIndeterminate: V, toggleSelectAll: te } = Be(
981
- k,
977
+ y(n.value);
978
+ }, h = () => {
979
+ A(n.value);
980
+ }, { isAllSelected: I, isIndeterminate: x, toggleSelectAll: te } = Be(
982
981
  L,
982
+ C,
983
983
  R,
984
- C
985
- ), me = (c) => {
986
- S(c.items);
987
- }, ue = (c) => {
988
- O(c.items);
989
- }, J = (c, f) => {
990
- let i = !1;
991
- const _ = s.selectedValues.filter(({ value: E }) => f.value === E ? (i = !0, !1) : !0);
992
- i || _.push(f), r(c, _);
993
- }, w = p(() => {
994
- if (!v.value)
995
- return s.selectedValues;
996
- const c = (E) => n.value.includes(E.value), f = (E) => !s.staticCategories && E.every((j) => c(j));
997
- return s.items.flatMap(
998
- (E) => E.items && !f(E.items) ? E.items : E
999
- ).filter((E) => E.items ? !0 : c(E));
1000
- }), ae = p(() => {
1001
- var i, _, E, j;
1002
- const c = ["automatic", "button"].includes(s.lazyLoadType), f = ((i = s.selectedValues) == null ? void 0 : i.length) > 0 && ((_ = k.value) == null ? void 0 : _.length) !== ((E = o.value) == null ? void 0 : E.length);
1003
- return c && s.hasMoreItems ? !!((j = s.selectedValues) != null && j.length) : f;
1004
- }), Ce = p(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), Ne = p(
984
+ h
985
+ ), me = (d) => {
986
+ y(d.items);
987
+ }, ue = (d) => {
988
+ A(d.items);
989
+ }, J = (d, f) => {
990
+ let u = !1;
991
+ const T = t.selectedValues.filter(({ value: _ }) => f.value === _ ? (u = !0, !1) : !0);
992
+ u || T.push(f), c(d, T);
993
+ }, w = g(() => {
994
+ if (!i.value)
995
+ return t.selectedValues;
996
+ const d = (_) => o.value.includes(_.value), f = (_) => !t.staticCategories && _.every((j) => d(j));
997
+ return t.items.flatMap(
998
+ (_) => _.items && !f(_.items) ? _.items : _
999
+ ).filter((_) => _.items ? !0 : d(_));
1000
+ }), ie = g(() => {
1001
+ var u, T, _, j;
1002
+ const d = ["automatic", "button"].includes(t.lazyLoadType), f = ((u = t.selectedValues) == null ? void 0 : u.length) > 0 && ((T = L.value) == null ? void 0 : T.length) !== ((_ = n.value) == null ? void 0 : _.length);
1003
+ return d && t.hasMoreItems ? !!((j = t.selectedValues) != null && j.length) : f;
1004
+ }), Ce = g(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), Ne = g(
1005
1005
  () => l.value ? [l.value] : []
1006
- ), Pe = p(
1006
+ ), Me = g(
1007
1007
  () => {
1008
- var c, f;
1009
- return (f = (c = g.value) == null ? void 0 : c.$children) != null && f.length ? g.value.$children : [];
1008
+ var d, f;
1009
+ return (f = (d = S.value) == null ? void 0 : d.$children) != null && f.length ? S.value.$children : [];
1010
1010
  }
1011
- ), Me = p(() => ({ label: y, value: A })), we = p(() => [Me, ...Z(s, "items").value]), Ue = (c) => {
1012
- var _;
1013
- const f = [...Ne.value, ...Pe.value], i = f[c].$el;
1014
- i.tagName === "LABEL" ? i.focus() : (_ = i.querySelector("label")) == null || _.focus(), f[c].$el.focus();
1011
+ ), Pe = g(() => ({ label: p, value: I })), we = g(() => [Pe, ...Z(t, "items").value]), Ue = (d) => {
1012
+ var T;
1013
+ const f = [...Ne.value, ...Me.value], u = f[d].$el;
1014
+ u.tagName === "LABEL" ? u.focus() : (T = u.querySelector("label")) == null || T.focus(), f[d].$el.focus();
1015
1015
  }, {
1016
- moveToNextElement: Ve,
1017
- moveToPreviousElement: xe,
1018
- moveToFirstElement: Ge,
1019
- moveToLastElement: ze,
1016
+ moveToNextElement: xe,
1017
+ moveToPreviousElement: Ge,
1018
+ moveToFirstElement: ze,
1019
+ moveToLastElement: Ye,
1020
1020
  preventDefault: he,
1021
1021
  focusedIndex: Ee
1022
1022
  } = Re(
1023
1023
  {
1024
- items: M(we),
1025
- isOptionDisabled: s.isOptionDisabled,
1026
- hasStaticCategories: Z(s, "staticCategories")
1024
+ items: P(we),
1025
+ isOptionDisabled: t.isOptionDisabled,
1026
+ hasStaticCategories: Z(t, "staticCategories")
1027
1027
  },
1028
1028
  Ue
1029
- ), Ye = {
1030
- [x.ARROW_UP]: (c) => xe(c),
1031
- [x.ARROW_DOWN]: (c) => Ve(c),
1032
- [x.HOME]: Ge,
1033
- [x.END]: ze
1034
- }, Fe = {
1035
- [x.ARROW_UP]: he,
1036
- [x.ARROW_DOWN]: he
1029
+ ), Fe = {
1030
+ [G.ARROW_UP]: (d) => Ge(d),
1031
+ [G.ARROW_DOWN]: (d) => xe(d),
1032
+ [G.HOME]: ze,
1033
+ [G.END]: Ye
1034
+ }, We = {
1035
+ [G.ARROW_UP]: he,
1036
+ [G.ARROW_DOWN]: he
1037
1037
  };
1038
- return (c, f) => (d(), T("div", Nt, [
1039
- ae.value ? (d(), T("div", Pt, [
1040
- oe((d(), T("ul", U({ class: "b-listbox-multi-select__chips" }, Q(Fe, !0)), [
1041
- (d(!0), T(ee, null, F(w.value, (i) => (d(), T("li", {
1042
- key: i.value
1038
+ return (d, f) => (m(), O("div", Nt, [
1039
+ ie.value ? (m(), O("div", Mt, [
1040
+ oe((m(), O("ul", U({ class: "b-listbox-multi-select__chips" }, Q(We, !0)), [
1041
+ (m(!0), O(ee, null, W(w.value, (u) => (m(), O("li", {
1042
+ key: u.value
1043
1043
  }, [
1044
- P(N(Qe), {
1044
+ M(N(Qe), {
1045
1045
  ref_for: !0,
1046
1046
  ref_key: "selectedListboxItemsRef",
1047
- ref: m,
1048
- disabled: c.isOptionDisabled(i),
1049
- label: i.label,
1047
+ ref: v,
1048
+ disabled: d.isOptionDisabled(u),
1049
+ label: u.label,
1050
1050
  condensed: "",
1051
- onClick: (_) => i.items ? ue(i) : J("select", i)
1051
+ onClick: (T) => u.items ? ue(u) : J("select", u)
1052
1052
  }, null, 8, ["disabled", "label", "onClick"])
1053
1053
  ]))), 128))
1054
1054
  ], 16)), [
1055
1055
  [N(de)]
1056
1056
  ]),
1057
1057
  f[4] || (f[4] = K("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1058
- ])) : W("", !0),
1059
- oe((d(), T("div", Q(Ye, !0), [
1060
- Ce.value ? (d(), D(N(be), {
1058
+ ])) : V("", !0),
1059
+ oe((m(), O("div", Q(Fe, !0), [
1060
+ Ce.value ? (m(), D(N(be), {
1061
1061
  key: 0,
1062
1062
  ref_key: "selectAllListboxItemsRef",
1063
1063
  ref: l,
1064
1064
  class: "b-listbox-multi-select__option"
1065
1065
  }, {
1066
- default: I(() => [
1067
- P(N(Se), {
1068
- "aria-label": y.value,
1069
- "model-value": N(A),
1070
- indeterminate: N(V),
1066
+ default: $(() => [
1067
+ M(N(Se), {
1068
+ "aria-label": p.value,
1069
+ "model-value": N(I),
1070
+ indeterminate: N(x),
1071
1071
  tabindex: N(Ee) === 0 ? 0 : -1,
1072
1072
  "onUpdate:modelValue": N(te)
1073
1073
  }, null, 8, ["aria-label", "model-value", "indeterminate", "tabindex", "onUpdate:modelValue"]),
1074
- P(N(ne), {
1074
+ M(N(ne), {
1075
1075
  el: "span",
1076
1076
  "aria-hidden": "true"
1077
1077
  }, {
1078
- default: I(() => [
1079
- z(G(y.value), 1)
1078
+ default: $(() => [
1079
+ Y(z(p.value), 1)
1080
1080
  ]),
1081
1081
  _: 1
1082
1082
  })
1083
1083
  ]),
1084
1084
  _: 1
1085
- }, 512)) : W("", !0),
1086
- Ce.value ? (d(), T("hr", Mt)) : W("", !0),
1087
- P(N(Rt), {
1085
+ }, 512)) : V("", !0),
1086
+ Ce.value ? (m(), O("hr", Pt)) : V("", !0),
1087
+ M(N(Rt), {
1088
1088
  ref_key: "listboxItemsRef",
1089
- ref: g,
1090
- items: c.items,
1091
- "is-option-disabled": c.isOptionDisabled,
1092
- "is-multi-level": N(v),
1093
- "static-categories": c.staticCategories,
1094
- searching: c.searching,
1095
- "selected-items-list": n.value,
1089
+ ref: S,
1090
+ items: d.items,
1091
+ "is-option-disabled": d.isOptionDisabled,
1092
+ "is-multi-level": N(i),
1093
+ "static-categories": d.staticCategories,
1094
+ searching: d.searching,
1095
+ "selected-items-list": o.value,
1096
1096
  "focused-index": N(Ee),
1097
- onToggleCheckboxSelection: f[0] || (f[0] = (i) => J("select", i)),
1097
+ onToggleCheckboxSelection: f[0] || (f[0] = (u) => J("select", u)),
1098
1098
  onSelectCategory: me,
1099
1099
  onUnselectCategory: ue,
1100
- onSpacePressed: f[1] || (f[1] = (i) => J(N(u).SPACE, i)),
1101
- onTabPressed: f[2] || (f[2] = (i) => J(N(u).TAB, i)),
1102
- onEnterPressed: f[3] || (f[3] = (i) => J(N(u).ENTER, i))
1100
+ onSpacePressed: f[1] || (f[1] = (u) => J(N(b).SPACE, u)),
1101
+ onTabPressed: f[2] || (f[2] = (u) => J(N(b).TAB, u)),
1102
+ onEnterPressed: f[3] || (f[3] = (u) => J(N(b).ENTER, u))
1103
1103
  }, ce({ _: 2 }, [
1104
- F(N(a), (i, _) => ({
1105
- name: _,
1106
- fn: I((E) => [
1107
- Y(c.$slots, _, le(re(E)), void 0, !0)
1104
+ W(N(a), (u, T) => ({
1105
+ name: T,
1106
+ fn: $((_) => [
1107
+ F(d.$slots, T, le(re(_)), void 0, !0)
1108
1108
  ])
1109
1109
  }))
1110
1110
  ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index"])
@@ -1113,7 +1113,7 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
1113
1113
  ])
1114
1114
  ]));
1115
1115
  }
1116
- }), Le = /* @__PURE__ */ q(Ut, [["__scopeId", "data-v-98a72a10"]]), Oe = {
1116
+ }), Oe = /* @__PURE__ */ q(Ut, [["__scopeId", "data-v-98a72a10"]]), Le = {
1117
1117
  "en-US": {
1118
1118
  loading: "Loading",
1119
1119
  showMore: "Show more"
@@ -1126,18 +1126,18 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
1126
1126
  loading: "Carregando",
1127
1127
  showMore: "Mostrar mais"
1128
1128
  }
1129
- }, Vt = 36, xt = X({
1129
+ }, xt = 36, Gt = X({
1130
1130
  name: "bento-listbox",
1131
1131
  components: {
1132
1132
  BentoEmptyState: Je,
1133
1133
  BentoListboxSingleSelect: Et,
1134
- BentoListboxMultiSelect: Le,
1134
+ BentoListboxMultiSelect: Oe,
1135
1135
  BentoTypography: ne,
1136
1136
  BentoLoadingIndicator: Xe,
1137
1137
  BentoLoadingButton: st
1138
1138
  },
1139
1139
  directives: { BentoKeyboardNavigationDirective: de },
1140
- i18n: { messages: Oe },
1140
+ i18n: { messages: Le },
1141
1141
  props: {
1142
1142
  /**
1143
1143
  * Defines a string value that labels an interactive element.
@@ -1218,7 +1218,7 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
1218
1218
  *
1219
1219
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
1220
1220
  */
1221
- searching: Le.props.searching,
1221
+ searching: Oe.props.searching,
1222
1222
  /**
1223
1223
  * The `input` value.
1224
1224
  * Providing an empty string or empty array will select no options.
@@ -1238,106 +1238,106 @@ const Rt = /* @__PURE__ */ q(It, [["render", Bt], ["__scopeId", "data-v-b83035ab
1238
1238
  }
1239
1239
  },
1240
1240
  emits: [
1241
- u.SELECT,
1242
- u.SPACE,
1243
- u.SHOW_MORE,
1244
- u.ENTER,
1245
- u.ESCAPE,
1246
- u.TAB
1241
+ b.SELECT,
1242
+ b.SPACE,
1243
+ b.SHOW_MORE,
1244
+ b.ENTER,
1245
+ b.ESCAPE,
1246
+ b.TAB
1247
1247
  ],
1248
- setup(e, { emit: t, slots: s }) {
1249
- const r = M([]), b = Z(e, "items"), { t: a } = ye({ messages: Oe }), l = p(() => e.lazyLoadType !== se.AUTOMATIC), m = p(() => e.lazyLoadType === se.AUTOMATIC), g = () => {
1248
+ setup(e, { emit: s, slots: t }) {
1249
+ const c = P([]), r = Z(e, "items"), { t: a } = ye({ messages: Le }), l = g(() => e.lazyLoadType !== se.AUTOMATIC), v = g(() => e.lazyLoadType === se.AUTOMATIC), S = () => {
1250
1250
  var w;
1251
- return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((w = e == null ? void 0 : e.virtualScroll) != null && w.itemHeight) ? e.virtualScroll.itemHeight : Vt;
1251
+ return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((w = e == null ? void 0 : e.virtualScroll) != null && w.itemHeight) ? e.virtualScroll.itemHeight : xt;
1252
1252
  }, {
1253
- containerRef: n,
1254
- containerProps: v,
1255
- onScroll: o,
1256
- list: h,
1257
- wrapperProps: L
1258
- } = ot(b, {
1259
- itemHeight: g(),
1253
+ containerRef: o,
1254
+ containerProps: i,
1255
+ onScroll: n,
1256
+ list: E,
1257
+ wrapperProps: C
1258
+ } = ot(r, {
1259
+ itemHeight: S(),
1260
1260
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1261
1261
  disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1262
- }), k = p(
1262
+ }), L = g(
1263
1263
  () => e.componentLoading !== void 0 || l.value ? "true" : void 0
1264
- ), B = p(
1264
+ ), B = g(
1265
1265
  () => l.value && e.loading || e.componentLoading ? "true" : "false"
1266
- ), y = p(
1266
+ ), p = g(
1267
1267
  () => l.value || e.componentLoading !== void 0 ? "polite" : void 0
1268
- ), S = (w) => (ae) => {
1269
- t(w, ae);
1270
- }, O = () => {
1271
- t(u.SHOW_MORE);
1268
+ ), y = (w) => (ie) => {
1269
+ s(w, ie);
1270
+ }, A = () => {
1271
+ s(b.SHOW_MORE);
1272
1272
  }, R = Ze(() => {
1273
- const w = n.value;
1273
+ const w = o.value;
1274
1274
  if (!w)
1275
1275
  return;
1276
- const ae = Math.round(w.scrollTop) + w.clientHeight >= w.scrollHeight;
1277
- e.hasMoreItems && ae && !e.loading && O();
1278
- }), C = () => {
1279
- m.value ? R() : o();
1280
- }, A = p(() => {
1276
+ const ie = Math.round(w.scrollTop) + w.clientHeight >= w.scrollHeight;
1277
+ e.hasMoreItems && ie && !e.loading && A();
1278
+ }), h = () => {
1279
+ v.value ? R() : n();
1280
+ }, I = g(() => {
1281
1281
  var w;
1282
1282
  return ((w = e.items) == null ? void 0 : w.length) === 0;
1283
- }), V = p(
1283
+ }), x = g(
1284
1284
  () => e.lazyLoadType === se.BUTTON && e.hasMoreItems
1285
- ), te = p(
1285
+ ), te = g(
1286
1286
  () => e.loading ? _e.LOADING : _e.START
1287
- ), me = p(() => e.loading ? a("loading") : a("showMore")), ue = p(() => ({
1287
+ ), me = g(() => e.loading ? a("loading") : a("showMore")), ue = g(() => ({
1288
1288
  ...e.emptyState,
1289
1289
  variant: "condensed"
1290
1290
  })), J = {
1291
- [u.SELECT]: S(u.SELECT),
1292
- [u.SPACE]: S(u.SPACE),
1293
- [u.TAB]: S(u.TAB),
1294
- [u.ENTER]: S(u.ENTER)
1291
+ [b.SELECT]: y(b.SELECT),
1292
+ [b.SPACE]: y(b.SPACE),
1293
+ [b.TAB]: y(b.TAB),
1294
+ [b.ENTER]: y(b.ENTER)
1295
1295
  };
1296
1296
  return {
1297
1297
  // Refs
1298
- listboxRef: n,
1299
- listboxItemRef: r,
1298
+ listboxRef: o,
1299
+ listboxItemRef: c,
1300
1300
  // a11y
1301
- ariaAtomic: k,
1301
+ ariaAtomic: L,
1302
1302
  ariaBusy: B,
1303
- ariaLive: y,
1303
+ ariaLive: p,
1304
1304
  // Values
1305
- containerProps: v,
1306
- isSearchResultEmpty: A,
1305
+ containerProps: i,
1306
+ isSearchResultEmpty: I,
1307
1307
  limitedEmptyStateProps: ue,
1308
1308
  loadingButtonState: te,
1309
- slots: s,
1310
- shouldDisplayShowMoreButton: V,
1309
+ slots: t,
1310
+ shouldDisplayShowMoreButton: x,
1311
1311
  showMoreButtonText: me,
1312
- virtualisedItems: h,
1313
- wrapperProps: L,
1312
+ virtualisedItems: E,
1313
+ wrapperProps: C,
1314
1314
  // Enums
1315
- BentoKeyboardNavigationKeyDownEvent: x,
1316
- BentoListboxEvent: u,
1315
+ BentoKeyboardNavigationKeyDownEvent: G,
1316
+ BentoListboxEvent: b,
1317
1317
  // Methods
1318
- onListboxContainerScroll: C,
1319
- onOptionSelected: S,
1320
- emitShowMore: O,
1318
+ onListboxContainerScroll: h,
1319
+ onOptionSelected: y,
1320
+ emitShowMore: A,
1321
1321
  listboxListeners: J
1322
1322
  };
1323
1323
  }
1324
- }), Gt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], zt = {
1324
+ }), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], Yt = {
1325
1325
  key: 0,
1326
1326
  class: "b-listbox__loading-filtered-items"
1327
- }, Yt = {
1327
+ }, Ft = {
1328
1328
  key: 1,
1329
1329
  class: "b-listbox__empty-search-message"
1330
- }, Ft = {
1330
+ }, Wt = {
1331
1331
  key: 2,
1332
1332
  class: "b-listbox__lazy-load"
1333
- }, Wt = {
1333
+ }, Vt = {
1334
1334
  key: 3,
1335
1335
  class: "b-listbox__lazy-load"
1336
1336
  };
1337
- function Kt(e, t, s, r, b, a) {
1338
- var L;
1339
- const l = $("bento-loading-indicator"), m = $("bento-empty-state"), g = $("bento-typography"), n = $("bento-listbox-multi-select"), v = $("bento-listbox-single-select"), o = $("bento-loading-button"), h = ke("bento-keyboard-navigation-directive");
1340
- return oe((d(), T("div", {
1337
+ function Kt(e, s, t, c, r, a) {
1338
+ var C;
1339
+ const l = k("bento-loading-indicator"), v = k("bento-empty-state"), S = k("bento-typography"), o = k("bento-listbox-multi-select"), i = k("bento-listbox-single-select"), n = k("bento-loading-button"), E = ke("bento-keyboard-navigation-directive");
1340
+ return oe((m(), O("div", {
1341
1341
  id: e.id,
1342
1342
  ref: "listboxRef",
1343
1343
  class: "b-listbox",
@@ -1347,24 +1347,24 @@ function Kt(e, t, s, r, b, a) {
1347
1347
  "aria-atomic": e.ariaAtomic,
1348
1348
  "aria-label": e.ariaLabel,
1349
1349
  "aria-live": e.ariaLive,
1350
- style: He((L = e.containerProps) == null ? void 0 : L.style),
1351
- onScroll: t[0] || (t[0] = (...k) => e.onListboxContainerScroll && e.onListboxContainerScroll(...k))
1350
+ style: He((C = e.containerProps) == null ? void 0 : C.style),
1351
+ onScroll: s[0] || (s[0] = (...L) => e.onListboxContainerScroll && e.onListboxContainerScroll(...L))
1352
1352
  }, [
1353
1353
  K("div", le(re(e.wrapperProps)), [
1354
- e.componentLoading ? (d(), T("div", zt, [
1355
- P(l)
1356
- ])) : e.isSearchResultEmpty ? (d(), T("div", Yt, [
1357
- e.emptyState ? (d(), D(m, le(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), D(g, {
1354
+ e.componentLoading ? (m(), O("div", Yt, [
1355
+ M(l)
1356
+ ])) : e.isSearchResultEmpty ? (m(), O("div", Ft, [
1357
+ e.emptyState ? (m(), D(v, le(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (m(), D(S, {
1358
1358
  key: 1,
1359
1359
  el: "span"
1360
1360
  }, {
1361
- default: I(() => [
1362
- z(G(e.noResultsMessage), 1)
1361
+ default: $(() => [
1362
+ Y(z(e.noResultsMessage), 1)
1363
1363
  ]),
1364
1364
  _: 1
1365
1365
  }))
1366
- ])) : (d(), T(ee, { key: 2 }, [
1367
- e.multiple ? (d(), D(n, U({
1366
+ ])) : (m(), O(ee, { key: 2 }, [
1367
+ e.multiple ? (m(), D(o, U({
1368
1368
  key: 0,
1369
1369
  ref: "listboxItemRef",
1370
1370
  "has-more-items": e.hasMoreItems,
@@ -1375,13 +1375,13 @@ function Kt(e, t, s, r, b, a) {
1375
1375
  searching: e.searching,
1376
1376
  "is-option-disabled": e.isOptionDisabled
1377
1377
  }, Q(e.listboxListeners)), ce({ _: 2 }, [
1378
- F(e.slots, (k, B) => ({
1378
+ W(e.slots, (L, B) => ({
1379
1379
  name: B,
1380
- fn: I((y) => [
1381
- Y(e.$slots, B, le(re(y)), void 0, !0)
1380
+ fn: $((p) => [
1381
+ F(e.$slots, B, le(re(p)), void 0, !0)
1382
1382
  ])
1383
1383
  }))
1384
- ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), D(v, U({
1384
+ ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (m(), D(i, U({
1385
1385
  key: 1,
1386
1386
  ref: "listboxItemRef",
1387
1387
  items: e.virtualisedItems,
@@ -1389,87 +1389,93 @@ function Kt(e, t, s, r, b, a) {
1389
1389
  "static-categories": e.staticCategories,
1390
1390
  "is-option-disabled": e.isOptionDisabled
1391
1391
  }, Q(e.listboxListeners)), ce({ _: 2 }, [
1392
- F(e.slots, (k, B) => ({
1392
+ W(e.slots, (L, B) => ({
1393
1393
  name: B,
1394
- fn: I((y) => [
1395
- Y(e.$slots, B, le(re(y)), void 0, !0)
1394
+ fn: $((p) => [
1395
+ F(e.$slots, B, le(re(p)), void 0, !0)
1396
1396
  ])
1397
1397
  }))
1398
1398
  ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1399
- e.shouldDisplayShowMoreButton ? (d(), T("div", Ft, [
1400
- P(o, {
1399
+ e.shouldDisplayShowMoreButton ? (m(), O("div", Wt, [
1400
+ M(n, {
1401
1401
  state: e.loadingButtonState,
1402
1402
  variant: "secondary",
1403
1403
  onClickCapture: e.emitShowMore
1404
1404
  }, {
1405
- default: I(() => [
1406
- z(G(e.showMoreButtonText), 1)
1405
+ default: $(() => [
1406
+ Y(z(e.showMoreButtonText), 1)
1407
1407
  ]),
1408
1408
  _: 1
1409
1409
  }, 8, ["state", "onClickCapture"])
1410
- ])) : e.loading ? (d(), T("div", Wt, [
1411
- P(l)
1412
- ])) : W("", !0)
1410
+ ])) : e.loading ? (m(), O("div", Vt, [
1411
+ M(l)
1412
+ ])) : V("", !0)
1413
1413
  ], 64))
1414
1414
  ], 16)
1415
- ], 44, Gt)), [
1416
- [h]
1415
+ ], 44, zt)), [
1416
+ [E]
1417
1417
  ]);
1418
1418
  }
1419
- const rs = /* @__PURE__ */ q(xt, [["render", Kt], ["__scopeId", "data-v-7b74fe4e"]]), pe = (e, t) => {
1420
- for (const s of e) {
1421
- if (s.value === t)
1422
- return s;
1423
- if (s.items) {
1424
- const r = pe(s.items, t);
1425
- if (r)
1426
- return r;
1419
+ const cs = /* @__PURE__ */ q(Gt, [["render", Kt], ["__scopeId", "data-v-7b74fe4e"]]), pe = (e, s) => {
1420
+ for (const t of e) {
1421
+ if (t.value === s)
1422
+ return t;
1423
+ if (t.items) {
1424
+ const c = pe(t.items, s);
1425
+ if (c)
1426
+ return c;
1427
1427
  }
1428
1428
  }
1429
1429
  return null;
1430
- }, cs = (e, t, s) => {
1431
- const r = M([]), b = M(), a = (g) => {
1432
- s.value ? b.value = g.map(({ value: n }) => n) : b.value = g.length > 0 ? g[0].value : null;
1433
- }, l = (g) => {
1434
- r.value = g, a(g);
1435
- }, m = () => {
1436
- r.value = [], b.value = null;
1430
+ }, qt = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, us = (e, s, t, c) => {
1431
+ const r = P([]), a = P(), l = (i) => {
1432
+ t.value ? a.value = i.map(({ value: n }) => n) : a.value = i.length > 0 ? i[0].value : null;
1433
+ }, v = (i) => {
1434
+ t.value ? a.value = i.map(({ value: n, label: E }) => ({ value: n, label: E })) : a.value = i.length > 0 ? { value: i[0].value, label: i[0].label } : null;
1435
+ }, S = (i) => {
1436
+ r.value = i, c != null && c.value ? v(i) : l(i);
1437
+ }, o = () => {
1438
+ r.value = [], a.value = null;
1437
1439
  };
1438
1440
  return Ie(
1439
- () => t.value,
1441
+ () => s.value,
1440
1442
  () => {
1441
- if (!t.value && t.value !== 0) {
1442
- m();
1443
+ if (!s.value && s.value !== 0) {
1444
+ o();
1443
1445
  return;
1444
1446
  }
1445
- const g = !Array.isArray(t.value), n = [...r.value];
1446
- m();
1447
- const v = (o) => {
1448
- let h = pe(e.value, o);
1449
- h || (h = pe(n, o)), h || (h = { value: o, label: o.toString() }), r.value.push(h);
1447
+ const i = !Array.isArray(s.value), n = [...r.value];
1448
+ o();
1449
+ const E = (C) => {
1450
+ if (qt(C))
1451
+ r.value.push(C);
1452
+ else {
1453
+ let L = pe(e.value, C);
1454
+ L || (L = pe(n, C)), L || (L = { value: C, label: C.toString() }), r.value.push(L);
1455
+ }
1450
1456
  };
1451
- if (g) {
1452
- const o = t.value;
1453
- v(o), a(r.value);
1457
+ if (i) {
1458
+ const C = s.value;
1459
+ E(C), c != null && c.value ? v(r.value) : l(r.value);
1454
1460
  return;
1455
1461
  }
1456
- t.value.forEach(v), a(r.value);
1462
+ s.value.forEach(E), c != null && c.value ? v(r.value) : l(r.value);
1457
1463
  },
1458
1464
  { immediate: !0 }
1459
1465
  ), {
1460
1466
  // Values
1461
1467
  cachedSelectedListboxOptions: r,
1462
- cachedListboxSelectedValues: b,
1468
+ cachedListboxSelectedValues: a,
1463
1469
  // Methods
1464
- resetCache: m,
1465
- setCachedValues: l
1470
+ resetCache: o,
1471
+ setCachedValues: S
1466
1472
  };
1467
1473
  };
1468
1474
  export {
1469
1475
  se as B,
1470
- u as a,
1471
- rs as b,
1472
- cs as c,
1476
+ b as a,
1477
+ cs as b,
1478
+ us as c,
1473
1479
  Dt as u
1474
1480
  };
1475
- //# sourceMappingURL=use-cached-selected-values.Ber7lUiH.js.map
1481
+ //# sourceMappingURL=use-cached-selected-values.CRwxKmxX.js.map