@adyen/bento-vue2 1.71.0 → 1.73.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 (243) hide show
  1. package/README.md +3 -1
  2. package/dist/@types/index.d.ts +429 -580
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/ai-button.css +1 -0
  7. package/dist/assets/base-button.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/button-actions.css +1 -0
  10. package/dist/assets/calendar.css +1 -1
  11. package/dist/assets/card.css +1 -1
  12. package/dist/assets/code-snippet.css +1 -1
  13. package/dist/assets/dashboard-section.css +1 -1
  14. package/dist/assets/data-grid-template.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/empty-state.css +1 -1
  21. package/dist/assets/field-label.css +1 -0
  22. package/dist/assets/file-uploader.css +1 -1
  23. package/dist/assets/filter-bar.css +1 -1
  24. package/dist/assets/focus-trap.css +1 -1
  25. package/dist/assets/form-layout-title.css +1 -1
  26. package/dist/assets/input-field-phone-number.css +1 -1
  27. package/dist/assets/inspector.css +1 -1
  28. package/dist/assets/layout-row.css +1 -1
  29. package/dist/assets/modal-fullscreen.css +1 -1
  30. package/dist/assets/popper-container.css +1 -1
  31. package/dist/assets/radio-group.css +1 -1
  32. package/dist/assets/radio-input.css +1 -1
  33. package/dist/assets/segmented-control.css +1 -1
  34. package/dist/assets/selection-card-group.css +1 -1
  35. package/dist/assets/sidepanel.css +1 -1
  36. package/dist/assets/structured-list-item.css +1 -1
  37. package/dist/button.js +11 -9
  38. package/dist/button.js.map +1 -1
  39. package/dist/card.js +1 -1
  40. package/dist/checkbox.js +2 -2
  41. package/dist/chip.js +1 -1
  42. package/dist/chunks/{action-bar.C01Tjxh_.js → action-bar.Bxrtx1Vj.js} +3 -3
  43. package/dist/chunks/{action-bar.C01Tjxh_.js.map → action-bar.Bxrtx1Vj.js.map} +1 -1
  44. package/dist/chunks/ai-button.FRPkTHz6.js +67 -0
  45. package/dist/chunks/ai-button.FRPkTHz6.js.map +1 -0
  46. package/dist/chunks/{base-button.BB5tkzjh.js → base-button.Cv-1788W.js} +6 -6
  47. package/dist/chunks/base-button.Cv-1788W.js.map +1 -0
  48. package/dist/chunks/{base-modal.CnIt7hra.js → base-modal.DInbAZlp.js} +4 -4
  49. package/dist/chunks/{base-modal.CnIt7hra.js.map → base-modal.DInbAZlp.js.map} +1 -1
  50. package/dist/chunks/{button-actions-with-menu.B9R0J68W.js → button-actions-with-menu.BtWUxmSL.js} +2 -2
  51. package/dist/chunks/{button-actions-with-menu.B9R0J68W.js.map → button-actions-with-menu.BtWUxmSL.js.map} +1 -1
  52. package/dist/chunks/{toggle-button.B1Y2qhzJ.js → button-actions.55vIvDsX.js} +241 -239
  53. package/dist/chunks/button-actions.55vIvDsX.js.map +1 -0
  54. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  55. package/dist/chunks/{calendar.DjktWs25.js → calendar.M69sfyB9.js} +290 -287
  56. package/dist/chunks/{calendar.DjktWs25.js.map → calendar.M69sfyB9.js.map} +1 -1
  57. package/dist/chunks/{card.DTrBQQAm.js → card.C11dmth8.js} +2 -2
  58. package/dist/chunks/{card.DTrBQQAm.js.map → card.C11dmth8.js.map} +1 -1
  59. package/dist/chunks/{checkbox-group.lVv3mWHL.js → checkbox-group.B85s9nzq.js} +4 -4
  60. package/dist/chunks/{checkbox-group.lVv3mWHL.js.map → checkbox-group.B85s9nzq.js.map} +1 -1
  61. package/dist/chunks/{checkbox.C7Yu3rls.js → checkbox.BOIfb1fc.js} +3 -3
  62. package/dist/chunks/{checkbox.C7Yu3rls.js.map → checkbox.BOIfb1fc.js.map} +1 -1
  63. package/dist/chunks/{chevron-right.C--ZOC9j.js → chevron-left.BS24hEFa.js} +5 -5
  64. package/dist/chunks/chevron-left.BS24hEFa.js.map +1 -0
  65. package/dist/chunks/{chip.Bfi-ff5E.js → chip.omQX_Ziq.js} +2 -2
  66. package/dist/chunks/{chip.Bfi-ff5E.js.map → chip.omQX_Ziq.js.map} +1 -1
  67. package/dist/chunks/{code-snippet.BvhpH_JE.js → code-snippet.Dsc6Zuas.js} +100 -91
  68. package/dist/chunks/code-snippet.Dsc6Zuas.js.map +1 -0
  69. package/dist/chunks/{controls-group.DUr_o-vW.js → controls-group.CWeUgE2P.js} +2 -2
  70. package/dist/chunks/{controls-group.DUr_o-vW.js.map → controls-group.CWeUgE2P.js.map} +1 -1
  71. package/dist/chunks/{copy.CsyXGPuN.js → copy._BdbMnHK.js} +3 -3
  72. package/dist/chunks/{copy.CsyXGPuN.js.map → copy._BdbMnHK.js.map} +1 -1
  73. package/dist/chunks/{dashboard-section.CiFxBFnc.js → dashboard-section.e7ozaS9M.js} +3 -3
  74. package/dist/chunks/{dashboard-section.CiFxBFnc.js.map → dashboard-section.e7ozaS9M.js.map} +1 -1
  75. package/dist/chunks/{dashed-underline.CTtzy_vE.js → dashed-underline.CGU6o7ni.js} +3 -3
  76. package/dist/chunks/{dashed-underline.CTtzy_vE.js.map → dashed-underline.CGU6o7ni.js.map} +1 -1
  77. package/dist/chunks/{data-grid-template.CmfHBR3u.js → data-grid-template.BaPjUlZ2.js} +10 -10
  78. package/dist/chunks/data-grid-template.BaPjUlZ2.js.map +1 -0
  79. package/dist/chunks/{data-grid.D2AvGjyH.js → data-grid.BeClbIY3.js} +1318 -1213
  80. package/dist/chunks/data-grid.BeClbIY3.js.map +1 -0
  81. package/dist/chunks/{date-picker.Bhe5lCfr.js → date-picker.CGTMHUNH.js} +75 -69
  82. package/dist/chunks/date-picker.CGTMHUNH.js.map +1 -0
  83. package/dist/chunks/{date-range-picker.BsQ6kMzK.js → date-range-picker.DR2nDLqc.js} +128 -125
  84. package/dist/chunks/date-range-picker.DR2nDLqc.js.map +1 -0
  85. package/dist/chunks/{dropdown-tag.DaVNZO_q.js → dropdown-tag.CUwoeCwu.js} +3 -3
  86. package/dist/chunks/{dropdown-tag.DaVNZO_q.js.map → dropdown-tag.CUwoeCwu.js.map} +1 -1
  87. package/dist/chunks/{dropdown.J5FaL_2T.js → dropdown.B4urOhfH.js} +159 -155
  88. package/dist/chunks/{dropdown.J5FaL_2T.js.map → dropdown.B4urOhfH.js.map} +1 -1
  89. package/dist/chunks/empty-state.DNTrhYUm.js +106 -0
  90. package/dist/chunks/empty-state.DNTrhYUm.js.map +1 -0
  91. package/dist/chunks/es6.MoTTyETW.js.map +1 -1
  92. package/dist/chunks/{error-message.BGuKk5tR.js → field-label.BKzuCnXr.js} +53 -53
  93. package/dist/chunks/field-label.BKzuCnXr.js.map +1 -0
  94. package/dist/chunks/{file-uploader.ZHBf2zwh.js → file-uploader.BEClGxsF.js} +3 -3
  95. package/dist/chunks/{file-uploader.ZHBf2zwh.js.map → file-uploader.BEClGxsF.js.map} +1 -1
  96. package/dist/chunks/{filter-bar.CNxqgSgM.js → filter-bar.B0Dl_8-M.js} +184 -185
  97. package/dist/chunks/filter-bar.B0Dl_8-M.js.map +1 -0
  98. package/dist/chunks/{fixed-scroller.DDYpO7Li.js → fixed-scroller.QCXpkadN.js} +2 -2
  99. package/dist/chunks/{fixed-scroller.DDYpO7Li.js.map → fixed-scroller.QCXpkadN.js.map} +1 -1
  100. package/dist/chunks/{focus-trap.COfrmVfx.js → focus-trap.BJfpIboH.js} +155 -144
  101. package/dist/chunks/{focus-trap.COfrmVfx.js.map → focus-trap.BJfpIboH.js.map} +1 -1
  102. package/dist/chunks/{footer-actions.CR8l2FSl.js → footer-actions.BTELM6rh.js} +2 -2
  103. package/dist/chunks/{footer-actions.CR8l2FSl.js.map → footer-actions.BTELM6rh.js.map} +1 -1
  104. package/dist/chunks/{form-layout-title.aXVuAWiG.js → form-layout-title.vQNmD6vk.js} +21 -14
  105. package/dist/chunks/form-layout-title.vQNmD6vk.js.map +1 -0
  106. package/dist/chunks/{header-meta.tZNYmQBF.js → header-meta.DZYH-qg-.js} +3 -3
  107. package/dist/chunks/{header-meta.tZNYmQBF.js.map → header-meta.DZYH-qg-.js.map} +1 -1
  108. package/dist/chunks/{header-with-views.BXZT6R6N.js → header-with-views.BWwSFABv.js} +8 -8
  109. package/dist/chunks/{header-with-views.BXZT6R6N.js.map → header-with-views.BWwSFABv.js.map} +1 -1
  110. package/dist/chunks/{header.CwlFMYus.js → header.CQMiTG7f.js} +3 -3
  111. package/dist/chunks/{header.CwlFMYus.js.map → header.CQMiTG7f.js.map} +1 -1
  112. package/dist/chunks/{info-icon.JAvdSXdT.js → info-icon.fB7jf3NJ.js} +3 -3
  113. package/dist/chunks/{info-icon.JAvdSXdT.js.map → info-icon.fB7jf3NJ.js.map} +1 -1
  114. package/dist/chunks/{input-field-password.C1bzrmje.js → input-field-password.BdZrUcJy.js} +5 -5
  115. package/dist/chunks/{input-field-password.C1bzrmje.js.map → input-field-password.BdZrUcJy.js.map} +1 -1
  116. package/dist/chunks/{input-field-phone-number.YTbO3djd.js → input-field-phone-number.Bm0n9ycw.js} +9 -6
  117. package/dist/chunks/{input-field-phone-number.YTbO3djd.js.map → input-field-phone-number.Bm0n9ycw.js.map} +1 -1
  118. package/dist/chunks/{input-field.o-Hie5W9.js → input-field.DYVXuVxT.js} +3 -3
  119. package/dist/chunks/{input-field.o-Hie5W9.js.map → input-field.DYVXuVxT.js.map} +1 -1
  120. package/dist/chunks/{inspector.DxteqciY.js → inspector.g3OErNAU.js} +2 -2
  121. package/dist/chunks/{inspector.DxteqciY.js.map → inspector.g3OErNAU.js.map} +1 -1
  122. package/dist/chunks/{listbox-option-tag.AsRozx37.js → listbox-option-tag.UaD4kmXc.js} +2 -2
  123. package/dist/chunks/{listbox-option-tag.AsRozx37.js.map → listbox-option-tag.UaD4kmXc.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.B_72Iyh-.js → modal-fullscreen.B-9Ke6Ya.js} +3 -3
  125. package/dist/chunks/{modal-fullscreen.B_72Iyh-.js.map → modal-fullscreen.B-9Ke6Ya.js.map} +1 -1
  126. package/dist/chunks/{modal.crwnBhJG.js → modal.qybFapnI.js} +4 -4
  127. package/dist/chunks/{modal.crwnBhJG.js.map → modal.qybFapnI.js.map} +1 -1
  128. package/dist/chunks/{pagination.B4SjTHnN.js → pagination.CcH5IWXH.js} +2 -2
  129. package/dist/chunks/{pagination.B4SjTHnN.js.map → pagination.CcH5IWXH.js.map} +1 -1
  130. package/dist/chunks/popover.types.iyDoIAOE.js +6 -0
  131. package/dist/chunks/popover.types.iyDoIAOE.js.map +1 -0
  132. package/dist/chunks/{popper-container.Dt0SuHXX.js → popper-container.C9KCAJxI.js} +12 -5
  133. package/dist/chunks/{popper-container.Dt0SuHXX.js.map → popper-container.C9KCAJxI.js.map} +1 -1
  134. package/dist/chunks/{radio-group.T5hXVLRz.js → radio-group.BuDqrwGq.js} +12 -12
  135. package/dist/chunks/radio-group.BuDqrwGq.js.map +1 -0
  136. package/dist/chunks/{radio-input.D8mv2EYC.js → radio-input.kzb4gxLW.js} +17 -17
  137. package/dist/chunks/radio-input.kzb4gxLW.js.map +1 -0
  138. package/dist/chunks/{rich-text-editor._5fF0vFL.js → rich-text-editor.EU6Dltjl.js} +4 -4
  139. package/dist/chunks/{rich-text-editor._5fF0vFL.js.map → rich-text-editor.EU6Dltjl.js.map} +1 -1
  140. package/dist/chunks/{search-bar.yIVTIbdP.js → search-bar.PC1n90UR.js} +3 -3
  141. package/dist/chunks/{search-bar.yIVTIbdP.js.map → search-bar.PC1n90UR.js.map} +1 -1
  142. package/dist/chunks/{secondary-nav.DBetOL_3.js → secondary-nav.BXGVjZJX.js} +2 -2
  143. package/dist/chunks/{secondary-nav.DBetOL_3.js.map → secondary-nav.BXGVjZJX.js.map} +1 -1
  144. package/dist/chunks/{segmented-control.DrShqTCa.js → segmented-control.Dc34mUMM.js} +2 -2
  145. package/dist/chunks/{segmented-control.DrShqTCa.js.map → segmented-control.Dc34mUMM.js.map} +1 -1
  146. package/dist/chunks/{selection-card-group.3QYPl3w3.js → selection-card-group.VAJ3ifoH.js} +4 -4
  147. package/dist/chunks/{selection-card-group.3QYPl3w3.js.map → selection-card-group.VAJ3ifoH.js.map} +1 -1
  148. package/dist/chunks/{sidepanel.U9XLcivw.js → sidepanel.uWNc58r7.js} +4 -4
  149. package/dist/chunks/{sidepanel.U9XLcivw.js.map → sidepanel.uWNc58r7.js.map} +1 -1
  150. package/dist/chunks/{step.DwXkOVky.js → step.D8blWwfR.js} +2 -2
  151. package/dist/chunks/{step.DwXkOVky.js.map → step.D8blWwfR.js.map} +1 -1
  152. package/dist/chunks/structured-list-item.BLalgOps.js +90 -0
  153. package/dist/chunks/structured-list-item.BLalgOps.js.map +1 -0
  154. package/dist/chunks/{summary-grid.types.BZlzUWVO.js → summary-grid.types.DqzYJ9_N.js} +5 -5
  155. package/dist/chunks/{summary-grid.types.BZlzUWVO.js.map → summary-grid.types.DqzYJ9_N.js.map} +1 -1
  156. package/dist/chunks/{tab.ClkH0GtX.js → tab.D8YyoNFV.js} +2 -2
  157. package/dist/chunks/{tab.ClkH0GtX.js.map → tab.D8YyoNFV.js.map} +1 -1
  158. package/dist/chunks/{tag.Dcm5YMUI.js → tag.Tjg4linG.js} +2 -2
  159. package/dist/chunks/{tag.Dcm5YMUI.js.map → tag.Tjg4linG.js.map} +1 -1
  160. package/dist/chunks/{textarea.B2jAycbX.js → textarea.DUPV-I-L.js} +2 -2
  161. package/dist/chunks/{textarea.B2jAycbX.js.map → textarea.DUPV-I-L.js.map} +1 -1
  162. package/dist/chunks/{timeline-item.Dhcs9a0S.js → timeline-item.DaRKHndA.js} +5 -5
  163. package/dist/chunks/{timeline-item.Dhcs9a0S.js.map → timeline-item.DaRKHndA.js.map} +1 -1
  164. package/dist/chunks/{tooltip.C94gYIPr.js → tooltip.DOD_4rkI.js} +2 -2
  165. package/dist/chunks/{tooltip.C94gYIPr.js.map → tooltip.DOD_4rkI.js.map} +1 -1
  166. package/dist/chunks/{tutorial.DAv_sABs.js → tutorial.BwnRyUoh.js} +4 -4
  167. package/dist/chunks/{tutorial.DAv_sABs.js.map → tutorial.BwnRyUoh.js.map} +1 -1
  168. package/dist/chunks/{use-cached-selected-values.DSDrNPbW.js → use-cached-selected-values.C7j6YhuC.js} +4 -4
  169. package/dist/chunks/use-cached-selected-values.C7j6YhuC.js.map +1 -0
  170. package/dist/code-snippet.js +1 -1
  171. package/dist/dashboard-template.js +1 -1
  172. package/dist/dashed-underline.js +1 -1
  173. package/dist/data-grid-template.js +1 -1
  174. package/dist/data-grid.js +1 -1
  175. package/dist/date-picker.js +2 -2
  176. package/dist/date-range-picker.js +2 -2
  177. package/dist/dropdown.js +3 -3
  178. package/dist/empty-state.js +1 -1
  179. package/dist/file-uploader.js +1 -1
  180. package/dist/filter-bar.js +1 -1
  181. package/dist/focus-trap.js +1 -1
  182. package/dist/form-layout.js +1 -1
  183. package/dist/header-with-views.js +1 -1
  184. package/dist/header.js +1 -1
  185. package/dist/index.js +174 -172
  186. package/dist/index.js.map +1 -1
  187. package/dist/info-icon.js +1 -1
  188. package/dist/input-field-password.js +1 -1
  189. package/dist/input-field-phone-number.js +1 -1
  190. package/dist/input-field.js +1 -1
  191. package/dist/inspector.js +1 -1
  192. package/dist/internal.js +11 -11
  193. package/dist/menu.js +1 -1
  194. package/dist/modal-fullscreen.js +1 -1
  195. package/dist/modal.js +2 -2
  196. package/dist/pagination.js +1 -1
  197. package/dist/popover.js +2 -2
  198. package/dist/popper-container.js +1 -1
  199. package/dist/radio-group.js +2 -2
  200. package/dist/rich-text-editor.js +1 -1
  201. package/dist/search-bar.js +2 -2
  202. package/dist/secondary-nav.js +1 -1
  203. package/dist/segmented-control.js +1 -1
  204. package/dist/selection-card.js +1 -1
  205. package/dist/sidepanel.js +1 -1
  206. package/dist/stepper.js +1 -1
  207. package/dist/structured-list.js +1 -1
  208. package/dist/styles/bento-dark.css +38 -12
  209. package/dist/styles/bento-light.css +37 -11
  210. package/dist/styles/bento.css +37 -11
  211. package/dist/styles/legacy.css +2111 -0
  212. package/dist/styles/styleguide.css +37 -11
  213. package/dist/styles/utility.css +12 -0
  214. package/dist/summary-grid.js +1 -1
  215. package/dist/tabs.js +1 -1
  216. package/dist/tag.js +1 -1
  217. package/dist/textarea.js +1 -1
  218. package/dist/timeline.js +1 -1
  219. package/dist/tutorial.js +1 -1
  220. package/dist/web-types.json +211 -20
  221. package/package.json +3 -3
  222. package/dist/assets/error-message.css +0 -1
  223. package/dist/assets/toggle-button.css +0 -1
  224. package/dist/chunks/base-button.BB5tkzjh.js.map +0 -1
  225. package/dist/chunks/chevron-right.C--ZOC9j.js.map +0 -1
  226. package/dist/chunks/code-snippet.BvhpH_JE.js.map +0 -1
  227. package/dist/chunks/data-grid-template.CmfHBR3u.js.map +0 -1
  228. package/dist/chunks/data-grid.D2AvGjyH.js.map +0 -1
  229. package/dist/chunks/date-picker.Bhe5lCfr.js.map +0 -1
  230. package/dist/chunks/date-range-picker.BsQ6kMzK.js.map +0 -1
  231. package/dist/chunks/empty-state.DAbj9xWF.js +0 -151
  232. package/dist/chunks/empty-state.DAbj9xWF.js.map +0 -1
  233. package/dist/chunks/error-message.BGuKk5tR.js.map +0 -1
  234. package/dist/chunks/filter-bar.CNxqgSgM.js.map +0 -1
  235. package/dist/chunks/form-layout-title.aXVuAWiG.js.map +0 -1
  236. package/dist/chunks/popover.types.BUM8GOuO.js +0 -6
  237. package/dist/chunks/popover.types.BUM8GOuO.js.map +0 -1
  238. package/dist/chunks/radio-group.T5hXVLRz.js.map +0 -1
  239. package/dist/chunks/radio-input.D8mv2EYC.js.map +0 -1
  240. package/dist/chunks/structured-list-item.DHklFEiK.js +0 -87
  241. package/dist/chunks/structured-list-item.DHklFEiK.js.map +0 -1
  242. package/dist/chunks/toggle-button.B1Y2qhzJ.js.map +0 -1
  243. package/dist/chunks/use-cached-selected-values.DSDrNPbW.js.map +0 -1
