@adyen/bento-vue3 1.50.0 → 1.52.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 (343) hide show
  1. package/dist/@types/index.d.ts +513 -608
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.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/alert.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions-with-menu.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/checkbox-input.css +1 -1
  13. package/dist/assets/checkbox.css +1 -1
  14. package/dist/assets/copy.css +1 -1
  15. package/dist/assets/data-grid.css +1 -1
  16. package/dist/assets/date-picker.css +1 -1
  17. package/dist/assets/date-range-picker.css +1 -1
  18. package/dist/assets/dialog-page.css +1 -1
  19. package/dist/assets/dropdown.css +1 -1
  20. package/dist/assets/file-uploader.css +1 -1
  21. package/dist/assets/filter-bar.css +1 -1
  22. package/dist/assets/form-layout-title.css +1 -1
  23. package/dist/assets/input-field-password.css +1 -1
  24. package/dist/assets/input-field-phone-number.css +1 -1
  25. package/dist/assets/input-field.css +1 -1
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/link.css +1 -1
  28. package/dist/assets/menu.css +1 -1
  29. package/dist/assets/modal-fullscreen.css +1 -1
  30. package/dist/assets/pagination.css +1 -1
  31. package/dist/assets/payment-method.css +1 -1
  32. package/dist/assets/popover.css +1 -1
  33. package/dist/assets/search-bar.css +1 -1
  34. package/dist/assets/sidepanel.css +1 -1
  35. package/dist/assets/timeline-item.css +1 -1
  36. package/dist/assets/tutorial.css +1 -1
  37. package/dist/assets/use-cached-selected-values.css +1 -1
  38. package/dist/button.js +3 -3
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +3 -3
  41. package/dist/chip.js +1 -1
  42. package/dist/chunks/{accordion-item.Cf184uiI.js → accordion-item.DLyCF015.js} +2 -2
  43. package/dist/chunks/{accordion-item.Cf184uiI.js.map → accordion-item.DLyCF015.js.map} +1 -1
  44. package/dist/chunks/{action-bar.DkGjsKiy.js → action-bar.eo5EXYmg.js} +7 -7
  45. package/dist/chunks/{action-bar.DkGjsKiy.js.map → action-bar.eo5EXYmg.js.map} +1 -1
  46. package/dist/chunks/{alert.DGewBB2a.js → alert.DEf0borp.js} +45 -44
  47. package/dist/chunks/alert.DEf0borp.js.map +1 -0
  48. package/dist/chunks/{base-modal.gW2mkOwf.js → base-modal.BlC6TZNz.js} +6 -6
  49. package/dist/chunks/{base-modal.gW2mkOwf.js.map → base-modal.BlC6TZNz.js.map} +1 -1
  50. package/dist/chunks/button-actions-with-menu.DQaq1bkf.js +174 -0
  51. package/dist/chunks/button-actions-with-menu.DQaq1bkf.js.map +1 -0
  52. package/dist/chunks/{button-actions.BZEKcCbe.js → button-actions.BvGAE7sw.js} +4 -4
  53. package/dist/chunks/{button-actions.BZEKcCbe.js.map → button-actions.BvGAE7sw.js.map} +1 -1
  54. package/dist/chunks/{button.BXVKUuum.js → button.6HMG0xEY.js} +2 -2
  55. package/dist/chunks/{button.BXVKUuum.js.map → button.6HMG0xEY.js.map} +1 -1
  56. package/dist/chunks/calendar.D2X834TU.js +1252 -0
  57. package/dist/chunks/calendar.D2X834TU.js.map +1 -0
  58. package/dist/chunks/{card.Ec-SR2qG.js → card.IrL_Fw-f.js} +3 -3
  59. package/dist/chunks/{card.Ec-SR2qG.js.map → card.IrL_Fw-f.js.map} +1 -1
  60. package/dist/chunks/{checkbox-group.KeIRO8lx.js → checkbox-group.BVJfN48k.js} +4 -4
  61. package/dist/chunks/{checkbox-group.KeIRO8lx.js.map → checkbox-group.BVJfN48k.js.map} +1 -1
  62. package/dist/chunks/{checkbox-input.CAYgiRHG.js → checkbox-input.CgbJsFXD.js} +62 -55
  63. package/dist/chunks/checkbox-input.CgbJsFXD.js.map +1 -0
  64. package/dist/chunks/{checkbox.BllRk82F.js → checkbox.erdZ58Kk.js} +72 -64
  65. package/dist/chunks/checkbox.erdZ58Kk.js.map +1 -0
  66. package/dist/chunks/{checkmark-circle-fill.g_tcBhFJ.js → checkmark-circle-fill.jicbqe7k.js} +13 -13
  67. package/dist/chunks/checkmark-circle-fill.jicbqe7k.js.map +1 -0
  68. package/dist/chunks/{checkmark-small.BDqUF-Ni.js → checkmark-small.D7l69yBf.js} +4 -4
  69. package/dist/chunks/checkmark-small.D7l69yBf.js.map +1 -0
  70. package/dist/chunks/{chevron-left.CYEK2UTr.js → chevron-left.BF63HtOH.js} +6 -6
  71. package/dist/chunks/chevron-left.BF63HtOH.js.map +1 -0
  72. package/dist/chunks/{chevron-up.Cu9qXgBY.js → chevron-up.-0oLlHmh.js} +6 -6
  73. package/dist/chunks/chevron-up.-0oLlHmh.js.map +1 -0
  74. package/dist/chunks/chip.3T0x6FuI.js +74 -0
  75. package/dist/chunks/chip.3T0x6FuI.js.map +1 -0
  76. package/dist/chunks/{code-snippet.DfTfz3vU.js → code-snippet.Bb4_r0C8.js} +7 -7
  77. package/dist/chunks/{code-snippet.DfTfz3vU.js.map → code-snippet.Bb4_r0C8.js.map} +1 -1
  78. package/dist/chunks/{controls-group.BnbQO34k.js → controls-group.BaDhGB9H.js} +2 -2
  79. package/dist/chunks/{controls-group.BnbQO34k.js.map → controls-group.BaDhGB9H.js.map} +1 -1
  80. package/dist/chunks/{copy.DAu8GrR9.js → copy.gmSTAqHY.js} +10 -9
  81. package/dist/chunks/copy.gmSTAqHY.js.map +1 -0
  82. package/dist/chunks/{cross-circle-fill-small.CJyARMSZ.js → cross-circle-fill-small.mY6ihJcA.js} +4 -4
  83. package/dist/chunks/cross-circle-fill-small.mY6ihJcA.js.map +1 -0
  84. package/dist/chunks/cross-circle-fill.B7YpDLTK.js +44 -0
  85. package/dist/chunks/cross-circle-fill.B7YpDLTK.js.map +1 -0
  86. package/dist/chunks/{cross-small.Z5EKYRm0.js → cross-small.CFrBIeYK.js} +4 -4
  87. package/dist/chunks/cross-small.CFrBIeYK.js.map +1 -0
  88. package/dist/chunks/{cross.BZYw4R3N.js → cross.CbLEjiVy.js} +4 -4
  89. package/dist/chunks/cross.CbLEjiVy.js.map +1 -0
  90. package/dist/chunks/{dashboard-section.pyg05_v_.js → dashboard-section.MAHmbUDG.js} +4 -4
  91. package/dist/chunks/{dashboard-section.pyg05_v_.js.map → dashboard-section.MAHmbUDG.js.map} +1 -1
  92. package/dist/chunks/{dashed-underline.DTZGLrPu.js → dashed-underline.DY8xR9GH.js} +3 -3
  93. package/dist/chunks/{dashed-underline.DTZGLrPu.js.map → dashed-underline.DY8xR9GH.js.map} +1 -1
  94. package/dist/chunks/{data-grid-template.sUNqCvbt.js → data-grid-template.Dievz913.js} +3 -3
  95. package/dist/chunks/{data-grid-template.sUNqCvbt.js.map → data-grid-template.Dievz913.js.map} +1 -1
  96. package/dist/chunks/{data-grid.BNXoMZf9.js → data-grid.KZqjmRvk.js} +956 -976
  97. package/dist/chunks/data-grid.KZqjmRvk.js.map +1 -0
  98. package/dist/chunks/{date-picker.DgpHNnu_.js → date-picker.BWJYkSmo.js} +123 -100
  99. package/dist/chunks/date-picker.BWJYkSmo.js.map +1 -0
  100. package/dist/chunks/date-range-picker.1Vbf9Zk8.js +1107 -0
  101. package/dist/chunks/date-range-picker.1Vbf9Zk8.js.map +1 -0
  102. package/dist/chunks/{date.Cvfyq77s.js → date.DoJuTLhO.js} +17 -17
  103. package/dist/chunks/{date.Cvfyq77s.js.map → date.DoJuTLhO.js.map} +1 -1
  104. package/dist/chunks/{dialog-page.DK2UKGH8.js → dialog-page.CXQafL9G.js} +5 -4
  105. package/dist/chunks/dialog-page.CXQafL9G.js.map +1 -0
  106. package/dist/chunks/{dot.cpdFEk6G.js → dot.BW-xtyjC.js} +4 -4
  107. package/dist/chunks/dot.BW-xtyjC.js.map +1 -0
  108. package/dist/chunks/{dropdown-default-textbox.BpvVMlcX.js → dropdown-default-textbox.CwsgzDpx.js} +4 -4
  109. package/dist/chunks/{dropdown-default-textbox.BpvVMlcX.js.map → dropdown-default-textbox.CwsgzDpx.js.map} +1 -1
  110. package/dist/chunks/{dropdown-tag.DqfoOcUU.js → dropdown-tag.C9nM0YHC.js} +4 -4
  111. package/dist/chunks/{dropdown-tag.DqfoOcUU.js.map → dropdown-tag.C9nM0YHC.js.map} +1 -1
  112. package/dist/chunks/{dropdown.a8OeeVAZ.js → dropdown.qw5oXFYs.js} +268 -259
  113. package/dist/chunks/dropdown.qw5oXFYs.js.map +1 -0
  114. package/dist/chunks/{empty-state.DkYtiTHG.js → empty-state.BffIZp3a.js} +2 -2
  115. package/dist/chunks/{empty-state.DkYtiTHG.js.map → empty-state.BffIZp3a.js.map} +1 -1
  116. package/dist/chunks/{error-message.B3z5WkLF.js → error-message.DAjisbU1.js} +3 -3
  117. package/dist/chunks/{error-message.B3z5WkLF.js.map → error-message.DAjisbU1.js.map} +1 -1
  118. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  119. package/dist/chunks/{expand.CJ162RaJ.js → expand.DusW7F7p.js} +4 -4
  120. package/dist/chunks/expand.DusW7F7p.js.map +1 -0
  121. package/dist/chunks/{file-uploader.DV4I5Lvf.js → file-uploader.BLJpDgAZ.js} +57 -56
  122. package/dist/chunks/file-uploader.BLJpDgAZ.js.map +1 -0
  123. package/dist/chunks/filter-bar.DYrXBQDF.js +2754 -0
  124. package/dist/chunks/filter-bar.DYrXBQDF.js.map +1 -0
  125. package/dist/chunks/{fixed-scroller.B4Eag_Sd.js → fixed-scroller.Bfk75Nei.js} +3 -3
  126. package/dist/chunks/{fixed-scroller.B4Eag_Sd.js.map → fixed-scroller.Bfk75Nei.js.map} +1 -1
  127. package/dist/chunks/{focus-trap.DPJj05sV.js → focus-trap.DMgm-9f7.js} +2 -2
  128. package/dist/chunks/{focus-trap.DPJj05sV.js.map → focus-trap.DMgm-9f7.js.map} +1 -1
  129. package/dist/chunks/{footer-actions.WvWwFKM8.js → footer-actions.DK3pMfDY.js} +3 -3
  130. package/dist/chunks/{footer-actions.WvWwFKM8.js.map → footer-actions.DK3pMfDY.js.map} +1 -1
  131. package/dist/chunks/{form-layout-title.BHL_MDqT.js → form-layout-title.BWCOZyay.js} +62 -60
  132. package/dist/chunks/form-layout-title.BWCOZyay.js.map +1 -0
  133. package/dist/chunks/header.BASKzNwu.js +234 -0
  134. package/dist/chunks/header.BASKzNwu.js.map +1 -0
  135. package/dist/chunks/index.BDuTpjD8.js +40 -0
  136. package/dist/chunks/index.BDuTpjD8.js.map +1 -0
  137. package/dist/chunks/index.BxBB1rsx.js +15 -0
  138. package/dist/chunks/index.BxBB1rsx.js.map +1 -0
  139. package/dist/chunks/{index.BS3BeXQJ.js → index.CMGT-6mh.js} +2 -1
  140. package/dist/chunks/{index.BS3BeXQJ.js.map → index.CMGT-6mh.js.map} +1 -1
  141. package/dist/chunks/index.DD7TppDb.js +10 -0
  142. package/dist/chunks/index.DD7TppDb.js.map +1 -0
  143. package/dist/chunks/{info-icon-with-popover.BM0esxKN.js → info-icon-with-popover.BJccyOFx.js} +3 -3
  144. package/dist/chunks/{info-icon-with-popover.BM0esxKN.js.map → info-icon-with-popover.BJccyOFx.js.map} +1 -1
  145. package/dist/chunks/{info-icon.DQn8-VSp.js → info-icon.L8AexnZg.js} +3 -3
  146. package/dist/chunks/{info-icon.DQn8-VSp.js.map → info-icon.L8AexnZg.js.map} +1 -1
  147. package/dist/chunks/{info.DYNe2WnZ.js → info.HK3R7Drc.js} +11 -11
  148. package/dist/chunks/info.HK3R7Drc.js.map +1 -0
  149. package/dist/chunks/{input-field-password.Bo7FiAOq.js → input-field-password.CZNUHo6s.js} +93 -90
  150. package/dist/chunks/input-field-password.CZNUHo6s.js.map +1 -0
  151. package/dist/chunks/{input-field-phone-number.DO2uU2XW.js → input-field-phone-number.D1zlBh3R.js} +348 -345
  152. package/dist/chunks/{input-field-phone-number.DO2uU2XW.js.map → input-field-phone-number.D1zlBh3R.js.map} +1 -1
  153. package/dist/chunks/input-field.DqMdqM2u.js +298 -0
  154. package/dist/chunks/input-field.DqMdqM2u.js.map +1 -0
  155. package/dist/chunks/{inspector.types.Io6ONte7.js → inspector.types.Dwt3V80X.js} +6 -6
  156. package/dist/chunks/{inspector.types.Io6ONte7.js.map → inspector.types.Dwt3V80X.js.map} +1 -1
  157. package/dist/chunks/{layout-row.BAz7JrXo.js → layout-row.Drm_y8e3.js} +2 -2
  158. package/dist/chunks/{layout-row.BAz7JrXo.js.map → layout-row.Drm_y8e3.js.map} +1 -1
  159. package/dist/chunks/{link.CyGCtpse.js → link.D3Fq5tt_.js} +15 -13
  160. package/dist/chunks/link.D3Fq5tt_.js.map +1 -0
  161. package/dist/chunks/{listbox-option-tag.DIk4F59J.js → listbox-option-tag.YSvtcy4P.js} +2 -2
  162. package/dist/chunks/{listbox-option-tag.DIk4F59J.js.map → listbox-option-tag.YSvtcy4P.js.map} +1 -1
  163. package/dist/chunks/menu.DfzP2nRU.js +735 -0
  164. package/dist/chunks/menu.DfzP2nRU.js.map +1 -0
  165. package/dist/chunks/{modal-fullscreen.D1gvJFag.js → modal-fullscreen.T1x_vroe.js} +6 -6
  166. package/dist/chunks/{modal-fullscreen.D1gvJFag.js.map → modal-fullscreen.T1x_vroe.js.map} +1 -1
  167. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.91_wyIIq.js → modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js} +5 -5
  168. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.91_wyIIq.js.map → modal.vue_vue_type_script_setup_true_lang.BAuxqA66.js.map} +1 -1
  169. package/dist/chunks/{pagination.CGS6fGUm.js → pagination.Bt8DNme-.js} +37 -36
  170. package/dist/chunks/pagination.Bt8DNme-.js.map +1 -0
  171. package/dist/chunks/payment-method.CLUppDo_.js +125 -0
  172. package/dist/chunks/payment-method.CLUppDo_.js.map +1 -0
  173. package/dist/chunks/{popover.BNOfWuSb.js → popover.COzLcAET.js} +27 -20
  174. package/dist/chunks/{popover.BNOfWuSb.js.map → popover.COzLcAET.js.map} +1 -1
  175. package/dist/chunks/{popper-container.BvGYgqiE.js → popper-container.CEtaux25.js} +448 -444
  176. package/dist/chunks/popper-container.CEtaux25.js.map +1 -0
  177. package/dist/chunks/{promo-banner.BUtq-2iR.js → promo-banner.BCpw2tDD.js} +3 -3
  178. package/dist/chunks/{promo-banner.BUtq-2iR.js.map → promo-banner.BCpw2tDD.js.map} +1 -1
  179. package/dist/chunks/{radio-group.CivaJaaQ.js → radio-group.rxg-4rF_.js} +4 -4
  180. package/dist/chunks/{radio-group.CivaJaaQ.js.map → radio-group.rxg-4rF_.js.map} +1 -1
  181. package/dist/chunks/{refresh.SzRxQ44W.js → refresh.C20ROVDS.js} +4 -4
  182. package/dist/chunks/refresh.C20ROVDS.js.map +1 -0
  183. package/dist/chunks/search-bar.DlihXfPt.js +114 -0
  184. package/dist/chunks/search-bar.DlihXfPt.js.map +1 -0
  185. package/dist/chunks/{search.KgjmJMHa.js → search.CW_aTqip.js} +15 -15
  186. package/dist/chunks/search.CW_aTqip.js.map +1 -0
  187. package/dist/chunks/{secondary-nav.C6D6dcs6.js → secondary-nav.D2loVonk.js} +3 -3
  188. package/dist/chunks/{secondary-nav.C6D6dcs6.js.map → secondary-nav.D2loVonk.js.map} +1 -1
  189. package/dist/chunks/{segmented-control.DKWpxDho.js → segmented-control.Wn-miTIl.js} +2 -2
  190. package/dist/chunks/{segmented-control.DKWpxDho.js.map → segmented-control.Wn-miTIl.js.map} +1 -1
  191. package/dist/chunks/{selection-card-group.DzwIeKQC.js → selection-card-group.CtQaeZFM.js} +12 -12
  192. package/dist/chunks/{selection-card-group.DzwIeKQC.js.map → selection-card-group.CtQaeZFM.js.map} +1 -1
  193. package/dist/chunks/{show.J9zXGWlK.js → show.ByWWaogc.js} +6 -6
  194. package/dist/chunks/show.ByWWaogc.js.map +1 -0
  195. package/dist/chunks/{sidepanel.DzF1iCZM.js → sidepanel.CjaHQEin.js} +6 -6
  196. package/dist/chunks/{sidepanel.DzF1iCZM.js.map → sidepanel.CjaHQEin.js.map} +1 -1
  197. package/dist/chunks/{step.DsfmsUU6.js → step.BGFaHGFO.js} +3 -3
  198. package/dist/chunks/{step.DsfmsUU6.js.map → step.BGFaHGFO.js.map} +1 -1
  199. package/dist/chunks/{structured-list-item.DQHvIbQo.js → structured-list-item.DAwADFpI.js} +6 -6
  200. package/dist/chunks/{structured-list-item.DQHvIbQo.js.map → structured-list-item.DAwADFpI.js.map} +1 -1
  201. package/dist/chunks/{summary-grid-item-custom.D6s8sw36.js → summary-grid-item-custom.DTCzOBBy.js} +4 -4
  202. package/dist/chunks/{summary-grid-item-custom.D6s8sw36.js.map → summary-grid-item-custom.DTCzOBBy.js.map} +1 -1
  203. package/dist/chunks/{tabs.CiTn85aw.js → tabs.hp52NnXH.js} +2 -2
  204. package/dist/chunks/{tabs.CiTn85aw.js.map → tabs.hp52NnXH.js.map} +1 -1
  205. package/dist/chunks/{tag.Bmw9RaOG.js → tag.B1hW92hG.js} +2 -2
  206. package/dist/chunks/{tag.Bmw9RaOG.js.map → tag.B1hW92hG.js.map} +1 -1
  207. package/dist/chunks/{textarea.CzuRg2pM.js → textarea.DMA29yQA.js} +4 -4
  208. package/dist/chunks/{textarea.CzuRg2pM.js.map → textarea.DMA29yQA.js.map} +1 -1
  209. package/dist/chunks/{timeline-item.CjltBKy0.js → timeline-item.kWg3dTy1.js} +15 -13
  210. package/dist/chunks/timeline-item.kWg3dTy1.js.map +1 -0
  211. package/dist/chunks/{toast.BWxPbCOy.js → toast.7D23cICy.js} +3 -3
  212. package/dist/chunks/{toast.BWxPbCOy.js.map → toast.7D23cICy.js.map} +1 -1
  213. package/dist/chunks/{toggle-button.B9LWddx9.js → toggle-button.7iAfO6Xx.js} +2 -2
  214. package/dist/chunks/{toggle-button.B9LWddx9.js.map → toggle-button.7iAfO6Xx.js.map} +1 -1
  215. package/dist/chunks/{toggle.BmwlaQon.js → toggle.hoD_i2Ey.js} +2 -2
  216. package/dist/chunks/{toggle.BmwlaQon.js.map → toggle.hoD_i2Ey.js.map} +1 -1
  217. package/dist/chunks/{tooltip.DS1ok8gh.js → tooltip.Y730-n-n.js} +2 -2
  218. package/dist/chunks/{tooltip.DS1ok8gh.js.map → tooltip.Y730-n-n.js.map} +1 -1
  219. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CxTHd8yr.js → tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js} +11 -10
  220. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CUmJbMsw.js.map +1 -0
  221. package/dist/chunks/use-cached-selected-values.DDP7LJoI.js +1446 -0
  222. package/dist/chunks/use-cached-selected-values.DDP7LJoI.js.map +1 -0
  223. package/dist/chunks/{warning-filled.tTkVob0l.js → warning-filled.DmHh0nYG.js} +4 -4
  224. package/dist/chunks/warning-filled.DmHh0nYG.js.map +1 -0
  225. package/dist/code-snippet.js +1 -1
  226. package/dist/dashboard-template.js +1 -1
  227. package/dist/dashed-underline.js +1 -1
  228. package/dist/data-grid-template.js +1 -1
  229. package/dist/data-grid.js +1 -1
  230. package/dist/date-picker.js +2 -2
  231. package/dist/date-range-picker.js +2 -2
  232. package/dist/date.js +1 -1
  233. package/dist/dropdown.js +4 -4
  234. package/dist/empty-state.js +1 -1
  235. package/dist/file-uploader.js +1 -1
  236. package/dist/filter-bar.js +1 -1
  237. package/dist/focus-trap.js +1 -1
  238. package/dist/form-layout.js +1 -1
  239. package/dist/header.js +1 -1
  240. package/dist/index.js +61 -61
  241. package/dist/info-icon.js +1 -1
  242. package/dist/input-field-password.js +1 -1
  243. package/dist/input-field-phone-number.js +1 -1
  244. package/dist/input-field.js +1 -1
  245. package/dist/inspector.js +1 -1
  246. package/dist/internal.js +35 -33
  247. package/dist/layout.js +1 -1
  248. package/dist/link.js +1 -1
  249. package/dist/menu.js +1 -1
  250. package/dist/modal-fullscreen.js +1 -1
  251. package/dist/modal.js +2 -2
  252. package/dist/pagination.js +1 -1
  253. package/dist/payment-method.js +1 -1
  254. package/dist/popover.js +1 -1
  255. package/dist/popper-container.js +1 -1
  256. package/dist/promo-banner.js +1 -1
  257. package/dist/radio-group.js +1 -1
  258. package/dist/search-bar.js +2 -2
  259. package/dist/secondary-nav.js +1 -1
  260. package/dist/segmented-control.js +1 -1
  261. package/dist/selection-card.js +1 -1
  262. package/dist/sidepanel.js +1 -1
  263. package/dist/stepper.js +1 -1
  264. package/dist/structured-list.js +1 -1
  265. package/dist/styles/bento-dark.css +30 -4
  266. package/dist/styles/bento-light.css +30 -4
  267. package/dist/styles/bento.css +30 -4
  268. package/dist/styles/legacy.css +32 -6
  269. package/dist/styles/styleguide.css +30 -4
  270. package/dist/styles/utility.css +2 -2
  271. package/dist/summary-grid.js +1 -1
  272. package/dist/tabs.js +1 -1
  273. package/dist/tag.js +1 -1
  274. package/dist/textarea.js +1 -1
  275. package/dist/timeline.js +1 -1
  276. package/dist/toast.js +1 -1
  277. package/dist/toggle.js +1 -1
  278. package/dist/tutorial.js +1 -1
  279. package/dist/web-types.json +1 -1
  280. package/package.json +6 -6
  281. package/dist/chunks/alert.DGewBB2a.js.map +0 -1
  282. package/dist/chunks/button-actions-with-menu.BXRKkFiw.js +0 -119
  283. package/dist/chunks/button-actions-with-menu.BXRKkFiw.js.map +0 -1
  284. package/dist/chunks/calendar.DNQlLbkK.js +0 -971
  285. package/dist/chunks/calendar.DNQlLbkK.js.map +0 -1
  286. package/dist/chunks/checkbox-input.CAYgiRHG.js.map +0 -1
  287. package/dist/chunks/checkbox.BllRk82F.js.map +0 -1
  288. package/dist/chunks/checkmark-circle-fill.g_tcBhFJ.js.map +0 -1
  289. package/dist/chunks/checkmark-small.BDqUF-Ni.js.map +0 -1
  290. package/dist/chunks/chevron-left.CYEK2UTr.js.map +0 -1
  291. package/dist/chunks/chevron-up.Cu9qXgBY.js.map +0 -1
  292. package/dist/chunks/chip.sG_6gh3Z.js +0 -71
  293. package/dist/chunks/chip.sG_6gh3Z.js.map +0 -1
  294. package/dist/chunks/copy.DAu8GrR9.js.map +0 -1
  295. package/dist/chunks/cross-circle-fill-small.CJyARMSZ.js.map +0 -1
  296. package/dist/chunks/cross-circle-fill.BzSjakuO.js +0 -44
  297. package/dist/chunks/cross-circle-fill.BzSjakuO.js.map +0 -1
  298. package/dist/chunks/cross-small.Z5EKYRm0.js.map +0 -1
  299. package/dist/chunks/cross.BZYw4R3N.js.map +0 -1
  300. package/dist/chunks/data-grid.BNXoMZf9.js.map +0 -1
  301. package/dist/chunks/date-picker.DgpHNnu_.js.map +0 -1
  302. package/dist/chunks/date-range-picker.CUIOfxjB.js +0 -1086
  303. package/dist/chunks/date-range-picker.CUIOfxjB.js.map +0 -1
  304. package/dist/chunks/dialog-page.DK2UKGH8.js.map +0 -1
  305. package/dist/chunks/dot.cpdFEk6G.js.map +0 -1
  306. package/dist/chunks/dropdown.a8OeeVAZ.js.map +0 -1
  307. package/dist/chunks/expand.CJ162RaJ.js.map +0 -1
  308. package/dist/chunks/file-uploader.DV4I5Lvf.js.map +0 -1
  309. package/dist/chunks/filter-bar.BZkXUVLH.js +0 -2865
  310. package/dist/chunks/filter-bar.BZkXUVLH.js.map +0 -1
  311. package/dist/chunks/form-layout-title.BHL_MDqT.js.map +0 -1
  312. package/dist/chunks/header.CRC9X7v2.js +0 -256
  313. package/dist/chunks/header.CRC9X7v2.js.map +0 -1
  314. package/dist/chunks/index.CrhTVr5J.js +0 -10
  315. package/dist/chunks/index.CrhTVr5J.js.map +0 -1
  316. package/dist/chunks/index.DDnf1O9p.js +0 -22
  317. package/dist/chunks/index.DDnf1O9p.js.map +0 -1
  318. package/dist/chunks/index.DPafeRJa.js +0 -10
  319. package/dist/chunks/index.DPafeRJa.js.map +0 -1
  320. package/dist/chunks/info.DYNe2WnZ.js.map +0 -1
  321. package/dist/chunks/input-field-password.Bo7FiAOq.js.map +0 -1
  322. package/dist/chunks/input-field.rgA0t2sp.js +0 -382
  323. package/dist/chunks/input-field.rgA0t2sp.js.map +0 -1
  324. package/dist/chunks/link.CyGCtpse.js.map +0 -1
  325. package/dist/chunks/menu.DKluB_Dn.js +0 -699
  326. package/dist/chunks/menu.DKluB_Dn.js.map +0 -1
  327. package/dist/chunks/pagination.CGS6fGUm.js.map +0 -1
  328. package/dist/chunks/payment-method.CGNHCiy1.js +0 -73
  329. package/dist/chunks/payment-method.CGNHCiy1.js.map +0 -1
  330. package/dist/chunks/popper-container.BvGYgqiE.js.map +0 -1
  331. package/dist/chunks/refresh.SzRxQ44W.js.map +0 -1
  332. package/dist/chunks/search-bar.Zdai5UhB.js +0 -132
  333. package/dist/chunks/search-bar.Zdai5UhB.js.map +0 -1
  334. package/dist/chunks/search.KgjmJMHa.js.map +0 -1
  335. package/dist/chunks/show.J9zXGWlK.js.map +0 -1
  336. package/dist/chunks/timeline-item.CjltBKy0.js.map +0 -1
  337. package/dist/chunks/truncate.BfIl_-71.js +0 -8
  338. package/dist/chunks/truncate.BfIl_-71.js.map +0 -1
  339. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.CxTHd8yr.js.map +0 -1
  340. package/dist/chunks/use-cached-selected-values.CxAhnNa6.js +0 -1595
  341. package/dist/chunks/use-cached-selected-values.CxAhnNa6.js.map +0 -1
  342. package/dist/chunks/warning-filled.tTkVob0l.js.map +0 -1
  343. /package/dist/assets/{cross.css → main.css} +0 -0
