@adyen/bento-vue2 1.91.0 → 1.92.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 (218) hide show
  1. package/dist/@types/index.d.ts +118 -127
  2. package/dist/action-bar.js +1 -1
  3. package/dist/ai-tag.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/checkbox-group.css +1 -1
  11. package/dist/assets/checkbox.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/date-range-picker.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/filter-bar.css +1 -1
  18. package/dist/assets/input-field.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/modal-fullscreen.css +1 -1
  21. package/dist/assets/secondary-nav.css +1 -1
  22. package/dist/assets/sidepanel.css +1 -1
  23. package/dist/assets/toggle.css +1 -1
  24. package/dist/assets/use-cached-selected-values.css +1 -1
  25. package/dist/button.js +1 -1
  26. package/dist/card.js +1 -1
  27. package/dist/checkbox.js +2 -2
  28. package/dist/chunks/{action-bar.Dj830k6L.js → action-bar.ChuPTyQG.js} +3 -3
  29. package/dist/chunks/{action-bar.Dj830k6L.js.map → action-bar.ChuPTyQG.js.map} +1 -1
  30. package/dist/chunks/{ai-tag.AyG2UWCB.js → ai-tag.Dt8nijLW.js} +2 -2
  31. package/dist/chunks/{ai-tag.AyG2UWCB.js.map → ai-tag.Dt8nijLW.js.map} +1 -1
  32. package/dist/chunks/{alert.CXRb-Smf.js → alert.CLqcPN0Q.js} +73 -55
  33. package/dist/chunks/alert.CLqcPN0Q.js.map +1 -0
  34. package/dist/chunks/{base-modal.C52VMtnd.js → base-modal.DMdzcBrq.js} +3 -3
  35. package/dist/chunks/base-modal.DMdzcBrq.js.map +1 -0
  36. package/dist/chunks/{button-actions-with-menu.OsPQ-POD.js → button-actions-with-menu.CXFziNUr.js} +2 -2
  37. package/dist/chunks/{button-actions-with-menu.OsPQ-POD.js.map → button-actions-with-menu.CXFziNUr.js.map} +1 -1
  38. package/dist/chunks/{button-actions.Bdbu0bvt.js → button-actions.CXD6_9qN.js} +4 -4
  39. package/dist/chunks/button-actions.CXD6_9qN.js.map +1 -0
  40. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  41. package/dist/chunks/button.C9b2AC9w.js.map +1 -1
  42. package/dist/chunks/{calendar.CqsfThnC.js → calendar.rZsIZPxm.js} +526 -466
  43. package/dist/chunks/calendar.rZsIZPxm.js.map +1 -0
  44. package/dist/chunks/{card.8z7UQeVK.js → card.Brma5kdb.js} +2 -2
  45. package/dist/chunks/card.Brma5kdb.js.map +1 -0
  46. package/dist/chunks/{checkbox-group.Dur2Edtw.js → checkbox-group.DWZvFkjz.js} +4 -4
  47. package/dist/chunks/checkbox-group.DWZvFkjz.js.map +1 -0
  48. package/dist/chunks/{checkbox.vNjt6QDJ.js → checkbox.BZP0wtnE.js} +3 -5
  49. package/dist/chunks/checkbox.BZP0wtnE.js.map +1 -0
  50. package/dist/chunks/{code-snippet.BVpFBhKq.js → code-snippet.DHAymIXp.js} +3 -3
  51. package/dist/chunks/code-snippet.DHAymIXp.js.map +1 -0
  52. package/dist/chunks/constructNow.CK0ryPil.js +8 -0
  53. package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.CK0ryPil.js.map} +1 -1
  54. package/dist/chunks/country.types.jjXwaoMl.js.map +1 -1
  55. package/dist/chunks/{dashboard-section.DNxNVV44.js → dashboard-section.D9rS8myE.js} +2 -2
  56. package/dist/chunks/{dashboard-section.DNxNVV44.js.map → dashboard-section.D9rS8myE.js.map} +1 -1
  57. package/dist/chunks/{dashed-underline.DL2_sik5.js → dashed-underline.D_FhFRXM.js} +2 -2
  58. package/dist/chunks/{dashed-underline.DL2_sik5.js.map → dashed-underline.D_FhFRXM.js.map} +1 -1
  59. package/dist/chunks/{data-grid-template.BFv1zr6g.js → data-grid-template.CRijG20n.js} +2 -2
  60. package/dist/chunks/{data-grid-template.BFv1zr6g.js.map → data-grid-template.CRijG20n.js.map} +1 -1
  61. package/dist/chunks/{data-grid.ZHY5EzP3.js → data-grid.hMM9F36T.js} +363 -363
  62. package/dist/chunks/data-grid.hMM9F36T.js.map +1 -0
  63. package/dist/chunks/{date-picker.kl6aFlr1.js → date-picker.BSo6Cvum.js} +7 -7
  64. package/dist/chunks/{date-picker.kl6aFlr1.js.map → date-picker.BSo6Cvum.js.map} +1 -1
  65. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  66. package/dist/chunks/{date-range-picker.LCWVAa5R.js → date-range-picker.D90k5b8p.js} +419 -411
  67. package/dist/chunks/date-range-picker.D90k5b8p.js.map +1 -0
  68. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  69. package/dist/chunks/{de.BJvo6njq.js → de.pvjpUJ1o.js} +2 -2
  70. package/dist/chunks/{de.BJvo6njq.js.map → de.pvjpUJ1o.js.map} +1 -1
  71. package/dist/chunks/{differenceInMonths.CIYECBxK.js → differenceInMonths.CpwVtHZX.js} +3 -2
  72. package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.CpwVtHZX.js.map} +1 -1
  73. package/dist/chunks/{draggable-handle.Ba28eM8o.js → draggable-handle.BR_aQH5N.js} +2 -2
  74. package/dist/chunks/{draggable-handle.Ba28eM8o.js.map → draggable-handle.BR_aQH5N.js.map} +1 -1
  75. package/dist/chunks/{dropdown-tag.B61hPq5n.js → dropdown-tag.z3rsxbpW.js} +4 -4
  76. package/dist/chunks/dropdown-tag.z3rsxbpW.js.map +1 -0
  77. package/dist/chunks/{dropdown.Ca-f8tdX.js → dropdown.BYJwx-JD.js} +313 -305
  78. package/dist/chunks/dropdown.BYJwx-JD.js.map +1 -0
  79. package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.-Q7Oq-nY.js} +2 -2
  80. package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.-Q7Oq-nY.js.map} +1 -1
  81. package/dist/chunks/{en-US.YeSsZuOc.js → en-US.BK5uiAND.js} +5 -5
  82. package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.BK5uiAND.js.map} +1 -1
  83. package/dist/chunks/{es.DyUjjSL8.js → es.2H4LvTyV.js} +2 -2
  84. package/dist/chunks/{es.DyUjjSL8.js.map → es.2H4LvTyV.js.map} +1 -1
  85. package/dist/chunks/{file-uploader.DeWmLpfp.js → file-uploader.Djl0xaDN.js} +4 -5
  86. package/dist/chunks/{file-uploader.DeWmLpfp.js.map → file-uploader.Djl0xaDN.js.map} +1 -1
  87. package/dist/chunks/{filter-bar.Bd4ghW_B.js → filter-bar.C9rWMIWO.js} +50 -50
  88. package/dist/chunks/filter-bar.C9rWMIWO.js.map +1 -0
  89. package/dist/chunks/{footer-actions.CvUaoMzj.js → footer-actions.D9mHwk5l.js} +2 -2
  90. package/dist/chunks/{footer-actions.CvUaoMzj.js.map → footer-actions.D9mHwk5l.js.map} +1 -1
  91. package/dist/chunks/{form-layout-title.DzGajv4U.js → form-layout-title.zZVLCyqe.js} +2 -2
  92. package/dist/chunks/{form-layout-title.DzGajv4U.js.map → form-layout-title.zZVLCyqe.js.map} +1 -1
  93. package/dist/chunks/{fr.JD_4GwS8.js → fr.Cu0IIfBP.js} +2 -2
  94. package/dist/chunks/{fr.JD_4GwS8.js.map → fr.Cu0IIfBP.js.map} +1 -1
  95. package/dist/chunks/{header-meta.AXUGoqDd.js → header-meta.BSPnWWmi.js} +14 -14
  96. package/dist/chunks/{header-meta.AXUGoqDd.js.map → header-meta.BSPnWWmi.js.map} +1 -1
  97. package/dist/chunks/{header-with-views.Ba4dswJF.js → header-with-views.g6J7x6l2.js} +8 -8
  98. package/dist/chunks/{header-with-views.Ba4dswJF.js.map → header-with-views.g6J7x6l2.js.map} +1 -1
  99. package/dist/chunks/{header.C7B7RBib.js → header.DyZG7qWe.js} +3 -3
  100. package/dist/chunks/header.DyZG7qWe.js.map +1 -0
  101. package/dist/chunks/{input-field-password.BNAtIn_D.js → input-field-password.CiDdI6A_.js} +4 -4
  102. package/dist/chunks/input-field-password.CiDdI6A_.js.map +1 -0
  103. package/dist/chunks/{input-field-phone-number.CEYx1s4b.js → input-field-phone-number.DFS58acU.js} +3 -3
  104. package/dist/chunks/{input-field-phone-number.CEYx1s4b.js.map → input-field-phone-number.DFS58acU.js.map} +1 -1
  105. package/dist/chunks/input-field.CGLjYab8.js +222 -0
  106. package/dist/chunks/input-field.CGLjYab8.js.map +1 -0
  107. package/dist/chunks/{input-time.BLuMfakv.js → input-time.BhAUyKZM.js} +4 -4
  108. package/dist/chunks/{input-time.BLuMfakv.js.map → input-time.BhAUyKZM.js.map} +1 -1
  109. package/dist/chunks/isSameWeek.TrpUOIn5.js +14 -0
  110. package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.TrpUOIn5.js.map} +1 -1
  111. package/dist/chunks/{it.BlUnV-yA.js → it.B65snrJA.js} +3 -3
  112. package/dist/chunks/{it.BlUnV-yA.js.map → it.B65snrJA.js.map} +1 -1
  113. package/dist/chunks/{ja.nUwDmVf2.js → ja.xGVfFSzL.js} +2 -2
  114. package/dist/chunks/{ja.nUwDmVf2.js.map → ja.xGVfFSzL.js.map} +1 -1
  115. package/dist/chunks/link.DB5g6d48.js.map +1 -1
  116. package/dist/chunks/{modal-fullscreen.DTvg2NLk.js → modal-fullscreen.De6mevyD.js} +2 -2
  117. package/dist/chunks/{modal-fullscreen.DTvg2NLk.js.map → modal-fullscreen.De6mevyD.js.map} +1 -1
  118. package/dist/chunks/{modal.D_TcWTkf.js → modal.BXxwn9H4.js} +93 -91
  119. package/dist/chunks/{modal.D_TcWTkf.js.map → modal.BXxwn9H4.js.map} +1 -1
  120. package/dist/chunks/{pagination.D6BxMw5L.js → pagination.BzsKZFnw.js} +2 -2
  121. package/dist/chunks/{pagination.D6BxMw5L.js.map → pagination.BzsKZFnw.js.map} +1 -1
  122. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  123. package/dist/chunks/popover.types.hA13DZPg.js.map +1 -1
  124. package/dist/chunks/popper-container.C_n9Ds1W.js.map +1 -1
  125. package/dist/chunks/promo-banner.Dc_kK1x9.js.map +1 -1
  126. package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.D9FuAQZm.js} +2 -2
  127. package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.D9FuAQZm.js.map} +1 -1
  128. package/dist/chunks/radio-group.Bb-L-0io.js.map +1 -1
  129. package/dist/chunks/{rich-text-editor.Dtdfh-0V.js → rich-text-editor.DPpIzYid.js} +3 -3
  130. package/dist/chunks/{rich-text-editor.Dtdfh-0V.js.map → rich-text-editor.DPpIzYid.js.map} +1 -1
  131. package/dist/chunks/{search-bar.MVJS9-Mh.js → search-bar.BEOieKeA.js} +4 -4
  132. package/dist/chunks/{search-bar.MVJS9-Mh.js.map → search-bar.BEOieKeA.js.map} +1 -1
  133. package/dist/chunks/{secondary-nav.C-nPZR-2.js → secondary-nav.BBL5zZPK.js} +2 -2
  134. package/dist/chunks/{secondary-nav.C-nPZR-2.js.map → secondary-nav.BBL5zZPK.js.map} +1 -1
  135. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  136. package/dist/chunks/{sidepanel.BTRfwGiS.js → sidepanel.nW0Bhk_u.js} +3 -3
  137. package/dist/chunks/{sidepanel.BTRfwGiS.js.map → sidepanel.nW0Bhk_u.js.map} +1 -1
  138. package/dist/chunks/{startOfWeek.CXhhX-R7.js → startOfWeek.Br5KM4z_.js} +2 -2
  139. package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Br5KM4z_.js.map} +1 -1
  140. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
  141. package/dist/chunks/{summary-grid.types.DUIqCmwg.js → summary-grid.types.Dp_efYVN.js} +2 -2
  142. package/dist/chunks/{summary-grid.types.DUIqCmwg.js.map → summary-grid.types.Dp_efYVN.js.map} +1 -1
  143. package/dist/chunks/tag.D2xagTJv.js.map +1 -1
  144. package/dist/chunks/textarea.CJS-1I41.js.map +1 -1
  145. package/dist/chunks/{timeline-item.BOUWkLi1.js → timeline-item.CF9jbIRr.js} +4 -4
  146. package/dist/chunks/timeline-item.CF9jbIRr.js.map +1 -0
  147. package/dist/chunks/{toggle.B1z1YPe_.js → toggle.Ca-MM3dt.js} +3 -5
  148. package/dist/chunks/toggle.Ca-MM3dt.js.map +1 -0
  149. package/dist/chunks/tooltip.BxtnF3is.js.map +1 -1
  150. package/dist/chunks/{tutorial.CZt_mcuT.js → tutorial.CoWDVs7_.js} +2 -2
  151. package/dist/chunks/{tutorial.CZt_mcuT.js.map → tutorial.CoWDVs7_.js.map} +1 -1
  152. package/dist/chunks/typography.C8lPlsbD.js.map +1 -1
  153. package/dist/chunks/{use-cached-selected-values.BJbWbkEQ.js → use-cached-selected-values.Du8-wWR2.js} +616 -551
  154. package/dist/chunks/use-cached-selected-values.Du8-wWR2.js.map +1 -0
  155. package/dist/chunks/{use-date-input-formatter.Djf8AoLr.js → use-date-input-formatter.ibZeLD_V.js} +4 -4
  156. package/dist/chunks/{use-date-input-formatter.Djf8AoLr.js.map → use-date-input-formatter.ibZeLD_V.js.map} +1 -1
  157. package/dist/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Be4pa3-g.js} +3 -3
  158. package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Be4pa3-g.js.map} +1 -1
  159. package/dist/code-snippet.js +1 -1
  160. package/dist/dashboard-template.js +1 -1
  161. package/dist/dashed-underline.js +1 -1
  162. package/dist/data-grid-template.js +1 -1
  163. package/dist/data-grid.js +1 -1
  164. package/dist/date-picker.js +2 -2
  165. package/dist/date-range-picker.js +2 -2
  166. package/dist/draggable.js +1 -1
  167. package/dist/dropdown.js +3 -3
  168. package/dist/file-uploader.js +1 -1
  169. package/dist/filter-bar.js +1 -1
  170. package/dist/form-layout.js +1 -1
  171. package/dist/header-with-views.js +1 -1
  172. package/dist/header.js +1 -1
  173. package/dist/index.js +40 -40
  174. package/dist/index.js.map +1 -1
  175. package/dist/input-field-password.js +1 -1
  176. package/dist/input-field-phone-number.js +1 -1
  177. package/dist/input-field.js +1 -1
  178. package/dist/input-time.js +1 -1
  179. package/dist/internal.js +5 -5
  180. package/dist/menu.js +1 -1
  181. package/dist/modal-fullscreen.js +1 -1
  182. package/dist/modal.js +2 -2
  183. package/dist/pagination.js +1 -1
  184. package/dist/popover.js +1 -1
  185. package/dist/rich-text-editor.js +1 -1
  186. package/dist/search-bar.js +2 -2
  187. package/dist/secondary-nav.js +1 -1
  188. package/dist/sidepanel.js +1 -1
  189. package/dist/summary-grid.js +1 -1
  190. package/dist/timeline.js +1 -1
  191. package/dist/toggle.js +1 -1
  192. package/dist/tutorial.js +1 -1
  193. package/dist/web-types.json +45 -4
  194. package/package.json +5 -5
  195. package/dist/chunks/alert.CXRb-Smf.js.map +0 -1
  196. package/dist/chunks/base-modal.C52VMtnd.js.map +0 -1
  197. package/dist/chunks/button-actions.Bdbu0bvt.js.map +0 -1
  198. package/dist/chunks/calendar.CqsfThnC.js.map +0 -1
  199. package/dist/chunks/card.8z7UQeVK.js.map +0 -1
  200. package/dist/chunks/checkbox-group.Dur2Edtw.js.map +0 -1
  201. package/dist/chunks/checkbox.vNjt6QDJ.js.map +0 -1
  202. package/dist/chunks/code-snippet.BVpFBhKq.js.map +0 -1
  203. package/dist/chunks/constructNow.CIc7d13I.js +0 -8
  204. package/dist/chunks/data-grid.ZHY5EzP3.js.map +0 -1
  205. package/dist/chunks/date-range-picker.LCWVAa5R.js.map +0 -1
  206. package/dist/chunks/dropdown-tag.B61hPq5n.js.map +0 -1
  207. package/dist/chunks/dropdown.Ca-f8tdX.js.map +0 -1
  208. package/dist/chunks/filter-bar.Bd4ghW_B.js.map +0 -1
  209. package/dist/chunks/header.C7B7RBib.js.map +0 -1
  210. package/dist/chunks/input-field-password.BNAtIn_D.js.map +0 -1
  211. package/dist/chunks/input-field.Dh5W0Az-.js +0 -211
  212. package/dist/chunks/input-field.Dh5W0Az-.js.map +0 -1
  213. package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
  214. package/dist/chunks/timeline-item.BOUWkLi1.js.map +0 -1
  215. package/dist/chunks/toggle.B1z1YPe_.js.map +0 -1
  216. package/dist/chunks/use-cached-selected-values.BJbWbkEQ.js.map +0 -1
  217. package/dist/chunks/warning-filled.CbJ1pcB2.js +0 -24
  218. package/dist/chunks/warning-filled.CbJ1pcB2.js.map +0 -1
