@adyen/bento-vue3 1.88.1 → 1.89.2

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 (366) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +722 -524
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/ai-tag.js +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/anchor-scroller.js +1 -1
  8. package/dist/assets/accordion-item.css +1 -1
  9. package/dist/assets/action-bar.css +1 -1
  10. package/dist/assets/ai-button.css +1 -1
  11. package/dist/assets/base-modal.css +1 -1
  12. package/dist/assets/button-actions.css +1 -1
  13. package/dist/assets/button.css +1 -1
  14. package/dist/assets/card.css +1 -1
  15. package/dist/assets/checkbox-input.css +1 -1
  16. package/dist/assets/data-grid-template.css +1 -1
  17. package/dist/assets/data-grid.css +1 -1
  18. package/dist/assets/dialog-page.css +1 -1
  19. package/dist/assets/file-uploader.css +1 -1
  20. package/dist/assets/filter-bar.css +1 -1
  21. package/dist/assets/index.css +1 -1
  22. package/dist/assets/inspector.css +1 -1
  23. package/dist/assets/list-item.css +1 -0
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/radio-input.css +1 -1
  26. package/dist/assets/selection-card-group.css +1 -1
  27. package/dist/assets/sidepanel.css +1 -1
  28. package/dist/assets/timeline-item.css +1 -1
  29. package/dist/assets/use-cached-selected-values.css +1 -1
  30. package/dist/button.js +3 -3
  31. package/dist/card.js +1 -1
  32. package/dist/checkbox.js +2 -2
  33. package/dist/chip.js +1 -1
  34. package/dist/chunks/{accordion-item.QQ06tTjt.js → accordion-item.BX1KrLMl.js} +6 -15
  35. package/dist/chunks/{accordion-item.QQ06tTjt.js.map → accordion-item.BX1KrLMl.js.map} +1 -1
  36. package/dist/chunks/{action-bar.BS2cJzG_.js → action-bar.DLMaIUWW.js} +8 -34
  37. package/dist/chunks/{action-bar.BS2cJzG_.js.map → action-bar.DLMaIUWW.js.map} +1 -1
  38. package/dist/chunks/{ai-button.XfeGC4-Q.js → ai-button.1YJdI-sw.js} +3 -3
  39. package/dist/chunks/{ai-button.XfeGC4-Q.js.map → ai-button.1YJdI-sw.js.map} +1 -1
  40. package/dist/chunks/{ai-tag.DVCW-_vD.js → ai-tag.DK63ExDc.js} +6 -15
  41. package/dist/chunks/{ai-tag.DVCW-_vD.js.map → ai-tag.DK63ExDc.js.map} +1 -1
  42. package/dist/chunks/{alert.CDWtu0Hu.js → alert.C_8-VNi_.js} +6 -24
  43. package/dist/chunks/{alert.CDWtu0Hu.js.map → alert.C_8-VNi_.js.map} +1 -1
  44. package/dist/chunks/anchor-scroller.NhjLDBZI.js +207 -0
  45. package/dist/chunks/{anchor-scroller.BctgW0se.js.map → anchor-scroller.NhjLDBZI.js.map} +1 -1
  46. package/dist/chunks/{base-button.CRYAiuzn.js → base-button.CvHl36Ue.js} +24 -27
  47. package/dist/chunks/{base-button.CRYAiuzn.js.map → base-button.CvHl36Ue.js.map} +1 -1
  48. package/dist/chunks/base-modal.C2-JyHC_.js +424 -0
  49. package/dist/chunks/{base-modal.gZAtk-xP.js.map → base-modal.C2-JyHC_.js.map} +1 -1
  50. package/dist/chunks/button-actions-with-menu.BQFAgAI2.js +85 -0
  51. package/dist/chunks/{button-actions-with-menu.Tba1ME79.js.map → button-actions-with-menu.BQFAgAI2.js.map} +1 -1
  52. package/dist/chunks/{button-actions.BYBpjNqy.js → button-actions.cMQWyZne.js} +511 -542
  53. package/dist/chunks/{button-actions.BYBpjNqy.js.map → button-actions.cMQWyZne.js.map} +1 -1
  54. package/dist/chunks/{button.C6t9_lzm.js → button.DWF7FSIw.js} +42 -45
  55. package/dist/chunks/{button.C6t9_lzm.js.map → button.DWF7FSIw.js.map} +1 -1
  56. package/dist/chunks/calendar.DcCqkSNJ.js +1201 -0
  57. package/dist/chunks/{calendar.vM3abC8y.js.map → calendar.DcCqkSNJ.js.map} +1 -1
  58. package/dist/chunks/{card.Cw63i7Ul.js → card.CoxQ_L0w.js} +9 -21
  59. package/dist/chunks/{card.Cw63i7Ul.js.map → card.CoxQ_L0w.js.map} +1 -1
  60. package/dist/chunks/{checkbox-group.ODQy-ICn.js → checkbox-group.96n9Cc3W.js} +5 -5
  61. package/dist/chunks/{checkbox-group.ODQy-ICn.js.map → checkbox-group.96n9Cc3W.js.map} +1 -1
  62. package/dist/chunks/{checkbox-input.BZjSoCQW.js → checkbox-input.CVFQCfZM.js} +44 -51
  63. package/dist/chunks/{checkbox-input.BZjSoCQW.js.map → checkbox-input.CVFQCfZM.js.map} +1 -1
  64. package/dist/chunks/{checkbox.C3Ewfygy.js → checkbox.C6ATh8f5.js} +85 -94
  65. package/dist/chunks/{checkbox.C3Ewfygy.js.map → checkbox.C6ATh8f5.js.map} +1 -1
  66. package/dist/chunks/chevron-right-small.BCinNiMt.js +29 -0
  67. package/dist/chunks/chevron-right-small.BCinNiMt.js.map +1 -0
  68. package/dist/chunks/{chip.CyW1V8RU.js → chip.CdgpQyXN.js} +6 -12
  69. package/dist/chunks/{chip.CyW1V8RU.js.map → chip.CdgpQyXN.js.map} +1 -1
  70. package/dist/chunks/click-outside.BPylIosK.js +20 -0
  71. package/dist/chunks/{click-outside.CDz_x8mN.js.map → click-outside.BPylIosK.js.map} +1 -1
  72. package/dist/chunks/{code-snippet.BaJU2I5_.js → code-snippet.DgAuuZF5.js} +9 -24
  73. package/dist/chunks/{code-snippet.BaJU2I5_.js.map → code-snippet.DgAuuZF5.js.map} +1 -1
  74. package/dist/chunks/{codemirror.D2BAltnu.js → codemirror.Bzus_EPG.js} +15 -15
  75. package/dist/chunks/{codemirror.D2BAltnu.js.map → codemirror.Bzus_EPG.js.map} +1 -1
  76. package/dist/chunks/constructNow.D9uRk678.js +8 -0
  77. package/dist/chunks/{constructNow.CIc7d13I.js.map → constructNow.D9uRk678.js.map} +1 -1
  78. package/dist/chunks/{controls-group.Bu5lNTyH.js → controls-group.C7hOE1F4.js} +3 -3
  79. package/dist/chunks/{controls-group.Bu5lNTyH.js.map → controls-group.C7hOE1F4.js.map} +1 -1
  80. package/dist/chunks/{copy.C_BCNHYQ.js → copy.C2kQ1PbI.js} +7 -19
  81. package/dist/chunks/{copy.C_BCNHYQ.js.map → copy.C2kQ1PbI.js.map} +1 -1
  82. package/dist/chunks/{country.DJts6kCv.js → country.CaGc08Ps.js} +3 -3
  83. package/dist/chunks/{country.DJts6kCv.js.map → country.CaGc08Ps.js.map} +1 -1
  84. package/dist/chunks/country.types.DjpMGz7a.js +19 -0
  85. package/dist/chunks/{country.types.BBQbWkTY.js.map → country.types.DjpMGz7a.js.map} +1 -1
  86. package/dist/chunks/{currency.Afx8MVdY.js → currency.DuTEzR_W.js} +40 -42
  87. package/dist/chunks/{currency.Afx8MVdY.js.map → currency.DuTEzR_W.js.map} +1 -1
  88. package/dist/chunks/dashboard-section.UafHRkMa.js +161 -0
  89. package/dist/chunks/{dashboard-section.CgoLquLP.js.map → dashboard-section.UafHRkMa.js.map} +1 -1
  90. package/dist/chunks/dashed-underline.CcDV2Aks.js +108 -0
  91. package/dist/chunks/{dashed-underline.wbRHATeE.js.map → dashed-underline.CcDV2Aks.js.map} +1 -1
  92. package/dist/chunks/data-grid-template.CnC4TQvk.js +135 -0
  93. package/dist/chunks/{data-grid-template.D40V1cmi.js.map → data-grid-template.CnC4TQvk.js.map} +1 -1
  94. package/dist/chunks/data-grid.BSIXLRm7.js +4014 -0
  95. package/dist/chunks/{data-grid.C2nCCbeC.js.map → data-grid.BSIXLRm7.js.map} +1 -1
  96. package/dist/chunks/date-picker.dlzZ_-5f.js +231 -0
  97. package/dist/chunks/{date-picker.D5B_SECc.js.map → date-picker.dlzZ_-5f.js.map} +1 -1
  98. package/dist/chunks/date-range-picker.DC6CK0As.js +995 -0
  99. package/dist/chunks/{date-range-picker.B0q7Z4df.js.map → date-range-picker.DC6CK0As.js.map} +1 -1
  100. package/dist/chunks/{date.BtB1HyWQ.js → date.R2Wz6o7J.js} +28 -28
  101. package/dist/chunks/{date.BtB1HyWQ.js.map → date.R2Wz6o7J.js.map} +1 -1
  102. package/dist/chunks/{de.BJvo6njq.js → de.DXrHnkLX.js} +18 -18
  103. package/dist/chunks/{de.BJvo6njq.js.map → de.DXrHnkLX.js.map} +1 -1
  104. package/dist/chunks/{dialog-page.C1KUI51V.js → dialog-page.COfKqjT-.js} +7 -13
  105. package/dist/chunks/{dialog-page.C1KUI51V.js.map → dialog-page.COfKqjT-.js.map} +1 -1
  106. package/dist/chunks/differenceInMonths.s_znQQpw.js +43 -0
  107. package/dist/chunks/{differenceInMonths.CIYECBxK.js.map → differenceInMonths.s_znQQpw.js.map} +1 -1
  108. package/dist/chunks/{directive.rXUeDb8p.js → directive.Dpivxq_t.js} +2 -2
  109. package/dist/chunks/{directive.rXUeDb8p.js.map → directive.Dpivxq_t.js.map} +1 -1
  110. package/dist/chunks/{dropdown-default-textbox.CskseEho.js → dropdown-default-textbox.bq9AlGzJ.js} +55 -64
  111. package/dist/chunks/{dropdown-default-textbox.CskseEho.js.map → dropdown-default-textbox.bq9AlGzJ.js.map} +1 -1
  112. package/dist/chunks/{dropdown-tag.Zj-exiup.js → dropdown-tag.Ysrac5GN.js} +82 -86
  113. package/dist/chunks/{dropdown-tag.Zj-exiup.js.map → dropdown-tag.Ysrac5GN.js.map} +1 -1
  114. package/dist/chunks/dropdown.MhmX1P9o.js +799 -0
  115. package/dist/chunks/{dropdown.CxjzXI-k.js.map → dropdown.MhmX1P9o.js.map} +1 -1
  116. package/dist/chunks/{empty-state.DqdPzU-g.js → empty-state.DT4sFyjB.js} +7 -14
  117. package/dist/chunks/{empty-state.DqdPzU-g.js.map → empty-state.DT4sFyjB.js.map} +1 -1
  118. package/dist/chunks/{en-GB.C3-QUpva.js → en-GB.CBpvhDYV.js} +2 -2
  119. package/dist/chunks/{en-GB.C3-QUpva.js.map → en-GB.CBpvhDYV.js.map} +1 -1
  120. package/dist/chunks/{en-US.YeSsZuOc.js → en-US.CCazFVNP.js} +30 -30
  121. package/dist/chunks/{en-US.YeSsZuOc.js.map → en-US.CCazFVNP.js.map} +1 -1
  122. package/dist/chunks/{error-message.oGiefI2-.js → error-message.DCgo8q20.js} +8 -20
  123. package/dist/chunks/{error-message.oGiefI2-.js.map → error-message.DCgo8q20.js.map} +1 -1
  124. package/dist/chunks/{es.DyUjjSL8.js → es.CoF2PB8b.js} +14 -14
  125. package/dist/chunks/{es.DyUjjSL8.js.map → es.CoF2PB8b.js.map} +1 -1
  126. package/dist/chunks/{file-uploader.BnmNI1O7.js → file-uploader.Bfd1uUMe.js} +575 -680
  127. package/dist/chunks/{file-uploader.BnmNI1O7.js.map → file-uploader.Bfd1uUMe.js.map} +1 -1
  128. package/dist/chunks/filter-bar.CkAjLQol.js +3675 -0
  129. package/dist/chunks/filter-bar.CkAjLQol.js.map +1 -0
  130. package/dist/chunks/fixed-scroller.DtkaGyMD.js +150 -0
  131. package/dist/chunks/{fixed-scroller.i1tmEmst.js.map → fixed-scroller.DtkaGyMD.js.map} +1 -1
  132. package/dist/chunks/{focus-trap.BxCwzLqN.js → focus-trap.BAiM_ywb.js} +70 -86
  133. package/dist/chunks/{focus-trap.BxCwzLqN.js.map → focus-trap.BAiM_ywb.js.map} +1 -1
  134. package/dist/chunks/{footer-actions.Ck6UztD8.js → footer-actions.BcYSsoUg.js} +3 -3
  135. package/dist/chunks/{footer-actions.Ck6UztD8.js.map → footer-actions.BcYSsoUg.js.map} +1 -1
  136. package/dist/chunks/{form-layout-title.CQfeGyVw.js → form-layout-title.DW5Kg1rh.js} +4 -6
  137. package/dist/chunks/{form-layout-title.CQfeGyVw.js.map → form-layout-title.DW5Kg1rh.js.map} +1 -1
  138. package/dist/chunks/{fr.JD_4GwS8.js → fr.CJXL-Ief.js} +16 -16
  139. package/dist/chunks/{fr.JD_4GwS8.js.map → fr.CJXL-Ief.js.map} +1 -1
  140. package/dist/chunks/{generate-uid.NJ8tVoha.js → generate-uid.DBWe4g6T.js} +15 -16
  141. package/dist/chunks/{generate-uid.NJ8tVoha.js.map → generate-uid.DBWe4g6T.js.map} +1 -1
  142. package/dist/chunks/get-slot-text.8Fbl1GOr.js +6 -0
  143. package/dist/chunks/{get-slot-text.CQRAP2_q.js.map → get-slot-text.8Fbl1GOr.js.map} +1 -1
  144. package/dist/chunks/{grid-layout.Vhv1_zFs.js → grid-layout.CCWNscU_.js} +11 -12
  145. package/dist/chunks/{grid-layout.Vhv1_zFs.js.map → grid-layout.CCWNscU_.js.map} +1 -1
  146. package/dist/chunks/{header-meta.lGt3HsyH.js → header-meta.Bym9AlQm.js} +84 -96
  147. package/dist/chunks/{header-meta.lGt3HsyH.js.map → header-meta.Bym9AlQm.js.map} +1 -1
  148. package/dist/chunks/{header-with-views.D_sy4I2A.js → header-with-views.Djba6iol.js} +1013 -1156
  149. package/dist/chunks/{header-with-views.D_sy4I2A.js.map → header-with-views.Djba6iol.js.map} +1 -1
  150. package/dist/chunks/{header.oXqwf2xN.js → header.o-7SyHtU.js} +4 -4
  151. package/dist/chunks/{header.oXqwf2xN.js.map → header.o-7SyHtU.js.map} +1 -1
  152. package/dist/chunks/{index.Dppy4qHk.js → index.DDwcHPb6.js} +12 -12
  153. package/dist/chunks/{index.Dppy4qHk.js.map → index.DDwcHPb6.js.map} +1 -1
  154. package/dist/chunks/{info-icon.DyPOv7Pi.js → info-icon.BUala_wq.js} +3 -3
  155. package/dist/chunks/{info-icon.DyPOv7Pi.js.map → info-icon.BUala_wq.js.map} +1 -1
  156. package/dist/chunks/input-field-password.DZytmp_p.js +346 -0
  157. package/dist/chunks/{input-field-password.C_h61CMn.js.map → input-field-password.DZytmp_p.js.map} +1 -1
  158. package/dist/chunks/{input-field-phone-number.KctRYA9p.js → input-field-phone-number.CxblrmaU.js} +720 -736
  159. package/dist/chunks/{input-field-phone-number.KctRYA9p.js.map → input-field-phone-number.CxblrmaU.js.map} +1 -1
  160. package/dist/chunks/{input-field.DPElUS0U.js → input-field.CfU0ZKtL.js} +42 -54
  161. package/dist/chunks/{input-field.DPElUS0U.js.map → input-field.CfU0ZKtL.js.map} +1 -1
  162. package/dist/chunks/{inspector.BjLhY3bE.js → inspector.B9k4tJWe.js} +9 -27
  163. package/dist/chunks/{inspector.BjLhY3bE.js.map → inspector.B9k4tJWe.js.map} +1 -1
  164. package/dist/chunks/isSameWeek.Dj6luS8h.js +14 -0
  165. package/dist/chunks/{isSameWeek.CzBCmu7d.js.map → isSameWeek.Dj6luS8h.js.map} +1 -1
  166. package/dist/chunks/{it.BlUnV-yA.js → it.20Y7h-bF.js} +8 -8
  167. package/dist/chunks/{it.BlUnV-yA.js.map → it.20Y7h-bF.js.map} +1 -1
  168. package/dist/chunks/{ja.nUwDmVf2.js → ja.DXlq0H98.js} +27 -27
  169. package/dist/chunks/{ja.nUwDmVf2.js.map → ja.DXlq0H98.js.map} +1 -1
  170. package/dist/chunks/layout-row.B5VJGEQH.js +99 -0
  171. package/dist/chunks/{layout-row.Da8nkm9z.js.map → layout-row.B5VJGEQH.js.map} +1 -1
  172. package/dist/chunks/link.D6D6YGsN.js +113 -0
  173. package/dist/chunks/{link.DTCn2EtX.js.map → link.D6D6YGsN.js.map} +1 -1
  174. package/dist/chunks/list-item.DO5uULke.js +128 -0
  175. package/dist/chunks/list-item.DO5uULke.js.map +1 -0
  176. package/dist/chunks/{listbox-option-tag.CoBUYwFG.js → listbox-option-tag.Cvplth7d.js} +2 -2
  177. package/dist/chunks/{listbox-option-tag.CoBUYwFG.js.map → listbox-option-tag.Cvplth7d.js.map} +1 -1
  178. package/dist/chunks/{modal-fullscreen.9ZDR_S29.js → modal-fullscreen.CuKVyTWb.js} +100 -108
  179. package/dist/chunks/{modal-fullscreen.9ZDR_S29.js.map → modal-fullscreen.CuKVyTWb.js.map} +1 -1
  180. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js → modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js} +134 -143
  181. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.B0IdwV0R.js.map → modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map} +1 -1
  182. package/dist/chunks/on-click-outside.ZUMLlxE_.js +90 -0
  183. package/dist/chunks/{on-click-outside.BW4rkhzG.js.map → on-click-outside.ZUMLlxE_.js.map} +1 -1
  184. package/dist/chunks/pagination.dpVc6Yt0.js +401 -0
  185. package/dist/chunks/pagination.dpVc6Yt0.js.map +1 -0
  186. package/dist/chunks/popover.types.D8tHtFl3.js +6 -0
  187. package/dist/chunks/{popover.types.DhALnOLQ.js.map → popover.types.D8tHtFl3.js.map} +1 -1
  188. package/dist/chunks/{popper-container.DAK7c9uS.js → popper-container.DMN8n5iC.js} +79 -86
  189. package/dist/chunks/{popper-container.DAK7c9uS.js.map → popper-container.DMN8n5iC.js.map} +1 -1
  190. package/dist/chunks/{promo-banner.aNwH6uQx.js → promo-banner.BzveHNOI.js} +7 -13
  191. package/dist/chunks/{promo-banner.aNwH6uQx.js.map → promo-banner.BzveHNOI.js.map} +1 -1
  192. package/dist/chunks/{pt-BR.BCU2Hj36.js → pt-BR.DmhmCzxE.js} +14 -14
  193. package/dist/chunks/{pt-BR.BCU2Hj36.js.map → pt-BR.DmhmCzxE.js.map} +1 -1
  194. package/dist/chunks/{radio-group.DEYzF6o7.js → radio-group.Cuiq4mxy.js} +46 -46
  195. package/dist/chunks/{radio-group.DEYzF6o7.js.map → radio-group.Cuiq4mxy.js.map} +1 -1
  196. package/dist/chunks/{rich-text-editor.DH1d5Zcp.js → rich-text-editor.DLMiT4f5.js} +1018 -1024
  197. package/dist/chunks/{rich-text-editor.DH1d5Zcp.js.map → rich-text-editor.DLMiT4f5.js.map} +1 -1
  198. package/dist/chunks/{search-bar.Dtzx88Pv.js → search-bar.CsFyP0_I.js} +6 -15
  199. package/dist/chunks/{search-bar.Dtzx88Pv.js.map → search-bar.CsFyP0_I.js.map} +1 -1
  200. package/dist/chunks/{secondary-nav.Zs7dBoJv.js → secondary-nav.CLBdq98c.js} +6 -12
  201. package/dist/chunks/{secondary-nav.Zs7dBoJv.js.map → secondary-nav.CLBdq98c.js.map} +1 -1
  202. package/dist/chunks/{segmented-control.Aqquod8g.js → segmented-control.KeQ5kuR1.js} +47 -51
  203. package/dist/chunks/{segmented-control.Aqquod8g.js.map → segmented-control.KeQ5kuR1.js.map} +1 -1
  204. package/dist/chunks/selection-card-group.XM11Kk-4.js +412 -0
  205. package/dist/chunks/{selection-card-group.C7IK2Vl5.js.map → selection-card-group.XM11Kk-4.js.map} +1 -1
  206. package/dist/chunks/{sidepanel.DaXPcTHm.js → sidepanel.b2QZ1Jsx.js} +64 -71
  207. package/dist/chunks/{sidepanel.DaXPcTHm.js.map → sidepanel.b2QZ1Jsx.js.map} +1 -1
  208. package/dist/chunks/startOfWeek.Cvmo-f5J.js +9 -0
  209. package/dist/chunks/{startOfWeek.CXhhX-R7.js.map → startOfWeek.Cvmo-f5J.js.map} +1 -1
  210. package/dist/chunks/status.H00BAmRx.js +42 -0
  211. package/dist/chunks/status.H00BAmRx.js.map +1 -0
  212. package/dist/chunks/status.types.Dx8MDhEH.js +5 -0
  213. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -0
  214. package/dist/chunks/{step.BV7MsrRF.js → step.BlwoLfdw.js} +56 -68
  215. package/dist/chunks/{step.BV7MsrRF.js.map → step.BlwoLfdw.js.map} +1 -1
  216. package/dist/chunks/{structured-list-item.DAIaUMCY.js → structured-list-item.e-8kRleh.js} +8 -14
  217. package/dist/chunks/{structured-list-item.DAIaUMCY.js.map → structured-list-item.e-8kRleh.js.map} +1 -1
  218. package/dist/chunks/{summary-grid.types.BZcZS_dW.js → summary-grid.types.CcvOC03H.js} +172 -179
  219. package/dist/chunks/{summary-grid.types.BZcZS_dW.js.map → summary-grid.types.CcvOC03H.js.map} +1 -1
  220. package/dist/chunks/tab.mR5uUSdp.js +265 -0
  221. package/dist/chunks/{tab.DRrnMCxe.js.map → tab.mR5uUSdp.js.map} +1 -1
  222. package/dist/chunks/{tag.CqWg6C3H.js → tag.DujMVFh-.js} +3 -3
  223. package/dist/chunks/{tag.CqWg6C3H.js.map → tag.DujMVFh-.js.map} +1 -1
  224. package/dist/chunks/textarea.CHV6Z8nt.js +247 -0
  225. package/dist/chunks/{textarea.CvI2InIB.js.map → textarea.CHV6Z8nt.js.map} +1 -1
  226. package/dist/chunks/timeline-item.CaGcRZbt.js +419 -0
  227. package/dist/chunks/timeline-item.CaGcRZbt.js.map +1 -0
  228. package/dist/chunks/{toast.Bbtq3Icj.js → toast.C2oehk9P.js} +72 -78
  229. package/dist/chunks/{toast.Bbtq3Icj.js.map → toast.C2oehk9P.js.map} +1 -1
  230. package/dist/chunks/{toggle.BupEBkIG.js → toggle.BQoprdX-.js} +5 -5
  231. package/dist/chunks/{toggle.BupEBkIG.js.map → toggle.BQoprdX-.js.map} +1 -1
  232. package/dist/chunks/tooltip.CbADa_4p.js +199 -0
  233. package/dist/chunks/{tooltip.Lwtlhv3u.js.map → tooltip.CbADa_4p.js.map} +1 -1
  234. package/dist/chunks/truncate.DmCXQmeb.js +8 -0
  235. package/dist/chunks/{truncate.BfIl_-71.js.map → truncate.DmCXQmeb.js.map} +1 -1
  236. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js → tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js} +100 -124
  237. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BL2QTKmV.js.map → tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map} +1 -1
  238. package/dist/chunks/{use-bento-toast-controller.BFctDoMg.js → use-bento-toast-controller.D_NSnBxi.js} +2 -2
  239. package/dist/chunks/{use-bento-toast-controller.BFctDoMg.js.map → use-bento-toast-controller.D_NSnBxi.js.map} +1 -1
  240. package/dist/chunks/use-cached-selected-values.ClEJRFAd.js +1631 -0
  241. package/dist/chunks/{use-cached-selected-values.C4_X3vVj.js.map → use-cached-selected-values.ClEJRFAd.js.map} +1 -1
  242. package/dist/chunks/use-country-items.D_3LBe2I.js +30 -0
  243. package/dist/chunks/{use-country-items.BTzByPdQ.js.map → use-country-items.D_3LBe2I.js.map} +1 -1
  244. package/dist/chunks/use-country-phon-code.DoqTGkNr.js +287 -0
  245. package/dist/chunks/use-country-phon-code.DoqTGkNr.js.map +1 -0
  246. package/dist/chunks/use-date-input-formatter.CDRzd-hW.js +1629 -0
  247. package/dist/chunks/{use-date-input-formatter.dtbK-CEy.js.map → use-date-input-formatter.CDRzd-hW.js.map} +1 -1
  248. package/dist/chunks/use-default-slot-validator.BzHcrgmy.js +12 -0
  249. package/dist/chunks/{use-default-slot-validator.O02rzsob.js.map → use-default-slot-validator.BzHcrgmy.js.map} +1 -1
  250. package/dist/chunks/use-expandable-content-height.B5jjRvCz.js +16 -0
  251. package/dist/chunks/{use-expandable-content-height.GkjjbmPy.js.map → use-expandable-content-height.B5jjRvCz.js.map} +1 -1
  252. package/dist/chunks/use-has-slot.CyMiImRQ.js +14 -0
  253. package/dist/chunks/{use-has-slot.B7eQSabc.js.map → use-has-slot.CyMiImRQ.js.map} +1 -1
  254. package/dist/chunks/utils.DWmc2mUI.js +19 -0
  255. package/dist/chunks/{utils.BzUwtTXc.js.map → utils.DWmc2mUI.js.map} +1 -1
  256. package/dist/chunks/{zh-CN.ChYkuQAR.js → zh-CN.Ce34mXsX.js} +28 -28
  257. package/dist/chunks/{zh-CN.ChYkuQAR.js.map → zh-CN.Ce34mXsX.js.map} +1 -1
  258. package/dist/click-outside.js +1 -1
  259. package/dist/code-snippet.js +1 -1
  260. package/dist/country.js +3 -3
  261. package/dist/currency.js +1 -1
  262. package/dist/dashboard-template.js +1 -1
  263. package/dist/dashed-underline.js +1 -1
  264. package/dist/data-grid-template.js +1 -1
  265. package/dist/data-grid.js +1 -1
  266. package/dist/date-picker.js +2 -2
  267. package/dist/date-range-picker.js +2 -2
  268. package/dist/date.js +1 -1
  269. package/dist/draggable-handle.js +4 -28
  270. package/dist/draggable-handle.js.map +1 -1
  271. package/dist/dropdown.js +4 -4
  272. package/dist/empty-state.js +1 -1
  273. package/dist/file-uploader.js +1 -1
  274. package/dist/filter-bar.js +1 -1
  275. package/dist/focus-trap.js +1 -1
  276. package/dist/form-layout.js +1 -1
  277. package/dist/header-with-views.js +1 -1
  278. package/dist/header.js +1 -1
  279. package/dist/index.js +241 -241
  280. package/dist/index.js.map +1 -1
  281. package/dist/info-icon.js +1 -1
  282. package/dist/input-field-password.js +1 -1
  283. package/dist/input-field-phone-number.js +1 -1
  284. package/dist/input-field.js +1 -1
  285. package/dist/inspector.js +1 -1
  286. package/dist/internal.js +13 -13
  287. package/dist/layout.js +1 -1
  288. package/dist/link.js +1 -1
  289. package/dist/list.js +6 -0
  290. package/dist/list.js.map +1 -0
  291. package/dist/menu.js +1 -1
  292. package/dist/modal-fullscreen.js +1 -1
  293. package/dist/modal.js +2 -2
  294. package/dist/pagination.js +1 -1
  295. package/dist/popover.js +2 -2
  296. package/dist/popper-container.js +1 -1
  297. package/dist/promo-banner.js +1 -1
  298. package/dist/radio-group.js +1 -1
  299. package/dist/rich-text-editor.js +1 -1
  300. package/dist/search-bar.js +2 -2
  301. package/dist/secondary-nav.js +1 -1
  302. package/dist/segmented-control.js +1 -1
  303. package/dist/selection-card.js +1 -1
  304. package/dist/sidepanel.js +1 -1
  305. package/dist/status.js +4 -3
  306. package/dist/status.js.map +1 -1
  307. package/dist/stepper.js +1 -1
  308. package/dist/structured-list.js +1 -1
  309. package/dist/summary-grid.js +1 -1
  310. package/dist/tabs.js +1 -1
  311. package/dist/tag.js +1 -1
  312. package/dist/textarea.js +1 -1
  313. package/dist/timeline.js +1 -1
  314. package/dist/toast.js +1 -1
  315. package/dist/toggle.js +1 -1
  316. package/dist/tutorial.js +1 -1
  317. package/dist/use-form-v4.js +331 -341
  318. package/dist/use-form-v4.js.map +1 -1
  319. package/dist/web-types.json +1 -1
  320. package/package.json +7 -7
  321. package/dist/chunks/anchor-scroller.BctgW0se.js +0 -214
  322. package/dist/chunks/base-modal.gZAtk-xP.js +0 -443
  323. package/dist/chunks/button-actions-with-menu.Tba1ME79.js +0 -93
  324. package/dist/chunks/calendar.vM3abC8y.js +0 -1234
  325. package/dist/chunks/click-outside.CDz_x8mN.js +0 -23
  326. package/dist/chunks/constructNow.CIc7d13I.js +0 -8
  327. package/dist/chunks/country.types.BBQbWkTY.js +0 -773
  328. package/dist/chunks/dashboard-section.CgoLquLP.js +0 -165
  329. package/dist/chunks/dashed-underline.wbRHATeE.js +0 -114
  330. package/dist/chunks/data-grid-template.D40V1cmi.js +0 -144
  331. package/dist/chunks/data-grid.C2nCCbeC.js +0 -4368
  332. package/dist/chunks/date-picker.D5B_SECc.js +0 -251
  333. package/dist/chunks/date-range-picker.B0q7Z4df.js +0 -1084
  334. package/dist/chunks/differenceInMonths.CIYECBxK.js +0 -43
  335. package/dist/chunks/dropdown.CxjzXI-k.js +0 -837
  336. package/dist/chunks/filter-bar.DJ7O4zLX.js +0 -4036
  337. package/dist/chunks/filter-bar.DJ7O4zLX.js.map +0 -1
  338. package/dist/chunks/fixed-scroller.i1tmEmst.js +0 -161
  339. package/dist/chunks/get-slot-text.CQRAP2_q.js +0 -12
  340. package/dist/chunks/input-field-password.C_h61CMn.js +0 -402
  341. package/dist/chunks/isSameWeek.CzBCmu7d.js +0 -14
  342. package/dist/chunks/layout-row.Da8nkm9z.js +0 -100
  343. package/dist/chunks/link.DTCn2EtX.js +0 -116
  344. package/dist/chunks/on-click-outside.BW4rkhzG.js +0 -91
  345. package/dist/chunks/pagination.B32UgSoH.js +0 -488
  346. package/dist/chunks/pagination.B32UgSoH.js.map +0 -1
  347. package/dist/chunks/popover.types.DhALnOLQ.js +0 -6
  348. package/dist/chunks/selection-card-group.C7IK2Vl5.js +0 -417
  349. package/dist/chunks/startOfWeek.CXhhX-R7.js +0 -10
  350. package/dist/chunks/status.types.D3v3k-Q8.js +0 -44
  351. package/dist/chunks/status.types.D3v3k-Q8.js.map +0 -1
  352. package/dist/chunks/tab.DRrnMCxe.js +0 -273
  353. package/dist/chunks/textarea.CvI2InIB.js +0 -255
  354. package/dist/chunks/timeline-item.BooD99hL.js +0 -427
  355. package/dist/chunks/timeline-item.BooD99hL.js.map +0 -1
  356. package/dist/chunks/tooltip.Lwtlhv3u.js +0 -202
  357. package/dist/chunks/truncate.BfIl_-71.js +0 -8
  358. package/dist/chunks/use-cached-selected-values.C4_X3vVj.js +0 -1711
  359. package/dist/chunks/use-country-items.BTzByPdQ.js +0 -30
  360. package/dist/chunks/use-country-phon-code.Bui3zD6W.js +0 -5621
  361. package/dist/chunks/use-country-phon-code.Bui3zD6W.js.map +0 -1
  362. package/dist/chunks/use-date-input-formatter.dtbK-CEy.js +0 -1732
  363. package/dist/chunks/use-default-slot-validator.O02rzsob.js +0 -16
  364. package/dist/chunks/use-expandable-content-height.GkjjbmPy.js +0 -17
  365. package/dist/chunks/use-has-slot.B7eQSabc.js +0 -15
  366. package/dist/chunks/utils.BzUwtTXc.js +0 -21