@@ -0,0 +1,1446 @@
1
+ import { computed as v, ref as M, onMounted as Le, onUnmounted as xe, watch as Oe, defineComponent as X, resolveComponent as A, createElementBlock as L, openBlock as g, createVNode as P, createElementVNode as F, withCtx as O, createTextVNode as z, toDisplayString as G, renderSlot as Y, mergeProps as U, withKeys as be, createCommentVNode as W, createBlock as B, withModifiers as Ke, normalizeProps as te, guardReactiveProps as ie, withDirectives as ce, vShow as Ie, toRef as le, resolveDirective as Ae, toHandlers as se, Fragment as Z, renderList as x, createSlots as re, normalizeClass as ve, useSlots as We, unref as w, normalizeStyle as qe } from "vue";
2
+ import { B as K, a as pe } from "./keyboard-navigation.CqgGzfZQ.js";
3
+ import "./events.FNmSWp_P.js";
4
+ import { B as oe } from "./typography.DN5eC5ch.js";
5
+ import { B as je } from "./loading-indicator.DEepb9Wl.js";
6
+ import { B as He } from "./empty-state.BffIZp3a.js";
7
+ import { u as ye } from "./i18n.D9azDLPe.js";
8
+ import { d as Xe } from "./debounce.DUTu11PS.js";
9
+ import { B as Se } from "./checkbox.erdZ58Kk.js";
10
+ import { B as Je } from "./chip.3T0x6FuI.js";
11
+ import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
12
+ import { C as Ze, a as Qe } from "./chevron-up.-0oLlHmh.js";
13
+ import { d as et, e as Ee } from "./button-actions.BvGAE7sw.js";
14
+ /* empty css */
15
+ import { o as tt } from "./resize.Bqks3WUm.js";
16
+ import "../assets/use-cached-selected-values.css";
17
+ const $e = (e, t, s, c) => {
18
+ const b = v(
19
+ () => {
20
+ var u, a;
21
+ return !!((u = e.value) != null && u.length) && ((a = e.value) == null ? void 0 : a.length) === t.value.length;
22
+ }
23
+ ), i = v(() => {
24
+ var u;
25
+ return e.value == null || e.value.length === 0 ? !1 : ((u = e.value) == null ? void 0 : u.length) !== t.value.length;
26
+ });
27
+ return {
28
+ isAllSelected: b,
29
+ isIndeterminate: i,
30
+ toggleSelectAll: (u) => {
31
+ u ? s() : c();
32
+ }
33
+ };
34
+ };
35
+ function st(e, { disabled: t, itemHeight: s, overscan: c = 5, prefixHeight: b }) {
36
+ const i = M(null), l = M([]), u = M(0), a = M(0), n = M(0);
37
+ let C;
38
+ const o = v(() => {
39
+ const y = typeof s == "number" ? e.value.length * s : e.value.reduce((k, E, I) => k + s(I), 0), h = typeof s == "number" ? u.value * s : e.value.slice(0, u.value).reduce((k, E, I) => k + s(I), 0);
40
+ return {
41
+ style: {
42
+ marginTop: `${h}px`,
43
+ height: `${y - h}px`
44
+ }
45
+ };
46
+ }), S = () => {
47
+ const y = (b == null ? void 0 : b.value) ?? 0, h = Math.max(i.value.scrollTop - y, 0);
48
+ if (typeof s == "number")
49
+ return Math.floor(h / s);
50
+ let k = 0, E = 0;
51
+ for (let I = 0; I < e.value.length; I += 1) {
52
+ const V = s(I);
53
+ if (k += V, k >= h) {
54
+ E = I;
55
+ break;
56
+ }
57
+ }
58
+ return E;
59
+ }, R = () => {
60
+ if (n.value = i.value.clientHeight, typeof s == "number")
61
+ return Math.ceil(n.value / s);
62
+ const y = u.value ?? 0;
63
+ let h = 0, k = 0;
64
+ for (let E = y; E < e.value.length; E += 1) {
65
+ const I = s(E);
66
+ if (h += I, k = E, h > n.value)
67
+ break;
68
+ }
69
+ return k - y;
70
+ }, $ = () => {
71
+ if (i.value) {
72
+ const y = R();
73
+ u.value = S(), a.value = Math.min(u.value + y + c, e.value.length), l.value = e.value.slice(u.value, a.value);
74
+ }
75
+ }, D = () => {
76
+ $();
77
+ };
78
+ t || (Le(() => {
79
+ i.value && (n.value = i.value.clientHeight, C = tt(i.value, ({ clientHeight: y }) => {
80
+ n.value = y, $();
81
+ }), $());
82
+ }), xe(() => {
83
+ C == null || C.disconnect();
84
+ }), Oe(
85
+ () => e.value,
86
+ () => {
87
+ $();
88
+ }
89
+ ));
90
+ const p = {
91
+ ref: i,
92
+ style: { overflowY: "auto" }
93
+ };
94
+ return t ? {
95
+ containerRef: i,
96
+ containerProps: p,
97
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
98
+ onScroll: () => {
99
+ },
100
+ list: e
101
+ } : {
102
+ containerRef: i,
103
+ containerProps: p,
104
+ onScroll: D,
105
+ list: l,
106
+ wrapperProps: o
107
+ };
108
+ }
109
+ var d = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(d || {}), ee = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(ee || {});
110
+ const lt = X({
111
+ name: "bento-listbox-static-category",
112
+ components: {
113
+ BentoTypography: oe
114
+ },
115
+ props: {
116
+ /**
117
+ * Category label text
118
+ */
119
+ categoryLabel: {
120
+ type: String,
121
+ required: !0
122
+ }
123
+ }
124
+ }), ot = { class: "b-listbox-single-select-category" };
125
+ function nt(e, t, s, c, b, i) {
126
+ const l = A("bento-typography");
127
+ return g(), L("div", ot, [
128
+ P(l, {
129
+ variant: "caption",
130
+ el: "span",
131
+ class: "b-listbox-single-select-category__label-text"
132
+ }, {
133
+ default: O(() => [
134
+ z(G(e.categoryLabel), 1)
135
+ ]),
136
+ _: 1
137
+ }),
138
+ F("div", null, [
139
+ Y(e.$slots, "default", {}, void 0, !0)
140
+ ])
141
+ ]);
142
+ }
143
+ const at = /* @__PURE__ */ q(lt, [["render", nt], ["__scopeId", "data-v-a90eff17"]]), it = X({
144
+ name: "bento-listbox-option",
145
+ props: {
146
+ /**
147
+ * Setting this property to true will disable the option.
148
+ */
149
+ disabled: { type: Boolean, default: !1 },
150
+ /**
151
+ * Indicates if the value is selected. Only one element can be selected at a time.
152
+ */
153
+ selected: { type: Boolean, default: !1 }
154
+ },
155
+ emits: [d.CLICK, d.ENTER, d.SPACE, d.TAB],
156
+ setup(e, { emit: t }) {
157
+ const s = v(() => ({
158
+ "b-listbox-option--disabled": e.disabled,
159
+ "b-listbox-option--selected": e.selected
160
+ }));
161
+ return {
162
+ // Enums
163
+ BentoKeyboardNavigationKeyDownEvent: K,
164
+ BentoListboxEvent: d,
165
+ // Values
166
+ conditionalClasses: s,
167
+ // Events
168
+ onClick: (i) => {
169
+ t(d.CLICK, i);
170
+ },
171
+ onOptionSelected: (i, l) => {
172
+ t(i, l);
173
+ }
174
+ };
175
+ }
176
+ });
177
+ function rt(e, t, s, c, b, i) {
178
+ return g(), L("label", U({
179
+ class: ["b-listbox-option", e.conditionalClasses],
180
+ role: "option"
181
+ }, e.$attrs, {
182
+ onClick: t[0] || (t[0] = (...l) => e.onClick && e.onClick(...l)),
183
+ onKeydown: [
184
+ t[1] || (t[1] = be((l) => e.onOptionSelected(e.BentoListboxEvent.ENTER, l), ["enter"])),
185
+ t[2] || (t[2] = be((l) => e.onOptionSelected(e.BentoListboxEvent.SPACE, l), ["space"])),
186
+ t[3] || (t[3] = be((l) => e.onOptionSelected(e.BentoListboxEvent.TAB, l), ["tab"]))
187
+ ]
188
+ }), [
189
+ Y(e.$slots, "default", {}, void 0, !0)
190
+ ], 16);
191
+ }
192
+ const de = /* @__PURE__ */ q(it, [["render", rt], ["__scopeId", "data-v-18a61f5d"]]);
193
+ let he = 0;
194
+ const ct = {
195
+ beforeCreate() {
196
+ this.uuid = he.toString(), he += 1;
197
+ }
198
+ }, ut = { key: 0 };
199
+ function dt(e, t, s, c, b, i) {
200
+ return g(), L("svg", U({ role: "img" }, e.$attrs, {
201
+ class: "ui-assets-icons-16",
202
+ xmlns: "http://www.w3.org/2000/svg",
203
+ width: "16",
204
+ height: "16",
205
+ fill: "none"
206
+ }), [
207
+ e.$attrs["svg-title"] ? (g(), L("title", ut, G(e.$attrs["svg-title"]), 1)) : W("", !0),
208
+ t[0] || (t[0] = F("path", {
209
+ fill: "#00112C",
210
+ d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
211
+ }, null, -1))
212
+ ], 16);
213
+ }
214
+ const mt = /* @__PURE__ */ q(ct, [["render", dt]]), bt = X({
215
+ name: "bento-listbox-single-select-option",
216
+ components: {
217
+ BentoListboxOption: de,
218
+ BentoTypography: oe,
219
+ CheckmarkIcon: mt
220
+ },
221
+ props: {
222
+ /**
223
+ * Setting this property to true will disable the option.
224
+ */
225
+ disabled: { type: Boolean, default: !1 },
226
+ /**
227
+ * The option item that contains all the option item's data.
228
+ * @type {BentoListboxOptionItem}
229
+ */
230
+ option: {
231
+ type: Object,
232
+ required: !0
233
+ },
234
+ /**
235
+ * Indicates if the value is selected. Only one element can be selected at a time.
236
+ */
237
+ selected: { type: Boolean, default: !1 }
238
+ },
239
+ emits: [d.ENTER, d.SELECT, d.SPACE, d.TAB],
240
+ setup(e, { emit: t }) {
241
+ const s = (l) => {
242
+ e.disabled || t(l, e.option);
243
+ }, c = v(() => e.disabled ? !0 : null), b = v(() => e.selected ? !0 : null), i = v(() => e.disabled ? -1 : 0);
244
+ return {
245
+ // Values
246
+ ariaDisabled: c,
247
+ ariaSelected: b,
248
+ tabIndex: i,
249
+ // Enums
250
+ BentoListboxEvent: d,
251
+ // Events
252
+ onOptionSelected: s
253
+ };
254
+ }
255
+ }), vt = { class: "b-listbox-single-select-option__text" }, ft = { class: "b-listbox-single-select-option__check-icon" };
256
+ function gt(e, t, s, c, b, i) {
257
+ const l = A("bento-typography"), u = A("checkmark-icon"), a = A("bento-listbox-option");
258
+ return g(), B(a, {
259
+ class: "b-listbox-single-select-option",
260
+ disabled: e.disabled,
261
+ selected: e.selected,
262
+ "aria-selected": e.ariaSelected,
263
+ "aria-disabled": e.ariaDisabled,
264
+ tabindex: e.tabIndex,
265
+ onClick: t[0] || (t[0] = (n) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
266
+ onEnterPressed: t[1] || (t[1] = (n) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
267
+ onSpacePressed: t[2] || (t[2] = Ke((n) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
268
+ onTabPressed: t[3] || (t[3] = (n) => e.onOptionSelected(e.BentoListboxEvent.TAB))
269
+ }, {
270
+ default: O(() => [
271
+ Y(e.$slots, "default", te(ie(e.option)), () => [
272
+ F("span", vt, [
273
+ P(l, { el: "span" }, {
274
+ default: O(() => [
275
+ z(G(e.option.label), 1)
276
+ ]),
277
+ _: 1
278
+ }),
279
+ e.option.description ? (g(), B(l, {
280
+ key: 0,
281
+ class: "b-listbox-single-select-option__description",
282
+ el: "span"
283
+ }, {
284
+ default: O(() => [
285
+ z(G(e.option.description), 1)
286
+ ]),
287
+ _: 1
288
+ })) : W("", !0)
289
+ ])
290
+ ], !0),
291
+ F("span", ft, [
292
+ ce(P(u, { "svg-title": "selected" }, null, 512), [
293
+ [Ie, e.selected]
294
+ ])
295
+ ])
296
+ ]),
297
+ _: 3
298
+ }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
299
+ }
300
+ const pt = /* @__PURE__ */ q(bt, [["render", gt], ["__scopeId", "data-v-226f4c84"]]), ke = ({ items: e, isOptionDisabled: t, hasStaticCategories: s }, c) => {
301
+ const b = v(
302
+ () => s.value ? e.value.flatMap((p) => p.items) : e.value
303
+ ), i = v(() => b.value.length - 1), l = M(0);
304
+ Le(() => {
305
+ t && (l.value = e.value.findIndex((p) => !t(p)));
306
+ });
307
+ const u = (p) => !t || !!t && t(e.value[p]), a = (p) => !t || !!t && !t(e.value[p]), n = (p) => {
308
+ switch (p) {
309
+ case "increase":
310
+ l.value += 1;
311
+ break;
312
+ case "decrease":
313
+ l.value -= 1;
314
+ break;
315
+ }
316
+ }, C = ({ edgeCaseItem: p, isItemBeforeEdgeCaseItem: y }, h, k) => {
317
+ l.value !== p && (y ? a(p) && n(k) : (n(k), u(l.value) && h()), c(l.value));
318
+ }, o = (p) => {
319
+ var h;
320
+ (h = p == null ? void 0 : p.detail) == null || h.preventDefault();
321
+ const y = l.value === i.value - 2;
322
+ C(
323
+ {
324
+ isItemBeforeEdgeCaseItem: y,
325
+ edgeCaseItem: i.value
326
+ },
327
+ o,
328
+ "increase"
329
+ /* INCREASE */
330
+ );
331
+ }, S = (p) => {
332
+ var h;
333
+ (h = p == null ? void 0 : p.detail) == null || h.preventDefault();
334
+ const y = l.value === 1;
335
+ C(
336
+ {
337
+ edgeCaseItem: 0,
338
+ isItemBeforeEdgeCaseItem: y
339
+ },
340
+ S,
341
+ "decrease"
342
+ /* DECREASE */
343
+ );
344
+ };
345
+ return {
346
+ moveToFirstElement: () => {
347
+ l.value = 0, u(l.value) ? o() : c(l.value);
348
+ },
349
+ moveToLastElement: () => {
350
+ l.value = i.value, u(l.value) ? S() : c(l.value);
351
+ },
352
+ moveToNextElement: o,
353
+ moveToPreviousElement: S,
354
+ setListboxFocusedIndex: (p) => {
355
+ l.value = p;
356
+ }
357
+ };
358
+ }, yt = X({
359
+ name: "bento-listbox-single-select",
360
+ components: {
361
+ BentoListboxSingleSelectCategory: at,
362
+ BentoListboxSingleSelectOption: pt
363
+ },
364
+ directives: { BentoKeyboardNavigationDirective: pe },
365
+ inheritAttrs: !1,
366
+ props: {
367
+ /**
368
+ * Function that allows the options to be disabled
369
+ *
370
+ * @type {BentoListboxIsOptionDisabled}
371
+ * @param {BentoListboxOptionItem} option - listbox option object
372
+ * @param {string} option.label - Option's label text
373
+ * @param {string|number} option.value - Option's value
374
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
375
+ */
376
+ isOptionDisabled: {
377
+ type: Function,
378
+ default: () => !1
379
+ },
380
+ /**
381
+ * The option elements to populate the listbox with.
382
+ * It must be an array of {@see BentoListboxOptionItem }.
383
+ *
384
+ * @property {string} value.label - Text to be displayed in the option
385
+ * @property {string,number} value.value - Value of the option
386
+ */
387
+ items: {
388
+ type: Array,
389
+ required: !0
390
+ },
391
+ /**
392
+ * The `input` value.
393
+ * Providing an empty string will select no options.
394
+ * Set to an empty string `''` if you don't want any of the available options to be selected
395
+ */
396
+ selectedValue: {
397
+ type: Array,
398
+ default: void 0
399
+ },
400
+ /**
401
+ * If enabled, dropdown will display non-selectable, static categories
402
+ */
403
+ staticCategories: { type: Boolean, default: !1 }
404
+ },
405
+ emits: [d.SELECT, d.ENTER, d.SPACE, d.TAB],
406
+ setup(e, { emit: t, expose: s, slots: c }) {
407
+ const b = M(null), i = M([]), l = v(() => {
408
+ var y;
409
+ return !!((y = e.selectedValue) != null && y.length) && e.selectedValue.at(0);
410
+ }), u = v(() => !!e.items.some(({ items: y }) => !!y)), a = (y) => (h) => {
411
+ t(y, [h]);
412
+ }, n = (y) => {
413
+ var h;
414
+ (h = b.value.querySelectorAll('[role="option"]')[y]) == null || h.focus();
415
+ }, {
416
+ moveToNextElement: C,
417
+ moveToPreviousElement: o,
418
+ moveToFirstElement: S,
419
+ moveToLastElement: R,
420
+ setListboxFocusedIndex: $
421
+ } = ke(
422
+ {
423
+ items: le(e, "items"),
424
+ isOptionDisabled: e.isOptionDisabled,
425
+ hasStaticCategories: le(e, "staticCategories")
426
+ },
427
+ n
428
+ ), D = {
429
+ [K.ARROW_UP]: o,
430
+ [K.ARROW_DOWN]: C,
431
+ [K.HOME]: S,
432
+ [K.END]: R
433
+ }, p = {
434
+ [d.SELECT]: a(d.SELECT),
435
+ [d.SPACE]: a(d.SPACE),
436
+ [d.TAB]: a(d.TAB),
437
+ [d.ENTER]: a(d.ENTER)
438
+ };
439
+ return s({
440
+ /**
441
+ * Reference for a single listbox item.
442
+ * Required for keyboard navigation in dropdown as $children is removed in vue@3
443
+ */
444
+ listboxItemRef: i,
445
+ /**
446
+ * Method to set the index of the item to be focused on
447
+ * Used for focus management to be kept in-sync with parent e.g. dropdowns
448
+ */
449
+ setListboxFocusedIndex: $
450
+ }), {
451
+ // Enums
452
+ BentoListboxEvent: d,
453
+ // Values
454
+ listboxRef: b,
455
+ listboxItemRef: i,
456
+ selectedItem: l,
457
+ slots: c,
458
+ // Computed
459
+ hasCategories: u,
460
+ // Methods
461
+ onOptionSelected: a,
462
+ // Keyboard navigation
463
+ listboxListeners: D,
464
+ listboxOptionListeners: p
465
+ };
466
+ }
467
+ });
468
+ function St(e, t, s, c, b, i) {
469
+ const l = A("bento-listbox-single-select-option"), u = A("bento-listbox-single-select-category"), a = Ae("bento-keyboard-navigation-directive");
470
+ return ce((g(), L("div", U({ ref: "listboxRef" }, se(e.listboxListeners, !0)), [
471
+ e.hasCategories && e.staticCategories ? (g(!0), L(Z, { key: 0 }, x(e.items, (n) => (g(), B(u, {
472
+ key: n.value,
473
+ "category-label": n.label,
474
+ role: "group"
475
+ }, {
476
+ default: O(() => [
477
+ (g(!0), L(Z, null, x(n.items, (C) => (g(), B(l, U({
478
+ key: C.value,
479
+ ref_for: !0,
480
+ ref: "listboxItemRef",
481
+ role: "option",
482
+ option: C,
483
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(C) : null,
484
+ selected: C.value === e.selectedItem.value
485
+ }, se(e.listboxOptionListeners)), re({ _: 2 }, [
486
+ x(e.slots, (o, S) => ({
487
+ name: S,
488
+ fn: O((R) => [
489
+ Y(e.$slots, S, U({ ref_for: !0 }, R))
490
+ ])
491
+ }))
492
+ ]), 1040, ["option", "disabled", "selected"]))), 128))
493
+ ]),
494
+ _: 2
495
+ }, 1032, ["category-label"]))), 128)) : (g(!0), L(Z, { key: 1 }, x(e.items, (n) => (g(), B(l, U({
496
+ key: n.value,
497
+ ref_for: !0,
498
+ ref: "listboxItemRef",
499
+ role: "option",
500
+ option: n,
501
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null,
502
+ selected: n.value === e.selectedItem.value
503
+ }, se(e.listboxOptionListeners)), re({ _: 2 }, [
504
+ x(e.slots, (C, o) => ({
505
+ name: o,
506
+ fn: O((S) => [
507
+ Y(e.$slots, o, U({ ref_for: !0 }, S))
508
+ ])
509
+ }))
510
+ ]), 1040, ["option", "disabled", "selected"]))), 128))
511
+ ], 16)), [
512
+ [a]
513
+ ]);
514
+ }
515
+ const Ct = /* @__PURE__ */ q(yt, [["render", St]]);
516
+ var fe = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(fe || {}), ae = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(ae || {});
517
+ const Et = {
518
+ "en-US": {
519
+ categoryClosed: "{category} closed",
520
+ categoryOpened: "{category} opened"
521
+ }
522
+ }, ht = X({
523
+ i18n: { messages: Et },
524
+ name: "bento-listbox-multi-select-category",
525
+ components: {
526
+ BentoCheckbox: Se,
527
+ BentoTypography: oe,
528
+ BentoListboxOption: de,
529
+ ChevronDownIcon: Qe,
530
+ ChevronUpIcon: Ze
531
+ },
532
+ props: {
533
+ /**
534
+ * The option elements to populate the listbox with.
535
+ * It must be an array of {@see BentoListboxOptionItem }.
536
+ *
537
+ * @property {string} value.label - Text to be displayed in the option
538
+ * @property {string,number} value.value - Value of the option
539
+ * @property {BentoListboxOptionItem} value.items - Category items list
540
+ */
541
+ category: {
542
+ type: Object,
543
+ required: !0
544
+ },
545
+ /**
546
+ * Function that allows the options to be disabled
547
+ *
548
+ * @type {BentoListboxIsOptionDisabled}
549
+ * @param {BentoListboxOptionItem} option - listbox option object
550
+ * @param {string} option.label - Option's label text
551
+ * @param {string|number} option.value - Option's value
552
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
553
+ */
554
+ isOptionDisabled: {
555
+ type: [Function],
556
+ default: () => !1
557
+ },
558
+ /**
559
+ * The `input` value.
560
+ * Providing an empty array will select no options.
561
+ */
562
+ selectedItemsList: {
563
+ type: Array,
564
+ default: () => []
565
+ },
566
+ /**
567
+ * If enabled, dropdown will display non-selectable, static categories
568
+ */
569
+ staticCategories: { type: Boolean, default: !1 }
570
+ },
571
+ emits: [ae.SELECT_CATEGORY, ae.UNSELECT_CATEGORY],
572
+ setup(e, { emit: t }) {
573
+ const s = M(!1), { t: c } = ye(), b = (E) => e.isOptionDisabled ? e.isOptionDisabled(E) : !1, i = v(
574
+ () => e.category.items.every((E) => b(E))
575
+ ), l = le(e, "staticCategories"), u = v(() => s.value || e.staticCategories), a = v(() => ({
576
+ [`b-listbox-multi-select-category--${fe.DISABLED}`]: i.value,
577
+ [`b-listbox-multi-select-category--${fe.STATIC_CATEGORY}`]: e.staticCategories
578
+ })), n = (E) => {
579
+ E.preventDefault(), s.value = !s.value;
580
+ }, C = (E) => {
581
+ var Q;
582
+ const I = b(E), V = ((Q = e.selectedItemsList) == null ? void 0 : Q.includes(E.value)) || !1;
583
+ return { isDisabled: I, isPreSelected: V };
584
+ }, o = v(
585
+ () => e.category.items.filter((E) => {
586
+ const { isDisabled: I, isPreSelected: V } = C(E);
587
+ return I && V || !I;
588
+ })
589
+ ), S = v(
590
+ () => {
591
+ var E;
592
+ return (E = o.value) == null ? void 0 : E.filter(
593
+ ({ value: I }) => {
594
+ var V;
595
+ return (V = e.selectedItemsList) == null ? void 0 : V.includes(I);
596
+ }
597
+ );
598
+ }
599
+ ), R = v(() => {
600
+ const E = s.value ? "categoryOpened" : "categoryClosed";
601
+ return c(E, { category: e.category.label });
602
+ }), $ = v(
603
+ () => ({
604
+ el: "span",
605
+ variant: e.staticCategories ? "caption" : "body"
606
+ })
607
+ ), D = () => {
608
+ t(ae.SELECT_CATEGORY);
609
+ }, p = () => {
610
+ t(ae.UNSELECT_CATEGORY);
611
+ }, { isAllSelected: y, isIndeterminate: h, toggleSelectAll: k } = $e(
612
+ S,
613
+ o,
614
+ D,
615
+ p
616
+ );
617
+ return {
618
+ // Values
619
+ chevronTitle: R,
620
+ conditionalClass: a,
621
+ hasAllPropsDisabled: i,
622
+ isOpen: s,
623
+ isAllSelected: y,
624
+ isIndeterminate: h,
625
+ isStaticCategory: l,
626
+ // Computed
627
+ showItemChildren: u,
628
+ categoryLabelProps: $,
629
+ // Methods
630
+ toggleOpen: n,
631
+ toggleSelectAll: k
632
+ };
633
+ }
634
+ }), _t = { class: "b-listbox-multi-select-category__label" };
635
+ function Tt(e, t, s, c, b, i) {
636
+ const l = A("bento-checkbox"), u = A("bento-typography"), a = A("chevron-up-icon"), n = A("chevron-down-icon"), C = A("bento-listbox-option");
637
+ return g(), L("div", null, [
638
+ P(C, {
639
+ class: ve(["b-listbox-multi-select-category__option", e.conditionalClass])
640
+ }, {
641
+ default: O(() => [
642
+ e.isStaticCategory ? W("", !0) : (g(), B(l, {
643
+ key: 0,
644
+ "model-value": e.isAllSelected,
645
+ indeterminate: e.isIndeterminate,
646
+ disabled: e.hasAllPropsDisabled,
647
+ "aria-label": e.category.label,
648
+ value: e.category.value,
649
+ "onUpdate:modelValue": e.toggleSelectAll
650
+ }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "value", "onUpdate:modelValue"])),
651
+ F("span", _t, [
652
+ P(u, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
653
+ default: O(() => [
654
+ z(G(e.category.label), 1)
655
+ ]),
656
+ _: 1
657
+ }, 16),
658
+ e.isStaticCategory ? W("", !0) : (g(), L("div", {
659
+ key: 0,
660
+ class: "b-listbox-multi-select-category__label-chevron",
661
+ "data-testid": "toggle-listbox",
662
+ onClickCapture: t[0] || (t[0] = (...o) => e.toggleOpen && e.toggleOpen(...o))
663
+ }, [
664
+ e.isOpen ? (g(), B(a, {
665
+ key: 0,
666
+ "svg-title": e.chevronTitle
667
+ }, null, 8, ["svg-title"])) : (g(), B(n, {
668
+ key: 1,
669
+ "svg-title": e.chevronTitle
670
+ }, null, 8, ["svg-title"]))
671
+ ], 32))
672
+ ])
673
+ ]),
674
+ _: 1
675
+ }, 8, ["class"]),
676
+ ce(F("div", null, [
677
+ Y(e.$slots, "default", {}, void 0, !0)
678
+ ], 512), [
679
+ [Ie, e.showItemChildren]
680
+ ])
681
+ ]);
682
+ }
683
+ const Lt = /* @__PURE__ */ q(ht, [["render", Tt], ["__scopeId", "data-v-9a00de22"]]);
684
+ var H = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(H || {});
685
+ const Ot = X({
686
+ name: "listbox-multi-select-options",
687
+ components: {
688
+ BentoCheckbox: Se,
689
+ BentoListboxOption: de,
690
+ BentoTypography: oe,
691
+ ListboxMultiSelectCategory: Lt
692
+ },
693
+ props: {
694
+ /**
695
+ * Indicates if the items listed are inside a category
696
+ * so they can be padded to right by one level in recursion.
697
+ * Items of categories are automatically defined as "categoryItems"
698
+ */
699
+ categoryItems: { type: Boolean, default: !1 },
700
+ /**
701
+ * Function that allows the options to be disabled
702
+ *
703
+ * @type {BentoListboxIsOptionDisabled}
704
+ * @param {BentoListboxOptionItem} option - listbox option object
705
+ * @param {string} option.label - Option's label text
706
+ * @param {string|number} option.value - Option's value
707
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
708
+ */
709
+ isOptionDisabled: {
710
+ type: Function,
711
+ default: () => !1
712
+ },
713
+ /**
714
+ * The option elements to populate the listbox with.
715
+ * It must be an array of {@see BentoListboxOptionItem }.
716
+ *
717
+ * @property {string} value.label - Text to be displayed in the option
718
+ * @property {string,number} value.value - Value of the option
719
+ */
720
+ items: {
721
+ type: Array,
722
+ required: !0
723
+ },
724
+ /**
725
+ * Indicates if the elements options are inside a multi-level category
726
+ */
727
+ isMultiLevel: { type: Boolean, default: !1 },
728
+ /**
729
+ * Flag that indicates that an external search it's being made
730
+ * to filter out the items inside the the multi-select listbox
731
+ *
732
+ * If enabled, hides the "Select all" checkbox in "multiple" mode.
733
+ */
734
+ searching: { type: Boolean, default: !1 },
735
+ /**
736
+ * List of selected items.
737
+ * Providing an empty array will select no options.
738
+ */
739
+ selectedItemsList: {
740
+ type: Array,
741
+ default: () => []
742
+ },
743
+ /**
744
+ * If enabled, dropdown will display non-selectable, static categories
745
+ */
746
+ staticCategories: { type: Boolean, default: !1 }
747
+ },
748
+ emits: [
749
+ H.TOGGLE_CHECKBOX_SELECTION,
750
+ H.SELECT_CATEGORY,
751
+ H.UNSELECT_CATEGORY
752
+ ],
753
+ setup(e, { emit: t }) {
754
+ const s = (a) => {
755
+ t(H.TOGGLE_CHECKBOX_SELECTION, a);
756
+ }, c = (a) => !!a.items, b = (a) => {
757
+ const n = e.isMultiLevel && e.searching;
758
+ return a.description && (!e.isMultiLevel || n);
759
+ }, i = (a) => a.items ? !!a.items.find((n) => e.selectedItemsList.includes(n.value)) : e.selectedItemsList.includes(a.value), l = (a, n) => {
760
+ if (c(n))
761
+ return t(a ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, n);
762
+ s(n.value);
763
+ };
764
+ return {
765
+ // Values
766
+ conditionalClasses: v(() => ({
767
+ "b-listbox-multi-select-options__static-category-option": e.staticCategories,
768
+ "b-listbox-multi-select-options__category-option": e.categoryItems
769
+ })),
770
+ // Methods
771
+ isOptionSelected: i,
772
+ shouldShowDescription: b,
773
+ toggleCheckboxSelection: s,
774
+ selectSearch: l,
775
+ // Enums
776
+ BentoListboxEvent: d,
777
+ ListboxMultiSelectOptionsEvent: H
778
+ };
779
+ }
780
+ }), It = { class: "b-listbox-multi-select__option-text" }, At = { class: "b-listbox-multi-select__option-text" };
781
+ function $t(e, t, s, c, b, i) {
782
+ const l = A("bento-checkbox"), u = A("bento-typography"), a = A("bento-listbox-option"), n = A("listbox-multi-select-options", !0), C = A("listbox-multi-select-category");
783
+ return g(), L("div", null, [
784
+ (g(!0), L(Z, null, x(e.items, (o) => (g(), L("div", {
785
+ key: `selected-${o.value}`
786
+ }, [
787
+ e.searching && e.isMultiLevel ? (g(), B(a, {
788
+ key: 0,
789
+ class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
790
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
791
+ }, {
792
+ default: O(() => [
793
+ P(l, {
794
+ "model-value": e.isOptionSelected(o),
795
+ "aria-label": o.label,
796
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
797
+ value: o.value,
798
+ "onUpdate:modelValue": (S) => e.selectSearch(S, o)
799
+ }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
800
+ Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
801
+ F("span", It, [
802
+ P(u, { el: "span" }, {
803
+ default: O(() => [
804
+ z(G(o.label), 1)
805
+ ]),
806
+ _: 2
807
+ }, 1024),
808
+ e.shouldShowDescription(o) ? (g(), B(u, {
809
+ key: 0,
810
+ class: "b-listbox-multi-select__option-description",
811
+ el: "span"
812
+ }, {
813
+ default: O(() => [
814
+ z(G(o.description), 1)
815
+ ]),
816
+ _: 2
817
+ }, 1024)) : W("", !0)
818
+ ])
819
+ ], !0)
820
+ ]),
821
+ _: 2
822
+ }, 1032, ["class", "disabled"])) : (g(), L(Z, { key: 1 }, [
823
+ o.items ? (g(), B(C, {
824
+ key: 0,
825
+ category: o,
826
+ "static-categories": e.staticCategories,
827
+ "is-option-disabled": e.isOptionDisabled,
828
+ "selected-items-list": e.selectedItemsList,
829
+ onSelectCategory: (S) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
830
+ onUnselectCategory: (S) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o)
831
+ }, {
832
+ default: O(() => [
833
+ P(n, {
834
+ "category-items": "",
835
+ items: o.items,
836
+ "is-option-disabled": e.isOptionDisabled,
837
+ "is-multi-level": e.isMultiLevel,
838
+ "static-categories": e.staticCategories,
839
+ "selected-items-list": e.selectedItemsList,
840
+ searching: e.searching,
841
+ onToggleCheckboxSelection: t[0] || (t[0] = (S) => e.toggleCheckboxSelection(S))
842
+ }, null, 8, ["items", "is-option-disabled", "is-multi-level", "static-categories", "selected-items-list", "searching"])
843
+ ]),
844
+ _: 2
845
+ }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "onSelectCategory", "onUnselectCategory"])) : (g(), B(a, {
846
+ key: 1,
847
+ class: ve(["b-listbox-multi-select-options", e.conditionalClasses]),
848
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
849
+ }, {
850
+ default: O(() => [
851
+ P(l, {
852
+ "model-value": e.selectedItemsList,
853
+ "aria-label": o.label,
854
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
855
+ value: o.value,
856
+ "onUpdate:modelValue": (S) => e.toggleCheckboxSelection(o)
857
+ }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
858
+ Y(e.$slots, "default", U({ ref_for: !0 }, o), () => [
859
+ F("span", At, [
860
+ P(u, { el: "span" }, {
861
+ default: O(() => [
862
+ z(G(o.label), 1)
863
+ ]),
864
+ _: 2
865
+ }, 1024),
866
+ e.shouldShowDescription(o) ? (g(), B(u, {
867
+ key: 0,
868
+ class: "b-listbox-multi-select__option-description",
869
+ el: "span"
870
+ }, {
871
+ default: O(() => [
872
+ z(G(o.description), 1)
873
+ ]),
874
+ _: 2
875
+ }, 1024)) : W("", !0)
876
+ ])
877
+ ], !0)
878
+ ]),
879
+ _: 2
880
+ }, 1032, ["class", "disabled"]))
881
+ ], 64))
882
+ ]))), 128))
883
+ ]);
884
+ }
885
+ const kt = /* @__PURE__ */ q(Ot, [["render", $t], ["__scopeId", "data-v-25938a72"]]), Bt = (e) => {
886
+ const t = v(() => {
887
+ var c;
888
+ return !!((c = e.value) != null && c.find(({ items: b }) => !!b));
889
+ }), s = v(() => {
890
+ var c;
891
+ return t.value ? (c = e.value) == null ? void 0 : c.reduce((b, i) => (i.items ? b.push(...i.items.flat()) : b.push(i), b), []) : e.value;
892
+ });
893
+ return {
894
+ isMultiLevelSelect: t,
895
+ flattenedItemsList: s
896
+ };
897
+ }, Be = {
898
+ "en-US": {
899
+ allSelected: "All selected ({total})",
900
+ numberOfTotalSelected: "{number} of {total} selected",
901
+ numbersSelected: "{number} selected",
902
+ selectAll: "Select all ({total})"
903
+ }
904
+ }, Rt = { key: 0 }, Dt = { class: "b-listbox-multi-select__chips" }, Mt = {
905
+ key: 2,
906
+ class: "b-listbox-multi-select__divider"
907
+ }, Pt = { i18n: { messages: Be } }, Nt = /* @__PURE__ */ X({
908
+ ...Pt,
909
+ __name: "listbox-multi-select",
910
+ props: {
911
+ hasMoreItems: { type: Boolean, default: !1 },
912
+ isOptionDisabled: { type: Function, default: () => !1 },
913
+ items: {},
914
+ lazyLoadType: { default: "none" },
915
+ searching: { type: Boolean, default: !1 },
916
+ selectedValues: {},
917
+ staticCategories: { type: Boolean, default: !1 }
918
+ },
919
+ emits: ["select"],
920
+ setup(e, { emit: t }) {
921
+ const s = e, c = t, { t: b } = ye({ messages: Be }), i = We(), l = M(null), u = M(null), a = M(null), n = v(() => s.selectedValues.map(({ value: r }) => r)), { isMultiLevelSelect: C, flattenedItemsList: o } = Bt(le(s, "items")), S = (r) => {
922
+ var T;
923
+ const f = s.isOptionDisabled(r), m = ((T = n.value) == null ? void 0 : T.includes(r.value)) || !1;
924
+ return { isDisabled: f, isPreSelected: m };
925
+ }, R = v(() => {
926
+ if (s.searching && C)
927
+ return s.items;
928
+ const r = o.value.filter((f) => {
929
+ const { isDisabled: m, isPreSelected: T } = S(f);
930
+ return m && T || !m;
931
+ });
932
+ return s.selectedValues.forEach((f) => {
933
+ r.find((m) => m.value === f.value) || r.push(f);
934
+ }), r;
935
+ }), $ = v(
936
+ () => {
937
+ var r;
938
+ return (r = R.value) == null ? void 0 : r.filter((f) => {
939
+ var m;
940
+ return f.items && C.value && s.searching ? f.items.filter(
941
+ (_) => (s.selectedValues ?? []).includes(_.value)
942
+ ).length === f.items.length : (m = n.value) == null ? void 0 : m.includes(f.value);
943
+ });
944
+ }
945
+ ), D = () => C.value && !s.searching ? o.value.length : s.items.length, p = v(() => {
946
+ var T;
947
+ const r = R.value.length, f = D(), m = ((T = $.value) == null ? void 0 : T.length) || 0;
948
+ return m === 0 ? b("selectAll", { total: r }) : m === f ? b("allSelected", { total: f }) : m <= f ? b("numberOfTotalSelected", { number: m, total: f }) : b("numbersSelected", { number: m });
949
+ }), y = (r) => {
950
+ const f = (T) => {
951
+ const { isDisabled: _, isPreSelected: j } = S(T);
952
+ return _ && j || !_;
953
+ }, m = r.filter(f).filter((T) => !n.value.includes(T.value));
954
+ c("select", [...s.selectedValues, ...m]);
955
+ }, h = (r) => {
956
+ const f = (_) => {
957
+ const { isDisabled: j, isPreSelected: Ye } = S(_);
958
+ return !(j && Ye);
959
+ }, m = r.filter(f).map(({ value: _ }) => _), T = s.selectedValues.filter((_) => !(m != null && m.includes(_.value)));
960
+ c("select", T);
961
+ }, k = () => {
962
+ y(o.value);
963
+ }, E = () => {
964
+ h(o.value);
965
+ }, { isAllSelected: I, isIndeterminate: V, toggleSelectAll: Q } = $e(
966
+ $,
967
+ R,
968
+ k,
969
+ E
970
+ ), me = (r) => {
971
+ y(r.items);
972
+ }, ue = (r) => {
973
+ h(r.items);
974
+ }, J = (r, f) => {
975
+ let m = !1;
976
+ const T = s.selectedValues.filter(({ value: _ }) => f.value === _ ? (m = !0, !1) : !0);
977
+ m || T.push(f), c(r, T);
978
+ }, N = v(() => {
979
+ if (!C.value)
980
+ return s.selectedValues;
981
+ const r = (_) => n.value.includes(_.value), f = (_) => !s.staticCategories && _.every((j) => r(j));
982
+ return s.items.flatMap(
983
+ (_) => _.items && !f(_.items) ? _.items : _
984
+ ).filter((_) => _.items ? !0 : r(_));
985
+ }), ne = v(() => {
986
+ var m, T, _, j;
987
+ const r = ["automatic", "button"].includes(s.lazyLoadType), f = ((m = s.selectedValues) == null ? void 0 : m.length) > 0 && ((T = $.value) == null ? void 0 : T.length) !== ((_ = o.value) == null ? void 0 : _.length);
988
+ return r && s.hasMoreItems ? !!((j = s.selectedValues) != null && j.length) : f;
989
+ }), Ce = v(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), Re = v(
990
+ () => l.value ? [l.value] : []
991
+ ), De = v(
992
+ () => {
993
+ var r;
994
+ return (r = u.value) != null && r.length ? u.value : [];
995
+ }
996
+ ), Me = v(
997
+ () => {
998
+ var r, f;
999
+ return (f = (r = a.value) == null ? void 0 : r.$children) != null && f.length ? a.value.$children : [];
1000
+ }
1001
+ ), Pe = v(() => ({ label: p, value: I })), Ne = v(() => [
1002
+ ...N.value,
1003
+ Pe,
1004
+ ...o.value
1005
+ ]), we = (r) => {
1006
+ [
1007
+ ...De.value,
1008
+ ...Re.value,
1009
+ ...Me.value
1010
+ ][r].$el.focus();
1011
+ }, { moveToNextElement: Ue, moveToPreviousElement: Ve, moveToFirstElement: Ge, moveToLastElement: ze } = ke(
1012
+ {
1013
+ items: M(Ne),
1014
+ isOptionDisabled: s.isOptionDisabled,
1015
+ hasStaticCategories: le(s, "staticCategories")
1016
+ },
1017
+ we
1018
+ ), Fe = {
1019
+ [K.ARROW_UP]: (r) => Ve(r),
1020
+ [K.ARROW_DOWN]: (r) => Ue(r),
1021
+ [K.HOME]: Ge,
1022
+ [K.END]: ze
1023
+ };
1024
+ return (r, f) => ce((g(), L("div", U({ class: "b-listbox-multi-select" }, se(Fe, !0)), [
1025
+ ne.value ? (g(), L("div", Rt, [
1026
+ F("ul", Dt, [
1027
+ (g(!0), L(Z, null, x(N.value, (m) => (g(), L("li", {
1028
+ key: m.value
1029
+ }, [
1030
+ P(w(Je), {
1031
+ ref_for: !0,
1032
+ ref_key: "selectedListboxItemsRef",
1033
+ ref: u,
1034
+ disabled: r.isOptionDisabled(m),
1035
+ label: m.label,
1036
+ condensed: "",
1037
+ onClick: (T) => m.items ? ue(m) : J("select", m)
1038
+ }, null, 8, ["disabled", "label", "onClick"])
1039
+ ]))), 128))
1040
+ ]),
1041
+ f[4] || (f[4] = F("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1042
+ ])) : W("", !0),
1043
+ Ce.value ? (g(), B(w(de), {
1044
+ key: 1,
1045
+ ref_key: "selectAllListboxItemsRef",
1046
+ ref: l,
1047
+ class: "b-listbox-multi-select__option"
1048
+ }, {
1049
+ default: O(() => [
1050
+ P(w(Se), {
1051
+ "aria-label": p.value,
1052
+ "model-value": w(I),
1053
+ indeterminate: w(V),
1054
+ "onUpdate:modelValue": w(Q)
1055
+ }, null, 8, ["aria-label", "model-value", "indeterminate", "onUpdate:modelValue"]),
1056
+ P(w(oe), {
1057
+ el: "span",
1058
+ "aria-hidden": "true"
1059
+ }, {
1060
+ default: O(() => [
1061
+ z(G(p.value), 1)
1062
+ ]),
1063
+ _: 1
1064
+ })
1065
+ ]),
1066
+ _: 1
1067
+ }, 512)) : W("", !0),
1068
+ Ce.value ? (g(), L("hr", Mt)) : W("", !0),
1069
+ P(w(kt), {
1070
+ ref_key: "listboxItemsRef",
1071
+ ref: a,
1072
+ items: r.items,
1073
+ "is-option-disabled": r.isOptionDisabled,
1074
+ "is-multi-level": w(C),
1075
+ "static-categories": r.staticCategories,
1076
+ searching: r.searching,
1077
+ "selected-items-list": n.value,
1078
+ onToggleCheckboxSelection: f[0] || (f[0] = (m) => J("select", m)),
1079
+ onSelectCategory: me,
1080
+ onUnselectCategory: ue,
1081
+ onSpacePressed: f[1] || (f[1] = (m) => J(w(d).SPACE, m)),
1082
+ onTabPressed: f[2] || (f[2] = (m) => J(w(d).TAB, m)),
1083
+ onEnterPressed: f[3] || (f[3] = (m) => J(w(d).ENTER, m))
1084
+ }, re({ _: 2 }, [
1085
+ x(w(i), (m, T) => ({
1086
+ name: T,
1087
+ fn: O((_) => [
1088
+ Y(r.$slots, T, te(ie(_)), void 0, !0)
1089
+ ])
1090
+ }))
1091
+ ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list"])
1092
+ ], 16)), [
1093
+ [w(pe)]
1094
+ ]);
1095
+ }
1096
+ }), _e = /* @__PURE__ */ q(Nt, [["__scopeId", "data-v-2d553b90"]]), Te = {
1097
+ "en-US": {
1098
+ loading: "Loading",
1099
+ showMore: "Show more"
1100
+ },
1101
+ "ja-JP": {
1102
+ loading: "読み込み中",
1103
+ showMore: "表示内容を増やす"
1104
+ },
1105
+ "pt-BR": {
1106
+ loading: "Carregando",
1107
+ showMore: "Mostrar mais"
1108
+ }
1109
+ }, wt = 36, Ut = X({
1110
+ name: "bento-listbox",
1111
+ components: {
1112
+ BentoEmptyState: He,
1113
+ BentoListboxSingleSelect: Ct,
1114
+ BentoListboxMultiSelect: _e,
1115
+ BentoTypography: oe,
1116
+ BentoLoadingIndicator: je,
1117
+ BentoLoadingButton: et
1118
+ },
1119
+ directives: { BentoKeyboardNavigationDirective: pe },
1120
+ i18n: { messages: Te },
1121
+ props: {
1122
+ /**
1123
+ * Defines a string value that labels an interactive element.
1124
+ */
1125
+ ariaLabel: { type: String, default: null },
1126
+ /**
1127
+ * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
1128
+ */
1129
+ emptyState: {
1130
+ type: Object,
1131
+ default: void 0
1132
+ },
1133
+ /**
1134
+ * Indicates whether there are more items to load
1135
+ */
1136
+ hasMoreItems: { type: Boolean, default: !1 },
1137
+ /**
1138
+ * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
1139
+ */
1140
+ id: { type: String, required: !0 },
1141
+ /**
1142
+ * Function that allows the options to be disabled
1143
+ *
1144
+ * @type {BentoListboxIsOptionDisabled}
1145
+ * @param {BentoListboxOptionItem} option - Listbox option object
1146
+ * @param {string} option.label - Option's label text
1147
+ * @param {string|number} option.value - Option's value
1148
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
1149
+ */
1150
+ isOptionDisabled: {
1151
+ type: Function,
1152
+ default: () => {
1153
+ }
1154
+ },
1155
+ /**
1156
+ * The option elements to populate the listbox with.
1157
+ * It must be an array of {@see BentoListboxOptionItem }
1158
+ * * @property {string} value.label - Text to be displayed in the option
1159
+ * * @property {string,number} value.value - Value of the option
1160
+ */
1161
+ items: {
1162
+ type: Array,
1163
+ required: !0
1164
+ },
1165
+ /**
1166
+ * Indicates if new options are loading.
1167
+ */
1168
+ loading: { type: Boolean, default: !1 },
1169
+ /**
1170
+ * The type of `Lazy Load`.
1171
+ * Type "automatic" will enable infinite scrolling
1172
+ * Type "button" will enable lazy loading with "Show more" button
1173
+ */
1174
+ lazyLoadType: {
1175
+ type: String,
1176
+ default: ee.NONE,
1177
+ validator: (e) => Object.values(ee).includes(e)
1178
+ },
1179
+ /**
1180
+ * If enabled, the user will be able to select multiple items.
1181
+ */
1182
+ multiple: { type: Boolean, default: !1 },
1183
+ /**
1184
+ * If enabled, dropdown will display non-selectable, static categories
1185
+ */
1186
+ staticCategories: { type: Boolean, default: !1 },
1187
+ /**
1188
+ * Messaged displayed when no items are listed in the listbox
1189
+ */
1190
+ noResultsMessage: { type: String, required: !0 },
1191
+ /**
1192
+ * Flag that indicates that an external search it's being made
1193
+ * to filter out the items inside the the multi-select listbox
1194
+ *
1195
+ * If enabled, hides the "Select all" checkbox in "multiple" mode.
1196
+ */
1197
+ searching: _e.props.searching,
1198
+ /**
1199
+ * The `input` value.
1200
+ * Providing an empty string or empty array will select no options.
1201
+ * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1202
+ */
1203
+ selectedValue: {
1204
+ type: Array,
1205
+ default: () => []
1206
+ },
1207
+ /**
1208
+ * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1209
+ * The itemHeight function is used to calculate the height of rendered item given it's index.
1210
+ */
1211
+ virtualScroll: {
1212
+ type: [Boolean, Object],
1213
+ default: !1
1214
+ }
1215
+ },
1216
+ emits: [
1217
+ d.SELECT,
1218
+ d.SPACE,
1219
+ d.SHOW_MORE,
1220
+ d.ENTER,
1221
+ d.ESCAPE,
1222
+ d.TAB
1223
+ ],
1224
+ setup(e, { emit: t, slots: s }) {
1225
+ const c = M([]), b = le(e, "items"), { t: i } = ye({ messages: Te }), l = v(() => e.lazyLoadType !== ee.AUTOMATIC), u = v(() => e.lazyLoadType === ee.AUTOMATIC), a = () => {
1226
+ var N;
1227
+ return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((N = e == null ? void 0 : e.virtualScroll) != null && N.itemHeight) ? e.virtualScroll.itemHeight : wt;
1228
+ }, {
1229
+ containerRef: n,
1230
+ containerProps: C,
1231
+ onScroll: o,
1232
+ list: S,
1233
+ wrapperProps: R
1234
+ } = st(b, {
1235
+ itemHeight: a(),
1236
+ // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1237
+ disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1238
+ }), $ = v(
1239
+ () => l.value ? "true" : void 0
1240
+ ), D = v(
1241
+ () => l.value && e.loading ? "true" : "false"
1242
+ ), p = v(
1243
+ () => l.value ? "polite" : void 0
1244
+ ), y = (N) => (ne) => {
1245
+ t(N, ne);
1246
+ }, h = () => {
1247
+ t(d.SHOW_MORE);
1248
+ }, k = Xe(() => {
1249
+ const N = n.value;
1250
+ if (!N)
1251
+ return;
1252
+ const ne = Math.round(N.scrollTop) + N.clientHeight >= N.scrollHeight;
1253
+ e.hasMoreItems && ne && !e.loading && h();
1254
+ }), E = () => {
1255
+ u.value ? k() : o();
1256
+ }, I = v(() => {
1257
+ var N;
1258
+ return ((N = e.items) == null ? void 0 : N.length) === 0;
1259
+ }), V = v(
1260
+ () => e.lazyLoadType === ee.BUTTON && e.hasMoreItems
1261
+ ), Q = v(
1262
+ () => e.loading ? Ee.LOADING : Ee.START
1263
+ ), me = v(() => e.loading ? i("loading") : i("showMore")), ue = v(() => ({
1264
+ ...e.emptyState,
1265
+ variant: "condensed"
1266
+ })), J = {
1267
+ [d.SELECT]: y(d.SELECT),
1268
+ [d.SPACE]: y(d.SPACE),
1269
+ [d.TAB]: y(d.TAB),
1270
+ [d.ENTER]: y(d.ENTER)
1271
+ };
1272
+ return {
1273
+ // Refs
1274
+ listboxRef: n,
1275
+ listboxItemRef: c,
1276
+ // a11y
1277
+ ariaAtomic: $,
1278
+ ariaBusy: D,
1279
+ ariaLive: p,
1280
+ // Values
1281
+ containerProps: C,
1282
+ isSearchResultEmpty: I,
1283
+ limitedEmptyStateProps: ue,
1284
+ loadingButtonState: Q,
1285
+ slots: s,
1286
+ shouldDisplayShowMoreButton: V,
1287
+ showMoreButtonText: me,
1288
+ virtualisedItems: S,
1289
+ wrapperProps: R,
1290
+ // Enums
1291
+ BentoKeyboardNavigationKeyDownEvent: K,
1292
+ BentoListboxEvent: d,
1293
+ // Methods
1294
+ onListboxContainerScroll: E,
1295
+ onOptionSelected: y,
1296
+ emitShowMore: h,
1297
+ listboxListeners: J
1298
+ };
1299
+ }
1300
+ }), Vt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], Gt = {
1301
+ key: 0,
1302
+ class: "b-listbox__empty-search-message"
1303
+ }, zt = {
1304
+ key: 2,
1305
+ class: "b-listbox__lazy-load"
1306
+ }, Ft = {
1307
+ key: 3,
1308
+ class: "b-listbox__lazy-load"
1309
+ };
1310
+ function Yt(e, t, s, c, b, i) {
1311
+ var R;
1312
+ const l = A("bento-empty-state"), u = A("bento-typography"), a = A("bento-listbox-multi-select"), n = A("bento-listbox-single-select"), C = A("bento-loading-button"), o = A("bento-loading-indicator"), S = Ae("bento-keyboard-navigation-directive");
1313
+ return ce((g(), L("div", {
1314
+ id: e.id,
1315
+ ref: "listboxRef",
1316
+ class: "b-listbox",
1317
+ role: "listbox",
1318
+ tabindex: "-1",
1319
+ "aria-busy": e.ariaBusy,
1320
+ "aria-atomic": e.ariaAtomic,
1321
+ "aria-label": e.ariaLabel,
1322
+ "aria-live": e.ariaLive,
1323
+ style: qe((R = e.containerProps) == null ? void 0 : R.style),
1324
+ onScroll: t[0] || (t[0] = (...$) => e.onListboxContainerScroll && e.onListboxContainerScroll(...$))
1325
+ }, [
1326
+ F("div", te(ie(e.wrapperProps)), [
1327
+ e.isSearchResultEmpty ? (g(), L("div", Gt, [
1328
+ e.emptyState ? (g(), B(l, te(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (g(), B(u, {
1329
+ key: 1,
1330
+ el: "span"
1331
+ }, {
1332
+ default: O(() => [
1333
+ z(G(e.noResultsMessage), 1)
1334
+ ]),
1335
+ _: 1
1336
+ }))
1337
+ ])) : (g(), L(Z, { key: 1 }, [
1338
+ e.multiple ? (g(), B(a, U({
1339
+ key: 0,
1340
+ ref: "listboxItemRef",
1341
+ "has-more-items": e.hasMoreItems,
1342
+ items: e.items,
1343
+ "lazy-load-type": e.lazyLoadType,
1344
+ "static-categories": e.staticCategories,
1345
+ "selected-values": e.selectedValue,
1346
+ searching: e.searching,
1347
+ "is-option-disabled": e.isOptionDisabled
1348
+ }, se(e.listboxListeners)), re({ _: 2 }, [
1349
+ x(e.slots, ($, D) => ({
1350
+ name: D,
1351
+ fn: O((p) => [
1352
+ Y(e.$slots, D, te(ie(p)), void 0, !0)
1353
+ ])
1354
+ }))
1355
+ ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (g(), B(n, U({
1356
+ key: 1,
1357
+ ref: "listboxItemRef",
1358
+ items: e.virtualisedItems,
1359
+ "selected-value": e.selectedValue,
1360
+ "static-categories": e.staticCategories,
1361
+ "is-option-disabled": e.isOptionDisabled
1362
+ }, se(e.listboxListeners)), re({ _: 2 }, [
1363
+ x(e.slots, ($, D) => ({
1364
+ name: D,
1365
+ fn: O((p) => [
1366
+ Y(e.$slots, D, te(ie(p)), void 0, !0)
1367
+ ])
1368
+ }))
1369
+ ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1370
+ e.shouldDisplayShowMoreButton ? (g(), L("div", zt, [
1371
+ P(C, {
1372
+ state: e.loadingButtonState,
1373
+ variant: "secondary",
1374
+ onClickCapture: e.emitShowMore
1375
+ }, {
1376
+ default: O(() => [
1377
+ z(G(e.showMoreButtonText), 1)
1378
+ ]),
1379
+ _: 1
1380
+ }, 8, ["state", "onClickCapture"])
1381
+ ])) : e.loading ? (g(), L("div", Ft, [
1382
+ P(o)
1383
+ ])) : W("", !0)
1384
+ ], 64))
1385
+ ], 16)
1386
+ ], 44, Vt)), [
1387
+ [S]
1388
+ ]);
1389
+ }
1390
+ const ns = /* @__PURE__ */ q(Ut, [["render", Yt], ["__scopeId", "data-v-3d72f45a"]]), ge = (e, t) => {
1391
+ for (const s of e) {
1392
+ if (s.value === t)
1393
+ return s;
1394
+ if (s.items) {
1395
+ const c = ge(s.items, t);
1396
+ if (c)
1397
+ return c;
1398
+ }
1399
+ }
1400
+ return null;
1401
+ }, as = (e, t, s) => {
1402
+ const c = M([]), b = M(), i = (a) => {
1403
+ b.value = s.value ? a.map(({ value: n }) => n) : a[0].value;
1404
+ }, l = (a) => {
1405
+ c.value = a, i(a);
1406
+ }, u = () => {
1407
+ c.value = [], b.value = null;
1408
+ };
1409
+ return Oe(
1410
+ () => t.value,
1411
+ () => {
1412
+ if (!t.value) {
1413
+ u();
1414
+ return;
1415
+ }
1416
+ const a = !Array.isArray(t.value), n = [...c.value];
1417
+ u();
1418
+ const C = (o) => {
1419
+ let S = ge(e.value, o);
1420
+ S || (S = ge(n, o)), S || (S = { value: o, label: o.toString() }), c.value.push(S);
1421
+ };
1422
+ if (a) {
1423
+ const o = t.value;
1424
+ C(o), i(c.value);
1425
+ return;
1426
+ }
1427
+ t.value.forEach(C), i(c.value);
1428
+ },
1429
+ { immediate: !0 }
1430
+ ), {
1431
+ // Values
1432
+ cachedSelectedListboxOptions: c,
1433
+ cachedListboxSelectedValues: b,
1434
+ // Methods
1435
+ resetCache: u,
1436
+ setCachedValues: l
1437
+ };
1438
+ };
1439
+ export {
1440
+ ee as B,
1441
+ d as a,
1442
+ ns as b,
1443
+ as as c,
1444
+ Bt as u
1445
+ };
1446
+ //# sourceMappingURL=use-cached-selected-values.DDP7LJoI.js.map