@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
@@ -1,1595 +0,0 @@
1
- import { computed as m, ref as P, onMounted as Oe, onUnmounted as Fe, watch as Ie, defineComponent as W, resolveComponent as T, createElementBlock as O, openBlock as v, createVNode as B, createElementVNode as q, withCtx as _, createTextVNode as G, toDisplayString as U, renderSlot as z, mergeProps as w, withKeys as ve, createCommentVNode as Y, createBlock as D, withModifiers as Ye, normalizeProps as ee, guardReactiveProps as ne, withDirectives as ae, vShow as Ae, toRef as se, resolveDirective as pe, toHandlers as te, Fragment as J, renderList as x, createSlots as ie, normalizeClass as fe, unref as ce, normalizeStyle as qe } from "vue";
2
- import { B as F, a as Se } from "./keyboard-navigation.CqgGzfZQ.js";
3
- import "./events.FNmSWp_P.js";
4
- import { B as Z } from "./typography.DN5eC5ch.js";
5
- import { B as Ke } from "./loading-indicator.DEepb9Wl.js";
6
- import { B as We } from "./empty-state.DkYtiTHG.js";
7
- import { u as ue } from "./i18n.D9azDLPe.js";
8
- import { d as je } from "./debounce.DUTu11PS.js";
9
- import { B as Ce } from "./checkbox.BllRk82F.js";
10
- import { B as He } from "./base-button.DdNFlbgH.js";
11
- import { C as Xe } from "./cross-small.Z5EKYRm0.js";
12
- import { _ as K } from "./_plugin-vue_export-helper.CHgC5LLL.js";
13
- import { C as Je, a as Ze } from "./chevron-up.Cu9qXgBY.js";
14
- import { d as Qe, e as he } from "./button-actions.BZEKcCbe.js";
15
- import { o as et } from "./resize.Bqks3WUm.js";
16
- import "../assets/use-cached-selected-values.css";
17
- const $e = (e, t, a, c) => {
18
- const b = m(
19
- () => {
20
- var r, n;
21
- return !!((r = e.value) != null && r.length) && ((n = e.value) == null ? void 0 : n.length) === t.value.length;
22
- }
23
- ), o = m(() => {
24
- var r;
25
- return e.value == null || e.value.length === 0 ? !1 : ((r = e.value) == null ? void 0 : r.length) !== t.value.length;
26
- });
27
- return {
28
- isAllSelected: b,
29
- isIndeterminate: o,
30
- toggleSelectAll: (r) => {
31
- r ? a() : c();
32
- }
33
- };
34
- };
35
- function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: b }) {
36
- const o = P(null), s = P([]), r = P(0), n = P(0), i = P(0);
37
- let p;
38
- const l = m(() => {
39
- const y = typeof a == "number" ? e.value.length * a : e.value.reduce((k, C, I) => k + a(I), 0), h = typeof a == "number" ? r.value * a : e.value.slice(0, r.value).reduce((k, C, I) => k + a(I), 0);
40
- return {
41
- style: {
42
- marginTop: `${h}px`,
43
- height: `${y - h}px`
44
- }
45
- };
46
- }), u = () => {
47
- const y = (b == null ? void 0 : b.value) ?? 0, h = Math.max(o.value.scrollTop - y, 0);
48
- if (typeof a == "number")
49
- return Math.floor(h / a);
50
- let k = 0, C = 0;
51
- for (let I = 0; I < e.value.length; I += 1) {
52
- const V = a(I);
53
- if (k += V, k >= h) {
54
- C = I;
55
- break;
56
- }
57
- }
58
- return C;
59
- }, R = () => {
60
- if (i.value = o.value.clientHeight, typeof a == "number")
61
- return Math.ceil(i.value / a);
62
- const y = r.value ?? 0;
63
- let h = 0, k = 0;
64
- for (let C = y; C < e.value.length; C += 1) {
65
- const I = a(C);
66
- if (h += I, k = C, h > i.value)
67
- break;
68
- }
69
- return k - y;
70
- }, $ = () => {
71
- if (o.value) {
72
- const y = R();
73
- r.value = u(), n.value = Math.min(r.value + y + c, e.value.length), s.value = e.value.slice(r.value, n.value);
74
- }
75
- }, M = () => {
76
- $();
77
- };
78
- t || (Oe(() => {
79
- o.value && (i.value = o.value.clientHeight, p = et(o.value, ({ clientHeight: y }) => {
80
- i.value = y, $();
81
- }), $());
82
- }), Fe(() => {
83
- p == null || p.disconnect();
84
- }), Ie(
85
- () => e.value,
86
- () => {
87
- $();
88
- }
89
- ));
90
- const g = {
91
- ref: o,
92
- style: { overflowY: "auto" }
93
- };
94
- return t ? {
95
- containerRef: o,
96
- containerProps: g,
97
- // eslint-disable-next-line @typescript-eslint/no-empty-function
98
- onScroll: () => {
99
- },
100
- list: e
101
- } : {
102
- containerRef: o,
103
- containerProps: g,
104
- onScroll: M,
105
- list: s,
106
- wrapperProps: l
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 || {}), X = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(X || {});
110
- const st = W({
111
- name: "bento-listbox-static-category",
112
- components: {
113
- BentoTypography: Z
114
- },
115
- props: {
116
- /**
117
- * Category label text
118
- */
119
- categoryLabel: {
120
- type: String,
121
- required: !0
122
- }
123
- }
124
- }), lt = { class: "b-listbox-single-select-category" };
125
- function ot(e, t, a, c, b, o) {
126
- const s = T("bento-typography");
127
- return v(), O("div", lt, [
128
- B(s, {
129
- variant: "caption",
130
- el: "span",
131
- class: "b-listbox-single-select-category__label-text"
132
- }, {
133
- default: _(() => [
134
- G(U(e.categoryLabel), 1)
135
- ]),
136
- _: 1
137
- }),
138
- q("div", null, [
139
- z(e.$slots, "default", {}, void 0, !0)
140
- ])
141
- ]);
142
- }
143
- const nt = /* @__PURE__ */ K(st, [["render", ot], ["__scopeId", "data-v-a90eff17"]]), it = W({
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 a = m(() => ({
158
- "b-listbox-option--disabled": e.disabled,
159
- "b-listbox-option--selected": e.selected
160
- }));
161
- return {
162
- // Enums
163
- BentoKeyboardNavigationKeyDownEvent: F,
164
- BentoListboxEvent: d,
165
- // Values
166
- conditionalClasses: a,
167
- // Events
168
- onClick: (o) => {
169
- t(d.CLICK, o);
170
- },
171
- onOptionSelected: (o, s) => {
172
- t(o, s);
173
- }
174
- };
175
- }
176
- });
177
- function at(e, t, a, c, b, o) {
178
- return v(), O("label", w({
179
- class: ["b-listbox-option", e.conditionalClasses],
180
- role: "option"
181
- }, e.$attrs, {
182
- onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s)),
183
- onKeydown: [
184
- t[1] || (t[1] = ve((s) => e.onOptionSelected(e.BentoListboxEvent.ENTER, s), ["enter"])),
185
- t[2] || (t[2] = ve((s) => e.onOptionSelected(e.BentoListboxEvent.SPACE, s), ["space"])),
186
- t[3] || (t[3] = ve((s) => e.onOptionSelected(e.BentoListboxEvent.TAB, s), ["tab"]))
187
- ]
188
- }), [
189
- z(e.$slots, "default", {}, void 0, !0)
190
- ], 16);
191
- }
192
- const de = /* @__PURE__ */ K(it, [["render", at], ["__scopeId", "data-v-18a61f5d"]]);
193
- let Ee = 0;
194
- const rt = {
195
- beforeCreate() {
196
- this.uuid = Ee.toString(), Ee += 1;
197
- }
198
- }, ct = { key: 0 };
199
- function ut(e, t, a, c, b, o) {
200
- return v(), O("svg", w({ 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"] ? (v(), O("title", ct, U(e.$attrs["svg-title"]), 1)) : Y("", !0),
208
- t[0] || (t[0] = q("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 dt = /* @__PURE__ */ K(rt, [["render", ut]]), bt = W({
215
- name: "bento-listbox-single-select-option",
216
- components: {
217
- BentoListboxOption: de,
218
- BentoTypography: Z,
219
- CheckmarkIcon: dt
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 a = (s) => {
242
- e.disabled || t(s, e.option);
243
- }, c = m(() => e.disabled ? !0 : null), b = m(() => e.selected ? !0 : null), o = m(() => e.disabled ? -1 : 0);
244
- return {
245
- // Values
246
- ariaDisabled: c,
247
- ariaSelected: b,
248
- tabIndex: o,
249
- // Enums
250
- BentoListboxEvent: d,
251
- // Events
252
- onOptionSelected: a
253
- };
254
- }
255
- }), mt = { class: "b-listbox-single-select-option__text" }, vt = { class: "b-listbox-single-select-option__check-icon" };
256
- function ft(e, t, a, c, b, o) {
257
- const s = T("bento-typography"), r = T("checkmark-icon"), n = T("bento-listbox-option");
258
- return v(), D(n, {
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] = (i) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
266
- onEnterPressed: t[1] || (t[1] = (i) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
267
- onSpacePressed: t[2] || (t[2] = Ye((i) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
268
- onTabPressed: t[3] || (t[3] = (i) => e.onOptionSelected(e.BentoListboxEvent.TAB))
269
- }, {
270
- default: _(() => [
271
- z(e.$slots, "default", ee(ne(e.option)), () => [
272
- q("span", mt, [
273
- B(s, { el: "span" }, {
274
- default: _(() => [
275
- G(U(e.option.label), 1)
276
- ]),
277
- _: 1
278
- }),
279
- e.option.description ? (v(), D(s, {
280
- key: 0,
281
- class: "b-listbox-single-select-option__description",
282
- el: "span"
283
- }, {
284
- default: _(() => [
285
- G(U(e.option.description), 1)
286
- ]),
287
- _: 1
288
- })) : Y("", !0)
289
- ])
290
- ], !0),
291
- q("span", vt, [
292
- ae(B(r, { "svg-title": "selected" }, null, 512), [
293
- [Ae, e.selected]
294
- ])
295
- ])
296
- ]),
297
- _: 3
298
- }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
299
- }
300
- const gt = /* @__PURE__ */ K(bt, [["render", ft], ["__scopeId", "data-v-226f4c84"]]), ke = ({ items: e, isOptionDisabled: t, hasStaticCategories: a }, c) => {
301
- const b = m(
302
- () => a.value ? e.value.flatMap((g) => g.items) : e.value
303
- ), o = m(() => b.value.length - 1), s = P(0);
304
- Oe(() => {
305
- t && (s.value = e.value.findIndex((g) => !t(g)));
306
- });
307
- const r = (g) => !t || !!t && t(e.value[g]), n = (g) => !t || !!t && !t(e.value[g]), i = (g) => {
308
- switch (g) {
309
- case "increase":
310
- s.value += 1;
311
- break;
312
- case "decrease":
313
- s.value -= 1;
314
- break;
315
- }
316
- }, p = ({ edgeCaseItem: g, isItemBeforeEdgeCaseItem: y }, h, k) => {
317
- s.value !== g && (y ? n(g) && i(k) : (i(k), r(s.value) && h()), c(s.value));
318
- }, l = (g) => {
319
- var h;
320
- (h = g == null ? void 0 : g.detail) == null || h.preventDefault();
321
- const y = s.value === o.value - 2;
322
- p(
323
- {
324
- isItemBeforeEdgeCaseItem: y,
325
- edgeCaseItem: o.value
326
- },
327
- l,
328
- "increase"
329
- /* INCREASE */
330
- );
331
- }, u = (g) => {
332
- var h;
333
- (h = g == null ? void 0 : g.detail) == null || h.preventDefault();
334
- const y = s.value === 1;
335
- p(
336
- {
337
- edgeCaseItem: 0,
338
- isItemBeforeEdgeCaseItem: y
339
- },
340
- u,
341
- "decrease"
342
- /* DECREASE */
343
- );
344
- };
345
- return {
346
- moveToFirstElement: () => {
347
- s.value = 0, r(s.value) ? l() : c(s.value);
348
- },
349
- moveToLastElement: () => {
350
- s.value = o.value, r(s.value) ? u() : c(s.value);
351
- },
352
- moveToNextElement: l,
353
- moveToPreviousElement: u,
354
- setListboxFocusedIndex: (g) => {
355
- s.value = g;
356
- }
357
- };
358
- }, yt = W({
359
- name: "bento-listbox-single-select",
360
- components: {
361
- BentoListboxSingleSelectCategory: nt,
362
- BentoListboxSingleSelectOption: gt
363
- },
364
- directives: { BentoKeyboardNavigationDirective: Se },
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: a, slots: c }) {
407
- const b = P(null), o = P([]), s = m(() => {
408
- var y;
409
- return !!((y = e.selectedValue) != null && y.length) && e.selectedValue.at(0);
410
- }), r = m(() => !!e.items.some(({ items: y }) => !!y)), n = (y) => (h) => {
411
- t(y, [h]);
412
- }, i = (y) => {
413
- var h;
414
- (h = b.value.querySelectorAll('[role="option"]')[y]) == null || h.focus();
415
- }, {
416
- moveToNextElement: p,
417
- moveToPreviousElement: l,
418
- moveToFirstElement: u,
419
- moveToLastElement: R,
420
- setListboxFocusedIndex: $
421
- } = ke(
422
- {
423
- items: se(e, "items"),
424
- isOptionDisabled: e.isOptionDisabled,
425
- hasStaticCategories: se(e, "staticCategories")
426
- },
427
- i
428
- ), M = {
429
- [F.ARROW_UP]: l,
430
- [F.ARROW_DOWN]: p,
431
- [F.HOME]: u,
432
- [F.END]: R
433
- }, g = {
434
- [d.SELECT]: n(d.SELECT),
435
- [d.SPACE]: n(d.SPACE),
436
- [d.TAB]: n(d.TAB),
437
- [d.ENTER]: n(d.ENTER)
438
- };
439
- return a({
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: o,
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: o,
456
- selectedItem: s,
457
- slots: c,
458
- // Computed
459
- hasCategories: r,
460
- // Methods
461
- onOptionSelected: n,
462
- // Keyboard navigation
463
- listboxListeners: M,
464
- listboxOptionListeners: g
465
- };
466
- }
467
- });
468
- function pt(e, t, a, c, b, o) {
469
- const s = T("bento-listbox-single-select-option"), r = T("bento-listbox-single-select-category"), n = pe("bento-keyboard-navigation-directive");
470
- return ae((v(), O("div", w({ ref: "listboxRef" }, te(e.listboxListeners, !0)), [
471
- e.hasCategories && e.staticCategories ? (v(!0), O(J, { key: 0 }, x(e.items, (i) => (v(), D(r, {
472
- key: i.value,
473
- "category-label": i.label,
474
- role: "group"
475
- }, {
476
- default: _(() => [
477
- (v(!0), O(J, null, x(i.items, (p) => (v(), D(s, w({
478
- key: p.value,
479
- ref_for: !0,
480
- ref: "listboxItemRef",
481
- role: "option",
482
- option: p,
483
- disabled: e.isOptionDisabled ? e.isOptionDisabled(p) : null,
484
- selected: p.value === e.selectedItem.value
485
- }, te(e.listboxOptionListeners)), ie({ _: 2 }, [
486
- x(e.slots, (l, u) => ({
487
- name: u,
488
- fn: _((R) => [
489
- z(e.$slots, u, w({ ref_for: !0 }, R))
490
- ])
491
- }))
492
- ]), 1040, ["option", "disabled", "selected"]))), 128))
493
- ]),
494
- _: 2
495
- }, 1032, ["category-label"]))), 128)) : (v(!0), O(J, { key: 1 }, x(e.items, (i) => (v(), D(s, w({
496
- key: i.value,
497
- ref_for: !0,
498
- ref: "listboxItemRef",
499
- role: "option",
500
- option: i,
501
- disabled: e.isOptionDisabled ? e.isOptionDisabled(i) : null,
502
- selected: i.value === e.selectedItem.value
503
- }, te(e.listboxOptionListeners)), ie({ _: 2 }, [
504
- x(e.slots, (p, l) => ({
505
- name: l,
506
- fn: _((u) => [
507
- z(e.$slots, l, w({ ref_for: !0 }, u))
508
- ])
509
- }))
510
- ]), 1040, ["option", "disabled", "selected"]))), 128))
511
- ], 16)), [
512
- [n]
513
- ]);
514
- }
515
- const St = /* @__PURE__ */ K(yt, [["render", pt]]);
516
- var ge = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(ge || {}), oe = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e))(oe || {});
517
- const Ct = {
518
- "en-US": {
519
- categoryClosed: "{category} closed",
520
- categoryOpened: "{category} opened"
521
- }
522
- }, ht = W({
523
- i18n: { messages: Ct },
524
- name: "bento-listbox-multi-select-category",
525
- components: {
526
- BentoCheckbox: Ce,
527
- BentoTypography: Z,
528
- BentoListboxOption: de,
529
- ChevronDownIcon: Ze,
530
- ChevronUpIcon: Je
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: [oe.SELECT_CATEGORY, oe.UNSELECT_CATEGORY],
572
- setup(e, { emit: t }) {
573
- const a = P(!1), { t: c } = ue(), b = (C) => e.isOptionDisabled ? e.isOptionDisabled(C) : !1, o = m(
574
- () => e.category.items.every((C) => b(C))
575
- ), s = se(e, "staticCategories"), r = m(() => a.value || e.staticCategories), n = m(() => ({
576
- [`b-listbox-multi-select-category--${ge.DISABLED}`]: o.value,
577
- [`b-listbox-multi-select-category--${ge.STATIC_CATEGORY}`]: e.staticCategories
578
- })), i = (C) => {
579
- C.preventDefault(), a.value = !a.value;
580
- }, p = (C) => {
581
- var Q;
582
- const I = b(C), V = ((Q = e.selectedItemsList) == null ? void 0 : Q.includes(C.value)) || !1;
583
- return { isDisabled: I, isPreSelected: V };
584
- }, l = m(
585
- () => e.category.items.filter((C) => {
586
- const { isDisabled: I, isPreSelected: V } = p(C);
587
- return I && V || !I;
588
- })
589
- ), u = m(
590
- () => {
591
- var C;
592
- return (C = l.value) == null ? void 0 : C.filter(
593
- ({ value: I }) => {
594
- var V;
595
- return (V = e.selectedItemsList) == null ? void 0 : V.includes(I);
596
- }
597
- );
598
- }
599
- ), R = m(() => {
600
- const C = a.value ? "categoryOpened" : "categoryClosed";
601
- return c(C, { category: e.category.label });
602
- }), $ = m(
603
- () => ({
604
- el: "span",
605
- variant: e.staticCategories ? "caption" : "body"
606
- })
607
- ), M = () => {
608
- t(oe.SELECT_CATEGORY);
609
- }, g = () => {
610
- t(oe.UNSELECT_CATEGORY);
611
- }, { isAllSelected: y, isIndeterminate: h, toggleSelectAll: k } = $e(
612
- u,
613
- l,
614
- M,
615
- g
616
- );
617
- return {
618
- // Values
619
- chevronTitle: R,
620
- conditionalClass: n,
621
- hasAllPropsDisabled: o,
622
- isOpen: a,
623
- isAllSelected: y,
624
- isIndeterminate: h,
625
- isStaticCategory: s,
626
- // Computed
627
- showItemChildren: r,
628
- categoryLabelProps: $,
629
- // Methods
630
- toggleOpen: i,
631
- toggleSelectAll: k
632
- };
633
- }
634
- }), Et = { class: "b-listbox-multi-select-category__label" };
635
- function Lt(e, t, a, c, b, o) {
636
- const s = T("bento-checkbox"), r = T("bento-typography"), n = T("chevron-up-icon"), i = T("chevron-down-icon"), p = T("bento-listbox-option");
637
- return v(), O("div", null, [
638
- B(p, {
639
- class: fe(["b-listbox-multi-select-category__option", e.conditionalClass])
640
- }, {
641
- default: _(() => [
642
- e.isStaticCategory ? Y("", !0) : (v(), D(s, {
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
- q("span", Et, [
652
- B(r, w(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
653
- default: _(() => [
654
- G(U(e.category.label), 1)
655
- ]),
656
- _: 1
657
- }, 16),
658
- e.isStaticCategory ? Y("", !0) : (v(), O("div", {
659
- key: 0,
660
- class: "b-listbox-multi-select-category__label-chevron",
661
- "data-testid": "toggle-listbox",
662
- onClickCapture: t[0] || (t[0] = (...l) => e.toggleOpen && e.toggleOpen(...l))
663
- }, [
664
- e.isOpen ? (v(), D(n, {
665
- key: 0,
666
- "svg-title": e.chevronTitle
667
- }, null, 8, ["svg-title"])) : (v(), D(i, {
668
- key: 1,
669
- "svg-title": e.chevronTitle
670
- }, null, 8, ["svg-title"]))
671
- ], 32))
672
- ])
673
- ]),
674
- _: 1
675
- }, 8, ["class"]),
676
- ae(q("div", null, [
677
- z(e.$slots, "default", {}, void 0, !0)
678
- ], 512), [
679
- [Ae, e.showItemChildren]
680
- ])
681
- ]);
682
- }
683
- const Tt = /* @__PURE__ */ K(ht, [["render", Lt], ["__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 _t = W({
686
- name: "listbox-multi-select-options",
687
- components: {
688
- BentoCheckbox: Ce,
689
- BentoListboxOption: de,
690
- BentoTypography: Z,
691
- ListboxMultiSelectCategory: Tt
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 a = (n) => {
755
- t(H.TOGGLE_CHECKBOX_SELECTION, n);
756
- }, c = (n) => !!n.items, b = (n) => {
757
- const i = e.isMultiLevel && e.searching;
758
- return n.description && (!e.isMultiLevel || i);
759
- }, o = (n) => n.items ? !!n.items.find((i) => e.selectedItemsList.includes(i.value)) : e.selectedItemsList.includes(n.value), s = (n, i) => {
760
- if (c(i))
761
- return t(n ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, i);
762
- a(i.value);
763
- };
764
- return {
765
- // Values
766
- conditionalClasses: m(() => ({
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: o,
772
- shouldShowDescription: b,
773
- toggleCheckboxSelection: a,
774
- selectSearch: s,
775
- // Enums
776
- BentoListboxEvent: d,
777
- ListboxMultiSelectOptionsEvent: H
778
- };
779
- }
780
- }), Ot = { class: "b-listbox-multi-select__option-text" }, It = { class: "b-listbox-multi-select__option-text" };
781
- function At(e, t, a, c, b, o) {
782
- const s = T("bento-checkbox"), r = T("bento-typography"), n = T("bento-listbox-option"), i = T("listbox-multi-select-options", !0), p = T("listbox-multi-select-category");
783
- return v(), O("div", null, [
784
- (v(!0), O(J, null, x(e.items, (l) => (v(), O("div", {
785
- key: `selected-${l.value}`
786
- }, [
787
- e.searching && e.isMultiLevel ? (v(), D(n, {
788
- key: 0,
789
- class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
790
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null
791
- }, {
792
- default: _(() => [
793
- B(s, {
794
- "model-value": e.isOptionSelected(l),
795
- "aria-label": l.label,
796
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
797
- value: l.value,
798
- "onUpdate:modelValue": (u) => e.selectSearch(u, l)
799
- }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
800
- z(e.$slots, "default", w({ ref_for: !0 }, l), () => [
801
- q("span", Ot, [
802
- B(r, { el: "span" }, {
803
- default: _(() => [
804
- G(U(l.label), 1)
805
- ]),
806
- _: 2
807
- }, 1024),
808
- e.shouldShowDescription(l) ? (v(), D(r, {
809
- key: 0,
810
- class: "b-listbox-multi-select__option-description",
811
- el: "span"
812
- }, {
813
- default: _(() => [
814
- G(U(l.description), 1)
815
- ]),
816
- _: 2
817
- }, 1024)) : Y("", !0)
818
- ])
819
- ], !0)
820
- ]),
821
- _: 2
822
- }, 1032, ["class", "disabled"])) : (v(), O(J, { key: 1 }, [
823
- l.items ? (v(), D(p, {
824
- key: 0,
825
- category: l,
826
- "static-categories": e.staticCategories,
827
- "is-option-disabled": e.isOptionDisabled,
828
- "selected-items-list": e.selectedItemsList,
829
- onSelectCategory: (u) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l),
830
- onUnselectCategory: (u) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l)
831
- }, {
832
- default: _(() => [
833
- B(i, {
834
- "category-items": "",
835
- items: l.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] = (u) => e.toggleCheckboxSelection(u))
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"])) : (v(), D(n, {
846
- key: 1,
847
- class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
848
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null
849
- }, {
850
- default: _(() => [
851
- B(s, {
852
- "model-value": e.selectedItemsList,
853
- "aria-label": l.label,
854
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
855
- value: l.value,
856
- "onUpdate:modelValue": (u) => e.toggleCheckboxSelection(l)
857
- }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
858
- z(e.$slots, "default", w({ ref_for: !0 }, l), () => [
859
- q("span", It, [
860
- B(r, { el: "span" }, {
861
- default: _(() => [
862
- G(U(l.label), 1)
863
- ]),
864
- _: 2
865
- }, 1024),
866
- e.shouldShowDescription(l) ? (v(), D(r, {
867
- key: 0,
868
- class: "b-listbox-multi-select__option-description",
869
- el: "span"
870
- }, {
871
- default: _(() => [
872
- G(U(l.description), 1)
873
- ]),
874
- _: 2
875
- }, 1024)) : Y("", !0)
876
- ])
877
- ], !0)
878
- ]),
879
- _: 2
880
- }, 1032, ["class", "disabled"]))
881
- ], 64))
882
- ]))), 128))
883
- ]);
884
- }
885
- const $t = /* @__PURE__ */ K(_t, [["render", At], ["__scopeId", "data-v-25938a72"]]), Be = {
886
- "en-US": {
887
- remove: "Remove"
888
- },
889
- "ja-JP": {
890
- remove: "削除"
891
- },
892
- "pt-BR": {
893
- remove: "Remover"
894
- }
895
- }, kt = { class: "b-listbox-multi-select-chips" }, Bt = {
896
- i18n: { messages: Be }
897
- }, Rt = /* @__PURE__ */ W({
898
- ...Bt,
899
- __name: "listbox-multi-select-chips",
900
- props: {
901
- /**
902
- * Function that defines the options to be disabled
903
- */
904
- isOptionDisabled: {
905
- type: Function,
906
- default: () => !1
907
- },
908
- /**
909
- * The option elements to populate the listbox with.
910
- * It must be an array of {@see BentoListboxOptionItem }.
911
- *
912
- * @property {string} value.label - Text to be displayed in the option
913
- * @property {string,number} value.value - Value of the option
914
- */
915
- items: {
916
- type: Array,
917
- required: !0
918
- }
919
- },
920
- emits: ["unselect-item", "unselect-category"],
921
- setup(e, { emit: t }) {
922
- const a = t, { t: c } = ue({ messages: Be }), b = (o) => o.items ? a("unselect-category", o) : a("unselect-item", o);
923
- return (o, s) => (v(), O("div", kt, [
924
- (v(!0), O(J, null, x(e.items, (r) => (v(), O("div", {
925
- key: `selected-${r.value}`
926
- }, [
927
- B(ce(He), {
928
- class: "b-listbox-multi-select-chips__chip",
929
- disabled: e.isOptionDisabled ? e.isOptionDisabled(r) : null,
930
- onClick: (n) => b(r)
931
- }, {
932
- iconRight: _(() => [
933
- B(ce(Xe), {
934
- "svg-title": ce(c)("remove")
935
- }, null, 8, ["svg-title"])
936
- ]),
937
- default: _(() => [
938
- B(ce(Z), {
939
- el: "span",
940
- variant: "caption",
941
- class: "b-listbox-multi-select-chips__option-text"
942
- }, {
943
- default: _(() => [
944
- G(U(r.label), 1)
945
- ]),
946
- _: 2
947
- }, 1024)
948
- ]),
949
- _: 2
950
- }, 1032, ["disabled", "onClick"])
951
- ]))), 128))
952
- ]));
953
- }
954
- }), Dt = /* @__PURE__ */ K(Rt, [["__scopeId", "data-v-7c5f8bdb"]]), Le = {
955
- "en-US": {
956
- allSelected: "All selected ({total})",
957
- numberOfTotalSelected: "{number} of {total} selected",
958
- numbersSelected: "{number} selected",
959
- selectAll: "Select all ({total})"
960
- }
961
- }, Mt = (e) => {
962
- const t = m(() => {
963
- var c;
964
- return !!((c = e.value) != null && c.find(({ items: b }) => !!b));
965
- }), a = m(() => {
966
- var c;
967
- return t.value ? (c = e.value) == null ? void 0 : c.reduce((b, o) => (o.items ? b.push(...o.items.flat()) : b.push(o), b), []) : e.value;
968
- });
969
- return {
970
- isMultiLevelSelect: t,
971
- flattenedItemsList: a
972
- };
973
- }, Pt = W({
974
- i18n: { messages: Le },
975
- name: "bento-listbox-multi-select",
976
- components: {
977
- BentoCheckbox: Ce,
978
- BentoListboxOption: de,
979
- BentoTypography: Z,
980
- ListboxMultiSelectOptions: $t,
981
- ListboxMultiSelectChips: Dt
982
- },
983
- directives: { BentoKeyboardNavigationDirective: Se },
984
- props: {
985
- /**
986
- * Indicates whether there are more items to load
987
- */
988
- hasMoreItems: { type: Boolean, default: !1 },
989
- /**
990
- * Function that allows the options to be disabled
991
- *
992
- * @type {BentoListboxIsOptionDisabled}
993
- * @param {BentoListboxOptionItem} option - listbox option object
994
- * @param {string} option.label - Option's label text
995
- * @param {string|number} option.value - Option's value
996
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
997
- */
998
- isOptionDisabled: {
999
- type: Function,
1000
- default: () => !1
1001
- },
1002
- /**
1003
- * The option elements to populate the listbox with.
1004
- * It must be an array of {@see BentoListboxOptionItem }.
1005
- *
1006
- * @property {string} value.label - Text to be displayed in the option
1007
- * @property {string,number} value.value - Value of the option
1008
- */
1009
- items: {
1010
- type: Array,
1011
- required: !0
1012
- },
1013
- /**
1014
- * The type of `Lazy Load`.
1015
- * Type "automatic" will enable infinite scrolling
1016
- * Type "button" will enable lazy loading with "Show more" button
1017
- */
1018
- lazyLoadType: {
1019
- type: String,
1020
- default: X.NONE,
1021
- validator: (e) => Object.values(X).includes(e)
1022
- },
1023
- /**
1024
- * Flag that indicates that an external search it's being made
1025
- * to filter out the items inside the the multi-select listbox
1026
- *
1027
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
1028
- */
1029
- searching: { type: Boolean, default: !1 },
1030
- /**
1031
- * The `input` value.
1032
- * Providing an empty array will select no options.
1033
- */
1034
- selectedValues: {
1035
- type: Array,
1036
- required: !0
1037
- },
1038
- /**
1039
- * If enabled, dropdown will display non-selectable, static categories
1040
- */
1041
- staticCategories: { type: Boolean, default: !1 }
1042
- },
1043
- emits: [d.SELECT],
1044
- setup(e, { emit: t, slots: a }) {
1045
- const { t: c } = ue({ messages: Le }), b = P(null), o = P(null), s = P(null), r = m(
1046
- () => e.selectedValues.map(({ value: f }) => f)
1047
- ), { isMultiLevelSelect: n, flattenedItemsList: i } = Mt(se(e, "items")), p = (f) => {
1048
- var A;
1049
- const S = e.isOptionDisabled(f), E = ((A = r.value) == null ? void 0 : A.includes(f.value)) || !1;
1050
- return { isDisabled: S, isPreSelected: E };
1051
- }, l = m(() => {
1052
- if (e.searching && n)
1053
- return e.items;
1054
- const f = i.value.filter((S) => {
1055
- const { isDisabled: E, isPreSelected: A } = p(S);
1056
- return E && A || !E;
1057
- });
1058
- return e.selectedValues.forEach((S) => {
1059
- f.find((E) => E.value === S.value) || f.push(S);
1060
- }), f;
1061
- }), u = m(
1062
- () => {
1063
- var f;
1064
- return (f = l.value) == null ? void 0 : f.filter((S) => {
1065
- var E;
1066
- return S.items && n.value && e.searching ? S.items.filter(
1067
- (L) => (e.selectedValues ?? []).includes(L.value)
1068
- ).length === S.items.length : (E = r.value) == null ? void 0 : E.includes(S.value);
1069
- });
1070
- }
1071
- ), R = () => n.value && !e.searching ? i.value.length : e.items.length, $ = m(() => {
1072
- var A;
1073
- const f = l.value.length, S = R(), E = ((A = u.value) == null ? void 0 : A.length) || 0;
1074
- return E === 0 ? c("selectAll", { total: f }) : E === S ? c("allSelected", { total: S }) : E <= S ? c("numberOfTotalSelected", { number: E, total: S }) : c("numbersSelected", { number: E });
1075
- }), M = (f) => {
1076
- const S = (A) => {
1077
- const { isDisabled: L, isPreSelected: j } = p(A);
1078
- return L && j || !L;
1079
- }, E = f.filter(S).filter((A) => !r.value.includes(A.value));
1080
- t(d.SELECT, [...e.selectedValues, ...E]);
1081
- }, g = (f) => {
1082
- const S = (L) => {
1083
- const { isDisabled: j, isPreSelected: xe } = p(L);
1084
- return !(j && xe);
1085
- }, E = f.filter(S).map(({ value: L }) => L), A = e.selectedValues.filter((L) => !(E != null && E.includes(L.value)));
1086
- t(d.SELECT, A);
1087
- }, y = () => {
1088
- M(i.value);
1089
- }, h = () => {
1090
- g(i.value);
1091
- }, { isAllSelected: k, isIndeterminate: C, toggleSelectAll: I } = $e(
1092
- u,
1093
- l,
1094
- y,
1095
- h
1096
- ), V = (f) => {
1097
- M(f.items);
1098
- }, Q = (f) => {
1099
- g(f.items);
1100
- }, be = (f, S) => {
1101
- let E = !1;
1102
- const A = e.selectedValues.filter(({ value: L }) => S.value === L ? (E = !0, !1) : !0);
1103
- E || A.push(S), t(f, A);
1104
- }, re = m(() => {
1105
- if (!n.value)
1106
- return e.selectedValues;
1107
- const f = (L) => r.value.includes(L.value), S = (L) => !e.staticCategories && L.every((j) => f(j));
1108
- return e.items.flatMap(
1109
- (L) => L.items && !S(L.items) ? L.items : L
1110
- ).filter((L) => L.items ? !0 : f(L));
1111
- }), me = m(() => {
1112
- var E, A, L, j;
1113
- const f = ["automatic", "button"].includes(e.lazyLoadType), S = ((E = e.selectedValues) == null ? void 0 : E.length) > 0 && ((A = u.value) == null ? void 0 : A.length) !== ((L = i.value) == null ? void 0 : L.length);
1114
- return f && e.hasMoreItems ? !!((j = e.selectedValues) != null && j.length) : S;
1115
- }), N = m(() => ["automatic", "button"].includes(e.lazyLoadType) ? !e.hasMoreItems : !0), le = m(
1116
- () => b.value ? [b.value] : []
1117
- ), Re = m(
1118
- () => {
1119
- var f, S;
1120
- return (S = (f = o.value) == null ? void 0 : f.$children) != null && S.length ? o.value.$children : [];
1121
- }
1122
- ), De = m(
1123
- () => {
1124
- var f, S;
1125
- return (S = (f = s.value) == null ? void 0 : f.$children) != null && S.length ? s.value.$children : [];
1126
- }
1127
- ), Me = m(() => ({ label: $, value: k })), Pe = m(() => [
1128
- Me,
1129
- ...re.value,
1130
- ...i.value
1131
- ]), Ne = (f) => {
1132
- [
1133
- ...le.value,
1134
- ...Re.value,
1135
- ...De.value
1136
- ][f].$el.focus();
1137
- }, { moveToNextElement: we, moveToPreviousElement: Ue, moveToFirstElement: Ve, moveToLastElement: Ge } = ke(
1138
- {
1139
- items: P(Pe),
1140
- isOptionDisabled: e.isOptionDisabled,
1141
- hasStaticCategories: se(e, "staticCategories")
1142
- },
1143
- Ne
1144
- ), ze = {
1145
- [F.ARROW_UP]: (f) => Ue(f),
1146
- [F.ARROW_DOWN]: (f) => we(f),
1147
- [F.HOME]: Ve,
1148
- [F.END]: Ge
1149
- };
1150
- return {
1151
- // Refs
1152
- selectAllListboxItemsRef: b,
1153
- selectedListboxItemsRef: o,
1154
- listboxItemsRef: s,
1155
- // Values
1156
- isAllSelected: k,
1157
- showSelectedItems: me,
1158
- isIndeterminate: C,
1159
- isMultiLevelSelect: n,
1160
- flattenedItemsList: i,
1161
- selectedItemsList: r,
1162
- selectAllCheckboxText: $,
1163
- selectedOptions: re,
1164
- showSelectAllCheckbox: N,
1165
- slots: a,
1166
- // Enums
1167
- BentoListboxEvent: d,
1168
- // Methods
1169
- selectAllCategory: V,
1170
- toggleCheckboxSelection: be,
1171
- toggleSelectAll: I,
1172
- unselectAllCategory: Q,
1173
- // Events
1174
- listboxListeners: ze
1175
- };
1176
- }
1177
- }), Nt = {
1178
- key: 1,
1179
- class: "b-listbox-multi-select__divider"
1180
- }, wt = { key: 2 };
1181
- function Ut(e, t, a, c, b, o) {
1182
- const s = T("bento-checkbox"), r = T("bento-typography"), n = T("bento-listbox-option"), i = T("listbox-multi-select-chips"), p = T("listbox-multi-select-options"), l = pe("bento-keyboard-navigation-directive");
1183
- return ae((v(), O("div", w({ class: "b-listbox-multi-select" }, te(e.listboxListeners, !0)), [
1184
- e.showSelectAllCheckbox ? (v(), D(n, {
1185
- key: 0,
1186
- ref: "selectAllListboxItemsRef",
1187
- class: "b-listbox-multi-select__option"
1188
- }, {
1189
- default: _(() => [
1190
- B(s, {
1191
- "aria-label": e.selectAllCheckboxText,
1192
- "model-value": e.isAllSelected,
1193
- indeterminate: e.isIndeterminate,
1194
- "onUpdate:modelValue": e.toggleSelectAll
1195
- }, null, 8, ["aria-label", "model-value", "indeterminate", "onUpdate:modelValue"]),
1196
- B(r, {
1197
- el: "span",
1198
- "aria-hidden": "true"
1199
- }, {
1200
- default: _(() => [
1201
- G(U(e.selectAllCheckboxText), 1)
1202
- ]),
1203
- _: 1
1204
- })
1205
- ]),
1206
- _: 1
1207
- }, 512)) : Y("", !0),
1208
- e.showSelectAllCheckbox ? (v(), O("hr", Nt)) : Y("", !0),
1209
- e.showSelectedItems ? (v(), O("div", wt, [
1210
- B(i, {
1211
- ref: "selectedListboxItemsRef",
1212
- items: e.selectedOptions,
1213
- "is-option-disabled": e.isOptionDisabled,
1214
- onUnselectCategory: e.unselectAllCategory,
1215
- onUnselectItem: t[0] || (t[0] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, u))
1216
- }, null, 8, ["items", "is-option-disabled", "onUnselectCategory"]),
1217
- t[5] || (t[5] = q("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1218
- ])) : Y("", !0),
1219
- B(p, {
1220
- ref: "listboxItemsRef",
1221
- items: e.items,
1222
- "is-option-disabled": e.isOptionDisabled,
1223
- "is-multi-level": e.isMultiLevelSelect,
1224
- "static-categories": e.staticCategories,
1225
- searching: e.searching,
1226
- "selected-items-list": e.selectedItemsList,
1227
- onToggleCheckboxSelection: t[1] || (t[1] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, u)),
1228
- onSelectCategory: e.selectAllCategory,
1229
- onUnselectCategory: e.unselectAllCategory,
1230
- onSpacePressed: t[2] || (t[2] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, u)),
1231
- onTabPressed: t[3] || (t[3] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, u)),
1232
- onEnterPressed: t[4] || (t[4] = (u) => e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, u))
1233
- }, ie({ _: 2 }, [
1234
- x(e.slots, (u, R) => ({
1235
- name: R,
1236
- fn: _(($) => [
1237
- z(e.$slots, R, ee(ne($)), void 0, !0)
1238
- ])
1239
- }))
1240
- ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "onSelectCategory", "onUnselectCategory"])
1241
- ], 16)), [
1242
- [l]
1243
- ]);
1244
- }
1245
- const Te = /* @__PURE__ */ K(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857"]]), _e = {
1246
- "en-US": {
1247
- loading: "Loading",
1248
- showMore: "Show more"
1249
- },
1250
- "ja-JP": {
1251
- loading: "読み込み中",
1252
- showMore: "表示内容を増やす"
1253
- },
1254
- "pt-BR": {
1255
- loading: "Carregando",
1256
- showMore: "Mostrar mais"
1257
- }
1258
- }, Vt = 36, Gt = W({
1259
- name: "bento-listbox",
1260
- components: {
1261
- BentoEmptyState: We,
1262
- BentoListboxSingleSelect: St,
1263
- BentoListboxMultiSelect: Te,
1264
- BentoTypography: Z,
1265
- BentoLoadingIndicator: Ke,
1266
- BentoLoadingButton: Qe
1267
- },
1268
- directives: { BentoKeyboardNavigationDirective: Se },
1269
- i18n: { messages: _e },
1270
- props: {
1271
- /**
1272
- * Defines a string value that labels an interactive element.
1273
- */
1274
- ariaLabel: { type: String, default: null },
1275
- /**
1276
- * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
1277
- */
1278
- emptyState: {
1279
- type: Object,
1280
- default: void 0
1281
- },
1282
- /**
1283
- * Indicates whether there are more items to load
1284
- */
1285
- hasMoreItems: { type: Boolean, default: !1 },
1286
- /**
1287
- * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
1288
- */
1289
- id: { type: String, required: !0 },
1290
- /**
1291
- * Function that allows the options to be disabled
1292
- *
1293
- * @type {BentoListboxIsOptionDisabled}
1294
- * @param {BentoListboxOptionItem} option - Listbox option object
1295
- * @param {string} option.label - Option's label text
1296
- * @param {string|number} option.value - Option's value
1297
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
1298
- */
1299
- isOptionDisabled: {
1300
- type: Function,
1301
- default: () => {
1302
- }
1303
- },
1304
- /**
1305
- * The option elements to populate the listbox with.
1306
- * It must be an array of {@see BentoListboxOptionItem }
1307
- * * @property {string} value.label - Text to be displayed in the option
1308
- * * @property {string,number} value.value - Value of the option
1309
- */
1310
- items: {
1311
- type: Array,
1312
- required: !0
1313
- },
1314
- /**
1315
- * Indicates if new options are loading.
1316
- */
1317
- loading: { type: Boolean, default: !1 },
1318
- /**
1319
- * The type of `Lazy Load`.
1320
- * Type "automatic" will enable infinite scrolling
1321
- * Type "button" will enable lazy loading with "Show more" button
1322
- */
1323
- lazyLoadType: {
1324
- type: String,
1325
- default: X.NONE,
1326
- validator: (e) => Object.values(X).includes(e)
1327
- },
1328
- /**
1329
- * If enabled, the user will be able to select multiple items.
1330
- */
1331
- multiple: { type: Boolean, default: !1 },
1332
- /**
1333
- * If enabled, dropdown will display non-selectable, static categories
1334
- */
1335
- staticCategories: { type: Boolean, default: !1 },
1336
- /**
1337
- * Messaged displayed when no items are listed in the listbox
1338
- */
1339
- noResultsMessage: { type: String, required: !0 },
1340
- /**
1341
- * Flag that indicates that an external search it's being made
1342
- * to filter out the items inside the the multi-select listbox
1343
- *
1344
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
1345
- */
1346
- searching: Te.props.searching,
1347
- /**
1348
- * The `input` value.
1349
- * Providing an empty string or empty array will select no options.
1350
- * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1351
- */
1352
- selectedValue: {
1353
- type: Array,
1354
- default: () => []
1355
- },
1356
- /**
1357
- * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1358
- * The itemHeight function is used to calculate the height of rendered item given it's index.
1359
- */
1360
- virtualScroll: {
1361
- type: [Boolean, Object],
1362
- default: !1
1363
- }
1364
- },
1365
- emits: [
1366
- d.SELECT,
1367
- d.SPACE,
1368
- d.SHOW_MORE,
1369
- d.ENTER,
1370
- d.ESCAPE,
1371
- d.TAB
1372
- ],
1373
- setup(e, { emit: t, slots: a }) {
1374
- const c = P([]), b = se(e, "items"), { t: o } = ue({ messages: _e }), s = m(() => e.lazyLoadType !== X.AUTOMATIC), r = m(() => e.lazyLoadType === X.AUTOMATIC), n = () => {
1375
- var N;
1376
- return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((N = e == null ? void 0 : e.virtualScroll) != null && N.itemHeight) ? e.virtualScroll.itemHeight : Vt;
1377
- }, {
1378
- containerRef: i,
1379
- containerProps: p,
1380
- onScroll: l,
1381
- list: u,
1382
- wrapperProps: R
1383
- } = tt(b, {
1384
- itemHeight: n(),
1385
- // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1386
- disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1387
- }), $ = m(
1388
- () => s.value ? "true" : void 0
1389
- ), M = m(
1390
- () => s.value && e.loading ? "true" : "false"
1391
- ), g = m(
1392
- () => s.value ? "polite" : void 0
1393
- ), y = (N) => (le) => {
1394
- t(N, le);
1395
- }, h = () => {
1396
- t(d.SHOW_MORE);
1397
- }, k = je(() => {
1398
- const N = i.value;
1399
- if (!N)
1400
- return;
1401
- const le = Math.round(N.scrollTop) + N.clientHeight >= N.scrollHeight;
1402
- e.hasMoreItems && le && !e.loading && h();
1403
- }), C = () => {
1404
- r.value ? k() : l();
1405
- }, I = m(() => {
1406
- var N;
1407
- return ((N = e.items) == null ? void 0 : N.length) === 0;
1408
- }), V = m(
1409
- () => e.lazyLoadType === X.BUTTON && e.hasMoreItems
1410
- ), Q = m(
1411
- () => e.loading ? he.LOADING : he.START
1412
- ), be = m(() => e.loading ? o("loading") : o("showMore")), re = m(() => ({
1413
- ...e.emptyState,
1414
- variant: "condensed"
1415
- })), me = {
1416
- [d.SELECT]: y(d.SELECT),
1417
- [d.SPACE]: y(d.SPACE),
1418
- [d.TAB]: y(d.TAB),
1419
- [d.ENTER]: y(d.ENTER)
1420
- };
1421
- return {
1422
- // Refs
1423
- listboxRef: i,
1424
- listboxItemRef: c,
1425
- // a11y
1426
- ariaAtomic: $,
1427
- ariaBusy: M,
1428
- ariaLive: g,
1429
- // Values
1430
- containerProps: p,
1431
- isSearchResultEmpty: I,
1432
- limitedEmptyStateProps: re,
1433
- loadingButtonState: Q,
1434
- slots: a,
1435
- shouldDisplayShowMoreButton: V,
1436
- showMoreButtonText: be,
1437
- virtualisedItems: u,
1438
- wrapperProps: R,
1439
- // Enums
1440
- BentoKeyboardNavigationKeyDownEvent: F,
1441
- BentoListboxEvent: d,
1442
- // Methods
1443
- onListboxContainerScroll: C,
1444
- onOptionSelected: y,
1445
- emitShowMore: h,
1446
- listboxListeners: me
1447
- };
1448
- }
1449
- }), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], xt = {
1450
- key: 0,
1451
- class: "b-listbox__empty-search-message"
1452
- }, Ft = {
1453
- key: 2,
1454
- class: "b-listbox__lazy-load"
1455
- }, Yt = {
1456
- key: 3,
1457
- class: "b-listbox__lazy-load"
1458
- };
1459
- function qt(e, t, a, c, b, o) {
1460
- var R;
1461
- const s = T("bento-empty-state"), r = T("bento-typography"), n = T("bento-listbox-multi-select"), i = T("bento-listbox-single-select"), p = T("bento-loading-button"), l = T("bento-loading-indicator"), u = pe("bento-keyboard-navigation-directive");
1462
- return ae((v(), O("div", {
1463
- id: e.id,
1464
- ref: "listboxRef",
1465
- class: "b-listbox",
1466
- role: "listbox",
1467
- tabindex: "-1",
1468
- "aria-busy": e.ariaBusy,
1469
- "aria-atomic": e.ariaAtomic,
1470
- "aria-label": e.ariaLabel,
1471
- "aria-live": e.ariaLive,
1472
- style: qe((R = e.containerProps) == null ? void 0 : R.style),
1473
- onScroll: t[0] || (t[0] = (...$) => e.onListboxContainerScroll && e.onListboxContainerScroll(...$))
1474
- }, [
1475
- q("div", ee(ne(e.wrapperProps)), [
1476
- e.isSearchResultEmpty ? (v(), O("div", xt, [
1477
- e.emptyState ? (v(), D(s, ee(w({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (v(), D(r, {
1478
- key: 1,
1479
- el: "span"
1480
- }, {
1481
- default: _(() => [
1482
- G(U(e.noResultsMessage), 1)
1483
- ]),
1484
- _: 1
1485
- }))
1486
- ])) : (v(), O(J, { key: 1 }, [
1487
- e.multiple ? (v(), D(n, w({
1488
- key: 0,
1489
- ref: "listboxItemRef",
1490
- "has-more-items": e.hasMoreItems,
1491
- items: e.items,
1492
- "lazy-load-type": e.lazyLoadType,
1493
- "static-categories": e.staticCategories,
1494
- "selected-values": e.selectedValue,
1495
- searching: e.searching,
1496
- "is-option-disabled": e.isOptionDisabled
1497
- }, te(e.listboxListeners)), ie({ _: 2 }, [
1498
- x(e.slots, ($, M) => ({
1499
- name: M,
1500
- fn: _((g) => [
1501
- z(e.$slots, M, ee(ne(g)), void 0, !0)
1502
- ])
1503
- }))
1504
- ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (v(), D(i, w({
1505
- key: 1,
1506
- ref: "listboxItemRef",
1507
- items: e.virtualisedItems,
1508
- "selected-value": e.selectedValue,
1509
- "static-categories": e.staticCategories,
1510
- "is-option-disabled": e.isOptionDisabled
1511
- }, te(e.listboxListeners)), ie({ _: 2 }, [
1512
- x(e.slots, ($, M) => ({
1513
- name: M,
1514
- fn: _((g) => [
1515
- z(e.$slots, M, ee(ne(g)), void 0, !0)
1516
- ])
1517
- }))
1518
- ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1519
- e.shouldDisplayShowMoreButton ? (v(), O("div", Ft, [
1520
- B(p, {
1521
- state: e.loadingButtonState,
1522
- variant: "secondary",
1523
- onClickCapture: e.emitShowMore
1524
- }, {
1525
- default: _(() => [
1526
- G(U(e.showMoreButtonText), 1)
1527
- ]),
1528
- _: 1
1529
- }, 8, ["state", "onClickCapture"])
1530
- ])) : e.loading ? (v(), O("div", Yt, [
1531
- B(l)
1532
- ])) : Y("", !0)
1533
- ], 64))
1534
- ], 16)
1535
- ], 44, zt)), [
1536
- [u]
1537
- ]);
1538
- }
1539
- const as = /* @__PURE__ */ K(Gt, [["render", qt], ["__scopeId", "data-v-3d72f45a"]]), ye = (e, t) => {
1540
- for (const a of e) {
1541
- if (a.value === t)
1542
- return a;
1543
- if (a.items) {
1544
- const c = ye(a.items, t);
1545
- if (c)
1546
- return c;
1547
- }
1548
- }
1549
- return null;
1550
- }, rs = (e, t, a) => {
1551
- const c = P([]), b = P(), o = (n) => {
1552
- b.value = a.value ? n.map(({ value: i }) => i) : n[0].value;
1553
- }, s = (n) => {
1554
- c.value = n, o(n);
1555
- }, r = () => {
1556
- c.value = [], b.value = null;
1557
- };
1558
- return Ie(
1559
- () => t.value,
1560
- () => {
1561
- if (!t.value) {
1562
- r();
1563
- return;
1564
- }
1565
- const n = !Array.isArray(t.value), i = [...c.value];
1566
- r();
1567
- const p = (l) => {
1568
- let u = ye(e.value, l);
1569
- u || (u = ye(i, l)), u || (u = { value: l, label: l.toString() }), c.value.push(u);
1570
- };
1571
- if (n) {
1572
- const l = t.value;
1573
- p(l), o(c.value);
1574
- return;
1575
- }
1576
- t.value.forEach(p), o(c.value);
1577
- },
1578
- { immediate: !0 }
1579
- ), {
1580
- // Values
1581
- cachedSelectedListboxOptions: c,
1582
- cachedListboxSelectedValues: b,
1583
- // Methods
1584
- resetCache: r,
1585
- setCachedValues: s
1586
- };
1587
- };
1588
- export {
1589
- X as B,
1590
- d as a,
1591
- as as b,
1592
- rs as c,
1593
- Mt as u
1594
- };
1595
- //# sourceMappingURL=use-cached-selected-values.CxAhnNa6.js.map