@@ -1,118 +1,129 @@
1
- import { computed as n, ref as x, onMounted as Ne, onUnmounted as we, watch as X, defineComponent as G, nextTick as pe, toRef as H, useSlots as Ge, useAttrs as Pe } from "vue";
2
- import { B as M, a as se } from "./keyboard-navigation.DWmhelVv.js";
3
- import { B as j } from "./typography.C8lPlsbD.js";
1
+ import { computed as n, ref as T, onMounted as $e, onUnmounted as Ne, watch as H, defineComponent as F, nextTick as ae, toRef as j, useSlots as Ge, useAttrs as Pe } from "vue";
2
+ import { B as $, a as ne } from "./keyboard-navigation.DWmhelVv.js";
3
+ import { B as q } from "./typography.C8lPlsbD.js";
4
4
  import { B as Fe } from "./loading-indicator.PxbRzshH.js";
5
5
  import { B as Ye } from "./empty-state.DMV23IZy.js";
6
- import { u as le } from "./index.B6WW_F-J.js";
6
+ import { u as ie } from "./index.B6WW_F-J.js";
7
7
  import { o as ze } from "./resize.Bqks3WUm.js";
8
8
  import "./index.Cl4_42j5.js";
9
- import { C as J, N as Ue } from "./minus-small.DJacLGTw.js";
9
+ import { C as Q, N as Ue } from "./minus-small.DJacLGTw.js";
10
10
  import { C as Ve } from "./checkmark-small.DVDtD4HQ.js";
11
11
  /* empty css */
12
12
  import { n as N } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
13
13
  import { B as We } from "./chip.BFY_-VCz.js";
14
14
  import { C as Ke } from "./chevron-down.eYtgv5ly.js";
15
15
  import { C as je } from "./chevron-up.d8cwIlA_.js";
16
- import { g as me } from "./generate-uid.NJ8tVoha.js";
17
- import { a as qe, b as fe } from "./button-actions.Bdbu0bvt.js";
16
+ import { g as _e } from "./generate-uid.NJ8tVoha.js";
17
+ import { a as qe, b as pe } from "./button-actions.CXD6_9qN.js";
18
18
  import "../assets/use-cached-selected-values.css";
