@adyen/bento-vue2 1.61.0 → 1.62.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 (251) hide show
  1. package/dist/@types/index.d.ts +246 -159
  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/base-modal.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/currency.css +1 -1
  10. package/dist/assets/dashed-underline.css +1 -1
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/file-uploader.css +1 -1
  14. package/dist/assets/inspector.css +1 -1
  15. package/dist/assets/menu.css +1 -1
  16. package/dist/assets/modal-fullscreen.css +1 -1
  17. package/dist/assets/popover.css +1 -1
  18. package/dist/assets/sidepanel.css +1 -1
  19. package/dist/assets/tag.css +1 -1
  20. package/dist/assets/use-cached-selected-values.css +1 -1
  21. package/dist/button.js +3 -3
  22. package/dist/card.js +1 -1
  23. package/dist/checkbox.js +3 -3
  24. package/dist/chip.js +1 -1
  25. package/dist/chunks/{accordion-item.C4tyRMCt.js → accordion-item.D1t0oHlP.js} +2 -2
  26. package/dist/chunks/{accordion-item.C4tyRMCt.js.map → accordion-item.D1t0oHlP.js.map} +1 -1
  27. package/dist/chunks/{action-bar.Bgd_D2d9.js → action-bar.whU1em8H.js} +6 -6
  28. package/dist/chunks/{action-bar.Bgd_D2d9.js.map → action-bar.whU1em8H.js.map} +1 -1
  29. package/dist/chunks/{alert.C1QHvbmJ.js → alert.c1rhDDrU.js} +7 -7
  30. package/dist/chunks/{alert.C1QHvbmJ.js.map → alert.c1rhDDrU.js.map} +1 -1
  31. package/dist/chunks/{base-modal.BKjjZPZw.js → base-modal.3OptY7u_.js} +5 -5
  32. package/dist/chunks/{base-modal.BKjjZPZw.js.map → base-modal.3OptY7u_.js.map} +1 -1
  33. package/dist/chunks/{bin.DuebwJYu.js → bin.DLXkAVvw.js} +2 -2
  34. package/dist/chunks/{bin.DuebwJYu.js.map → bin.DLXkAVvw.js.map} +1 -1
  35. package/dist/chunks/{button-actions-with-menu.YN379eYi.js → button-actions-with-menu.RoaQFPKT.js} +4 -4
  36. package/dist/chunks/{button-actions-with-menu.YN379eYi.js.map → button-actions-with-menu.RoaQFPKT.js.map} +1 -1
  37. package/dist/chunks/{button-actions.CHZ2BT5_.js → button-actions._OIvTdKt.js} +4 -4
  38. package/dist/chunks/{button-actions.CHZ2BT5_.js.map → button-actions._OIvTdKt.js.map} +1 -1
  39. package/dist/chunks/{button.CvgJ_0_Z.js → button.hF-nD1Og.js} +2 -2
  40. package/dist/chunks/{button.CvgJ_0_Z.js.map → button.hF-nD1Og.js.map} +1 -1
  41. package/dist/chunks/{calendar.CjVkJzjc.js → calendar.DoOFNX-Z.js} +3 -3
  42. package/dist/chunks/{calendar.CjVkJzjc.js.map → calendar.DoOFNX-Z.js.map} +1 -1
  43. package/dist/chunks/{card.CcDdIUvd.js → card.Cu6MicVI.js} +3 -3
  44. package/dist/chunks/{card.CcDdIUvd.js.map → card.Cu6MicVI.js.map} +1 -1
  45. package/dist/chunks/{checkbox-group.CossCRls.js → checkbox-group.B0IGYf1q.js} +4 -4
  46. package/dist/chunks/{checkbox-group.CossCRls.js.map → checkbox-group.B0IGYf1q.js.map} +1 -1
  47. package/dist/chunks/{checkbox-input.Dr1GS2BZ.js → checkbox-input.B-4Rw5mp.js} +3 -3
  48. package/dist/chunks/{checkbox-input.Dr1GS2BZ.js.map → checkbox-input.B-4Rw5mp.js.map} +1 -1
  49. package/dist/chunks/{checkbox.DkDqMVeb.js → checkbox.DkCukYh0.js} +4 -4
  50. package/dist/chunks/{checkbox.DkDqMVeb.js.map → checkbox.DkCukYh0.js.map} +1 -1
  51. package/dist/chunks/{checkmark-circle-fill.DZBl7CeY.js → checkmark-circle-fill.BttTCjrM.js} +2 -2
  52. package/dist/chunks/{checkmark-circle-fill.DZBl7CeY.js.map → checkmark-circle-fill.BttTCjrM.js.map} +1 -1
  53. package/dist/chunks/{checkmark-small.C8T8ISN6.js → checkmark-small.DVDtD4HQ.js} +2 -2
  54. package/dist/chunks/{checkmark-small.C8T8ISN6.js.map → checkmark-small.DVDtD4HQ.js.map} +1 -1
  55. package/dist/chunks/{chevron-left.DOMTgGel.js → chevron-left.BS24hEFa.js} +3 -3
  56. package/dist/chunks/{chevron-left.DOMTgGel.js.map → chevron-left.BS24hEFa.js.map} +1 -1
  57. package/dist/chunks/{chevron-up.CSVyoaTy.js → chevron-up.CHK1E4p9.js} +3 -3
  58. package/dist/chunks/{chevron-up.CSVyoaTy.js.map → chevron-up.CHK1E4p9.js.map} +1 -1
  59. package/dist/chunks/{chip.bZEhHfIk.js → chip.OV0EWIP3.js} +2 -2
  60. package/dist/chunks/{chip.bZEhHfIk.js.map → chip.OV0EWIP3.js.map} +1 -1
  61. package/dist/chunks/{code-snippet.gRALClm3.js → code-snippet.n93oYvH4.js} +6 -6
  62. package/dist/chunks/{code-snippet.gRALClm3.js.map → code-snippet.n93oYvH4.js.map} +1 -1
  63. package/dist/chunks/{controls-group.C4CHrb6Y.js → controls-group.Dpe3TqAz.js} +2 -2
  64. package/dist/chunks/{controls-group.C4CHrb6Y.js.map → controls-group.Dpe3TqAz.js.map} +1 -1
  65. package/dist/chunks/{copy.qU5LvaNi.js → copy.Co1MMqtM.js} +3 -3
  66. package/dist/chunks/{copy.qU5LvaNi.js.map → copy.Co1MMqtM.js.map} +1 -1
  67. package/dist/chunks/{cross-circle-fill-small.YhLgeipP.js → cross-circle-fill-small.DfxDedRr.js} +2 -2
  68. package/dist/chunks/{cross-circle-fill-small.YhLgeipP.js.map → cross-circle-fill-small.DfxDedRr.js.map} +1 -1
  69. package/dist/chunks/{cross-circle-fill.Ra0-PIUo.js → cross-circle-fill.DTDtgLMf.js} +2 -2
  70. package/dist/chunks/{cross-circle-fill.Ra0-PIUo.js.map → cross-circle-fill.DTDtgLMf.js.map} +1 -1
  71. package/dist/chunks/{cross-small.CZqsjZDz.js → cross-small.CoQUe8SS.js} +2 -2
  72. package/dist/chunks/{cross-small.CZqsjZDz.js.map → cross-small.CoQUe8SS.js.map} +1 -1
  73. package/dist/chunks/{cross.CJ5EEL2c.js → cross.CC_B-vG-.js} +2 -2
  74. package/dist/chunks/{cross.CJ5EEL2c.js.map → cross.CC_B-vG-.js.map} +1 -1
  75. package/dist/chunks/currency.BM9OXTqe.js +96 -0
  76. package/dist/chunks/currency.BM9OXTqe.js.map +1 -0
  77. package/dist/chunks/{dashboard-section.Bn5RJCPR.js → dashboard-section.BEw-n-XQ.js} +3 -3
  78. package/dist/chunks/{dashboard-section.Bn5RJCPR.js.map → dashboard-section.BEw-n-XQ.js.map} +1 -1
  79. package/dist/chunks/{dashed-underline._q5UFPSC.js → dashed-underline.DD24UDCz.js} +13 -13
  80. package/dist/chunks/dashed-underline.DD24UDCz.js.map +1 -0
  81. package/dist/chunks/{data-grid-template.CrpwSZRE.js → data-grid-template.DGFmCUII.js} +4 -4
  82. package/dist/chunks/{data-grid-template.CrpwSZRE.js.map → data-grid-template.DGFmCUII.js.map} +1 -1
  83. package/dist/chunks/{data-grid.ZBzlPPcj.js → data-grid.BcGRXt9C.js} +1060 -979
  84. package/dist/chunks/data-grid.BcGRXt9C.js.map +1 -0
  85. package/dist/chunks/{date-picker.BOEKZKFp.js → date-picker.Dc_HdQnr.js} +5 -5
  86. package/dist/chunks/{date-picker.BOEKZKFp.js.map → date-picker.Dc_HdQnr.js.map} +1 -1
  87. package/dist/chunks/{date-range-picker.DMHCqAZA.js → date-range-picker.D6xJAHoB.js} +8 -8
  88. package/dist/chunks/{date-range-picker.DMHCqAZA.js.map → date-range-picker.D6xJAHoB.js.map} +1 -1
  89. package/dist/chunks/{dialog-page.CDV828kt.js → dialog-page.CLHZqQeU.js} +7 -7
  90. package/dist/chunks/{dialog-page.CDV828kt.js.map → dialog-page.CLHZqQeU.js.map} +1 -1
  91. package/dist/chunks/{dot.CnkXzRn3.js → dot.BW9SneIk.js} +2 -2
  92. package/dist/chunks/{dot.CnkXzRn3.js.map → dot.BW9SneIk.js.map} +1 -1
  93. package/dist/chunks/{dropdown-default-textbox.AUsF-RIc.js → dropdown-default-textbox.7PMxHqoa.js} +4 -4
  94. package/dist/chunks/{dropdown-default-textbox.AUsF-RIc.js.map → dropdown-default-textbox.7PMxHqoa.js.map} +1 -1
  95. package/dist/chunks/{dropdown-tag.CaEPpy4R.js → dropdown-tag.qKSu6xYY.js} +3 -3
  96. package/dist/chunks/{dropdown-tag.CaEPpy4R.js.map → dropdown-tag.qKSu6xYY.js.map} +1 -1
  97. package/dist/chunks/{dropdown.3c5SsPV1.js → dropdown.BNLPzKbr.js} +27 -27
  98. package/dist/chunks/{dropdown.3c5SsPV1.js.map → dropdown.BNLPzKbr.js.map} +1 -1
  99. package/dist/chunks/{empty-state.DXDb-S58.js → empty-state.mtXfb1BB.js} +2 -2
  100. package/dist/chunks/{empty-state.DXDb-S58.js.map → empty-state.mtXfb1BB.js.map} +1 -1
  101. package/dist/chunks/{error-message.BAE9B9-N.js → error-message.BeExHHgv.js} +3 -3
  102. package/dist/chunks/{error-message.BAE9B9-N.js.map → error-message.BeExHHgv.js.map} +1 -1
  103. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  104. package/dist/chunks/{expand.C263WARj.js → expand.Bbielaja.js} +2 -2
  105. package/dist/chunks/{expand.C263WARj.js.map → expand.Bbielaja.js.map} +1 -1
  106. package/dist/chunks/{file-uploader.ChDPu4V7.js → file-uploader.RYWR99Nq.js} +20 -20
  107. package/dist/chunks/{file-uploader.ChDPu4V7.js.map → file-uploader.RYWR99Nq.js.map} +1 -1
  108. package/dist/chunks/{filter-bar.BVRAteKx.js → filter-bar.TiqZofNt.js} +20 -20
  109. package/dist/chunks/{filter-bar.BVRAteKx.js.map → filter-bar.TiqZofNt.js.map} +1 -1
  110. package/dist/chunks/{fixed-scroller.DPiQh_o-.js → fixed-scroller.Ctz5dFqz.js} +3 -3
  111. package/dist/chunks/{fixed-scroller.DPiQh_o-.js.map → fixed-scroller.Ctz5dFqz.js.map} +1 -1
  112. package/dist/chunks/{footer-actions.B3pFu9GM.js → footer-actions.DyuSTjC5.js} +3 -3
  113. package/dist/chunks/{footer-actions.B3pFu9GM.js.map → footer-actions.DyuSTjC5.js.map} +1 -1
  114. package/dist/chunks/{form-layout-title.Ck5QqPkA.js → form-layout-title.CIynHgCF.js} +2 -2
  115. package/dist/chunks/{form-layout-title.Ck5QqPkA.js.map → form-layout-title.CIynHgCF.js.map} +1 -1
  116. package/dist/chunks/{header-with-views.BlEEUDWs.js → header-with-views.MFHmiIXb.js} +131 -131
  117. package/dist/chunks/{header-with-views.BlEEUDWs.js.map → header-with-views.MFHmiIXb.js.map} +1 -1
  118. package/dist/chunks/{header.BfxNBVCD.js → header.B1PrBQG0.js} +5 -5
  119. package/dist/chunks/{header.BfxNBVCD.js.map → header.B1PrBQG0.js.map} +1 -1
  120. package/dist/chunks/{info-icon-with-popover.B4Q8jmW7.js → info-icon-with-popover.COq40yTq.js} +3 -3
  121. package/dist/chunks/{info-icon-with-popover.B4Q8jmW7.js.map → info-icon-with-popover.COq40yTq.js.map} +1 -1
  122. package/dist/chunks/{info-icon.C1xOlhYj.js → info-icon.G8lKgclf.js} +2 -2
  123. package/dist/chunks/{info-icon.C1xOlhYj.js.map → info-icon.G8lKgclf.js.map} +1 -1
  124. package/dist/chunks/{info.4d_mJHvT.js → info.CszJ0kMi.js} +5 -5
  125. package/dist/chunks/{info.4d_mJHvT.js.map → info.CszJ0kMi.js.map} +1 -1
  126. package/dist/chunks/{input-field-password.Ciw4TWWq.js → input-field-password.BlX3Icgt.js} +8 -8
  127. package/dist/chunks/{input-field-password.Ciw4TWWq.js.map → input-field-password.BlX3Icgt.js.map} +1 -1
  128. package/dist/chunks/{input-field-phone-number.CRx64sme.js → input-field-phone-number.Ofvi2A48.js} +3 -3
  129. package/dist/chunks/{input-field-phone-number.CRx64sme.js.map → input-field-phone-number.Ofvi2A48.js.map} +1 -1
  130. package/dist/chunks/{input-field.DOnqD_Fx.js → input-field.Dck9dAeK.js} +3 -3
  131. package/dist/chunks/{input-field.DOnqD_Fx.js.map → input-field.Dck9dAeK.js.map} +1 -1
  132. package/dist/chunks/{inspector.tn1wr5hV.js → inspector.BI28vKQz.js} +4 -4
  133. package/dist/chunks/{inspector.tn1wr5hV.js.map → inspector.BI28vKQz.js.map} +1 -1
  134. package/dist/chunks/{link.D0P79Toh.js → link.CXy_LoFI.js} +5 -5
  135. package/dist/chunks/{link.D0P79Toh.js.map → link.CXy_LoFI.js.map} +1 -1
  136. package/dist/chunks/{listbox-option-tag.CczGPhWH.js → listbox-option-tag.EzSkn_lM.js} +2 -2
  137. package/dist/chunks/{listbox-option-tag.CczGPhWH.js.map → listbox-option-tag.EzSkn_lM.js.map} +1 -1
  138. package/dist/chunks/{menu.B_DCBdeN.js → menu.CTVbNfuo.js} +26 -26
  139. package/dist/chunks/{menu.B_DCBdeN.js.map → menu.CTVbNfuo.js.map} +1 -1
  140. package/dist/chunks/{modal-fullscreen.cBUMfJhU.js → modal-fullscreen.1OdCgyca.js} +5 -5
  141. package/dist/chunks/{modal-fullscreen.cBUMfJhU.js.map → modal-fullscreen.1OdCgyca.js.map} +1 -1
  142. package/dist/chunks/{modal.DWkmyvRc.js → modal.xY5aFhAO.js} +5 -5
  143. package/dist/chunks/{modal.DWkmyvRc.js.map → modal.xY5aFhAO.js.map} +1 -1
  144. package/dist/chunks/{pagination.pzY_1Qqp.js → pagination.BvhUFgsT.js} +7 -7
  145. package/dist/chunks/{pagination.pzY_1Qqp.js.map → pagination.BvhUFgsT.js.map} +1 -1
  146. package/dist/chunks/{popover.BN2VK6KG.js → popover.B05xkQ4e.js} +4 -4
  147. package/dist/chunks/{popover.BN2VK6KG.js.map → popover.B05xkQ4e.js.map} +1 -1
  148. package/dist/chunks/{promo-banner.Cua4uX1x.js → promo-banner.Bbc2U3S3.js} +2 -2
  149. package/dist/chunks/{promo-banner.Cua4uX1x.js.map → promo-banner.Bbc2U3S3.js.map} +1 -1
  150. package/dist/chunks/{radio-group.CzsbH4_F.js → radio-group.CRDMTTyM.js} +4 -4
  151. package/dist/chunks/{radio-group.CzsbH4_F.js.map → radio-group.CRDMTTyM.js.map} +1 -1
  152. package/dist/chunks/{refresh.Bc9FzGjJ.js → refresh.arF7jP-l.js} +2 -2
  153. package/dist/chunks/{refresh.Bc9FzGjJ.js.map → refresh.arF7jP-l.js.map} +1 -1
  154. package/dist/chunks/{rich-text-editor.BRlygI8q.js → rich-text-editor.BTJpOiYL.js} +5 -5
  155. package/dist/chunks/{rich-text-editor.BRlygI8q.js.map → rich-text-editor.BTJpOiYL.js.map} +1 -1
  156. package/dist/chunks/{search-bar.C10szx9Q.js → search-bar.Ch1dLZAb.js} +5 -5
  157. package/dist/chunks/{search-bar.C10szx9Q.js.map → search-bar.Ch1dLZAb.js.map} +1 -1
  158. package/dist/chunks/{search.DLtglc02.js → search.D53Ia3rC.js} +4 -4
  159. package/dist/chunks/{search.DLtglc02.js.map → search.D53Ia3rC.js.map} +1 -1
  160. package/dist/chunks/{secondary-nav.Bdxei6WP.js → secondary-nav.DBssP9fQ.js} +2 -2
  161. package/dist/chunks/{secondary-nav.Bdxei6WP.js.map → secondary-nav.DBssP9fQ.js.map} +1 -1
  162. package/dist/chunks/{selection-card-group.CnvREAh5.js → selection-card-group.CjFm-cAm.js} +4 -4
  163. package/dist/chunks/{selection-card-group.CnvREAh5.js.map → selection-card-group.CjFm-cAm.js.map} +1 -1
  164. package/dist/chunks/{show.e4LEpZKG.js → show.B_mKPF6I.js} +3 -3
  165. package/dist/chunks/{show.e4LEpZKG.js.map → show.B_mKPF6I.js.map} +1 -1
  166. package/dist/chunks/{sidepanel.X5Te2FiT.js → sidepanel.CI8fu1Q3.js} +5 -5
  167. package/dist/chunks/{sidepanel.X5Te2FiT.js.map → sidepanel.CI8fu1Q3.js.map} +1 -1
  168. package/dist/chunks/{step.CuOpi-Ye.js → step.dNTg2rtW.js} +3 -3
  169. package/dist/chunks/{step.CuOpi-Ye.js.map → step.dNTg2rtW.js.map} +1 -1
  170. package/dist/chunks/{structured-list-item.n5vrbuW9.js → structured-list-item.DKEwF8n7.js} +5 -5
  171. package/dist/chunks/{structured-list-item.n5vrbuW9.js.map → structured-list-item.DKEwF8n7.js.map} +1 -1
  172. package/dist/chunks/{summary-grid.types.D23lQ-e5.js → summary-grid.types.BgFtV5Qh.js} +5 -5
  173. package/dist/chunks/{summary-grid.types.D23lQ-e5.js.map → summary-grid.types.BgFtV5Qh.js.map} +1 -1
  174. package/dist/chunks/{tabs.DKehFLDL.js → tabs.zkTl2PQR.js} +2 -2
  175. package/dist/chunks/{tabs.DKehFLDL.js.map → tabs.zkTl2PQR.js.map} +1 -1
  176. package/dist/chunks/{tag.DDjyf2hd.js → tag.BaSi2GVV.js} +7 -7
  177. package/dist/chunks/{tag.DDjyf2hd.js.map → tag.BaSi2GVV.js.map} +1 -1
  178. package/dist/chunks/{textarea.D09495Nz.js → textarea.D7M7Jerq.js} +4 -4
  179. package/dist/chunks/{textarea.D09495Nz.js.map → textarea.D7M7Jerq.js.map} +1 -1
  180. package/dist/chunks/{timeline-item.DKPI-4iu.js → timeline-item.njO0X8KL.js} +8 -8
  181. package/dist/chunks/{timeline-item.DKPI-4iu.js.map → timeline-item.njO0X8KL.js.map} +1 -1
  182. package/dist/chunks/{toast.C_uVjJnK.js → toast.BOyeuS19.js} +3 -3
  183. package/dist/chunks/{toast.C_uVjJnK.js.map → toast.BOyeuS19.js.map} +1 -1
  184. package/dist/chunks/{toggle-button.COEDg5Ym.js → toggle-button.DEVVvpkw.js} +2 -2
  185. package/dist/chunks/{toggle-button.COEDg5Ym.js.map → toggle-button.DEVVvpkw.js.map} +1 -1
  186. package/dist/chunks/{toggle.Q52IIKfi.js → toggle.DyXL09-x.js} +2 -2
  187. package/dist/chunks/{toggle.Q52IIKfi.js.map → toggle.DyXL09-x.js.map} +1 -1
  188. package/dist/chunks/{tutorial.DgmK5EEo.js → tutorial.C9PYfB4z.js} +6 -6
  189. package/dist/chunks/{tutorial.DgmK5EEo.js.map → tutorial.C9PYfB4z.js.map} +1 -1
  190. package/dist/chunks/use-cached-selected-values.Da6xbfzO.js +1192 -0
  191. package/dist/chunks/use-cached-selected-values.Da6xbfzO.js.map +1 -0
  192. package/dist/chunks/{warning-filled.Cd0kVWwa.js → warning-filled.tWOyLUQT.js} +5 -5
  193. package/dist/chunks/{warning-filled.Cd0kVWwa.js.map → warning-filled.tWOyLUQT.js.map} +1 -1
  194. package/dist/code-snippet.js +1 -1
  195. package/dist/currency.js +1 -1
  196. package/dist/dashboard-template.js +1 -1
  197. package/dist/dashed-underline.js +1 -1
  198. package/dist/data-grid-template.js +1 -1
  199. package/dist/data-grid.js +6 -5
  200. package/dist/date-picker.js +2 -2
  201. package/dist/date-range-picker.js +2 -2
  202. package/dist/dropdown.js +4 -4
  203. package/dist/empty-state.js +1 -1
  204. package/dist/file-uploader.js +1 -1
  205. package/dist/filter-bar.js +1 -1
  206. package/dist/form-layout.js +1 -1
  207. package/dist/header-with-views.js +1 -1
  208. package/dist/header.js +1 -1
  209. package/dist/index.js +256 -255
  210. package/dist/info-icon.js +1 -1
  211. package/dist/input-field-password.js +1 -1
  212. package/dist/input-field-phone-number.js +1 -1
  213. package/dist/input-field.js +1 -1
  214. package/dist/inspector.js +1 -1
  215. package/dist/internal.js +11 -11
  216. package/dist/link.js +1 -1
  217. package/dist/menu.js +1 -1
  218. package/dist/modal-fullscreen.js +1 -1
  219. package/dist/modal.js +2 -2
  220. package/dist/pagination.js +1 -1
  221. package/dist/popover.js +1 -1
  222. package/dist/promo-banner.js +1 -1
  223. package/dist/radio-group.js +1 -1
  224. package/dist/rich-text-editor.js +1 -1
  225. package/dist/search-bar.js +2 -2
  226. package/dist/secondary-nav.js +1 -1
  227. package/dist/selection-card.js +1 -1
  228. package/dist/sidepanel.js +1 -1
  229. package/dist/stepper.js +1 -1
  230. package/dist/structured-list.js +1 -1
  231. package/dist/styles/bento-dark.css +3 -0
  232. package/dist/styles/bento-light.css +3 -0
  233. package/dist/styles/bento.css +3 -0
  234. package/dist/styles/legacy.css +3 -0
  235. package/dist/styles/styleguide.css +3 -0
  236. package/dist/summary-grid.js +1 -1
  237. package/dist/tabs.js +1 -1
  238. package/dist/tag.js +1 -1
  239. package/dist/textarea.js +1 -1
  240. package/dist/timeline.js +1 -1
  241. package/dist/toast.js +1 -1
  242. package/dist/toggle.js +1 -1
  243. package/dist/tutorial.js +1 -1
  244. package/dist/web-types.json +77 -1
  245. package/package.json +8 -8
  246. package/dist/chunks/currency.B1F9YOIx.js +0 -106
  247. package/dist/chunks/currency.B1F9YOIx.js.map +0 -1
  248. package/dist/chunks/dashed-underline._q5UFPSC.js.map +0 -1
  249. package/dist/chunks/data-grid.ZBzlPPcj.js.map +0 -1
  250. package/dist/chunks/use-cached-selected-values.C-umGJXi.js +0 -1183
  251. package/dist/chunks/use-cached-selected-values.C-umGJXi.js.map +0 -1
