@adyen/bento-vue3 1.89.2 → 1.91.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 (283) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +767 -522
  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/base-modal.css +1 -1
  11. package/dist/assets/button-actions.css +1 -1
  12. package/dist/assets/card.css +1 -1
  13. package/dist/assets/data-grid.css +1 -1
  14. package/dist/assets/date-picker.css +1 -1
  15. package/dist/assets/date-range-picker.css +1 -1
  16. package/dist/assets/dialog-page.css +1 -1
  17. package/dist/assets/draggable-handle.css +1 -1
  18. package/dist/assets/dropdown.css +1 -1
  19. package/dist/assets/error-message.css +1 -1
  20. package/dist/assets/field-label.css +1 -0
  21. package/dist/assets/file-uploader.css +1 -1
  22. package/dist/assets/filter-bar.css +1 -1
  23. package/dist/assets/form-layout-title.css +1 -1
  24. package/dist/assets/input-field.css +1 -1
  25. package/dist/assets/input-time.css +1 -0
  26. package/dist/assets/inspector.css +1 -1
  27. package/dist/assets/modal-fullscreen.css +1 -1
  28. package/dist/assets/secondary-nav.css +1 -1
  29. package/dist/assets/sidepanel.css +1 -1
  30. package/dist/assets/use-cached-selected-values.css +1 -1
  31. package/dist/button.js +1 -1
  32. package/dist/card.js +1 -1
  33. package/dist/checkbox.js +2 -2
  34. package/dist/chip.js +1 -1
  35. package/dist/chunks/accordion-item.CZIxxSsH.js +141 -0
  36. package/dist/chunks/{accordion-item.BX1KrLMl.js.map → accordion-item.CZIxxSsH.js.map} +1 -1
  37. package/dist/chunks/action-bar.BPS3wPde.js +336 -0
  38. package/dist/chunks/{action-bar.DLMaIUWW.js.map → action-bar.BPS3wPde.js.map} +1 -1
  39. package/dist/chunks/ai-tag.D7shWB_x.js +137 -0
  40. package/dist/chunks/{ai-tag.DK63ExDc.js.map → ai-tag.D7shWB_x.js.map} +1 -1
  41. package/dist/chunks/{alert.C_8-VNi_.js → alert.CFWN2E0b.js} +86 -79
  42. package/dist/chunks/{alert.C_8-VNi_.js.map → alert.CFWN2E0b.js.map} +1 -1
  43. package/dist/chunks/anchor-scroller.DSfXK6vK.js +214 -0
  44. package/dist/chunks/{anchor-scroller.NhjLDBZI.js.map → anchor-scroller.DSfXK6vK.js.map} +1 -1
  45. package/dist/chunks/{base-modal.C2-JyHC_.js → base-modal.BxcS7Pao.js} +132 -125
  46. package/dist/chunks/{base-modal.C2-JyHC_.js.map → base-modal.BxcS7Pao.js.map} +1 -1
  47. package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js → button-actions-with-menu.BKdNXYgU.js} +2 -2
  48. package/dist/chunks/{button-actions-with-menu.BQFAgAI2.js.map → button-actions-with-menu.BKdNXYgU.js.map} +1 -1
  49. package/dist/chunks/{button-actions.cMQWyZne.js → button-actions.DLiM8KZL.js} +203 -189
  50. package/dist/chunks/{button-actions.cMQWyZne.js.map → button-actions.DLiM8KZL.js.map} +1 -1
  51. package/dist/chunks/{calendar.DcCqkSNJ.js → calendar.qm-kFNQv.js} +460 -428
  52. package/dist/chunks/calendar.qm-kFNQv.js.map +1 -0
  53. package/dist/chunks/card.BEChcEqg.js +223 -0
  54. package/dist/chunks/{card.CoxQ_L0w.js.map → card.BEChcEqg.js.map} +1 -1
  55. package/dist/chunks/{checkbox-group.96n9Cc3W.js → checkbox-group.i3W8WO-7.js} +4 -4
  56. package/dist/chunks/{checkbox-group.96n9Cc3W.js.map → checkbox-group.i3W8WO-7.js.map} +1 -1
  57. package/dist/chunks/{checkbox.C6ATh8f5.js → checkbox.BPrymcRl.js} +68 -61
  58. package/dist/chunks/{checkbox.C6ATh8f5.js.map → checkbox.BPrymcRl.js.map} +1 -1
  59. package/dist/chunks/chip.DFldnqfz.js +72 -0
  60. package/dist/chunks/{chip.CdgpQyXN.js.map → chip.DFldnqfz.js.map} +1 -1
  61. package/dist/chunks/{click-outside.BPylIosK.js → click-outside.B0whuTUU.js} +2 -2
  62. package/dist/chunks/{click-outside.BPylIosK.js.map → click-outside.B0whuTUU.js.map} +1 -1
  63. package/dist/chunks/{code-snippet.DgAuuZF5.js → code-snippet.BG5ZmCrb.js} +113 -106
  64. package/dist/chunks/{code-snippet.DgAuuZF5.js.map → code-snippet.BG5ZmCrb.js.map} +1 -1
  65. package/dist/chunks/{controls-group.C7hOE1F4.js → controls-group.DqRpF9bh.js} +2 -2
  66. package/dist/chunks/{controls-group.C7hOE1F4.js.map → controls-group.DqRpF9bh.js.map} +1 -1
  67. package/dist/chunks/copy.CL893i9-.js +114 -0
  68. package/dist/chunks/{copy.C2kQ1PbI.js.map → copy.CL893i9-.js.map} +1 -1
  69. package/dist/chunks/{country.CaGc08Ps.js → country.15m_ATbO.js} +3 -3
  70. package/dist/chunks/{country.CaGc08Ps.js.map → country.15m_ATbO.js.map} +1 -1
  71. package/dist/chunks/country.types.6a7xxZIR.js +26 -0
  72. package/dist/chunks/{country.types.DjpMGz7a.js.map → country.types.6a7xxZIR.js.map} +1 -1
  73. package/dist/chunks/{dashboard-section.UafHRkMa.js → dashboard-section.C7mfUXOl.js} +3 -3
  74. package/dist/chunks/{dashboard-section.UafHRkMa.js.map → dashboard-section.C7mfUXOl.js.map} +1 -1
  75. package/dist/chunks/{dashed-underline.CcDV2Aks.js → dashed-underline.B50DIXjK.js} +3 -3
  76. package/dist/chunks/{dashed-underline.CcDV2Aks.js.map → dashed-underline.B50DIXjK.js.map} +1 -1
  77. package/dist/chunks/{data-grid-template.CnC4TQvk.js → data-grid-template.CKdZb6EN.js} +4 -4
  78. package/dist/chunks/{data-grid-template.CnC4TQvk.js.map → data-grid-template.CKdZb6EN.js.map} +1 -1
  79. package/dist/chunks/data-grid.DvMe72LK.js +4247 -0
  80. package/dist/chunks/data-grid.DvMe72LK.js.map +1 -0
  81. package/dist/chunks/date-picker.CidHad1p.js +269 -0
  82. package/dist/chunks/date-picker.CidHad1p.js.map +1 -0
  83. package/dist/chunks/date-range-picker.c5OwESTS.js +1027 -0
  84. package/dist/chunks/date-range-picker.c5OwESTS.js.map +1 -0
  85. package/dist/chunks/dialog-page.Bh-7RAwX.js +163 -0
  86. package/dist/chunks/{dialog-page.COfKqjT-.js.map → dialog-page.Bh-7RAwX.js.map} +1 -1
  87. package/dist/chunks/{directive.Dpivxq_t.js → directive.C8kY-ZW-.js} +2 -2
  88. package/dist/chunks/{directive.Dpivxq_t.js.map → directive.C8kY-ZW-.js.map} +1 -1
  89. package/dist/chunks/draggable-handle.CySRx1tb.js +171 -0
  90. package/dist/chunks/draggable-handle.CySRx1tb.js.map +1 -0
  91. package/dist/chunks/{dropdown-tag.Ysrac5GN.js → dropdown-tag.wcJ6Mgqe.js} +5 -5
  92. package/dist/chunks/{dropdown-tag.Ysrac5GN.js.map → dropdown-tag.wcJ6Mgqe.js.map} +1 -1
  93. package/dist/chunks/dropdown.DHoL50gV.js +1214 -0
  94. package/dist/chunks/dropdown.DHoL50gV.js.map +1 -0
  95. package/dist/chunks/error-message.Dyvrw6ZB.js +55 -0
  96. package/dist/chunks/error-message.Dyvrw6ZB.js.map +1 -0
  97. package/dist/chunks/field-label.DZYFjFgr.js +111 -0
  98. package/dist/chunks/field-label.DZYFjFgr.js.map +1 -0
  99. package/dist/chunks/{file-uploader.Bfd1uUMe.js → file-uploader.Dbg3vfZ_.js} +606 -584
  100. package/dist/chunks/{file-uploader.Bfd1uUMe.js.map → file-uploader.Dbg3vfZ_.js.map} +1 -1
  101. package/dist/chunks/{filter-bar.CkAjLQol.js → filter-bar.Dt-cU3zy.js} +1559 -1471
  102. package/dist/chunks/filter-bar.Dt-cU3zy.js.map +1 -0
  103. package/dist/chunks/fixed-scroller.yVsaQzy5.js +157 -0
  104. package/dist/chunks/{fixed-scroller.DtkaGyMD.js.map → fixed-scroller.yVsaQzy5.js.map} +1 -1
  105. package/dist/chunks/{footer-actions.BcYSsoUg.js → footer-actions.CYBdKDPo.js} +2 -2
  106. package/dist/chunks/{footer-actions.BcYSsoUg.js.map → footer-actions.CYBdKDPo.js.map} +1 -1
  107. package/dist/chunks/form-layout-title.B3ePK3yi.js +253 -0
  108. package/dist/chunks/form-layout-title.B3ePK3yi.js.map +1 -0
  109. package/dist/chunks/{header-meta.Bym9AlQm.js → header-meta.COak4D8-.js} +98 -84
  110. package/dist/chunks/{header-meta.Bym9AlQm.js.map → header-meta.COak4D8-.js.map} +1 -1
  111. package/dist/chunks/{header-with-views.Djba6iol.js → header-with-views.DqioajcO.js} +1091 -1070
  112. package/dist/chunks/{header-with-views.Djba6iol.js.map → header-with-views.DqioajcO.js.map} +1 -1
  113. package/dist/chunks/{header.o-7SyHtU.js → header.C21yzWrk.js} +3 -3
  114. package/dist/chunks/{header.o-7SyHtU.js.map → header.C21yzWrk.js.map} +1 -1
  115. package/dist/chunks/{info-icon.BUala_wq.js → info-icon.B3MDsjMu.js} +2 -2
  116. package/dist/chunks/{info-icon.BUala_wq.js.map → info-icon.B3MDsjMu.js.map} +1 -1
  117. package/dist/chunks/input-field-password.DyUphhxB.js +353 -0
  118. package/dist/chunks/{input-field-password.DZytmp_p.js.map → input-field-password.DyUphhxB.js.map} +1 -1
  119. package/dist/chunks/{input-field-phone-number.CxblrmaU.js → input-field-phone-number.BXVaC5ra.js} +12 -5
  120. package/dist/chunks/{input-field-phone-number.CxblrmaU.js.map → input-field-phone-number.BXVaC5ra.js.map} +1 -1
  121. package/dist/chunks/input-field.DkUFvIWt.js +326 -0
  122. package/dist/chunks/input-field.DkUFvIWt.js.map +1 -0
  123. package/dist/chunks/input-time.WI_qdwJc.js +122 -0
  124. package/dist/chunks/input-time.WI_qdwJc.js.map +1 -0
  125. package/dist/chunks/{inspector.B9k4tJWe.js → inspector.DMhKNW1K.js} +70 -63
  126. package/dist/chunks/{inspector.B9k4tJWe.js.map → inspector.DMhKNW1K.js.map} +1 -1
  127. package/dist/chunks/{list-item.DO5uULke.js → list-item.BHvXpqaS.js} +2 -2
  128. package/dist/chunks/{list-item.DO5uULke.js.map → list-item.BHvXpqaS.js.map} +1 -1
  129. package/dist/chunks/{listbox-option-tag.Cvplth7d.js → listbox-option-tag.CVxaZqbc.js} +2 -2
  130. package/dist/chunks/{listbox-option-tag.Cvplth7d.js.map → listbox-option-tag.CVxaZqbc.js.map} +1 -1
  131. package/dist/chunks/{modal-fullscreen.CuKVyTWb.js → modal-fullscreen.c6QphYQo.js} +54 -47
  132. package/dist/chunks/{modal-fullscreen.CuKVyTWb.js.map → modal-fullscreen.c6QphYQo.js.map} +1 -1
  133. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js} +48 -41
  134. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.DmPw0l5Y.js.map → modal.vue_vue_type_script_setup_true_lang.ImqHKH-g.js.map} +1 -1
  135. package/dist/chunks/on-click-outside.BgIzQ2G1.js +108 -0
  136. package/dist/chunks/on-click-outside.BgIzQ2G1.js.map +1 -0
  137. package/dist/chunks/{pagination.dpVc6Yt0.js → pagination.Cu85Lqms.js} +150 -138
  138. package/dist/chunks/{pagination.dpVc6Yt0.js.map → pagination.Cu85Lqms.js.map} +1 -1
  139. package/dist/chunks/{promo-banner.BzveHNOI.js → promo-banner.-H4r_cwj.js} +39 -32
  140. package/dist/chunks/{promo-banner.BzveHNOI.js.map → promo-banner.-H4r_cwj.js.map} +1 -1
  141. package/dist/chunks/{radio-group.Cuiq4mxy.js → radio-group.CfMr1fmW.js} +4 -4
  142. package/dist/chunks/{radio-group.Cuiq4mxy.js.map → radio-group.CfMr1fmW.js.map} +1 -1
  143. package/dist/chunks/{rich-text-editor.DLMiT4f5.js → rich-text-editor.Bf9EWzNk.js} +421 -413
  144. package/dist/chunks/{rich-text-editor.DLMiT4f5.js.map → rich-text-editor.Bf9EWzNk.js.map} +1 -1
  145. package/dist/chunks/search-bar.p6kHCCvT.js +114 -0
  146. package/dist/chunks/{search-bar.CsFyP0_I.js.map → search-bar.p6kHCCvT.js.map} +1 -1
  147. package/dist/chunks/secondary-nav.CaxiyVaO.js +285 -0
  148. package/dist/chunks/secondary-nav.CaxiyVaO.js.map +1 -0
  149. package/dist/chunks/{segmented-control.KeQ5kuR1.js → segmented-control.CQWOO1-J.js} +2 -2
  150. package/dist/chunks/{segmented-control.KeQ5kuR1.js.map → segmented-control.CQWOO1-J.js.map} +1 -1
  151. package/dist/chunks/{selection-card-group.XM11Kk-4.js → selection-card-group.58XZj_SJ.js} +3 -3
  152. package/dist/chunks/{selection-card-group.XM11Kk-4.js.map → selection-card-group.58XZj_SJ.js.map} +1 -1
  153. package/dist/chunks/{sidepanel.b2QZ1Jsx.js → sidepanel.CAVhSs-O.js} +56 -49
  154. package/dist/chunks/{sidepanel.b2QZ1Jsx.js.map → sidepanel.CAVhSs-O.js.map} +1 -1
  155. package/dist/chunks/step.AsX2jAeL.js +268 -0
  156. package/dist/chunks/{step.BlwoLfdw.js.map → step.AsX2jAeL.js.map} +1 -1
  157. package/dist/chunks/structured-list-item.CgJR_ufh.js +112 -0
  158. package/dist/chunks/{structured-list-item.e-8kRleh.js.map → structured-list-item.CgJR_ufh.js.map} +1 -1
  159. package/dist/chunks/{summary-grid.types.CcvOC03H.js → summary-grid.types.CDithi8M.js} +5 -5
  160. package/dist/chunks/{summary-grid.types.CcvOC03H.js.map → summary-grid.types.CDithi8M.js.map} +1 -1
  161. package/dist/chunks/{tab.mR5uUSdp.js → tab.9nyNZiGw.js} +2 -2
  162. package/dist/chunks/{tab.mR5uUSdp.js.map → tab.9nyNZiGw.js.map} +1 -1
  163. package/dist/chunks/{tag.DujMVFh-.js → tag.YN2r-Pp3.js} +2 -2
  164. package/dist/chunks/{tag.DujMVFh-.js.map → tag.YN2r-Pp3.js.map} +1 -1
  165. package/dist/chunks/textarea.JGXAlpx9.js +257 -0
  166. package/dist/chunks/{textarea.CHV6Z8nt.js.map → textarea.JGXAlpx9.js.map} +1 -1
  167. package/dist/chunks/timeline-item.BNFPpQz1.js +433 -0
  168. package/dist/chunks/{timeline-item.CaGcRZbt.js.map → timeline-item.BNFPpQz1.js.map} +1 -1
  169. package/dist/chunks/{toast.C2oehk9P.js → toast.De4MTkiH.js} +64 -57
  170. package/dist/chunks/{toast.C2oehk9P.js.map → toast.De4MTkiH.js.map} +1 -1
  171. package/dist/chunks/{tooltip.CbADa_4p.js → tooltip.DHfG2aRt.js} +40 -38
  172. package/dist/chunks/tooltip.DHfG2aRt.js.map +1 -0
  173. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js} +120 -113
  174. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.BOruzlTt.js.map → tutorial.vue_vue_type_script_setup_true_lang.C1cF-adv.js.map} +1 -1
  175. package/dist/chunks/{use-cached-selected-values.ClEJRFAd.js → use-cached-selected-values.Bx8uuky9.js} +436 -410
  176. package/dist/chunks/use-cached-selected-values.Bx8uuky9.js.map +1 -0
  177. package/dist/chunks/{use-country-items.D_3LBe2I.js → use-country-items.Dp7X1r2e.js} +3 -3
  178. package/dist/chunks/{use-country-items.D_3LBe2I.js.map → use-country-items.Dp7X1r2e.js.map} +1 -1
  179. package/dist/chunks/{use-country-phon-code.DoqTGkNr.js → use-country-phon-code.BzcawGpE.js} +107 -104
  180. package/dist/chunks/{use-country-phon-code.DoqTGkNr.js.map → use-country-phon-code.BzcawGpE.js.map} +1 -1
  181. package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js → use-date-input-formatter.BOuXpRb-.js} +2 -2
  182. package/dist/chunks/{use-date-input-formatter.CDRzd-hW.js.map → use-date-input-formatter.BOuXpRb-.js.map} +1 -1
  183. package/dist/chunks/use-touch-device.DTqFAbXh.js +11 -0
  184. package/dist/chunks/use-touch-device.DTqFAbXh.js.map +1 -0
  185. package/dist/click-outside.js +1 -1
  186. package/dist/code-snippet.js +1 -1
  187. package/dist/country.js +3 -3
  188. package/dist/dashboard-template.js +1 -1
  189. package/dist/dashed-underline.js +1 -1
  190. package/dist/data-grid-template.js +1 -1
  191. package/dist/data-grid.js +1 -1
  192. package/dist/date-picker.js +2 -2
  193. package/dist/date-range-picker.js +2 -2
  194. package/dist/draggable.js +1383 -0
  195. package/dist/draggable.js.map +1 -0
  196. package/dist/dropdown.js +10 -11
  197. package/dist/dropdown.js.map +1 -1
  198. package/dist/file-uploader.js +1 -1
  199. package/dist/filter-bar.js +1 -1
  200. package/dist/form-layout.js +1 -1
  201. package/dist/header-with-views.js +1 -1
  202. package/dist/header.js +1 -1
  203. package/dist/index.js +284 -279
  204. package/dist/index.js.map +1 -1
  205. package/dist/info-icon.js +1 -1
  206. package/dist/input-field-password.js +1 -1
  207. package/dist/input-field-phone-number.js +1 -1
  208. package/dist/input-field.js +1 -1
  209. package/dist/input-time.js +5 -0
  210. package/dist/input-time.js.map +1 -0
  211. package/dist/inspector.js +1 -1
  212. package/dist/internal.js +26 -25
  213. package/dist/internal.js.map +1 -1
  214. package/dist/list.js +1 -1
  215. package/dist/menu.js +1 -1
  216. package/dist/modal-fullscreen.js +1 -1
  217. package/dist/modal.js +2 -2
  218. package/dist/pagination.js +1 -1
  219. package/dist/popover.js +1 -1
  220. package/dist/promo-banner.js +1 -1
  221. package/dist/radio-group.js +1 -1
  222. package/dist/rich-text-editor.js +1 -1
  223. package/dist/search-bar.js +2 -2
  224. package/dist/secondary-nav.js +1 -1
  225. package/dist/segmented-control.js +1 -1
  226. package/dist/selection-card.js +1 -1
  227. package/dist/sidepanel.js +1 -1
  228. package/dist/stepper.js +1 -1
  229. package/dist/structured-list.js +1 -1
  230. package/dist/summary-grid.js +1 -1
  231. package/dist/tabs.js +1 -1
  232. package/dist/tag.js +1 -1
  233. package/dist/textarea.js +1 -1
  234. package/dist/timeline.js +1 -1
  235. package/dist/toast.js +1 -1
  236. package/dist/tutorial.js +1 -1
  237. package/dist/web-types.json +1 -1
  238. package/package.json +7 -10
  239. package/dist/assets/dropdown-default-textbox.css +0 -1
  240. package/dist/chunks/accordion-item.BX1KrLMl.js +0 -134
  241. package/dist/chunks/action-bar.DLMaIUWW.js +0 -329
  242. package/dist/chunks/ai-tag.DK63ExDc.js +0 -130
  243. package/dist/chunks/anchor-scroller.NhjLDBZI.js +0 -207
  244. package/dist/chunks/calendar.DcCqkSNJ.js.map +0 -1
  245. package/dist/chunks/card.CoxQ_L0w.js +0 -216
  246. package/dist/chunks/chip.CdgpQyXN.js +0 -65
  247. package/dist/chunks/copy.C2kQ1PbI.js +0 -107
  248. package/dist/chunks/country.types.DjpMGz7a.js +0 -19
  249. package/dist/chunks/data-grid.BSIXLRm7.js +0 -4014
  250. package/dist/chunks/data-grid.BSIXLRm7.js.map +0 -1
  251. package/dist/chunks/date-picker.dlzZ_-5f.js +0 -231
  252. package/dist/chunks/date-picker.dlzZ_-5f.js.map +0 -1
  253. package/dist/chunks/date-range-picker.DC6CK0As.js +0 -995
  254. package/dist/chunks/date-range-picker.DC6CK0As.js.map +0 -1
  255. package/dist/chunks/debounce.DUTu11PS.js +0 -10
  256. package/dist/chunks/debounce.DUTu11PS.js.map +0 -1
  257. package/dist/chunks/dialog-page.COfKqjT-.js +0 -156
  258. package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js +0 -408
  259. package/dist/chunks/dropdown-default-textbox.bq9AlGzJ.js.map +0 -1
  260. package/dist/chunks/dropdown.MhmX1P9o.js +0 -799
  261. package/dist/chunks/dropdown.MhmX1P9o.js.map +0 -1
  262. package/dist/chunks/error-message.DCgo8q20.js +0 -143
  263. package/dist/chunks/error-message.DCgo8q20.js.map +0 -1
  264. package/dist/chunks/filter-bar.CkAjLQol.js.map +0 -1
  265. package/dist/chunks/fixed-scroller.DtkaGyMD.js +0 -150
  266. package/dist/chunks/form-layout-title.DW5Kg1rh.js +0 -230
  267. package/dist/chunks/form-layout-title.DW5Kg1rh.js.map +0 -1
  268. package/dist/chunks/input-field-password.DZytmp_p.js +0 -346
  269. package/dist/chunks/input-field.CfU0ZKtL.js +0 -315
  270. package/dist/chunks/input-field.CfU0ZKtL.js.map +0 -1
  271. package/dist/chunks/on-click-outside.ZUMLlxE_.js +0 -90
  272. package/dist/chunks/on-click-outside.ZUMLlxE_.js.map +0 -1
  273. package/dist/chunks/search-bar.CsFyP0_I.js +0 -107
  274. package/dist/chunks/secondary-nav.CLBdq98c.js +0 -138
  275. package/dist/chunks/secondary-nav.CLBdq98c.js.map +0 -1
  276. package/dist/chunks/step.BlwoLfdw.js +0 -259
  277. package/dist/chunks/structured-list-item.e-8kRleh.js +0 -105
  278. package/dist/chunks/textarea.CHV6Z8nt.js +0 -247
  279. package/dist/chunks/timeline-item.CaGcRZbt.js +0 -419
  280. package/dist/chunks/tooltip.CbADa_4p.js.map +0 -1
  281. package/dist/chunks/use-cached-selected-values.ClEJRFAd.js.map +0 -1
  282. package/dist/draggable-handle.js +0 -155
  283. package/dist/draggable-handle.js.map +0 -1
