@adyen/bento-vue2 1.50.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/dist/@types/index.d.ts +513 -608
  2. package/dist/accordion.js +1 -1
  3. package/dist/action-bar.js +1 -1
  4. package/dist/alert.js +1 -1
  5. package/dist/assets/accordion-item.css +1 -1
  6. package/dist/assets/action-bar.css +1 -1
  7. package/dist/assets/alert.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions-with-menu.css +1 -1
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/checkbox-input.css +1 -1
  13. package/dist/assets/checkbox.css +1 -1
  14. package/dist/assets/copy.css +1 -1
  15. package/dist/assets/data-grid.css +1 -1
  16. package/dist/assets/date-picker.css +1 -1
  17. package/dist/assets/date-range-picker.css +1 -1
  18. package/dist/assets/dialog-page.css +1 -1
  19. package/dist/assets/dropdown.css +1 -1
  20. package/dist/assets/file-uploader.css +1 -1
  21. package/dist/assets/filter-bar.css +1 -1
  22. package/dist/assets/form-layout-title.css +1 -1
  23. package/dist/assets/input-field-password.css +1 -1
  24. package/dist/assets/input-field-phone-number.css +1 -1
  25. package/dist/assets/input-field.css +1 -1
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/link.css +1 -1
  28. package/dist/assets/menu.css +1 -1
  29. package/dist/assets/modal-fullscreen.css +1 -1
  30. package/dist/assets/pagination.css +1 -1
  31. package/dist/assets/payment-method.css +1 -1
  32. package/dist/assets/popover.css +1 -1
  33. package/dist/assets/search-bar.css +1 -1
  34. package/dist/assets/sidepanel.css +1 -1
  35. package/dist/assets/timeline-item.css +1 -1
  36. package/dist/assets/tutorial.css +1 -1
  37. package/dist/assets/use-cached-selected-values.css +1 -1
  38. package/dist/button.js +3 -3
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +3 -3
  41. package/dist/chip.js +1 -1
  42. package/dist/chunks/{accordion-item.CTxrEQEW.js → accordion-item.C4tyRMCt.js} +2 -2
  43. package/dist/chunks/{accordion-item.CTxrEQEW.js.map → accordion-item.C4tyRMCt.js.map} +1 -1
  44. package/dist/chunks/{action-bar.CGJJrMpa.js → action-bar.DuJkjAt1.js} +7 -7
  45. package/dist/chunks/{action-bar.CGJJrMpa.js.map → action-bar.DuJkjAt1.js.map} +1 -1
  46. package/dist/chunks/{alert.hiTIDSeX.js → alert.BkMKX9wD.js} +15 -14
  47. package/dist/chunks/alert.BkMKX9wD.js.map +1 -0
  48. package/dist/chunks/{base-modal.8kcvtFRx.js → base-modal.CiTysydg.js} +6 -6
  49. package/dist/chunks/{base-modal.8kcvtFRx.js.map → base-modal.CiTysydg.js.map} +1 -1
  50. package/dist/chunks/button-actions-with-menu.B9oXYIgo.js +166 -0
  51. package/dist/chunks/button-actions-with-menu.B9oXYIgo.js.map +1 -0
  52. package/dist/chunks/{button-actions.BovYBINL.js → button-actions.DAvSJtOB.js} +4 -4
  53. package/dist/chunks/{button-actions.BovYBINL.js.map → button-actions.DAvSJtOB.js.map} +1 -1
  54. package/dist/chunks/{button.CdAFZa4V.js → button.D-3uUhuG.js} +2 -2
  55. package/dist/chunks/{button.CdAFZa4V.js.map → button.D-3uUhuG.js.map} +1 -1
  56. package/dist/chunks/calendar.Bq67h02Z.js +1130 -0
  57. package/dist/chunks/calendar.Bq67h02Z.js.map +1 -0
  58. package/dist/chunks/{card.D-w9c3-n.js → card.AQO_BjGb.js} +3 -3
  59. package/dist/chunks/{card.D-w9c3-n.js.map → card.AQO_BjGb.js.map} +1 -1
  60. package/dist/chunks/{checkbox-group.wa6Mtmxa.js → checkbox-group.CqSIn-lG.js} +4 -4
  61. package/dist/chunks/{checkbox-group.wa6Mtmxa.js.map → checkbox-group.CqSIn-lG.js.map} +1 -1
  62. package/dist/chunks/checkbox-input.CMhyJDdo.js +129 -0
  63. package/dist/chunks/checkbox-input.CMhyJDdo.js.map +1 -0
  64. package/dist/chunks/checkbox.BeYtbfPv.js +170 -0
  65. package/dist/chunks/checkbox.BeYtbfPv.js.map +1 -0
  66. package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js +24 -0
  67. package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js.map +1 -0
  68. package/dist/chunks/{checkmark-small.BtF8b2gE.js → checkmark-small.C8T8ISN6.js} +4 -4
  69. package/dist/chunks/checkmark-small.C8T8ISN6.js.map +1 -0
  70. package/dist/chunks/{chevron-left.PIu6yPqe.js → chevron-left.DOMTgGel.js} +6 -6
  71. package/dist/chunks/chevron-left.DOMTgGel.js.map +1 -0
  72. package/dist/chunks/{chevron-up.DVfo78kV.js → chevron-up.CSVyoaTy.js} +6 -6
  73. package/dist/chunks/chevron-up.CSVyoaTy.js.map +1 -0
  74. package/dist/chunks/{chip.HNUA9VZl.js → chip.BeK9uqmW.js} +24 -21
  75. package/dist/chunks/chip.BeK9uqmW.js.map +1 -0
  76. package/dist/chunks/{code-snippet.3s8WCnke.js → code-snippet.CW42FdpP.js} +7 -7
  77. package/dist/chunks/{code-snippet.3s8WCnke.js.map → code-snippet.CW42FdpP.js.map} +1 -1
  78. package/dist/chunks/{controls-group.BnDPMaGI.js → controls-group.D0_cJaFF.js} +2 -2
  79. package/dist/chunks/{controls-group.BnDPMaGI.js.map → controls-group.D0_cJaFF.js.map} +1 -1
  80. package/dist/chunks/{copy.DMlIj53I.js → copy.2iD8aI5a.js} +7 -6
  81. package/dist/chunks/copy.2iD8aI5a.js.map +1 -0
  82. package/dist/chunks/{cross-circle-fill-small.Oj6lPaDy.js → cross-circle-fill-small.YhLgeipP.js} +4 -4
  83. package/dist/chunks/cross-circle-fill-small.YhLgeipP.js.map +1 -0
  84. package/dist/chunks/cross-circle-fill.Ra0-PIUo.js +24 -0
  85. package/dist/chunks/cross-circle-fill.Ra0-PIUo.js.map +1 -0
  86. package/dist/chunks/{cross-small.BLUwtRB-.js → cross-small.CZqsjZDz.js} +4 -4
  87. package/dist/chunks/cross-small.CZqsjZDz.js.map +1 -0
  88. package/dist/chunks/{cross.CsUPDmaA.js → cross.CJ5EEL2c.js} +4 -4
  89. package/dist/chunks/cross.CJ5EEL2c.js.map +1 -0
  90. package/dist/chunks/{dashboard-section.BgyN5u0K.js → dashboard-section.Cmulh6WM.js} +4 -4
  91. package/dist/chunks/{dashboard-section.BgyN5u0K.js.map → dashboard-section.Cmulh6WM.js.map} +1 -1
  92. package/dist/chunks/{dashed-underline.Cvn5IoHT.js → dashed-underline.eMF75SuT.js} +3 -3
  93. package/dist/chunks/{dashed-underline.Cvn5IoHT.js.map → dashed-underline.eMF75SuT.js.map} +1 -1
  94. package/dist/chunks/{data-grid-template.DtWM0Tnu.js → data-grid-template.CdHnPE1-.js} +3 -3
  95. package/dist/chunks/{data-grid-template.DtWM0Tnu.js.map → data-grid-template.CdHnPE1-.js.map} +1 -1
  96. package/dist/chunks/{data-grid.N5Rxo6QB.js → data-grid.DedjAz4_.js} +38 -37
  97. package/dist/chunks/data-grid.DedjAz4_.js.map +1 -0
  98. package/dist/chunks/date-picker.BdMr3Sn2.js +235 -0
  99. package/dist/chunks/date-picker.BdMr3Sn2.js.map +1 -0
  100. package/dist/chunks/date-range-picker.BHfvD0GK.js +903 -0
  101. package/dist/chunks/date-range-picker.BHfvD0GK.js.map +1 -0
  102. package/dist/chunks/{date.YLIcAerL.js → date.dYFFEunA.js} +12 -12
  103. package/dist/chunks/{date.YLIcAerL.js.map → date.dYFFEunA.js.map} +1 -1
  104. package/dist/chunks/{dialog-page.Bf07JxdG.js → dialog-page.BfF5_hmG.js} +5 -4
  105. package/dist/chunks/dialog-page.BfF5_hmG.js.map +1 -0
  106. package/dist/chunks/{dot.BCX4w7eT.js → dot.CnkXzRn3.js} +4 -4
  107. package/dist/chunks/dot.CnkXzRn3.js.map +1 -0
  108. package/dist/chunks/{dropdown-default-textbox.CC9Z_RFG.js → dropdown-default-textbox.CDTdHfTv.js} +4 -4
  109. package/dist/chunks/{dropdown-default-textbox.CC9Z_RFG.js.map → dropdown-default-textbox.CDTdHfTv.js.map} +1 -1
  110. package/dist/chunks/{dropdown-tag.ClUMccWv.js → dropdown-tag.CvZ1jckk.js} +4 -4
  111. package/dist/chunks/{dropdown-tag.ClUMccWv.js.map → dropdown-tag.CvZ1jckk.js.map} +1 -1
  112. package/dist/chunks/{dropdown.CC1i41NX.js → dropdown.CcHoKbLz.js} +241 -232
  113. package/dist/chunks/dropdown.CcHoKbLz.js.map +1 -0
  114. package/dist/chunks/{empty-state.BnHTBgKG.js → empty-state.JbgxSrnv.js} +2 -2
  115. package/dist/chunks/{empty-state.BnHTBgKG.js.map → empty-state.JbgxSrnv.js.map} +1 -1
  116. package/dist/chunks/{error-message.xTNEaNn8.js → error-message.B1-ekAMa.js} +3 -3
  117. package/dist/chunks/{error-message.xTNEaNn8.js.map → error-message.B1-ekAMa.js.map} +1 -1
  118. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  119. package/dist/chunks/{expand.CwwKq7Uc.js → expand.C263WARj.js} +4 -4
  120. package/dist/chunks/expand.C263WARj.js.map +1 -0
  121. package/dist/chunks/{file-uploader.DTkxh9Ct.js → file-uploader.Dlfzh5QQ.js} +17 -16
  122. package/dist/chunks/file-uploader.Dlfzh5QQ.js.map +1 -0
  123. package/dist/chunks/{filter-bar.gj9sdW5T.js → filter-bar.CwqoJGiK.js} +735 -844
  124. package/dist/chunks/filter-bar.CwqoJGiK.js.map +1 -0
  125. package/dist/chunks/{fixed-scroller.DX2YUuoU.js → fixed-scroller.BwvXYzE6.js} +3 -3
  126. package/dist/chunks/{fixed-scroller.DX2YUuoU.js.map → fixed-scroller.BwvXYzE6.js.map} +1 -1
  127. package/dist/chunks/{focus-trap._RrLaKlq.js → focus-trap.CWlKh48z.js} +2 -2
  128. package/dist/chunks/{focus-trap._RrLaKlq.js.map → focus-trap.CWlKh48z.js.map} +1 -1
  129. package/dist/chunks/{footer-actions.BsoofCrv.js → footer-actions.BkHpWa7A.js} +3 -3
  130. package/dist/chunks/{footer-actions.BsoofCrv.js.map → footer-actions.BkHpWa7A.js.map} +1 -1
  131. package/dist/chunks/{form-layout-title.CJbgfh3P.js → form-layout-title.DK1-01RH.js} +50 -47
  132. package/dist/chunks/form-layout-title.DK1-01RH.js.map +1 -0
  133. package/dist/chunks/header.BAKjEGmH.js +183 -0
  134. package/dist/chunks/header.BAKjEGmH.js.map +1 -0
  135. package/dist/chunks/{index.CU8GKq4C.js → index.-wO_BQCb.js} +2 -1
  136. package/dist/chunks/{index.CU8GKq4C.js.map → index.-wO_BQCb.js.map} +1 -1
  137. package/dist/chunks/index.BDuTpjD8.js +40 -0
  138. package/dist/chunks/index.BDuTpjD8.js.map +1 -0
  139. package/dist/chunks/index.BxBB1rsx.js +15 -0
  140. package/dist/chunks/index.BxBB1rsx.js.map +1 -0
  141. package/dist/chunks/index.DD7TppDb.js +10 -0
  142. package/dist/chunks/index.DD7TppDb.js.map +1 -0
  143. package/dist/chunks/{info-icon-with-popover.B0zJWJZn.js → info-icon-with-popover.CxXWP4TR.js} +3 -3
  144. package/dist/chunks/{info-icon-with-popover.B0zJWJZn.js.map → info-icon-with-popover.CxXWP4TR.js.map} +1 -1
  145. package/dist/chunks/{info-icon.C4_l0WAf.js → info-icon.D3neDWqH.js} +4 -4
  146. package/dist/chunks/{info-icon.C4_l0WAf.js.map → info-icon.D3neDWqH.js.map} +1 -1
  147. package/dist/chunks/info.4d_mJHvT.js +24 -0
  148. package/dist/chunks/info.4d_mJHvT.js.map +1 -0
  149. package/dist/chunks/{input-field-password.PU9SY4FC.js → input-field-password.CO0lAgMh.js} +73 -70
  150. package/dist/chunks/input-field-password.CO0lAgMh.js.map +1 -0
  151. package/dist/chunks/{input-field-phone-number.D2juJ9ZD.js → input-field-phone-number.TXnK0dch.js} +324 -321
  152. package/dist/chunks/{input-field-phone-number.D2juJ9ZD.js.map → input-field-phone-number.TXnK0dch.js.map} +1 -1
  153. package/dist/chunks/input-field.De4sp76g.js +152 -0
  154. package/dist/chunks/input-field.De4sp76g.js.map +1 -0
  155. package/dist/chunks/{inspector.types.BtgXpTC7.js → inspector.types.ClnPOYmb.js} +6 -6
  156. package/dist/chunks/{inspector.types.BtgXpTC7.js.map → inspector.types.ClnPOYmb.js.map} +1 -1
  157. package/dist/chunks/{layout-row.CHwDU8yK.js → layout-row.dh2VyGoD.js} +2 -2
  158. package/dist/chunks/{layout-row.CHwDU8yK.js.map → layout-row.dh2VyGoD.js.map} +1 -1
  159. package/dist/chunks/{link.DZlbzVSB.js → link.BH3eB_7E.js} +4 -3
  160. package/dist/chunks/link.BH3eB_7E.js.map +1 -0
  161. package/dist/chunks/{listbox-option-tag.BJBWnC2r.js → listbox-option-tag.xGQr3Su1.js} +2 -2
  162. package/dist/chunks/{listbox-option-tag.BJBWnC2r.js.map → listbox-option-tag.xGQr3Su1.js.map} +1 -1
  163. package/dist/chunks/{menu.BC7ynpgF.js → menu.li3Kg9Uq.js} +227 -194
  164. package/dist/chunks/menu.li3Kg9Uq.js.map +1 -0
  165. package/dist/chunks/{modal-fullscreen.Dz3kSuTz.js → modal-fullscreen.C4eL63TC.js} +6 -6
  166. package/dist/chunks/{modal-fullscreen.Dz3kSuTz.js.map → modal-fullscreen.C4eL63TC.js.map} +1 -1
  167. package/dist/chunks/{modal.DV55hSPn.js → modal.BpDz0Dhc.js} +5 -5
  168. package/dist/chunks/{modal.DV55hSPn.js.map → modal.BpDz0Dhc.js.map} +1 -1
  169. package/dist/chunks/{pagination.CT-h2q0J.js → pagination.FuELftBG.js} +6 -5
  170. package/dist/chunks/pagination.FuELftBG.js.map +1 -0
  171. package/dist/chunks/payment-method.NZKiNOmM.js +76 -0
  172. package/dist/chunks/payment-method.NZKiNOmM.js.map +1 -0
  173. package/dist/chunks/{popover.CRdrSmFW.js → popover.Cb6utVhS.js} +29 -22
  174. package/dist/chunks/{popover.CRdrSmFW.js.map → popover.Cb6utVhS.js.map} +1 -1
  175. package/dist/chunks/{popper-container.CsW4R0-t.js → popper-container.CiEkF7eb.js} +356 -352
  176. package/dist/chunks/popper-container.CiEkF7eb.js.map +1 -0
  177. package/dist/chunks/{promo-banner.BNXfyv3h.js → promo-banner.PnHud5Wi.js} +3 -3
  178. package/dist/chunks/{promo-banner.BNXfyv3h.js.map → promo-banner.PnHud5Wi.js.map} +1 -1
  179. package/dist/chunks/{radio-group.CUgib4vp.js → radio-group._8PsjPCZ.js} +4 -4
  180. package/dist/chunks/{radio-group.CUgib4vp.js.map → radio-group._8PsjPCZ.js.map} +1 -1
  181. package/dist/chunks/{refresh.BKI9WwKh.js → refresh.Bc9FzGjJ.js} +4 -4
  182. package/dist/chunks/refresh.Bc9FzGjJ.js.map +1 -0
  183. package/dist/chunks/{search-bar.bMOGN8_E.js → search-bar.CVY2e8_B.js} +28 -46
  184. package/dist/chunks/search-bar.CVY2e8_B.js.map +1 -0
  185. package/dist/chunks/search.DLtglc02.js +24 -0
  186. package/dist/chunks/search.DLtglc02.js.map +1 -0
  187. package/dist/chunks/{secondary-nav.C9sm93do.js → secondary-nav.LxcuTR16.js} +3 -3
  188. package/dist/chunks/{secondary-nav.C9sm93do.js.map → secondary-nav.LxcuTR16.js.map} +1 -1
  189. package/dist/chunks/{segmented-control.BxCcPbKd.js → segmented-control.D69WXQGh.js} +2 -2
  190. package/dist/chunks/{segmented-control.BxCcPbKd.js.map → segmented-control.D69WXQGh.js.map} +1 -1
  191. package/dist/chunks/{selection-card-group.0O3gmtoi.js → selection-card-group.MTKkCBeK.js} +11 -11
  192. package/dist/chunks/{selection-card-group.0O3gmtoi.js.map → selection-card-group.MTKkCBeK.js.map} +1 -1
  193. package/dist/chunks/{show.IEAxtCB7.js → show.e4LEpZKG.js} +6 -6
  194. package/dist/chunks/show.e4LEpZKG.js.map +1 -0
  195. package/dist/chunks/{sidepanel.Dp6dKRnq.js → sidepanel.BStCbRqN.js} +6 -6
  196. package/dist/chunks/{sidepanel.Dp6dKRnq.js.map → sidepanel.BStCbRqN.js.map} +1 -1
  197. package/dist/chunks/{step.DrP2Frvn.js → step.CuOpi-Ye.js} +3 -3
  198. package/dist/chunks/{step.DrP2Frvn.js.map → step.CuOpi-Ye.js.map} +1 -1
  199. package/dist/chunks/{structured-list-item.DrY71Ndc.js → structured-list-item.CeosjL40.js} +6 -6
  200. package/dist/chunks/{structured-list-item.DrY71Ndc.js.map → structured-list-item.CeosjL40.js.map} +1 -1
  201. package/dist/chunks/{summary-grid-item-custom.CXs6AMS4.js → summary-grid-item-custom.CF_TS7oA.js} +4 -4
  202. package/dist/chunks/{summary-grid-item-custom.CXs6AMS4.js.map → summary-grid-item-custom.CF_TS7oA.js.map} +1 -1
  203. package/dist/chunks/{tabs.5zgaD1k3.js → tabs.UFoTqvew.js} +2 -2
  204. package/dist/chunks/{tabs.5zgaD1k3.js.map → tabs.UFoTqvew.js.map} +1 -1
  205. package/dist/chunks/{tag.CevG31iQ.js → tag.OgtZ3-ql.js} +2 -2
  206. package/dist/chunks/{tag.CevG31iQ.js.map → tag.OgtZ3-ql.js.map} +1 -1
  207. package/dist/chunks/{textarea.DHbXaxdU.js → textarea.BEISPJua.js} +4 -4
  208. package/dist/chunks/{textarea.DHbXaxdU.js.map → textarea.BEISPJua.js.map} +1 -1
  209. package/dist/chunks/{timeline-item.C4HOsaEG.js → timeline-item.BeWMuM8A.js} +15 -13
  210. package/dist/chunks/timeline-item.BeWMuM8A.js.map +1 -0
  211. package/dist/chunks/{toast.C5I7Wsfa.js → toast.DqSWycRO.js} +3 -3
  212. package/dist/chunks/{toast.C5I7Wsfa.js.map → toast.DqSWycRO.js.map} +1 -1
  213. package/dist/chunks/{toggle-button.DK4H4sHT.js → toggle-button.DgSFugBP.js} +2 -2
  214. package/dist/chunks/{toggle-button.DK4H4sHT.js.map → toggle-button.DgSFugBP.js.map} +1 -1
  215. package/dist/chunks/{toggle.CyaY0U0K.js → toggle.Q52IIKfi.js} +2 -2
  216. package/dist/chunks/{toggle.CyaY0U0K.js.map → toggle.Q52IIKfi.js.map} +1 -1
  217. package/dist/chunks/{tooltip.Bu8o7uyZ.js → tooltip.RPURZd36.js} +2 -2
  218. package/dist/chunks/{tooltip.Bu8o7uyZ.js.map → tooltip.RPURZd36.js.map} +1 -1
  219. package/dist/chunks/{tutorial.BbQox1EZ.js → tutorial.Ba8PTa0x.js} +10 -9
  220. package/dist/chunks/tutorial.Ba8PTa0x.js.map +1 -0
  221. package/dist/chunks/use-cached-selected-values.CxlYYUbd.js +1164 -0
  222. package/dist/chunks/use-cached-selected-values.CxlYYUbd.js.map +1 -0
  223. package/dist/chunks/{warning-filled.CLKRzGMT.js → warning-filled.Cd0kVWwa.js} +4 -4
  224. package/dist/chunks/warning-filled.Cd0kVWwa.js.map +1 -0
  225. package/dist/code-snippet.js +1 -1
  226. package/dist/dashboard-template.js +1 -1
  227. package/dist/dashed-underline.js +1 -1
  228. package/dist/data-grid-template.js +1 -1
  229. package/dist/data-grid.js +1 -1
  230. package/dist/date-picker.js +2 -2
  231. package/dist/date-range-picker.js +2 -2
  232. package/dist/date.js +1 -1
  233. package/dist/dropdown.js +4 -4
  234. package/dist/empty-state.js +1 -1
  235. package/dist/file-uploader.js +1 -1
  236. package/dist/filter-bar.js +1 -1
  237. package/dist/focus-trap.js +1 -1
  238. package/dist/form-layout.js +1 -1
  239. package/dist/header.js +1 -1
  240. package/dist/index.js +61 -61
  241. package/dist/info-icon.js +1 -1
  242. package/dist/input-field-password.js +1 -1
  243. package/dist/input-field-phone-number.js +1 -1
  244. package/dist/input-field.js +1 -1
  245. package/dist/inspector.js +1 -1
  246. package/dist/internal.js +35 -33
  247. package/dist/layout.js +1 -1
  248. package/dist/link.js +1 -1
  249. package/dist/menu.js +1 -1
  250. package/dist/modal-fullscreen.js +1 -1
  251. package/dist/modal.js +2 -2
  252. package/dist/pagination.js +1 -1
  253. package/dist/payment-method.js +1 -1
  254. package/dist/popover.js +1 -1
  255. package/dist/popper-container.js +1 -1
  256. package/dist/promo-banner.js +1 -1
  257. package/dist/radio-group.js +1 -1
  258. package/dist/search-bar.js +2 -2
  259. package/dist/secondary-nav.js +1 -1
  260. package/dist/segmented-control.js +1 -1
  261. package/dist/selection-card.js +1 -1
  262. package/dist/sidepanel.js +1 -1
  263. package/dist/stepper.js +1 -1
  264. package/dist/structured-list.js +1 -1
  265. package/dist/styles/bento-dark.css +30 -4
  266. package/dist/styles/bento-light.css +30 -4
  267. package/dist/styles/bento.css +30 -4
  268. package/dist/styles/legacy.css +32 -6
  269. package/dist/styles/styleguide.css +30 -4
  270. package/dist/styles/utility.css +2 -2
  271. package/dist/summary-grid.js +1 -1
  272. package/dist/tabs.js +1 -1
  273. package/dist/tag.js +1 -1
  274. package/dist/textarea.js +1 -1
  275. package/dist/timeline.js +1 -1
  276. package/dist/toast.js +1 -1
  277. package/dist/toggle.js +1 -1
  278. package/dist/tutorial.js +1 -1
  279. package/dist/web-types.json +512 -195
  280. package/package.json +6 -6
  281. package/dist/chunks/alert.hiTIDSeX.js.map +0 -1
  282. package/dist/chunks/button-actions-with-menu.C5OE7oOu.js +0 -112
  283. package/dist/chunks/button-actions-with-menu.C5OE7oOu.js.map +0 -1
  284. package/dist/chunks/calendar.Bb0-Svhx.js +0 -888
  285. package/dist/chunks/calendar.Bb0-Svhx.js.map +0 -1
  286. package/dist/chunks/checkbox-input.Bo4NxNOh.js +0 -127
  287. package/dist/chunks/checkbox-input.Bo4NxNOh.js.map +0 -1
  288. package/dist/chunks/checkbox.BPvnJrvd.js +0 -162
  289. package/dist/chunks/checkbox.BPvnJrvd.js.map +0 -1
  290. package/dist/chunks/checkmark-circle-fill.Cn7JN_Tk.js +0 -24
  291. package/dist/chunks/checkmark-circle-fill.Cn7JN_Tk.js.map +0 -1
  292. package/dist/chunks/checkmark-small.BtF8b2gE.js.map +0 -1
  293. package/dist/chunks/chevron-left.PIu6yPqe.js.map +0 -1
  294. package/dist/chunks/chevron-up.DVfo78kV.js.map +0 -1
  295. package/dist/chunks/chip.HNUA9VZl.js.map +0 -1
  296. package/dist/chunks/copy.DMlIj53I.js.map +0 -1
  297. package/dist/chunks/cross-circle-fill-small.Oj6lPaDy.js.map +0 -1
  298. package/dist/chunks/cross-circle-fill.CnYH4R_h.js +0 -24
  299. package/dist/chunks/cross-circle-fill.CnYH4R_h.js.map +0 -1
  300. package/dist/chunks/cross-small.BLUwtRB-.js.map +0 -1
  301. package/dist/chunks/cross.CsUPDmaA.js.map +0 -1
  302. package/dist/chunks/data-grid.N5Rxo6QB.js.map +0 -1
  303. package/dist/chunks/date-picker.Byv5Z-Xj.js +0 -213
  304. package/dist/chunks/date-picker.Byv5Z-Xj.js.map +0 -1
  305. package/dist/chunks/date-range-picker.CUS9Q53T.js +0 -884
  306. package/dist/chunks/date-range-picker.CUS9Q53T.js.map +0 -1
  307. package/dist/chunks/dialog-page.Bf07JxdG.js.map +0 -1
  308. package/dist/chunks/dot.BCX4w7eT.js.map +0 -1
  309. package/dist/chunks/dropdown.CC1i41NX.js.map +0 -1
  310. package/dist/chunks/expand.CwwKq7Uc.js.map +0 -1
  311. package/dist/chunks/file-uploader.DTkxh9Ct.js.map +0 -1
  312. package/dist/chunks/filter-bar.gj9sdW5T.js.map +0 -1
  313. package/dist/chunks/form-layout-title.CJbgfh3P.js.map +0 -1
  314. package/dist/chunks/header.5rAXro_L.js +0 -205
  315. package/dist/chunks/header.5rAXro_L.js.map +0 -1
  316. package/dist/chunks/index.CrhTVr5J.js +0 -10
  317. package/dist/chunks/index.CrhTVr5J.js.map +0 -1
  318. package/dist/chunks/index.DDnf1O9p.js +0 -22
  319. package/dist/chunks/index.DDnf1O9p.js.map +0 -1
  320. package/dist/chunks/index.DPafeRJa.js +0 -10
  321. package/dist/chunks/index.DPafeRJa.js.map +0 -1
  322. package/dist/chunks/info.CyeBsLgt.js +0 -24
  323. package/dist/chunks/info.CyeBsLgt.js.map +0 -1
  324. package/dist/chunks/input-field-password.PU9SY4FC.js.map +0 -1
  325. package/dist/chunks/input-field.BPbe00eB.js +0 -236
  326. package/dist/chunks/input-field.BPbe00eB.js.map +0 -1
  327. package/dist/chunks/link.DZlbzVSB.js.map +0 -1
  328. package/dist/chunks/menu.BC7ynpgF.js.map +0 -1
  329. package/dist/chunks/pagination.CT-h2q0J.js.map +0 -1
  330. package/dist/chunks/payment-method.Bu76jY3c.js +0 -59
  331. package/dist/chunks/payment-method.Bu76jY3c.js.map +0 -1
  332. package/dist/chunks/popper-container.CsW4R0-t.js.map +0 -1
  333. package/dist/chunks/refresh.BKI9WwKh.js.map +0 -1
  334. package/dist/chunks/search-bar.bMOGN8_E.js.map +0 -1
  335. package/dist/chunks/search.CBKhp7zB.js +0 -24
  336. package/dist/chunks/search.CBKhp7zB.js.map +0 -1
  337. package/dist/chunks/show.IEAxtCB7.js.map +0 -1
  338. package/dist/chunks/timeline-item.C4HOsaEG.js.map +0 -1
  339. package/dist/chunks/truncate.BfIl_-71.js +0 -8
  340. package/dist/chunks/truncate.BfIl_-71.js.map +0 -1
  341. package/dist/chunks/tutorial.BbQox1EZ.js.map +0 -1
  342. package/dist/chunks/use-cached-selected-values.a_5Iw6Dh.js +0 -1305
  343. package/dist/chunks/use-cached-selected-values.a_5Iw6Dh.js.map +0 -1
  344. package/dist/chunks/warning-filled.CLKRzGMT.js.map +0 -1
  345. /package/dist/assets/{cross.css → main.css} +0 -0