@@ -3,14 +3,14 @@ import { u as O } from "./use-form-layout-loading.D3lALhtC.js";
3
3
  import { u as R } from "./use-has-slot.C9lQZ6nz.js";
4
4
  import { g as h } from "./generate-uid.NJ8tVoha.js";
5
5
  import { B as N, d as V } from "./typography.hlOAxsEn.js";
6
- import { B as w } from "./tag.Dcm5YMUI.js";
6
+ import { B as w } from "./tag.Tjg4linG.js";
7
7
  import { u as A } from "./aria-label.CaUURpnB.js";
8
8
  import { u as k } from "./use-default-slot-validator.BDn0wkYP.js";
9
9
  import { g as $ } from "./get-slot-text.BQS5Olxm.js";
10
- import { R as C, a as q } from "./radio-input.D8mv2EYC.js";
10
+ import { R as C, a as q } from "./radio-input.kzb4gxLW.js";
11
11
  import { n as T } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
- import { C as F } from "./controls-group.DUr_o-vW.js";
13
- import { E as D } from "./error-message.BGuKk5tR.js";
12
+ import { C as F } from "./controls-group.CWeUgE2P.js";
13
+ import { E as D } from "./field-label.BKzuCnXr.js";
14
14
  import "../assets/radio-group.css";
