@adyen/bento-vue3 1.49.0 → 1.51.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 (307) hide show
  1. package/dist/@types/index.d.ts +441 -657
  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/card.css +1 -1
  10. package/dist/assets/checkbox-input.css +1 -1
  11. package/dist/assets/copy.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/date-range-picker.css +1 -1
  14. package/dist/assets/dialog-page.css +1 -1
  15. package/dist/assets/dropdown.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/filter-bar.css +1 -1
  18. package/dist/assets/header.css +1 -1
  19. package/dist/assets/input-field-password.css +1 -1
  20. package/dist/assets/input-field.css +1 -1
  21. package/dist/assets/inspector.css +1 -1
  22. package/dist/assets/link.css +1 -1
  23. package/dist/assets/menu.css +1 -1
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/pagination.css +1 -1
  26. package/dist/assets/payment-method.css +1 -1
  27. package/dist/assets/popover.css +1 -1
  28. package/dist/assets/search-bar.css +1 -1
  29. package/dist/assets/sidepanel.css +1 -1
  30. package/dist/assets/timeline-item.css +1 -1
  31. package/dist/assets/toggle-button.css +1 -1
  32. package/dist/assets/tutorial.css +1 -1
  33. package/dist/assets/use-cached-selected-values.css +1 -1
  34. package/dist/button.js +3 -3
  35. package/dist/card.js +1 -1
  36. package/dist/checkbox.js +3 -3
  37. package/dist/chip.js +1 -1
  38. package/dist/chunks/{accordion-item.Cf184uiI.js → accordion-item.DLyCF015.js} +2 -2
  39. package/dist/chunks/{accordion-item.Cf184uiI.js.map → accordion-item.DLyCF015.js.map} +1 -1
  40. package/dist/chunks/{action-bar.r_Vt4XIu.js → action-bar.BW9db7ja.js} +6 -6
  41. package/dist/chunks/{action-bar.r_Vt4XIu.js.map → action-bar.BW9db7ja.js.map} +1 -1
  42. package/dist/chunks/{alert.Dd2DYCZ1.js → alert.eqWeCHyL.js} +25 -24
  43. package/dist/chunks/alert.eqWeCHyL.js.map +1 -0
  44. package/dist/chunks/{base-modal.Bis0B1AC.js → base-modal.BRYHc9Ez.js} +5 -5
  45. package/dist/chunks/{base-modal.Bis0B1AC.js.map → base-modal.BRYHc9Ez.js.map} +1 -1
  46. package/dist/chunks/{button-actions-with-menu.C5LguXWO.js → button-actions-with-menu.Hl8tUKa4.js} +4 -4
  47. package/dist/chunks/{button-actions-with-menu.C5LguXWO.js.map → button-actions-with-menu.Hl8tUKa4.js.map} +1 -1
  48. package/dist/chunks/{button-actions.ncthaz2m.js → button-actions.BPnsl_QP.js} +4 -4
  49. package/dist/chunks/{button-actions.ncthaz2m.js.map → button-actions.BPnsl_QP.js.map} +1 -1
  50. package/dist/chunks/{button.Cneb6rPP.js → button.6HMG0xEY.js} +2 -2
  51. package/dist/chunks/{button.Cneb6rPP.js.map → button.6HMG0xEY.js.map} +1 -1
  52. package/dist/chunks/{calendar.BdLQOioy.js → calendar.DfN1__E_.js} +3 -3
  53. package/dist/chunks/{calendar.BdLQOioy.js.map → calendar.DfN1__E_.js.map} +1 -1
  54. package/dist/chunks/{card.BAg7yMMT.js → card.BwC4MSjn.js} +3 -3
  55. package/dist/chunks/{card.BAg7yMMT.js.map → card.BwC4MSjn.js.map} +1 -1
  56. package/dist/chunks/{checkbox-group.CxWYSBy1.js → checkbox-group.Bzd-qpJ-.js} +4 -4
  57. package/dist/chunks/{checkbox-group.CxWYSBy1.js.map → checkbox-group.Bzd-qpJ-.js.map} +1 -1
  58. package/dist/chunks/{checkbox-input.CAYgiRHG.js → checkbox-input.XtCjXis9.js} +12 -11
  59. package/dist/chunks/checkbox-input.XtCjXis9.js.map +1 -0
  60. package/dist/chunks/{checkbox.bXN3Yann.js → checkbox.DJRe4ync.js} +17 -17
  61. package/dist/chunks/{checkbox.bXN3Yann.js.map → checkbox.DJRe4ync.js.map} +1 -1
  62. package/dist/chunks/{checkmark-circle-fill.g_tcBhFJ.js → checkmark-circle-fill.D9gNCN0T.js} +4 -4
  63. package/dist/chunks/checkmark-circle-fill.D9gNCN0T.js.map +1 -0
  64. package/dist/chunks/{checkmark-small.BDqUF-Ni.js → checkmark-small.D7l69yBf.js} +4 -4
  65. package/dist/chunks/checkmark-small.D7l69yBf.js.map +1 -0
  66. package/dist/chunks/{chevron-left.CYEK2UTr.js → chevron-left.BF63HtOH.js} +6 -6
  67. package/dist/chunks/chevron-left.BF63HtOH.js.map +1 -0
  68. package/dist/chunks/{chevron-up.Cu9qXgBY.js → chevron-up.-0oLlHmh.js} +6 -6
  69. package/dist/chunks/chevron-up.-0oLlHmh.js.map +1 -0
  70. package/dist/chunks/chip.3T0x6FuI.js +74 -0
  71. package/dist/chunks/chip.3T0x6FuI.js.map +1 -0
  72. package/dist/chunks/{code-snippet.baKzBaM6.js → code-snippet.0HhLVaJR.js} +7 -7
  73. package/dist/chunks/{code-snippet.baKzBaM6.js.map → code-snippet.0HhLVaJR.js.map} +1 -1
  74. package/dist/chunks/{controls-group.BnbQO34k.js → controls-group.DnX2B502.js} +2 -2
  75. package/dist/chunks/{controls-group.BnbQO34k.js.map → controls-group.DnX2B502.js.map} +1 -1
  76. package/dist/chunks/{copy.CXCdp5ly.js → copy.BzeHBtEF.js} +10 -9
  77. package/dist/chunks/copy.BzeHBtEF.js.map +1 -0
  78. package/dist/chunks/{cross-circle-fill-small.CJyARMSZ.js → cross-circle-fill-small.mY6ihJcA.js} +4 -4
  79. package/dist/chunks/cross-circle-fill-small.mY6ihJcA.js.map +1 -0
  80. package/dist/chunks/{cross-circle-fill.BzSjakuO.js → cross-circle-fill.DLWo6wBR.js} +4 -4
  81. package/dist/chunks/cross-circle-fill.DLWo6wBR.js.map +1 -0
  82. package/dist/chunks/{cross-small.Z5EKYRm0.js → cross-small.CFrBIeYK.js} +4 -4
  83. package/dist/chunks/cross-small.CFrBIeYK.js.map +1 -0
  84. package/dist/chunks/{cross.BZYw4R3N.js → cross.CbLEjiVy.js} +4 -4
  85. package/dist/chunks/cross.CbLEjiVy.js.map +1 -0
  86. package/dist/chunks/{dashboard-section.B87x4XsH.js → dashboard-section.CySxZmlx.js} +3 -3
  87. package/dist/chunks/{dashboard-section.B87x4XsH.js.map → dashboard-section.CySxZmlx.js.map} +1 -1
  88. package/dist/chunks/{dashed-underline.dWsHmwUp.js → dashed-underline.CCKLdMc7.js} +3 -3
  89. package/dist/chunks/{dashed-underline.dWsHmwUp.js.map → dashed-underline.CCKLdMc7.js.map} +1 -1
  90. package/dist/chunks/{data-grid-template.CZrGeSxR.js → data-grid-template.iM84gKjt.js} +3 -3
  91. package/dist/chunks/{data-grid-template.CZrGeSxR.js.map → data-grid-template.iM84gKjt.js.map} +1 -1
  92. package/dist/chunks/{data-grid.Duvh6mRu.js → data-grid.B2L_4qN7.js} +903 -923
  93. package/dist/chunks/data-grid.B2L_4qN7.js.map +1 -0
  94. package/dist/chunks/{date-picker.DXrMLxD0.js → date-picker.CMi0Kuy3.js} +5 -5
  95. package/dist/chunks/{date-picker.DXrMLxD0.js.map → date-picker.CMi0Kuy3.js.map} +1 -1
  96. package/dist/chunks/{date-range-picker.D7BDFoqM.js → date-range-picker.-KwSzmW_.js} +194 -193
  97. package/dist/chunks/date-range-picker.-KwSzmW_.js.map +1 -0
  98. package/dist/chunks/{dialog-page.D_r_CbyD.js → dialog-page.CXQafL9G.js} +5 -4
  99. package/dist/chunks/dialog-page.CXQafL9G.js.map +1 -0
  100. package/dist/chunks/{dot.cpdFEk6G.js → dot.BW-xtyjC.js} +4 -4
  101. package/dist/chunks/dot.BW-xtyjC.js.map +1 -0
  102. package/dist/chunks/{dropdown-default-textbox.BpvVMlcX.js → dropdown-default-textbox.Filez078.js} +4 -4
  103. package/dist/chunks/{dropdown-default-textbox.BpvVMlcX.js.map → dropdown-default-textbox.Filez078.js.map} +1 -1
  104. package/dist/chunks/{dropdown-tag.DrBFdX2o.js → dropdown-tag.B4-3z8xz.js} +4 -4
  105. package/dist/chunks/{dropdown-tag.DrBFdX2o.js.map → dropdown-tag.B4-3z8xz.js.map} +1 -1
  106. package/dist/chunks/{dropdown.CWq-VlFX.js → dropdown.CRLx2Juh.js} +333 -325
  107. package/dist/chunks/dropdown.CRLx2Juh.js.map +1 -0
  108. package/dist/chunks/{empty-state.C2ancCe6.js → empty-state.BffIZp3a.js} +2 -2
  109. package/dist/chunks/{empty-state.C2ancCe6.js.map → empty-state.BffIZp3a.js.map} +1 -1
  110. package/dist/chunks/{error-message.B3z5WkLF.js → error-message.68kVjf_N.js} +3 -3
  111. package/dist/chunks/{error-message.B3z5WkLF.js.map → error-message.68kVjf_N.js.map} +1 -1
  112. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  113. package/dist/chunks/{expand.CJ162RaJ.js → expand.DusW7F7p.js} +4 -4
  114. package/dist/chunks/expand.DusW7F7p.js.map +1 -0
  115. package/dist/chunks/{file-uploader.NbsEgoj1.js → file-uploader.Cz89e0Ci.js} +275 -278
  116. package/dist/chunks/file-uploader.Cz89e0Ci.js.map +1 -0
  117. package/dist/chunks/{filter-bar.DP4SHAQj.js → filter-bar.bfUnCTPj.js} +981 -1039
  118. package/dist/chunks/filter-bar.bfUnCTPj.js.map +1 -0
  119. package/dist/chunks/{fixed-scroller.BZwgM5Io.js → fixed-scroller.Bfk75Nei.js} +3 -3
  120. package/dist/chunks/{fixed-scroller.BZwgM5Io.js.map → fixed-scroller.Bfk75Nei.js.map} +1 -1
  121. package/dist/chunks/{footer-actions.X_RokrtM.js → footer-actions.DtbsjfSM.js} +3 -3
  122. package/dist/chunks/{footer-actions.X_RokrtM.js.map → footer-actions.DtbsjfSM.js.map} +1 -1
  123. package/dist/chunks/{form-layout-title.xkALokzl.js → form-layout-title.B7phPY2m.js} +2 -2
  124. package/dist/chunks/{form-layout-title.xkALokzl.js.map → form-layout-title.B7phPY2m.js.map} +1 -1
  125. package/dist/chunks/{header.BBIJHMkv.js → header.ITEMuMAU.js} +21 -21
  126. package/dist/chunks/{header.BBIJHMkv.js.map → header.ITEMuMAU.js.map} +1 -1
  127. package/dist/chunks/{info-icon-with-popover.DbIAJO2-.js → info-icon-with-popover.pHwJeQxm.js} +3 -3
  128. package/dist/chunks/{info-icon-with-popover.DbIAJO2-.js.map → info-icon-with-popover.pHwJeQxm.js.map} +1 -1
  129. package/dist/chunks/{info-icon.DQn8-VSp.js → info-icon.DUUa2W2z.js} +3 -3
  130. package/dist/chunks/{info-icon.DQn8-VSp.js.map → info-icon.DUUa2W2z.js.map} +1 -1
  131. package/dist/chunks/{info.DYNe2WnZ.js → info.CpPLBOVg.js} +4 -4
  132. package/dist/chunks/info.CpPLBOVg.js.map +1 -0
  133. package/dist/chunks/{input-field-password.SSiNunUz.js → input-field-password.zIUeIG8i.js} +37 -37
  134. package/dist/chunks/input-field-password.zIUeIG8i.js.map +1 -0
  135. package/dist/chunks/{input-field-phone-number._PCiyrci.js → input-field-phone-number.BGS23WKe.js} +2 -2
  136. package/dist/chunks/{input-field-phone-number._PCiyrci.js.map → input-field-phone-number.BGS23WKe.js.map} +1 -1
  137. package/dist/chunks/input-field.y006Hyc1.js +292 -0
  138. package/dist/chunks/input-field.y006Hyc1.js.map +1 -0
  139. package/dist/chunks/{inspector.types.6P_ZowVx.js → inspector.types.9S8hNOjR.js} +4 -4
  140. package/dist/chunks/{inspector.types.6P_ZowVx.js.map → inspector.types.9S8hNOjR.js.map} +1 -1
  141. package/dist/chunks/{link.ClFi8uSm.js → link.D3Fq5tt_.js} +19 -17
  142. package/dist/chunks/link.D3Fq5tt_.js.map +1 -0
  143. package/dist/chunks/{listbox-option-tag.DIk4F59J.js → listbox-option-tag.D557okR8.js} +2 -2
  144. package/dist/chunks/{listbox-option-tag.DIk4F59J.js.map → listbox-option-tag.D557okR8.js.map} +1 -1
  145. package/dist/chunks/menu.ZE0cTcKL.js +735 -0
  146. package/dist/chunks/menu.ZE0cTcKL.js.map +1 -0
  147. package/dist/chunks/{modal-fullscreen.C9FhKsf9.js → modal-fullscreen.CjZh3U8e.js} +5 -5
  148. package/dist/chunks/{modal-fullscreen.C9FhKsf9.js.map → modal-fullscreen.CjZh3U8e.js.map} +1 -1
  149. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DGz4x-tr.js → modal.vue_vue_type_script_setup_true_lang.C4Z_Q8bq.js} +5 -5
  150. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DGz4x-tr.js.map → modal.vue_vue_type_script_setup_true_lang.C4Z_Q8bq.js.map} +1 -1
  151. package/dist/chunks/{pagination.DdTcv8B6.js → pagination.BSp5RwM0.js} +37 -36
  152. package/dist/chunks/pagination.BSp5RwM0.js.map +1 -0
  153. package/dist/chunks/payment-method.BACjrzKP.js +125 -0
  154. package/dist/chunks/payment-method.BACjrzKP.js.map +1 -0
  155. package/dist/chunks/payment-method.types.CJKfZQN5.js.map +1 -1
  156. package/dist/chunks/{popover.BHGbUyMF.js → popover.DLyVEjCd.js} +106 -98
  157. package/dist/chunks/popover.DLyVEjCd.js.map +1 -0
  158. package/dist/chunks/{popper-container.BvGYgqiE.js → popper-container.Bx3CBGg6.js} +448 -444
  159. package/dist/chunks/popper-container.Bx3CBGg6.js.map +1 -0
  160. package/dist/chunks/{promo-banner.CKnonHmq.js → promo-banner.Clae7YGL.js} +2 -2
  161. package/dist/chunks/{promo-banner.CKnonHmq.js.map → promo-banner.Clae7YGL.js.map} +1 -1
  162. package/dist/chunks/{radio-group.CivaJaaQ.js → radio-group.Bdy7_UIu.js} +4 -4
  163. package/dist/chunks/{radio-group.CivaJaaQ.js.map → radio-group.Bdy7_UIu.js.map} +1 -1
  164. package/dist/chunks/{refresh.SzRxQ44W.js → refresh.C20ROVDS.js} +4 -4
  165. package/dist/chunks/refresh.C20ROVDS.js.map +1 -0
  166. package/dist/chunks/search-bar.uUWWZpqL.js +114 -0
  167. package/dist/chunks/search-bar.uUWWZpqL.js.map +1 -0
  168. package/dist/chunks/{search.KgjmJMHa.js → search.BwQq1yRg.js} +4 -4
  169. package/dist/chunks/search.BwQq1yRg.js.map +1 -0
  170. package/dist/chunks/{secondary-nav.DG8xB2Mj.js → secondary-nav.DJudnYiY.js} +2 -2
  171. package/dist/chunks/{secondary-nav.DG8xB2Mj.js.map → secondary-nav.DJudnYiY.js.map} +1 -1
  172. package/dist/chunks/{segmented-control.DKWpxDho.js → segmented-control.BqJXrEmp.js} +2 -2
  173. package/dist/chunks/{segmented-control.DKWpxDho.js.map → segmented-control.BqJXrEmp.js.map} +1 -1
  174. package/dist/chunks/{selection-card-group.B9nOBntu.js → selection-card-group.COMI4GGI.js} +11 -11
  175. package/dist/chunks/{selection-card-group.B9nOBntu.js.map → selection-card-group.COMI4GGI.js.map} +1 -1
  176. package/dist/chunks/{show.J9zXGWlK.js → show.ByWWaogc.js} +6 -6
  177. package/dist/chunks/show.ByWWaogc.js.map +1 -0
  178. package/dist/chunks/{sidepanel.dFspFFRG.js → sidepanel.VwZpyqJr.js} +5 -5
  179. package/dist/chunks/{sidepanel.dFspFFRG.js.map → sidepanel.VwZpyqJr.js.map} +1 -1
  180. package/dist/chunks/{step.DsfmsUU6.js → step.BGFaHGFO.js} +3 -3
  181. package/dist/chunks/{step.DsfmsUU6.js.map → step.BGFaHGFO.js.map} +1 -1
  182. package/dist/chunks/{structured-list-item.C9vL7KwG.js → structured-list-item.BZJQzyt_.js} +6 -6
  183. package/dist/chunks/{structured-list-item.C9vL7KwG.js.map → structured-list-item.BZJQzyt_.js.map} +1 -1
  184. package/dist/chunks/{summary-grid-item-custom.B0SvlYn-.js → summary-grid-item-custom.rBC-2kKM.js} +4 -4
  185. package/dist/chunks/{summary-grid-item-custom.B0SvlYn-.js.map → summary-grid-item-custom.rBC-2kKM.js.map} +1 -1
  186. package/dist/chunks/{tabs.CR2tWuz3.js → tabs.hp52NnXH.js} +2 -2
  187. package/dist/chunks/{tabs.CR2tWuz3.js.map → tabs.hp52NnXH.js.map} +1 -1
  188. package/dist/chunks/{tag.Bmw9RaOG.js → tag.CXADLCgG.js} +2 -2
  189. package/dist/chunks/{tag.Bmw9RaOG.js.map → tag.CXADLCgG.js.map} +1 -1
  190. package/dist/chunks/{textarea.CrQk0SR0.js → textarea.4s69xpG3.js} +4 -4
  191. package/dist/chunks/{textarea.CrQk0SR0.js.map → textarea.4s69xpG3.js.map} +1 -1
  192. package/dist/chunks/{timeline-item.Cs8JBNAA.js → timeline-item.DOoLkIox.js} +12 -11
  193. package/dist/chunks/timeline-item.DOoLkIox.js.map +1 -0
  194. package/dist/chunks/{toast.A5f1_NqV.js → toast.7D23cICy.js} +3 -3
  195. package/dist/chunks/{toast.A5f1_NqV.js.map → toast.7D23cICy.js.map} +1 -1
  196. package/dist/chunks/{toggle-button.CCgvi7TQ.js → toggle-button.7iAfO6Xx.js} +23 -22
  197. package/dist/chunks/toggle-button.7iAfO6Xx.js.map +1 -0
  198. package/dist/chunks/{toggle.BmwlaQon.js → toggle.hoD_i2Ey.js} +2 -2
  199. package/dist/chunks/{toggle.BmwlaQon.js.map → toggle.hoD_i2Ey.js.map} +1 -1
  200. package/dist/chunks/{tooltip.DS1ok8gh.js → tooltip.BtfIbhGU.js} +2 -2
  201. package/dist/chunks/{tooltip.DS1ok8gh.js.map → tooltip.BtfIbhGU.js.map} +1 -1
  202. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.-cMQWbk1.js → tutorial.vue_vue_type_script_setup_true_lang.DRlP0P1P.js} +9 -8
  203. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.DRlP0P1P.js.map +1 -0
  204. package/dist/chunks/use-cached-selected-values.9xqNZAmj.js +1446 -0
  205. package/dist/chunks/use-cached-selected-values.9xqNZAmj.js.map +1 -0
  206. package/dist/chunks/{warning-filled.tTkVob0l.js → warning-filled.DmHh0nYG.js} +4 -4
  207. package/dist/chunks/warning-filled.DmHh0nYG.js.map +1 -0
  208. package/dist/code-snippet.js +1 -1
  209. package/dist/dashboard-template.js +1 -1
  210. package/dist/dashed-underline.js +1 -1
  211. package/dist/data-grid-template.js +1 -1
  212. package/dist/data-grid.js +1 -1
  213. package/dist/date-picker.js +2 -2
  214. package/dist/date-range-picker.js +2 -2
  215. package/dist/dropdown.js +4 -4
  216. package/dist/empty-state.js +1 -1
  217. package/dist/file-uploader.js +1 -1
  218. package/dist/filter-bar.js +1 -1
  219. package/dist/form-layout.js +1 -1
  220. package/dist/header.js +1 -1
  221. package/dist/index.js +59 -59
  222. package/dist/info-icon.js +1 -1
  223. package/dist/input-field-password.js +1 -1
  224. package/dist/input-field-phone-number.js +1 -1
  225. package/dist/input-field.js +1 -1
  226. package/dist/inspector.js +1 -1
  227. package/dist/internal.js +12 -12
  228. package/dist/link.js +1 -1
  229. package/dist/menu.js +1 -1
  230. package/dist/modal-fullscreen.js +1 -1
  231. package/dist/modal.js +2 -2
  232. package/dist/pagination.js +1 -1
  233. package/dist/payment-method.js +1 -1
  234. package/dist/popover.js +1 -1
  235. package/dist/popper-container.js +1 -1
  236. package/dist/promo-banner.js +1 -1
  237. package/dist/radio-group.js +1 -1
  238. package/dist/search-bar.js +2 -2
  239. package/dist/secondary-nav.js +1 -1
  240. package/dist/segmented-control.js +1 -1
  241. package/dist/selection-card.js +1 -1
  242. package/dist/sidepanel.js +1 -1
  243. package/dist/stepper.js +1 -1
  244. package/dist/structured-list.js +1 -1
  245. package/dist/styles/bento-dark.css +5 -5
  246. package/dist/styles/bento-light.css +5 -5
  247. package/dist/styles/bento.css +5 -5
  248. package/dist/styles/legacy.css +6 -4
  249. package/dist/styles/styleguide.css +5 -5
  250. package/dist/styles/utility.css +2 -2
  251. package/dist/summary-grid.js +1 -1
  252. package/dist/tabs.js +1 -1
  253. package/dist/tag.js +1 -1
  254. package/dist/textarea.js +1 -1
  255. package/dist/timeline.js +1 -1
  256. package/dist/toast.js +1 -1
  257. package/dist/toggle.js +1 -1
  258. package/dist/tutorial.js +1 -1
  259. package/dist/web-types.json +1 -1
  260. package/package.json +5 -6
  261. package/dist/chunks/alert.Dd2DYCZ1.js.map +0 -1
  262. package/dist/chunks/checkbox-input.CAYgiRHG.js.map +0 -1
  263. package/dist/chunks/checkmark-circle-fill.g_tcBhFJ.js.map +0 -1
  264. package/dist/chunks/checkmark-small.BDqUF-Ni.js.map +0 -1
  265. package/dist/chunks/chevron-left.CYEK2UTr.js.map +0 -1
  266. package/dist/chunks/chevron-up.Cu9qXgBY.js.map +0 -1
  267. package/dist/chunks/chip.sG_6gh3Z.js +0 -71
  268. package/dist/chunks/chip.sG_6gh3Z.js.map +0 -1
  269. package/dist/chunks/copy.CXCdp5ly.js.map +0 -1
  270. package/dist/chunks/cross-circle-fill-small.CJyARMSZ.js.map +0 -1
  271. package/dist/chunks/cross-circle-fill.BzSjakuO.js.map +0 -1
  272. package/dist/chunks/cross-small.Z5EKYRm0.js.map +0 -1
  273. package/dist/chunks/cross.BZYw4R3N.js.map +0 -1
  274. package/dist/chunks/data-grid.Duvh6mRu.js.map +0 -1
  275. package/dist/chunks/date-range-picker.D7BDFoqM.js.map +0 -1
  276. package/dist/chunks/dialog-page.D_r_CbyD.js.map +0 -1
  277. package/dist/chunks/dot.cpdFEk6G.js.map +0 -1
  278. package/dist/chunks/dropdown.CWq-VlFX.js.map +0 -1
  279. package/dist/chunks/expand.CJ162RaJ.js.map +0 -1
  280. package/dist/chunks/file-uploader.NbsEgoj1.js.map +0 -1
  281. package/dist/chunks/filter-bar.DP4SHAQj.js.map +0 -1
  282. package/dist/chunks/info.DYNe2WnZ.js.map +0 -1
  283. package/dist/chunks/input-field-password.SSiNunUz.js.map +0 -1
  284. package/dist/chunks/input-field.DhDfq9Er.js +0 -382
  285. package/dist/chunks/input-field.DhDfq9Er.js.map +0 -1
  286. package/dist/chunks/link.ClFi8uSm.js.map +0 -1
  287. package/dist/chunks/menu.DKCUuV6a.js +0 -698
  288. package/dist/chunks/menu.DKCUuV6a.js.map +0 -1
  289. package/dist/chunks/pagination.DdTcv8B6.js.map +0 -1
  290. package/dist/chunks/payment-method.NguqkTwG.js +0 -103
  291. package/dist/chunks/payment-method.NguqkTwG.js.map +0 -1
  292. package/dist/chunks/popover.BHGbUyMF.js.map +0 -1
  293. package/dist/chunks/popper-container.BvGYgqiE.js.map +0 -1
  294. package/dist/chunks/refresh.SzRxQ44W.js.map +0 -1
  295. package/dist/chunks/search-bar.BixBEf58.js +0 -132
  296. package/dist/chunks/search-bar.BixBEf58.js.map +0 -1
  297. package/dist/chunks/search.KgjmJMHa.js.map +0 -1
  298. package/dist/chunks/show.J9zXGWlK.js.map +0 -1
  299. package/dist/chunks/timeline-item.Cs8JBNAA.js.map +0 -1
  300. package/dist/chunks/toggle-button.CCgvi7TQ.js.map +0 -1
  301. package/dist/chunks/truncate.BfIl_-71.js +0 -8
  302. package/dist/chunks/truncate.BfIl_-71.js.map +0 -1
  303. package/dist/chunks/tutorial.vue_vue_type_script_setup_true_lang.-cMQWbk1.js.map +0 -1
  304. package/dist/chunks/use-cached-selected-values.D82-YBdB.js +0 -1591
  305. package/dist/chunks/use-cached-selected-values.D82-YBdB.js.map +0 -1
  306. package/dist/chunks/warning-filled.tTkVob0l.js.map +0 -1
  307. /package/dist/assets/{cross.css → main.css} +0 -0