@@ -0,0 +1,1631 @@
1
+ import { computed as b, ref as _, onMounted as ut, onUnmounted as bt, watch as ge, defineComponent as X, resolveComponent as I, openBlock as d, createElementBlock as y, createVNode as M, withCtx as L, createTextVNode as K, toDisplayString as V, createElementVNode as G, renderSlot as W, mergeProps as w, withKeys as be, createCommentVNode as q, createBlock as k, withModifiers as ie, normalizeProps as oe, guardReactiveProps as me, withDirectives as ae, vShow as Ye, nextTick as Ue, toRef as pe, resolveDirective as ze, toHandlers as ee, Fragment as te, renderList as j, createSlots as ve, normalizeClass as fe, unref as B, useSlots as mt, useAttrs as pt } from "vue";
2
+ import { B as F, a as he } from "./keyboard-navigation.DWmhelVv.js";
3
+ import { B as ne } from "./typography.B3J6_tYk.js";
4
+ import { B as vt } from "./loading-indicator.BPol9I84.js";
5
+ import { B as ft } from "./empty-state.DT4sFyjB.js";
6
+ import { u as _e } from "./index.B875RXHM.js";
7
+ import { d as gt } from "./debounce.DUTu11PS.js";
8
+ import { o as yt } from "./resize.Bqks3WUm.js";
9
+ import { C as Se, N as St } from "./minus-small.CnYLTuSv.js";
10
+ import { C as ht } from "./checkmark-small.CRuZauJc.js";
11
+ /* empty css */
12
+ import { _ as H } from "./_plugin-vue_export-helper.CHgC5LLL.js";
13
+ import { B as Ct } from "./chip.CdgpQyXN.js";
14
+ import { C as Et } from "./chevron-down.XeE-LBV_.js";
15
+ import { C as Ot } from "./chevron-up.Cmgl2a3x.js";
16
+ import { g as Pe } from "./generate-uid.DBWe4g6T.js";
17
+ import { a as Tt, b as Ne } from "./button-actions.cMQWyZne.js";
18
+ import "../assets/use-cached-selected-values.css";
19
+ const Fe = (e, t, o, s) => {
20
+ const r = b(
21
+ () => !!e.value?.length && e.value?.length === t.value.length
22
+ ), n = b(() => e.value == null || e.value.length === 0 ? !1 : e.value?.length !== t.value.length);
23
+ return {
24
+ isAllSelected: r,
25
+ isIndeterminate: n,
26
+ toggleSelectAll: (g) => {
27
+ g ? o() : s();
28
+ }
29
+ };
30
+ };
31
+ function Lt(e, { disabled: t, itemHeight: o, overscan: s = 5, prefixHeight: r }) {
32
+ const n = _(null), i = _([]), g = _(0), S = _(0), a = _(0);
33
+ let u;
34
+ const l = b(() => {
35
+ const A = typeof o == "number" ? e.value.length * o : e.value.reduce((T, O, D) => T + o(D), 0), $ = typeof o == "number" ? g.value * o : e.value.slice(0, g.value).reduce((T, O, D) => T + o(D), 0);
36
+ return {
37
+ style: {
38
+ marginTop: `${$}px`,
39
+ height: `${A - $}px`
40
+ }
41
+ };
42
+ }), m = () => {
43
+ const A = r?.value ?? 0, $ = Math.max(n.value.scrollTop - A, 0);
44
+ if (typeof o == "number")
45
+ return Math.floor($ / o);
46
+ let T = 0, O = 0;
47
+ for (let D = 0; D < e.value.length; D += 1) {
48
+ const Y = o(D);
49
+ if (T += Y, T >= $) {
50
+ O = D;
51
+ break;
52
+ }
53
+ }
54
+ return O;
55
+ }, C = () => {
56
+ if (a.value = n.value.clientHeight, typeof o == "number")
57
+ return Math.ceil(a.value / o);
58
+ const A = g.value ?? 0;
59
+ let $ = 0, T = 0;
60
+ for (let O = A; O < e.value.length; O += 1) {
61
+ const D = o(O);
62
+ if ($ += D, T = O, $ > a.value)
63
+ break;
64
+ }
65
+ return T - A;
66
+ }, h = () => {
67
+ if (n.value) {
68
+ const A = C();
69
+ g.value = m(), S.value = Math.min(g.value + A + s, e.value.length), i.value = e.value.slice(g.value, S.value);
70
+ }
71
+ }, R = () => {
72
+ h();
73
+ };
74
+ t || (ut(() => {
75
+ n.value && (a.value = n.value.clientHeight, u = yt(n.value, ({ clientHeight: A }) => {
76
+ a.value = A, h();
77
+ }), h());
78
+ }), bt(() => {
79
+ u?.disconnect();
80
+ }), ge(
81
+ () => e.value,
82
+ () => {
83
+ h();
84
+ }
85
+ ));
86
+ const x = {
87
+ ref: n,
88
+ style: { overflowY: "auto" }
89
+ };
90
+ return t ? {
91
+ containerRef: n,
92
+ containerProps: x,
93
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
94
+ onScroll: () => {
95
+ },
96
+ list: e
97
+ } : {
98
+ containerRef: n,
99
+ containerProps: x,
100
+ onScroll: R,
101
+ list: i,
102
+ wrapperProps: l
103
+ };
104
+ }
105
+ var p = /* @__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))(p || {}), le = /* @__PURE__ */ ((e) => (e.AUTOMATIC = "automatic", e.BUTTON = "button", e.NONE = "none", e))(le || {});
106
+ const _t = X({
107
+ name: "bento-listbox-static-category",
108
+ components: {
109
+ BentoTypography: ne
110
+ },
111
+ props: {
112
+ /**
113
+ * Category label text
114
+ */
115
+ categoryLabel: {
116
+ type: String,
117
+ required: !0
118
+ }
119
+ }
120
+ }), It = ["aria-label"];
121
+ function kt(e, t, o, s, r, n) {
122
+ const i = I("bento-typography");
123
+ return d(), y("div", {
124
+ class: "b-listbox-single-select-category",
125
+ role: "group",
126
+ "aria-label": e.categoryLabel
127
+ }, [
128
+ M(i, {
129
+ variant: "caption",
130
+ el: "span",
131
+ class: "b-listbox-single-select-category__label-text",
132
+ "aria-hidden": "true"
133
+ }, {
134
+ default: L(() => [
135
+ K(V(e.categoryLabel), 1)
136
+ ]),
137
+ _: 1
138
+ }),
139
+ G("div", null, [
140
+ W(e.$slots, "default", {}, void 0, !0)
141
+ ])
142
+ ], 8, It);
143
+ }
144
+ const At = /* @__PURE__ */ H(_t, [["render", kt], ["__scopeId", "data-v-27c4e09a"]]), $t = X({
145
+ name: "bento-listbox-option",
146
+ props: {
147
+ /**
148
+ * Setting this property to true will disable the option.
149
+ */
150
+ disabled: { type: Boolean, default: !1 },
151
+ /**
152
+ * Indicates if the value is selected. Only one element can be selected at a time.
153
+ */
154
+ selected: { type: Boolean, default: !1 }
155
+ },
156
+ emits: [p.CLICK, p.ENTER, p.SPACE, p.TAB],
157
+ setup(e, { emit: t }) {
158
+ const o = b(() => ({
159
+ "b-listbox-option--disabled": e.disabled,
160
+ "b-listbox-option--selected": e.selected
161
+ }));
162
+ return {
163
+ // Enums
164
+ BentoKeyboardNavigationKeyDownEvent: F,
165
+ BentoListboxEvent: p,
166
+ // Values
167
+ conditionalClasses: o,
168
+ // Events
169
+ onClick: (n) => {
170
+ t(p.CLICK, n);
171
+ },
172
+ onOptionSelected: (n, i) => {
173
+ t(n, i);
174
+ }
175
+ };
176
+ }
177
+ });
178
+ function Dt(e, t, o, s, r, n) {
179
+ return d(), y("div", w({
180
+ class: ["b-listbox-option", e.conditionalClasses],
181
+ role: "option"
182
+ }, e.$attrs, {
183
+ onClick: t[0] || (t[0] = (...i) => e.onClick && e.onClick(...i)),
184
+ onKeydown: [
185
+ t[1] || (t[1] = be((i) => e.onOptionSelected(e.BentoListboxEvent.ENTER, i), ["enter"])),
186
+ t[2] || (t[2] = be((i) => e.onOptionSelected(e.BentoListboxEvent.SPACE, i), ["space"])),
187
+ t[3] || (t[3] = be((i) => e.onOptionSelected(e.BentoListboxEvent.TAB, i), ["tab"]))
188
+ ]
189
+ }), [
190
+ W(e.$slots, "default", {}, void 0, !0)
191
+ ], 16);
192
+ }
193
+ const Ce = /* @__PURE__ */ H($t, [["render", Dt], ["__scopeId", "data-v-1495b1db"]]);
194
+ let Me = 0;
195
+ const Bt = {
196
+ beforeCreate() {
197
+ this.uuid = Me.toString(), Me += 1;
198
+ }
199
+ }, Rt = { key: 0 };
200
+ function Pt(e, t, o, s, r, n) {
201
+ return d(), y("svg", w({ role: "img" }, e.$attrs, {
202
+ class: "ui-assets-icons-16",
203
+ xmlns: "http://www.w3.org/2000/svg",
204
+ width: "16",
205
+ height: "16",
206
+ fill: "none"
207
+ }), [
208
+ e.$attrs["svg-title"] ? (d(), y("title", Rt, V(e.$attrs["svg-title"]), 1)) : q("", !0),
209
+ t[0] || (t[0] = G("path", {
210
+ fill: "#001222",
211
+ d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z"
212
+ }, null, -1))
213
+ ], 16);
214
+ }
215
+ const Nt = /* @__PURE__ */ H(Bt, [["render", Pt]]), Mt = X({
216
+ name: "bento-listbox-single-select-option",
217
+ components: {
218
+ BentoListboxOption: Ce,
219
+ BentoTypography: ne,
220
+ CheckmarkIcon: Nt
221
+ },
222
+ props: {
223
+ /**
224
+ * Setting this property to true will disable the option.
225
+ */
226
+ disabled: { type: Boolean, default: !1 },
227
+ /**
228
+ * The option item that contains all the option item's data.
229
+ * @type {BentoListboxOptionItem}
230
+ */
231
+ option: {
232
+ type: Object,
233
+ required: !0
234
+ },
235
+ /**
236
+ * Indicates if the value is selected. Only one element can be selected at a time.
237
+ */
238
+ selected: { type: Boolean, default: !1 }
239
+ },
240
+ emits: [p.ENTER, p.SELECT, p.SPACE, p.TAB],
241
+ setup(e, { emit: t }) {
242
+ const o = (i) => {
243
+ e.disabled || t(i, e.option);
244
+ }, s = b(() => e.disabled ? !0 : null), r = b(() => e.selected ? !0 : null), n = b(() => e.disabled ? -1 : 0);
245
+ return {
246
+ // Values
247
+ ariaDisabled: s,
248
+ ariaSelected: r,
249
+ tabIndex: n,
250
+ // Enums
251
+ BentoListboxEvent: p,
252
+ // Events
253
+ onOptionSelected: o
254
+ };
255
+ }
256
+ }), wt = { class: "b-listbox-single-select-option__text" }, Gt = { class: "b-listbox-single-select-option__check-icon" };
257
+ function xt(e, t, o, s, r, n) {
258
+ const i = I("bento-typography"), g = I("checkmark-icon"), S = I("bento-listbox-option");
259
+ return d(), k(S, {
260
+ class: "b-listbox-single-select-option",
261
+ disabled: e.disabled,
262
+ selected: e.selected,
263
+ "aria-selected": e.ariaSelected,
264
+ "aria-disabled": e.ariaDisabled,
265
+ tabindex: e.tabIndex,
266
+ onClick: t[0] || (t[0] = (a) => e.onOptionSelected(e.BentoListboxEvent.SELECT)),
267
+ onEnterPressed: t[1] || (t[1] = (a) => e.onOptionSelected(e.BentoListboxEvent.ENTER)),
268
+ onSpacePressed: t[2] || (t[2] = ie((a) => e.onOptionSelected(e.BentoListboxEvent.SPACE), ["prevent"])),
269
+ onTabPressed: t[3] || (t[3] = (a) => e.onOptionSelected(e.BentoListboxEvent.TAB))
270
+ }, {
271
+ default: L(() => [
272
+ W(e.$slots, "default", oe(me(e.option)), () => [
273
+ G("span", wt, [
274
+ M(i, { el: "span" }, {
275
+ default: L(() => [
276
+ K(V(e.option.label), 1)
277
+ ]),
278
+ _: 1
279
+ }),
280
+ e.option.description ? (d(), k(i, {
281
+ key: 0,
282
+ class: "b-listbox-single-select-option__description",
283
+ el: "span"
284
+ }, {
285
+ default: L(() => [
286
+ K(V(e.option.description), 1)
287
+ ]),
288
+ _: 1
289
+ })) : q("", !0)
290
+ ])
291
+ ], !0),
292
+ G("span", Gt, [
293
+ ae(M(g, { "svg-title": "selected" }, null, 512), [
294
+ [Ye, e.selected]
295
+ ])
296
+ ])
297
+ ]),
298
+ _: 3
299
+ }, 8, ["disabled", "selected", "aria-selected", "aria-disabled", "tabindex"]);
300
+ }
301
+ const Vt = /* @__PURE__ */ H(Mt, [["render", xt], ["__scopeId", "data-v-4f41af07"]]), Ke = ({ items: e }, t) => {
302
+ const o = b(() => e.value.length - 1), s = _(0), r = (m) => {
303
+ switch (m) {
304
+ case "increase":
305
+ s.value += 1;
306
+ break;
307
+ case "decrease":
308
+ s.value -= 1;
309
+ break;
310
+ }
311
+ }, n = ({ edgeCaseItem: m }, C) => {
312
+ s.value !== m && (r(C), t(s.value));
313
+ }, i = (m) => {
314
+ l(m), n(
315
+ {
316
+ edgeCaseItem: o.value
317
+ },
318
+ "increase"
319
+ /* INCREASE */
320
+ );
321
+ }, g = (m) => {
322
+ l(m), n(
323
+ {
324
+ edgeCaseItem: 0
325
+ },
326
+ "decrease"
327
+ /* DECREASE */
328
+ );
329
+ }, S = () => {
330
+ s.value = 0, t(s.value);
331
+ }, a = () => {
332
+ s.value = o.value, t(s.value);
333
+ }, u = (m) => {
334
+ s.value = m;
335
+ }, l = (m) => {
336
+ m?.detail?.preventDefault();
337
+ };
338
+ return {
339
+ moveToFirstElement: S,
340
+ moveToLastElement: a,
341
+ moveToNextElement: i,
342
+ moveToPreviousElement: g,
343
+ setListboxFocusedIndex: u,
344
+ preventDefault: l,
345
+ focusedIndex: s
346
+ };
347
+ }, We = (e, t, o = _("option"), s = !0) => {
348
+ const r = _([]), n = async () => {
349
+ if (!e.value || e.value.nodeType === Node.COMMENT_NODE)
350
+ return;
351
+ const i = Array.from(e.value.querySelectorAll(`[role="${o.value}"]`));
352
+ r.value = s ? i.filter((g) => g.checkVisibility()) : i;
353
+ };
354
+ return ge(
355
+ t,
356
+ () => {
357
+ Ue(() => {
358
+ n();
359
+ });
360
+ },
361
+ { immediate: !0 }
362
+ ), {
363
+ visibleDomOptions: r,
364
+ updateVisibleDomOptions: n
365
+ };
366
+ }, Yt = X({
367
+ name: "bento-listbox-single-select",
368
+ components: {
369
+ BentoListboxSingleSelectCategory: At,
370
+ BentoListboxSingleSelectOption: Vt
371
+ },
372
+ directives: { BentoKeyboardNavigationDirective: he },
373
+ inheritAttrs: !1,
374
+ props: {
375
+ /**
376
+ * Function that allows the options to be disabled
377
+ *
378
+ * @type {BentoListboxIsOptionDisabled}
379
+ * @param {BentoListboxOptionItem} option - listbox option object
380
+ * @param {string} option.label - Option's label text
381
+ * @param {string|number} option.value - Option's value
382
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
383
+ */
384
+ isOptionDisabled: {
385
+ type: Function,
386
+ default: () => !1
387
+ },
388
+ /**
389
+ * The option elements to populate the listbox with.
390
+ * It must be an array of {@see BentoListboxOptionItem }.
391
+ *
392
+ * @property {string} value.label - Text to be displayed in the option
393
+ * @property {string,number} value.value - Value of the option
394
+ */
395
+ items: {
396
+ type: Array,
397
+ required: !0
398
+ },
399
+ /**
400
+ * The `input` value.
401
+ * Providing an empty string will select no options.
402
+ * Set to an empty string `''` if you don't want any of the available options to be selected
403
+ */
404
+ selectedValue: {
405
+ type: Array,
406
+ default: void 0
407
+ },
408
+ /**
409
+ * If enabled, dropdown will display non-selectable, static categories
410
+ */
411
+ staticCategories: { type: Boolean, default: !1 }
412
+ },
413
+ emits: [p.SELECT, p.ENTER, p.SPACE, p.TAB],
414
+ setup(e, { emit: t, expose: o, slots: s, attrs: r }) {
415
+ const n = _(null), i = _([]), g = b(() => !!e.selectedValue?.length && e.selectedValue.at(0)), S = b(
416
+ () => ({
417
+ "aria-label": r["aria-label"]?.toString(),
418
+ "aria-busy": r["aria-busy"]?.toString(),
419
+ "aria-atomic": r["aria-atomic"]?.toString(),
420
+ "aria-live": r["aria-live"]?.toString()
421
+ })
422
+ ), a = b(() => !!e.items.some(({ items: O }) => !!O)), u = (O) => (D) => {
423
+ t(O, [D]);
424
+ }, { visibleDomOptions: l } = We(n, pe(e, "items"), _("option"), !1), m = (O) => {
425
+ l.value[O]?.focus();
426
+ }, {
427
+ moveToNextElement: C,
428
+ moveToPreviousElement: h,
429
+ moveToFirstElement: R,
430
+ moveToLastElement: x,
431
+ setListboxFocusedIndex: A
432
+ } = Ke(
433
+ {
434
+ items: l
435
+ },
436
+ m
437
+ ), $ = {
438
+ [F.ARROW_UP]: h,
439
+ [F.ARROW_DOWN]: C,
440
+ [F.HOME]: R,
441
+ [F.END]: x
442
+ }, T = {
443
+ [p.SELECT]: u(p.SELECT),
444
+ [p.SPACE]: u(p.SPACE),
445
+ [p.TAB]: u(p.TAB),
446
+ [p.ENTER]: u(p.ENTER)
447
+ };
448
+ return o({
449
+ /**
450
+ * Reference for a single listbox item.
451
+ * Required for keyboard navigation in dropdown as $children is removed in vue@3
452
+ */
453
+ listboxItemRef: i,
454
+ /**
455
+ * Method to set the index of the item to be focused on
456
+ * Used for focus management to be kept in-sync with parent e.g. dropdowns
457
+ */
458
+ setListboxFocusedIndex: A
459
+ }), {
460
+ // Enums
461
+ BentoListboxEvent: p,
462
+ // Values
463
+ listboxRef: n,
464
+ listboxItemRef: i,
465
+ selectedItem: g,
466
+ slots: s,
467
+ ariaAttributes: S,
468
+ // Computed
469
+ hasCategories: a,
470
+ // Methods
471
+ onOptionSelected: u,
472
+ // Keyboard navigation
473
+ listboxListeners: $,
474
+ listboxOptionListeners: T
475
+ };
476
+ }
477
+ });
478
+ function Ut(e, t, o, s, r, n) {
479
+ const i = I("bento-listbox-single-select-option"), g = I("bento-listbox-single-select-category"), S = ze("bento-keyboard-navigation-directive");
480
+ return ae((d(), y("div", w({ ref: "listboxRef" }, e.ariaAttributes, { role: "listbox" }, ee(e.listboxListeners, !0)), [
481
+ e.hasCategories && e.staticCategories ? (d(!0), y(te, { key: 0 }, j(e.items, (a) => (d(), k(g, {
482
+ key: a.value,
483
+ "category-label": a.label
484
+ }, {
485
+ default: L(() => [
486
+ (d(!0), y(te, null, j(a.items, (u) => (d(), k(i, w({
487
+ key: u.value,
488
+ ref_for: !0,
489
+ ref: "listboxItemRef",
490
+ role: "option",
491
+ option: u,
492
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(u) : null,
493
+ selected: u.value === e.selectedItem.value
494
+ }, ee(e.listboxOptionListeners)), ve({ _: 2 }, [
495
+ j(e.slots, (l, m) => ({
496
+ name: m,
497
+ fn: L((C) => [
498
+ W(e.$slots, m, w({ ref_for: !0 }, C))
499
+ ])
500
+ }))
501
+ ]), 1040, ["option", "disabled", "selected"]))), 128))
502
+ ]),
503
+ _: 2
504
+ }, 1032, ["category-label"]))), 128)) : (d(!0), y(te, { key: 1 }, j(e.items, (a) => (d(), k(i, w({
505
+ key: a.value,
506
+ ref_for: !0,
507
+ ref: "listboxItemRef",
508
+ role: "option",
509
+ option: a,
510
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(a) : null,
511
+ selected: a.value === e.selectedItem.value
512
+ }, ee(e.listboxOptionListeners)), ve({ _: 2 }, [
513
+ j(e.slots, (u, l) => ({
514
+ name: l,
515
+ fn: L((m) => [
516
+ W(e.$slots, l, w({ ref_for: !0 }, m))
517
+ ])
518
+ }))
519
+ ]), 1040, ["option", "disabled", "selected"]))), 128))
520
+ ], 16)), [
521
+ [S]
522
+ ]);
523
+ }
524
+ const zt = /* @__PURE__ */ H(Yt, [["render", Ut]]);
525
+ let we = 0;
526
+ const Ft = {
527
+ beforeCreate() {
528
+ this.uuid = we.toString(), we += 1;
529
+ }
530
+ }, Kt = { key: 0 };
531
+ function Wt(e, t, o, s, r, n) {
532
+ return d(), y("svg", w({ role: "img" }, e.$attrs, {
533
+ class: "ui-assets-icons-16",
534
+ xmlns: "http://www.w3.org/2000/svg",
535
+ width: "16",
536
+ height: "16",
537
+ fill: "none"
538
+ }), [
539
+ e.$attrs["svg-title"] ? (d(), y("title", Kt, V(e.$attrs["svg-title"]), 1)) : q("", !0),
540
+ t[0] || (t[0] = G("path", {
541
+ fill: "#001222",
542
+ d: "M9.69043 5.75L4.62988 10.8105L1.56934 7.75L2.62988 6.68945L4.62988 8.68945L8.62988 4.68945L9.69043 5.75Z"
543
+ }, null, -1)),
544
+ t[1] || (t[1] = G("path", {
545
+ fill: "#001222",
546
+ d: "M13.9307 5.75L8.87012 10.8105L7.80957 9.75L12.8701 4.68945L13.9307 5.75Z"
547
+ }, null, -1))
548
+ ], 16);
549
+ }
550
+ const Ht = /* @__PURE__ */ H(Ft, [["render", Wt]]), jt = {}, qt = /* @__PURE__ */ X({
551
+ ...jt,
552
+ __name: "decorative-checkbox",
553
+ props: {
554
+ disabled: { type: Boolean, default: !1 },
555
+ indeterminate: { type: Boolean, default: !1 },
556
+ checked: { type: Boolean, default: !1 },
557
+ allSelected: { type: Boolean, default: !1 }
558
+ },
559
+ setup(e) {
560
+ const t = e, o = b(() => ({
561
+ [`b-checkbox-input--${Se.DISABLED}`]: t.disabled
562
+ })), s = b(() => ({
563
+ [`b-checkbox-input__outline--${Se.UNCHECKED}`]: !t.checked && !t.indeterminate && !t.allSelected,
564
+ [`b-checkbox-input__outline--${Se.CHECKED}`]: (t.checked || t.allSelected) && !t.indeterminate,
565
+ [`b-checkbox-input__outline--${Se.INDETERMINATE}`]: t.indeterminate
566
+ }));
567
+ return (r, n) => (d(), y("div", {
568
+ class: fe(["b-checkbox-input", o.value]),
569
+ role: "presentation"
570
+ }, [
571
+ r.indeterminate ? (d(), k(B(St), {
572
+ key: 0,
573
+ class: "b-checkbox-input__icon",
574
+ "svg-title": "",
575
+ "aria-hidden": "true"
576
+ })) : r.allSelected ? (d(), k(B(Ht), {
577
+ key: 1,
578
+ class: "b-checkbox-input__icon",
579
+ "svg-title": "",
580
+ "aria-hidden": "true",
581
+ "data-testid": "decorative-checkbox-double-checkmark-icon"
582
+ })) : r.checked ? (d(), k(B(ht), {
583
+ key: 2,
584
+ class: "b-checkbox-input__icon",
585
+ "svg-title": "",
586
+ "aria-hidden": "true"
587
+ })) : q("", !0),
588
+ G("div", {
589
+ class: fe(["b-checkbox-input__outline", s.value])
590
+ }, null, 2)
591
+ ], 2));
592
+ }
593
+ }), Ie = /* @__PURE__ */ H(qt, [["__scopeId", "data-v-08d3142e"]]);
594
+ var He = /* @__PURE__ */ ((e) => (e.DISABLED = "disabled", e.STATIC_CATEGORY = "static-category", e))(He || {}), Q = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(Q || {});
595
+ const Ge = {
596
+ "en-US": { categoryClosed: "{category} closed", categoryOpened: "{category} opened" },
597
+ "ja-JP": { categoryClosed: "{category}を閉じました", categoryOpened: "{category}を開きました" },
598
+ "pt-BR": { categoryClosed: "{category} fechado", categoryOpened: "{categoria} aberta" }
599
+ }, Jt = X({
600
+ i18n: { messages: Ge },
601
+ name: "bento-listbox-multi-select-category",
602
+ components: {
603
+ BentoTypography: ne,
604
+ BentoListboxOption: Ce,
605
+ ChevronDownIcon: Et,
606
+ ChevronUpIcon: Ot,
607
+ DecorativeCheckbox: Ie
608
+ },
609
+ props: {
610
+ /**
611
+ * The option elements to populate the listbox with.
612
+ * It must be an array of {@see BentoListboxOptionItem }.
613
+ *
614
+ * @property {string} value.label - Text to be displayed in the option
615
+ * @property {string,number} value.value - Value of the option
616
+ * @property {BentoListboxOptionItem} value.items - Category items list
617
+ */
618
+ category: {
619
+ type: Object,
620
+ required: !0
621
+ },
622
+ /**
623
+ * Function that allows the options to be disabled
624
+ *
625
+ * @type {BentoListboxIsOptionDisabled}
626
+ * @param {BentoListboxOptionItem} option - listbox option object
627
+ * @param {string} option.label - Option's label text
628
+ * @param {string|number} option.value - Option's value
629
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
630
+ */
631
+ isOptionDisabled: {
632
+ type: [Function],
633
+ default: () => !1
634
+ },
635
+ /**
636
+ * The `input` value.
637
+ * Providing an empty array will select no options.
638
+ */
639
+ selectedItemsList: {
640
+ type: Array,
641
+ default: () => []
642
+ },
643
+ /**
644
+ * If enabled, dropdown will display non-selectable, static categories
645
+ */
646
+ staticCategories: { type: Boolean, default: !1 },
647
+ /**
648
+ * Category's tabindex
649
+ */
650
+ tabindex: { type: Number, default: -1 }
651
+ },
652
+ emits: [
653
+ Q.SELECT_CATEGORY,
654
+ Q.UNSELECT_CATEGORY,
655
+ Q.TOGGLE_CATEGORY_VISIBILITY
656
+ ],
657
+ setup(e, { emit: t }) {
658
+ const o = _(!1), { t: s } = _e({ messages: Ge }), r = Pe("category-group"), n = Pe("category-name"), i = (P) => e.isOptionDisabled ? e.isOptionDisabled(P) : !1, g = b(
659
+ () => e.category.items.every((P) => i(P))
660
+ ), S = pe(e, "staticCategories"), a = b(() => o.value || e.staticCategories), u = b(() => ({
661
+ [`b-listbox-multi-select-category--${He.DISABLED}`]: g.value
662
+ })), l = (P, U) => {
663
+ P.preventDefault(), o.value = U !== void 0 ? U : !o.value, t(Q.TOGGLE_CATEGORY_VISIBILITY, e.category.value);
664
+ }, m = (P) => {
665
+ const U = i(P), Z = e.selectedItemsList?.includes(P.value) || !1;
666
+ return { isDisabled: U, isPreSelected: Z };
667
+ }, C = b(
668
+ () => e.category.items.filter((P) => {
669
+ const { isDisabled: U, isPreSelected: Z } = m(P);
670
+ return U && Z || !U;
671
+ })
672
+ ), h = b(
673
+ () => C.value?.filter(
674
+ ({ value: P }) => e.selectedItemsList?.includes(P)
675
+ )
676
+ ), R = b(() => {
677
+ const P = o.value ? "categoryOpened" : "categoryClosed";
678
+ return s(P, { category: e.category.label });
679
+ }), x = () => {
680
+ t(Q.SELECT_CATEGORY);
681
+ }, A = () => {
682
+ t(Q.UNSELECT_CATEGORY);
683
+ }, { isAllSelected: $, isIndeterminate: T, toggleSelectAll: O } = Fe(
684
+ h,
685
+ C,
686
+ x,
687
+ A
688
+ ), D = b(() => T.value ? "mixed" : `${$.value}`), Y = _($.value), re = () => {
689
+ Y.value = !Y.value, O(Y.value);
690
+ };
691
+ return ge($, () => {
692
+ Y.value = $.value;
693
+ }), {
694
+ // Values
695
+ chevronTitle: R,
696
+ conditionalClass: u,
697
+ hasAllPropsDisabled: g,
698
+ isOpen: o,
699
+ isAllSelected: $,
700
+ isIndeterminate: T,
701
+ isStaticCategory: S,
702
+ categoryGroupId: r,
703
+ categoryNameId: n,
704
+ // Computed
705
+ showItemChildren: a,
706
+ ariaCheckedComputed: D,
707
+ // Methods
708
+ handleSelectAll: re,
709
+ toggleOpen: l,
710
+ toggleSelectAll: O
711
+ };
712
+ }
713
+ }), Xt = { class: "b-listbox-multi-select-category__label" }, Zt = {
714
+ key: 1,
715
+ class: "b-listbox-multi-select-category b-listbox-multi-select-category--static-category",
716
+ "aria-hidden": "true"
717
+ }, Qt = { class: "b-listbox-multi-select-category__label" }, es = ["id", "aria-label"];
718
+ function ts(e, t, o, s, r, n) {
719
+ const i = I("decorative-checkbox"), g = I("bento-typography"), S = I("chevron-up-icon"), a = I("chevron-down-icon"), u = I("bento-listbox-option");
720
+ return d(), y("div", null, [
721
+ e.isStaticCategory ? (d(), y("div", Zt, [
722
+ G("span", Qt, [
723
+ M(g, {
724
+ el: "span",
725
+ variant: "caption",
726
+ class: "b-listbox-multi-select-category__label-text"
727
+ }, {
728
+ default: L(() => [
729
+ K(V(e.category.label), 1)
730
+ ]),
731
+ _: 1
732
+ })
733
+ ])
734
+ ])) : (d(), k(u, {
735
+ key: 0,
736
+ class: fe(["b-listbox-multi-select-category__option", e.conditionalClass]),
737
+ tabindex: e.tabindex,
738
+ "aria-selected": e.ariaCheckedComputed !== "false",
739
+ "aria-checked": e.ariaCheckedComputed,
740
+ "aria-disabled": e.hasAllPropsDisabled,
741
+ "aria-expanded": `${e.isOpen}`,
742
+ role: "treeitem",
743
+ "aria-owns": e.categoryGroupId,
744
+ "aria-labelledby": e.categoryNameId,
745
+ onClick: e.handleSelectAll,
746
+ onEnterPressed: e.handleSelectAll,
747
+ onSpacePressed: ie(e.handleSelectAll, ["prevent"]),
748
+ onKeydown: [
749
+ t[1] || (t[1] = be((l) => e.toggleOpen(l, !1), ["arrow-left", "native"])),
750
+ t[2] || (t[2] = be((l) => e.toggleOpen(l, !0), ["arrow-right", "native"]))
751
+ ]
752
+ }, {
753
+ default: L(() => [
754
+ M(i, {
755
+ indeterminate: e.isIndeterminate,
756
+ disabled: e.hasAllPropsDisabled,
757
+ checked: e.isAllSelected
758
+ }, null, 8, ["indeterminate", "disabled", "checked"]),
759
+ G("span", Xt, [
760
+ M(g, {
761
+ id: e.categoryNameId,
762
+ el: "span",
763
+ class: "b-listbox-multi-select-category__label-text"
764
+ }, {
765
+ default: L(() => [
766
+ K(V(e.category.label), 1)
767
+ ]),
768
+ _: 1
769
+ }, 8, ["id"]),
770
+ G("div", {
771
+ "aria-hidden": "true",
772
+ class: "b-listbox-multi-select-category__label-chevron",
773
+ "data-testid": "toggle-listbox",
774
+ onClickCapture: t[0] || (t[0] = ie((...l) => e.toggleOpen && e.toggleOpen(...l), ["stop"]))
775
+ }, [
776
+ e.isOpen ? (d(), k(S, {
777
+ key: 0,
778
+ "svg-title": e.chevronTitle
779
+ }, null, 8, ["svg-title"])) : (d(), k(a, {
780
+ key: 1,
781
+ "svg-title": e.chevronTitle
782
+ }, null, 8, ["svg-title"]))
783
+ ], 32)
784
+ ])
785
+ ]),
786
+ _: 1
787
+ }, 8, ["class", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded", "aria-owns", "aria-labelledby", "onClick", "onEnterPressed", "onSpacePressed"])),
788
+ ae(G("div", {
789
+ id: e.categoryGroupId,
790
+ role: "group",
791
+ "aria-label": e.category.label
792
+ }, [
793
+ W(e.$slots, "default", {}, void 0, !0)
794
+ ], 8, es), [
795
+ [Ye, e.showItemChildren]
796
+ ])
797
+ ]);
798
+ }
799
+ const ss = /* @__PURE__ */ H(Jt, [["render", ts], ["__scopeId", "data-v-60c04867"]]);
800
+ var J = /* @__PURE__ */ ((e) => (e.SELECT_CATEGORY = "select-category", e.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", e.UNSELECT_CATEGORY = "unselect-category", e.TOGGLE_CATEGORY_VISIBILITY = "toggle-category-visibility", e))(J || {});
801
+ const ls = X({
802
+ name: "listbox-multi-select-options",
803
+ components: {
804
+ BentoListboxOption: Ce,
805
+ BentoTypography: ne,
806
+ ListboxMultiSelectCategory: ss,
807
+ DecorativeCheckbox: Ie
808
+ },
809
+ inheritAttrs: !1,
810
+ props: {
811
+ /**
812
+ * Indicates if the items listed are inside a category
813
+ * so they can be padded to right by one level in recursion.
814
+ * Items of categories are automatically defined as "categoryItems"
815
+ */
816
+ categoryItems: { type: Boolean, default: !1 },
817
+ /**
818
+ * Current focused option index
819
+ */
820
+ focusedIndex: { type: Number, default: 0 },
821
+ /**
822
+ * Function that allows the options to be disabled
823
+ *
824
+ * @type {BentoListboxIsOptionDisabled}
825
+ * @param {BentoListboxOptionItem} option - listbox option object
826
+ * @param {string} option.label - Option's label text
827
+ * @param {string|number} option.value - Option's value
828
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
829
+ */
830
+ isOptionDisabled: {
831
+ type: Function,
832
+ default: () => !1
833
+ },
834
+ /**
835
+ * The option elements to populate the listbox with.
836
+ * It must be an array of {@see BentoListboxOptionItem }.
837
+ *
838
+ * @property {string} value.label - Text to be displayed in the option
839
+ * @property {string,number} value.value - Value of the option
840
+ */
841
+ items: {
842
+ type: Array,
843
+ required: !0
844
+ },
845
+ /**
846
+ * Indicates if the elements options are inside a multi-level category
847
+ */
848
+ isMultiLevel: { type: Boolean, default: !1 },
849
+ /**
850
+ * Flag that indicates that an external search it's being made
851
+ * to filter out the items inside the the multi-select listbox
852
+ *
853
+ * If enabled, hides the "Select all" checkbox in "multiple" mode.
854
+ */
855
+ searching: { type: Boolean, default: !1 },
856
+ /**
857
+ * List of selected items.
858
+ * Providing an empty array will select no options.
859
+ */
860
+ selectedItemsList: {
861
+ type: Array,
862
+ default: () => []
863
+ },
864
+ /**
865
+ * If enabled, dropdown will display non-selectable, static categories
866
+ */
867
+ staticCategories: { type: Boolean, default: !1 },
868
+ /**
869
+ * Object with the index of each item.
870
+ */
871
+ itemsIndex: {
872
+ type: Object,
873
+ default: () => ({})
874
+ }
875
+ },
876
+ emits: [
877
+ J.TOGGLE_CHECKBOX_SELECTION,
878
+ J.SELECT_CATEGORY,
879
+ J.UNSELECT_CATEGORY,
880
+ J.TOGGLE_CATEGORY_VISIBILITY
881
+ ],
882
+ setup(e, { emit: t }) {
883
+ const o = (a) => {
884
+ e.isOptionDisabled(a) || t(J.TOGGLE_CHECKBOX_SELECTION, a);
885
+ }, s = (a) => !!a.items, r = (a) => {
886
+ const u = e.isMultiLevel && e.searching;
887
+ return a.description && (!e.isMultiLevel || u);
888
+ }, n = (a) => a.items ? !!a.items.find((u) => e.selectedItemsList.includes(u.value)) : e.selectedItemsList.includes(a.value), i = (a) => {
889
+ if (s(a)) {
890
+ const u = n(a) ? J.UNSELECT_CATEGORY : J.SELECT_CATEGORY;
891
+ t(u, a);
892
+ } else
893
+ o(a);
894
+ };
895
+ return {
896
+ // Values
897
+ conditionalClasses: b(() => ({
898
+ "b-listbox-multi-select-options__static-category-option": e.staticCategories,
899
+ "b-listbox-multi-select-options__category-option": e.categoryItems
900
+ })),
901
+ // Methods
902
+ isOptionSelected: n,
903
+ shouldShowDescription: r,
904
+ toggleCheckboxSelection: o,
905
+ toggleSearchOption: i,
906
+ computedTabindex: (a) => e.itemsIndex[a] === e.focusedIndex ? 0 : -1,
907
+ // Enums
908
+ BentoListboxEvent: p,
909
+ ListboxMultiSelectOptionsEvent: J
910
+ };
911
+ }
912
+ }), os = { class: "b-listbox-multi-select__option-text" }, is = { class: "b-listbox-multi-select__option-text" };
913
+ function as(e, t, o, s, r, n) {
914
+ const i = I("decorative-checkbox"), g = I("bento-typography"), S = I("bento-listbox-option"), a = I("listbox-multi-select-options", !0), u = I("listbox-multi-select-category");
915
+ return d(), y("div", null, [
916
+ (d(!0), y(te, null, j(e.items, (l) => (d(), y("div", {
917
+ key: `selected-${l.value}`
918
+ }, [
919
+ e.searching && e.isMultiLevel ? (d(), k(S, {
920
+ key: 0,
921
+ class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
922
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
923
+ tabindex: e.computedTabindex(l.value),
924
+ "aria-selected": `${e.isOptionSelected(l)}`,
925
+ "aria-checked": `${e.isOptionSelected(l)}`,
926
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
927
+ role: e.$attrs.role || "option",
928
+ onClick: (m) => e.toggleSearchOption(l),
929
+ onEnterPressed: (m) => e.toggleSearchOption(l),
930
+ onSpacePressed: ie((m) => e.toggleSearchOption(l), ["prevent"])
931
+ }, {
932
+ default: L(() => [
933
+ M(i, {
934
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
935
+ checked: e.isOptionSelected(l)
936
+ }, null, 8, ["disabled", "checked"]),
937
+ W(e.$slots, "default", w({ ref_for: !0 }, l), () => [
938
+ G("span", os, [
939
+ M(g, { el: "span" }, {
940
+ default: L(() => [
941
+ K(V(l.label), 1)
942
+ ]),
943
+ _: 2
944
+ }, 1024),
945
+ e.shouldShowDescription(l) ? (d(), k(g, {
946
+ key: 0,
947
+ class: "b-listbox-multi-select__option-description",
948
+ el: "span"
949
+ }, {
950
+ default: L(() => [
951
+ K(V(l.description), 1)
952
+ ]),
953
+ _: 2
954
+ }, 1024)) : q("", !0)
955
+ ])
956
+ ], !0)
957
+ ]),
958
+ _: 2
959
+ }, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"])) : (d(), y(te, { key: 1 }, [
960
+ l.items ? (d(), k(u, {
961
+ key: 0,
962
+ category: l,
963
+ "static-categories": e.staticCategories,
964
+ "is-option-disabled": e.isOptionDisabled,
965
+ "selected-items-list": e.selectedItemsList,
966
+ tabindex: e.computedTabindex(l.value),
967
+ onSelectCategory: (m) => e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l),
968
+ onUnselectCategory: (m) => e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l),
969
+ onToggleCategoryVisibility: t[1] || (t[1] = (m) => e.$emit(e.ListboxMultiSelectOptionsEvent.TOGGLE_CATEGORY_VISIBILITY, m))
970
+ }, {
971
+ default: L(() => [
972
+ M(a, {
973
+ "category-items": "",
974
+ items: l.items,
975
+ "is-option-disabled": e.isOptionDisabled,
976
+ "items-index": e.itemsIndex,
977
+ "focused-index": e.focusedIndex,
978
+ "is-multi-level": e.isMultiLevel,
979
+ "static-categories": e.staticCategories,
980
+ "selected-items-list": e.selectedItemsList,
981
+ searching: e.searching,
982
+ role: e.$attrs.role || "option",
983
+ onToggleCheckboxSelection: t[0] || (t[0] = (m) => e.toggleCheckboxSelection(m))
984
+ }, null, 8, ["items", "is-option-disabled", "items-index", "focused-index", "is-multi-level", "static-categories", "selected-items-list", "searching", "role"])
985
+ ]),
986
+ _: 2
987
+ }, 1032, ["category", "static-categories", "is-option-disabled", "selected-items-list", "tabindex", "onSelectCategory", "onUnselectCategory"])) : (d(), k(S, {
988
+ key: 1,
989
+ class: fe(["b-listbox-multi-select-options", e.conditionalClasses]),
990
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
991
+ tabindex: e.computedTabindex(l.value),
992
+ "aria-selected": `${e.isOptionSelected(l)}`,
993
+ "aria-checked": `${e.isOptionSelected(l)}`,
994
+ "aria-disabled": e.isOptionDisabled ? e.isOptionDisabled(l) : null,
995
+ role: e.$attrs.role || "option",
996
+ onClick: (m) => e.toggleCheckboxSelection(l),
997
+ onEnterPressed: (m) => e.toggleCheckboxSelection(l),
998
+ onSpacePressed: ie((m) => e.toggleCheckboxSelection(l), ["prevent"])
999
+ }, {
1000
+ default: L(() => [
1001
+ M(i, {
1002
+ disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
1003
+ checked: e.isOptionSelected(l)
1004
+ }, null, 8, ["disabled", "checked"]),
1005
+ W(e.$slots, "default", w({ ref_for: !0 }, l), () => [
1006
+ G("span", is, [
1007
+ M(g, { el: "span" }, {
1008
+ default: L(() => [
1009
+ K(V(l.label), 1)
1010
+ ]),
1011
+ _: 2
1012
+ }, 1024),
1013
+ e.shouldShowDescription(l) ? (d(), k(g, {
1014
+ key: 0,
1015
+ class: "b-listbox-multi-select__option-description",
1016
+ el: "span"
1017
+ }, {
1018
+ default: L(() => [
1019
+ K(V(l.description), 1)
1020
+ ]),
1021
+ _: 2
1022
+ }, 1024)) : q("", !0)
1023
+ ])
1024
+ ], !0)
1025
+ ]),
1026
+ _: 2
1027
+ }, 1032, ["class", "disabled", "tabindex", "aria-selected", "aria-checked", "aria-disabled", "role", "onClick", "onEnterPressed", "onSpacePressed"]))
1028
+ ], 64))
1029
+ ]))), 128))
1030
+ ]);
1031
+ }
1032
+ const ns = /* @__PURE__ */ H(ls, [["render", as], ["__scopeId", "data-v-237dfc58"]]), rs = (e) => {
1033
+ const t = b(() => !!e.value?.find(({ items: s }) => !!s)), o = b(() => t.value ? e.value?.reduce((s, r) => (r.items ? s.push(...r.items.flat()) : s.push(r), s), []) : e.value);
1034
+ return {
1035
+ isMultiLevelSelect: t,
1036
+ flattenedItemsList: o
1037
+ };
1038
+ }, je = {
1039
+ "en-US": { allSelected: "All selected ({total})", numberOfTotalSelected: "{number} of {total} selected", numbersSelected: "{number} selected", selectAll: "Select all ({total})" },
1040
+ "ja-JP": { allSelected: "すべて選択 ({total})", numberOfTotalSelected: "{number}/{total}件が選択されました", numbersSelected: "{number}件選択済み", selectAll: "すべて選択 ({total})" },
1041
+ "pt-BR": { allSelected: "Todos os selecionados ({total})", numberOfTotalSelected: "{number} de {total} selecionados", numbersSelected: "{number} selecionados", selectAll: "Selecionar tudo ({total})" }
1042
+ }, cs = { key: 0 }, ds = ["role"], us = {
1043
+ key: 1,
1044
+ class: "b-listbox-multi-select__divider",
1045
+ "aria-hidden": "true"
1046
+ }, bs = { i18n: { messages: je } }, ms = /* @__PURE__ */ X({
1047
+ ...bs,
1048
+ __name: "listbox-multi-select",
1049
+ props: {
1050
+ hasMoreItems: { type: Boolean, default: !1 },
1051
+ isOptionDisabled: { type: Function, default: () => !1 },
1052
+ items: {},
1053
+ lazyLoadType: { default: "none" },
1054
+ searching: { type: Boolean, default: !1 },
1055
+ selectedValues: {},
1056
+ staticCategories: { type: Boolean, default: !1 }
1057
+ },
1058
+ emits: ["select"],
1059
+ setup(e, { expose: t, emit: o }) {
1060
+ const s = e, r = o, { t: n, n: i } = _e({ messages: je }), g = mt(), S = pt(), a = b(
1061
+ () => ({
1062
+ "aria-label": S["aria-label"]?.toString(),
1063
+ "aria-busy": S["aria-busy"]?.toString(),
1064
+ "aria-atomic": S["aria-atomic"]?.toString(),
1065
+ "aria-live": S["aria-live"]?.toString(),
1066
+ "aria-multiselectable": !0
1067
+ })
1068
+ ), u = _(null), l = _(null), m = _(null), C = _(null), h = b(() => s.selectedValues.map(({ value: c }) => c)), { isMultiLevelSelect: R, flattenedItemsList: x } = rs(pe(s, "items")), A = b(() => R.value && !s.staticCategories), $ = b(() => A.value ? "tree" : "listbox"), T = b(() => A.value ? "treeitem" : "option"), O = (c) => {
1069
+ const f = s.isOptionDisabled(c), v = h.value?.includes(c.value) || !1;
1070
+ return { isDisabled: f, isPreSelected: v };
1071
+ }, D = b(() => {
1072
+ if (s.searching && R)
1073
+ return s.items;
1074
+ const c = x.value.filter((f) => {
1075
+ const { isDisabled: v, isPreSelected: N } = O(f);
1076
+ return v && N || !v;
1077
+ });
1078
+ return s.selectedValues.forEach((f) => {
1079
+ c.find((v) => v.value === f.value) || c.push(f);
1080
+ }), c;
1081
+ }), Y = b(
1082
+ () => D.value?.filter((c) => c.items && R.value && s.searching ? c.items.filter(
1083
+ (v) => (s.selectedValues ?? []).includes(v.value)
1084
+ ).length === c.items.length : h.value?.includes(c.value))
1085
+ ), re = () => R.value && !s.searching ? x.value.length : s.items.length, P = b(() => {
1086
+ const c = D.value.length, f = re(), v = Y.value?.length || 0;
1087
+ return v === 0 ? n("selectAll", { total: i(c) }) : v === f ? n("allSelected", { total: i(f) }) : v <= f ? n("numberOfTotalSelected", { number: i(v), total: i(f) }) : n("numbersSelected", { number: i(v) });
1088
+ }), U = (c) => {
1089
+ const f = (N) => {
1090
+ const { isDisabled: E, isPreSelected: ue } = O(N);
1091
+ return E && ue || !E;
1092
+ }, v = c.filter(f).filter((N) => !h.value.includes(N.value));
1093
+ r("select", [...s.selectedValues, ...v]);
1094
+ }, Z = (c) => {
1095
+ const f = (E) => {
1096
+ const { isDisabled: ue, isPreSelected: dt } = O(E);
1097
+ return !(ue && dt);
1098
+ }, v = c.filter(f).map(({ value: E }) => E), N = s.selectedValues.filter((E) => !v?.includes(E.value));
1099
+ r("select", N);
1100
+ }, Ee = () => {
1101
+ U(x.value);
1102
+ }, Oe = () => {
1103
+ Z(x.value);
1104
+ }, { isAllSelected: z, isIndeterminate: se, toggleSelectAll: qe } = Fe(
1105
+ Y,
1106
+ D,
1107
+ Ee,
1108
+ Oe
1109
+ ), ke = b(() => se.value ? "mixed" : `${z.value}`), ye = _(z.value), Te = () => {
1110
+ ye.value = !ye.value, qe(ye.value);
1111
+ };
1112
+ ge(z, () => {
1113
+ ye.value = z.value;
1114
+ });
1115
+ const Je = (c) => {
1116
+ U(c.items);
1117
+ }, Ae = (c) => {
1118
+ Z(c.items);
1119
+ }, ce = (c, f) => {
1120
+ let v = !1;
1121
+ const N = s.selectedValues.filter(({ value: E }) => f.value === E ? (v = !0, !1) : !0);
1122
+ v || N.push(f), r(c, N);
1123
+ }, Xe = b(() => {
1124
+ if (!R.value)
1125
+ return s.selectedValues;
1126
+ const c = (E) => h.value.includes(E.value), f = (E) => !s.staticCategories && E.every((ue) => c(ue));
1127
+ return s.items.flatMap(
1128
+ (E) => E.items && !f(E.items) ? E.items : E
1129
+ ).filter((E) => E.items ? !0 : c(E));
1130
+ }), Ze = b(() => {
1131
+ const c = ["automatic", "button"].includes(s.lazyLoadType), f = s.selectedValues?.length > 0 && Y.value?.length !== x.value?.length;
1132
+ return c && s.hasMoreItems ? !!s.selectedValues?.length : f;
1133
+ }), $e = b(() => ["automatic", "button"].includes(s.lazyLoadType) ? !s.hasMoreItems : !0), de = _([]), { visibleDomOptions: De, updateVisibleDomOptions: Qe } = We(
1134
+ u,
1135
+ pe(s, "items"),
1136
+ T
1137
+ ), et = (c) => {
1138
+ de.value.includes(c) ? de.value = de.value.filter((f) => f !== c) : de.value.push(c), Ue(() => {
1139
+ Qe();
1140
+ });
1141
+ }, tt = (c) => {
1142
+ De.value[c]?.focus();
1143
+ }, {
1144
+ moveToNextElement: st,
1145
+ moveToPreviousElement: lt,
1146
+ moveToFirstElement: ot,
1147
+ moveToLastElement: it,
1148
+ preventDefault: Be,
1149
+ focusedIndex: Re,
1150
+ setListboxFocusedIndex: at
1151
+ } = Ke(
1152
+ {
1153
+ items: De
1154
+ },
1155
+ tt
1156
+ ), nt = {
1157
+ [F.ARROW_UP]: (c) => lt(c),
1158
+ [F.ARROW_DOWN]: (c) => st(c),
1159
+ [F.HOME]: ot,
1160
+ [F.END]: it
1161
+ };
1162
+ t({
1163
+ /**
1164
+ * Method to set the index of the item to be focused on
1165
+ * Used for focus management to be kept in-sync with parent e.g. dropdowns
1166
+ */
1167
+ setListboxFocusedIndex: at
1168
+ });
1169
+ const rt = {
1170
+ [F.ARROW_UP]: Be,
1171
+ [F.ARROW_DOWN]: Be
1172
+ }, ct = b(() => {
1173
+ let c = 1;
1174
+ const f = {};
1175
+ return s.items.forEach((v) => {
1176
+ let N = de.value.includes(v.value);
1177
+ v.items ? (s.staticCategories ? N = !0 : f[v.value] = c++, N && v.items.forEach((E) => f[E.value] = c++)) : f[v.value] = c++;
1178
+ }), f;
1179
+ });
1180
+ return (c, f) => (d(), y("div", {
1181
+ ref_key: "listboxRef",
1182
+ ref: u,
1183
+ class: "b-listbox-multi-select"
1184
+ }, [
1185
+ Ze.value ? (d(), y("div", cs, [
1186
+ ae((d(), y("ul", w({ class: "b-listbox-multi-select__chips" }, ee(rt, !0)), [
1187
+ (d(!0), y(te, null, j(Xe.value, (v) => (d(), y("li", {
1188
+ key: v.value
1189
+ }, [
1190
+ M(B(Ct), {
1191
+ ref_for: !0,
1192
+ ref_key: "selectedListboxItemsRef",
1193
+ ref: m,
1194
+ disabled: c.isOptionDisabled(v),
1195
+ label: v.label,
1196
+ condensed: "",
1197
+ onClick: (N) => v.items ? Ae(v) : ce("select", v)
1198
+ }, null, 8, ["disabled", "label", "onClick"])
1199
+ ]))), 128))
1200
+ ], 16)), [
1201
+ [B(he)]
1202
+ ]),
1203
+ f[4] || (f[4] = G("hr", {
1204
+ class: "b-listbox-multi-select__divider",
1205
+ "aria-hidden": "true"
1206
+ }, null, -1))
1207
+ ])) : q("", !0),
1208
+ ae((d(), y("div", w(a.value, { role: $.value }, ee(nt, !0)), [
1209
+ $e.value ? (d(), k(B(Ce), {
1210
+ key: 0,
1211
+ ref_key: "selectAllListboxItemsRef",
1212
+ ref: l,
1213
+ class: "b-listbox-multi-select__option",
1214
+ tabindex: B(Re) === 0 ? 0 : -1,
1215
+ "aria-selected": ke.value !== "false",
1216
+ "aria-checked": ke.value,
1217
+ role: T.value,
1218
+ onClick: Te,
1219
+ onEnterPressed: Te,
1220
+ onSpacePressed: ie(Te, ["prevent"])
1221
+ }, {
1222
+ default: L(() => [
1223
+ M(B(Ie), {
1224
+ checked: B(z),
1225
+ indeterminate: B(se)
1226
+ }, null, 8, ["checked", "indeterminate"]),
1227
+ M(B(ne), { el: "span" }, {
1228
+ default: L(() => [
1229
+ K(V(P.value), 1)
1230
+ ]),
1231
+ _: 1
1232
+ })
1233
+ ]),
1234
+ _: 1
1235
+ }, 8, ["tabindex", "aria-selected", "aria-checked", "role"])) : q("", !0),
1236
+ $e.value ? (d(), y("hr", us)) : q("", !0),
1237
+ M(B(ns), {
1238
+ ref_key: "listboxItemsRef",
1239
+ ref: C,
1240
+ items: c.items,
1241
+ "is-option-disabled": c.isOptionDisabled,
1242
+ "is-multi-level": B(R),
1243
+ "static-categories": c.staticCategories,
1244
+ searching: c.searching,
1245
+ "selected-items-list": h.value,
1246
+ "focused-index": B(Re),
1247
+ "items-index": ct.value,
1248
+ role: T.value,
1249
+ onToggleCheckboxSelection: f[0] || (f[0] = (v) => ce("select", v)),
1250
+ onSelectCategory: Je,
1251
+ onUnselectCategory: Ae,
1252
+ onToggleCategoryVisibility: et,
1253
+ onSpacePressed: f[1] || (f[1] = (v) => ce(B(p).SPACE, v)),
1254
+ onTabPressed: f[2] || (f[2] = (v) => ce(B(p).TAB, v)),
1255
+ onEnterPressed: f[3] || (f[3] = (v) => ce(B(p).ENTER, v))
1256
+ }, ve({ _: 2 }, [
1257
+ j(B(g), (v, N) => ({
1258
+ name: N,
1259
+ fn: L((E) => [
1260
+ W(c.$slots, N, oe(me(E)), void 0, !0)
1261
+ ])
1262
+ }))
1263
+ ]), 1032, ["items", "is-option-disabled", "is-multi-level", "static-categories", "searching", "selected-items-list", "focused-index", "items-index", "role"])
1264
+ ], 16, ds)), [
1265
+ [B(he)]
1266
+ ])
1267
+ ], 512));
1268
+ }
1269
+ }), xe = /* @__PURE__ */ H(ms, [["__scopeId", "data-v-d170602c"]]), Ve = {
1270
+ "en-US": { loading: "Loading", showMore: "Show more" },
1271
+ "ja-JP": { loading: "読み込み中", showMore: "表示内容を増やす" },
1272
+ "pt-BR": { loading: "Carregando", showMore: "Mostrar mais" }
1273
+ }, ps = 36, vs = X({
1274
+ name: "bento-listbox",
1275
+ components: {
1276
+ BentoEmptyState: ft,
1277
+ BentoListboxSingleSelect: zt,
1278
+ BentoListboxMultiSelect: xe,
1279
+ BentoTypography: ne,
1280
+ BentoLoadingIndicator: vt,
1281
+ BentoLoadingButton: Tt
1282
+ },
1283
+ directives: { BentoKeyboardNavigationDirective: he },
1284
+ i18n: { messages: Ve },
1285
+ props: {
1286
+ /**
1287
+ * Defines a string value that labels an interactive element.
1288
+ */
1289
+ ariaLabel: { type: String, default: null },
1290
+ /**
1291
+ * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
1292
+ */
1293
+ emptyState: {
1294
+ type: Object,
1295
+ default: void 0
1296
+ },
1297
+ /**
1298
+ * Indicates whether there are more items to load
1299
+ */
1300
+ hasMoreItems: { type: Boolean, default: !1 },
1301
+ /**
1302
+ * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
1303
+ */
1304
+ id: { type: String, required: !0 },
1305
+ /**
1306
+ * Function that allows the options to be disabled
1307
+ *
1308
+ * @type {BentoListboxIsOptionDisabled}
1309
+ * @param {BentoListboxOptionItem} option - Listbox option object
1310
+ * @param {string} option.label - Option's label text
1311
+ * @param {string|number} option.value - Option's value
1312
+ * @param {unknown} option.data - Option's extra data to be passed to the default slot
1313
+ */
1314
+ isOptionDisabled: {
1315
+ type: Function,
1316
+ default: () => {
1317
+ }
1318
+ },
1319
+ /**
1320
+ * The option elements to populate the listbox with.
1321
+ * It must be an array of {@see BentoListboxOptionItem }
1322
+ * * @property {string} value.label - Text to be displayed in the option
1323
+ * * @property {string,number} value.value - Value of the option
1324
+ */
1325
+ items: {
1326
+ type: Array,
1327
+ required: !0
1328
+ },
1329
+ /**
1330
+ * Indicates if new options are lazy loading.
1331
+ */
1332
+ loading: { type: Boolean, default: !1 },
1333
+ /**
1334
+ * The type of `Lazy Load`.
1335
+ * Type "automatic" will enable infinite scrolling
1336
+ * Type "button" will enable lazy loading with "Show more" button
1337
+ */
1338
+ lazyLoadType: {
1339
+ type: String,
1340
+ default: le.NONE,
1341
+ validator: (e) => Object.values(le).includes(e)
1342
+ },
1343
+ /**
1344
+ * Indicates the listbox is loading filtered items.
1345
+ */
1346
+ componentLoading: { type: Boolean, default: !1 },
1347
+ /**
1348
+ * If enabled, the user will be able to select multiple items.
1349
+ */
1350
+ multiple: { type: Boolean, default: !1 },
1351
+ /**
1352
+ * If enabled, dropdown will display non-selectable, static categories
1353
+ */
1354
+ staticCategories: { type: Boolean, default: !1 },
1355
+ /**
1356
+ * Messaged displayed when no items are listed in the listbox
1357
+ */
1358
+ noResultsMessage: { type: String, required: !0 },
1359
+ /**
1360
+ * Flag that indicates that an external search it's being made
1361
+ * to filter out the items inside the the multi-select listbox
1362
+ *
1363
+ * If enabled, hides the "Select all" checkbox in "multiple" mode.
1364
+ */
1365
+ searching: xe.props.searching,
1366
+ /**
1367
+ * The `input` value.
1368
+ * Providing an empty string or empty array will select no options.
1369
+ * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1370
+ */
1371
+ selectedValue: {
1372
+ type: Array,
1373
+ default: () => []
1374
+ },
1375
+ /**
1376
+ * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1377
+ * The itemHeight function is used to calculate the height of rendered item given it's index.
1378
+ */
1379
+ virtualScroll: {
1380
+ type: [Boolean, Object],
1381
+ default: !1
1382
+ }
1383
+ },
1384
+ emits: [
1385
+ p.SELECT,
1386
+ p.SPACE,
1387
+ p.SHOW_MORE,
1388
+ p.ENTER,
1389
+ p.ESCAPE,
1390
+ p.TAB
1391
+ ],
1392
+ setup(e, { emit: t, slots: o }) {
1393
+ const s = _([]), r = pe(e, "items"), { t: n } = _e({ messages: Ve }), i = b(() => e.lazyLoadType !== le.AUTOMATIC), g = b(() => e.lazyLoadType === le.AUTOMATIC), S = () => typeof e?.virtualScroll == "object" && e?.virtualScroll?.itemHeight ? e.virtualScroll.itemHeight : ps, {
1394
+ containerRef: a,
1395
+ containerProps: u,
1396
+ onScroll: l,
1397
+ list: m,
1398
+ wrapperProps: C
1399
+ } = Lt(r, {
1400
+ itemHeight: S(),
1401
+ // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1402
+ disabled: e?.multiple || e?.virtualScroll === !1 || e?.lazyLoadType !== "none"
1403
+ }), h = b(
1404
+ () => e.componentLoading !== void 0 || i.value ? "true" : void 0
1405
+ ), R = b(
1406
+ () => i.value && e.loading || e.componentLoading ? "true" : "false"
1407
+ ), x = b(
1408
+ () => i.value || e.componentLoading !== void 0 ? "polite" : void 0
1409
+ ), A = b(
1410
+ () => ({
1411
+ "aria-label": e.ariaLabel,
1412
+ "aria-busy": R.value,
1413
+ "aria-atomic": h.value,
1414
+ "aria-live": x.value
1415
+ })
1416
+ ), $ = b(
1417
+ () => e.componentLoading ? {
1418
+ ...A.value,
1419
+ role: "alert"
1420
+ } : {}
1421
+ ), T = (z) => (se) => {
1422
+ t(z, se);
1423
+ }, O = () => {
1424
+ t(p.SHOW_MORE);
1425
+ }, D = gt(() => {
1426
+ const z = a.value;
1427
+ if (!z)
1428
+ return;
1429
+ const se = Math.round(z.scrollTop) + z.clientHeight >= z.scrollHeight;
1430
+ e.hasMoreItems && se && !e.loading && O();
1431
+ }), Y = () => {
1432
+ g.value ? D() : l();
1433
+ }, re = b(() => e.items?.length === 0), P = b(
1434
+ () => e.lazyLoadType === le.BUTTON && e.hasMoreItems
1435
+ ), U = b(
1436
+ () => e.loading ? Ne.LOADING : Ne.START
1437
+ ), Z = b(() => e.loading ? n("loading") : n("showMore")), Ee = b(() => ({
1438
+ ...e.emptyState,
1439
+ variant: "condensed"
1440
+ })), Oe = {
1441
+ [p.SELECT]: T(p.SELECT),
1442
+ [p.SPACE]: T(p.SPACE),
1443
+ [p.TAB]: T(p.TAB),
1444
+ [p.ENTER]: T(p.ENTER)
1445
+ };
1446
+ return {
1447
+ // Refs
1448
+ listboxRef: a,
1449
+ listboxItemRef: s,
1450
+ // a11y
1451
+ ariaAttributes: A,
1452
+ listboxContainerAttributes: $,
1453
+ // Values
1454
+ containerProps: u,
1455
+ isSearchResultEmpty: re,
1456
+ limitedEmptyStateProps: Ee,
1457
+ loadingButtonState: U,
1458
+ slots: o,
1459
+ shouldDisplayShowMoreButton: P,
1460
+ showMoreButtonText: Z,
1461
+ virtualisedItems: m,
1462
+ wrapperProps: C,
1463
+ // Enums
1464
+ BentoKeyboardNavigationKeyDownEvent: F,
1465
+ BentoListboxEvent: p,
1466
+ // Methods
1467
+ onListboxContainerScroll: Y,
1468
+ onOptionSelected: T,
1469
+ emitShowMore: O,
1470
+ listboxListeners: Oe
1471
+ };
1472
+ }
1473
+ }), fs = ["id"], gs = {
1474
+ key: 0,
1475
+ class: "b-listbox__loading-filtered-items"
1476
+ }, ys = {
1477
+ key: 1,
1478
+ class: "b-listbox__empty-search-message"
1479
+ }, Ss = {
1480
+ key: 2,
1481
+ class: "b-listbox__lazy-load"
1482
+ }, hs = {
1483
+ key: 3,
1484
+ class: "b-listbox__lazy-load"
1485
+ };
1486
+ function Cs(e, t, o, s, r, n) {
1487
+ const i = I("bento-loading-indicator"), g = I("bento-empty-state"), S = I("bento-typography"), a = I("bento-listbox-multi-select"), u = I("bento-listbox-single-select"), l = I("bento-loading-button"), m = ze("bento-keyboard-navigation-directive");
1488
+ return ae((d(), y("div", w({
1489
+ id: e.id,
1490
+ ref: "listboxRef",
1491
+ class: "b-listbox",
1492
+ tabindex: "-1"
1493
+ }, e.listboxContainerAttributes, {
1494
+ style: e.containerProps?.style,
1495
+ "data-testid": "listbox-container",
1496
+ onScroll: t[0] || (t[0] = (...C) => e.onListboxContainerScroll && e.onListboxContainerScroll(...C))
1497
+ }), [
1498
+ G("div", oe(me(e.wrapperProps)), [
1499
+ e.componentLoading ? (d(), y("div", gs, [
1500
+ M(i)
1501
+ ])) : e.isSearchResultEmpty ? (d(), y("div", ys, [
1502
+ e.emptyState ? (d(), k(g, oe(w({ key: 0 }, e.limitedEmptyStateProps)), null, 16)) : (d(), k(S, {
1503
+ key: 1,
1504
+ el: "span"
1505
+ }, {
1506
+ default: L(() => [
1507
+ K(V(e.noResultsMessage), 1)
1508
+ ]),
1509
+ _: 1
1510
+ }))
1511
+ ])) : (d(), y(te, { key: 2 }, [
1512
+ e.multiple ? (d(), k(a, w({
1513
+ key: 0,
1514
+ ref: "listboxItemRef",
1515
+ "has-more-items": e.hasMoreItems
1516
+ }, e.ariaAttributes, {
1517
+ items: e.items,
1518
+ "lazy-load-type": e.lazyLoadType,
1519
+ "static-categories": e.staticCategories,
1520
+ "selected-values": e.selectedValue,
1521
+ searching: e.searching,
1522
+ "is-option-disabled": e.isOptionDisabled
1523
+ }, ee(e.listboxListeners)), ve({ _: 2 }, [
1524
+ j(e.slots, (C, h) => ({
1525
+ name: h,
1526
+ fn: L((R) => [
1527
+ W(e.$slots, h, oe(me(R)), void 0, !0)
1528
+ ])
1529
+ }))
1530
+ ]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (d(), k(u, w({
1531
+ key: 1,
1532
+ ref: "listboxItemRef",
1533
+ items: e.virtualisedItems
1534
+ }, e.ariaAttributes, {
1535
+ "selected-value": e.selectedValue,
1536
+ "static-categories": e.staticCategories,
1537
+ "is-option-disabled": e.isOptionDisabled
1538
+ }, ee(e.listboxListeners)), ve({ _: 2 }, [
1539
+ j(e.slots, (C, h) => ({
1540
+ name: h,
1541
+ fn: L((R) => [
1542
+ W(e.$slots, h, oe(me(R)), void 0, !0)
1543
+ ])
1544
+ }))
1545
+ ]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
1546
+ e.shouldDisplayShowMoreButton ? (d(), y("div", Ss, [
1547
+ M(l, {
1548
+ state: e.loadingButtonState,
1549
+ variant: "secondary",
1550
+ onClickCapture: e.emitShowMore
1551
+ }, {
1552
+ default: L(() => [
1553
+ K(V(e.showMoreButtonText), 1)
1554
+ ]),
1555
+ _: 1
1556
+ }, 8, ["state", "onClickCapture"])
1557
+ ])) : e.loading ? (d(), y("div", hs, [
1558
+ M(i)
1559
+ ])) : q("", !0)
1560
+ ], 64))
1561
+ ], 16)
1562
+ ], 16, fs)), [
1563
+ [m]
1564
+ ]);
1565
+ }
1566
+ const Vs = /* @__PURE__ */ H(vs, [["render", Cs], ["__scopeId", "data-v-ef1c27fa"]]), Le = (e, t) => {
1567
+ for (const o of e) {
1568
+ if (o.value === t)
1569
+ return o;
1570
+ if (o.items) {
1571
+ const s = Le(o.items, t);
1572
+ if (s)
1573
+ return s;
1574
+ }
1575
+ }
1576
+ return null;
1577
+ }, Es = (e) => typeof e == "object" && e !== null && "value" in e && "label" in e, Ys = (e, t, o, s) => {
1578
+ const r = _([]), n = _(), i = (u) => {
1579
+ o.value ? n.value = u.map(({ value: l }) => l) : n.value = u.length > 0 ? u[0].value : null;
1580
+ }, g = (u) => {
1581
+ o.value ? n.value = u.map(({ value: l, label: m }) => ({ value: l, label: m })) : n.value = u.length > 0 ? { value: u[0].value, label: u[0].label } : null;
1582
+ }, S = (u) => {
1583
+ r.value = u, s?.value ? g(u) : i(u);
1584
+ }, a = () => {
1585
+ r.value = [], n.value = null;
1586
+ };
1587
+ return ge(
1588
+ () => t.value,
1589
+ () => {
1590
+ if (!t.value && t.value !== 0) {
1591
+ a();
1592
+ return;
1593
+ }
1594
+ const u = !Array.isArray(t.value), l = [...r.value];
1595
+ a();
1596
+ const m = (C) => {
1597
+ if (Es(C))
1598
+ r.value.push(C);
1599
+ else {
1600
+ let h = Le(e.value, C);
1601
+ h || (h = Le(l, C)), h || (h = { value: C, label: C.toString() }), r.value.push(h);
1602
+ }
1603
+ };
1604
+ if (u) {
1605
+ const C = t.value;
1606
+ m(C), s?.value ? g(r.value) : i(r.value);
1607
+ return;
1608
+ }
1609
+ t.value.forEach(m), s?.value ? g(r.value) : i(r.value);
1610
+ },
1611
+ { immediate: !0 }
1612
+ ), {
1613
+ // Values
1614
+ cachedSelectedListboxOptions: r,
1615
+ cachedListboxSelectedValues: n,
1616
+ // Methods
1617
+ resetCache: a,
1618
+ setCachedValues: S
1619
+ };
1620
+ };
1621
+ export {
1622
+ p as B,
1623
+ Nt as C,
1624
+ Ie as D,
1625
+ le as a,
1626
+ Vs as b,
1627
+ rs as c,
1628
+ We as d,
1629
+ Ys as u
1630
+ };
1631
+ //# sourceMappingURL=use-cached-selected-values.ClEJRFAd.js.map