15
15
  const G = {
16
16
  name: "bento-radio-button",
@@ -174,7 +174,7 @@ const Z = {
174
174
  () => !e.disabled && !l.value && (!!e.errorMessage || e.hasError)
175
175
  ), m = n(() => !e.disabled && !l.value && !!e.errorMessage), y = n(() => ({
176
176
  "b-radio-group__buttons--horizontal": e.variant === c.HORIZONTAL
177
- })), s = n(() => e.variant === "vertical"), v = n(() => d("content") && !(s != null && s.value)), M = (p) => {
177
+ })), s = n(() => e.variant === "vertical"), g = n(() => d("content") && !(s != null && s.value)), M = (p) => {
178
178
  o("update:model-value", p), o("input", p);
179
179
  };
180
180
  e.hasError && V(
@@ -184,7 +184,7 @@ const Z = {
184
184
  <bento-radio-group errorMessage="Error message text" />`,
185
185
  "2.0.0"
186
186
  ), L(
187
- v,
187
+ g,
188
188
  (p) => {
189
189
  if (p)
190
190
  throw new Error("The content slot is only available for the vertical radio group layout");
@@ -193,17 +193,17 @@ const Z = {
193
193
  immediate: !0
194
194
  }
195
195
  );
196
- const g = () => {
196
+ const v = () => {
197
197
  u.value[0].focus();
198
198
  };
199
199
  return t({
200
- focus: g
201
- }), { __sfc: !0, COMPONENT_NAME: a, slots: i, hasSlot: d, emit: o, props: e, inputValue: f, errorId: _, isReadOnly: l, radioButton: u, shouldShowError: b, shouldShowErrorMessage: m, conditionalClasses: y, isVertical: s, shouldShowSlotError: v, onInput: M, focus: g, ControlsGroup: F, ErrorMessage: D, BentoRadioButton: U };
200
+ focus: v
201
+ }), { __sfc: !0, COMPONENT_NAME: a, slots: i, hasSlot: d, emit: o, props: e, inputValue: f, errorId: _, isReadOnly: l, radioButton: u, shouldShowError: b, shouldShowErrorMessage: m, conditionalClasses: y, isVertical: s, shouldShowSlotError: g, onInput: M, focus: v, ControlsGroup: F, ErrorMessage: D, BentoRadioButton: U };
202
202
  }
203
203
  });
204
204
  var J = function() {
205
205
  var t = this, o = t._self._c, e = t._self._setupProxy;
206
- return o("div", { staticClass: "b-radio-group" }, [o(e.ControlsGroup, { staticClass: "b-radio-group__buttons", class: e.conditionalClasses, attrs: { "aria-describedby": e.shouldShowErrorMessage ? e.errorId : "", "component-name": e.COMPONENT_NAME, description: t.description, disabled: t.disabled, form: t.formId, label: t.label, optional: t.optional, required: t.required, "hide-label": t.hideLabel, "tooltip-text": t.tooltipText }, scopedSlots: t._u([e.hasSlot("description") ? { key: "description", fn: function() {
206
+ return o("div", { staticClass: "b-radio-group" }, [o(e.ControlsGroup, { staticClass: "b-radio-group__buttons", class: e.conditionalClasses, attrs: { "aria-describedby": e.shouldShowErrorMessage ? e.errorId : "", "component-name": e.COMPONENT_NAME, description: t.description, disabled: t.disabled, form: t.formId, label: t.label, optional: t.optional, required: t.required, "hide-label": t.hideLabel, "tooltip-text": t.tooltipText, role: "radiogroup", "aria-readonly": e.isReadOnly }, scopedSlots: t._u([e.hasSlot("description") ? { key: "description", fn: function() {
207
207
  return [t._t("description")];
208
208
  }, proxy: !0 } : null], null, !0) }, t._l(t.items, function(a) {
209
209
  return o(e.BentoRadioButton, { key: a.value, ref: "radioButton", refInFor: !0, attrs: { "model-value": e.inputValue, value: a.value, disabled: t.disabled || a.disabled, readonly: e.isReadOnly || a.readonly, "has-error": e.shouldShowError || a.hasError, tag: a.tag, name: t.formId || t.label }, on: { "update:model-value": e.onInput }, scopedSlots: t._u([{ key: "default", fn: function() {
@@ -220,7 +220,7 @@ var J = function() {
220
220
  K,
221
221
  !1,
222
222
  null,
223
- "73e81da9"
223
+ "a8338b9e"
224
224
  );
225
225
  const pe = Q.exports;
226
226
  export {
@@ -228,4 +228,4 @@ export {
228
228
  c as a,
229
229
  U as b
230
230
  };
231
- //# sourceMappingURL=radio-group.T5hXVLRz.js.map
231
+ //# sourceMappingURL=radio-group.BuDqrwGq.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.BuDqrwGq.js","sources":["../../src/components/radio-group/components/radio-button/radio-button.vue","../../src/components/radio-group/radio-group.types.ts","../../src/components/radio-group/radio-group.vue"],"sourcesContent":["<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <radio-input\n :id=\"radioButtonId\"\n ref=\"radioInputRef\"\n :aria-label=\"ariaLabel\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :has-error=\"hasError\"\n :value=\"value\"\n :model-value=\"modelValue\"\n :name=\"name\"\n @update:model-value=\"onChange\"\n />\n <div>\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <span v-if=\"hasSlot('default')\" class=\"b-radio-button__primary-label\">\n <bento-typography class=\"b-radio-button__label\" el=\"span\" variant=\"body\"><slot /></bento-typography>\n <bento-tag v-if=\"tag\" class=\"b-radio-button__label-tag\" v-bind=\"tag\" />\n </span>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n </label>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTag } from '@/components/tag';\n import { BentoTypography } from '@/components/typography';\n import { RadioInput } from '../../../internal/radio-input';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/core/utils/ts';\n import { computed, type ComputedRef, type PropType, ref, toRefs, useSlots } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass, type BentoRadioButtonTag, type BentoRadioButtonValue } from './radio-button.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Sets the properties of the BentoTag component that is placed next to the label.\n * {@see BentoTag}\n */\n tag: { type: Object as PropType<BentoRadioButtonTag>, default: undefined },\n\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\n\n const { value } = toRefs(props);\n const radioButtonId = generateUid('bento-radio-button');\n const descriptionId = generateUid('description');\n const radioInputRef = ref(null);\n\n useDefaultSlotValidator('bento-radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n emit('input', props.value);\n }\n };\n\n const focus = () => {\n radioInputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @example\n * import { BentoRadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioButton },\n * template: `\n * <bento-radio-button\n * disabled\n * value=\"inputRadio\"\n * model-value.sync=\"modelValue\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * <template #content>Content shown when checked</template>\n * </bento-radio-button>\n * `,\n * setup() {\n * const modelValue = ref('anyValue')\n * const value = 'option-value'\n *\n * return {\n * modelValue,\n * value,\n * }\n * }\n * }\n */\n export default {\n name: 'bento-radio-button',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","import type { BentoRadioButtonTag, BentoRadioButtonValue } from './components/radio-button';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport type BentoRadioGroupValue = BentoRadioButtonValue;\n\nexport interface BentoRadioGroupItem {\n value: BentoRadioGroupValue;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n tag?: BentoRadioButtonTag;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n role=\"radiogroup\"\n :aria-readonly=\"isReadOnly\"\n >\n <bento-radio-button\n v-for=\"item in items\"\n ref=\"radioButton\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n :tag=\"item.tag\"\n :name=\"formId || label\"\n @update:model-value=\"onInput\"\n >\n <template #default>{{ item.label }}</template>\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"hasSlot('content') && isVertical\" #content>\n <slot name=\"content\"></slot>\n </template>\n </bento-radio-button>\n <template v-if=\"hasSlot('description')\" #description>\n <slot name=\"description\" />\n </template>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRef, useSlots, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import { BentoRadioButton } from './components/radio-button';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { deprecate } from '@/utils/ts/deprecate';\n import { type BentoRadioGroupItems, type BentoRadioGroupValue, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"input\", \"update:model-value\"]);\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 bento-radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If passed as a prop, all bento-radio-buttons in an error state and renders the string beneath the buttons.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons 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 radio group's items.\n */\n items: {\n type: Array as PropType<BentoRadioGroupItems>,\n required: true,\n },\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 BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: {\n type: [Number, String] as PropType<BentoRadioGroupValue>,\n default: null,\n },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all bento-radio-button 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 radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoRadioGroupVariant | `${BentoRadioGroupVariant}`>,\n default: BentoRadioGroupVariant.VERTICAL,\n validator: (value: BentoRadioGroupVariant) => Object.values(BentoRadioGroupVariant).includes(value),\n },\n });\n\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const radioButton = ref(null);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const shouldShowSlotError = computed(() => hasSlot('content') && !isVertical?.value);\n\n const onInput = value => {\n emit('update:model-value', value);\n emit('input', value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n const focus = () => {\n radioButton.value[0].focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default {\n name: 'bento-radio-group',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","value","toRefs","props","radioButtonId","generateUid","descriptionId","radioInputRef","ref","useDefaultSlotValidator","conditionalClassContainer","computed","RadioInputStateClass","ariaLabel","useAriaLabel","getSlotText","isChecked","onChange","emit","focus","expose","BentoRadioGroupVariant","BentoRadioGroupVariant2","__default__","COMPONENT_NAME","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","radioButton","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":"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"}
@@ -1,7 +1,7 @@
1
- import { defineComponent as _, toRefs as b, ref as y, computed as o } from "vue";
2
- import { n as v } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
1
+ import { defineComponent as _, toRefs as b, ref as v, computed as l } from "vue";
2
+ import { n as y } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
3
3
  import "../assets/radio-input.css";
4
- var l = /* @__PURE__ */ ((r) => (r.DISABLED = "disabled", r.READONLY = "readonly", r.ERROR = "error", r))(l || {});
4
+ var t = /* @__PURE__ */ ((r) => (r.DISABLED = "disabled", r.READONLY = "readonly", r.ERROR = "error", r))(t || {});
5
5
  const h = {
6
6
  name: "radio-input",
7
7
  inheritAttrs: !1
@@ -55,36 +55,36 @@ const h = {
55
55
  },
56
56
  emits: ["update:model-value"],
57
57
  setup(r, { expose: a, emit: n }) {
58
- const e = r, { value: d } = b(e), t = y(null), s = o(() => ({
59
- [`b-radio-input--${l.DISABLED}`]: e.disabled,
60
- [`b-radio-input--${l.ERROR}`]: e.hasError,
61
- [`b-radio-input--${l.READONLY}`]: e.readonly
62
- })), u = o(() => e.hasError), c = o(() => e.value === e.modelValue), p = () => {
58
+ const e = r, { value: s } = b(e), i = v(null), d = l(() => ({
59
+ [`b-radio-input--${t.DISABLED}`]: e.disabled,
60
+ [`b-radio-input--${t.ERROR}`]: e.hasError,
61
+ [`b-radio-input--${t.READONLY}`]: e.readonly
62
+ })), u = l(() => e.hasError), c = l(() => e.value === e.modelValue), p = () => {
63
63
  !e.disabled && !e.readonly && n("update:model-value", e.value);
64
64
  }, f = (m) => {
65
65
  e.readonly && m.preventDefault();
66
- }, i = () => {
67
- t.value.focus();
66
+ }, o = () => {
67
+ i.value.focus();
68
68
  };
69
69
  return a({
70
- focus: i
71
- }), { __sfc: !0, props: e, emit: n, value: d, inputRef: t, conditionalClasses: s, ariaInvalid: u, isChecked: c, onChange: p, onClick: f, focus: i };
70
+ focus: o
71
+ }), { __sfc: !0, props: e, emit: n, value: s, inputRef: i, conditionalClasses: d, ariaInvalid: u, isChecked: c, onChange: p, onClick: f, focus: o };
72
72
  }
73
73
  });