@@ -0,0 +1,223 @@
1
+ import { defineComponent as q, useSlots as G, ref as A, watch as L, computed as n, openBlock as l, createElementBlock as r, withKeys as v, normalizeClass as c, unref as o, renderSlot as b, createCommentVNode as d, createElementVNode as y, createBlock as _, mergeProps as J, withCtx as w, createVNode as E, Transition as X, normalizeStyle as Q } from "vue";
2
+ import { B as M, d as Z } from "./typography.B3J6_tYk.js";
3
+ import { C as ee } from "./chevron-down.XeE-LBV_.js";
4
+ import { C as te } from "./chevron-up.Cmgl2a3x.js";
5
+ import { u as ae } from "./use-expandable-content-height.B5jjRvCz.js";
6
+ import { u as ne } from "./use-has-slot.CyMiImRQ.js";
7
+ import { g as oe } from "./generate-uid.DBWe4g6T.js";
8
+ import { u as le } from "./index.B875RXHM.js";
9
+ import { o as de } from "./resize.Bqks3WUm.js";
10
+ import { B as se } from "./button-actions.types.BptAXjD8.js";
11
+ import { B as ie } from "./button-actions.DLiM8KZL.js";
12
+ import { _ as re } from "./_plugin-vue_export-helper.CHgC5LLL.js";
13
+ import "../assets/card.css";
14
+ var I = /* @__PURE__ */ ((s) => (s.PRIMARY = "primary", s.SECONDARY = "secondary", s))(I || {}), p = /* @__PURE__ */ ((s) => (s.DEFAULT = "default", s.SMALL = "small", s))(p || {});
15
+ const T = {
16
+ "de-DE": { hideContent: "Inhalt ausblenden", showContent: "Inhalt anzeigen" },
17
+ "en-GB": { hideContent: "Hide content", showContent: "Show content" },
18
+ "en-US": { hideContent: "Hide content", showContent: "Show content" },
19
+ "es-ES": { hideContent: "Ocultar contenido", showContent: "Mostrar contenido" },
20
+ "es-MX": { hideContent: "Ocultar contenido", showContent: "Mostrar contenido" },
21
+ "fr-FR": { hideContent: "Masquer le contenu", showContent: "Afficher le contenu" },
22
+ "it-IT": { hideContent: "Nascondi contenuto", showContent: "Mostra contenuto" },
23
+ "ja-JP": { hideContent: "コンテンツを非表示", showContent: "コンテンツを表示" },
24
+ "pt-BR": { hideContent: "Ocultar conteúdo", showContent: "Mostrar conteúdo" },
25
+ "zh-CN": { hideContent: "隐藏内容", showContent: "显示内容" }
26
+ }, ce = ["tabindex"], ue = {
27
+ key: 0,
28
+ class: "b-card__image"
29
+ }, pe = ["tabindex", "aria-controls", "aria-expanded", "role"], be = { class: "b-card__header-wrapper" }, he = {
30
+ key: 0,
31
+ class: "b-card__header-slot-wrapper"
32
+ }, ve = ["id"], _e = {
33
+ i18n: { messages: T },
34
+ name: "bento-card"
35
+ }, Ce = /* @__PURE__ */ q({
36
+ ..._e,
37
+ props: {
38
+ actions: { default: null },
39
+ actionsLayout: { default: se.BUTTONS_END },
40
+ background: { default: I.PRIMARY },
41
+ clickable: { type: Boolean, default: !1 },
42
+ closed: { type: Boolean, default: !1 },
43
+ disabled: { type: Boolean, default: !1 },
44
+ expandable: { type: Boolean, default: !1 },
45
+ titleSize: { default: p.DEFAULT }
46
+ },
47
+ emits: ["click", "expanded"],
48
+ setup(s, { emit: D }) {
49
+ const { t: k } = le({ messages: T }), z = G(), a = ne(z), e = s, C = D, u = A(null), g = oe("card"), i = A(!e.closed);
50
+ L(
51
+ () => e.closed,
52
+ (t) => {
53
+ i.value = !t;
54
+ }
55
+ );
56
+ const h = n(() => a("default") || a("description") || a("header")), H = n(() => a("default") || a("header")), f = n(
57
+ () => (a("content") || e.actions?.length) && (!e.expandable || e.expandable && i.value)
58
+ ), N = n(() => e.clickable && !e.disabled ? 0 : -1), U = n(() => e.expandable && !e.disabled ? 0 : -1), R = n(() => ({
59
+ [`b-card--${e.background}`]: e.background,
60
+ "b-card--clickable": e.clickable,
61
+ "b-card--expandable": e.expandable,
62
+ "b-card--disabled": (e.clickable || e.expandable) && e.disabled
63
+ })), $ = n(() => ({
64
+ "b-card__header--expandable": e.expandable,
65
+ "b-card__header--without-body": !e.expandable && !f.value
66
+ })), O = n(() => ({
67
+ "b-card__toggle--small-text": e.titleSize === p.SMALL
68
+ })), F = n(() => ({
69
+ "b-card__body--expandable": e.expandable && a("content"),
70
+ "b-card__body--without-header": !e.expandable && !h.value
71
+ })), K = n(() => ({
72
+ "b-card__content--without-header": !e.expandable && !h.value,
73
+ "b-card__content--expandable": e.expandable
74
+ })), P = n(() => {
75
+ const t = !e.expandable && e.actions && !a("content");
76
+ return {
77
+ "b-card__actions--without-content": t,
78
+ "b-card__actions--without-content-and-with-header": t && h.value
79
+ };
80
+ }), V = n(() => ({
81
+ "b-card__title-wrapper--truncated": a("header")
82
+ })), W = n(
83
+ () => ({
84
+ el: "div",
85
+ variant: e.titleSize === p.DEFAULT ? "title" : "body",
86
+ strongest: e.titleSize === p.SMALL,
87
+ wide: e.titleSize === p.SMALL
88
+ })
89
+ ), { updateContentHeight: x, contentHeight: B } = ae(u, i), Y = n(
90
+ () => e.expandable && B.value ? { "max-height": B.value } : {}
91
+ );
92
+ L(
93
+ () => u.value,
94
+ () => {
95
+ let t = null;
96
+ !t && u.value && (t = de(u.value, () => {
97
+ u.value && x();
98
+ }));
99
+ }
100
+ );
101
+ const m = () => {
102
+ !e.disabled && e.expandable && (i.value = !i.value, C("expanded", i.value), x());
103
+ }, j = () => {
104
+ e.disabled || (C("click"), e.clickable || Z(
105
+ 'BentoCard "@click" property',
106
+ 'Use the BentoCard "@click" with the "clickable" property to enable accessible styles.',
107
+ "2.0.0"
108
+ ));
109
+ }, S = () => {
110
+ e.clickable && !e.disabled && C("click");
111
+ };
112
+ return (t, fe) => (l(), r("div", {
113
+ class: c(["b-card", R.value]),
114
+ tabindex: N.value,
115
+ "data-testid": "card",
116
+ onClick: j,
117
+ onKeydown: [
118
+ v(S, ["enter"]),
119
+ v(S, ["space"])
120
+ ]
121
+ }, [
122
+ o(a)("image") ? (l(), r("div", ue, [
123
+ b(t.$slots, "image", {}, void 0, !0)
124
+ ])) : d("", !0),
125
+ h.value ? (l(), r("div", {
126
+ key: 1,
127
+ class: c(["b-card__header", $.value]),
128
+ tabindex: U.value,
129
+ "aria-controls": t.expandable && f.value ? o(g) : null,
130
+ "aria-expanded": t.expandable ? `${i.value}` : null,
131
+ role: t.expandable ? "button" : null,
132
+ onClick: m,
133
+ onKeypress: [
134
+ v(m, ["enter"]),
135
+ v(m, ["space"])
136
+ ]
137
+ }, [
138
+ y("div", be, [
139
+ H.value ? (l(), r("div", he, [
140
+ y("div", {
141
+ class: c(["b-card__title-wrapper", V.value])
142
+ }, [
143
+ t.expandable ? (l(), r("div", {
144
+ key: 0,
145
+ class: c(["b-card__toggle", O.value])
146
+ }, [
147
+ i.value ? (l(), _(o(te), {
148
+ key: 0,
149
+ "svg-title": o(k)("hideContent"),
150
+ "aria-hidden": "true"
151
+ }, null, 8, ["svg-title"])) : (l(), _(o(ee), {
152
+ key: 1,
153
+ "svg-title": o(k)("showContent"),
154
+ "aria-hidden": "true"
155
+ }, null, 8, ["svg-title"]))
156
+ ], 2)) : d("", !0),
157
+ o(a)("default") ? (l(), _(o(M), J({
158
+ key: 1,
159
+ class: "b-card__title"
160
+ }, W.value), {
161
+ default: w(() => [
162
+ b(t.$slots, "default", {}, void 0, !0)
163
+ ]),
164
+ _: 3
165
+ }, 16)) : d("", !0)
166
+ ], 2),
167
+ o(a)("header") ? b(t.$slots, "header", { key: 0 }, void 0, !0) : d("", !0)
168
+ ])) : d("", !0),
169
+ o(a)("description") ? (l(), _(o(M), {
170
+ key: 1,
171
+ class: "b-card__description",
172
+ el: "div",
173
+ variant: "body"
174
+ }, {
175
+ default: w(() => [
176
+ b(t.$slots, "description", {}, void 0, !0)
177
+ ]),
178
+ _: 3
179
+ })) : d("", !0)
180
+ ])
181
+ ], 42, pe)) : d("", !0),
182
+ E(X, { name: "b-card__animation" }, {
183
+ default: w(() => [
184
+ f.value ? (l(), r("div", {
185
+ key: 0,
186
+ class: "b-card__wrapper",
187
+ style: Q(Y.value)
188
+ }, [
189
+ y("div", {
190
+ id: t.expandable ? o(g) : null,
191
+ ref_key: "contentDiv",
192
+ ref: u,
193
+ class: c(["b-card__body", F.value])
194
+ }, [
195
+ o(a)("content") ? (l(), r("div", {
196
+ key: 0,
197
+ class: c(["b-card__content", K.value])
198
+ }, [
199
+ b(t.$slots, "content", {}, void 0, !0)
200
+ ], 2)) : d("", !0),
201
+ t.actions ? (l(), r("div", {
202
+ key: 1,
203
+ class: c(["b-card__actions", P.value])
204
+ }, [
205
+ E(o(ie), {
206
+ actions: t.actions,
207
+ layout: t.actionsLayout
208
+ }, null, 8, ["actions", "layout"])
209
+ ], 2)) : d("", !0)
210
+ ], 10, ve)
211
+ ], 4)) : d("", !0)
212
+ ]),
213
+ _: 3
214
+ })
215
+ ], 42, ce));
216
+ }
217
+ }), Ie = /* @__PURE__ */ re(Ce, [["__scopeId", "data-v-590c85ea"]]);
218
+ export {
219
+ I as B,
220
+ p as a,
221
+ Ie as c
222
+ };
223
+ //# sourceMappingURL=card.BEChcEqg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.CoxQ_L0w.js","sources":["../../../vue2/src/components/card/card.types.ts","../../../vue2/src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div\n class=\"b-card\"\n :class=\"cardConditionalClasses\"\n :tabindex=\"tabIndex\"\n data-testid=\"card\"\n @click=\"onClick\"\n @keydown.enter=\"onKeyDown\"\n @keydown.space=\"onKeyDown\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"headerTabIndex\"\n :aria-controls=\"expandable && showCardBody ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, type BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = withDefaults(\n defineProps<{\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines the color of card background\n */\n background?: BentoCardBackground | `${BentoCardBackground}`;\n\n /**\n * Makes the whole card clickable\n */\n clickable?: boolean;\n\n /**\n * Sets the expandable card in a closed state\n */\n closed?: boolean;\n\n /**\n * Disables the expandable card\n */\n disabled?: boolean;\n\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable?: boolean;\n\n /**\n * Defines the title size of the card header\n */\n titleSize?: BentoCardTitleSize | `${BentoCardTitleSize}`;\n }>(),\n {\n actions: null,\n actionsLayout: BentoButtonActionsLayout.BUTTONS_END,\n background: BentoCardBackground.PRIMARY,\n clickable: false,\n closed: false,\n disabled: false,\n expandable: false,\n titleSize: BentoCardTitleSize.DEFAULT,\n }\n );\n\n const emit = defineEmits<{\n (e: 'click');\n (e: 'expanded', isExpanded: boolean);\n }>();\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.clickable && !props.disabled ? 0 : -1));\n const headerTabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--clickable': props.clickable,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': (props.clickable || props.expandable) && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n }) as InstanceType<typeof BentoTypography>['$props']\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n\n if (!props.clickable) {\n deprecate(\n 'BentoCard \"@click\" property',\n `Use the BentoCard \"@click\" with the \"clickable\" property to enable accessible styles.`,\n '2.0.0'\n );\n }\n }\n };\n\n const onKeyDown = () => {\n if (props.clickable && !props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","t","useI18n","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","contentDiv","ref","cardId","generateUid","showContent","watch","value","showHeader","computed","showTitleWrapper","showCardBody","tabIndex","headerTabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick","deprecate","onKeyDown"],"mappings":"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"}
1
+ {"version":3,"file":"card.BEChcEqg.js","sources":["../../../vue2/src/components/card/card.types.ts","../../../vue2/src/components/card/card.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardBackground {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCardTitleSize {\n DEFAULT = 'default',\n SMALL = 'small',\n}\n","<template>\n <div\n class=\"b-card\"\n :class=\"cardConditionalClasses\"\n :tabindex=\"tabIndex\"\n data-testid=\"card\"\n @click=\"onClick\"\n @keydown.enter=\"onKeyDown\"\n @keydown.space=\"onKeyDown\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-card__image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n v-if=\"showHeader\"\n class=\"b-card__header\"\n :class=\"cardHeaderConditionalClasses\"\n :tabindex=\"headerTabIndex\"\n :aria-controls=\"expandable && showCardBody ? cardId : null\"\n :aria-expanded=\"expandable ? `${showContent}` : null\"\n :role=\"expandable ? 'button' : null\"\n @click=\"toggleExpansion\"\n @keypress.enter=\"toggleExpansion\"\n @keypress.space=\"toggleExpansion\"\n >\n <div class=\"b-card__header-wrapper\">\n <div v-if=\"showTitleWrapper\" class=\"b-card__header-slot-wrapper\">\n <div class=\"b-card__title-wrapper\" :class=\"cardTitleWrapperConditionalClasses\">\n <div v-if=\"expandable\" class=\"b-card__toggle\" :class=\"cardToggleConditionalClasses\">\n <chevron-up-icon v-if=\"showContent\" :svg-title=\"t('hideContent')\" aria-hidden=\"true\" />\n <chevron-down-icon v-else :svg-title=\"t('showContent')\" aria-hidden=\"true\" />\n </div>\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-card__title\" v-bind=\"typography\">\n <slot />\n </bento-typography>\n </div>\n\n <template v-if=\"hasSlot('header')\">\n <slot name=\"header\"></slot>\n </template>\n </div>\n\n <bento-typography v-if=\"hasSlot('description')\" class=\"b-card__description\" el=\"div\" variant=\"body\">\n <slot name=\"description\" />\n </bento-typography>\n </div>\n </div>\n\n <Transition name=\"b-card__animation\">\n <div v-if=\"showCardBody\" class=\"b-card__wrapper\" :style=\"contentMaxHeight\">\n <div\n :id=\"expandable ? cardId : null\"\n ref=\"contentDiv\"\n class=\"b-card__body\"\n :class=\"cardBodyConditionalClasses\"\n >\n <div v-if=\"hasSlot('content')\" class=\"b-card__content\" :class=\"cardContentConditionalClasses\">\n <slot name=\"content\" />\n </div>\n\n <div v-if=\"actions\" class=\"b-card__actions\" :class=\"cardActionsConditionalClasses\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </div>\n </div>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, useSlots, watch } from 'vue';\n\n // Components\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, BentoButtonActionsLayout, type BentoButtonActionsList } from '@/components/button';\n import { BentoCardBackground, BentoCardTitleSize } from '@/components/card/card.types';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n\n // Composables\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n\n import messages from './messages.json';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const props = withDefaults(\n defineProps<{\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines the color of card background\n */\n background?: BentoCardBackground | `${BentoCardBackground}`;\n\n /**\n * Makes the whole card clickable\n */\n clickable?: boolean;\n\n /**\n * Sets the expandable card in a closed state\n */\n closed?: boolean;\n\n /**\n * Disables the expandable card\n */\n disabled?: boolean;\n\n /**\n * The whole content of the card will be expandable in accordion manner\n */\n expandable?: boolean;\n\n /**\n * Defines the title size of the card header\n */\n titleSize?: BentoCardTitleSize | `${BentoCardTitleSize}`;\n }>(),\n {\n actions: null,\n actionsLayout: BentoButtonActionsLayout.BUTTONS_END,\n background: BentoCardBackground.PRIMARY,\n clickable: false,\n closed: false,\n disabled: false,\n expandable: false,\n titleSize: BentoCardTitleSize.DEFAULT,\n }\n );\n\n const emit = defineEmits<{\n (e: 'click');\n (e: 'expanded', isExpanded: boolean);\n }>();\n\n const contentDiv = ref<HTMLDivElement>(null);\n\n const cardId = generateUid('card');\n const showContent = ref(!props.closed);\n watch(\n () => props.closed,\n value => {\n showContent.value = !value;\n }\n );\n const showHeader = computed(() => hasSlot('default') || hasSlot('description') || hasSlot('header'));\n const showTitleWrapper = computed(() => hasSlot('default') || hasSlot('header'));\n const showCardBody = computed(\n () =>\n (hasSlot('content') || props.actions?.length) &&\n (!props.expandable || (props.expandable && showContent.value))\n );\n const tabIndex = computed(() => (props.clickable && !props.disabled ? 0 : -1));\n const headerTabIndex = computed(() => (props.expandable && !props.disabled ? 0 : -1));\n\n const cardConditionalClasses = computed(() => ({\n [`b-card--${props.background}`]: props.background,\n 'b-card--clickable': props.clickable,\n 'b-card--expandable': props.expandable,\n 'b-card--disabled': (props.clickable || props.expandable) && props.disabled,\n }));\n\n const cardHeaderConditionalClasses = computed(() => ({\n 'b-card__header--expandable': props.expandable,\n 'b-card__header--without-body': !props.expandable && !showCardBody.value,\n }));\n\n const cardToggleConditionalClasses = computed(() => ({\n 'b-card__toggle--small-text': props.titleSize === BentoCardTitleSize.SMALL,\n }));\n\n const cardBodyConditionalClasses = computed(() => ({\n 'b-card__body--expandable': props.expandable && hasSlot('content'),\n 'b-card__body--without-header': !props.expandable && !showHeader.value,\n }));\n\n const cardContentConditionalClasses = computed(() => ({\n 'b-card__content--without-header': !props.expandable && !showHeader.value,\n 'b-card__content--expandable': props.expandable,\n }));\n\n const cardActionsConditionalClasses = computed(() => {\n const isNotExpandableWithoutContent = !props.expandable && props.actions && !hasSlot('content');\n\n return {\n 'b-card__actions--without-content': isNotExpandableWithoutContent,\n 'b-card__actions--without-content-and-with-header': isNotExpandableWithoutContent && showHeader.value,\n };\n });\n\n const cardTitleWrapperConditionalClasses = computed(() => ({\n 'b-card__title-wrapper--truncated': hasSlot('header'),\n }));\n\n const typography = computed(\n () =>\n ({\n el: 'div',\n variant: props.titleSize === BentoCardTitleSize.DEFAULT ? 'title' : 'body',\n strongest: props.titleSize === BentoCardTitleSize.SMALL,\n wide: props.titleSize === BentoCardTitleSize.SMALL,\n }) as InstanceType<typeof BentoTypography>['$props']\n );\n\n // Toggle open and close logic and animation\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, showContent);\n\n const contentMaxHeight = computed(() =>\n props.expandable && contentHeight.value ? { 'max-height': contentHeight.value } : {}\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n const toggleExpansion = () => {\n if (!props.disabled && props.expandable) {\n showContent.value = !showContent.value;\n emit('expanded', showContent.value);\n updateContentHeight();\n }\n };\n\n const onClick = () => {\n if (!props.disabled) {\n emit('click');\n\n if (!props.clickable) {\n deprecate(\n 'BentoCard \"@click\" property',\n `Use the BentoCard \"@click\" with the \"clickable\" property to enable accessible styles.`,\n '2.0.0'\n );\n }\n }\n };\n\n const onKeyDown = () => {\n if (props.clickable && !props.disabled) {\n emit('click');\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A card is a flexible and composable container.\n * Use cards to represent a single object or to visually group certain content, like legal information within company settings.\n *\n * @example\n * import { BentoCard } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCard },\n * template: `\n * <bento-card>\n * Title of the Card\n * </bento-card>\n * `\n * };\n */\n export default {\n i18n: { messages },\n name: 'bento-card',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./card.scss\" />\n"],"names":["BentoCardBackground","BentoCardBackground2","BentoCardTitleSize","BentoCardTitleSize2","__default__","messages","t","useI18n","slots","useSlots","hasSlot","useHasSlot","props","__props","emit","__emit","contentDiv","ref","cardId","generateUid","showContent","watch","value","showHeader","computed","showTitleWrapper","showCardBody","tabIndex","headerTabIndex","cardConditionalClasses","cardHeaderConditionalClasses","cardToggleConditionalClasses","cardBodyConditionalClasses","cardContentConditionalClasses","cardActionsConditionalClasses","isNotExpandableWithoutContent","cardTitleWrapperConditionalClasses","typography","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","observer","observeSizeOfElement","toggleExpansion","onClick","deprecate","onKeyDown"],"mappings":"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"}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as V, useSlots as q, toRef as L, computed as l, watch as h, ref as T, onMounted as w, openBlock as s, createElementBlock as b, createVNode as I, unref as a, normalizeClass as N, withCtx as n, Fragment as O, renderList as A, createBlock as g, createSlots as R, createTextVNode as y, toDisplayString as v, renderSlot as F, mergeProps as G, createCommentVNode as U } from "vue";
2
- import { B as z } from "./checkbox.C6ATh8f5.js";
2
+ import { B as z } from "./checkbox.BPrymcRl.js";
3
3
  import { g as H } from "./generate-uid.DBWe4g6T.js";
