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