74
74
  var C = function() {
75
75
  var a = this, n = a._self._c, e = a._self._setupProxy;
76
- return n("input", { ref: "inputRef", staticClass: "b-radio-input", class: e.conditionalClasses, attrs: { id: a.id, "aria-checked": e.isChecked, "aria-label": a.ariaLabel, "aria-invalid": e.ariaInvalid, "aria-describedby": a.ariaDescribedby, disabled: a.disabled, "aria-readonly": a.readonly ? a.readonly : void 0, name: a.name, type: "radio", role: "radio" }, domProps: { checked: e.isChecked, value: e.value }, on: { click: e.onClick, change: e.onChange } });
77
- }, g = [], D = /* @__PURE__ */ v(
76
+ return n("input", { ref: "inputRef", staticClass: "b-radio-input", class: e.conditionalClasses, attrs: { id: a.id, "aria-checked": e.isChecked, "aria-label": a.ariaLabel, "aria-invalid": e.ariaInvalid, "aria-describedby": a.ariaDescribedby, disabled: a.disabled, name: a.name, type: "radio", role: "radio" }, domProps: { checked: e.isChecked, value: e.value }, on: { click: e.onClick, change: e.onChange } });
77
+ }, g = [], D = /* @__PURE__ */ y(
78
78
  R,
79
79
  C,
80
80
  g,
81
81
  !1,
82
82
  null,
83
- "a70c574b"
83
+ "5cfcd7ce"
84
84
  );