19
- const ye = (s, e, l, t) => {
19
+ const Ce = (l, e, s, t) => {
20
20
  const o = n(
21
21
  () => {
22
- var m, A;
23
- return !!((m = s.value) != null && m.length) && ((A = s.value) == null ? void 0 : A.length) === e.value.length;
22
+ var f, L;
23
+ return !!((f = l.value) != null && f.length) && ((L = l.value) == null ? void 0 : L.length) === e.value.length;
24
24
  }
25
25
  ), a = n(() => {
26
- var m;
27
- return s.value == null || s.value.length === 0 ? !1 : ((m = s.value) == null ? void 0 : m.length) !== e.value.length;
26
+ var f;
27
+ return l.value == null || l.value.length === 0 ? !1 : ((f = l.value) == null ? void 0 : f.length) !== e.value.length;
28
28
  });
29
29
  return {
30
30
  isAllSelected: o,
31
31
  isIndeterminate: a,
32
- toggleSelectAll: (m) => {
33
- m ? l() : t();
32
+ toggleSelectAll: (f) => {
33
+ f ? s() : t();
34
34
  }
35
35
  };
36
36
  };
37
- function He(s, { disabled: e, itemHeight: l, overscan: t = 5, prefixHeight: o }) {
38
- const a = x(null), r = x([]), m = x(0), A = x(0), d = x(0);
39
- let b;
40
- const T = n(() => {
41
- const I = typeof l == "number" ? s.value.length * l : s.value.reduce((S, v, y) => S + l(y), 0), O = typeof l == "number" ? m.value * l : s.value.slice(0, m.value).reduce((S, v, y) => S + l(y), 0);
37
+ function Xe(l, { disabled: e, itemHeight: s, overscan: t = 5, prefixHeight: o }) {
38
+ const a = T(null), c = T([]), f = T(0), L = T(0), m = T(0);
39
+ let d;
40
+ const A = n(() => {
41
+ const h = typeof s == "number" ? l.value.length * s : l.value.reduce((E, C, O) => E + s(O), 0), x = typeof s == "number" ? f.value * s : l.value.slice(0, f.value).reduce((E, C, O) => E + s(O), 0);
42
42
  return {
43
43
  style: {
44
- marginTop: `${O}px`,
45
- height: `${I - O}px`
44
+ marginTop: `${x}px`,
45
+ height: `${h - x}px`
46
46
  }
47
47
  };
48
- }), _ = () => {
49
- const I = (o == null ? void 0 : o.value) ?? 0, O = Math.max(a.value.scrollTop - I, 0);
50
- if (typeof l == "number")
51
- return Math.floor(O / l);
52
- let S = 0, v = 0;
53
- for (let y = 0; y < s.value.length; y += 1) {
54
- const D = l(y);
55
- if (S += D, S >= O) {
56
- v = y;
48
+ }), k = () => {
49
+ const h = (o == null ? void 0 : o.value) ?? 0, x = Math.max(a.value.scrollTop - h, 0);
50
+ if (typeof s == "number")
51
+ return Math.floor(x / s);
52
+ let E = 0, C = 0;
53
+ for (let O = 0; O < l.value.length; O += 1) {
54
+ const D = s(O);
55
+ if (E += D, E >= x) {
56
+ C = O;
57
57
  break;
58
58
  }
59
59
  }
60
- return v;
61
- }, p = () => {
62
- if (d.value = a.value.clientHeight, typeof l == "number")
63
- return Math.ceil(d.value / l);
64
- const I = m.value ?? 0;
65
- let O = 0, S = 0;
66
- for (let v = I; v < s.value.length; v += 1) {
67
- const y = l(v);
68
- if (O += y, S = v, O > d.value)
60
+ return C;
61
+ }, v = () => {
62
+ if (m.value = a.value.clientHeight, typeof s == "number")
63
+ return Math.ceil(m.value / s);
64
+ const h = f.value ?? 0;
65
+ let x = 0, E = 0;
66
+ for (let C = h; C < l.value.length; C += 1) {
67
+ const O = s(C);
68
+ if (x += O, E = C, x > m.value)
69
69
  break;
70
70
  }
71
- return S - I;
72
- }, C = () => {
71
+ return E - h;
72
+ }, p = () => {
73
73
  if (a.value) {
74
- const I = p();
75
- m.value = _(), A.value = Math.min(m.value + I + t, s.value.length), r.value = s.value.slice(m.value, A.value);
74
+ const h = v();
75
+ f.value = k(), L.value = Math.min(f.value + h + t, l.value.length), c.value = l.value.slice(f.value, L.value);
76
76
  }
77
77
  }, R = () => {
78
- C();
78
+ p();
79
79
  };
80
- e || (Ne(() => {
81
- a.value && (d.value = a.value.clientHeight, b = ze(a.value, ({ clientHeight: I }) => {
82
- d.value = I, C();
83
- }), C());
84
- }), we(() => {
85
- b == null || b.disconnect();
86
- }), X(
87
- () => s.value,
80
+ e || ($e(() => {
81
+ a.value && (m.value = a.value.clientHeight, d = ze(a.value, ({ clientHeight: h }) => {
82
+ m.value = h, p();
83
+ }), p());
84
+ }), Ne(() => {
85
+ d == null || d.disconnect();
86
+ }), H(
87
+ () => l.value,
88
88
  () => {
89
- C();
89
+ p();
90
90
  }
91
91
  ));
92
- const B = {
92
+ const M = {
93
93
  ref: a,
94
94
  style: { overflowY: "auto" }
95
+ }, G = (h) => {
96
+ if (!a.value)
97
+ return;
98
+ const x = typeof s == "number" ? h * s : l.value.slice(0, h).reduce((_, I, B) => _ + s(B), 0), E = typeof s == "number" ? s : s(h), C = x + E, { scrollTop: O, clientHeight: D } = a.value, r = O + D;
99
+ C > r ? a.value.scrollTop = D > 0 ? C - D : x : x < O && (a.value.scrollTop = x), p();
95
100
  };
96
101
  return e ? {
97
102
  containerRef: a,
98
- containerProps: B,
103
+ containerProps: M,
99
104
  // eslint-disable-next-line @typescript-eslint/no-empty-function
100
105
  onScroll: () => {
101
106
  },
102
- list: s
107
+ list: l,
108
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
109
+ scrollToIndex: () => {
110
+ },
111
+ startIndex: T(0)
103
112
  } : {
104
113
  containerRef: a,
105
- containerProps: B,
114
+ containerProps: M,
106
115
  onScroll: R,
107
- list: r,
108
- wrapperProps: T
116
+ list: c,
117
+ wrapperProps: A,
118
+ scrollToIndex: G,
119
+ startIndex: f
109
120
  };
110
121
  }
111
- var c = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.SHOW_MORE = "show-more", s.ESCAPE = "escape-pressed", s.CLICK = "click", s.ENTER = "enter-pressed", s.SPACE = "space-pressed", s.TAB = "tab-pressed", s.CLOSE_DROPDOWN = "close-dropdown", s))(c || {}), K = /* @__PURE__ */ ((s) => (s.AUTOMATIC = "automatic", s.BUTTON = "button", s.NONE = "none", s))(K || {});
112
- const Xe = G({
122
+ var u = /* @__PURE__ */ ((l) => (l.SELECT = "select", l.SHOW_MORE = "show-more", l.ESCAPE = "escape-pressed", l.CLICK = "click", l.ENTER = "enter-pressed", l.SPACE = "space-pressed", l.TAB = "tab-pressed", l.CLOSE_DROPDOWN = "close-dropdown", l))(u || {}), K = /* @__PURE__ */ ((l) => (l.AUTOMATIC = "automatic", l.BUTTON = "button", l.NONE = "none", l))(K || {});
123
+ const He = F({
113
124
  name: "bento-listbox-static-category",
114
125
  components: {
115
- BentoTypography: j
126
+ BentoTypography: q
116
127
  },
117
128
  props: {
118
129
  /**
@@ -125,17 +136,17 @@ const Xe = G({
125
136
  }
126
137
  });
127
138
  var Je = function() {
128
- var e = this, l = e._self._c;
129
- return e._self._setupProxy, l("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [l("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), l("div", [e._t("default")], 2)], 1);
139
+ var e = this, s = e._self._c;
140
+ return e._self._setupProxy, s("div", { staticClass: "b-listbox-single-select-category", attrs: { role: "group", "aria-label": e.categoryLabel } }, [s("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), s("div", [e._t("default")], 2)], 1);
130
141
  }, Ze = [], Qe = /* @__PURE__ */ N(
131
- Xe,
142
+ He,
132
143
  Je,
133
144
  Ze,
134
145
  !1,
135
146
  null,
136
147
  "bfbc1649"
137
148
  );
138
- const et = Qe.exports, tt = G({
149
+ const et = Qe.exports, tt = F({
139
150
  name: "bento-listbox-option",
140
151
  props: {
141
152
  /**
@@ -147,55 +158,55 @@ const et = Qe.exports, tt = G({
147
158
  */
148
159
  selected: { type: Boolean, default: !1 }
149
160
  },
150
- emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
151
- setup(s, { emit: e }) {
152
- const l = n(() => ({
153
- "b-listbox-option--disabled": s.disabled,
154
- "b-listbox-option--selected": s.selected
161
+ emits: [u.CLICK, u.ENTER, u.SPACE, u.TAB],
162
+ setup(l, { emit: e }) {
163
+ const s = n(() => ({
164
+ "b-listbox-option--disabled": l.disabled,
165
+ "b-listbox-option--selected": l.selected
155
166
  }));
156
167
  return {
157
168
  // Enums
158
- BentoKeyboardNavigationKeyDownEvent: M,
159
- BentoListboxEvent: c,
169
+ BentoKeyboardNavigationKeyDownEvent: $,
170
+ BentoListboxEvent: u,
160
171
  // Values
161
- conditionalClasses: l,
172
+ conditionalClasses: s,
162
173
  // Events
163
174
  onClick: (a) => {
164
- e(c.CLICK, a);
175
+ e(u.CLICK, a);
165
176
  },
166
- onOptionSelected: (a, r) => {
167
- e(a, r);
177
+ onOptionSelected: (a, c) => {
178
+ e(a, c);
168
179
  }
169
180
  };
170
181
  }
171
182
  });
172
- var st = function() {
173
- var e = this, l = e._self._c;
174
- return e._self._setupProxy, l("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
183
+ var lt = function() {
184
+ var e = this, s = e._self._c;
185
+ return e._self._setupProxy, s("div", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(t) {
175
186
  return !t.type.indexOf("key") && e._k(t.keyCode, "enter", 13, t.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, t);
176
187
  }, function(t) {
177
188
  return !t.type.indexOf("key") && e._k(t.keyCode, "space", 32, t.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, t);
178
189
  }, function(t) {
179
190
  return !t.type.indexOf("key") && e._k(t.keyCode, "tab", 9, t.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, t);
180
191
  }] } }, "div", e.$attrs, !1), [e._t("default")], 2);
181
- }, lt = [], ot = /* @__PURE__ */ N(
192
+ }, st = [], ot = /* @__PURE__ */ N(
182
193
  tt,
183
- st,
184
194
  lt,
195
+ st,
185
196
  !1,
186
197
  null,
187
198
  "c345b6c0"
188
199
  );
189
- const Z = ot.exports;
190
- let ve = 0;
200
+ const ee = ot.exports;
201
+ let ye = 0;
191
202
  const at = {
192
203
  beforeCreate() {
193
- this.uuid = ve.toString(), ve += 1;
204
+ this.uuid = ye.toString(), ye += 1;
194
205
  }
195
206
  };
196
207
  var nt = function() {
197
- var e = this, l = e._self._c;
198
- return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
208
+ var e = this, s = e._self._c;
209
+ 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: "#001222", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
199
210
  }, it = [], ct = /* @__PURE__ */ N(
200
211
  at,
201
212
  nt,
@@ -204,11 +215,11 @@ var nt = function() {
204
215
  null,
205
216
  null
206
217
  );
207
- const rt = ct.exports, ut = G({
218
+ const rt = ct.exports, ut = F({
208
219
  name: "bento-listbox-single-select-option",
209
220
  components: {
210
- BentoListboxOption: Z,
211
- BentoTypography: j,
221
+ BentoListboxOption: ee,
222
+ BentoTypography: q,
212
223
  CheckmarkIcon: rt
213
224
  },
214
225
  props: {
@@ -229,26 +240,26 @@ const rt = ct.exports, ut = G({
229
240
  */
230
241
  selected: { type: Boolean, default: !1 }
231
242
  },
232
- emits: [c.ENTER, c.SELECT, c.SPACE, c.TAB],
233
- setup(s, { emit: e }) {
234
- const l = (r) => {
235
- s.disabled || e(r, s.option);
236
- }, t = n(() => s.disabled ? !0 : null), o = n(() => s.selected ? !0 : null), a = n(() => s.disabled ? -1 : 0);
243
+ emits: [u.ENTER, u.SELECT, u.SPACE, u.TAB],
244
+ setup(l, { emit: e }) {
245
+ const s = (c) => {
246
+ l.disabled || e(c, l.option);
247
+ }, t = n(() => l.disabled ? !0 : null), o = n(() => l.selected ? !0 : null), a = n(() => l.disabled ? -1 : 0);
237
248
  return {
238
249
  // Values
239
250
  ariaDisabled: t,
240
251
  ariaSelected: o,
241
252
  tabIndex: a,
242
253
  // Enums
243
- BentoListboxEvent: c,
254
+ BentoListboxEvent: u,
244
255
  // Events
245
- onOptionSelected: l
256
+ onOptionSelected: s
246
257
  };
247
258
  }
248
259
  });
249
260
  var dt = function() {
250
- var e = this, l = e._self._c;
251
- return e._self._setupProxy, l("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(t) {
261
+ var e = this, s = e._self._c;
262
+ 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(t) {
252
263
  return e.onOptionSelected(e.BentoListboxEvent.SELECT);
253
264
  }, "enter-pressed": function(t) {
254
265
  return e.onOptionSelected(e.BentoListboxEvent.ENTER);
@@ -257,9 +268,9 @@ var dt = function() {
257
268
  }, "tab-pressed": function(t) {
258
269
  return e.onOptionSelected(e.BentoListboxEvent.TAB);
259
270
  } } }, [e._t("default", function() {
260
- return [l("span", { staticClass: "b-listbox-single-select-option__text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? l("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
261
- }, null, e.option), l("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [l("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
262
- }, bt = [], mt = /* @__PURE__ */ N(
271
+ 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)];
272
+ }, 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);
273
+ }, bt = [], ft = /* @__PURE__ */ N(
263
274
  ut,
264
275
  dt,
265
276
  bt,
@@ -267,64 +278,64 @@ var dt = function() {
267
278
  null,
268
279
  "bb14d75a"
269
280
  );
270
- const ft = mt.exports, he = ({ items: s }, e) => {
271
- const l = n(() => s.value.length - 1), t = x(0), o = (_) => {
272
- switch (_) {
281
+ const mt = ft.exports, xe = ({ items: l, totalItemCount: e }, s) => {
282
+ const t = n(() => e != null && e.value ? e.value - 1 : l.value.length - 1), o = T(0), a = (v) => {
283
+ switch (v) {
273
284
  case "increase":
274
- t.value += 1;
285
+ o.value += 1;
275
286
  break;
276
287
  case "decrease":
277
- t.value -= 1;
288
+ o.value -= 1;
278
289
  break;
279
290
  }
280
- }, a = ({ edgeCaseItem: _ }, p) => {
281
- t.value !== _ && (o(p), e(t.value));
282
- }, r = (_) => {
283
- T(_), a(
291
+ }, c = ({ edgeCaseItem: v }, p) => {
292
+ o.value !== v && (a(p), s(o.value));
293
+ }, f = (v) => {
294
+ k(v), c(
284
295
  {
285
- edgeCaseItem: l.value
296
+ edgeCaseItem: t.value
286
297
  },
287
298
  "increase"
288
299
  /* INCREASE */
289
300
  );
290
- }, m = (_) => {
291
- T(_), a(
301
+ }, L = (v) => {
302
+ k(v), c(
292
303
  {
293
304
  edgeCaseItem: 0
294
305
  },
295
306
  "decrease"
296
307
  /* DECREASE */
297
308
  );
298
- }, A = () => {
299
- t.value = 0, e(t.value);
309
+ }, m = () => {
310
+ o.value = 0, s(o.value);
300
311
  }, d = () => {
301
- t.value = l.value, e(t.value);
302
- }, b = (_) => {
303
- t.value = _;
304
- }, T = (_) => {
312
+ o.value = t.value, s(o.value);
313
+ }, A = (v) => {
314
+ o.value = v;
315
+ }, k = (v) => {
305
316
  var p;
306
- (p = _ == null ? void 0 : _.detail) == null || p.preventDefault();
317
+ (p = v == null ? void 0 : v.detail) == null || p.preventDefault();
307
318
  };
308
319
  return {
309
- moveToFirstElement: A,
320
+ moveToFirstElement: m,
310
321
  moveToLastElement: d,
311
- moveToNextElement: r,
312
- moveToPreviousElement: m,
313
- setListboxFocusedIndex: b,
314
- preventDefault: T,
315
- focusedIndex: t
322
+ moveToNextElement: f,
323
+ moveToPreviousElement: L,
324
+ setListboxFocusedIndex: A,
325
+ preventDefault: k,
326
+ focusedIndex: o
316
327
  };
317
- }, Se = (s, e, l = x("option"), t = !0) => {
318
- const o = x([]), a = async () => {
319
- if (!s.value || s.value.nodeType === Node.COMMENT_NODE)
328
+ }, Oe = (l, e, s = T("option"), t = !0) => {
329
+ const o = T([]), a = async () => {
330
+ if (!l.value || l.value.nodeType === Node.COMMENT_NODE)
320
331
  return;
321
- const r = Array.from(s.value.querySelectorAll(`[role="${l.value}"]`));
322
- o.value = t ? r.filter((m) => m.checkVisibility()) : r;
332
+ const c = Array.from(l.value.querySelectorAll(`[role="${s.value}"]`));
333
+ o.value = t ? c.filter((f) => f.checkVisibility()) : c;
323
334
  };
324
- return X(
335
+ return H(
325
336
  e,
326
337
  () => {
327
- pe(() => {
338
+ ae(() => {
328
339
  a();
329
340
  });
330
341
  },
@@ -333,13 +344,13 @@ const ft = mt.exports, he = ({ items: s }, e) => {
333
344
  visibleDomOptions: o,
334
345
  updateVisibleDomOptions: a
335
346
  };
336
- }, vt = G({
347
+ }, vt = F({
337
348
  name: "bento-listbox-single-select",
338
349
  components: {
339
350
  BentoListboxSingleSelectCategory: et,
340
- BentoListboxSingleSelectOption: ft
351
+ BentoListboxSingleSelectOption: mt
341
352
  },
342
- directives: { BentoKeyboardNavigationDirective: se },
353
+ directives: { BentoKeyboardNavigationDirective: ne },
343
354
  inheritAttrs: !1,
344
355
  props: {
345
356
  /**
@@ -378,94 +389,142 @@ const ft = mt.exports, he = ({ items: s }, e) => {
378
389
  /**
379
390
  * If enabled, dropdown will display non-selectable, static categories
380
391
  */
381
- staticCategories: { type: Boolean, default: !1 }
392
+ staticCategories: { type: Boolean, default: !1 },
393
+ /**
394
+ * Total number of items in the full list (used for virtual scroll keyboard navigation).
395
+ * When greater than 0, virtual scroll keyboard navigation is enabled.
396
+ */
397
+ totalItemCount: { type: Number, default: 0 },
398
+ /**
399
+ * Function to scroll the virtual list container to a given item index.
400
+ */
401
+ scrollToIndex: { type: Function, default: void 0 },
402
+ /**
403
+ * The start index of the currently rendered virtual scroll slice.
404
+ */
405
+ virtualScrollStartIndex: { type: Number, default: 0 }
382
406
  },
383
- emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
384
- setup(s, { emit: e, expose: l, slots: t, attrs: o }) {
385
- const a = x(null), r = x([]), m = n(() => {
386
- var v;
387
- return !!((v = s.selectedValue) != null && v.length) && s.selectedValue.at(0);
388
- }), A = n(
407
+ emits: [u.SELECT, u.ENTER, u.SPACE, u.TAB],
408
+ setup(l, { emit: e, expose: s, slots: t, attrs: o }) {
409
+ const a = T(null), c = T([]), f = n(() => {
410
+ var r;
411
+ return !!((r = l.selectedValue) != null && r.length) && l.selectedValue.at(0);
412
+ }), L = n(
389
413
  () => {
390
- var v, y, D, P;
414
+ var r, _, I, B;
391
415
  return {
392
- "aria-label": (v = o["aria-label"]) == null ? void 0 : v.toString(),
393
- "aria-busy": (y = o["aria-busy"]) == null ? void 0 : y.toString(),
394
- "aria-atomic": (D = o["aria-atomic"]) == null ? void 0 : D.toString(),
395
- "aria-live": (P = o["aria-live"]) == null ? void 0 : P.toString()
416
+ "aria-label": (r = o["aria-label"]) == null ? void 0 : r.toString(),
417
+ "aria-busy": (_ = o["aria-busy"]) == null ? void 0 : _.toString(),
418
+ "aria-atomic": (I = o["aria-atomic"]) == null ? void 0 : I.toString(),
419
+ "aria-live": (B = o["aria-live"]) == null ? void 0 : B.toString()
396
420
  };
397
421
  }
398
- ), d = n(() => !!s.items.some(({ items: v }) => !!v)), b = (v) => (y) => {
399
- e(v, [y]);
400
- }, { visibleDomOptions: T } = Se(a, H(s, "items"), x("option"), !1), _ = (v) => {
401
- var y;
402
- (y = T.value[v]) == null || y.focus();
422
+ ), m = n(() => !!l.items.some(({ items: r }) => !!r)), d = (r) => (_) => {
423
+ e(r, [_]);
424
+ }, { visibleDomOptions: A, updateVisibleDomOptions: k } = Oe(
425
+ a,
426
+ j(l, "items"),
427
+ T("option"),
428
+ !1
429
+ ), v = n(() => l.totalItemCount > 0), p = (r) => {
430
+ if (!v.value)
431
+ return;
432
+ const _ = r.target;
433
+ if (_ === a.value || (_ == null ? void 0 : _.getAttribute("role")) !== "option")
434
+ return;
435
+ const I = A.value.indexOf(_);
436
+ if (I !== -1) {
437
+ const B = I + l.virtualScrollStartIndex;
438
+ C(B);
439
+ }
440
+ }, R = async (r) => {
441
+ var _, I;
442
+ if (v.value && l.scrollToIndex) {
443
+ l.scrollToIndex(r), await ae(), await k();
444
+ const B = r - l.virtualScrollStartIndex;
445
+ (_ = A.value[B]) == null || _.focus();
446
+ } else
447
+ (I = A.value[r]) == null || I.focus();
448
+ }, M = async (r) => {
449
+ C(r), await R(r);
403
450
  }, {
404
- moveToNextElement: p,
405
- moveToPreviousElement: C,
406
- moveToFirstElement: R,
407
- moveToLastElement: B,
408
- setListboxFocusedIndex: I
409
- } = he(
451
+ moveToNextElement: G,
452
+ moveToPreviousElement: h,
453
+ moveToFirstElement: x,
454
+ moveToLastElement: E,
455
+ setListboxFocusedIndex: C
456
+ } = xe(
410
457
  {
411
- items: T
458
+ items: A,
459
+ totalItemCount: j(l, "totalItemCount")
412
460
  },
413
- _
461
+ R
414
462
  ), O = {
415
- [M.ARROW_UP]: C,
416
- [M.ARROW_DOWN]: p,
417
- [M.HOME]: R,
418
- [M.END]: B
419
- }, S = {
420
- [c.SELECT]: b(c.SELECT),
421
- [c.SPACE]: b(c.SPACE),
422
- [c.TAB]: b(c.TAB),
423
- [c.ENTER]: b(c.ENTER)
463
+ [$.ARROW_UP]: h,
464
+ [$.ARROW_DOWN]: G,
465
+ [$.HOME]: x,
466
+ [$.END]: E
467
+ }, D = {
468
+ [u.SELECT]: d(u.SELECT),
469
+ [u.SPACE]: d(u.SPACE),
470
+ [u.TAB]: d(u.TAB),
471
+ [u.ENTER]: d(u.ENTER)
424
472
  };
425
- return l({
473
+ return s({
426
474
  /**
427
475
  * Reference for a single listbox item.
428
476
  * Required for keyboard navigation in dropdown as $children is removed in vue@3
429
477
  */
430
- listboxItemRef: r,
478
+ listboxItemRef: c,
431
479
  /**
432
480
  * Method to set the index of the item to be focused on
433
481
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
434
482
  */
435
- setListboxFocusedIndex: I
483
+ setListboxFocusedIndex: C,
484
+ /**
485
+ * Navigates to an item by global index, handling virtual scroll if enabled.
486
+ * Scrolls the virtual list and focuses the item.
487
+ */
488
+ navigateToItem: M
436
489
  }), {
437
490
  // Enums
438
- BentoListboxEvent: c,
491
+ BentoListboxEvent: u,
439
492
  // Values
440
493
  listboxRef: a,
441
- listboxItemRef: r,
442
- selectedItem: m,
494
+ listboxItemRef: c,
495
+ selectedItem: f,
443
496
  slots: t,
444
- ariaAttributes: A,
497
+ ariaAttributes: L,
445
498
  // Computed
446
- hasCategories: d,
499
+ hasCategories: m,
447
500
  // Methods
448
- onOptionSelected: b,
501
+ onOptionSelected: d,
449
502
  // Keyboard navigation
450
503
  listboxListeners: O,
451
- listboxOptionListeners: S
504
+ listboxOptionListeners: D,
505
+ // Virtual scroll focus management
506
+ handleVirtualScrollingFocus: p
452
507
  };
453
508
  }
454
509
  });
455
510
  var gt = function() {
456
- var e = this, l = e._self._c;
457
- return e._self._setupProxy, l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(t) {
458
- return l("bento-listbox-single-select-category", { key: t.value, attrs: { "category-label": t.label } }, e._l(t.items, function(o) {
459
- return l("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(a, r) {
460
- return { key: r, fn: function(m) {
461
- return [e._t(r, null, null, m)];
511
+ var e = this, s = e._self._c;
512
+ return e._self._setupProxy, s("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", attrs: { role: "listbox" }, on: { focusin: e.handleVirtualScrollingFocus } }, "div", e.ariaAttributes, !1), e.listboxListeners), [e.hasCategories && e.staticCategories ? [e._l(e.items, function(t) {
513
+ return [t.items && t.items.length > 0 ? s("bento-listbox-single-select-category", { key: `category-${t.value}`, attrs: { "category-label": t.label } }, e._l(t.items, function(o) {
514
+ 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(a, c) {
515
+ return { key: c, fn: function(f) {
516
+ return [e._t(c, null, null, f)];
462
517
  } };
463
518
  })], null, !0) }, e.listboxOptionListeners));
464
- }), 1);
465
- }) : e._l(e.items, function(t) {
466
- return l("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
467
- return { key: a, fn: function(r) {
468
- return [e._t(a, null, null, r)];
519
+ }), 1) : s("bento-listbox-single-select-option", e._g({ key: `option-${t.value}`, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
520
+ return { key: a, fn: function(c) {
521
+ return [e._t(a, null, null, c)];
522
+ } };
523
+ })], null, !0) }, e.listboxOptionListeners))];
524
+ })] : e._l(e.items, function(t) {
525
+ return s("bento-listbox-single-select-option", e._g({ key: t.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: t, disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, selected: t.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
526
+ return { key: a, fn: function(c) {
527
+ return [e._t(a, null, null, c)];
469
528
  } };
470
529
  })], null, !0) }, e.listboxOptionListeners));
471
530
  })], 2);
@@ -478,15 +537,15 @@ var gt = function() {
478
537
  null
479
538
  );
480
539
  const yt = pt.exports;
481
- let ge = 0;
540
+ let he = 0;
482
541
  const ht = {
483
542
  beforeCreate() {
484
- this.uuid = ge.toString(), ge += 1;
543
+ this.uuid = he.toString(), he += 1;
485
544
  }
486
545
  };
487
546
  var St = function() {
488
- var e = this, l = e._self._c;
489
- return l("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? l("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), l("path", { attrs: { fill: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), l("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
547
+ var e = this, s = e._self._c;
548
+ 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: "#001222", d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z" } }), s("path", { attrs: { fill: "#001222", d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z" } })]);
490
549
  }, Ct = [], xt = /* @__PURE__ */ N(
491
550
  ht,
492
551
  St,
@@ -495,7 +554,7 @@ var St = function() {
495
554
  null,
496
555
  null
497
556
  );
498
- const Ot = xt.exports, Et = {}, Tt = /* @__PURE__ */ G({
557
+ const Ot = xt.exports, Et = {}, Tt = /* @__PURE__ */ F({
499
558
  ...Et,
500
559
  __name: "decorative-checkbox",
501
560
  props: {
@@ -504,20 +563,20 @@ const Ot = xt.exports, Et = {}, Tt = /* @__PURE__ */ G({
504
563
  checked: { type: Boolean, default: !1 },
505
564
  allSelected: { type: Boolean, default: !1 }
506
565
  },
507
- setup(s) {
508
- const e = s, l = n(() => ({
509
- [`b-checkbox-input--${J.DISABLED}`]: e.disabled
566
+ setup(l) {
567
+ const e = l, s = n(() => ({
568
+ [`b-checkbox-input--${Q.DISABLED}`]: e.disabled
510
569
  })), t = n(() => ({
511
- [`b-checkbox-input__outline--${J.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
512
- [`b-checkbox-input__outline--${J.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
513
- [`b-checkbox-input__outline--${J.INDETERMINATE}`]: e.indeterminate
570
+ [`b-checkbox-input__outline--${Q.UNCHECKED}`]: !e.checked && !e.indeterminate && !e.allSelected,
571
+ [`b-checkbox-input__outline--${Q.CHECKED}`]: (e.checked || e.allSelected) && !e.indeterminate,
572
+ [`b-checkbox-input__outline--${Q.INDETERMINATE}`]: e.indeterminate
514
573
  }));
515
- return { __sfc: !0, props: e, conditionalClasses: l, outlineConditionalClasses: t, CheckmarkSmallIcon: Ve, MinusSmallIcon: Ue, DoubleCheckmarkSmallIcon: Ot };
574
+ return { __sfc: !0, props: e, conditionalClasses: s, outlineConditionalClasses: t, CheckmarkSmallIcon: Ve, MinusSmallIcon: Ue, DoubleCheckmarkSmallIcon: Ot };
516
575
  }
517
576
  });
518
577
  var It = function() {
519
- var e = this, l = e._self._c, t = e._self._setupProxy;
520
- return l("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? l(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? l(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? l(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), l("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
578
+ var e = this, s = e._self._c, t = e._self._setupProxy;
579
+ return s("div", { staticClass: "b-checkbox-input", class: t.conditionalClasses, attrs: { role: "presentation" } }, [e.indeterminate ? s(t.MinusSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e.allSelected ? s(t.DoubleCheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true", "data-testid": "decorative-checkbox-double-checkmark-icon" } }) : e.checked ? s(t.CheckmarkSmallIcon, { staticClass: "b-checkbox-input__icon", attrs: { "svg-title": "", "aria-hidden": "true" } }) : e._e(), s("div", { staticClass: "b-checkbox-input__outline", class: t.outlineConditionalClasses })], 1);
521
580
  }, At = [], Lt = /* @__PURE__ */ N(
522
581
  Tt,
523
582
  It,
@@ -526,8 +585,8 @@ var It = function() {
526
585
  null,
527
586
  "b87bbaf9"
528
587
  );
529
- const oe = Lt.exports;
530
- var Ce = /* @__PURE__ */ ((s) => (s.DISABLED = "disabled", s.STATIC_CATEGORY = "static-category", s))(Ce || {}), U = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(U || {});
588
+ const ce = Lt.exports;
589
+ var Ee = /* @__PURE__ */ ((l) => (l.DISABLED = "disabled", l.STATIC_CATEGORY = "static-category", l))(Ee || {}), V = /* @__PURE__ */ ((l) => (l.SELECT_CATEGORY = "select-category", l.UNSELECT_CATEGORY = "unselect-category", l.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", l))(V || {});
531
590
  const kt = {
532
591
  "de-DE": {
533
592
  categoryClosed: "{category} geschlossen",
@@ -569,15 +628,15 @@ const kt = {
569
628
  categoryClosed: "{category} 已关闭",
570
629
  categoryOpened: "{category} 已打开"
571
630
  }
572
- }, Rt = G({
631
+ }, Dt = F({
573
632
  i18n: { messages: kt },
574
633
  name: "bento-listbox-multi-select-category",
575
634
  components: {
576
- BentoTypography: j,
577
- BentoListboxOption: Z,
635
+ BentoTypography: q,
636
+ BentoListboxOption: ee,
578
637
  ChevronDownIcon: Ke,
579
638
  ChevronUpIcon: je,
580
- DecorativeCheckbox: oe
639
+ DecorativeCheckbox: ce
581
640
  },
582
641
  props: {
583
642
  /**
@@ -623,102 +682,102 @@ const kt = {
623
682
  tabindex: { type: Number, default: -1 }
624
683
  },
625
684
  emits: [
626
- U.SELECT_CATEGORY,
627
- U.UNSELECT_CATEGORY,
628
- U.TOGGLE_CATEGORY_VISIBILITY
685
+ V.SELECT_CATEGORY,
686
+ V.UNSELECT_CATEGORY,
687
+ V.TOGGLE_CATEGORY_VISIBILITY
629
688
  ],
630
- setup(s, { emit: e }) {
631
- const l = x(!1), { t } = le(), o = me("category-group"), a = me("category-name"), r = (E) => s.isOptionDisabled ? s.isOptionDisabled(E) : !1, m = n(
632
- () => s.category.items.every((E) => r(E))
633
- ), A = H(s, "staticCategories"), d = n(() => l.value || s.staticCategories), b = n(() => ({
634
- [`b-listbox-multi-select-category--${Ce.DISABLED}`]: m.value
635
- })), T = (E, L) => {
636
- E.preventDefault(), l.value = L !== void 0 ? L : !l.value, e(U.TOGGLE_CATEGORY_VISIBILITY, s.category.value);
637
- }, _ = (E) => {
638
- var Y;
639
- const L = r(E), $ = ((Y = s.selectedItemsList) == null ? void 0 : Y.includes(E.value)) || !1;
640
- return { isDisabled: L, isPreSelected: $ };
641
- }, p = n(
642
- () => s.category.items.filter((E) => {
643
- const { isDisabled: L, isPreSelected: $ } = _(E);
644
- return L && $ || !L;
689
+ setup(l, { emit: e }) {
690
+ const s = T(!1), { t } = ie(), o = _e("category-group"), a = _e("category-name"), c = (r) => l.isOptionDisabled ? l.isOptionDisabled(r) : !1, f = n(
691
+ () => l.category.items.every((r) => c(r))
692
+ ), L = j(l, "staticCategories"), m = n(() => s.value || l.staticCategories), d = n(() => ({
693
+ [`b-listbox-multi-select-category--${Ee.DISABLED}`]: f.value
694
+ })), A = (r, _) => {
695
+ r.preventDefault(), s.value = _ !== void 0 ? _ : !s.value, e(V.TOGGLE_CATEGORY_VISIBILITY, l.category.value);
696
+ }, k = (r) => {
697
+ var B;
698
+ const _ = c(r), I = ((B = l.selectedItemsList) == null ? void 0 : B.includes(r.value)) || !1;
699
+ return { isDisabled: _, isPreSelected: I };
700
+ }, v = n(
701
+ () => l.category.items.filter((r) => {
702
+ const { isDisabled: _, isPreSelected: I } = k(r);
703
+ return _ && I || !_;
645
704
  })
646
- ), C = n(
705
+ ), p = n(
647
706
  () => {
648
- var E;
649
- return (E = p.value) == null ? void 0 : E.filter(
650
- ({ value: L }) => {
651
- var $;
652
- return ($ = s.selectedItemsList) == null ? void 0 : $.includes(L);
707
+ var r;
708
+ return (r = v.value) == null ? void 0 : r.filter(
709
+ ({ value: _ }) => {
710
+ var I;
711
+ return (I = l.selectedItemsList) == null ? void 0 : I.includes(_);
653
712
  }
654
713
  );
655
714
  }
656
715
  ), R = n(() => {
657
- const E = l.value ? "categoryOpened" : "categoryClosed";
658
- return t(E, { category: s.category.label });
659
- }), B = () => {
660
- e(U.SELECT_CATEGORY);
661
- }, I = () => {
662
- e(U.UNSELECT_CATEGORY);
663
- }, { isAllSelected: O, isIndeterminate: S, toggleSelectAll: v } = ye(
664
- C,
716
+ const r = s.value ? "categoryOpened" : "categoryClosed";
717
+ return t(r, { category: l.category.label });
718
+ }), M = () => {
719
+ e(V.SELECT_CATEGORY);
720
+ }, G = () => {
721
+ e(V.UNSELECT_CATEGORY);
722
+ }, { isAllSelected: h, isIndeterminate: x, toggleSelectAll: E } = Ce(
665
723
  p,
666
- B,
667
- I
668
- ), y = n(() => S.value ? "mixed" : `${O.value}`), D = x(O.value), P = () => {
669
- D.value = !D.value, v(D.value);
724
+ v,
725
+ M,
726
+ G
727
+ ), C = n(() => x.value ? "mixed" : `${h.value}`), O = T(h.value), D = () => {
728
+ O.value = !O.value, E(O.value);
670
729
  };
671
- return X(O, () => {
672
- D.value = O.value;
730
+ return H(h, () => {
731
+ O.value = h.value;
673
732
  }), {
674
733
  // Values
675
734
  chevronTitle: R,
676
- conditionalClass: b,
677
- hasAllPropsDisabled: m,
678
- isOpen: l,
679
- isAllSelected: O,
680
- isIndeterminate: S,
681
- isStaticCategory: A,
735
+ conditionalClass: d,
736
+ hasAllPropsDisabled: f,
737
+ isOpen: s,
738
+ isAllSelected: h,
739
+ isIndeterminate: x,
740
+ isStaticCategory: L,
682
741
  categoryGroupId: o,
683
742
  categoryNameId: a,
684
743
  // Computed
685
- showItemChildren: d,
686
- ariaCheckedComputed: y,
744
+ showItemChildren: m,
745
+ ariaCheckedComputed: C,
687
746
  // Methods
688
- handleSelectAll: P,
689
- toggleOpen: T,
690
- toggleSelectAll: v
747
+ handleSelectAll: D,
748
+ toggleOpen: A,
749
+ toggleSelectAll: E
691
750
  };
692
751
  }
693
752
  });
694
- var Dt = function() {
695
- var e = this, l = e._self._c;
696
- return e._self._setupProxy, l("div", [e.isStaticCategory ? l("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
753
+ var Rt = function() {
754
+ var e = this, s = e._self._c;
755
+ return e._self._setupProxy, s("div", [e.isStaticCategory ? s("div", { staticClass: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category", attrs: { "aria-hidden": "true" } }, [s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { el: "span", variant: "caption" } }, [e._v(" " + e._s(e.category.label) + " ")])], 1)]) : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass, attrs: { tabindex: e.tabindex, "aria-selected": e.ariaCheckedComputed !== "false", "aria-checked": e.ariaCheckedComputed, "aria-disabled": e.hasAllPropsDisabled, "aria-expanded": `${e.isOpen}`, role: "treeitem", "aria-owns": e.categoryGroupId, "aria-labelledby": e.categoryNameId }, on: { click: e.handleSelectAll, "enter-pressed": e.handleSelectAll, "space-pressed": function(t) {
697
756
  return t.preventDefault(), e.handleSelectAll.apply(null, arguments);
698
757
  } }, nativeOn: { keydown: [function(t) {
699
758
  return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-left", void 0, t.key, void 0) ? null : e.toggleOpen(t, !1);
700
759
  }, function(t) {
701
760
  return !t.type.indexOf("key") && e._k(t.keyCode, "arrow-right", void 0, t.key, void 0) ? null : e.toggleOpen(t, !0);
702
- }] } }, [l("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), l("span", { staticClass: "b-listbox-multi-select-category__label" }, [l("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), l("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
761
+ }] } }, [s("decorative-checkbox", { attrs: { indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, checked: e.isAllSelected } }), s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", { staticClass: "b-listbox-multi-select-category__label-text", attrs: { id: e.categoryNameId, el: "span" } }, [e._v(" " + e._s(e.category.label) + " ")]), s("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "aria-hidden": "true", "data-testid": "toggle-listbox" }, on: { "!click": function(t) {
703
762
  return t.stopPropagation(), e.toggleOpen.apply(null, arguments);
704
- } } }, [e.isOpen ? l("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : l("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), l("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default")], 2)], 1);
705
- }, Bt = [], Mt = /* @__PURE__ */ N(
706
- Rt,
763
+ } } }, [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" }], attrs: { id: e.categoryGroupId, role: "group", "aria-label": e.category.label } }, [e._t("default")], 2)], 1);
764
+ }, Bt = [], wt = /* @__PURE__ */ N(
707
765
  Dt,
766
+ Rt,
708
767
  Bt,
709
768
  !1,
710
769
  null,
711
770
  "00ccd708"
712
771
  );
713
- const $t = Mt.exports;
714
- var w = /* @__PURE__ */ ((s) => (s.SELECT_CATEGORY = "select-category", s.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", s.UNSELECT_CATEGORY = "unselect-category", s.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", s))(w || {});
715
- const Nt = G({
772
+ const Mt = wt.exports;
773
+ var P = /* @__PURE__ */ ((l) => (l.SELECT_CATEGORY = "select-category", l.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", l.UNSELECT_CATEGORY = "unselect-category", l.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", l))(P || {});
774
+ const $t = F({
716
775
  name: "listbox-multi-select-options",
717
776
  components: {
718
- BentoListboxOption: Z,
719
- BentoTypography: j,
720
- ListboxMultiSelectCategory: $t,
721
- DecorativeCheckbox: oe
777
+ BentoListboxOption: ee,
778
+ BentoTypography: q,
779
+ ListboxMultiSelectCategory: Mt,
780
+ DecorativeCheckbox: ce
722
781
  },
723
782
  inheritAttrs: !1,
724
783
  props: {
@@ -788,88 +847,88 @@ const Nt = G({
788
847
  }
789
848
  },
790
849
  emits: [
791
- w.TOGGLE_CHECKBOX_SELECTION,
792
- w.SELECT_CATEGORY,
793
- w.UNSELECT_CATEGORY,
794
- w.TOGGLE_CATEGORY_VISIBILITY
850
+ P.TOGGLE_CHECKBOX_SELECTION,
851
+ P.SELECT_CATEGORY,
852
+ P.UNSELECT_CATEGORY,
853
+ P.TOGGLE_CATEGORY_VISIBILITY
795
854
  ],
796
- setup(s, { emit: e }) {
797
- const l = (d) => {
798
- s.isOptionDisabled(d) || e(w.TOGGLE_CHECKBOX_SELECTION, d);
799
- }, t = (d) => !!d.items, o = (d) => {
800
- const b = s.isMultiLevel && s.searching;
801
- return d.description && (!s.isMultiLevel || b);
802
- }, a = (d) => d.items ? !!d.items.find((b) => s.selectedItemsList.includes(b.value)) : s.selectedItemsList.includes(d.value), r = (d) => {
803
- if (t(d)) {
804
- const b = a(d) ? w.UNSELECT_CATEGORY : w.SELECT_CATEGORY;
805
- e(b, d);
855
+ setup(l, { emit: e }) {
856
+ const s = (m) => {
857
+ l.isOptionDisabled(m) || e(P.TOGGLE_CHECKBOX_SELECTION, m);
858
+ }, t = (m) => !!m.items, o = (m) => {
859
+ const d = l.isMultiLevel && l.searching;
860
+ return m.description && (!l.isMultiLevel || d);
861
+ }, a = (m) => m.items ? !!m.items.find((d) => l.selectedItemsList.includes(d.value)) : l.selectedItemsList.includes(m.value), c = (m) => {
862
+ if (t(m)) {
863
+ const d = a(m) ? P.UNSELECT_CATEGORY : P.SELECT_CATEGORY;
864
+ e(d, m);
806
865
  } else
807
- l(d);
866
+ s(m);
808
867
  };
809
868
  return {
810
869
  // Values
811
870
  conditionalClasses: n(() => ({
812
- "b-listbox-multi-select-options__static-category-option": s.staticCategories,
813
- "b-listbox-multi-select-options__category-option": s.categoryItems
871
+ "b-listbox-multi-select-options__static-category-option": l.staticCategories,
872
+ "b-listbox-multi-select-options__category-option": l.categoryItems
814
873
  })),
815
874
  // Methods
816
875
  isOptionSelected: a,
817
876
  shouldShowDescription: o,
818
- toggleCheckboxSelection: l,
819
- toggleSearchOption: r,
820
- computedTabindex: (d) => s.itemsIndex[d] === s.focusedIndex ? 0 : -1,
877
+ toggleCheckboxSelection: s,
878
+ toggleSearchOption: c,
879
+ computedTabindex: (m) => l.itemsIndex[m] === l.focusedIndex ? 0 : -1,
821
880
  // Enums
822
- BentoListboxEvent: c,
823
- ListboxMultiSelectOptionsEvent: w
881
+ BentoListboxEvent: u,
882
+ ListboxMultiSelectOptionsEvent: P
824
883
  };
825
884
  }
826
885
  });
827
- var wt = function() {
828
- var e = this, l = e._self._c;
829
- return e._self._setupProxy, l("div", e._l(e.items, function(t) {
830
- return l("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
886
+ var Nt = function() {
887
+ var e = this, s = e._self._c;
888
+ return e._self._setupProxy, s("div", e._l(e.items, function(t) {
889
+ return s("div", { key: `selected-${t.value}` }, [e.searching && e.isMultiLevel ? [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
831
890
  return e.toggleSearchOption(t);
832
891
  }, "enter-pressed": function(o) {
833
892
  return e.toggleSearchOption(t);
834
893
  }, "space-pressed": function(o) {
835
894
  return o.preventDefault(), e.toggleSearchOption(t);
836
- } } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
837
- return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
838
- }, null, t)], 2)] : [t.items ? [l("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(o) {
895
+ } } }, [s("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
896
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
897
+ }, null, t)], 2)] : [t.items ? [s("listbox-multi-select-category", { attrs: { category: t, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(t.value) }, on: { "select-category": function(o) {
839
898
  return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, t);
840
899
  }, "unselect-category": function(o) {
841
900
  return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, t);
842
901
  }, "toggle-category-visibility": function(o) {
843
902
  return e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, o);
844
- } } }, [l("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (o) => e.toggleCheckboxSelection(o) } })], 1)] : l("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
903
+ } } }, [s("listbox-multi-select-options", { attrs: { "category-items": "", items: t.items, "is-option-disabled": e.isOptionDisabled, "items-index": e.itemsIndex, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching, role: e.$attrs.role || "option" }, on: { "toggle-checkbox-selection": (o) => e.toggleCheckboxSelection(o) } })], 1)] : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, tabindex: e.computedTabindex(t.value), "aria-selected": `${e.isOptionSelected(t)}`, "aria-checked": `${e.isOptionSelected(t)}`, "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(t) : null, role: e.$attrs.role || "option" }, on: { click: function(o) {
845
904
  return e.toggleCheckboxSelection(t);
846
905
  }, "enter-pressed": function(o) {
847
906
  return e.toggleCheckboxSelection(t);
848
907
  }, "space-pressed": function(o) {
849
908
  return o.preventDefault(), e.toggleCheckboxSelection(t);
850
- } } }, [l("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
851
- return [l("span", { staticClass: "b-listbox-multi-select__option-text" }, [l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? l("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
909
+ } } }, [s("decorative-checkbox", { attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(t) : null, checked: e.isOptionSelected(t) } }), e._t("default", function() {
910
+ return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(t.label))]), e.shouldShowDescription(t) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(t.description) + " ")]) : e._e()], 1)];
852
911
  }, null, t)], 2)]], 2);
853
912
  }), 0);
854
913
  }, Gt = [], Pt = /* @__PURE__ */ N(
914
+ $t,
855
915
  Nt,
856
- wt,
857
916
  Gt,
858
917
  !1,
859
918
  null,
860
919
  "0985e0a4"
861
920
  );
862
- const Ft = Pt.exports, Yt = (s) => {
921
+ const Ft = Pt.exports, Yt = (l) => {
863
922
  const e = n(() => {
864
923
  var t;
865
- return !!((t = s.value) != null && t.find(({ items: o }) => !!o));
866
- }), l = n(() => {
924
+ return !!((t = l.value) != null && t.find(({ items: o }) => !!o));
925
+ }), s = n(() => {
867
926
  var t;
868
- return e.value ? (t = s.value) == null ? void 0 : t.reduce((o, a) => (a.items ? o.push(...a.items.flat()) : o.push(a), o), []) : s.value;
927
+ return e.value ? (t = l.value) == null ? void 0 : t.reduce((o, a) => (a.items ? o.push(...a.items.flat()) : o.push(a), o), []) : l.value;
869
928
  });
870
929
  return {
871
930
  isMultiLevelSelect: e,
872
- flattenedItemsList: l
931
+ flattenedItemsList: s
873
932
  };
874
933
  }, zt = {
875
934
  "de-DE": {
@@ -932,7 +991,7 @@ const Ft = Pt.exports, Yt = (s) => {
932
991
  numbersSelected: "已选择 {number} 个",
933
992
  selectAll: "选择全部({total})个"
934
993
  }
935
- }, Ut = { i18n: { messages: zt } }, Vt = /* @__PURE__ */ G({
994
+ }, Ut = { i18n: { messages: zt } }, Vt = /* @__PURE__ */ F({
936
995
  ...Ut,
937
996
  __name: "listbox-multi-select",
938
997
  props: {
@@ -945,152 +1004,152 @@ const Ft = Pt.exports, Yt = (s) => {
945
1004
  staticCategories: { type: Boolean, default: !1 }
946
1005
  },
947
1006
  emits: ["select"],
948
- setup(s, { expose: e, emit: l }) {
949
- const t = s, { t: o, n: a } = le(), r = Ge(), m = Pe(), A = n(
1007
+ setup(l, { expose: e, emit: s }) {
1008
+ const t = l, { t: o, n: a } = ie(), c = Ge(), f = Pe(), L = n(
950
1009
  () => {
951
- var i, u, f, h;
1010
+ var i, b, g, S;
952
1011
  return {
953
- "aria-label": (i = m["aria-label"]) == null ? void 0 : i.toString(),
954
- "aria-busy": (u = m["aria-busy"]) == null ? void 0 : u.toString(),
955
- "aria-atomic": (f = m["aria-atomic"]) == null ? void 0 : f.toString(),
956
- "aria-live": (h = m["aria-live"]) == null ? void 0 : h.toString(),
1012
+ "aria-label": (i = f["aria-label"]) == null ? void 0 : i.toString(),
1013
+ "aria-busy": (b = f["aria-busy"]) == null ? void 0 : b.toString(),
1014
+ "aria-atomic": (g = f["aria-atomic"]) == null ? void 0 : g.toString(),
1015
+ "aria-live": (S = f["aria-live"]) == null ? void 0 : S.toString(),
957
1016
  "aria-multiselectable": !0
958
1017
  };
959
1018
  }
960
- ), d = x(null), b = x(null), T = x(null), _ = x(null), p = n(() => t.selectedValues.map(({ value: i }) => i)), { isMultiLevelSelect: C, flattenedItemsList: R } = Yt(H(t, "items")), B = n(() => C.value && !t.staticCategories), I = n(() => B.value ? "tree" : "listbox"), O = n(() => B.value ? "treeitem" : "option"), S = (i) => {
961
- var h;
962
- const u = t.isOptionDisabled(i), f = ((h = p.value) == null ? void 0 : h.includes(i.value)) || !1;
963
- return { isDisabled: u, isPreSelected: f };
964
- }, v = n(() => {
965
- if (t.searching && C)
1019
+ ), m = T(null), d = T(null), A = T(null), k = T(null), v = n(() => t.selectedValues.map(({ value: i }) => i)), { isMultiLevelSelect: p, flattenedItemsList: R } = Yt(j(t, "items")), M = n(() => p.value && !t.staticCategories), G = n(() => M.value ? "tree" : "listbox"), h = n(() => M.value ? "treeitem" : "option"), x = (i) => {
1020
+ var S;
1021
+ const b = t.isOptionDisabled(i), g = ((S = v.value) == null ? void 0 : S.includes(i.value)) || !1;
1022
+ return { isDisabled: b, isPreSelected: g };
1023
+ }, E = n(() => {
1024
+ if (t.searching && p)
966
1025
  return t.items;
967
- const i = R.value.filter((u) => {
968
- const { isDisabled: f, isPreSelected: h } = S(u);
969
- return f && h || !f;
1026
+ const i = R.value.filter((b) => {
1027
+ const { isDisabled: g, isPreSelected: S } = x(b);
1028
+ return g && S || !g;
970
1029
  });
971
- return t.selectedValues.forEach((u) => {
972
- i.find((f) => f.value === u.value) || i.push(u);
1030
+ return t.selectedValues.forEach((b) => {
1031
+ i.find((g) => g.value === b.value) || i.push(b);
973
1032
  }), i;
974
- }), y = n(
1033
+ }), C = n(
975
1034
  () => {
976
1035
  var i;
977
- return (i = v.value) == null ? void 0 : i.filter((u) => {
978
- var f;
979
- return u.items && C.value && t.searching ? u.items.filter(
980
- (g) => (t.selectedValues ?? []).includes(g.value)
981
- ).length === u.items.length : (f = p.value) == null ? void 0 : f.includes(u.value);
1036
+ return (i = E.value) == null ? void 0 : i.filter((b) => {
1037
+ var g;
1038
+ return b.items && p.value && t.searching ? b.items.filter(
1039
+ (y) => (t.selectedValues ?? []).includes(y.value)
1040
+ ).length === b.items.length : (g = v.value) == null ? void 0 : g.includes(b.value);
982
1041
  });
983
1042
  }
984
- ), D = () => C.value && !t.searching ? R.value.length : t.items.length, P = n(() => {
985
- var h;
986
- const i = v.value.length, u = D(), f = ((h = y.value) == null ? void 0 : h.length) || 0;
987
- return f === 0 ? o("selectAll", { total: a(i) }) : f === u ? o("allSelected", { total: a(u) }) : f <= u ? o("numberOfTotalSelected", { number: a(f), total: a(u) }) : o("numbersSelected", { number: a(f) });
988
- }), E = (i) => {
989
- const u = (h) => {
990
- const { isDisabled: g, isPreSelected: F } = S(h);
991
- return g && F || !g;
992
- }, f = i.filter(u).filter((h) => !p.value.includes(h.value));
993
- l("select", [...t.selectedValues, ...f]);
994
- }, L = (i) => {
995
- const u = (g) => {
996
- const { isDisabled: F, isPreSelected: $e } = S(g);
997
- return !(F && $e);
998
- }, f = i.filter(u).map(({ value: g }) => g), h = t.selectedValues.filter((g) => !(f != null && f.includes(g.value)));
999
- l("select", h);
1000
- }, $ = () => {
1001
- E(R.value);
1002
- }, Y = () => {
1003
- L(R.value);
1004
- }, { isAllSelected: z, isIndeterminate: k, toggleSelectAll: V } = ye(
1005
- y,
1006
- v,
1007
- $,
1008
- Y
1009
- ), xe = n(() => k.value ? "mixed" : `${z.value}`), q = x(z.value), Oe = () => {
1010
- q.value = !q.value, V(q.value);
1043
+ ), O = () => p.value && !t.searching ? R.value.length : t.items.length, D = n(() => {
1044
+ var S;
1045
+ const i = E.value.length, b = O(), g = ((S = C.value) == null ? void 0 : S.length) || 0;
1046
+ return g === 0 ? o("selectAll", { total: a(i) }) : g === b ? o("allSelected", { total: a(b) }) : g <= b ? o("numberOfTotalSelected", { number: a(g), total: a(b) }) : o("numbersSelected", { number: a(g) });
1047
+ }), r = (i) => {
1048
+ const b = (S) => {
1049
+ const { isDisabled: y, isPreSelected: Y } = x(S);
1050
+ return y && Y || !y;
1051
+ }, g = i.filter(b).filter((S) => !v.value.includes(S.value));
1052
+ s("select", [...t.selectedValues, ...g]);
1053
+ }, _ = (i) => {
1054
+ const b = (y) => {
1055
+ const { isDisabled: Y, isPreSelected: Me } = x(y);
1056
+ return !(Y && Me);
1057
+ }, g = i.filter(b).map(({ value: y }) => y), S = t.selectedValues.filter((y) => !(g != null && g.includes(y.value)));
1058
+ s("select", S);
1059
+ }, I = () => {
1060
+ r(R.value);
1061
+ }, B = () => {
1062
+ _(R.value);
1063
+ }, { isAllSelected: z, isIndeterminate: J, toggleSelectAll: Z } = Ce(
1064
+ C,
1065
+ E,
1066
+ I,
1067
+ B
1068
+ ), te = n(() => J.value ? "mixed" : `${z.value}`), U = T(z.value), w = () => {
1069
+ U.value = !U.value, Z(U.value);
1011
1070
  };
1012
- X(z, () => {
1013
- q.value = z.value;
1071
+ H(z, () => {
1072
+ U.value = z.value;
1014
1073
  });
1015
- const Ee = (i) => {
1016
- E(i.items);
1074
+ const X = (i) => {
1075
+ r(i.items);
1017
1076
  }, Te = (i) => {
1018
- L(i.items);
1019
- }, Ie = (i, u) => {
1020
- let f = !1;
1021
- const h = t.selectedValues.filter(({ value: g }) => u.value === g ? (f = !0, !1) : !0);
1022
- f || h.push(u), l(i, h);
1077
+ _(i.items);
1078
+ }, Ie = (i, b) => {
1079
+ let g = !1;
1080
+ const S = t.selectedValues.filter(({ value: y }) => b.value === y ? (g = !0, !1) : !0);
1081
+ g || S.push(b), s(i, S);
1023
1082
  }, Ae = n(() => {
1024
- if (!C.value)
1083
+ if (!p.value)
1025
1084
  return t.selectedValues;
1026
- const i = (g) => p.value.includes(g.value), u = (g) => !t.staticCategories && g.every((F) => i(F));
1085
+ const i = (y) => v.value.includes(y.value), b = (y) => !t.staticCategories && y.every((Y) => i(Y));
1027
1086
  return t.items.flatMap(
1028
- (g) => g.items && !u(g.items) ? g.items : g
1029
- ).filter((g) => g.items ? !0 : i(g));
1087
+ (y) => y.items && !b(y.items) ? y.items : y
1088
+ ).filter((y) => y.items ? !0 : i(y));
1030
1089
  }), Le = n(() => {
1031
- var f, h, g, F;
1032
- const i = ["automatic", "button"].includes(t.lazyLoadType), u = ((f = t.selectedValues) == null ? void 0 : f.length) > 0 && ((h = y.value) == null ? void 0 : h.length) !== ((g = R.value) == null ? void 0 : g.length);
1033
- return i && t.hasMoreItems ? !!((F = t.selectedValues) != null && F.length) : u;
1034
- }), ae = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), W = x([]), { visibleDomOptions: Q, updateVisibleDomOptions: ne } = Se(
1035
- d,
1036
- H(t, "items"),
1037
- O
1090
+ var g, S, y, Y;
1091
+ const i = ["automatic", "button"].includes(t.lazyLoadType), b = ((g = t.selectedValues) == null ? void 0 : g.length) > 0 && ((S = C.value) == null ? void 0 : S.length) !== ((y = R.value) == null ? void 0 : y.length);
1092
+ return i && t.hasMoreItems ? !!((Y = t.selectedValues) != null && Y.length) : b;
1093
+ }), re = n(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), W = T([]), { visibleDomOptions: le, updateVisibleDomOptions: ue } = Oe(
1094
+ m,
1095
+ j(t, "items"),
1096
+ h
1038
1097
  ), ke = (i) => {
1039
- W.value.includes(i) ? W.value = W.value.filter((u) => u !== i) : W.value.push(i), pe(() => {
1040
- ne();
1098
+ W.value.includes(i) ? W.value = W.value.filter((b) => b !== i) : W.value.push(i), ae(() => {
1099
+ ue();
1041
1100
  });
1042
- }, ie = (i) => {
1043
- var u;
1044
- (u = Q.value[i]) == null || u.focus();
1101
+ }, de = (i) => {
1102
+ var b;
1103
+ (b = le.value[i]) == null || b.focus();
1045
1104
  }, {
1046
- moveToNextElement: ce,
1047
- moveToPreviousElement: re,
1048
- moveToFirstElement: ue,
1049
- moveToLastElement: de,
1050
- preventDefault: ee,
1051
- focusedIndex: Re,
1052
- setListboxFocusedIndex: be
1053
- } = he(
1105
+ moveToNextElement: be,
1106
+ moveToPreviousElement: fe,
1107
+ moveToFirstElement: me,
1108
+ moveToLastElement: ve,
1109
+ preventDefault: se,
1110
+ focusedIndex: De,
1111
+ setListboxFocusedIndex: ge
1112
+ } = xe(
1054
1113
  {
1055
- items: Q
1114
+ items: le
1056
1115
  },
1057
- ie
1058
- ), De = {
1059
- [M.ARROW_UP]: (i) => re(i),
1060
- [M.ARROW_DOWN]: (i) => ce(i),
1061
- [M.HOME]: ue,
1062
- [M.END]: de
1116
+ de
1117
+ ), Re = {
1118
+ [$.ARROW_UP]: (i) => fe(i),
1119
+ [$.ARROW_DOWN]: (i) => be(i),
1120
+ [$.HOME]: me,
1121
+ [$.END]: ve
1063
1122
  };
1064
1123
  e({
1065
1124
  /**
1066
1125
  * Method to set the index of the item to be focused on
1067
1126
  * Used for focus management to be kept in-sync with parent e.g. dropdowns
1068
1127
  */
1069
- setListboxFocusedIndex: be
1128
+ setListboxFocusedIndex: ge
1070
1129
  });
1071
1130
  const Be = {
1072
- [M.ARROW_UP]: ee,
1073
- [M.ARROW_DOWN]: ee
1074
- }, Me = n(() => {
1075
- let i = ae.value ? 1 : 0;
1076
- const u = {};
1077
- return t.items.forEach((f) => {
1078
- let h = W.value.includes(f.value);
1079
- f.items ? (t.staticCategories ? h = !0 : u[f.value] = i++, h && f.items.forEach((g) => u[g.value] = i++)) : u[f.value] = i++;
1080
- }), u;
1131
+ [$.ARROW_UP]: se,
1132
+ [$.ARROW_DOWN]: se
1133
+ }, we = n(() => {
1134
+ let i = re.value ? 1 : 0;
1135
+ const b = {};
1136
+ return t.items.forEach((g) => {
1137
+ let S = W.value.includes(g.value);
1138
+ g.items ? (t.staticCategories ? S = !0 : b[g.value] = i++, S && g.items.forEach((y) => b[y.value] = i++)) : b[g.value] = i++;
1139
+ }), b;
1081
1140
  });
1082
- return { __sfc: !0, props: t, emit: l, t: o, n: a, slots: r, attrs: m, ariaAttributes: A, listboxRef: d, selectAllListboxItemsRef: b, selectedListboxItemsRef: T, listboxItemsRef: _, selectedItemsList: p, isMultiLevelSelect: C, flattenedItemsList: R, isTreePattern: B, computedRole: I, computedOptionRole: O, optionStates: S, enabledItems: v, visibleSelectedList: y, calculateTotalItems: D, selectAllCheckboxText: P, selectAll: E, unselectAll: L, selectAllItems: $, unselectAllItems: Y, isAllSelected: z, isIndeterminate: k, toggleSelectAll: V, ariaCheckedComputed: xe, isSelectAllOn: q, handleSelectAll: Oe, selectAllCategory: Ee, unselectAllCategory: Te, toggleCheckboxSelection: Ie, selectedOptions: Ae, showSelectedItems: Le, showSelectAllCheckbox: ae, expandedCategories: W, visibleDomOptions: Q, updateVisibleDomOptions: ne, toggleCategoryVisibility: ke, focusItem: ie, moveToNextElement: ce, moveToPreviousElement: re, moveToFirstElement: ue, moveToLastElement: de, preventDefault: ee, focusedIndex: Re, setListboxFocusedIndex: be, listboxListeners: De, chipsSectionListeners: Be, computedItemsIndex: Me, DecorativeCheckbox: oe, BentoTypography: j, BentoChip: We, BentoListboxOption: Z, ListboxMultiSelectOptions: Ft, vBentoKeyboardNavigationDirective: se, BentoListboxEvent: c };
1141
+ return { __sfc: !0, props: t, emit: s, t: o, n: a, slots: c, attrs: f, ariaAttributes: L, listboxRef: m, selectAllListboxItemsRef: d, selectedListboxItemsRef: A, listboxItemsRef: k, selectedItemsList: v, isMultiLevelSelect: p, flattenedItemsList: R, isTreePattern: M, computedRole: G, computedOptionRole: h, optionStates: x, enabledItems: E, visibleSelectedList: C, calculateTotalItems: O, selectAllCheckboxText: D, selectAll: r, unselectAll: _, selectAllItems: I, unselectAllItems: B, isAllSelected: z, isIndeterminate: J, toggleSelectAll: Z, ariaCheckedComputed: te, isSelectAllOn: U, handleSelectAll: w, selectAllCategory: X, unselectAllCategory: Te, toggleCheckboxSelection: Ie, selectedOptions: Ae, showSelectedItems: Le, showSelectAllCheckbox: re, expandedCategories: W, visibleDomOptions: le, updateVisibleDomOptions: ue, toggleCategoryVisibility: ke, focusItem: de, moveToNextElement: be, moveToPreviousElement: fe, moveToFirstElement: me, moveToLastElement: ve, preventDefault: se, focusedIndex: De, setListboxFocusedIndex: ge, listboxListeners: Re, chipsSectionListeners: Be, computedItemsIndex: we, DecorativeCheckbox: ce, BentoTypography: q, BentoChip: We, BentoListboxOption: ee, ListboxMultiSelectOptions: Ft, vBentoKeyboardNavigationDirective: ne, BentoListboxEvent: u };
1083
1142
  }
1084
1143
  });
1085
1144
  var Wt = function() {
1086
- var e = this, l = e._self._c, t = e._self._setupProxy;
1087
- return l("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.showSelectedItems ? l("div", [l("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(o) {
1088
- return l("li", { key: o.value }, [l(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(a) {
1145
+ var e = this, s = e._self._c, t = e._self._setupProxy;
1146
+ return s("div", { ref: "listboxRef", staticClass: "b-listbox-multi-select" }, [t.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" }, t.chipsSectionListeners), e._l(t.selectedOptions, function(o) {
1147
+ return s("li", { key: o.value }, [s(t.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(a) {
1089
1148
  o.items ? t.unselectAllCategory(o) : t.toggleCheckboxSelection("select", o);
1090
1149
  } } })], 1);
1091
- }), 0), l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), l("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? l(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(o) {
1150
+ }), 0), s("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } })]) : e._e(), s("div", e._g(e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], attrs: { role: t.computedRole } }, "div", t.ariaAttributes, !1), t.listboxListeners), [t.showSelectAllCheckbox ? s(t.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option", attrs: { tabindex: t.focusedIndex === 0 ? 0 : -1, "aria-selected": t.ariaCheckedComputed !== "false", "aria-checked": t.ariaCheckedComputed, role: t.computedOptionRole }, on: { click: t.handleSelectAll, "enter-pressed": t.handleSelectAll, "space-pressed": function(o) {
1092
1151
  return o.preventDefault(), t.handleSelectAll.apply(null, arguments);
1093
- } } }, [l(t.DecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), l(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? l("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), l(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(o) {
1152
+ } } }, [s(t.DecorativeCheckbox, { attrs: { checked: t.isAllSelected, indeterminate: t.isIndeterminate } }), s(t.BentoTypography, { attrs: { el: "span" } }, [e._v(" " + e._s(t.selectAllCheckboxText) + " ")])], 1) : e._e(), t.showSelectAllCheckbox ? s("hr", { staticClass: "b-listbox-multi-select__divider", attrs: { "aria-hidden": "true" } }) : e._e(), s(t.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": t.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": t.selectedItemsList, "focused-index": t.focusedIndex, "items-index": t.computedItemsIndex, role: t.computedOptionRole }, on: { "toggle-checkbox-selection": function(o) {
1094
1153
  return t.toggleCheckboxSelection("select", o);
1095
1154
  }, "select-category": t.selectAllCategory, "unselect-category": t.unselectAllCategory, "toggle-category-visibility": t.toggleCategoryVisibility, "space-pressed": function(o) {
1096
1155
  return t.toggleCheckboxSelection(t.BentoListboxEvent.SPACE, o);
@@ -1099,8 +1158,8 @@ var Wt = function() {
1099
1158
  }, "enter-pressed": function(o) {
1100
1159
  return t.toggleCheckboxSelection(t.BentoListboxEvent.ENTER, o);
1101
1160
  } }, scopedSlots: e._u([e._l(t.slots, function(o, a) {
1102
- return { key: a, fn: function(r) {
1103
- return [e._t(a, null, null, r)];
1161
+ return { key: a, fn: function(c) {
1162
+ return [e._t(a, null, null, c)];
1104
1163
  } };
1105
1164
  })], null, !0) })], 1)]);
1106
1165
  }, Kt = [], jt = /* @__PURE__ */ N(
@@ -1111,12 +1170,12 @@ var Wt = function() {
1111
1170
  null,
1112
1171
  "b81d7402"
1113
1172
  );
1114
- const _e = jt.exports, qt = (s, e = 300) => {
1115
- let l;
1173
+ const Se = jt.exports, qt = (l, e = 300) => {
1174
+ let s;
1116
1175
  return (...o) => {
1117
- l && clearTimeout(l), l = setTimeout(() => s(...o), e);
1176
+ s && clearTimeout(s), s = setTimeout(() => l(...o), e);
1118
1177
  };
1119
- }, Ht = {
1178
+ }, Xt = {
1120
1179
  "de-DE": {
1121
1180
  loading: "Laden",
1122
1181
  showMore: "Mehr anzeigen"
@@ -1157,18 +1216,18 @@ const _e = jt.exports, qt = (s, e = 300) => {
1157
1216
  loading: "正在加载",
1158
1217
  showMore: "显示更多"
1159
1218
  }
1160
- }, Xt = 36, Jt = G({
1219
+ }, Ht = 36, Jt = F({
1161
1220
  name: "bento-listbox",
1162
1221
  components: {
1163
1222
  BentoEmptyState: Ye,
1164
1223
  BentoListboxSingleSelect: yt,
1165
- BentoListboxMultiSelect: _e,
1166
- BentoTypography: j,
1224
+ BentoListboxMultiSelect: Se,
1225
+ BentoTypography: q,
1167
1226
  BentoLoadingIndicator: Fe,
1168
1227
  BentoLoadingButton: qe
1169
1228
  },
1170
- directives: { BentoKeyboardNavigationDirective: se },
1171
- i18n: { messages: Ht },
1229
+ directives: { BentoKeyboardNavigationDirective: ne },
1230
+ i18n: { messages: Xt },
1172
1231
  props: {
1173
1232
  /**
1174
1233
  * Defines a string value that labels an interactive element.
@@ -1225,7 +1284,7 @@ const _e = jt.exports, qt = (s, e = 300) => {
1225
1284
  lazyLoadType: {
1226
1285
  type: String,
1227
1286
  default: K.NONE,
1228
- validator: (s) => Object.values(K).includes(s)
1287
+ validator: (l) => Object.values(K).includes(l)
1229
1288
  },
1230
1289
  /**
1231
1290
  * Indicates the listbox is loading filtered items.
@@ -1249,7 +1308,7 @@ const _e = jt.exports, qt = (s, e = 300) => {
1249
1308
  *
1250
1309
  * If enabled, hides the "Select all" checkbox in "multiple" mode.
1251
1310
  */
1252
- searching: _e.props.searching,
1311
+ searching: Se.props.searching,
1253
1312
  /**
1254
1313
  * The `input` value.
1255
1314
  * Providing an empty string or empty array will select no options.
@@ -1269,167 +1328,173 @@ const _e = jt.exports, qt = (s, e = 300) => {
1269
1328
  }
1270
1329
  },
1271
1330
  emits: [
1272
- c.SELECT,
1273
- c.SPACE,
1274
- c.SHOW_MORE,
1275
- c.ENTER,
1276
- c.ESCAPE,
1277
- c.TAB
1331
+ u.SELECT,
1332
+ u.SPACE,
1333
+ u.SHOW_MORE,
1334
+ u.ENTER,
1335
+ u.ESCAPE,
1336
+ u.TAB
1278
1337
  ],
1279
- setup(s, { emit: e, slots: l }) {
1280
- const t = x([]), o = H(s, "items"), { t: a } = le(), r = n(() => s.lazyLoadType !== K.AUTOMATIC), m = n(() => s.lazyLoadType === K.AUTOMATIC), A = () => {
1281
- var k;
1282
- return typeof (s == null ? void 0 : s.virtualScroll) == "object" && ((k = s == null ? void 0 : s.virtualScroll) != null && k.itemHeight) ? s.virtualScroll.itemHeight : Xt;
1283
- }, {
1338
+ setup(l, { emit: e, slots: s }) {
1339
+ const t = T([]), o = j(l, "items"), { t: a } = ie(), c = n(() => l.lazyLoadType !== K.AUTOMATIC), f = n(() => l.lazyLoadType === K.AUTOMATIC), L = () => {
1340
+ var w;
1341
+ return typeof (l == null ? void 0 : l.virtualScroll) == "object" && ((w = l == null ? void 0 : l.virtualScroll) != null && w.itemHeight) ? l.virtualScroll.itemHeight : Ht;
1342
+ }, m = !(l != null && l.multiple) && (l == null ? void 0 : l.virtualScroll) !== !1 && (l == null ? void 0 : l.lazyLoadType) === "none", {
1284
1343
  containerRef: d,
1285
- containerProps: b,
1286
- onScroll: T,
1287
- list: _,
1288
- wrapperProps: p
1289
- } = He(o, {
1290
- itemHeight: A(),
1344
+ containerProps: A,
1345
+ onScroll: k,
1346
+ list: v,
1347
+ wrapperProps: p,
1348
+ scrollToIndex: R,
1349
+ startIndex: M
1350
+ } = Xe(o, {
1351
+ itemHeight: L(),
1291
1352
  // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1292
- disabled: (s == null ? void 0 : s.multiple) || (s == null ? void 0 : s.virtualScroll) === !1 || (s == null ? void 0 : s.lazyLoadType) !== "none"
1293
- }), C = n(
1294
- () => s.componentLoading !== void 0 || r.value ? "true" : void 0
1295
- ), R = n(
1296
- () => r.value && s.loading || s.componentLoading ? "true" : "false"
1297
- ), B = n(
1298
- () => r.value || s.componentLoading !== void 0 ? "polite" : void 0
1299
- ), I = n(
1353
+ disabled: !m
1354
+ }), G = n(() => m ? o.value.length : 0), h = n(
1355
+ () => l.componentLoading !== void 0 || c.value ? "true" : void 0
1356
+ ), x = n(
1357
+ () => c.value && l.loading || l.componentLoading ? "true" : "false"
1358
+ ), E = n(
1359
+ () => c.value || l.componentLoading !== void 0 ? "polite" : void 0
1360
+ ), C = n(
1300
1361
  () => ({
1301
- "aria-label": s.ariaLabel,
1302
- "aria-busy": R.value,
1303
- "aria-atomic": C.value,
1304
- "aria-live": B.value
1362
+ "aria-label": l.ariaLabel,
1363
+ "aria-busy": x.value,
1364
+ "aria-atomic": h.value,
1365
+ "aria-live": E.value
1305
1366
  })
1306
1367
  ), O = n(
1307
- () => s.componentLoading ? {
1308
- ...I.value,
1368
+ () => l.componentLoading ? {
1369
+ ...C.value,
1309
1370
  role: "alert"
1310
1371
  } : {}
1311
- ), S = (k) => (V) => {
1312
- e(k, V);
1313
- }, v = () => {
1314
- e(c.SHOW_MORE);
1315
- }, y = qt(() => {
1316
- const k = d.value;
1317
- if (!k)
1372
+ ), D = (w) => (X) => {
1373
+ e(w, X);
1374
+ }, r = () => {
1375
+ e(u.SHOW_MORE);
1376
+ }, _ = qt(() => {
1377
+ const w = d.value;
1378
+ if (!w)
1318
1379
  return;
1319
- const V = Math.round(k.scrollTop) + k.clientHeight >= k.scrollHeight;
1320
- s.hasMoreItems && V && !s.loading && v();
1321
- }), D = () => {
1322
- m.value ? y() : T();
1323
- }, P = n(() => {
1324
- var k;
1325
- return ((k = s.items) == null ? void 0 : k.length) === 0;
1326
- }), E = n(
1327
- () => s.lazyLoadType === K.BUTTON && s.hasMoreItems
1328
- ), L = n(
1329
- () => s.loading ? fe.LOADING : fe.START
1330
- ), $ = n(() => s.loading ? a("loading") : a("showMore")), Y = n(() => ({
1331
- ...s.emptyState,
1380
+ const X = Math.round(w.scrollTop) + w.clientHeight >= w.scrollHeight;
1381
+ l.hasMoreItems && X && !l.loading && r();
1382
+ }), I = () => {
1383
+ f.value ? _() : k();
1384
+ }, B = n(() => {
1385
+ var w;
1386
+ return ((w = l.items) == null ? void 0 : w.length) === 0;
1387
+ }), z = n(
1388
+ () => l.lazyLoadType === K.BUTTON && l.hasMoreItems
1389
+ ), J = n(
1390
+ () => l.loading ? pe.LOADING : pe.START
1391
+ ), Z = n(() => l.loading ? a("loading") : a("showMore")), te = n(() => ({
1392
+ ...l.emptyState,
1332
1393
  variant: "condensed"
1333
- })), z = {
1334
- [c.SELECT]: S(c.SELECT),
1335
- [c.SPACE]: S(c.SPACE),
1336
- [c.TAB]: S(c.TAB),
1337
- [c.ENTER]: S(c.ENTER)
1394
+ })), U = {
1395
+ [u.SELECT]: D(u.SELECT),
1396
+ [u.SPACE]: D(u.SPACE),
1397
+ [u.TAB]: D(u.TAB),
1398
+ [u.ENTER]: D(u.ENTER)
1338
1399
  };
1339
1400
  return {
1340
1401
  // Refs
1341
1402
  listboxRef: d,
1342
1403
  listboxItemRef: t,
1343
1404
  // a11y
1344
- ariaAttributes: I,
1405
+ ariaAttributes: C,
1345
1406
  listboxContainerAttributes: O,
1346
1407
  // Values
1347
- containerProps: b,
1348
- isSearchResultEmpty: P,
1349
- limitedEmptyStateProps: Y,
1350
- loadingButtonState: L,
1351
- slots: l,
1352
- shouldDisplayShowMoreButton: E,
1353
- showMoreButtonText: $,
1354
- virtualisedItems: _,
1408
+ containerProps: A,
1409
+ isSearchResultEmpty: B,
1410
+ limitedEmptyStateProps: te,
1411
+ loadingButtonState: J,
1412
+ slots: s,
1413
+ shouldDisplayShowMoreButton: z,
1414
+ showMoreButtonText: Z,
1415
+ virtualisedItems: v,
1355
1416
  wrapperProps: p,
1417
+ // Virtual scroll
1418
+ totalItemCount: G,
1419
+ scrollToIndex: R,
1420
+ virtualScrollStartIndex: M,
1356
1421
  // Enums
1357
- BentoKeyboardNavigationKeyDownEvent: M,
1358
- BentoListboxEvent: c,
1422
+ BentoKeyboardNavigationKeyDownEvent: $,
1423
+ BentoListboxEvent: u,
1359
1424
  // Methods
1360
- onListboxContainerScroll: D,
1361
- onOptionSelected: S,
1362
- emitShowMore: v,
1363
- listboxListeners: z
1425
+ onListboxContainerScroll: I,
1426
+ onOptionSelected: D,
1427
+ emitShowMore: r,
1428
+ listboxListeners: U
1364
1429
  };
1365
1430
  }
1366
1431
  });
1367
1432
  var Zt = function() {
1368
1433
  var t;
1369
- var e = this, l = e._self._c;
1370
- return e._self._setupProxy, l("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [l("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? l("div", { staticClass: "b-listbox__loading-filtered-items" }, [l("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? l("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? l("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : l("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [l("bento-listbox-multi-select", e._g(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
1371
- return { key: a, fn: function(r) {
1372
- return [e._t(a, null, null, r)];
1434
+ var e = this, s = e._self._c;
1435
+ return e._self._setupProxy, s("div", e._b({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (t = e.containerProps) == null ? void 0 : t.style, attrs: { id: e.id, tabindex: "-1", "data-testid": "listbox-container" }, on: { scroll: e.onListboxContainerScroll } }, "div", e.listboxContainerAttributes, !1), [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(e._b({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
1436
+ return { key: a, fn: function(c) {
1437
+ return [e._t(a, null, null, c)];
1373
1438
  } };
1374
- })], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [l("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
1375
- return { key: a, fn: function(r) {
1376
- return [e._t(a, null, null, r)];
1439
+ })], null, !0) }, "bento-listbox-multi-select", e.ariaAttributes, !1), e.listboxListeners))] : [s("bento-listbox-single-select", e._g(e._b({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "total-item-count": e.totalItemCount, "scroll-to-index": e.scrollToIndex, "virtual-scroll-start-index": e.virtualScrollStartIndex, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, a) {
1440
+ return { key: a, fn: function(c) {
1441
+ return [e._t(a, null, null, c)];
1377
1442
  } };
1378
- })], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), e.listboxListeners))], e.shouldDisplayShowMoreButton ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
1443
+ })], null, !0) }, "bento-listbox-single-select", e.ariaAttributes, !1), 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) {
1379
1444
  return e.emitShowMore.apply(null, arguments);
1380
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? l("div", { staticClass: "b-listbox__lazy-load" }, [l("bento-loading-indicator")], 1) : e._e()]], 2)]);
1381
- }, Qt = [], es = /* @__PURE__ */ N(
1445
+ } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-indicator")], 1) : e._e()]], 2)]);
1446
+ }, Qt = [], el = /* @__PURE__ */ N(
1382
1447
  Jt,
1383
1448
  Zt,
1384
1449
  Qt,
1385
1450
  !1,
1386
1451
  null,
1387
- "35cb3605"
1452
+ "7819d7a2"
1388
1453
  );
1389
- const ys = es.exports, te = (s, e) => {
1390
- for (const l of s) {
1391
- if (l.value === e)
1392
- return l;
1393
- if (l.items) {
1394
- const t = te(l.items, e);
1454
+ const yl = el.exports, oe = (l, e) => {
1455
+ for (const s of l) {
1456
+ if (s.value === e)
1457
+ return s;
1458
+ if (s.items) {
1459
+ const t = oe(s.items, e);
1395
1460
  if (t)
1396
1461
  return t;
1397
1462
  }
1398
1463
  }
1399
1464
  return null;
1400
- }, ts = (s) => typeof s == "object" && s !== null && "value" in s && "label" in s, hs = (s, e, l, t) => {
1401
- const o = x([]), a = x(), r = (b) => {
1402
- l.value ? a.value = b.map(({ value: T }) => T) : a.value = b.length > 0 ? b[0].value : null;
1403
- }, m = (b) => {
1404
- l.value ? a.value = b.map(({ value: T, label: _ }) => ({ value: T, label: _ })) : a.value = b.length > 0 ? { value: b[0].value, label: b[0].label } : null;
1405
- }, A = (b) => {
1406
- o.value = b, t != null && t.value ? m(b) : r(b);
1407
- }, d = () => {
1465
+ }, tl = (l) => typeof l == "object" && l !== null && "value" in l && "label" in l, hl = (l, e, s, t) => {
1466
+ const o = T([]), a = T(), c = (d) => {
1467
+ s.value ? a.value = d.map(({ value: A }) => A) : a.value = d.length > 0 ? d[0].value : null;
1468
+ }, f = (d) => {
1469
+ s.value ? a.value = d.map(({ value: A, label: k }) => ({ value: A, label: k })) : a.value = d.length > 0 ? { value: d[0].value, label: d[0].label } : null;
1470
+ }, L = (d) => {
1471
+ o.value = d, t != null && t.value ? f(d) : c(d);
1472
+ }, m = () => {
1408
1473
  o.value = [], a.value = null;
1409
1474
  };
1410
- return X(
1475
+ return H(
1411
1476
  () => e.value,
1412
1477
  () => {
1413
1478
  if (!e.value && e.value !== 0) {
1414
- d();
1479
+ m();
1415
1480
  return;
1416
1481
  }
1417
- const b = !Array.isArray(e.value), T = [...o.value];
1418
- d();
1419
- const _ = (p) => {
1420
- if (ts(p))
1421
- o.value.push(p);
1482
+ const d = !Array.isArray(e.value), A = [...o.value];
1483
+ m();
1484
+ const k = (v) => {
1485
+ if (tl(v))
1486
+ o.value.push(v);
1422
1487
  else {
1423
- let C = te(s.value, p);
1424
- C || (C = te(T, p)), C || (C = { value: p, label: p.toString() }), o.value.push(C);
1488
+ let p = oe(l.value, v);
1489
+ p || (p = oe(A, v)), p || (p = { value: v, label: v.toString() }), o.value.push(p);
1425
1490
  }
1426
1491
  };
1427
- if (b) {
1428
- const p = e.value;
1429
- _(p), t != null && t.value ? m(o.value) : r(o.value);
1492
+ if (d) {
1493
+ const v = e.value;
1494
+ k(v), t != null && t.value ? f(o.value) : c(o.value);
1430
1495
  return;
1431
1496
  }
1432
- e.value.forEach(_), t != null && t.value ? m(o.value) : r(o.value);
1497
+ e.value.forEach(k), t != null && t.value ? f(o.value) : c(o.value);
1433
1498
  },
1434
1499
  { immediate: !0 }
1435
1500
  ), {
@@ -1437,19 +1502,19 @@ const ys = es.exports, te = (s, e) => {
1437
1502
  cachedSelectedListboxOptions: o,
1438
1503
  cachedListboxSelectedValues: a,
1439
1504
  // Methods
1440
- resetCache: d,
1441
- setCachedValues: A
1505
+ resetCache: m,
1506
+ setCachedValues: L
1442
1507
  };
1443
1508
  };
1444
1509
  export {
1445
- c as B,
1510
+ u as B,
1446
1511
  rt as C,
1447
- oe as D,
1512
+ ce as D,
1448
1513
  K as a,
1449
- ys as b,
1514
+ yl as b,
1450
1515
  Yt as c,
1451
1516
  qt as d,
1452
- Se as e,
1453
- hs as u
1517
+ Oe as e,
1518
+ hl as u
1454
1519
  };
1455
- //# sourceMappingURL=use-cached-selected-values.BJbWbkEQ.js.map
1520
+ //# sourceMappingURL=use-cached-selected-values.Du8-wWR2.js.map