4
4
  import { d as P } from "./typography.B3J6_tYk.js";
5
5
  import { u as Z } from "./use-form-layout-loading.CWbjZiwP.js";
6
6
  import { u as j } from "./form-field.D_2g7vaP.js";
7
- import { C as D } from "./controls-group.C7hOE1F4.js";
8
- import { E as $ } from "./error-message.DCgo8q20.js";
7
+ import { C as D } from "./controls-group.DqRpF9bh.js";
8
+ import { E as $ } from "./error-message.Dyvrw6ZB.js";
9
9
  import { _ as J } from "./_plugin-vue_export-helper.CHgC5LLL.js";
10
10
  import "../assets/checkbox-group.css";
11
11
  var d = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(d || {});
@@ -175,4 +175,4 @@ export {
175
175
  de as B,
176
176
  d as a
177
177
  };
178
- //# sourceMappingURL=checkbox-group.96n9Cc3W.js.map
178
+ //# sourceMappingURL=checkbox-group.i3W8WO-7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-group.96n9Cc3W.js","sources":["../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import { type FormFieldEmits } from '../../../../types/form-field';\nimport type { BentoCheckboxTag } from '../../checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n\nexport type BentoCheckboxGroupEmits = FormFieldEmits<any>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :aria-required=\"required\"\n component-name=\"bento-checkbox-group\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onModelValueUpdate\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, type PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n type BentoCheckboxGroupEmits,\n type BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array as PropType<Array<number | string | null>>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) => Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n });\n\n const emit = defineEmits<BentoCheckboxGroupEmits>();\n\n const slots = useSlots();\n\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits(emit);\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = (name: string) => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onModelValueUpdate = (value: any) => {\n inputValue.value = value;\n emitValue(value);\n };\n\n onMounted(() => {\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n const COMPONENT_NAME = 'bento-checkbox-group';\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default {\n name: COMPONENT_NAME,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","__default__","props","__props","emit","__emit","slots","useSlots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onModelValueUpdate","value","onMounted","deprecate"],"mappings":";;;;;;;;;;AAMO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;yCCiMRE,IAAA,wBAoBAC,IAAA;AAAA,EAAe,MAAAD;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlKA,UAAAE,IAAAC,GA+EAC,IAAAC,GAEAC,IAAAC,EAAA,GAEAC,IAAAC,EAAA,OAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAAC,EAAAV,GAAA,UAAA,CAAA,GACA,EAAA,WAAAW,EAAA,IAAAC,EAAAV,CAAA,GAEAW,IAAAC;AAAA,MAA6B,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,UAAA,CAAA,CAAAR,EAAA,gBAAAA,EAAA;AAAA,IACoD,GAEjFe,IAAAD,EAAA,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,SAAA,CAAA,CAAAR,EAAA,YAAA,GAEAgB,IAAAF,EAAA,OAAA;AAAA,MAA2C,4CAAAd,EAAA,YAAAJ,EAAA;AAAA,IACiD,EAAA,GAM5FqB,IAAA,CAAAC,MAAA,CAAA,CAAAd,EAAAc,CAAA,GACAC,IAAAL,EAAA,MAAAG,EAAA,SAAA,KAAAjB,EAAA,YAAA,UAAA;AAEA,IAAAoB;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,2EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAC,IAAAC,EAAAvB,EAAA,UAAA;AACA,IAAAoB;AAAA,MAAA,MAAApB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAsB,EAAA,QAAAtB,EAAA;AAAA,MAAyB;AAAA,IAC7B;AAGJ,UAAAwB,IAAA,CAAAC,MAAA;AACI,MAAAH,EAAA,QAAAG,GACAd,EAAAc,CAAA;AAAA,IAAe;AAGnB,WAAAC,EAAA,MAAA;AACI,MAAA1B,EAAA,YACI2B;AAAA,QAAA;AAAA,QACI;AAAA;AAAA;AAAA,QACA;AAAA,MAGA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"checkbox-group.i3W8WO-7.js","sources":["../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.types.ts","../../../vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue"],"sourcesContent":["import { type FormFieldEmits } from '../../../../types/form-field';\nimport type { BentoCheckboxTag } from '../../checkbox.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoCheckboxGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoCheckboxGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n hasError?: boolean;\n errorMessage?: string;\n readonly?: boolean;\n tag?: BentoCheckboxTag;\n}\n\nexport type BentoCheckboxGroupItems = Array<BentoCheckboxGroupItem>;\n\nexport type BentoCheckboxGroupEmits = FormFieldEmits<any>;\n","<template>\n <div class=\"b-checkbox-group\">\n <controls-group\n class=\"b-checkbox-group__checkboxes\"\n :aria-describedby=\"shouldShowGroupErrorMessage ? errorId : ''\"\n :aria-required=\"required\"\n component-name=\"bento-checkbox-group\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :hide-label=\"hideLabel\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-checkbox\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :has-error=\"shouldShowGroupError || item.hasError\"\n :error-message=\"shouldShowGroupError ? null : item.errorMessage\"\n :readonly=\"isReadOnly || item.readonly\"\n :tag=\"item.tag\"\n @update:model-value=\"onModelValueUpdate\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasContentSlot('content')\" #content>\n <slot name=\"content\" v-bind=\"item\"></slot>\n </template>\n </bento-checkbox>\n </controls-group>\n <error-message\n v-if=\"shouldShowGroupErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-checkbox-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, type PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup } from '@/components/internal/controls-group';\n import { ErrorMessage } from '@/components/internal/error-message';\n import {\n type BentoCheckboxGroupEmits,\n type BentoCheckboxGroupItems,\n BentoCheckboxGroupVariant,\n } from './checkbox-group.types';\n import BentoCheckbox from '@/components/checkbox/checkbox.vue';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n const props = defineProps({\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Renders all checkboxes in an error state with an error message.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the checkbox group is associated with. Defaults to null, as a checkbox group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all checkboxes in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The checkbox group's items.\n */\n items: { type: Array as PropType<BentoCheckboxGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoCheckboxButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: Array as PropType<Array<number | string | null>>, default: () => [] },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all checkboxes in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The checkbox group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoCheckboxGroupVariant | `${BentoCheckboxGroupVariant}`>,\n default: BentoCheckboxGroupVariant.VERTICAL,\n validator: (value: BentoCheckboxGroupVariant) => Object.values(BentoCheckboxGroupVariant).includes(value),\n },\n });\n\n const emit = defineEmits<BentoCheckboxGroupEmits>();\n\n const slots = useSlots();\n\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits(emit);\n\n const shouldShowGroupError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowGroupErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-checkbox-group__checkboxes--horizontal': props.variant === BentoCheckboxGroupVariant.HORIZONTAL,\n }));\n\n // Slots logic\n // Temporary, use-has-slots composable doesn't currently work for\n // vue3 named scoped slots\n const hasContentSlot = (name: string) => !!slots[name];\n const shouldShowSlotsError = computed(() => hasContentSlot('content') && props.variant !== 'vertical');\n\n watch(\n shouldShowSlotsError,\n newValue => {\n if (newValue) {\n throw new Error('The content slot is only available for the vertical checkbox group layout');\n }\n },\n { immediate: true }\n );\n\n const inputValue = ref(props.modelValue);\n watch(\n () => props.modelValue,\n () => {\n inputValue.value = props.modelValue;\n }\n );\n\n const onModelValueUpdate = (value: any) => {\n inputValue.value = value;\n emitValue(value);\n };\n\n onMounted(() => {\n if (props.hasError) {\n deprecate(\n 'BentoCheckboxGroup \"hasError\" property',\n `Use the BentoCheckboxGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-checkbox-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n const COMPONENT_NAME = 'bento-checkbox-group';\n /**\n * A checkbox group component should be used whenever it is necessary to group a set of checkboxes that are related together\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoCheckboxGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoCheckboxGroup },\n * template: `\n * <bento-checkbox-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your sub label' },\n * ]\"\n * />\n * `\n * };\n */\n export default {\n name: COMPONENT_NAME,\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group.scss\" />\n"],"names":["BentoCheckboxGroupVariant","BentoCheckboxGroupVariant2","COMPONENT_NAME","__default__","props","__props","emit","__emit","slots","useSlots","errorId","generateUid","isReadOnly","useFormLayoutFieldLoading","toRef","emitValue","useFormFieldEmits","shouldShowGroupError","computed","shouldShowGroupErrorMessage","conditionalClasses","hasContentSlot","name","shouldShowSlotsError","watch","newValue","inputValue","ref","onModelValueUpdate","value","onMounted","deprecate"],"mappings":";;;;;;;;;;AAMO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA;yCCiMRE,IAAA,wBAoBAC,IAAA;AAAA,EAAe,MAAAD;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlKA,UAAAE,IAAAC,GA+EAC,IAAAC,GAEAC,IAAAC,EAAA,GAEAC,IAAAC,EAAA,OAAA,GACA,EAAA,YAAAC,EAAA,IAAAC,EAAAC,EAAAV,GAAA,UAAA,CAAA,GACA,EAAA,WAAAW,EAAA,IAAAC,EAAAV,CAAA,GAEAW,IAAAC;AAAA,MAA6B,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,UAAA,CAAA,CAAAR,EAAA,gBAAAA,EAAA;AAAA,IACoD,GAEjFe,IAAAD,EAAA,MAAA,CAAAd,EAAA,YAAA,CAAAQ,EAAA,SAAA,CAAA,CAAAR,EAAA,YAAA,GAEAgB,IAAAF,EAAA,OAAA;AAAA,MAA2C,4CAAAd,EAAA,YAAAJ,EAAA;AAAA,IACiD,EAAA,GAM5FqB,IAAA,CAAAC,MAAA,CAAA,CAAAd,EAAAc,CAAA,GACAC,IAAAL,EAAA,MAAAG,EAAA,SAAA,KAAAjB,EAAA,YAAA,UAAA;AAEA,IAAAoB;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA,MAAA,2EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAGtB,UAAAC,IAAAC,EAAAvB,EAAA,UAAA;AACA,IAAAoB;AAAA,MAAA,MAAApB,EAAA;AAAA,MACgB,MAAA;AAER,QAAAsB,EAAA,QAAAtB,EAAA;AAAA,MAAyB;AAAA,IAC7B;AAGJ,UAAAwB,IAAA,CAAAC,MAAA;AACI,MAAAH,EAAA,QAAAG,GACAd,EAAAc,CAAA;AAAA,IAAe;AAGnB,WAAAC,EAAA,MAAA;AACI,MAAA1B,EAAA,YACI2B;AAAA,QAAA;AAAA,QACI;AAAA;AAAA;AAAA,QACA;AAAA,MAGA;AAAA,IAER,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,25 +1,32 @@
1
- import { defineComponent as W, toRefs as T, computed as a, ref as _, onMounted as X, useAttrs as Z, resolveComponent as p, openBlock as t, createElementBlock as D, mergeProps as g, createVNode as x, createBlock as n, withCtx as i, createElementVNode as ee, renderSlot as k, createTextVNode as U, toDisplayString as ae, createCommentVNode as s } from "vue";
1
+ import { defineComponent as Y, toRefs as V, computed as a, ref as D, onMounted as Q, useAttrs as W, resolveComponent as b, openBlock as t, createElementBlock as _, mergeProps as v, createVNode as Z, createBlock as n, withCtx as i, createElementVNode as ee, renderSlot as g, createTextVNode as M, toDisplayString as ae, createCommentVNode as s } from "vue";
2
2
  import { B as oe } from "./typography.B3J6_tYk.js";