85
85
  const L = D.exports;
86
86
  export {
87
- l as R,
87
+ t as R,
88
88
  L as a
89
89
  };
90
- //# sourceMappingURL=radio-input.D8mv2EYC.js.map
90
+ //# sourceMappingURL=radio-input.kzb4gxLW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-input.kzb4gxLW.js","sources":["../../src/components/internal/radio-input/radio-input.types.ts","../../src/components/internal/radio-input/radio-input.vue"],"sourcesContent":["export type RadioInputValue = string | number;\n\nexport enum RadioInputStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n","<template>\n <input\n :id=\"id\"\n ref=\"inputRef\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedby\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :value=\"value\"\n :name=\"name\"\n type=\"radio\"\n class=\"b-radio-input\"\n :class=\"conditionalClasses\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type ComputedRef, type PropType, ref, toRefs } from 'vue';\n import { RadioInputStateClass, type RadioInputValue } from './radio-input.types';\n import type { HTMLAttributes } from 'vue/types/jsx.d.ts';\n\n const props = defineProps({\n /**\n * The aria label associated to the input checkbox.\n */\n ariaLabel: { type: String, default: '' },\n\n /**\n * An additional string that serves as description for the input checkbox (useful if the component shows a description).\n */\n ariaDescribedby: { type: String, default: '' },\n\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Sets the id of the radio input. Required for accessibility purposes\n */\n id: { type: String, default: null },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<RadioInputValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number] as PropType<RadioInputValue>,\n required: true,\n },\n\n /**\n * Sets the name of the radio input.\n * Used for differentiating radio groups or accessing input via form submission.\n */\n name: { type: String, default: null },\n });\n\n const emit = defineEmits([\"update:model-value\"]);\n\n const { value } = toRefs(props);\n\n const inputRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-radio-input--${RadioInputStateClass.DISABLED}`]: props.disabled,\n [`b-radio-input--${RadioInputStateClass.ERROR}`]: props.hasError,\n [`b-radio-input--${RadioInputStateClass.READONLY}`]: props.readonly,\n }));\n\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => props.hasError);\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n }\n };\n\n // readonly attr doesn't work with radio button, so we need to manually ignore the click instead\n const onClick = event => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n const focus = () => {\n inputRef.value.focus();\n };\n\n defineExpose({\n focus,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that renders a radio input (without label)\n *\n * @example\n * import { RadioInput } from '@/internal/radio-input';\n *\n * export default {\n * components: { BentoCheckboxInput },\n * template: `\n * <label for=\"checkbox-id\">Your label</label>\n * <span id=\"description-id\">Description</span>\n * <radio-input id=\"checkbox-id\" aria=label=\"Your label\" aria-describedby=\"description-id\" />\n * `\n * }\n */\n export default {\n name: 'radio-input',\n inheritAttrs: false,\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-input.scss\" />\n"],"names":["RadioInputStateClass","RadioInputStateClass2","__default__","value","toRefs","props","inputRef","ref","conditionalClasses","computed","ariaInvalid","isChecked","onChange","emit","onClick","event","focus","expose"],"mappings":";;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACqIR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,cAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAvDA,EAAA,OAAAC,EAAA,IAAAC,EAAAC,CAAA,GAEAC,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,OAAA;AAAA,MAA2C,CAAA,kBAAAT,EAAA,QAAA,EAAA,GAAAK,EAAA;AAAA,MACoB,CAAA,kBAAAL,EAAA,KAAA,EAAA,GAAAK,EAAA;AAAA,MACH,CAAA,kBAAAL,EAAA,QAAA,EAAA,GAAAK,EAAA;AAAA,IACG,EAAA,GAG/DK,IAAAD,EAAA,MAAAJ,EAAA,QAAA,GAEAM,IAAAF,EAAA,MAAAJ,EAAA,UAAAA,EAAA,UAAA,GAEAO,IAAA,MAAA;AACI,MAAA,CAAAP,EAAA,YAAA,CAAAA,EAAA,YACIQ,EAAA,sBAAAR,EAAA,KAAA;AAAA,IACJ,GAIJS,IAAA,CAAAC,MAAA;AACI,MAAAV,EAAA,YACIU,EAAA,eAAA;AAAA,IACJ,GAGJC,IAAA,MAAA;AACI,MAAAV,EAAA,MAAA,MAAA;AAAA,IAAqB;AAGzB,WAAAW,EAAA;AAAA,MAAa,OAAAD;AAAA,IACT,CAAA;;;;;;;;;;;;;;;"}
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as At, ref as kt, onMounted as Yn, watch as le, computed as gt, h as Q, useAttrs as Jn } from "vue";
2
2
  import { B as Xn } from "./typography.hlOAxsEn.js";