@@ -1,1591 +0,0 @@
1
- import { computed as v, ref as P, onMounted as Oe, onUnmounted as xe, watch as Ie, defineComponent as W, resolveComponent as L, createElementBlock as _, openBlock as f, createVNode as B, createElementVNode as K, withCtx as T, createTextVNode as G, toDisplayString as w, renderSlot as z, mergeProps as U, 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 F, createSlots as ie, normalizeClass as fe, unref as ce, normalizeStyle as Ke } from "vue";
2
- import { B as x, 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 qe } from "./loading-indicator.DEepb9Wl.js";
6
- import { B as We } from "./empty-state.C2ancCe6.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.bXN3Yann.js";
10
- import { B as He } from "./base-button.DdNFlbgH.js";
11
- import { C as Xe } from "./cross-small.Z5EKYRm0.js";
12
- import { _ as q } 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.ncthaz2m.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 u = v(
19
- () => {
20
- var l, r;
21
- return !!((l = e.value) != null && l.length) && ((r = e.value) == null ? void 0 : r.length) === t.value.length;
22
- }
23
- ), n = v(() => {
24
- var l;
25
- return e.value == null || e.value.length === 0 ? !1 : ((l = e.value) == null ? void 0 : l.length) !== t.value.length;
26
- });
27
- return {
28
- isAllSelected: u,
29
- isIndeterminate: n,
30
- toggleSelectAll: (l) => {
31
- l ? a() : c();
32
- }
33
- };
34
- };
35
- function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: u }) {
36
- const n = P(null), s = P([]), l = P(0), r = P(0), i = P(0);
37
- let y;
38
- const o = v(() => {
39
- const C = typeof a == "number" ? e.value.length * a : e.value.reduce((k, S, I) => k + a(I), 0), O = typeof a == "number" ? l.value * a : e.value.slice(0, l.value).reduce((k, S, I) => k + a(I), 0);
40
- return {
41
- style: {
42
- marginTop: `${O}px`,
43
- height: `${C - O}px`
44
- }
45
- };
46
- }), d = () => {
47
- const C = (u == null ? void 0 : u.value) ?? 0, O = Math.max(n.value.scrollTop - C, 0);
48
- if (typeof a == "number")
49
- return Math.floor(O / a);
50
- let k = 0, S = 0;
51
- for (let I = 0; I < e.value.length; I += 1) {
52
- const V = a(I);
53
- if (k += V, k >= O) {
54
- S = I;
55
- break;
56
- }
57
- }
58
- return S;
59
- }, R = () => {
60
- if (i.value = n.value.clientHeight, typeof a == "number")
61
- return Math.ceil(i.value / a);
62
- const C = l.value ?? 0;
63
- let O = 0, k = 0;
64
- for (let S = C; S < e.value.length; S += 1) {
65
- const I = a(S);
66
- if (O += I, k = S, O > i.value)
67
- break;
68
- }
69
- return k - C;
70
- }, $ = () => {
71
- if (n.value) {
72
- const C = R();
73
- l.value = d(), r.value = Math.min(l.value + C + c, e.value.length), s.value = e.value.slice(l.value, r.value);
74
- }
75
- }, M = () => {
76
- $();
77
- };
78
- t || (Oe(() => {
79
- n.value && (i.value = n.value.clientHeight, y = et(n.value, ({ clientHeight: C }) => {
80
- i.value = C, $();
81
- }), $());
82
- }), xe(() => {
83
- y == null || y.disconnect();
84
- }), Ie(
85
- () => e.value,
86
- () => {
87
- $();
88
- }
89
- ));
90
- const m = {
91
- ref: n,
92
- style: { overflowY: "auto" }
93
- };
94
- return t ? {
95
- containerRef: n,
96
- containerProps: m,
97
- // eslint-disable-next-line @typescript-eslint/no-empty-function
98
- onScroll: () => {
99
- },
100
- list: e
101
- } : {
102
- containerRef: n,
103
- containerProps: m,
104
- onScroll: M,
105
- list: s,
106
- wrapperProps: o
107
- };
108
- }
109
- var b = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more", e.ESCAPE = "escape-pressed", e.CLICK = "click", e.ENTER = "enter-pressed", e.SPACE = "space-pressed", e.TAB = "tab-pressed", e.CLOSE_DROPDOWN = "close-dropdown", e))(b || {}), 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, u, n) {
126
- const s = L("bento-typography");
127
- return f(), _("div", lt, [
128
- B(s, {
129
- variant: "caption",
130
- el: "span",
131
- class: "b-listbox-single-select-category__label-text"
132
- }, {
133
- default: T(() => [
134
- G(w(e.categoryLabel), 1)
135
- ]),
136
- _: 1
137
- }),
138
- K("div", null, [
139
- z(e.$slots, "default", {}, void 0, !0)
140
- ])
141
- ]);
142
- }
143
- const nt = /* @__PURE__ */ q(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: [b.CLICK, b.ENTER, b.SPACE, b.TAB],
156
- setup(e, { emit: t }) {
157
- const a = v(() => ({
158
- "b-listbox-option--disabled": e.disabled,
159
- "b-listbox-option--selected": e.selected
160
- }));
161
- return {
162
- // Enums
163
- BentoKeyboardNavigationKeyDownEvent: x,
164
- BentoListboxEvent: b,
165
- // Values
166
- conditionalClasses: a,
167
- // Events
168
- onClick: (n) => {
169
- t(b.CLICK, n);
170
- },
171
- onOptionSelected: (n, s) => {
172
- t(n, s);
173
- }
174
- };
175
- }
176
- });
177
- function at(e, t, a, c, u, n) {
178
- return f(), _("label", U({
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__ */ q(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, u, n) {
200
- return f(), _("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"] ? (f(), _("title", ct, w(e.$attrs["svg-title"]), 1)) : Y("", !0),
208
- t[0] || (t[0] = K("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__ */ q(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: [b.ENTER, b.SELECT, b.SPACE, b.TAB],
240
- setup(e, { emit: t }) {
241
- const a = (s) => {
242
- e.disabled || t(s, e.option);
243
- }, c = v(() => e.disabled ? !0 : null), u = v(() => e.selected ? !0 : null), n = v(() => e.disabled ? -1 : 0);
244
- return {
245
- // Values
246
- ariaDisabled: c,
247
- ariaSelected: u,
248
- tabIndex: n,
249
- // Enums
250
- BentoListboxEvent: b,
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, u, n) {
257
- const s = L("bento-typography"), l = L("checkmark-icon"), r = L("bento-listbox-option");
258
- return f(), D(r, {
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: T(() => [
271
- z(e.$slots, "default", ee(ne(e.option)), () => [
272
- K("span", mt, [
273
- B(s, { el: "span" }, {
274
- default: T(() => [
275
- G(w(e.option.label), 1)
276
- ]),
277
- _: 1
278
- }),
279
- e.option.description ? (f(), D(s, {
280
- key: 0,
281
- class: "b-listbox-single-select-option__description",
282
- el: "span"
283
- }, {
284
- default: T(() => [
285
- G(w(e.option.description), 1)
286
- ]),
287
- _: 1
288
- })) : Y("", !0)
289
- ])
290
- ], !0),
291
- K("span", vt, [
292
- ae(B(l, { "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__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84"]]), ke = ({ items: e, isOptionDisabled: t, hasStaticCategories: a }, c) => {
301
- const u = v(
302
- () => a.value ? e.value.flatMap((m) => m.items) : e.value
303
- ), n = v(() => u.value.length - 1), s = P(0);
304
- Oe(() => {
305
- t && (s.value = e.value.findIndex((m) => !t(m)));
306
- });
307
- const l = (m) => !t || !!t && t(e.value[m]), r = (m) => !t || !!t && !t(e.value[m]), i = (m) => {
308
- switch (m) {
309
- case "increase":
310
- s.value += 1;
311
- break;
312
- case "decrease":
313
- s.value -= 1;
314
- break;
315
- }
316
- }, y = ({ edgeCaseItem: m, isItemBeforeEdgeCaseItem: C }, O, k) => {
317
- s.value !== m && (C ? r(m) && i(k) : (i(k), l(s.value) && O()), c(s.value));
318
- }, o = (m) => {
319
- var O;
320
- (O = m == null ? void 0 : m.detail) == null || O.preventDefault();
321
- const C = s.value === n.value - 2;
322
- y(
323
- {
324
- isItemBeforeEdgeCaseItem: C,
325
- edgeCaseItem: n.value
326
- },
327
- o,
328
- "increase"
329
- /* INCREASE */
330
- );
331
- }, d = (m) => {
332
- var O;
333
- (O = m == null ? void 0 : m.detail) == null || O.preventDefault();
334
- const C = s.value === 1;
335
- y(
336
- {
337
- edgeCaseItem: 0,
338
- isItemBeforeEdgeCaseItem: C
339
- },
340
- d,
341
- "decrease"
342
- /* DECREASE */
343
- );
344
- };
345
- return {
346
- moveToFirstElement: () => {
347
- s.value = 0, l(s.value) ? o() : c(s.value);
348
- },
349
- moveToLastElement: () => {
350
- s.value = n.value, l(s.value) ? d() : c(s.value);
351
- },
352
- moveToNextElement: o,
353
- moveToPreviousElement: d,
354
- setListboxFocusedIndex: (m) => {
355
- s.value = m;
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: [b.SELECT, b.ENTER, b.SPACE, b.TAB],
406
- setup(e, { emit: t, expose: a, slots: c }) {
407
- const u = P([]), n = v(() => {
408
- var m;
409
- return !!((m = e.selectedValue) != null && m.length) && e.selectedValue.at(0);
410
- }), s = v(() => !!e.items.some(({ items: m }) => !!m)), l = (m) => (C) => {
411
- t(m, [C]);
412
- }, r = (m) => u.value[m].$el.focus(), {
413
- moveToNextElement: i,
414
- moveToPreviousElement: y,
415
- moveToFirstElement: o,
416
- moveToLastElement: d,
417
- setListboxFocusedIndex: R
418
- } = ke(
419
- {
420
- items: se(e, "items"),
421
- isOptionDisabled: e.isOptionDisabled,
422
- hasStaticCategories: se(e, "staticCategories")
423
- },
424
- r
425
- ), $ = {
426
- [x.ARROW_UP]: y,
427
- [x.ARROW_DOWN]: i,
428
- [x.HOME]: o,
429
- [x.END]: d
430
- }, M = {
431
- [b.SELECT]: l(b.SELECT),
432
- [b.SPACE]: l(b.SPACE),
433
- [b.TAB]: l(b.TAB),
434
- [b.ENTER]: l(b.ENTER)
435
- };
436
- return a({
437
- /**
438
- * Reference for a single listbox item.
439
- * Required for keyboard navigation in dropdown as $children is removed in vue@3
440
- */
441
- listboxItemRef: u,
442
- /**
443
- * Method to set the index of the item to be focused on
444
- * Used for focus management to be kept in-sync with parent e.g. dropdowns
445
- */
446
- setListboxFocusedIndex: R
447
- }), {
448
- // Enums
449
- BentoListboxEvent: b,
450
- // Values
451
- listboxItemRef: u,
452
- selectedItem: n,
453
- slots: c,
454
- // Computed
455
- hasCategories: s,
456
- // Methods
457
- onOptionSelected: l,
458
- // Keyboard navigation
459
- listboxListeners: $,
460
- listboxOptionListeners: M
461
- };
462
- }
463
- });
464
- function pt(e, t, a, c, u, n) {
465
- const s = L("bento-listbox-single-select-option"), l = L("bento-listbox-single-select-category"), r = pe("bento-keyboard-navigation-directive");
466
- return ae((f(), _("div", te(e.listboxListeners, !0), [
467
- e.hasCategories && e.staticCategories ? (f(!0), _(J, { key: 0 }, F(e.items, (i) => (f(), D(l, {
468
- key: i.value,
469
- "category-label": i.label,
470
- role: "group"
471
- }, {
472
- default: T(() => [
473
- (f(!0), _(J, null, F(i.items, (y) => (f(), D(s, U({
474
- key: y.value,
475
- ref_for: !0,
476
- ref: "listboxItemRef",
477
- role: "option",
478
- option: y,
479
- disabled: e.isOptionDisabled ? e.isOptionDisabled(y) : null,
480
- selected: y.value === e.selectedItem.value
481
- }, te(e.listboxOptionListeners)), ie({ _: 2 }, [
482
- F(e.slots, (o, d) => ({
483
- name: d,
484
- fn: T((R) => [
485
- z(e.$slots, d, U({ ref_for: !0 }, R))
486
- ])
487
- }))
488
- ]), 1040, ["option", "disabled", "selected"]))), 128))
489
- ]),
490
- _: 2
491
- }, 1032, ["category-label"]))), 128)) : (f(!0), _(J, { key: 1 }, F(e.items, (i) => (f(), D(s, U({
492
- key: i.value,
493
- ref_for: !0,
494
- ref: "listboxItemRef",
495
- role: "option",
496
- option: i,
497
- disabled: e.isOptionDisabled ? e.isOptionDisabled(i) : null,
498
- selected: i.value === e.selectedItem.value
499
- }, te(e.listboxOptionListeners)), ie({ _: 2 }, [
500
- F(e.slots, (y, o) => ({
501
- name: o,
502
- fn: T((d) => [
503
- z(e.$slots, o, U({ ref_for: !0 }, d))
504
- ])
505
- }))
506
- ]), 1040, ["option", "disabled", "selected"]))), 128))
507
- ], 16)), [
508
- [r]
509
- ]);
510
- }
511
- const St = /* @__PURE__ */ q(yt, [["render", pt]]);
512
- 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 || {});
513
- const Ct = {
514
- "en-US": {
515
- categoryClosed: "{category} closed",
516
- categoryOpened: "{category} opened"
517
- }
518
- }, ht = W({
519
- i18n: { messages: Ct },
520
- name: "bento-listbox-multi-select-category",
521
- components: {
522
- BentoCheckbox: Ce,
523
- BentoTypography: Z,
524
- BentoListboxOption: de,
525
- ChevronDownIcon: Ze,
526
- ChevronUpIcon: Je
527
- },
528
- props: {
529
- /**
530
- * The option elements to populate the listbox with.
531
- * It must be an array of {@see BentoListboxOptionItem }.
532
- *
533
- * @property {string} value.label - Text to be displayed in the option
534
- * @property {string,number} value.value - Value of the option
535
- * @property {BentoListboxOptionItem} value.items - Category items list
536
- */
537
- category: {
538
- type: Object,
539
- required: !0
540
- },
541
- /**
542
- * Function that allows the options to be disabled
543
- *
544
- * @type {BentoListboxIsOptionDisabled}
545
- * @param {BentoListboxOptionItem} option - listbox option object
546
- * @param {string} option.label - Option's label text
547
- * @param {string|number} option.value - Option's value
548
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
549
- */
550
- isOptionDisabled: {
551
- type: [Function],
552
- default: () => !1
553
- },
554
- /**
555
- * The `input` value.
556
- * Providing an empty array will select no options.
557
- */
558
- selectedItemsList: {
559
- type: Array,
560
- default: () => []
561
- },
562
- /**
563
- * If enabled, dropdown will display non-selectable, static categories
564
- */
565
- staticCategories: { type: Boolean, default: !1 }
566
- },
567
- emits: [oe.SELECT_CATEGORY, oe.UNSELECT_CATEGORY],
568
- setup(e, { emit: t }) {
569
- const a = P(!1), { t: c } = ue(), u = (S) => e.isOptionDisabled ? e.isOptionDisabled(S) : !1, n = v(
570
- () => e.category.items.every((S) => u(S))
571
- ), s = se(e, "staticCategories"), l = v(() => a.value || e.staticCategories), r = v(() => ({
572
- [`b-listbox-multi-select-category--${ge.DISABLED}`]: n.value,
573
- [`b-listbox-multi-select-category--${ge.STATIC_CATEGORY}`]: e.staticCategories
574
- })), i = (S) => {
575
- S.preventDefault(), a.value = !a.value;
576
- }, y = (S) => {
577
- var Q;
578
- const I = u(S), V = ((Q = e.selectedItemsList) == null ? void 0 : Q.includes(S.value)) || !1;
579
- return { isDisabled: I, isPreSelected: V };
580
- }, o = v(
581
- () => e.category.items.filter((S) => {
582
- const { isDisabled: I, isPreSelected: V } = y(S);
583
- return I && V || !I;
584
- })
585
- ), d = v(
586
- () => {
587
- var S;
588
- return (S = o.value) == null ? void 0 : S.filter(
589
- ({ value: I }) => {
590
- var V;
591
- return (V = e.selectedItemsList) == null ? void 0 : V.includes(I);
592
- }
593
- );
594
- }
595
- ), R = v(() => {
596
- const S = a.value ? "categoryOpened" : "categoryClosed";
597
- return c(S, { category: e.category.label });
598
- }), $ = v(
599
- () => ({
600
- el: "span",
601
- variant: e.staticCategories ? "caption" : "body"
602
- })
603
- ), M = () => {
604
- t(oe.SELECT_CATEGORY);
605
- }, m = () => {
606
- t(oe.UNSELECT_CATEGORY);
607
- }, { isAllSelected: C, isIndeterminate: O, toggleSelectAll: k } = $e(
608
- d,
609
- o,
610
- M,
611
- m
612
- );
613
- return {
614
- // Values
615
- chevronTitle: R,
616
- conditionalClass: r,
617
- hasAllPropsDisabled: n,
618
- isOpen: a,
619
- isAllSelected: C,
620
- isIndeterminate: O,
621
- isStaticCategory: s,
622
- // Computed
623
- showItemChildren: l,
624
- categoryLabelProps: $,
625
- // Methods
626
- toggleOpen: i,
627
- toggleSelectAll: k
628
- };
629
- }
630
- }), Et = { class: "b-listbox-multi-select-category__label" };
631
- function Lt(e, t, a, c, u, n) {
632
- const s = L("bento-checkbox"), l = L("bento-typography"), r = L("chevron-up-icon"), i = L("chevron-down-icon"), y = L("bento-listbox-option");
633
- return f(), _("div", null, [
634
- B(y, {
635
- class: fe(["b-listbox-multi-select-category__option", e.conditionalClass])
636
- }, {
637
- default: T(() => [
638
- e.isStaticCategory ? Y("", !0) : (f(), D(s, {
639
- key: 0,
640
- "model-value": e.isAllSelected,
641
- indeterminate: e.isIndeterminate,
642
- disabled: e.hasAllPropsDisabled,
643
- "aria-label": e.category.label,
644
- value: e.category.value,
645
- "onUpdate:modelValue": e.toggleSelectAll
646
- }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "value", "onUpdate:modelValue"])),
647
- K("span", Et, [
648
- B(l, U(e.categoryLabelProps, { class: "b-listbox-multi-select-category__label-text" }), {
649
- default: T(() => [
650
- G(w(e.category.label), 1)
651
- ]),
652
- _: 1
653
- }, 16),
654
- e.isStaticCategory ? Y("", !0) : (f(), _("div", {
655
- key: 0,
656
- class: "b-listbox-multi-select-category__label-chevron",
657
- "data-testid": "toggle-listbox",
658
- onClickCapture: t[0] || (t[0] = (...o) => e.toggleOpen && e.toggleOpen(...o))
659
- }, [
660
- e.isOpen ? (f(), D(r, {
661
- key: 0,
662
- "svg-title": e.chevronTitle
663
- }, null, 8, ["svg-title"])) : (f(), D(i, {
664
- key: 1,
665
- "svg-title": e.chevronTitle
666
- }, null, 8, ["svg-title"]))
667
- ], 32))
668
- ])
669
- ]),
670
- _: 1
671
- }, 8, ["class"]),
672
- ae(K("div", null, [
673
- z(e.$slots, "default", {}, void 0, !0)
674
- ], 512), [
675
- [Ae, e.showItemChildren]
676
- ])
677
- ]);
678
- }
679
- const Tt = /* @__PURE__ */ q(ht, [["render", Lt], ["__scopeId", "data-v-9a00de22"]]);
680
- var H = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e))(H || {});
681
- const _t = W({
682
- name: "listbox-multi-select-options",
683
- components: {
684
- BentoCheckbox: Ce,
685
- BentoListboxOption: de,
686
- BentoTypography: Z,
687
- ListboxMultiSelectCategory: Tt
688
- },
689
- props: {
690
- /**
691
- * Indicates if the items listed are inside a category
692
- * so they can be padded to right by one level in recursion.
693
- * Items of categories are automatically defined as "categoryItems"
694
- */
695
- categoryItems: { type: Boolean, default: !1 },
696
- /**
697
- * Function that allows the options to be disabled
698
- *
699
- * @type {BentoListboxIsOptionDisabled}
700
- * @param {BentoListboxOptionItem} option - listbox option object
701
- * @param {string} option.label - Option's label text
702
- * @param {string|number} option.value - Option's value
703
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
704
- */
705
- isOptionDisabled: {
706
- type: Function,
707
- default: () => !1
708
- },
709
- /**
710
- * The option elements to populate the listbox with.
711
- * It must be an array of {@see BentoListboxOptionItem }.
712
- *
713
- * @property {string} value.label - Text to be displayed in the option
714
- * @property {string,number} value.value - Value of the option
715
- */
716
- items: {
717
- type: Array,
718
- required: !0
719
- },
720
- /**
721
- * Indicates if the elements options are inside a multi-level category
722
- */
723
- isMultiLevel: { type: Boolean, default: !1 },
724
- /**
725
- * Flag that indicates that an external search it's being made
726
- * to filter out the items inside the the multi-select listbox
727
- *
728
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
729
- */
730
- searching: { type: Boolean, default: !1 },
731
- /**
732
- * List of selected items.
733
- * Providing an empty array will select no options.
734
- */
735
- selectedItemsList: {
736
- type: Array,
737
- default: () => []
738
- },
739
- /**
740
- * If enabled, dropdown will display non-selectable, static categories
741
- */
742
- staticCategories: { type: Boolean, default: !1 }
743
- },
744
- emits: [
745
- H.TOGGLE_CHECKBOX_SELECTION,
746
- H.SELECT_CATEGORY,
747
- H.UNSELECT_CATEGORY
748
- ],
749
- setup(e, { emit: t }) {
750
- const a = (r) => {
751
- t(H.TOGGLE_CHECKBOX_SELECTION, r);
752
- }, c = (r) => !!r.items, u = (r) => {
753
- const i = e.isMultiLevel && e.searching;
754
- return r.description && (!e.isMultiLevel || i);
755
- }, n = (r) => r.items ? !!r.items.find((i) => e.selectedItemsList.includes(i.value)) : e.selectedItemsList.includes(r.value), s = (r, i) => {
756
- if (c(i))
757
- return t(r ? H.SELECT_CATEGORY : H.UNSELECT_CATEGORY, i);
758
- a(i.value);
759
- };
760
- return {
761
- // Values
762
- conditionalClasses: v(() => ({
763
- "b-listbox-multi-select-options__static-category-option": e.staticCategories,
764
- "b-listbox-multi-select-options__category-option": e.categoryItems
765
- })),
766
- // Methods
767
- isOptionSelected: n,
768
- shouldShowDescription: u,
769
- toggleCheckboxSelection: a,
770
- selectSearch: s,
771
- // Enums
772
- BentoListboxEvent: b,
773
- ListboxMultiSelectOptionsEvent: H
774
- };
775
- }
776
- }), Ot = { class: "b-listbox-multi-select__option-text" }, It = { class: "b-listbox-multi-select__option-text" };
777
- function At(e, t, a, c, u, n) {
778
- const s = L("bento-checkbox"), l = L("bento-typography"), r = L("bento-listbox-option"), i = L("listbox-multi-select-options", !0), y = L("listbox-multi-select-category");
779
- return f(), _("div", null, [
780
- (f(!0), _(J, null, F(e.items, (o) => (f(), _("div", {
781
- key: `selected-${o.value}`
782
- }, [
783
- e.searching && e.isMultiLevel ? (f(), D(r, {
784
- key: 0,
785
- class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
786
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
787
- }, {
788
- default: T(() => [
789
- B(s, {
790
- "model-value": e.isOptionSelected(o),
791
- "aria-label": o.label,
792
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
793
- value: o.value,
794
- "onUpdate:modelValue": (d) => e.selectSearch(d, o)
795
- }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
796
- z(e.$slots, "default", U({ ref_for: !0 }, o), () => [
797
- K("span", Ot, [
798
- B(l, { el: "span" }, {
799
- default: T(() => [
800
- G(w(o.label), 1)
801
- ]),
802
- _: 2
803
- }, 1024),
804
- e.shouldShowDescription(o) ? (f(), D(l, {
805
- key: 0,
806
- class: "b-listbox-multi-select__option-description",
807
- el: "span"
808
- }, {
809
- default: T(() => [
810
- G(w(o.description), 1)
811
- ]),
812
- _: 2
813
- }, 1024)) : Y("", !0)
814
- ])
815
- ], !0)
816
- ]),
817
- _: 2
818
- }, 1032, ["class", "disabled"])) : (f(), _(J, { key: 1 }, [
819
- o.items ? (f(), D(y, {
820
- key: 0,
821
- category: o,
822
- "static-categories": e.staticCategories,
823
- "is-option-disabled": e.isOptionDisabled,
824
- "selected-items-list": e.selectedItemsList,
825
- onSelectCategory: (d) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, o),
826
- onUnselectCategory: (d) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, o)
827
- }, {
828
- default: T(() => [
829
- B(i, {
830
- "category-items": "",
831
- items: o.items,
832
- "is-option-disabled": e.isOptionDisabled,
833
- "is-multi-level": e.isMultiLevel,
834
- "static-categories": e.staticCategories,
835
- "selected-items-list": e.selectedItemsList,
836
- searching: e.searching,
837
- onToggleCheckboxSelection: t[0] || (t[0] = (d) => e.toggleCheckboxSelection(d))
838
- }, null, 8, ["items", "is-option-disabled", "is-multi-level", "static-categories", "selected-items-list", "searching"])
839
- ]),
840
- _: 2
841
- }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "onSelectCategory", "onUnselectCategory"])) : (f(), D(r, {
842
- key: 1,
843
- class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
844
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null
845
- }, {
846
- default: T(() => [
847
- B(s, {
848
- "model-value": e.selectedItemsList,
849
- "aria-label": o.label,
850
- disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null,
851
- value: o.value,
852
- "onUpdate:modelValue": (d) => e.toggleCheckboxSelection(o)
853
- }, null, 8, ["model-value", "aria-label", "disabled", "value", "onUpdate:modelValue"]),
854
- z(e.$slots, "default", U({ ref_for: !0 }, o), () => [
855
- K("span", It, [
856
- B(l, { el: "span" }, {
857
- default: T(() => [
858
- G(w(o.label), 1)
859
- ]),
860
- _: 2
861
- }, 1024),
862
- e.shouldShowDescription(o) ? (f(), D(l, {
863
- key: 0,
864
- class: "b-listbox-multi-select__option-description",
865
- el: "span"
866
- }, {
867
- default: T(() => [
868
- G(w(o.description), 1)
869
- ]),
870
- _: 2
871
- }, 1024)) : Y("", !0)
872
- ])
873
- ], !0)
874
- ]),
875
- _: 2
876
- }, 1032, ["class", "disabled"]))
877
- ], 64))
878
- ]))), 128))
879
- ]);
880
- }
881
- const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72"]]), Be = {
882
- "en-US": {
883
- remove: "Remove"
884
- },
885
- "ja-JP": {
886
- remove: "削除"
887
- },
888
- "pt-BR": {
889
- remove: "Remover"
890
- }
891
- }, kt = { class: "b-listbox-multi-select-chips" }, Bt = {
892
- i18n: { messages: Be }
893
- }, Rt = /* @__PURE__ */ W({
894
- ...Bt,
895
- __name: "listbox-multi-select-chips",
896
- props: {
897
- /**
898
- * Function that defines the options to be disabled
899
- */
900
- isOptionDisabled: {
901
- type: Function,
902
- default: () => !1
903
- },
904
- /**
905
- * The option elements to populate the listbox with.
906
- * It must be an array of {@see BentoListboxOptionItem }.
907
- *
908
- * @property {string} value.label - Text to be displayed in the option
909
- * @property {string,number} value.value - Value of the option
910
- */
911
- items: {
912
- type: Array,
913
- required: !0
914
- }
915
- },
916
- emits: ["unselect-item", "unselect-category"],
917
- setup(e, { emit: t }) {
918
- const a = t, { t: c } = ue({ messages: Be }), u = (n) => n.items ? a("unselect-category", n) : a("unselect-item", n);
919
- return (n, s) => (f(), _("div", kt, [
920
- (f(!0), _(J, null, F(e.items, (l) => (f(), _("div", {
921
- key: `selected-${l.value}`
922
- }, [
923
- B(ce(He), {
924
- class: "b-listbox-multi-select-chips__chip",
925
- disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
926
- onClick: (r) => u(l)
927
- }, {
928
- iconRight: T(() => [
929
- B(ce(Xe), {
930
- "svg-title": ce(c)("remove")
931
- }, null, 8, ["svg-title"])
932
- ]),
933
- default: T(() => [
934
- B(ce(Z), {
935
- el: "span",
936
- variant: "caption",
937
- class: "b-listbox-multi-select-chips__option-text"
938
- }, {
939
- default: T(() => [
940
- G(w(l.label), 1)
941
- ]),
942
- _: 2
943
- }, 1024)
944
- ]),
945
- _: 2
946
- }, 1032, ["disabled", "onClick"])
947
- ]))), 128))
948
- ]));
949
- }
950
- }), Dt = /* @__PURE__ */ q(Rt, [["__scopeId", "data-v-7c5f8bdb"]]), Le = {
951
- "en-US": {
952
- allSelected: "All selected ({total})",
953
- numberOfTotalSelected: "{number} of {total} selected",
954
- numbersSelected: "{number} selected",
955
- selectAll: "Select all ({total})"
956
- }
957
- }, Mt = (e) => {
958
- const t = v(() => {
959
- var c;
960
- return !!((c = e.value) != null && c.find(({ items: u }) => !!u));
961
- }), a = v(() => {
962
- var c;
963
- return t.value ? (c = e.value) == null ? void 0 : c.reduce((u, n) => (n.items ? u.push(...n.items.flat()) : u.push(n), u), []) : e.value;
964
- });
965
- return {
966
- isMultiLevelSelect: t,
967
- flattenedItemsList: a
968
- };
969
- }, Pt = W({
970
- i18n: { messages: Le },
971
- name: "bento-listbox-multi-select",
972
- components: {
973
- BentoCheckbox: Ce,
974
- BentoListboxOption: de,
975
- BentoTypography: Z,
976
- ListboxMultiSelectOptions: $t,
977
- ListboxMultiSelectChips: Dt
978
- },
979
- directives: { BentoKeyboardNavigationDirective: Se },
980
- props: {
981
- /**
982
- * Indicates whether there are more items to load
983
- */
984
- hasMoreItems: { type: Boolean, default: !1 },
985
- /**
986
- * Function that allows the options to be disabled
987
- *
988
- * @type {BentoListboxIsOptionDisabled}
989
- * @param {BentoListboxOptionItem} option - listbox option object
990
- * @param {string} option.label - Option's label text
991
- * @param {string|number} option.value - Option's value
992
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
993
- */
994
- isOptionDisabled: {
995
- type: Function,
996
- default: () => !1
997
- },
998
- /**
999
- * The option elements to populate the listbox with.
1000
- * It must be an array of {@see BentoListboxOptionItem }.
1001
- *
1002
- * @property {string} value.label - Text to be displayed in the option
1003
- * @property {string,number} value.value - Value of the option
1004
- */
1005
- items: {
1006
- type: Array,
1007
- required: !0
1008
- },
1009
- /**
1010
- * The type of `Lazy Load`.
1011
- * Type "automatic" will enable infinite scrolling
1012
- * Type "button" will enable lazy loading with "Show more" button
1013
- */
1014
- lazyLoadType: {
1015
- type: String,
1016
- default: X.NONE,
1017
- validator: (e) => Object.values(X).includes(e)
1018
- },
1019
- /**
1020
- * Flag that indicates that an external search it's being made
1021
- * to filter out the items inside the the multi-select listbox
1022
- *
1023
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
1024
- */
1025
- searching: { type: Boolean, default: !1 },
1026
- /**
1027
- * The `input` value.
1028
- * Providing an empty array will select no options.
1029
- */
1030
- selectedValues: {
1031
- type: Array,
1032
- required: !0
1033
- },
1034
- /**
1035
- * If enabled, dropdown will display non-selectable, static categories
1036
- */
1037
- staticCategories: { type: Boolean, default: !1 }
1038
- },
1039
- emits: [b.SELECT],
1040
- setup(e, { emit: t, slots: a }) {
1041
- const { t: c } = ue({ messages: Le }), u = P(null), n = P(null), s = P(null), l = v(
1042
- () => e.selectedValues.map(({ value: g }) => g)
1043
- ), { isMultiLevelSelect: r, flattenedItemsList: i } = Mt(se(e, "items")), y = (g) => {
1044
- var A;
1045
- const p = e.isOptionDisabled(g), h = ((A = l.value) == null ? void 0 : A.includes(g.value)) || !1;
1046
- return { isDisabled: p, isPreSelected: h };
1047
- }, o = v(() => {
1048
- if (e.searching && r)
1049
- return e.items;
1050
- const g = i.value.filter((p) => {
1051
- const { isDisabled: h, isPreSelected: A } = y(p);
1052
- return h && A || !h;
1053
- });
1054
- return e.selectedValues.forEach((p) => {
1055
- g.find((h) => h.value === p.value) || g.push(p);
1056
- }), g;
1057
- }), d = v(
1058
- () => {
1059
- var g;
1060
- return (g = o.value) == null ? void 0 : g.filter((p) => {
1061
- var h;
1062
- return p.items && r.value && e.searching ? p.items.filter(
1063
- (E) => (e.selectedValues ?? []).includes(E.value)
1064
- ).length === p.items.length : (h = l.value) == null ? void 0 : h.includes(p.value);
1065
- });
1066
- }
1067
- ), R = () => r.value && !e.searching ? i.value.length : e.items.length, $ = v(() => {
1068
- var A;
1069
- const g = o.value.length, p = R(), h = ((A = d.value) == null ? void 0 : A.length) || 0;
1070
- return h === 0 ? c("selectAll", { total: g }) : h === p ? c("allSelected", { total: p }) : h <= p ? c("numberOfTotalSelected", { number: h, total: p }) : c("numbersSelected", { number: h });
1071
- }), M = (g) => {
1072
- const p = (A) => {
1073
- const { isDisabled: E, isPreSelected: j } = y(A);
1074
- return E && j || !E;
1075
- }, h = g.filter(p).filter((A) => !l.value.includes(A.value));
1076
- t(b.SELECT, [...e.selectedValues, ...h]);
1077
- }, m = (g) => {
1078
- const p = (E) => {
1079
- const { isDisabled: j, isPreSelected: Fe } = y(E);
1080
- return !(j && Fe);
1081
- }, h = g.filter(p).map(({ value: E }) => E), A = e.selectedValues.filter((E) => !(h != null && h.includes(E.value)));
1082
- t(b.SELECT, A);
1083
- }, C = () => {
1084
- M(i.value);
1085
- }, O = () => {
1086
- m(i.value);
1087
- }, { isAllSelected: k, isIndeterminate: S, toggleSelectAll: I } = $e(
1088
- d,
1089
- o,
1090
- C,
1091
- O
1092
- ), V = (g) => {
1093
- M(g.items);
1094
- }, Q = (g) => {
1095
- m(g.items);
1096
- }, be = (g, p) => {
1097
- let h = !1;
1098
- const A = e.selectedValues.filter(({ value: E }) => p.value === E ? (h = !0, !1) : !0);
1099
- h || A.push(p), t(g, A);
1100
- }, re = v(() => {
1101
- if (!r.value)
1102
- return e.selectedValues;
1103
- const g = (E) => l.value.includes(E.value), p = (E) => !e.staticCategories && E.every((j) => g(j));
1104
- return e.items.flatMap(
1105
- (E) => E.items && !p(E.items) ? E.items : E
1106
- ).filter((E) => E.items ? !0 : g(E));
1107
- }), me = v(() => {
1108
- var h, A, E, j;
1109
- const g = ["automatic", "button"].includes(e.lazyLoadType), p = ((h = e.selectedValues) == null ? void 0 : h.length) > 0 && ((A = d.value) == null ? void 0 : A.length) !== ((E = i.value) == null ? void 0 : E.length);
1110
- return g && e.hasMoreItems ? !!((j = e.selectedValues) != null && j.length) : p;
1111
- }), N = v(() => ["automatic", "button"].includes(e.lazyLoadType) ? !e.hasMoreItems : !0), le = v(
1112
- () => u.value ? [u.value] : []
1113
- ), Re = v(
1114
- () => {
1115
- var g, p;
1116
- return (p = (g = n.value) == null ? void 0 : g.$children) != null && p.length ? n.value.$children : [];
1117
- }
1118
- ), De = v(
1119
- () => {
1120
- var g, p;
1121
- return (p = (g = s.value) == null ? void 0 : g.$children) != null && p.length ? s.value.$children : [];
1122
- }
1123
- ), Me = v(() => ({ label: $, value: k })), Pe = v(() => [
1124
- Me,
1125
- ...re.value,
1126
- ...i.value
1127
- ]), Ne = (g) => {
1128
- [
1129
- ...le.value,
1130
- ...Re.value,
1131
- ...De.value
1132
- ][g].$el.focus();
1133
- }, { moveToNextElement: we, moveToPreviousElement: Ue, moveToFirstElement: Ve, moveToLastElement: Ge } = ke(
1134
- {
1135
- items: P(Pe),
1136
- isOptionDisabled: e.isOptionDisabled,
1137
- hasStaticCategories: se(e, "staticCategories")
1138
- },
1139
- Ne
1140
- ), ze = {
1141
- [x.ARROW_UP]: (g) => Ue(g),
1142
- [x.ARROW_DOWN]: (g) => we(g),
1143
- [x.HOME]: Ve,
1144
- [x.END]: Ge
1145
- };
1146
- return {
1147
- // Refs
1148
- selectAllListboxItemsRef: u,
1149
- selectedListboxItemsRef: n,
1150
- listboxItemsRef: s,
1151
- // Values
1152
- isAllSelected: k,
1153
- showSelectedItems: me,
1154
- isIndeterminate: S,
1155
- isMultiLevelSelect: r,
1156
- flattenedItemsList: i,
1157
- selectedItemsList: l,
1158
- selectAllCheckboxText: $,
1159
- selectedOptions: re,
1160
- showSelectAllCheckbox: N,
1161
- slots: a,
1162
- // Enums
1163
- BentoListboxEvent: b,
1164
- // Methods
1165
- selectAllCategory: V,
1166
- toggleCheckboxSelection: be,
1167
- toggleSelectAll: I,
1168
- unselectAllCategory: Q,
1169
- // Events
1170
- listboxListeners: ze
1171
- };
1172
- }
1173
- }), Nt = {
1174
- key: 1,
1175
- class: "b-listbox-multi-select__divider"
1176
- }, wt = { key: 2 };
1177
- function Ut(e, t, a, c, u, n) {
1178
- const s = L("bento-checkbox"), l = L("bento-typography"), r = L("bento-listbox-option"), i = L("listbox-multi-select-chips"), y = L("listbox-multi-select-options"), o = pe("bento-keyboard-navigation-directive");
1179
- return ae((f(), _("div", U({ class: "b-listbox-multi-select" }, te(e.listboxListeners, !0)), [
1180
- e.showSelectAllCheckbox ? (f(), D(r, {
1181
- key: 0,
1182
- ref: "selectAllListboxItemsRef",
1183
- class: "b-listbox-multi-select__option"
1184
- }, {
1185
- default: T(() => [
1186
- B(s, {
1187
- "aria-label": e.selectAllCheckboxText,
1188
- "model-value": e.isAllSelected,
1189
- indeterminate: e.isIndeterminate,
1190
- "onUpdate:modelValue": e.toggleSelectAll
1191
- }, null, 8, ["aria-label", "model-value", "indeterminate", "onUpdate:modelValue"]),
1192
- B(l, {
1193
- el: "span",
1194
- "aria-hidden": "true"
1195
- }, {
1196
- default: T(() => [
1197
- G(w(e.selectAllCheckboxText), 1)
1198
- ]),
1199
- _: 1
1200
- })
1201
- ]),
1202
- _: 1
1203
- }, 512)) : Y("", !0),
1204
- e.showSelectAllCheckbox ? (f(), _("hr", Nt)) : Y("", !0),
1205
- e.showSelectedItems ? (f(), _("div", wt, [
1206
- B(i, {
1207
- ref: "selectedListboxItemsRef",
1208
- items: e.selectedOptions,
1209
- "is-option-disabled": e.isOptionDisabled,
1210
- onUnselectCategory: e.unselectAllCategory,
1211
- onUnselectItem: t[0] || (t[0] = (d) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, d))
1212
- }, null, 8, ["items", "is-option-disabled", "onUnselectCategory"]),
1213
- t[5] || (t[5] = K("hr", { class: "b-listbox-multi-select__divider" }, null, -1))
1214
- ])) : Y("", !0),
1215
- B(y, {
1216
- ref: "listboxItemsRef",
1217
- items: e.items,
1218
- "is-option-disabled": e.isOptionDisabled,
1219
- "is-multi-level": e.isMultiLevelSelect,
1220
- "static-categories": e.staticCategories,
1221
- searching: e.searching,
1222
- "selected-items-list": e.selectedItemsList,
1223
- onToggleCheckboxSelection: t[1] || (t[1] = (d) => e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, d)),
1224
- onSelectCategory: e.selectAllCategory,
1225
- onUnselectCategory: e.unselectAllCategory,
1226
- onSpacePressed: t[2] || (t[2] = (d) => e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, d)),
1227
- onTabPressed: t[3] || (t[3] = (d) => e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, d)),
1228
- onEnterPressed: t[4] || (t[4] = (d) => e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, d))
1229
- }, ie({ _: 2 }, [
1230
- F(e.slots, (d, R) => ({
1231
- name: R,
1232
- fn: T(($) => [
1233
- z(e.$slots, R, ee(ne($)), void 0, !0)
1234
- ])
1235
- }))
1236
- ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "onSelectCategory", "onUnselectCategory"])
1237
- ], 16)), [
1238
- [o]
1239
- ]);
1240
- }
1241
- const Te = /* @__PURE__ */ q(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857"]]), _e = {
1242
- "en-US": {
1243
- loading: "Loading",
1244
- showMore: "Show more"
1245
- },
1246
- "ja-JP": {
1247
- loading: "読み込み中",
1248
- showMore: "表示内容を増やす"
1249
- },
1250
- "pt-BR": {
1251
- loading: "Carregando",
1252
- showMore: "Mostrar mais"
1253
- }
1254
- }, Vt = 36, Gt = W({
1255
- name: "bento-listbox",
1256
- components: {
1257
- BentoEmptyState: We,
1258
- BentoListboxSingleSelect: St,
1259
- BentoListboxMultiSelect: Te,
1260
- BentoTypography: Z,
1261
- BentoLoadingIndicator: qe,
1262
- BentoLoadingButton: Qe
1263
- },
1264
- directives: { BentoKeyboardNavigationDirective: Se },
1265
- i18n: { messages: _e },
1266
- props: {
1267
- /**
1268
- * Defines a string value that labels an interactive element.
1269
- */
1270
- ariaLabel: { type: String, default: null },
1271
- /**
1272
- * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
1273
- */
1274
- emptyState: {
1275
- type: Object,
1276
- default: void 0
1277
- },
1278
- /**
1279
- * Indicates whether there are more items to load
1280
- */
1281
- hasMoreItems: { type: Boolean, default: !1 },
1282
- /**
1283
- * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
1284
- */
1285
- id: { type: String, required: !0 },
1286
- /**
1287
- * Function that allows the options to be disabled
1288
- *
1289
- * @type {BentoListboxIsOptionDisabled}
1290
- * @param {BentoListboxOptionItem} option - Listbox option object
1291
- * @param {string} option.label - Option's label text
1292
- * @param {string|number} option.value - Option's value
1293
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
1294
- */
1295
- isOptionDisabled: {
1296
- type: Function,
1297
- default: () => {
1298
- }
1299
- },
1300
- /**
1301
- * The option elements to populate the listbox with.
1302
- * It must be an array of {@see BentoListboxOptionItem }
1303
- * * @property {string} value.label - Text to be displayed in the option
1304
- * * @property {string,number} value.value - Value of the option
1305
- */
1306
- items: {
1307
- type: Array,
1308
- required: !0
1309
- },
1310
- /**
1311
- * Indicates if new options are loading.
1312
- */
1313
- loading: { type: Boolean, default: !1 },
1314
- /**
1315
- * The type of `Lazy Load`.
1316
- * Type "automatic" will enable infinite scrolling
1317
- * Type "button" will enable lazy loading with "Show more" button
1318
- */
1319
- lazyLoadType: {
1320
- type: String,
1321
- default: X.NONE,
1322
- validator: (e) => Object.values(X).includes(e)
1323
- },
1324
- /**
1325
- * If enabled, the user will be able to select multiple items.
1326
- */
1327
- multiple: { type: Boolean, default: !1 },
1328
- /**
1329
- * If enabled, dropdown will display non-selectable, static categories
1330
- */
1331
- staticCategories: { type: Boolean, default: !1 },
1332
- /**
1333
- * Messaged displayed when no items are listed in the listbox
1334
- */
1335
- noResultsMessage: { type: String, required: !0 },
1336
- /**
1337
- * Flag that indicates that an external search it's being made
1338
- * to filter out the items inside the the multi-select listbox
1339
- *
1340
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
1341
- */
1342
- searching: Te.props.searching,
1343
- /**
1344
- * The `input` value.
1345
- * Providing an empty string or empty array will select no options.
1346
- * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1347
- */
1348
- selectedValue: {
1349
- type: Array,
1350
- default: () => []
1351
- },
1352
- /**
1353
- * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1354
- * The itemHeight function is used to calculate the height of rendered item given it's index.
1355
- */
1356
- virtualScroll: {
1357
- type: [Boolean, Object],
1358
- default: !1
1359
- }
1360
- },
1361
- emits: [
1362
- b.SELECT,
1363
- b.SPACE,
1364
- b.SHOW_MORE,
1365
- b.ENTER,
1366
- b.ESCAPE,
1367
- b.TAB
1368
- ],
1369
- setup(e, { emit: t, slots: a }) {
1370
- const c = P([]), u = se(e, "items"), { t: n } = ue({ messages: _e }), s = v(() => e.lazyLoadType !== X.AUTOMATIC), l = v(() => e.lazyLoadType === X.AUTOMATIC), r = () => {
1371
- var N;
1372
- return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((N = e == null ? void 0 : e.virtualScroll) != null && N.itemHeight) ? e.virtualScroll.itemHeight : Vt;
1373
- }, {
1374
- containerRef: i,
1375
- containerProps: y,
1376
- onScroll: o,
1377
- list: d,
1378
- wrapperProps: R
1379
- } = tt(u, {
1380
- itemHeight: r(),
1381
- // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1382
- disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
1383
- }), $ = v(
1384
- () => s.value ? "true" : void 0
1385
- ), M = v(
1386
- () => s.value && e.loading ? "true" : "false"
1387
- ), m = v(
1388
- () => s.value ? "polite" : void 0
1389
- ), C = (N) => (le) => {
1390
- t(N, le);
1391
- }, O = () => {
1392
- t(b.SHOW_MORE);
1393
- }, k = je(() => {
1394
- const N = i.value;
1395
- if (!N)
1396
- return;
1397
- const le = Math.round(N.scrollTop) + N.clientHeight >= N.scrollHeight;
1398
- e.hasMoreItems && le && !e.loading && O();
1399
- }), S = () => {
1400
- l.value ? k() : o();
1401
- }, I = v(() => {
1402
- var N;
1403
- return ((N = e.items) == null ? void 0 : N.length) === 0;
1404
- }), V = v(
1405
- () => e.lazyLoadType === X.BUTTON && e.hasMoreItems
1406
- ), Q = v(
1407
- () => e.loading ? he.LOADING : he.START
1408
- ), be = v(() => e.loading ? n("loading") : n("showMore")), re = v(() => ({
1409
- ...e.emptyState,
1410
- variant: "condensed"
1411
- })), me = {
1412
- [b.SELECT]: C(b.SELECT),
1413
- [b.SPACE]: C(b.SPACE),
1414
- [b.TAB]: C(b.TAB),
1415
- [b.ENTER]: C(b.ENTER)
1416
- };
1417
- return {
1418
- // Refs
1419
- listboxRef: i,
1420
- listboxItemRef: c,
1421
- // a11y
1422
- ariaAtomic: $,
1423
- ariaBusy: M,
1424
- ariaLive: m,
1425
- // Values
1426
- containerProps: y,
1427
- isSearchResultEmpty: I,
1428
- limitedEmptyStateProps: re,
1429
- loadingButtonState: Q,
1430
- slots: a,
1431
- shouldDisplayShowMoreButton: V,
1432
- showMoreButtonText: be,
1433
- virtualisedItems: d,
1434
- wrapperProps: R,
1435
- // Enums
1436
- BentoKeyboardNavigationKeyDownEvent: x,
1437
- BentoListboxEvent: b,
1438
- // Methods
1439
- onListboxContainerScroll: S,
1440
- onOptionSelected: C,
1441
- emitShowMore: O,
1442
- listboxListeners: me
1443
- };
1444
- }
1445
- }), zt = ["id", "aria-busy", "aria-atomic", "aria-label", "aria-live"], Ft = {
1446
- key: 0,
1447
- class: "b-listbox__empty-search-message"
1448
- }, xt = {
1449
- key: 2,
1450
- class: "b-listbox__lazy-load"
1451
- }, Yt = {
1452
- key: 3,
1453
- class: "b-listbox__lazy-load"
1454
- };
1455
- function Kt(e, t, a, c, u, n) {
1456
- var R;
1457
- const s = L("bento-empty-state"), l = L("bento-typography"), r = L("bento-listbox-multi-select"), i = L("bento-listbox-single-select"), y = L("bento-loading-button"), o = L("bento-loading-indicator"), d = pe("bento-keyboard-navigation-directive");
1458
- return ae((f(), _("div", {
1459
- id: e.id,
1460
- ref: "listboxRef",
1461
- class: "b-listbox",
1462
- role: "listbox",
1463
- tabindex: "-1",
1464
- "aria-busy": e.ariaBusy,
1465
- "aria-atomic": e.ariaAtomic,
1466
- "aria-label": e.ariaLabel,
1467
- "aria-live": e.ariaLive,
1468
- style: Ke((R = e.containerProps) == null ? void 0 : R.style),
1469
- onScroll: t[0] || (t[0] = (...$) => e.onListboxContainerScroll && e.onListboxContainerScroll(...$))
1470
- }, [
1471
- K("div", ee(ne(e.wrapperProps)), [
1472
- e.isSearchResultEmpty ? (f(), _("div", Ft, [
1473
- e.emptyState ? (f(), D(s, ee(U({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (f(), D(l, {
1474
- key: 1,
1475
- el: "span"
1476
- }, {
1477
- default: T(() => [
1478
- G(w(e.noResultsMessage), 1)
1479
- ]),
1480
- _: 1
1481
- }))
1482
- ])) : (f(), _(J, { key: 1 }, [
1483
- e.multiple ? (f(), D(r, U({
1484
- key: 0,
1485
- ref: "listboxItemRef",
1486
- "has-more-items": e.hasMoreItems,
1487
- items: e.items,
1488
- "lazy-load-type": e.lazyLoadType,
1489
- "static-categories": e.staticCategories,
1490
- "selected-values": e.selectedValue,
1491
- searching: e.searching,
1492
- "is-option-disabled": e.isOptionDisabled
1493
- }, te(e.listboxListeners)), ie({ _: 2 }, [
1494
- F(e.slots, ($, M) => ({
1495
- name: M,
1496
- fn: T((m) => [
1497
- z(e.$slots, M, ee(ne(m)), void 0, !0)
1498
- ])
1499
- }))
1500
- ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (f(), D(i, U({
1501
- key: 1,
1502
- ref: "listboxItemRef",
1503
- items: e.virtualisedItems,
1504
- "selected-value": e.selectedValue,
1505
- "static-categories": e.staticCategories,
1506
- "is-option-disabled": e.isOptionDisabled
1507
- }, te(e.listboxListeners)), ie({ _: 2 }, [
1508
- F(e.slots, ($, M) => ({
1509
- name: M,
1510
- fn: T((m) => [
1511
- z(e.$slots, M, ee(ne(m)), void 0, !0)
1512
- ])
1513
- }))
1514
- ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1515
- e.shouldDisplayShowMoreButton ? (f(), _("div", xt, [
1516
- B(y, {
1517
- state: e.loadingButtonState,
1518
- variant: "secondary",
1519
- onClickCapture: e.emitShowMore
1520
- }, {
1521
- default: T(() => [
1522
- G(w(e.showMoreButtonText), 1)
1523
- ]),
1524
- _: 1
1525
- }, 8, ["state", "onClickCapture"])
1526
- ])) : e.loading ? (f(), _("div", Yt, [
1527
- B(o)
1528
- ])) : Y("", !0)
1529
- ], 64))
1530
- ], 16)
1531
- ], 44, zt)), [
1532
- [d]
1533
- ]);
1534
- }
1535
- const as = /* @__PURE__ */ q(Gt, [["render", Kt], ["__scopeId", "data-v-3d72f45a"]]), ye = (e, t) => {
1536
- for (const a of e) {
1537
- if (a.value === t)
1538
- return a;
1539
- if (a.items) {
1540
- const c = ye(a.items, t);
1541
- if (c)
1542
- return c;
1543
- }
1544
- }
1545
- return null;
1546
- }, rs = (e, t, a) => {
1547
- const c = P([]), u = P(), n = (r) => {
1548
- u.value = a.value ? r.map(({ value: i }) => i) : r[0].value;
1549
- }, s = (r) => {
1550
- c.value = r, n(r);
1551
- }, l = () => {
1552
- c.value = [], u.value = null;
1553
- };
1554
- return Ie(
1555
- () => t.value,
1556
- () => {
1557
- if (!t.value) {
1558
- l();
1559
- return;
1560
- }
1561
- const r = !Array.isArray(t.value), i = [...c.value];
1562
- l();
1563
- const y = (o) => {
1564
- let d = ye(e.value, o);
1565
- d || (d = ye(i, o)), d || (d = { value: o, label: o.toString() }), c.value.push(d);
1566
- };
1567
- if (r) {
1568
- const o = t.value;
1569
- y(o), n(c.value);
1570
- return;
1571
- }
1572
- t.value.forEach(y), n(c.value);
1573
- },
1574
- { immediate: !0 }
1575
- ), {
1576
- // Values
1577
- cachedSelectedListboxOptions: c,
1578
- cachedListboxSelectedValues: u,
1579
- // Methods
1580
- resetCache: l,
1581
- setCachedValues: s
1582
- };
1583
- };
1584
- export {
1585
- X as B,
1586
- b as a,
1587
- as as b,
1588
- rs as c,
1589
- Mt as u
1590
- };
1591
- //# sourceMappingURL=use-cached-selected-values.D82-YBdB.js.map