@@ -1,1305 +0,0 @@
1
- import { computed as r, ref as O, onMounted as te, onUnmounted as _e, watch as se, defineComponent as $, toRef as G } from "vue";
2
- import { B as w } from "./typography.J1v_SPG3.js";
3
- import { B as ge } from "./loading-indicator.z8COalOc.js";
4
- import { B as ye } from "./empty-state.BnHTBgKG.js";
5
- import { u as Y } from "./i18n.BQkEbtPM.js";
6
- import { d as pe } from "./debounce.DUTu11PS.js";
7
- import { B as X } from "./checkbox.BPvnJrvd.js";
8
- import "./index.Cl4_42j5.js";
9
- import { B as Ce } from "./base-button.-gx_u8Bd.js";
10
- import { C as Se } from "./cross-small.BLUwtRB-.js";
11
- import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
- import { C as he, a as xe } from "./chevron-up.DVfo78kV.js";
13
- import { B as k, a as J } from "./keyboard-navigation.pB8weElW.js";
14
- import { d as Ee, e as Z } from "./button-actions.BovYBINL.js";
15
- import { o as Le } from "./resize.Bqks3WUm.js";
16
- import "../assets/use-cached-selected-values.css";
17
- const le = (t, e, s, l) => {
18
- const n = r(
19
- () => {
20
- var d, c;
21
- return !!((d = t.value) != null && d.length) && ((c = t.value) == null ? void 0 : c.length) === e.value.length;
22
- }
23
- ), a = r(() => {
24
- var d;
25
- return t.value == null || t.value.length === 0 ? !1 : ((d = t.value) == null ? void 0 : d.length) !== e.value.length;
26
- });
27
- return {
28
- isAllSelected: n,
29
- isIndeterminate: a,
30
- toggleSelectAll: (d) => {
31
- d ? s() : l();
32
- }
33
- };
34
- };
35
- function Oe(t, { disabled: e, itemHeight: s, overscan: l = 5, prefixHeight: n }) {
36
- const a = O(null), o = O([]), d = O(0), c = O(0), b = O(0);
37
- let E;
38
- const C = r(() => {
39
- const m = typeof s == "number" ? t.value.length * s : t.value.reduce((L, _, h) => L + s(h), 0), g = typeof s == "number" ? d.value * s : t.value.slice(0, d.value).reduce((L, _, h) => L + s(h), 0);
40
- return {
41
- style: {
42
- marginTop: `${g}px`,
43
- height: `${m - g}px`
44
- }
45
- };
46
- }), S = () => {
47
- const m = (n == null ? void 0 : n.value) ?? 0, g = Math.max(a.value.scrollTop - m, 0);
48
- if (typeof s == "number")
49
- return Math.floor(g / s);
50
- let L = 0, _ = 0;
51
- for (let h = 0; h < t.value.length; h += 1) {
52
- const A = s(h);
53
- if (L += A, L >= g) {
54
- _ = h;
55
- break;
56
- }
57
- }
58
- return _;
59
- }, B = () => {
60
- if (b.value = a.value.clientHeight, typeof s == "number")
61
- return Math.ceil(b.value / s);
62
- const m = d.value ?? 0;
63
- let g = 0, L = 0;
64
- for (let _ = m; _ < t.value.length; _ += 1) {
65
- const h = s(_);
66
- if (g += h, L = _, g > b.value)
67
- break;
68
- }
69
- return L - m;
70
- }, T = () => {
71
- if (a.value) {
72
- const m = B();
73
- d.value = S(), c.value = Math.min(d.value + m + l, t.value.length), o.value = t.value.slice(d.value, c.value);
74
- }
75
- }, R = () => {
76
- T();
77
- };
78
- e || (te(() => {
79
- a.value && (b.value = a.value.clientHeight, E = Le(a.value, ({ clientHeight: m }) => {
80
- b.value = m, T();
81
- }), T());
82
- }), _e(() => {
83
- E == null || E.disconnect();
84
- }), se(
85
- () => t.value,
86
- () => {
87
- T();
88
- }
89
- ));
90
- const f = {
91
- ref: a,
92
- style: { overflowY: "auto" }
93
- };
94
- return e ? {
95
- containerRef: a,
96
- containerProps: f,
97
- // eslint-disable-next-line @typescript-eslint/no-empty-function
98
- onScroll: () => {
99
- },
100
- list: t
101
- } : {
102
- containerRef: a,
103
- containerProps: f,
104
- onScroll: R,
105
- list: o,
106
- wrapperProps: C
107
- };
108
- }
109
- var i = /* @__PURE__ */ ((t) => (t.SELECT = "select", t.SHOW_MORE = "show-more", t.ESCAPE = "escape-pressed", t.CLICK = "click", t.ENTER = "enter-pressed", t.SPACE = "space-pressed", t.TAB = "tab-pressed", t.CLOSE_DROPDOWN = "close-dropdown", t))(i || {}), P = /* @__PURE__ */ ((t) => (t.AUTOMATIC = "automatic", t.BUTTON = "button", t.NONE = "none", t))(P || {});
110
- const Te = $({
111
- name: "bento-listbox-static-category",
112
- components: {
113
- BentoTypography: w
114
- },
115
- props: {
116
- /**
117
- * Category label text
118
- */
119
- categoryLabel: {
120
- type: String,
121
- required: !0
122
- }
123
- }
124
- });
125
- var Ie = function() {
126
- var e = this, s = e._self._c;
127
- return e._self._setupProxy, s("div", { staticClass: "b-listbox-single-select-category" }, [s("bento-typography", { staticClass: "b-listbox-single-select-category__label-text", attrs: { variant: "caption", el: "span" } }, [e._v(" " + e._s(e.categoryLabel) + " ")]), s("div", [e._t("default")], 2)], 1);
128
- }, Ae = [], Re = /* @__PURE__ */ D(
129
- Te,
130
- Ie,
131
- Ae,
132
- !1,
133
- null,
134
- "4aa8cc6e"
135
- );
136
- const Be = Re.exports, ke = $({
137
- name: "bento-listbox-option",
138
- props: {
139
- /**
140
- * Setting this property to true will disable the option.
141
- */
142
- disabled: { type: Boolean, default: !1 },
143
- /**
144
- * Indicates if the value is selected. Only one element can be selected at a time.
145
- */
146
- selected: { type: Boolean, default: !1 }
147
- },
148
- emits: [i.CLICK, i.ENTER, i.SPACE, i.TAB],
149
- setup(t, { emit: e }) {
150
- const s = r(() => ({
151
- "b-listbox-option--disabled": t.disabled,
152
- "b-listbox-option--selected": t.selected
153
- }));
154
- return {
155
- // Enums
156
- BentoKeyboardNavigationKeyDownEvent: k,
157
- BentoListboxEvent: i,
158
- // Values
159
- conditionalClasses: s,
160
- // Events
161
- onClick: (a) => {
162
- e(i.CLICK, a);
163
- },
164
- onOptionSelected: (a, o) => {
165
- e(a, o);
166
- }
167
- };
168
- }
169
- });
170
- var De = function() {
171
- var e = this, s = e._self._c;
172
- return e._self._setupProxy, s("label", e._b({ staticClass: "b-listbox-option", class: e.conditionalClasses, attrs: { role: "option" }, on: { click: e.onClick, keydown: [function(l) {
173
- return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onOptionSelected(e.BentoListboxEvent.ENTER, l);
174
- }, function(l) {
175
- return !l.type.indexOf("key") && e._k(l.keyCode, "space", 32, l.key, [" ", "Spacebar"]) ? null : e.onOptionSelected(e.BentoListboxEvent.SPACE, l);
176
- }, function(l) {
177
- return !l.type.indexOf("key") && e._k(l.keyCode, "tab", 9, l.key, "Tab") ? null : e.onOptionSelected(e.BentoListboxEvent.TAB, l);
178
- }] } }, "label", e.$attrs, !1), [e._t("default")], 2);
179
- }, $e = [], Me = /* @__PURE__ */ D(
180
- ke,
181
- De,
182
- $e,
183
- !1,
184
- null,
185
- "d7fb415c"
186
- );
187
- const q = Me.exports;
188
- let Q = 0;
189
- const Ne = {
190
- beforeCreate() {
191
- this.uuid = Q.toString(), Q += 1;
192
- }
193
- };
194
- var Pe = function() {
195
- var e = this, s = e._self._c;
196
- return s("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? s("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), s("path", { attrs: { fill: "#00112C", d: "M15.0608 4.00011L14.0001 2.93945L6.00011 10.9395L2.00011 6.93945L0.939453 8.00011L6.00011 13.0608L15.0608 4.00011Z" } })]);
197
- }, we = [], Fe = /* @__PURE__ */ D(
198
- Ne,
199
- Pe,
200
- we,
201
- !1,
202
- null,
203
- null
204
- );
205
- const Ge = Fe.exports, Ue = $({
206
- name: "bento-listbox-single-select-option",
207
- components: {
208
- BentoListboxOption: q,
209
- BentoTypography: w,
210
- CheckmarkIcon: Ge
211
- },
212
- props: {
213
- /**
214
- * Setting this property to true will disable the option.
215
- */
216
- disabled: { type: Boolean, default: !1 },
217
- /**
218
- * The option item that contains all the option item's data.
219
- * @type {BentoListboxOptionItem}
220
- */
221
- option: {
222
- type: Object,
223
- required: !0
224
- },
225
- /**
226
- * Indicates if the value is selected. Only one element can be selected at a time.
227
- */
228
- selected: { type: Boolean, default: !1 }
229
- },
230
- emits: [i.ENTER, i.SELECT, i.SPACE, i.TAB],
231
- setup(t, { emit: e }) {
232
- const s = (o) => {
233
- t.disabled || e(o, t.option);
234
- }, l = r(() => t.disabled ? !0 : null), n = r(() => t.selected ? !0 : null), a = r(() => t.disabled ? -1 : 0);
235
- return {
236
- // Values
237
- ariaDisabled: l,
238
- ariaSelected: n,
239
- tabIndex: a,
240
- // Enums
241
- BentoListboxEvent: i,
242
- // Events
243
- onOptionSelected: s
244
- };
245
- }
246
- });
247
- var ze = function() {
248
- var e = this, s = e._self._c;
249
- return e._self._setupProxy, s("bento-listbox-option", { staticClass: "b-listbox-single-select-option", attrs: { disabled: e.disabled, selected: e.selected, "aria-selected": e.ariaSelected, "aria-disabled": e.ariaDisabled, tabindex: e.tabIndex }, on: { click: function(l) {
250
- return e.onOptionSelected(e.BentoListboxEvent.SELECT);
251
- }, "enter-pressed": function(l) {
252
- return e.onOptionSelected(e.BentoListboxEvent.ENTER);
253
- }, "space-pressed": function(l) {
254
- return l.preventDefault(), e.onOptionSelected(e.BentoListboxEvent.SPACE);
255
- }, "tab-pressed": function(l) {
256
- return e.onOptionSelected(e.BentoListboxEvent.TAB);
257
- } } }, [e._t("default", function() {
258
- return [s("span", { staticClass: "b-listbox-single-select-option__text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.option.label))]), e.option.description ? s("bento-typography", { staticClass: "b-listbox-single-select-option__description", attrs: { el: "span" } }, [e._v(" " + e._s(e.option.description) + " ")]) : e._e()], 1)];
259
- }, null, e.option), s("span", { staticClass: "b-listbox-single-select-option__check-icon" }, [s("checkmark-icon", { directives: [{ name: "show", rawName: "v-show", value: e.selected, expression: "selected" }], attrs: { "svg-title": "selected" } })], 1)], 2);
260
- }, Ve = [], Ye = /* @__PURE__ */ D(
261
- Ue,
262
- ze,
263
- Ve,
264
- !1,
265
- null,
266
- "5a5ff36a"
267
- );
268
- const qe = Ye.exports, ne = ({ items: t, isOptionDisabled: e, hasStaticCategories: s }, l) => {
269
- const n = r(
270
- () => s.value ? t.value.flatMap((f) => f.items) : t.value
271
- ), a = r(() => n.value.length - 1), o = O(0);
272
- te(() => {
273
- e && (o.value = t.value.findIndex((f) => !e(f)));
274
- });
275
- const d = (f) => !e || !!e && e(t.value[f]), c = (f) => !e || !!e && !e(t.value[f]), b = (f) => {
276
- switch (f) {
277
- case "increase":
278
- o.value += 1;
279
- break;
280
- case "decrease":
281
- o.value -= 1;
282
- break;
283
- }
284
- }, E = ({ edgeCaseItem: f, isItemBeforeEdgeCaseItem: m }, g, L) => {
285
- o.value !== f && (m ? c(f) && b(L) : (b(L), d(o.value) && g()), l(o.value));
286
- }, C = (f) => {
287
- var g;
288
- (g = f == null ? void 0 : f.detail) == null || g.preventDefault();
289
- const m = o.value === a.value - 2;
290
- E(
291
- {
292
- isItemBeforeEdgeCaseItem: m,
293
- edgeCaseItem: a.value
294
- },
295
- C,
296
- "increase"
297
- /* INCREASE */
298
- );
299
- }, S = (f) => {
300
- var g;
301
- (g = f == null ? void 0 : f.detail) == null || g.preventDefault();
302
- const m = o.value === 1;
303
- E(
304
- {
305
- edgeCaseItem: 0,
306
- isItemBeforeEdgeCaseItem: m
307
- },
308
- S,
309
- "decrease"
310
- /* DECREASE */
311
- );
312
- };
313
- return {
314
- moveToFirstElement: () => {
315
- o.value = 0, d(o.value) ? C() : l(o.value);
316
- },
317
- moveToLastElement: () => {
318
- o.value = a.value, d(o.value) ? S() : l(o.value);
319
- },
320
- moveToNextElement: C,
321
- moveToPreviousElement: S,
322
- setListboxFocusedIndex: (f) => {
323
- o.value = f;
324
- }
325
- };
326
- }, We = $({
327
- name: "bento-listbox-single-select",
328
- components: {
329
- BentoListboxSingleSelectCategory: Be,
330
- BentoListboxSingleSelectOption: qe
331
- },
332
- directives: { BentoKeyboardNavigationDirective: J },
333
- inheritAttrs: !1,
334
- props: {
335
- /**
336
- * Function that allows the options to be disabled
337
- *
338
- * @type {BentoListboxIsOptionDisabled}
339
- * @param {BentoListboxOptionItem} option - listbox option object
340
- * @param {string} option.label - Option's label text
341
- * @param {string|number} option.value - Option's value
342
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
343
- */
344
- isOptionDisabled: {
345
- type: Function,
346
- default: () => !1
347
- },
348
- /**
349
- * The option elements to populate the listbox with.
350
- * It must be an array of {@see BentoListboxOptionItem }.
351
- *
352
- * @property {string} value.label - Text to be displayed in the option
353
- * @property {string,number} value.value - Value of the option
354
- */
355
- items: {
356
- type: Array,
357
- required: !0
358
- },
359
- /**
360
- * The `input` value.
361
- * Providing an empty string will select no options.
362
- * Set to an empty string `''` if you don't want any of the available options to be selected
363
- */
364
- selectedValue: {
365
- type: Array,
366
- default: void 0
367
- },
368
- /**
369
- * If enabled, dropdown will display non-selectable, static categories
370
- */
371
- staticCategories: { type: Boolean, default: !1 }
372
- },
373
- emits: [i.SELECT, i.ENTER, i.SPACE, i.TAB],
374
- setup(t, { emit: e, expose: s, slots: l }) {
375
- const n = O(null), a = O([]), o = r(() => {
376
- var m;
377
- return !!((m = t.selectedValue) != null && m.length) && t.selectedValue.at(0);
378
- }), d = r(() => !!t.items.some(({ items: m }) => !!m)), c = (m) => (g) => {
379
- e(m, [g]);
380
- }, b = (m) => {
381
- var g;
382
- (g = n.value.querySelectorAll('[role="option"]')[m]) == null || g.focus();
383
- }, {
384
- moveToNextElement: E,
385
- moveToPreviousElement: C,
386
- moveToFirstElement: S,
387
- moveToLastElement: B,
388
- setListboxFocusedIndex: T
389
- } = ne(
390
- {
391
- items: G(t, "items"),
392
- isOptionDisabled: t.isOptionDisabled,
393
- hasStaticCategories: G(t, "staticCategories")
394
- },
395
- b
396
- ), R = {
397
- [k.ARROW_UP]: C,
398
- [k.ARROW_DOWN]: E,
399
- [k.HOME]: S,
400
- [k.END]: B
401
- }, f = {
402
- [i.SELECT]: c(i.SELECT),
403
- [i.SPACE]: c(i.SPACE),
404
- [i.TAB]: c(i.TAB),
405
- [i.ENTER]: c(i.ENTER)
406
- };
407
- return s({
408
- /**
409
- * Reference for a single listbox item.
410
- * Required for keyboard navigation in dropdown as $children is removed in vue@3
411
- */
412
- listboxItemRef: a,
413
- /**
414
- * Method to set the index of the item to be focused on
415
- * Used for focus management to be kept in-sync with parent e.g. dropdowns
416
- */
417
- setListboxFocusedIndex: T
418
- }), {
419
- // Enums
420
- BentoListboxEvent: i,
421
- // Values
422
- listboxRef: n,
423
- listboxItemRef: a,
424
- selectedItem: o,
425
- slots: l,
426
- // Computed
427
- hasCategories: d,
428
- // Methods
429
- onOptionSelected: c,
430
- // Keyboard navigation
431
- listboxListeners: R,
432
- listboxOptionListeners: f
433
- };
434
- }
435
- });
436
- var Ke = function() {
437
- var e = this, s = e._self._c;
438
- return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef" }, e.listboxListeners), [e.hasCategories && e.staticCategories ? e._l(e.items, function(l) {
439
- return s("bento-listbox-single-select-category", { key: l.value, attrs: { "category-label": l.label, role: "group" } }, e._l(l.items, function(n) {
440
- return s("bento-listbox-single-select-option", e._g({ key: n.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: n, disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null, selected: n.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(a, o) {
441
- return { key: o, fn: function(d) {
442
- return [e._t(o, null, null, d)];
443
- } };
444
- })], null, !0) }, e.listboxOptionListeners));
445
- }), 1);
446
- }) : e._l(e.items, function(l) {
447
- return s("bento-listbox-single-select-option", e._g({ key: l.value, ref: "listboxItemRef", refInFor: !0, attrs: { role: "option", option: l, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, selected: l.value === e.selectedItem.value }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
448
- return { key: a, fn: function(o) {
449
- return [e._t(a, null, null, o)];
450
- } };
451
- })], null, !0) }, e.listboxOptionListeners));
452
- })], 2);
453
- }, je = [], He = /* @__PURE__ */ D(
454
- We,
455
- Ke,
456
- je,
457
- !1,
458
- null,
459
- null
460
- );
461
- const Xe = He.exports;
462
- var j = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.STATIC_CATEGORY = "static-category", t))(j || {}), z = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.UNSELECT_CATEGORY = "unselect-category", t))(z || {});
463
- const Je = {
464
- "en-US": {
465
- categoryClosed: "{category} closed",
466
- categoryOpened: "{category} opened"
467
- }
468
- }, Ze = $({
469
- i18n: { messages: Je },
470
- name: "bento-listbox-multi-select-category",
471
- components: {
472
- BentoCheckbox: X,
473
- BentoTypography: w,
474
- BentoListboxOption: q,
475
- ChevronDownIcon: xe,
476
- ChevronUpIcon: he
477
- },
478
- props: {
479
- /**
480
- * The option elements to populate the listbox with.
481
- * It must be an array of {@see BentoListboxOptionItem }.
482
- *
483
- * @property {string} value.label - Text to be displayed in the option
484
- * @property {string,number} value.value - Value of the option
485
- * @property {BentoListboxOptionItem} value.items - Category items list
486
- */
487
- category: {
488
- type: Object,
489
- required: !0
490
- },
491
- /**
492
- * Function that allows the options to be disabled
493
- *
494
- * @type {BentoListboxIsOptionDisabled}
495
- * @param {BentoListboxOptionItem} option - listbox option object
496
- * @param {string} option.label - Option's label text
497
- * @param {string|number} option.value - Option's value
498
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
499
- */
500
- isOptionDisabled: {
501
- type: [Function],
502
- default: () => !1
503
- },
504
- /**
505
- * The `input` value.
506
- * Providing an empty array will select no options.
507
- */
508
- selectedItemsList: {
509
- type: Array,
510
- default: () => []
511
- },
512
- /**
513
- * If enabled, dropdown will display non-selectable, static categories
514
- */
515
- staticCategories: { type: Boolean, default: !1 }
516
- },
517
- emits: [z.SELECT_CATEGORY, z.UNSELECT_CATEGORY],
518
- setup(t, { emit: e }) {
519
- const s = O(!1), { t: l } = Y(), n = (_) => t.isOptionDisabled ? t.isOptionDisabled(_) : !1, a = r(
520
- () => t.category.items.every((_) => n(_))
521
- ), o = G(t, "staticCategories"), d = r(() => s.value || t.staticCategories), c = r(() => ({
522
- [`b-listbox-multi-select-category--${j.DISABLED}`]: a.value,
523
- [`b-listbox-multi-select-category--${j.STATIC_CATEGORY}`]: t.staticCategories
524
- })), b = (_) => {
525
- _.preventDefault(), s.value = !s.value;
526
- }, E = (_) => {
527
- var F;
528
- const h = n(_), A = ((F = t.selectedItemsList) == null ? void 0 : F.includes(_.value)) || !1;
529
- return { isDisabled: h, isPreSelected: A };
530
- }, C = r(
531
- () => t.category.items.filter((_) => {
532
- const { isDisabled: h, isPreSelected: A } = E(_);
533
- return h && A || !h;
534
- })
535
- ), S = r(
536
- () => {
537
- var _;
538
- return (_ = C.value) == null ? void 0 : _.filter(
539
- ({ value: h }) => {
540
- var A;
541
- return (A = t.selectedItemsList) == null ? void 0 : A.includes(h);
542
- }
543
- );
544
- }
545
- ), B = r(() => {
546
- const _ = s.value ? "categoryOpened" : "categoryClosed";
547
- return l(_, { category: t.category.label });
548
- }), T = r(
549
- () => ({
550
- el: "span",
551
- variant: t.staticCategories ? "caption" : "body"
552
- })
553
- ), R = () => {
554
- e(z.SELECT_CATEGORY);
555
- }, f = () => {
556
- e(z.UNSELECT_CATEGORY);
557
- }, { isAllSelected: m, isIndeterminate: g, toggleSelectAll: L } = le(
558
- S,
559
- C,
560
- R,
561
- f
562
- );
563
- return {
564
- // Values
565
- chevronTitle: B,
566
- conditionalClass: c,
567
- hasAllPropsDisabled: a,
568
- isOpen: s,
569
- isAllSelected: m,
570
- isIndeterminate: g,
571
- isStaticCategory: o,
572
- // Computed
573
- showItemChildren: d,
574
- categoryLabelProps: T,
575
- // Methods
576
- toggleOpen: b,
577
- toggleSelectAll: L
578
- };
579
- }
580
- });
581
- var Qe = function() {
582
- var e = this, s = e._self._c;
583
- return e._self._setupProxy, s("div", [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-category__option", class: e.conditionalClass }, [e.isStaticCategory ? e._e() : s("bento-checkbox", { attrs: { "model-value": e.isAllSelected, indeterminate: e.isIndeterminate, disabled: e.hasAllPropsDisabled, "aria-label": e.category.label, value: e.category.value }, on: { "update:model-value": e.toggleSelectAll } }), s("span", { staticClass: "b-listbox-multi-select-category__label" }, [s("bento-typography", e._b({ staticClass: "b-listbox-multi-select-category__label-text" }, "bento-typography", e.categoryLabelProps, !1), [e._v(" " + e._s(e.category.label) + " ")]), e.isStaticCategory ? e._e() : s("div", { staticClass: "b-listbox-multi-select-category__label-chevron", attrs: { "data-testid": "toggle-listbox" }, on: { "!click": function(l) {
584
- return e.toggleOpen.apply(null, arguments);
585
- } } }, [e.isOpen ? s("chevron-up-icon", { attrs: { "svg-title": e.chevronTitle } }) : s("chevron-down-icon", { attrs: { "svg-title": e.chevronTitle } })], 1)], 1)], 1), s("div", { directives: [{ name: "show", rawName: "v-show", value: e.showItemChildren, expression: "showItemChildren" }] }, [e._t("default")], 2)], 1);
586
- }, et = [], tt = /* @__PURE__ */ D(
587
- Ze,
588
- Qe,
589
- et,
590
- !1,
591
- null,
592
- "f360ac3d"
593
- );
594
- const st = tt.exports;
595
- var N = /* @__PURE__ */ ((t) => (t.SELECT_CATEGORY = "select-category", t.TOGGLE_CHECKBOX_SELECTION = "toggle-checkbox-selection", t.UNSELECT_CATEGORY = "unselect-category", t))(N || {});
596
- const lt = $({
597
- name: "listbox-multi-select-options",
598
- components: {
599
- BentoCheckbox: X,
600
- BentoListboxOption: q,
601
- BentoTypography: w,
602
- ListboxMultiSelectCategory: st
603
- },
604
- props: {
605
- /**
606
- * Indicates if the items listed are inside a category
607
- * so they can be padded to right by one level in recursion.
608
- * Items of categories are automatically defined as "categoryItems"
609
- */
610
- categoryItems: { type: Boolean, default: !1 },
611
- /**
612
- * Function that allows the options to be disabled
613
- *
614
- * @type {BentoListboxIsOptionDisabled}
615
- * @param {BentoListboxOptionItem} option - listbox option object
616
- * @param {string} option.label - Option's label text
617
- * @param {string|number} option.value - Option's value
618
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
619
- */
620
- isOptionDisabled: {
621
- type: Function,
622
- default: () => !1
623
- },
624
- /**
625
- * The option elements to populate the listbox with.
626
- * It must be an array of {@see BentoListboxOptionItem }.
627
- *
628
- * @property {string} value.label - Text to be displayed in the option
629
- * @property {string,number} value.value - Value of the option
630
- */
631
- items: {
632
- type: Array,
633
- required: !0
634
- },
635
- /**
636
- * Indicates if the elements options are inside a multi-level category
637
- */
638
- isMultiLevel: { type: Boolean, default: !1 },
639
- /**
640
- * Flag that indicates that an external search it's being made
641
- * to filter out the items inside the the multi-select listbox
642
- *
643
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
644
- */
645
- searching: { type: Boolean, default: !1 },
646
- /**
647
- * List of selected items.
648
- * Providing an empty array will select no options.
649
- */
650
- selectedItemsList: {
651
- type: Array,
652
- default: () => []
653
- },
654
- /**
655
- * If enabled, dropdown will display non-selectable, static categories
656
- */
657
- staticCategories: { type: Boolean, default: !1 }
658
- },
659
- emits: [
660
- N.TOGGLE_CHECKBOX_SELECTION,
661
- N.SELECT_CATEGORY,
662
- N.UNSELECT_CATEGORY
663
- ],
664
- setup(t, { emit: e }) {
665
- const s = (c) => {
666
- e(N.TOGGLE_CHECKBOX_SELECTION, c);
667
- }, l = (c) => !!c.items, n = (c) => {
668
- const b = t.isMultiLevel && t.searching;
669
- return c.description && (!t.isMultiLevel || b);
670
- }, a = (c) => c.items ? !!c.items.find((b) => t.selectedItemsList.includes(b.value)) : t.selectedItemsList.includes(c.value), o = (c, b) => {
671
- if (l(b))
672
- return e(c ? N.SELECT_CATEGORY : N.UNSELECT_CATEGORY, b);
673
- s(b.value);
674
- };
675
- return {
676
- // Values
677
- conditionalClasses: r(() => ({
678
- "b-listbox-multi-select-options__static-category-option": t.staticCategories,
679
- "b-listbox-multi-select-options__category-option": t.categoryItems
680
- })),
681
- // Methods
682
- isOptionSelected: a,
683
- shouldShowDescription: n,
684
- toggleCheckboxSelection: s,
685
- selectSearch: o,
686
- // Enums
687
- BentoListboxEvent: i,
688
- ListboxMultiSelectOptionsEvent: N
689
- };
690
- }
691
- });
692
- var nt = function() {
693
- var e = this, s = e._self._c;
694
- return e._self._setupProxy, s("div", e._l(e.items, function(l) {
695
- return s("div", { key: `selected-${l.value}` }, [e.searching && e.isMultiLevel ? [s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.isOptionSelected(l), "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value }, on: { "update:model-value": (n) => e.selectSearch(n, l) } }), e._t("default", function() {
696
- return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
697
- }, null, l)], 2)] : [l.items ? [s("listbox-multi-select-category", { attrs: { category: l, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled, "selected-items-list": e.selectedItemsList }, on: { "select-category": function(n) {
698
- return e.$emit(e.ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, l);
699
- }, "unselect-category": function(n) {
700
- return e.$emit(e.ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, l);
701
- } } }, [s("listbox-multi-select-options", { attrs: { "category-items": "", items: l.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevel, "static-categories": e.staticCategories, "selected-items-list": e.selectedItemsList, searching: e.searching }, on: { "toggle-checkbox-selection": (n) => e.toggleCheckboxSelection(n) } })], 1)] : s("bento-listbox-option", { staticClass: "b-listbox-multi-select-options", class: e.conditionalClasses, attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null } }, [s("bento-checkbox", { attrs: { "model-value": e.selectedItemsList, "aria-label": l.label, disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null, value: l.value }, on: { "update:model-value": function(n) {
702
- return e.toggleCheckboxSelection(l);
703
- } } }), e._t("default", function() {
704
- return [s("span", { staticClass: "b-listbox-multi-select__option-text" }, [s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(l.label))]), e.shouldShowDescription(l) ? s("bento-typography", { staticClass: "b-listbox-multi-select__option-description", attrs: { el: "span" } }, [e._v(" " + e._s(l.description) + " ")]) : e._e()], 1)];
705
- }, null, l)], 2)]], 2);
706
- }), 0);
707
- }, at = [], ot = /* @__PURE__ */ D(
708
- lt,
709
- nt,
710
- at,
711
- !1,
712
- null,
713
- "b2db9f50"
714
- );
715
- const it = ot.exports, ct = {
716
- "en-US": {
717
- remove: "Remove"
718
- },
719
- "ja-JP": {
720
- remove: "削除"
721
- },
722
- "pt-BR": {
723
- remove: "Remover"
724
- }
725
- }, rt = {
726
- i18n: { messages: ct }
727
- }, ut = /* @__PURE__ */ $({
728
- ...rt,
729
- __name: "listbox-multi-select-chips",
730
- props: {
731
- /**
732
- * Function that defines the options to be disabled
733
- */
734
- isOptionDisabled: {
735
- type: Function,
736
- default: () => !1
737
- },
738
- /**
739
- * The option elements to populate the listbox with.
740
- * It must be an array of {@see BentoListboxOptionItem }.
741
- *
742
- * @property {string} value.label - Text to be displayed in the option
743
- * @property {string,number} value.value - Value of the option
744
- */
745
- items: {
746
- type: Array,
747
- required: !0
748
- }
749
- },
750
- emits: ["unselect-item", "unselect-category"],
751
- setup(t, { emit: e }) {
752
- const { t: s } = Y();
753
- return { __sfc: !0, emit: e, t: s, unselectOption: (n) => n.items ? e("unselect-category", n) : e("unselect-item", n), BentoTypography: w, BaseButton: Ce, CrossSmallIcon: Se };
754
- }
755
- });
756
- var dt = function() {
757
- var e = this, s = e._self._c, l = e._self._setupProxy;
758
- return s("div", { staticClass: "b-listbox-multi-select-chips" }, e._l(e.items, function(n) {
759
- return s("div", { key: `selected-${n.value}` }, [s(l.BaseButton, { staticClass: "b-listbox-multi-select-chips__chip", attrs: { disabled: e.isOptionDisabled ? e.isOptionDisabled(n) : null }, on: { click: function(a) {
760
- return l.unselectOption(n);
761
- } }, scopedSlots: e._u([{ key: "iconRight", fn: function() {
762
- return [s(l.CrossSmallIcon, { attrs: { "svg-title": l.t("remove") } })];
763
- }, proxy: !0 }], null, !0) }, [s(l.BentoTypography, { staticClass: "b-listbox-multi-select-chips__option-text", attrs: { el: "span", variant: "caption" } }, [e._v(e._s(n.label))])], 1)], 1);
764
- }), 0);
765
- }, bt = [], mt = /* @__PURE__ */ D(
766
- ut,
767
- dt,
768
- bt,
769
- !1,
770
- null,
771
- "55fb08d8"
772
- );
773
- const ft = mt.exports, vt = {
774
- "en-US": {
775
- allSelected: "All selected ({total})",
776
- numberOfTotalSelected: "{number} of {total} selected",
777
- numbersSelected: "{number} selected",
778
- selectAll: "Select all ({total})"
779
- }
780
- }, _t = (t) => {
781
- const e = r(() => {
782
- var l;
783
- return !!((l = t.value) != null && l.find(({ items: n }) => !!n));
784
- }), s = r(() => {
785
- var l;
786
- return e.value ? (l = t.value) == null ? void 0 : l.reduce((n, a) => (a.items ? n.push(...a.items.flat()) : n.push(a), n), []) : t.value;
787
- });
788
- return {
789
- isMultiLevelSelect: e,
790
- flattenedItemsList: s
791
- };
792
- }, gt = $({
793
- i18n: { messages: vt },
794
- name: "bento-listbox-multi-select",
795
- components: {
796
- BentoCheckbox: X,
797
- BentoListboxOption: q,
798
- BentoTypography: w,
799
- ListboxMultiSelectOptions: it,
800
- ListboxMultiSelectChips: ft
801
- },
802
- directives: { BentoKeyboardNavigationDirective: J },
803
- props: {
804
- /**
805
- * Indicates whether there are more items to load
806
- */
807
- hasMoreItems: { type: Boolean, default: !1 },
808
- /**
809
- * Function that allows the options to be disabled
810
- *
811
- * @type {BentoListboxIsOptionDisabled}
812
- * @param {BentoListboxOptionItem} option - listbox option object
813
- * @param {string} option.label - Option's label text
814
- * @param {string|number} option.value - Option's value
815
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
816
- */
817
- isOptionDisabled: {
818
- type: Function,
819
- default: () => !1
820
- },
821
- /**
822
- * The option elements to populate the listbox with.
823
- * It must be an array of {@see BentoListboxOptionItem }.
824
- *
825
- * @property {string} value.label - Text to be displayed in the option
826
- * @property {string,number} value.value - Value of the option
827
- */
828
- items: {
829
- type: Array,
830
- required: !0
831
- },
832
- /**
833
- * The type of `Lazy Load`.
834
- * Type "automatic" will enable infinite scrolling
835
- * Type "button" will enable lazy loading with "Show more" button
836
- */
837
- lazyLoadType: {
838
- type: String,
839
- default: P.NONE,
840
- validator: (t) => Object.values(P).includes(t)
841
- },
842
- /**
843
- * Flag that indicates that an external search it's being made
844
- * to filter out the items inside the the multi-select listbox
845
- *
846
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
847
- */
848
- searching: { type: Boolean, default: !1 },
849
- /**
850
- * The `input` value.
851
- * Providing an empty array will select no options.
852
- */
853
- selectedValues: {
854
- type: Array,
855
- required: !0
856
- },
857
- /**
858
- * If enabled, dropdown will display non-selectable, static categories
859
- */
860
- staticCategories: { type: Boolean, default: !1 }
861
- },
862
- emits: [i.SELECT],
863
- setup(t, { emit: e, slots: s }) {
864
- const { t: l } = Y(), n = O(null), a = O(null), o = O(null), d = r(
865
- () => t.selectedValues.map(({ value: u }) => u)
866
- ), { isMultiLevelSelect: c, flattenedItemsList: b } = _t(G(t, "items")), E = (u) => {
867
- var x;
868
- const v = t.isOptionDisabled(u), y = ((x = d.value) == null ? void 0 : x.includes(u.value)) || !1;
869
- return { isDisabled: v, isPreSelected: y };
870
- }, C = r(() => {
871
- if (t.searching && c)
872
- return t.items;
873
- const u = b.value.filter((v) => {
874
- const { isDisabled: y, isPreSelected: x } = E(v);
875
- return y && x || !y;
876
- });
877
- return t.selectedValues.forEach((v) => {
878
- u.find((y) => y.value === v.value) || u.push(v);
879
- }), u;
880
- }), S = r(
881
- () => {
882
- var u;
883
- return (u = C.value) == null ? void 0 : u.filter((v) => {
884
- var y;
885
- return v.items && c.value && t.searching ? v.items.filter(
886
- (p) => (t.selectedValues ?? []).includes(p.value)
887
- ).length === v.items.length : (y = d.value) == null ? void 0 : y.includes(v.value);
888
- });
889
- }
890
- ), B = () => c.value && !t.searching ? b.value.length : t.items.length, T = r(() => {
891
- var x;
892
- const u = C.value.length, v = B(), y = ((x = S.value) == null ? void 0 : x.length) || 0;
893
- return y === 0 ? l("selectAll", { total: u }) : y === v ? l("allSelected", { total: v }) : y <= v ? l("numberOfTotalSelected", { number: y, total: v }) : l("numbersSelected", { number: y });
894
- }), R = (u) => {
895
- const v = (x) => {
896
- const { isDisabled: p, isPreSelected: M } = E(x);
897
- return p && M || !p;
898
- }, y = u.filter(v).filter((x) => !d.value.includes(x.value));
899
- e(i.SELECT, [...t.selectedValues, ...y]);
900
- }, f = (u) => {
901
- const v = (p) => {
902
- const { isDisabled: M, isPreSelected: ve } = E(p);
903
- return !(M && ve);
904
- }, y = u.filter(v).map(({ value: p }) => p), x = t.selectedValues.filter((p) => !(y != null && y.includes(p.value)));
905
- e(i.SELECT, x);
906
- }, m = () => {
907
- R(b.value);
908
- }, g = () => {
909
- f(b.value);
910
- }, { isAllSelected: L, isIndeterminate: _, toggleSelectAll: h } = le(
911
- S,
912
- C,
913
- m,
914
- g
915
- ), A = (u) => {
916
- R(u.items);
917
- }, F = (u) => {
918
- f(u.items);
919
- }, W = (u, v) => {
920
- let y = !1;
921
- const x = t.selectedValues.filter(({ value: p }) => v.value === p ? (y = !0, !1) : !0);
922
- y || x.push(v), e(u, x);
923
- }, V = r(() => {
924
- if (!c.value)
925
- return t.selectedValues;
926
- const u = (p) => d.value.includes(p.value), v = (p) => !t.staticCategories && p.every((M) => u(M));
927
- return t.items.flatMap(
928
- (p) => p.items && !v(p.items) ? p.items : p
929
- ).filter((p) => p.items ? !0 : u(p));
930
- }), K = r(() => {
931
- var y, x, p, M;
932
- const u = ["automatic", "button"].includes(t.lazyLoadType), v = ((y = t.selectedValues) == null ? void 0 : y.length) > 0 && ((x = S.value) == null ? void 0 : x.length) !== ((p = b.value) == null ? void 0 : p.length);
933
- return u && t.hasMoreItems ? !!((M = t.selectedValues) != null && M.length) : v;
934
- }), I = r(() => ["automatic", "button"].includes(t.lazyLoadType) ? !t.hasMoreItems : !0), U = r(
935
- () => n.value ? [n.value] : []
936
- ), ae = r(
937
- () => {
938
- var u, v;
939
- return (v = (u = a.value) == null ? void 0 : u.$children) != null && v.length ? a.value.$children : [];
940
- }
941
- ), oe = r(
942
- () => {
943
- var u, v;
944
- return (v = (u = o.value) == null ? void 0 : u.$children) != null && v.length ? o.value.$children : [];
945
- }
946
- ), ie = r(() => ({ label: T, value: L })), ce = r(() => [
947
- ie,
948
- ...V.value,
949
- ...b.value
950
- ]), re = (u) => {
951
- [
952
- ...U.value,
953
- ...ae.value,
954
- ...oe.value
955
- ][u].$el.focus();
956
- }, { moveToNextElement: ue, moveToPreviousElement: de, moveToFirstElement: be, moveToLastElement: me } = ne(
957
- {
958
- items: O(ce),
959
- isOptionDisabled: t.isOptionDisabled,
960
- hasStaticCategories: G(t, "staticCategories")
961
- },
962
- re
963
- ), fe = {
964
- [k.ARROW_UP]: (u) => de(u),
965
- [k.ARROW_DOWN]: (u) => ue(u),
966
- [k.HOME]: be,
967
- [k.END]: me
968
- };
969
- return {
970
- // Refs
971
- selectAllListboxItemsRef: n,
972
- selectedListboxItemsRef: a,
973
- listboxItemsRef: o,
974
- // Values
975
- isAllSelected: L,
976
- showSelectedItems: K,
977
- isIndeterminate: _,
978
- isMultiLevelSelect: c,
979
- flattenedItemsList: b,
980
- selectedItemsList: d,
981
- selectAllCheckboxText: T,
982
- selectedOptions: V,
983
- showSelectAllCheckbox: I,
984
- slots: s,
985
- // Enums
986
- BentoListboxEvent: i,
987
- // Methods
988
- selectAllCategory: A,
989
- toggleCheckboxSelection: W,
990
- toggleSelectAll: h,
991
- unselectAllCategory: F,
992
- // Events
993
- listboxListeners: fe
994
- };
995
- }
996
- });
997
- var yt = function() {
998
- var e = this, s = e._self._c;
999
- return e._self._setupProxy, s("div", e._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-listbox-multi-select" }, e.listboxListeners), [e.showSelectAllCheckbox ? s("bento-listbox-option", { ref: "selectAllListboxItemsRef", staticClass: "b-listbox-multi-select__option" }, [s("bento-checkbox", { attrs: { "aria-label": e.selectAllCheckboxText, "model-value": e.isAllSelected, indeterminate: e.isIndeterminate }, on: { "update:model-value": e.toggleSelectAll } }), s("bento-typography", { attrs: { el: "span", "aria-hidden": "true" } }, [e._v(" " + e._s(e.selectAllCheckboxText) + " ")])], 1) : e._e(), e.showSelectAllCheckbox ? s("hr", { staticClass: "b-listbox-multi-select__divider" }) : e._e(), e.showSelectedItems ? s("div", [s("listbox-multi-select-chips", { ref: "selectedListboxItemsRef", attrs: { items: e.selectedOptions, "is-option-disabled": e.isOptionDisabled }, on: { "unselect-category": e.unselectAllCategory, "unselect-item": function(l) {
1000
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, l);
1001
- } } }), s("hr", { staticClass: "b-listbox-multi-select__divider" })], 1) : e._e(), s("listbox-multi-select-options", { ref: "listboxItemsRef", attrs: { items: e.items, "is-option-disabled": e.isOptionDisabled, "is-multi-level": e.isMultiLevelSelect, "static-categories": e.staticCategories, searching: e.searching, "selected-items-list": e.selectedItemsList }, on: { "toggle-checkbox-selection": function(l) {
1002
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SELECT, l);
1003
- }, "select-category": e.selectAllCategory, "unselect-category": e.unselectAllCategory, "space-pressed": function(l) {
1004
- return e.toggleCheckboxSelection(e.BentoListboxEvent.SPACE, l);
1005
- }, "tab-pressed": function(l) {
1006
- return e.toggleCheckboxSelection(e.BentoListboxEvent.TAB, l);
1007
- }, "enter-pressed": function(l) {
1008
- return e.toggleCheckboxSelection(e.BentoListboxEvent.ENTER, l);
1009
- } }, scopedSlots: e._u([e._l(e.slots, function(l, n) {
1010
- return { key: n, fn: function(a) {
1011
- return [e._t(n, null, null, a)];
1012
- } };
1013
- })], null, !0) })], 1);
1014
- }, pt = [], Ct = /* @__PURE__ */ D(
1015
- gt,
1016
- yt,
1017
- pt,
1018
- !1,
1019
- null,
1020
- "38dead9f"
1021
- );
1022
- const ee = Ct.exports, St = {
1023
- "en-US": {
1024
- loading: "Loading",
1025
- showMore: "Show more"
1026
- },
1027
- "ja-JP": {
1028
- loading: "読み込み中",
1029
- showMore: "表示内容を増やす"
1030
- },
1031
- "pt-BR": {
1032
- loading: "Carregando",
1033
- showMore: "Mostrar mais"
1034
- }
1035
- }, ht = 36, xt = $({
1036
- name: "bento-listbox",
1037
- components: {
1038
- BentoEmptyState: ye,
1039
- BentoListboxSingleSelect: Xe,
1040
- BentoListboxMultiSelect: ee,
1041
- BentoTypography: w,
1042
- BentoLoadingIndicator: ge,
1043
- BentoLoadingButton: Ee
1044
- },
1045
- directives: { BentoKeyboardNavigationDirective: J },
1046
- i18n: { messages: St },
1047
- props: {
1048
- /**
1049
- * Defines a string value that labels an interactive element.
1050
- */
1051
- ariaLabel: { type: String, default: null },
1052
- /**
1053
- * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.
1054
- */
1055
- emptyState: {
1056
- type: Object,
1057
- default: void 0
1058
- },
1059
- /**
1060
- * Indicates whether there are more items to load
1061
- */
1062
- hasMoreItems: { type: Boolean, default: !1 },
1063
- /**
1064
- * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.
1065
- */
1066
- id: { type: String, required: !0 },
1067
- /**
1068
- * Function that allows the options to be disabled
1069
- *
1070
- * @type {BentoListboxIsOptionDisabled}
1071
- * @param {BentoListboxOptionItem} option - Listbox option object
1072
- * @param {string} option.label - Option's label text
1073
- * @param {string|number} option.value - Option's value
1074
- * @param {unknown} option.data - Option's extra data to be passed to the default slot
1075
- */
1076
- isOptionDisabled: {
1077
- type: Function,
1078
- default: () => {
1079
- }
1080
- },
1081
- /**
1082
- * The option elements to populate the listbox with.
1083
- * It must be an array of {@see BentoListboxOptionItem }
1084
- * * @property {string} value.label - Text to be displayed in the option
1085
- * * @property {string,number} value.value - Value of the option
1086
- */
1087
- items: {
1088
- type: Array,
1089
- required: !0
1090
- },
1091
- /**
1092
- * Indicates if new options are loading.
1093
- */
1094
- loading: { type: Boolean, default: !1 },
1095
- /**
1096
- * The type of `Lazy Load`.
1097
- * Type "automatic" will enable infinite scrolling
1098
- * Type "button" will enable lazy loading with "Show more" button
1099
- */
1100
- lazyLoadType: {
1101
- type: String,
1102
- default: P.NONE,
1103
- validator: (t) => Object.values(P).includes(t)
1104
- },
1105
- /**
1106
- * If enabled, the user will be able to select multiple items.
1107
- */
1108
- multiple: { type: Boolean, default: !1 },
1109
- /**
1110
- * If enabled, dropdown will display non-selectable, static categories
1111
- */
1112
- staticCategories: { type: Boolean, default: !1 },
1113
- /**
1114
- * Messaged displayed when no items are listed in the listbox
1115
- */
1116
- noResultsMessage: { type: String, required: !0 },
1117
- /**
1118
- * Flag that indicates that an external search it's being made
1119
- * to filter out the items inside the the multi-select listbox
1120
- *
1121
- * If enabled, hides the "Select all" checkbox in "multiple" mode.
1122
- */
1123
- searching: ee.props.searching,
1124
- /**
1125
- * The `input` value.
1126
- * Providing an empty string or empty array will select no options.
1127
- * Set to an empty string `''` if you don't want any of the available options to be selected for single select
1128
- */
1129
- selectedValue: {
1130
- type: Array,
1131
- default: () => []
1132
- },
1133
- /**
1134
- * Enables virtual scrolling if set to true or by providing an object with itemHeight function.
1135
- * The itemHeight function is used to calculate the height of rendered item given it's index.
1136
- */
1137
- virtualScroll: {
1138
- type: [Boolean, Object],
1139
- default: !1
1140
- }
1141
- },
1142
- emits: [
1143
- i.SELECT,
1144
- i.SPACE,
1145
- i.SHOW_MORE,
1146
- i.ENTER,
1147
- i.ESCAPE,
1148
- i.TAB
1149
- ],
1150
- setup(t, { emit: e, slots: s }) {
1151
- const l = O([]), n = G(t, "items"), { t: a } = Y(), o = r(() => t.lazyLoadType !== P.AUTOMATIC), d = r(() => t.lazyLoadType === P.AUTOMATIC), c = () => {
1152
- var I;
1153
- return typeof (t == null ? void 0 : t.virtualScroll) == "object" && ((I = t == null ? void 0 : t.virtualScroll) != null && I.itemHeight) ? t.virtualScroll.itemHeight : ht;
1154
- }, {
1155
- containerRef: b,
1156
- containerProps: E,
1157
- onScroll: C,
1158
- list: S,
1159
- wrapperProps: B
1160
- } = Oe(n, {
1161
- itemHeight: c(),
1162
- // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select
1163
- disabled: (t == null ? void 0 : t.multiple) || (t == null ? void 0 : t.virtualScroll) === !1 || (t == null ? void 0 : t.lazyLoadType) !== "none"
1164
- }), T = r(
1165
- () => o.value ? "true" : void 0
1166
- ), R = r(
1167
- () => o.value && t.loading ? "true" : "false"
1168
- ), f = r(
1169
- () => o.value ? "polite" : void 0
1170
- ), m = (I) => (U) => {
1171
- e(I, U);
1172
- }, g = () => {
1173
- e(i.SHOW_MORE);
1174
- }, L = pe(() => {
1175
- const I = b.value;
1176
- if (!I)
1177
- return;
1178
- const U = Math.round(I.scrollTop) + I.clientHeight >= I.scrollHeight;
1179
- t.hasMoreItems && U && !t.loading && g();
1180
- }), _ = () => {
1181
- d.value ? L() : C();
1182
- }, h = r(() => {
1183
- var I;
1184
- return ((I = t.items) == null ? void 0 : I.length) === 0;
1185
- }), A = r(
1186
- () => t.lazyLoadType === P.BUTTON && t.hasMoreItems
1187
- ), F = r(
1188
- () => t.loading ? Z.LOADING : Z.START
1189
- ), W = r(() => t.loading ? a("loading") : a("showMore")), V = r(() => ({
1190
- ...t.emptyState,
1191
- variant: "condensed"
1192
- })), K = {
1193
- [i.SELECT]: m(i.SELECT),
1194
- [i.SPACE]: m(i.SPACE),
1195
- [i.TAB]: m(i.TAB),
1196
- [i.ENTER]: m(i.ENTER)
1197
- };
1198
- return {
1199
- // Refs
1200
- listboxRef: b,
1201
- listboxItemRef: l,
1202
- // a11y
1203
- ariaAtomic: T,
1204
- ariaBusy: R,
1205
- ariaLive: f,
1206
- // Values
1207
- containerProps: E,
1208
- isSearchResultEmpty: h,
1209
- limitedEmptyStateProps: V,
1210
- loadingButtonState: F,
1211
- slots: s,
1212
- shouldDisplayShowMoreButton: A,
1213
- showMoreButtonText: W,
1214
- virtualisedItems: S,
1215
- wrapperProps: B,
1216
- // Enums
1217
- BentoKeyboardNavigationKeyDownEvent: k,
1218
- BentoListboxEvent: i,
1219
- // Methods
1220
- onListboxContainerScroll: _,
1221
- onOptionSelected: m,
1222
- emitShowMore: g,
1223
- listboxListeners: K
1224
- };
1225
- }
1226
- });
1227
- var Et = function() {
1228
- var l;
1229
- var e = this, s = e._self._c;
1230
- return e._self._setupProxy, s("div", { directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], ref: "listboxRef", staticClass: "b-listbox", style: (l = e.containerProps) == null ? void 0 : l.style, attrs: { id: e.id, role: "listbox", tabindex: "-1", "aria-busy": e.ariaBusy, "aria-atomic": e.ariaAtomic, "aria-label": e.ariaLabel, "aria-live": e.ariaLive }, on: { scroll: e.onListboxContainerScroll } }, [s("div", e._b({}, "div", e.wrapperProps, !1), [e.isSearchResultEmpty ? s("div", { staticClass: "b-listbox__empty-search-message" }, [e.emptyState ? s("bento-empty-state", e._b({}, "bento-empty-state", e.limitedEmptyStateProps, !1)) : s("bento-typography", { attrs: { el: "span" } }, [e._v(e._s(e.noResultsMessage))])], 1) : [e.multiple ? [s("bento-listbox-multi-select", e._g({ ref: "listboxItemRef", attrs: { "has-more-items": e.hasMoreItems, items: e.items, "lazy-load-type": e.lazyLoadType, "static-categories": e.staticCategories, "selected-values": e.selectedValue, searching: e.searching, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
1231
- return { key: a, fn: function(o) {
1232
- return [e._t(a, null, null, o)];
1233
- } };
1234
- })], null, !0) }, e.listboxListeners))] : [s("bento-listbox-single-select", e._g({ ref: "listboxItemRef", attrs: { items: e.virtualisedItems, "selected-value": e.selectedValue, "static-categories": e.staticCategories, "is-option-disabled": e.isOptionDisabled }, scopedSlots: e._u([e._l(e.slots, function(n, a) {
1235
- return { key: a, fn: function(o) {
1236
- return [e._t(a, null, null, o)];
1237
- } };
1238
- })], null, !0) }, e.listboxListeners))], e.shouldDisplayShowMoreButton ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-button", { attrs: { state: e.loadingButtonState, variant: "secondary" }, on: { "!click": function(n) {
1239
- return e.emitShowMore.apply(null, arguments);
1240
- } } }, [e._v(" " + e._s(e.showMoreButtonText) + " ")])], 1) : e.loading ? s("div", { staticClass: "b-listbox__lazy-load" }, [s("bento-loading-indicator")], 1) : e._e()]], 2)]);
1241
- }, Lt = [], Ot = /* @__PURE__ */ D(
1242
- xt,
1243
- Et,
1244
- Lt,
1245
- !1,
1246
- null,
1247
- "9ad46841"
1248
- );
1249
- const zt = Ot.exports, H = (t, e) => {
1250
- for (const s of t) {
1251
- if (s.value === e)
1252
- return s;
1253
- if (s.items) {
1254
- const l = H(s.items, e);
1255
- if (l)
1256
- return l;
1257
- }
1258
- }
1259
- return null;
1260
- }, Vt = (t, e, s) => {
1261
- const l = O([]), n = O(), a = (c) => {
1262
- n.value = s.value ? c.map(({ value: b }) => b) : c[0].value;
1263
- }, o = (c) => {
1264
- l.value = c, a(c);
1265
- }, d = () => {
1266
- l.value = [], n.value = null;
1267
- };
1268
- return se(
1269
- () => e.value,
1270
- () => {
1271
- if (!e.value) {
1272
- d();
1273
- return;
1274
- }
1275
- const c = !Array.isArray(e.value), b = [...l.value];
1276
- d();
1277
- const E = (C) => {
1278
- let S = H(t.value, C);
1279
- S || (S = H(b, C)), S || (S = { value: C, label: C.toString() }), l.value.push(S);
1280
- };
1281
- if (c) {
1282
- const C = e.value;
1283
- E(C), a(l.value);
1284
- return;
1285
- }
1286
- e.value.forEach(E), a(l.value);
1287
- },
1288
- { immediate: !0 }
1289
- ), {
1290
- // Values
1291
- cachedSelectedListboxOptions: l,
1292
- cachedListboxSelectedValues: n,
1293
- // Methods
1294
- resetCache: d,
1295
- setCachedValues: o
1296
- };
1297
- };
1298
- export {
1299
- P as B,
1300
- i as a,
1301
- zt as b,
1302
- Vt as c,
1303
- _t as u
1304
- };
1305
- //# sourceMappingURL=use-cached-selected-values.a_5Iw6Dh.js.map