3
- import { B as Kn } from "./segmented-control.DrShqTCa.js";
3
+ import { B as Kn } from "./segmented-control.Dc34mUMM.js";
4
4
  import { B as tr } from "./alert.CMyL-zWT.js";
5
5
  import { n as yt } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
6
6
  import "./index.Cl4_42j5.js";
7
7
  import { B as er } from "./link.C4htMrDV.js";
8
- import { B as nr } from "./checkbox.C7Yu3rls.js";
8
+ import { B as nr } from "./checkbox.BOIfb1fc.js";
9
9
  import { u as rr } from "./i18n.BQkEbtPM.js";
10
10
  import { u as ir } from "./aria-label.CaUURpnB.js";
11
11
  import { g as _e } from "./generate-uid.NJ8tVoha.js";
12
12
  import { g as ur } from "./_commonjsHelpers.C6fGbg64.js";
13
- import { F as lr, E as ar } from "./error-message.BGuKk5tR.js";
13
+ import { F as lr, E as ar } from "./field-label.BKzuCnXr.js";
14
14
  import "../assets/rich-text-editor.css";
15
15
  const or = /* @__PURE__ */ At({
16
16
  __name: "rich-text-editor-content-area",
@@ -6198,4 +6198,4 @@ const Do = xo.exports;
6198
6198
  export {
6199
6199
  Do as r
6200
6200
  };
6201
- //# sourceMappingURL=rich-text-editor._5fF0vFL.js.map
6201
+ //# sourceMappingURL=rich-text-editor.EU6Dltjl.js.map