3
3
  import { C as te } from "./checkbox-input.CVFQCfZM.js";
4
- import { C as L } from "./minus-small.CnYLTuSv.js";
4
+ import { C as N } from "./minus-small.CnYLTuSv.js";
5
5
  import { u as re } from "./use-default-slot-validator.BzHcrgmy.js";
6
6
  import { u as le } from "./use-has-slot.CyMiImRQ.js";
7
- import { g as M } from "./generate-uid.DBWe4g6T.js";
7
+ import { g as U } from "./generate-uid.DBWe4g6T.js";
8
8
  import { g as S } from "./get-slot-text.8Fbl1GOr.js";
9
9
  import { u as ne } from "./index.B875RXHM.js";
10
10
  import { u as se } from "./aria-label.CaUURpnB.js";
11
- import { B as ie } from "./tag.DujMVFh-.js";
12
- import { E as de } from "./error-message.DCgo8q20.js";
13
- import { _ as ue } from "./_plugin-vue_export-helper.CHgC5LLL.js";
11
+ import { B as ie } from "./tag.YN2r-Pp3.js";
12
+ import { E as de } from "./error-message.Dyvrw6ZB.js";
13
+ import { _ as ce } from "./_plugin-vue_export-helper.CHgC5LLL.js";
14
14
  import "../assets/checkbox.css";