@@ -1,1183 +0,0 @@
1
- import { computed as r, ref as A, onMounted as de, onUnmounted as ye, watch as fe, defineComponent as $, toRef as w, useSlots as Ce } from "vue";
2
- import { B as G } from "./typography.J1v_SPG3.js";
3
- import { B as he } from "./loading-indicator.z8COalOc.js";
4
- import { B as xe } from "./empty-state.DXDb-S58.js";
5
- import { u as J } from "./i18n.BQkEbtPM.js";
6
- import { d as Se } from "./debounce.DUTu11PS.js";
7
- import "./index.Cl4_42j5.js";
8
- import { B as V } from "./checkbox.DkDqMVeb.js";
9
- import { B as Ee } from "./chip.bZEhHfIk.js";
10
- import { C as Oe, a as Te } from "./chevron-up.CSVyoaTy.js";
11
- import { B as k, a as Z } from "./keyboard-navigation.pB8weElW.js";
12
- import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
13
- import { d as Le, e as ce } from "./button-actions.CHZ2BT5_.js";
14
- /* empty css */
15
- import { o as Ae } from "./resize.Bqks3WUm.js";
16
- import "../assets/use-cached-selected-values.css";
17
- const ve = (t, e, s, l) => {
18
- const o = r(
19
- () => {
20
- var v, y;
21
- return !!((v = t.value) != null && v.length) && ((y = t.value) == null ? void 0 : y.length) === e.value.length;
22
- }
23
- ), n = r(() => {
24
- var v;
25
- return t.value == null || t.value.length === 0 ? !1 : ((v = t.value) == null ? void 0 : v.length) !== e.value.length;
26
- });
27
- return {
28
- isAllSelected: o,
29
- isIndeterminate: n,
30
- toggleSelectAll: (v) => {
31
- v ? s() : l();
32
- }
33
- };
34
- };
35
- function Ie(t, { disabled: e, itemHeight: s, overscan: l = 5, prefixHeight: o }) {
36
- const n = A(null), a = A([]), v = A(0), y = A(0), u = A(0);
37
- let i;
38
- const x = r(() => {
39
- const f = typeof s == "number" ? t.value.length * s : t.value.reduce((T, m, E) => T + s(E), 0), C = typeof s == "number" ? v.value * s : t.value.slice(0, v.value).reduce((T, m, E) => T + s(E), 0);
40
- return {
41
- style: {
42
- marginTop: `${C}px`,
43
- height: `${f - C}px`
44
- }
45
- };
46
- }), L = () => {
47
- const f = (o == null ? void 0 : o.value) ?? 0, C = Math.max(n.value.scrollTop - f, 0);
48
- if (typeof s == "number")
49
- return Math.floor(C / s);
50
- let T = 0, m = 0;
51
- for (let E = 0; E < t.value.length; E += 1) {
52
- const B = s(E);
53
- if (T += B, T >= C) {
54
- m = E;
55
- break;
56
- }
57
- }
58
- return m;
59
- }, S = () => {
60
- if (u.value = n.value.clientHeight, typeof s == "number")
61
- return Math.ceil(u.value / s);
62
- const f = v.value ?? 0;
63
- let C = 0, T = 0;
64
- for (let m = f; m < t.value.length; m += 1) {
65
- const E = s(m);
66
- if (C += E, T = m, C > u.value)
67
- break;
68
- }
69
- return T - f;
70
- }, O = () => {
71
- if (n.value) {
72
- const f = S();
73
- v.value = L(), y.value = Math.min(v.value + f + l, t.value.length), a.value = t.value.slice(v.value, y.value);
74
- }
75
- }, I = () => {
76
- O();
77
- };
78
- e || (de(() => {
79
- n.value && (u.value = n.value.clientHeight, i = Ae(n.value, ({ clientHeight: f }) => {
80
- u.value = f, O();
81
- }), O());
82
- }), ye(() => {
83
- i == null || i.disconnect();
84
- }), fe(
85
- () => t.value,
86
- () => {
87
- O();
88
- }
89
- ));
90
- const b = {
91
- ref: n,
92
- style: { overflowY: "auto" }
93
- };
94
- return e ? {
95
- containerRef: n,
96
- containerProps: b,
97
- // eslint-disable-next-line @typescript-eslint/no-empty-function
98
- onScroll: () => {
99
- },
100
- list: t
101
- } : {
102
- containerRef: n,
103
- containerProps: b,
104
- onScroll: I,
105
- list: a,
106
- wrapperProps: x
107
- };
108
- }
109
- var c = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(c || {}), F = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(F || {});
110
- const Re = $({
111
- name: "bento-listbox-static-category",
112
- components: {
113
- BentoTypography: G
114
- },
115
- props: {
116
- /**
117
- * Category label text
118
- */
119
- categoryLabel: {
120
- type: String,
121
- required: !0
122
- }
123
- }
124
- });
125
- var Be = function() {
126
- var e = this, s = e._self._c;
127
- return e._self._setupProxy, s("div", { staticClass: "b-listbox-single-select-category" }, [s("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), s("div", [e._t("default")], 2)], 1);
128
- }, ke = [], De = /* @__PURE__ */ D(
129
- Re,
130
- Be,
131
- ke,
132
- !1,
133
- null,
134
- "4aa8cc6e"
135
- );
136
- const Ne = De.exports, Me = $({
137
- name: "bento-listbox-option",
138
- props: {
139
- /**
140
- * Setting this property to true will disable the option.
141
- */
142
- disabled: { type: Boolean, default: !1 },
143
- /**
144
- * Indicates if the value is selected. Only one element can be selected at a time.
145
- */
146
- selected: { type: Boolean, default: !1 }
147
- },
148
- emits: [c.CLICK, c.ENTER, c.SPACE, c.TAB],
149
- setup(t, { emit: e }) {
150
- const s = r(() => ({
151
- "b-listbox-option--disabled": t.disabled,
152
- "b-listbox-option--selected": t.selected
153
- }));
154
- return {
155
- // Enums
156
- BentoKeyboardNavigationKeyDownEvent: k,
157
- BentoListboxEvent: c,
158
- // Values
159
- conditionalClasses: s,
160
- // Events
161
- onClick: (n) => {
162
- e(c.CLICK, n);
163
- },
164
- onOptionSelected: (n, a) => {
165
- e(n, a);
166
- }
167
- };
168
- }
169
- });
170
- var $e = function() {
171
- var e = this, s = e._self._c;
172
- return e._self._setupProxy, s("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(l) {
173
- return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, l);
174
- }, function(l) {
175
- return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, l);
176
- }, function(l) {
177
- return !l.type.indexOf("key") && e._k(l.keyCode, "tab", 9, l.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, l);
178
- }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
179
- }, we = [], Pe = /* @__PURE__ */ D(
180
- Me,
181
- $e,
182
- we,
183
- !1,
184
- null,
185
- "d7fb415c"
186
- );
187
- const Y = Pe.exports;
188
- let re = 0;
189
- const Fe = {
190
- beforeCreate() {
191
- this.uuid = re.toString(), re += 1;
192
- }
193
- };
194
- var Ge = function() {
195
- var e = this, s = e._self._c;
196
- return s("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? s("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), s("path", { attrs: { fill: "#00112C", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
197
- }, Ue = [], ze = /* @__PURE__ */ D(
198
- Fe,
199
- Ge,
200
- Ue,
201
- !1,
202
- null,
203
- null
204
- );
205
- const Ye = ze.exports, We = $({
206
- name: "bento-listbox-single-select-option",
207
- components: {
208
- BentoListboxOption: Y,
209
- BentoTypography: G,
210
- CheckmarkIcon: Ye
211
- },
212
- props: {
213
- /**
214
- * Setting this property to true will disable the option.
215
- */
216
- disabled: { type: Boolean, default: !1 },
217
- /**
218
- * The option item that contains all the option item's data.
219
- * @type {BentoListboxOptionItem}
220
- */
221
- option: {
222
- type: Object,
223
- required: !0
224
- },
225
- /**
226
- * Indicates if the value is selected. Only one element can be selected at a time.
227
- */
228
- selected: { type: Boolean, default: !1 }
229
- },
230
- emits: [c.ENTER, c.SELECT, c.SPACE, c.TAB],
231
- setup(t, { emit: e }) {
232
- const s = (a) => {
233
- t.disabled || e(a, t.option);
234
- }, l = r(() => t.disabled ? !0 : null), o = r(() => t.selected ? !0 : null), n = r(() => t.disabled ? -1 : 0);
235
- return {
236
- // Values
237
- ariaDisabled: l,
238
- ariaSelected: o,
239
- tabIndex: n,
240
- // Enums
241
- BentoListboxEvent: c,
242
- // Events
243
- onOptionSelected: s
244
- };
245
- }
246
- });
247
- var Ke = function() {
248
- var e = this, s = e._self._c;
249
- return e._self._setupProxy, s("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(l) {
250
- return e.onOptionSelected(e.BentoListboxEvent.SELECT);
251
- }, "enter-pressed": function(l) {
252
- return e.onOptionSelected(e.BentoListboxEvent.ENTER);
253
- }, "space-pressed": function(l) {
254
- return l.preventDefault(), e.onOptionSelected(e.BentoListboxEvent.SPACE);
255
- }, "tab-pressed": function(l) {
256
- return e.onOptionSelected(e.BentoListboxEvent.TAB);
257
- } } }, [e._t("default", function() {
258
- return [s("span", { staticClass: "b-listbox-single-select-option__text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? s("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
259
- }, null, e.option), s("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [s("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
260
- }, qe = [], je = /* @__PURE__ */ D(
261
- We,
262
- Ke,
263
- qe,
264
- !1,
265
- null,
266
- "5a5ff36a"
267
- );
268
- const He = je.exports, be = ({ items: t, isOptionDisabled: e, hasStaticCategories: s }, l) => {
269
- const o = r(
270
- () => s.value ? t.value.flatMap((b) => b.items) : t.value
271
- ), n = r(() => o.value.length - 1), a = A(0);
272
- de(() => {
273
- e && (a.value = t.value.findIndex((b) => !e(b)));
274
- });
275
- const v = (b) => {
276
- var T, m;
277
- const C = ((m = (T = t.value[b]) == null ? void 0 : T.items) == null ? void 0 : m.length) ? t.value[b].items.every((E) => e(E)) : e(t.value[b]);
278
- return !e || !!e && C;
279
- }, y = (b) => {
280
- switch (b) {
281
- case "increase":
282
- a.value += 1;
283
- break;
284
- case "decrease":
285
- a.value -= 1;
286
- break;
287
- }
288
- }, u = ({ edgeCaseItem: b }, f, C) => {
289
- a.value !== b && (y(C), v(a.value) && f(), l(a.value));
290
- }, i = (b) => {
291
- I(b), u(
292
- {
293
- edgeCaseItem: n.value
294
- },
295
- i,
296
- "increase"
297
- /* INCREASE */
298
- );
299
- }, x = (b) => {
300
- I(b), u(
301
- {
302
- edgeCaseItem: 0
303
- },
304
- x,
305
- "decrease"
306
- /* DECREASE */
307
- );
308
- }, L = () => {
309
- a.value = 0, v(a.value) ? i() : l(a.value);
310
- }, S = () => {
311
- a.value = n.value, v(a.value) ? x() : l(a.value);
312
- }, O = (b) => {
313
- a.value = b;
314
- }, I = (b) => {
315
- var f;
316
- (f = b == null ? void 0 : b.detail) == null || f.preventDefault();
317
- };
318
- return {
319
- moveToFirstElement: L,
320
- moveToLastElement: S,
321
- moveToNextElement: i,
322
- moveToPreviousElement: x,
323
- setListboxFocusedIndex: O,
324
- preventDefault: I,
325
- focusedIndex: a
326
- };
327
- }, Xe = $({
328
- name: "bento-listbox-single-select",
329
- components: {
330
- BentoListboxSingleSelectCategory: Ne,
331
- BentoListboxSingleSelectOption: He
332
- },
333
- directives: { BentoKeyboardNavigationDirective: Z },
334
- inheritAttrs: !1,
335
- props: {
336
- /**
337
- * Function that allows the options to be disabled
338
- *
339
- * @type {BentoListboxIsOptionDisabled}
340
- * @param {BentoListboxOptionItem} option - listbox option object
341
- * @param {string} option.label - Option's label text
342
- * @param {string|number} option.value - Option's value
343
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
344
- */
345
- isOptionDisabled: {
346
- type: Function,
347
- default: () => !1
348
- },
349
- /**
350
- * The option elements to populate the listbox with.
351
- * It must be an array of {@see BentoListboxOptionItem }.
352
- *
353
- * @property {string} value.label - Text to be displayed in the option
354
- * @property {string,number} value.value - Value of the option
355
- */
356
- items: {
357
- type: Array,
358
- required: !0
359
- },
360
- /**
361
- * The `input` value.
362
- * Providing an empty string will select no options.
363
- * Set to an empty string `''` if you don't want any of the available options to be selected
364
- */
365
- selectedValue: {
366
- type: Array,
367
- default: void 0
368
- },
369
- /**
370
- * If enabled, dropdown will display non-selectable, static categories
371
- */
372
- staticCategories: { type: Boolean, default: !1 }
373
- },
374
- emits: [c.SELECT, c.ENTER, c.SPACE, c.TAB],
375
- setup(t, { emit: e, expose: s, slots: l }) {
376
- const o = A(null), n = A([]), a = r(() => {
377
- var f;
378
- return !!((f = t.selectedValue) != null && f.length) && t.selectedValue.at(0);
379
- }), v = r(() => !!t.items.some(({ items: f }) => !!f)), y = (f) => (C) => {
380
- e(f, [C]);
381
- }, u = (f) => {
382
- var C;
383
- (C = o.value.querySelectorAll('[role="option"]')[f]) == null || C.focus();
384
- }, {
385
- moveToNextElement: i,
386
- moveToPreviousElement: x,
387
- moveToFirstElement: L,
388
- moveToLastElement: S,
389
- setListboxFocusedIndex: O
390
- } = be(
391
- {
392
- items: w(t, "items"),
393
- isOptionDisabled: t.isOptionDisabled,
394
- hasStaticCategories: w(t, "staticCategories")
395
- },
396
- u
397
- ), I = {
398
- [k.ARROW_UP]: x,
399
- [k.ARROW_DOWN]: i,
400
- [k.HOME]: L,
401
- [k.END]: S
402
- }, b = {
403
- [c.SELECT]: y(c.SELECT),
404
- [c.SPACE]: y(c.SPACE),
405
- [c.TAB]: y(c.TAB),
406
- [c.ENTER]: y(c.ENTER)
407
- };
408
- return s({
409
- /**
410
- * Reference for a single listbox item.
411
- * Required for keyboard navigation in dropdown as $children is removed in vue@3
412
- */
413
- listboxItemRef: n,
414
- /**
415
- * Method to set the index of the item to be focused on
416
- * Used for focus management to be kept in-sync with parent e.g. dropdowns
417
- */
418
- setListboxFocusedIndex: O
419
- }), {
420
- // Enums
421
- BentoListboxEvent: c,
422
- // Values
423
- listboxRef: o,
424
- listboxItemRef: n,
425
- selectedItem: a,
426
- slots: l,
427
- // Computed
428
- hasCategories: v,
429
- // Methods
430
- onOptionSelected: y,
431
- // Keyboard navigation
432
- listboxListeners: I,
433
- listboxOptionListeners: b
434
- };
435
- }
436
- });
437
- var Je = function() {
438
- var e = this, s = e._self._c;
439
- return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(l) {
440
- return s("bento-listbox-single-select-category", { key: l.value, attrs: { "category-label": l.label, role: "group" } }, e._l(l.items, function(o) {
441
- return s("bento-listbox-single-select-option", e._g({ key: o.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: o, disabled: e.isOptionDisabled ? e.isOptionDisabled(o) : null, selected: o.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
442
- return { key: a, fn: function(v) {
443
- return [e._t(a, null, null, v)];
444
- } };
445
- })], null, !0) }, e.listboxOptionListeners));
446
- }), 1);
447
- }) : e._l(e.items, function(l) {
448
- return s("bento-listbox-single-select-option", e._g({ key: l.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: l, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, selected: l.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
449
- return { key: n, fn: function(a) {
450
- return [e._t(n, null, null, a)];
451
- } };
452
- })], null, !0) }, e.listboxOptionListeners));
453
- })], 2);
454
- }, Ve = [], Ze = /* @__PURE__ */ D(
455
- Xe,
456
- Je,
457
- Ve,
458
- !1,
459
- null,
460
- null
461
- );
462
- const Qe = Ze.exports;
463
- var H = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.STATIC_CATEGORY = "static-category", t))(H || {}), z = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(z || {});
464
- const et = {
465
- "en-US": {
466
- categoryClosed: "{category} closed",
467
- categoryOpened: "{category} opened"
468
- }
469
- }, tt = $({
470
- i18n: { messages: et },
471
- name: "bento-listbox-multi-select-category",
472
- components: {
473
- BentoCheckbox: V,
474
- BentoTypography: G,
475
- BentoListboxOption: Y,
476
- ChevronDownIcon: Te,
477
- ChevronUpIcon: Oe
478
- },
479
- props: {
480
- /**
481
- * The option elements to populate the listbox with.
482
- * It must be an array of {@see BentoListboxOptionItem }.
483
- *
484
- * @property {string} value.label - Text to be displayed in the option
485
- * @property {string,number} value.value - Value of the option
486
- * @property {BentoListboxOptionItem} value.items - Category items list
487
- */
488
- category: {
489
- type: Object,
490
- required: !0
491
- },
492
- /**
493
- * Function that allows the options to be disabled
494
- *
495
- * @type {BentoListboxIsOptionDisabled}
496
- * @param {BentoListboxOptionItem} option - listbox option object
497
- * @param {string} option.label - Option's label text
498
- * @param {string|number} option.value - Option's value
499
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
500
- */
501
- isOptionDisabled: {
502
- type: [Function],
503
- default: () => !1
504
- },
505
- /**
506
- * The `input` value.
507
- * Providing an empty array will select no options.
508
- */
509
- selectedItemsList: {
510
- type: Array,
511
- default: () => []
512
- },
513
- /**
514
- * If enabled, dropdown will display non-selectable, static categories
515
- */
516
- staticCategories: { type: Boolean, default: !1 },
517
- /**
518
- * Category's tabindex
519
- */
520
- tabindex: { type: Number, default: -1 }
521
- },
522
- emits: [z.SELECT_CATEGORY, z.UNSELECT_CATEGORY],
523
- setup(t, { emit: e }) {
524
- const s = A(!1), { t: l } = J(), o = (m) => t.isOptionDisabled ? t.isOptionDisabled(m) : !1, n = r(
525
- () => t.category.items.every((m) => o(m))
526
- ), a = w(t, "staticCategories"), v = r(() => s.value || t.staticCategories), y = r(() => ({
527
- [`b-listbox-multi-select-category--${H.DISABLED}`]: n.value,
528
- [`b-listbox-multi-select-category--${H.STATIC_CATEGORY}`]: t.staticCategories
529
- })), u = (m) => {
530
- m.preventDefault(), s.value = !s.value;
531
- }, i = (m) => {
532
- var P;
533
- const E = o(m), B = ((P = t.selectedItemsList) == null ? void 0 : P.includes(m.value)) || !1;
534
- return { isDisabled: E, isPreSelected: B };
535
- }, x = r(
536
- () => t.category.items.filter((m) => {
537
- const { isDisabled: E, isPreSelected: B } = i(m);
538
- return E && B || !E;
539
- })
540
- ), L = r(
541
- () => {
542
- var m;
543
- return (m = x.value) == null ? void 0 : m.filter(
544
- ({ value: E }) => {
545
- var B;
546
- return (B = t.selectedItemsList) == null ? void 0 : B.includes(E);
547
- }
548
- );
549
- }
550
- ), S = r(() => {
551
- const m = s.value ? "categoryOpened" : "categoryClosed";
552
- return l(m, { category: t.category.label });
553
- }), O = r(
554
- () => ({
555
- el: "span",
556
- variant: t.staticCategories ? "caption" : "body"
557
- })
558
- ), I = () => {
559
- e(z.SELECT_CATEGORY);
560
- }, b = () => {
561
- e(z.UNSELECT_CATEGORY);
562
- }, { isAllSelected: f, isIndeterminate: C, toggleSelectAll: T } = ve(
563
- L,
564
- x,
565
- I,
566
- b
567
- );
568
- return {
569
- // Values
570
- chevronTitle: S,
571
- conditionalClass: y,
572
- hasAllPropsDisabled: n,
573
- isOpen: s,
574
- isAllSelected: f,
575
- isIndeterminate: C,
576
- isStaticCategory: a,
577
- // Computed
578
- showItemChildren: v,
579
- categoryLabelProps: O,
580
- // Methods
581
- toggleOpen: u,
582
- toggleSelectAll: T
583
- };
584
- }
585
- });
586
- var st = function() {
587
- var e = this, s = e._self._c;
588
- return e._self._setupProxy, s("div", [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : s("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value, tabindex: e.tabindex }, on: { "update:model-value": e.toggleSelectAll } }), s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : s("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(l) {
589
- return e.toggleOpen.apply(null, arguments);
590
- } } }, [e.isOpen ? s("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : s("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
591
- }, lt = [], ot = /* @__PURE__ */ D(
592
- tt,
593
- st,
594
- lt,
595
- !1,
596
- null,
597
- "09983823"
598
- );
599
- const nt = ot.exports;
600
- var M = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(M || {});
601
- const at = $({
602
- name: "listbox-multi-select-options",
603
- components: {
604
- BentoCheckbox: V,
605
- BentoListboxOption: Y,
606
- BentoTypography: G,
607
- ListboxMultiSelectCategory: nt
608
- },
609
- props: {
610
- /**
611
- * Indicates if the items listed are inside a category
612
- * so they can be padded to right by one level in recursion.
613
- * Items of categories are automatically defined as "categoryItems"
614
- */
615
- categoryItems: { type: Boolean, default: !1 },
616
- /**
617
- * Current focused option index
618
- */
619
- focusedIndex: { type: Number, default: 0 },
620
- /**
621
- * Function that allows the options to be disabled
622
- *
623
- * @type {BentoListboxIsOptionDisabled}
624
- * @param {BentoListboxOptionItem} option - listbox option object
625
- * @param {string} option.label - Option's label text
626
- * @param {string|number} option.value - Option's value
627
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
628
- */
629
- isOptionDisabled: {
630
- type: Function,
631
- default: () => !1
632
- },
633
- /**
634
- * The option elements to populate the listbox with.
635
- * It must be an array of {@see BentoListboxOptionItem }.
636
- *
637
- * @property {string} value.label - Text to be displayed in the option
638
- * @property {string,number} value.value - Value of the option
639
- */
640
- items: {
641
- type: Array,
642
- required: !0
643
- },
644
- /**
645
- * Indicates if the elements options are inside a multi-level category
646
- */
647
- isMultiLevel: { type: Boolean, default: !1 },
648
- /**
649
- * Flag that indicates that an external search it's being made
650
- * to filter out the items inside the the multi-select listbox
651
- *
652
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
653
- */
654
- searching: { type: Boolean, default: !1 },
655
- /**
656
- * List of selected items.
657
- * Providing an empty array will select no options.
658
- */
659
- selectedItemsList: {
660
- type: Array,
661
- default: () => []
662
- },
663
- /**
664
- * If enabled, dropdown will display non-selectable, static categories
665
- */
666
- staticCategories: { type: Boolean, default: !1 }
667
- },
668
- emits: [
669
- M.TOGGLE_CHECKBOX_SELECTION,
670
- M.SELECT_CATEGORY,
671
- M.UNSELECT_CATEGORY
672
- ],
673
- setup(t, { emit: e }) {
674
- const s = (u) => {
675
- e(M.TOGGLE_CHECKBOX_SELECTION, u);
676
- }, l = (u) => !!u.items, o = (u) => {
677
- const i = t.isMultiLevel && t.searching;
678
- return u.description && (!t.isMultiLevel || i);
679
- }, n = (u) => u.items ? !!u.items.find((i) => t.selectedItemsList.includes(i.value)) : t.selectedItemsList.includes(u.value), a = (u, i) => {
680
- if (l(i))
681
- return e(u ? M.SELECT_CATEGORY : M.UNSELECT_CATEGORY, i);
682
- s(i.value);
683
- };
684
- return {
685
- // Values
686
- conditionalClasses: r(() => ({
687
- "b-listbox-multi-select-options__static-category-option": t.staticCategories,
688
- "b-listbox-multi-select-options__category-option": t.categoryItems
689
- })),
690
- // Methods
691
- isOptionSelected: n,
692
- shouldShowDescription: o,
693
- toggleCheckboxSelection: s,
694
- selectSearch: a,
695
- computedTabindex: (u) => u + 1 === t.focusedIndex ? 0 : -1,
696
- // Enums
697
- BentoListboxEvent: c,
698
- ListboxMultiSelectOptionsEvent: M
699
- };
700
- }
701
- });
702
- var it = function() {
703
- var e = this, s = e._self._c;
704
- return e._self._setupProxy, s("div", e._l(e.items, function(l, o) {
705
- return s("div", { key: `selected-${l.value}` }, [e.searching && e.isMultiLevel ? [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(l), "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": (n) => e.selectSearch(n, l) } }), e._t("default", function() {
706
- return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
707
- }, null, l)], 2)] : [l.items ? [s("listbox-multi-select-category", { attrs: { category: l, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList, tabindex: e.computedTabindex(o) }, on: { "select-category": function(n) {
708
- return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l);
709
- }, "unselect-category": function(n) {
710
- return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l);
711
- } } }, [s("listbox-multi-select-options", { attrs: { "category-items": "", items: l.items, "is-option-disabled": e.isOptionDisabled, "focused-index": e.focusedIndex, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value, tabindex: e.computedTabindex(o) }, on: { "update:model-value": function(n) {
712
- return e.toggleCheckboxSelection(l);
713
- } } }), e._t("default", function() {
714
- return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
715
- }, null, l)], 2)]], 2);
716
- }), 0);
717
- }, ct = [], rt = /* @__PURE__ */ D(
718
- at,
719
- it,
720
- ct,
721
- !1,
722
- null,
723
- "18d7cecf"
724
- );
725
- const ut = rt.exports, dt = (t) => {
726
- const e = r(() => {
727
- var l;
728
- return !!((l = t.value) != null && l.find(({ items: o }) => !!o));
729
- }), s = r(() => {
730
- var l;
731
- return e.value ? (l = t.value) == null ? void 0 : l.reduce((o, n) => (n.items ? o.push(...n.items.flat()) : o.push(n), o), []) : t.value;
732
- });
733
- return {
734
- isMultiLevelSelect: e,
735
- flattenedItemsList: s
736
- };
737
- }, ft = {
738
- "en-US": {
739
- allSelected: "All selected ({total})",
740
- numberOfTotalSelected: "{number} of {total} selected",
741
- numbersSelected: "{number} selected",
742
- selectAll: "Select all ({total})"
743
- }
744
- }, vt = { i18n: { messages: ft } }, bt = /* @__PURE__ */ $({
745
- ...vt,
746
- __name: "listbox-multi-select",
747
- props: {
748
- hasMoreItems: { type: Boolean, default: !1 },
749
- isOptionDisabled: { default: () => () => !1 },
750
- items: null,
751
- lazyLoadType: { default: "none" },
752
- searching: { type: Boolean, default: !1 },
753
- selectedValues: null,
754
- staticCategories: { type: Boolean, default: !1 }
755
- },
756
- emits: ["select"],
757
- setup(t, { emit: e }) {
758
- const s = t, { t: l } = J(), o = Ce(), n = A(null), a = A(null), v = A(null), y = r(() => s.selectedValues.map(({ value: d }) => d)), { isMultiLevelSelect: u, flattenedItemsList: i } = dt(w(s, "items")), x = (d) => {
759
- var h;
760
- const _ = s.isOptionDisabled(d), g = ((h = y.value) == null ? void 0 : h.includes(d.value)) || !1;
761
- return { isDisabled: _, isPreSelected: g };
762
- }, L = r(() => {
763
- if (s.searching && u)
764
- return s.items;
765
- const d = i.value.filter((_) => {
766
- const { isDisabled: g, isPreSelected: h } = x(_);
767
- return g && h || !g;
768
- });
769
- return s.selectedValues.forEach((_) => {
770
- d.find((g) => g.value === _.value) || d.push(_);
771
- }), d;
772
- }), S = r(
773
- () => {
774
- var d;
775
- return (d = L.value) == null ? void 0 : d.filter((_) => {
776
- var g;
777
- return _.items && u.value && s.searching ? _.items.filter(
778
- (p) => (s.selectedValues ?? []).includes(p.value)
779
- ).length === _.items.length : (g = y.value) == null ? void 0 : g.includes(_.value);
780
- });
781
- }
782
- ), O = () => u.value && !s.searching ? i.value.length : s.items.length, I = r(() => {
783
- var h;
784
- const d = L.value.length, _ = O(), g = ((h = S.value) == null ? void 0 : h.length) || 0;
785
- return g === 0 ? l("selectAll", { total: d }) : g === _ ? l("allSelected", { total: _ }) : g <= _ ? l("numberOfTotalSelected", { number: g, total: _ }) : l("numbersSelected", { number: g });
786
- }), b = (d) => {
787
- const _ = (h) => {
788
- const { isDisabled: p, isPreSelected: N } = x(h);
789
- return p && N || !p;
790
- }, g = d.filter(_).filter((h) => !y.value.includes(h.value));
791
- e("select", [...s.selectedValues, ...g]);
792
- }, f = (d) => {
793
- const _ = (p) => {
794
- const { isDisabled: N, isPreSelected: pe } = x(p);
795
- return !(N && pe);
796
- }, g = d.filter(_).map(({ value: p }) => p), h = s.selectedValues.filter((p) => !(g != null && g.includes(p.value)));
797
- e("select", h);
798
- }, C = () => {
799
- b(i.value);
800
- }, T = () => {
801
- f(i.value);
802
- }, { isAllSelected: m, isIndeterminate: E, toggleSelectAll: B } = ve(
803
- S,
804
- L,
805
- C,
806
- T
807
- ), P = (d) => {
808
- b(d.items);
809
- }, W = (d) => {
810
- f(d.items);
811
- }, K = (d, _) => {
812
- let g = !1;
813
- const h = s.selectedValues.filter(({ value: p }) => _.value === p ? (g = !0, !1) : !0);
814
- g || h.push(_), e(d, h);
815
- }, q = r(() => {
816
- if (!u.value)
817
- return s.selectedValues;
818
- const d = (p) => y.value.includes(p.value), _ = (p) => !s.staticCategories && p.every((N) => d(N));
819
- return s.items.flatMap(
820
- (p) => p.items && !_(p.items) ? p.items : p
821
- ).filter((p) => p.items ? !0 : d(p));
822
- }), R = r(() => {
823
- var g, h, p, N;
824
- const d = ["automatic", "button"].includes(s.lazyLoadType), _ = ((g = s.selectedValues) == null ? void 0 : g.length) > 0 && ((h = S.value) == null ? void 0 : h.length) !== ((p = i.value) == null ? void 0 : p.length);
825
- return d && s.hasMoreItems ? !!((N = s.selectedValues) != null && N.length) : _;
826
- }), U = r(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), Q = r(
827
- () => n.value ? [n.value] : []
828
- ), ee = r(
829
- () => {
830
- var d, _;
831
- return (_ = (d = v.value) == null ? void 0 : d.$children) != null && _.length ? v.value.$children : [];
832
- }
833
- ), te = r(() => ({ label: I, value: m })), se = r(() => [te, ...w(s, "items").value]), le = (d) => {
834
- var h;
835
- const _ = [...Q.value, ...ee.value], g = _[d].$el;
836
- g.tagName === "LABEL" ? g.focus() : (h = g.querySelector("label")) == null || h.focus(), _[d].$el.focus();
837
- }, {
838
- moveToNextElement: oe,
839
- moveToPreviousElement: ne,
840
- moveToFirstElement: ae,
841
- moveToLastElement: ie,
842
- preventDefault: j,
843
- focusedIndex: me
844
- } = be(
845
- {
846
- items: A(se),
847
- isOptionDisabled: s.isOptionDisabled,
848
- hasStaticCategories: w(s, "staticCategories")
849
- },
850
- le
851
- ), _e = {
852
- [k.ARROW_UP]: (d) => ne(d),
853
- [k.ARROW_DOWN]: (d) => oe(d),
854
- [k.HOME]: ae,
855
- [k.END]: ie
856
- }, ge = {
857
- [k.ARROW_UP]: j,
858
- [k.ARROW_DOWN]: j
859
- };
860
- return { __sfc: !0, props: s, emit: e, t: l, slots: o, selectAllListboxItemsRef: n, selectedListboxItemsRef: a, listboxItemsRef: v, selectedItemsList: y, isMultiLevelSelect: u, flattenedItemsList: i, optionStates: x, enabledItems: L, visibleSelectedList: S, calculateTotalItems: O, selectAllCheckboxText: I, selectAll: b, unselectAll: f, selectAllItems: C, unselectAllItems: T, isAllSelected: m, isIndeterminate: E, toggleSelectAll: B, selectAllCategory: P, unselectAllCategory: W, toggleCheckboxSelection: K, selectedOptions: q, showSelectedItems: R, showSelectAllCheckbox: U, computedSelectAllListboxItemsRefs: Q, computedlistboxItems: ee, computedselectAllItemRefs: te, computedItems: se, focusItem: le, moveToNextElement: oe, moveToPreviousElement: ne, moveToFirstElement: ae, moveToLastElement: ie, preventDefault: j, focusedIndex: me, listboxListeners: _e, chipsSectionListeners: ge, BentoCheckbox: V, BentoTypography: G, BentoChip: Ee, BentoListboxOption: Y, ListboxMultiSelectOptions: ut, vBentoKeyboardNavigationDirective: Z, BentoListboxEvent: c };
861
- }
862
- });
863
- var mt = function() {
864
- var e = this, s = e._self._c, l = e._self._setupProxy;
865
- return s("div", { staticClass: "b-listbox-multi-select" }, [l.showSelectedItems ? s("div", [s("ul", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select__chips" }, l.chipsSectionListeners), e._l(l.selectedOptions, function(o) {
866
- return s("li", { key: o.value }, [s(l.BentoChip, { ref: "selectedListboxItemsRef", refInFor: !0, attrs: { disabled: e.isOptionDisabled(o), label: o.label, condensed: "" }, on: { click: function(n) {
867
- o.items ? l.unselectAllCategory(o) : l.toggleCheckboxSelection("select", o);
868
- } } })], 1);
869
- }), 0), s("hr", { staticClass: "b-listbox-multi-select__divider" })]) : e._e(), s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }] }, l.listboxListeners), [l.showSelectAllCheckbox ? s(l.BentoListboxOption, { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [s(l.BentoCheckbox, { attrs: { "aria-label": l.selectAllCheckboxText, "model-value": l.isAllSelected, indeterminate: l.isIndeterminate, tabindex: l.focusedIndex === 0 ? 0 : -1 }, on: { "update:model-value": l.toggleSelectAll } }), s(l.BentoTypography, { attrs: { el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(l.selectAllCheckboxText) + " ")])], 1) : e._e(), l.showSelectAllCheckbox ? s("hr", { staticClass: "b-listbox-multi-select__divider" }) : e._e(), s(l.ListboxMultiSelectOptions, { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": l.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": l.selectedItemsList, "focused-index": l.focusedIndex }, on: { "toggle-checkbox-selection": function(o) {
870
- return l.toggleCheckboxSelection("select", o);
871
- }, "select-category": l.selectAllCategory, "unselect-category": l.unselectAllCategory, "space-pressed": function(o) {
872
- return l.toggleCheckboxSelection(l.BentoListboxEvent.SPACE, o);
873
- }, "tab-pressed": function(o) {
874
- return l.toggleCheckboxSelection(l.BentoListboxEvent.TAB, o);
875
- }, "enter-pressed": function(o) {
876
- return l.toggleCheckboxSelection(l.BentoListboxEvent.ENTER, o);
877
- } }, scopedSlots: e._u([e._l(l.slots, function(o, n) {
878
- return { key: n, fn: function(a) {
879
- return [e._t(n, null, null, a)];
880
- } };
881
- })], null, !0) })], 1)]);
882
- }, _t = [], gt = /* @__PURE__ */ D(
883
- bt,
884
- mt,
885
- _t,
886
- !1,
887
- null,
888
- "57c7482e"
889
- );
890
- const ue = gt.exports, pt = {
891
- "en-US": {
892
- loading: "Loading",
893
- showMore: "Show more"
894
- },
895
- "ja-JP": {
896
- loading: "読み込み中",
897
- showMore: "表示内容を増やす"
898
- },
899
- "pt-BR": {
900
- loading: "Carregando",
901
- showMore: "Mostrar mais"
902
- }
903
- }, yt = 36, Ct = $({
904
- name: "bento-listbox",
905
- components: {
906
- BentoEmptyState: xe,
907
- BentoListboxSingleSelect: Qe,
908
- BentoListboxMultiSelect: ue,
909
- BentoTypography: G,
910
- BentoLoadingIndicator: he,
911
- BentoLoadingButton: Le
912
- },
913
- directives: { BentoKeyboardNavigationDirective: Z },
914
- i18n: { messages: pt },
915
- props: {
916
- /**
917
- * Defines a string value that labels an interactive element.
918
- */
919
- ariaLabel: { type: String, default: null },
920
- /**
921
- * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
922
- */
923
- emptyState: {
924
- type: Object,
925
- default: void 0
926
- },
927
- /**
928
- * Indicates whether there are more items to load
929
- */
930
- hasMoreItems: { type: Boolean, default: !1 },
931
- /**
932
- * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
933
- */
934
- id: { type: String, required: !0 },
935
- /**
936
- * Function that allows the options to be disabled
937
- *
938
- * @type {BentoListboxIsOptionDisabled}
939
- * @param {BentoListboxOptionItem} option - Listbox option object
940
- * @param {string} option.label - Option's label text
941
- * @param {string|number} option.value - Option's value
942
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
943
- */
944
- isOptionDisabled: {
945
- type: Function,
946
- default: () => {
947
- }
948
- },
949
- /**
950
- * The option elements to populate the listbox with.
951
- * It must be an array of {@see BentoListboxOptionItem }
952
- * * @property {string} value.label - Text to be displayed in the option
953
- * * @property {string,number} value.value - Value of the option
954
- */
955
- items: {
956
- type: Array,
957
- required: !0
958
- },
959
- /**
960
- * Indicates if new options are lazy loading.
961
- */
962
- loading: { type: Boolean, default: !1 },
963
- /**
964
- * The type of `Lazy Load`.
965
- * Type "automatic" will enable infinite scrolling
966
- * Type "button" will enable lazy loading with "Show more" button
967
- */
968
- lazyLoadType: {
969
- type: String,
970
- default: F.NONE,
971
- validator: (t) => Object.values(F).includes(t)
972
- },
973
- /**
974
- * Indicates the listbox is loading filtered items.
975
- */
976
- componentLoading: { type: Boolean, default: !1 },
977
- /**
978
- * If enabled, the user will be able to select multiple items.
979
- */
980
- multiple: { type: Boolean, default: !1 },
981
- /**
982
- * If enabled, dropdown will display non-selectable, static categories
983
- */
984
- staticCategories: { type: Boolean, default: !1 },
985
- /**
986
- * Messaged displayed when no items are listed in the listbox
987
- */
988
- noResultsMessage: { type: String, required: !0 },
989
- /**
990
- * Flag that indicates that an external search it's being made
991
- * to filter out the items inside the the multi-select listbox
992
- *
993
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
994
- */
995
- searching: ue.props.searching,
996
- /**
997
- * The `input` value.
998
- * Providing an empty string or empty array will select no options.
999
- * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1000
- */
1001
- selectedValue: {
1002
- type: Array,
1003
- default: () => []
1004
- },
1005
- /**
1006
- * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1007
- * The itemHeight function is used to calculate the height of rendered item given it's index.
1008
- */
1009
- virtualScroll: {
1010
- type: [Boolean, Object],
1011
- default: !1
1012
- }
1013
- },
1014
- emits: [
1015
- c.SELECT,
1016
- c.SPACE,
1017
- c.SHOW_MORE,
1018
- c.ENTER,
1019
- c.ESCAPE,
1020
- c.TAB
1021
- ],
1022
- setup(t, { emit: e, slots: s }) {
1023
- const l = A([]), o = w(t, "items"), { t: n } = J(), a = r(() => t.lazyLoadType !== F.AUTOMATIC), v = r(() => t.lazyLoadType === F.AUTOMATIC), y = () => {
1024
- var R;
1025
- return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((R = t == null ? void 0 : t.virtualScroll) != null && R.itemHeight) ? t.virtualScroll.itemHeight : yt;
1026
- }, {
1027
- containerRef: u,
1028
- containerProps: i,
1029
- onScroll: x,
1030
- list: L,
1031
- wrapperProps: S
1032
- } = Ie(o, {
1033
- itemHeight: y(),
1034
- // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1035
- disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
1036
- }), O = r(
1037
- () => t.componentLoading !== void 0 || a.value ? "true" : void 0
1038
- ), I = r(
1039
- () => a.value && t.loading || t.componentLoading ? "true" : "false"
1040
- ), b = r(
1041
- () => a.value || t.componentLoading !== void 0 ? "polite" : void 0
1042
- ), f = (R) => (U) => {
1043
- e(R, U);
1044
- }, C = () => {
1045
- e(c.SHOW_MORE);
1046
- }, T = Se(() => {
1047
- const R = u.value;
1048
- if (!R)
1049
- return;
1050
- const U = Math.round(R.scrollTop) + R.clientHeight >= R.scrollHeight;
1051
- t.hasMoreItems && U && !t.loading && C();
1052
- }), m = () => {
1053
- v.value ? T() : x();
1054
- }, E = r(() => {
1055
- var R;
1056
- return ((R = t.items) == null ? void 0 : R.length) === 0;
1057
- }), B = r(
1058
- () => t.lazyLoadType === F.BUTTON && t.hasMoreItems
1059
- ), P = r(
1060
- () => t.loading ? ce.LOADING : ce.START
1061
- ), W = r(() => t.loading ? n("loading") : n("showMore")), K = r(() => ({
1062
- ...t.emptyState,
1063
- variant: "condensed"
1064
- })), q = {
1065
- [c.SELECT]: f(c.SELECT),
1066
- [c.SPACE]: f(c.SPACE),
1067
- [c.TAB]: f(c.TAB),
1068
- [c.ENTER]: f(c.ENTER)
1069
- };
1070
- return {
1071
- // Refs
1072
- listboxRef: u,
1073
- listboxItemRef: l,
1074
- // a11y
1075
- ariaAtomic: O,
1076
- ariaBusy: I,
1077
- ariaLive: b,
1078
- // Values
1079
- containerProps: i,
1080
- isSearchResultEmpty: E,
1081
- limitedEmptyStateProps: K,
1082
- loadingButtonState: P,
1083
- slots: s,
1084
- shouldDisplayShowMoreButton: B,
1085
- showMoreButtonText: W,
1086
- virtualisedItems: L,
1087
- wrapperProps: S,
1088
- // Enums
1089
- BentoKeyboardNavigationKeyDownEvent: k,
1090
- BentoListboxEvent: c,
1091
- // Methods
1092
- onListboxContainerScroll: m,
1093
- onOptionSelected: f,
1094
- emitShowMore: C,
1095
- listboxListeners: q
1096
- };
1097
- }
1098
- });
1099
- var ht = function() {
1100
- var l;
1101
- var e = this, s = e._self._c;
1102
- return e._self._setupProxy, s("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (l = e.containerProps) == null ? void 0 : l.style, attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, [s("div", e._b({}, "div", e.wrapperProps, !1), [e.componentLoading ? s("div", { staticClass: "b-listbox__loading-filtered-items" }, [s("bento-loading-indicator")], 1) : e.isSearchResultEmpty ? s("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? s("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [s("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
1103
- return { key: n, fn: function(a) {
1104
- return [e._t(n, null, null, a)];
1105
- } };
1106
- })], null, !0) }, e.listboxListeners))] : [s("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(o, n) {
1107
- return { key: n, fn: function(a) {
1108
- return [e._t(n, null, null, a)];
1109
- } };
1110
- })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(o) {
1111
- return e.emitShowMore.apply(null, arguments);
1112
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-indicator")], 1) : e._e()]], 2)]);
1113
- }, xt = [], St = /* @__PURE__ */ D(
1114
- Ct,
1115
- ht,
1116
- xt,
1117
- !1,
1118
- null,
1119
- "37a9ab16"
1120
- );
1121
- const Gt = St.exports, X = (t, e) => {
1122
- for (const s of t) {
1123
- if (s.value === e)
1124
- return s;
1125
- if (s.items) {
1126
- const l = X(s.items, e);
1127
- if (l)
1128
- return l;
1129
- }
1130
- }
1131
- return null;
1132
- }, Et = (t) => typeof t == "object" && t !== null && "value" in t && "label" in t, Ut = (t, e, s, l) => {
1133
- const o = A([]), n = A(), a = (i) => {
1134
- s.value ? n.value = i.map(({ value: x }) => x) : n.value = i.length > 0 ? i[0].value : null;
1135
- }, v = (i) => {
1136
- s.value ? n.value = i.map(({ value: x, label: L }) => ({ value: x, label: L })) : n.value = i.length > 0 ? { value: i[0].value, label: i[0].label } : null;
1137
- }, y = (i) => {
1138
- o.value = i, l != null && l.value ? v(i) : a(i);
1139
- }, u = () => {
1140
- o.value = [], n.value = null;
1141
- };
1142
- return fe(
1143
- () => e.value,
1144
- () => {
1145
- if (!e.value && e.value !== 0) {
1146
- u();
1147
- return;
1148
- }
1149
- const i = !Array.isArray(e.value), x = [...o.value];
1150
- u();
1151
- const L = (S) => {
1152
- if (Et(S))
1153
- o.value.push(S);
1154
- else {
1155
- let O = X(t.value, S);
1156
- O || (O = X(x, S)), O || (O = { value: S, label: S.toString() }), o.value.push(O);
1157
- }
1158
- };
1159
- if (i) {
1160
- const S = e.value;
1161
- L(S), l != null && l.value ? v(o.value) : a(o.value);
1162
- return;
1163
- }
1164
- e.value.forEach(L), l != null && l.value ? v(o.value) : a(o.value);
1165
- },
1166
- { immediate: !0 }
1167
- ), {
1168
- // Values
1169
- cachedSelectedListboxOptions: o,
1170
- cachedListboxSelectedValues: n,
1171
- // Methods
1172
- resetCache: u,
1173
- setCachedValues: y
1174
- };
1175
- };
1176
- export {
1177
- F as B,
1178
- c as a,
1179
- Gt as b,
1180
- Ut as c,
1181
- dt as u
1182
- };
1183
- //# sourceMappingURL=use-cached-selected-values.C-umGJXi.js.map