15
15
  var d = /* @__PURE__ */ ((e) => (e.UPDATE = "update:model-value", e.INPUT = "input", e))(d || {});
16
- const N = {
16
+ const L = {
17
+ "de-DE": { checkbox: "Kontrollkästchen", optional: "optional" },
18
+ "en-GB": { checkbox: "Tick box", optional: "optional" },
17
19
  "en-US": { checkbox: "Checkbox", optional: "optional" },
18
- "ja-JP": { checkbox: "チェックボックス", optional: "任意" },
19
- "pt-BR": { checkbox: "Caixa de seleção", optional: "Opcional" }
20
- }, ce = W({
20
+ "es-ES": { checkbox: "Casilla de verificación", optional: "opcional" },
21
+ "es-MX": { checkbox: "Casilla de verificación", optional: "opcional" },
22
+ "fr-FR": { checkbox: "Case à cocher", optional: "facultatif" },
23
+ "it-IT": { checkbox: "Casella", optional: "opzionale" },
24
+ "ja-JP": { checkbox: "チェックボックス", optional: "オプション" },
25
+ "pt-BR": { checkbox: "Caixa de seleção", optional: "opcional" },
26
+ "zh-CN": { checkbox: "复选框", optional: "可选" }
27
+ }, ue = Y({
21
28
  name: "bento-checkbox",
22
- i18n: { messages: N },
29
+ i18n: { messages: L },
23
30
  components: {
24
31
  BentoTag: ie,
25
32
  BentoTypography: oe,
@@ -92,72 +99,72 @@ const N = {
92
99
  value: { type: [String, Number], default: null }
93
100
  },
94
101
  emits: [d.UPDATE, d.INPUT],
95
- setup(e, { attrs: u, emit: m, slots: l }) {
96
- const { t: f } = ne({ messages: N }), h = M("description"), c = M("error"), o = le(l), { disabled: b, indeterminate: y, modelValue: v, readonly: P, value: q } = T(e), A = S(l)("default"), B = S(l)("description");
102
+ setup(e, { attrs: c, emit: m, slots: l }) {
103
+ const { t: h } = ne({ messages: L }), f = U("description"), u = U("error"), o = le(l), { disabled: p, indeterminate: k, modelValue: y, readonly: P, value: q } = V(e), C = S(l)("default"), A = S(l)("description");
97
104
  re("bento-checkbox", l.default, l.description);
98
- const C = a(() => Array.isArray(v.value)), w = a(() => C.value ? v.value.some((r) => r === q.value) : v.value), E = a(() => y.value), O = a(
105
+ const B = a(() => Array.isArray(y.value)), x = a(() => B.value ? y.value.some((r) => r === q.value) : y.value), E = a(() => k.value), w = a(
99
106
  () => !e.disabled && !e.readonly && (e.hasError || !!e.errorMessage)
100
- ), I = a(() => !e.disabled && !e.readonly && !!e.errorMessage), $ = a(() => o("content")), H = a(() => E?.value || w?.value), R = a(
101
- () => $?.value && C?.value && H?.value
102
- ), j = a(
103
- () => `${I.value ? c : ""} ${A && B ? h : ""}`.trim() || null
104
- ), F = _(u["aria-label"]), { ariaLabel: G } = T(e), V = _();
105
- X(() => {
106
- V.value = f("checkbox");
107
+ ), I = a(() => !e.disabled && !e.readonly && !!e.errorMessage), T = a(() => o("content")), R = a(() => E?.value || x?.value), H = a(
108
+ () => T?.value && B?.value && R?.value
109
+ ), O = a(
110
+ () => `${I.value ? u : ""} ${C && A ? f : ""}`.trim() || null
111
+ ), j = D(c["aria-label"]), { ariaLabel: z } = V(e), $ = D();
112
+ Q(() => {
113
+ $.value = h("checkbox");
107
114
  });
108
- const J = a(
115
+ const F = a(
109
116
  () => se({
110
- ariaLabel: F.value,
117
+ ariaLabel: j.value,
111
118
  // TODO: take this line away when the aria-label props is removed
112
- label: G,
113
- defaultFallback: o("default") ? S(l)("default") : V.value
119
+ label: z,
120
+ defaultFallback: o("default") ? S(l)("default") : $.value
114
121
  }).value
115
- ), Y = (r) => r?.["aria-hidden"], z = a(() => {
116
- const { style: r, class: Q } = Z();
122
+ ), G = (r) => r?.["aria-hidden"], J = a(() => {
123
+ const { style: r, class: X } = W();
117
124
  return {
118
- class: Q,
125
+ class: X,
119
126
  style: r
120
127
  };
121
128
  }), K = a(() => ({
122
- [`b-checkbox--${L.DISABLED}`]: b.value,
123
- [`b-checkbox--${L.READONLY}`]: P.value
129
+ [`b-checkbox--${N.DISABLED}`]: p.value,
130
+ [`b-checkbox--${N.READONLY}`]: P.value
124
131
  }));
125
132
  return {
126
133
  // Values
127
- descriptionId: h,
128
- errorId: c,
129
- ariaDescribedBy: j,
130
- computedAriaLabel: J,
134
+ descriptionId: f,
135
+ errorId: u,
136
+ ariaDescribedBy: O,
137
+ computedAriaLabel: F,
131
138
  conditionalClass: K,
132
- defaultSlotValue: A,
133
- descriptionSlotValue: B,
139
+ defaultSlotValue: C,
140
+ descriptionSlotValue: A,
134
141
  isIndeterminate: E,
135
- shouldShowError: O,
142
+ shouldShowError: w,
136
143
  shouldShowErrorMessage: I,
137
- contentSlotAvailable: R,
138
- hasContentSlot: $,
139
- styleAttrs: z,
144
+ contentSlotAvailable: H,
145
+ hasContentSlot: T,
146
+ styleAttrs: J,
140
147
  // Methods
141
148
  hasSlot: o,
142
149
  onChange: (r) => {
143
- b.value || (m(d.UPDATE, r), m(d.INPUT, r));
150
+ p.value || (m(d.UPDATE, r), m(d.INPUT, r));
144
151
  },
145
- getAriaHidden: Y,
146
- t: f
152
+ getAriaHidden: G,
153
+ t: h
147
154
  };
148
155
  }
149
- }), be = ["aria-hidden"], pe = {
156
+ }), pe = ["aria-hidden"], be = {
150
157
  key: 0,
151
158
  class: "b-checkbox__text"
152
159
  };
153
- function me(e, u, m, l, f, h) {
154
- const c = p("checkbox-input"), o = p("bento-typography"), b = p("bento-tag"), y = p("error-message");
155
- return t(), D("label", g({
160
+ function me(e, c, m, l, h, f) {
161
+ const u = b("checkbox-input"), o = b("bento-typography"), p = b("bento-tag"), k = b("error-message");
162
+ return t(), _("label", v({
156
163
  class: ["b-checkbox", e.conditionalClass]
157
164
  }, e.styleAttrs, {
158
165
  "aria-hidden": e.getAriaHidden(e.$attrs)
159
166
  }), [
160
- x(c, g(e.$attrs, {
167
+ Z(u, v(e.$attrs, {
161
168
  ref: "input",
162
169
  "aria-label": e.computedAriaLabel,
163
170
  "aria-describedby": e.ariaDescribedBy,
@@ -170,7 +177,7 @@ function me(e, u, m, l, f, h) {
170
177
  readonly: e.readonly,
171
178
  "onUpdate:modelValue": e.onChange
172
179
  }), null, 16, ["aria-label", "aria-describedby", "aria-required", "disabled", "has-error", "indeterminate", "value", "model-value", "readonly", "onUpdate:modelValue"]),
173
- e.hasSlot("default") || e.shouldShowErrorMessage ? (t(), D("span", pe, [
180
+ e.hasSlot("default") || e.shouldShowErrorMessage ? (t(), _("span", be, [
174
181
  e.hasSlot("default") ? (t(), n(o, {
175
182
  key: 0,
176
183
  class: "b-checkbox__label",
@@ -179,7 +186,7 @@ function me(e, u, m, l, f, h) {
179
186
  }, {
180
187
  default: i(() => [
181
188
  ee("span", null, [
182
- k(e.$slots, "default", {}, void 0, !0)
189
+ g(e.$slots, "default", {}, void 0, !0)
183
190
  ]),
184
191
  e.optional ? (t(), n(o, {
185
192
  key: 0,
@@ -187,7 +194,7 @@ function me(e, u, m, l, f, h) {
187
194
  el: "span"
188
195
  }, {
189
196
  default: i(() => [
190
- U("(" + ae(e.t("optional")) + ")", 1)
197
+ M("(" + ae(e.t("optional")) + ")", 1)
191
198
  ]),
192
199
  _: 1
193
200
  })) : e.required ? (t(), n(o, {
@@ -195,12 +202,12 @@ function me(e, u, m, l, f, h) {
195
202
  class: "b-checkbox__label-requirement",
196
203
  el: "span"
197
204
  }, {
198
- default: i(() => u[0] || (u[0] = [
199
- U("*")
205
+ default: i(() => c[0] || (c[0] = [
206
+ M("*")
200
207
  ])),
201
208
  _: 1
202
209
  })) : s("", !0),
203
- e.tag ? (t(), n(b, g({
210
+ e.tag ? (t(), n(p, v({
204
211
  key: 2,
205
212
  class: "b-checkbox__label-tag"
206
213
  }, e.tag), null, 16)) : s("", !0)
@@ -215,11 +222,11 @@ function me(e, u, m, l, f, h) {
215
222
  variant: "body"
216
223
  }, {
217
224
  default: i(() => [
218
- k(e.$slots, "description", {}, void 0, !0)
225
+ g(e.$slots, "description", {}, void 0, !0)
219
226
  ]),
220
227
  _: 3
221
228
  }, 8, ["id"])) : s("", !0),
222
- e.shouldShowErrorMessage ? (t(), n(y, {
229
+ e.shouldShowErrorMessage ? (t(), n(k, {
223
230
  key: 2,
224
231
  id: e.errorId,
225
232
  "error-message": e.errorMessage
@@ -231,16 +238,16 @@ function me(e, u, m, l, f, h) {
231
238
  variant: "body"
232
239
  }, {
233
240
  default: i(() => [
234
- k(e.$slots, "content", {}, void 0, !0)
241
+ g(e.$slots, "content", {}, void 0, !0)
235
242
  ]),
236
243
  _: 3
237
244
  })) : s("", !0)
238
245
  ])) : s("", !0)
239
- ], 16, be);
246
+ ], 16, pe);
240
247
  }
241
- const Te = /* @__PURE__ */ ue(ce, [["render", me], ["__scopeId", "data-v-5824079e"]]);
248
+ const Ve = /* @__PURE__ */ ce(ue, [["render", me], ["__scopeId", "data-v-5824079e"]]);
242
249
  export {
243
- Te as B,
250
+ Ve as B,
244
251
  d as a
245
252
  };
246
- //# sourceMappingURL=checkbox.C6ATh8f5.js.map
253
+ //# sourceMappingURL=checkbox.BPrymcRl.js.map