@adyen/bento-vue2 1.3.0 → 1.4.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 (363) hide show
  1. package/dist/@types/components.d.ts +8 -4
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +8 -0
  3. package/dist/@types/packages/vue2/src/components/accordion/accordion.keys.d.ts +1 -1
  4. package/dist/@types/packages/vue2/src/components/accordion/accordion.types.d.ts +1 -24
  5. package/dist/@types/packages/vue2/src/components/accordion/accordion.vue.d.ts +17 -51
  6. package/dist/@types/packages/vue2/src/components/accordion/components/accordion-item.vue.d.ts +24 -28
  7. package/dist/@types/packages/vue2/src/components/accordion/index.d.ts +2 -3
  8. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +0 -4
  9. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -4
  10. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +161 -150
  11. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +3 -5
  12. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +3 -3
  13. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +77 -15
  15. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +2 -1
  16. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +4 -6
  17. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +4 -4
  18. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.types.d.ts +2 -1
  19. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +36 -11
  20. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +0 -2
  21. package/dist/@types/packages/vue2/src/components/currency/currency.vue.d.ts +0 -3
  22. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +2 -22
  23. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/components/data-grid-config-settings-column-row/data-grid-config-settings-column-row.vue.d.ts +0 -5
  24. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +0 -24
  25. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +2 -0
  26. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +326 -14
  27. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +2 -5
  28. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +1 -21
  29. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +0 -2
  30. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +1 -21
  31. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +3 -6
  32. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +277 -104
  34. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  35. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +5 -5
  36. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.types.d.ts +1 -1
  37. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +5 -6
  38. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +5 -5
  40. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types.d.ts +1 -1
  41. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +5 -5
  42. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types.d.ts +1 -1
  43. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +6 -6
  44. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +7 -9
  45. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.types.d.ts +27 -0
  46. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +76 -0
  47. package/dist/@types/packages/vue2/src/components/empty-state/index.d.ts +2 -0
  48. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +19 -25
  49. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +1 -1
  50. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +0 -26
  51. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -4
  52. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +0 -10
  53. package/dist/@types/packages/vue2/src/components/filter-bar/components/{base-filter/components/filter-bar-filter-button/filter-bar-filter-button.vue.d.ts → filter-bar-button/filter-bar-button.vue.d.ts} +17 -22
  54. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/index.d.ts +1 -0
  55. package/dist/@types/packages/vue2/src/components/filter-bar/components/input-filter/input-filter.vue.d.ts +1 -0
  56. package/dist/@types/packages/vue2/src/components/filter-bar/components/range-filter/range-filter.vue.d.ts +0 -2
  57. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -4
  58. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +2 -4
  59. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +0 -2
  60. package/dist/@types/packages/vue2/src/components/focus-trap/focus-trap.vue.d.ts +3 -0
  61. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +0 -2
  62. package/dist/@types/packages/vue2/src/components/image/const.d.ts +1 -0
  63. package/dist/@types/packages/vue2/src/components/image/image.types.d.ts +19 -0
  64. package/dist/@types/packages/vue2/src/components/image/image.vue.d.ts +50 -0
  65. package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
  66. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  67. package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -0
  68. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +50 -47
  69. package/dist/@types/packages/vue2/src/components/internal/avatar/avatar.vue.d.ts +0 -3
  70. package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +1 -4
  71. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +0 -5
  72. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/__test__/calendar-month-day-stub.vue.d.ts +1 -1
  73. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue.d.ts +2 -2
  74. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  75. package/dist/@types/packages/vue2/src/components/internal/copy/copy.vue.d.ts +0 -2
  76. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +0 -2
  77. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +0 -2
  78. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +0 -2
  79. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-option-tag/listbox-option-tag.vue.d.ts +0 -2
  80. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue.d.ts +0 -2
  81. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -7
  82. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +4 -0
  83. package/dist/@types/packages/vue2/src/components/menu/components/menu-item/menu-item.vue.d.ts +2 -5
  84. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +6 -31
  85. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -5
  86. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +14 -9
  87. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  88. package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +4 -14
  89. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +7 -6
  90. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +0 -2
  91. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-controls/pagination-controls.vue.d.ts +0 -2
  92. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-results-per-page/pagination-results-per-page.vue.d.ts +0 -2
  93. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +2 -1
  94. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +0 -2
  95. package/dist/@types/packages/vue2/src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue.d.ts +0 -2
  96. package/dist/@types/packages/vue2/src/components/popover/components/popover-title/popover-title.vue.d.ts +1 -2
  97. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +9 -9
  98. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -14
  99. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +4 -6
  100. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.types.d.ts +2 -1
  101. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +4 -4
  102. package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +16 -339
  103. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +0 -3
  104. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +1 -0
  105. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +3 -1
  106. package/dist/@types/packages/vue2/src/components/status/status.vue.d.ts +2 -5
  107. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +0 -2
  108. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +2 -23
  109. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +2 -5
  110. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +2 -5
  111. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +2 -5
  112. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-text/summary-grid-item-text.vue.d.ts +1 -4
  113. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +3 -1
  114. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +1 -0
  115. package/dist/@types/packages/vue2/src/components/tabs/tabs.keys.d.ts +1 -0
  116. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +6 -2
  117. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +4 -9
  118. package/dist/@types/packages/vue2/src/components/tag/tag.vue.d.ts +4 -7
  119. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -9
  120. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -12
  121. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +1 -0
  122. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +0 -5
  123. package/dist/@types/packages/vue2/src/components/toggle/toggle.vue.d.ts +4 -6
  124. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +24 -40
  125. package/dist/@types/packages/vue2/src/composables/use-default-slot-validator/use-default-slot-validator.d.ts +2 -1
  126. package/dist/@types/packages/vue2/src/composables/use-has-slot/use-has-slot.d.ts +4 -1
  127. package/dist/@types/packages/vue2/src/index.d.ts +3 -0
  128. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +9 -0
  129. package/dist/@types/packages/vue2/src/utils/ts/print-development-warning.d.ts +1 -0
  130. package/dist/accordion.js +69 -177
  131. package/dist/accordion.js.map +1 -1
  132. package/dist/alert.js +57 -60
  133. package/dist/alert.js.map +1 -1
  134. package/dist/assets/base-button.css +1 -1
  135. package/dist/assets/base-modal.css +1 -0
  136. package/dist/assets/button.css +1 -1
  137. package/dist/assets/calendar.css +1 -1
  138. package/dist/assets/checkbox.css +1 -1
  139. package/dist/assets/chevron-up.css +1 -0
  140. package/dist/assets/controls-group.css +1 -1
  141. package/dist/assets/copy.css +1 -1
  142. package/dist/assets/dropdown-default-textbox.css +1 -1
  143. package/dist/assets/dropdown.css +1 -1
  144. package/dist/assets/error-message.css +1 -1
  145. package/dist/assets/footer-actions.css +1 -1
  146. package/dist/assets/index.css +1 -1
  147. package/dist/assets/index10.css +1 -1
  148. package/dist/assets/index11.css +1 -1
  149. package/dist/assets/index12.css +1 -1
  150. package/dist/assets/index13.css +1 -1
  151. package/dist/assets/index14.css +1 -1
  152. package/dist/assets/index15.css +1 -1
  153. package/dist/assets/index16.css +1 -1
  154. package/dist/assets/index17.css +1 -1
  155. package/dist/assets/index18.css +1 -1
  156. package/dist/assets/index19.css +1 -1
  157. package/dist/assets/index2.css +1 -1
  158. package/dist/assets/index20.css +1 -1
  159. package/dist/assets/index21.css +1 -1
  160. package/dist/assets/index22.css +1 -1
  161. package/dist/assets/index23.css +1 -1
  162. package/dist/assets/index24.css +1 -1
  163. package/dist/assets/index25.css +1 -1
  164. package/dist/assets/index26.css +1 -1
  165. package/dist/assets/index27.css +1 -1
  166. package/dist/assets/index28.css +1 -1
  167. package/dist/assets/index29.css +1 -1
  168. package/dist/assets/index3.css +1 -1
  169. package/dist/assets/index30.css +1 -1
  170. package/dist/assets/index31.css +1 -1
  171. package/dist/assets/index32.css +1 -1
  172. package/dist/assets/index33.css +1 -1
  173. package/dist/assets/index34.css +1 -1
  174. package/dist/assets/index35.css +1 -1
  175. package/dist/assets/index36.css +1 -1
  176. package/dist/assets/index37.css +1 -1
  177. package/dist/assets/index38.css +1 -1
  178. package/dist/assets/index39.css +1 -1
  179. package/dist/assets/index4.css +1 -1
  180. package/dist/assets/index40.css +1 -1
  181. package/dist/assets/index41.css +1 -1
  182. package/dist/assets/index42.css +1 -0
  183. package/dist/assets/index5.css +1 -1
  184. package/dist/assets/index6.css +1 -1
  185. package/dist/assets/index7.css +1 -1
  186. package/dist/assets/index8.css +1 -1
  187. package/dist/assets/index9.css +1 -1
  188. package/dist/assets/listbox-option-tag.css +1 -1
  189. package/dist/assets/listbox.css +1 -1
  190. package/dist/assets/loading-button.css +1 -1
  191. package/dist/assets/tooltip.css +1 -1
  192. package/dist/avatar-image.js +1 -1
  193. package/dist/badge.js +2 -2
  194. package/dist/button.js +110 -12
  195. package/dist/button.js.map +1 -1
  196. package/dist/card.js +66 -67
  197. package/dist/card.js.map +1 -1
  198. package/dist/checkbox.js +27 -26
  199. package/dist/checkbox.js.map +1 -1
  200. package/dist/chunks/{base-button.98379576.js → base-button.bd8fa976.js} +24 -27
  201. package/dist/chunks/base-button.bd8fa976.js.map +1 -0
  202. package/dist/chunks/base-modal.a365f260.js +207 -0
  203. package/dist/chunks/base-modal.a365f260.js.map +1 -0
  204. package/dist/chunks/{button.d0c9527d.js → button.fb307df3.js} +36 -39
  205. package/dist/chunks/button.fb307df3.js.map +1 -0
  206. package/dist/chunks/{calendar.0ae43a96.js → calendar.79ea42c1.js} +214 -217
  207. package/dist/chunks/calendar.79ea42c1.js.map +1 -0
  208. package/dist/chunks/checkbox.c7d791ed.js +173 -0
  209. package/dist/chunks/checkbox.c7d791ed.js.map +1 -0
  210. package/dist/chunks/{chevron-down.b851a6da.js → chevron-up.674ec2e5.js} +8 -8
  211. package/dist/chunks/chevron-up.674ec2e5.js.map +1 -0
  212. package/dist/chunks/{controls-group.b827382b.js → controls-group.5d3e04dd.js} +20 -20
  213. package/dist/chunks/controls-group.5d3e04dd.js.map +1 -0
  214. package/dist/chunks/{copy.5a4cbd4d.js → copy.ac796536.js} +37 -38
  215. package/dist/chunks/copy.ac796536.js.map +1 -0
  216. package/dist/chunks/{dropdown-default-textbox.819e43f7.js → dropdown-default-textbox.109c36d2.js} +38 -40
  217. package/dist/chunks/dropdown-default-textbox.109c36d2.js.map +1 -0
  218. package/dist/chunks/{dropdown.c05678d0.js → dropdown.fd93f0ce.js} +351 -335
  219. package/dist/chunks/dropdown.fd93f0ce.js.map +1 -0
  220. package/dist/chunks/error-message.3b3c33d4.js +47 -0
  221. package/dist/chunks/error-message.3b3c33d4.js.map +1 -0
  222. package/dist/chunks/{footer-actions.67642347.js → footer-actions.f02e8699.js} +23 -23
  223. package/dist/chunks/footer-actions.f02e8699.js.map +1 -0
  224. package/dist/chunks/get-slot-text.c1114034.js +9 -0
  225. package/dist/chunks/get-slot-text.c1114034.js.map +1 -0
  226. package/dist/chunks/{grid-layout.73f23b1b.js → grid-layout.b7e0d964.js} +2 -2
  227. package/dist/chunks/{grid-layout.73f23b1b.js.map → grid-layout.b7e0d964.js.map} +1 -1
  228. package/dist/chunks/{index.56858f4e.js → index.45295dd3.js} +23 -19
  229. package/dist/chunks/index.45295dd3.js.map +1 -0
  230. package/dist/chunks/{index.10aaf539.js → index.88ff49c2.js} +136 -142
  231. package/dist/chunks/index.88ff49c2.js.map +1 -0
  232. package/dist/chunks/{index.73d50fa6.js → index.9902cae4.js} +65 -68
  233. package/dist/chunks/{index.73d50fa6.js.map → index.9902cae4.js.map} +1 -1
  234. package/dist/chunks/{index.0cf00b47.js → index.bd734551.js} +35 -37
  235. package/dist/chunks/index.bd734551.js.map +1 -0
  236. package/dist/chunks/{index.133e4da0.js → index.c85a1ab9.js} +81 -79
  237. package/dist/chunks/{index.133e4da0.js.map → index.c85a1ab9.js.map} +1 -1
  238. package/dist/chunks/{index.f0f8ed98.js → index.c8f81673.js} +23 -26
  239. package/dist/chunks/index.c8f81673.js.map +1 -0
  240. package/dist/chunks/{listbox-option-tag.8d6cccac.js → listbox-option-tag.ec42431b.js} +32 -36
  241. package/dist/chunks/listbox-option-tag.ec42431b.js.map +1 -0
  242. package/dist/chunks/{listbox.116ed0c1.js → listbox.e792d2d6.js} +244 -251
  243. package/dist/chunks/listbox.e792d2d6.js.map +1 -0
  244. package/dist/chunks/loading-button.429c8416.js +86 -0
  245. package/dist/chunks/loading-button.429c8416.js.map +1 -0
  246. package/dist/chunks/tabs.keys.358742f2.js +7 -0
  247. package/dist/chunks/tabs.keys.358742f2.js.map +1 -0
  248. package/dist/chunks/{tooltip.2aff4fa6.js → tooltip.a47ace87.js} +49 -52
  249. package/dist/chunks/tooltip.a47ace87.js.map +1 -0
  250. package/dist/chunks/use-default-slot-validator.cbdfe693.js +13 -0
  251. package/dist/chunks/use-default-slot-validator.cbdfe693.js.map +1 -0
  252. package/dist/chunks/use-has-slot.6052d56a.js +6 -0
  253. package/dist/chunks/use-has-slot.6052d56a.js.map +1 -0
  254. package/dist/code-snippet.js +469 -413
  255. package/dist/code-snippet.js.map +1 -1
  256. package/dist/country.js +492 -494
  257. package/dist/country.js.map +1 -1
  258. package/dist/currency.js +32 -35
  259. package/dist/currency.js.map +1 -1
  260. package/dist/data-grid.js +595 -603
  261. package/dist/data-grid.js.map +1 -1
  262. package/dist/date-picker.js +76 -80
  263. package/dist/date-picker.js.map +1 -1
  264. package/dist/date-range-picker.js +2 -2
  265. package/dist/date.js +1 -1
  266. package/dist/divider.js +1 -1
  267. package/dist/dropdown.js +37 -39
  268. package/dist/dropdown.js.map +1 -1
  269. package/dist/empty-state.js +134 -0
  270. package/dist/empty-state.js.map +1 -0
  271. package/dist/filter-bar.js +648 -638
  272. package/dist/filter-bar.js.map +1 -1
  273. package/dist/focus-trap.js +1 -1
  274. package/dist/form-layout.js +64 -64
  275. package/dist/form-layout.js.map +1 -1
  276. package/dist/header.js +61 -63
  277. package/dist/header.js.map +1 -1
  278. package/dist/image.js +82 -0
  279. package/dist/image.js.map +1 -0
  280. package/dist/index.js +216 -205
  281. package/dist/index.js.map +1 -1
  282. package/dist/info-icon.js +2 -2
  283. package/dist/input-field.js +99 -123
  284. package/dist/input-field.js.map +1 -1
  285. package/dist/internal.js +7 -7
  286. package/dist/link.js +27 -26
  287. package/dist/link.js.map +1 -1
  288. package/dist/loading-indicator.js +1 -1
  289. package/dist/menu.js +96 -104
  290. package/dist/menu.js.map +1 -1
  291. package/dist/modal.js +111 -264
  292. package/dist/modal.js.map +1 -1
  293. package/dist/pagination.js +148 -145
  294. package/dist/pagination.js.map +1 -1
  295. package/dist/payment-method.js +16 -18
  296. package/dist/payment-method.js.map +1 -1
  297. package/dist/popover.js +58 -54
  298. package/dist/popover.js.map +1 -1
  299. package/dist/popper-container.js +13 -17
  300. package/dist/popper-container.js.map +1 -1
  301. package/dist/radio-group.js +71 -72
  302. package/dist/radio-group.js.map +1 -1
  303. package/dist/search-bar.js +54 -66
  304. package/dist/search-bar.js.map +1 -1
  305. package/dist/segmented-control.js +68 -55
  306. package/dist/segmented-control.js.map +1 -1
  307. package/dist/sidepanel.js +65 -64
  308. package/dist/sidepanel.js.map +1 -1
  309. package/dist/status.js +20 -23
  310. package/dist/status.js.map +1 -1
  311. package/dist/structured-list.js +1 -1
  312. package/dist/summary-grid.js +110 -141
  313. package/dist/summary-grid.js.map +1 -1
  314. package/dist/tabs.js +68 -60
  315. package/dist/tabs.js.map +1 -1
  316. package/dist/tag.js +23 -26
  317. package/dist/tag.js.map +1 -1
  318. package/dist/textarea.js +97 -96
  319. package/dist/textarea.js.map +1 -1
  320. package/dist/timeline.js +125 -125
  321. package/dist/timeline.js.map +1 -1
  322. package/dist/toast.js +44 -48
  323. package/dist/toast.js.map +1 -1
  324. package/dist/toggle.js +54 -52
  325. package/dist/toggle.js.map +1 -1
  326. package/dist/typography.js +1 -1
  327. package/dist/web-types.json +651 -397
  328. package/package.json +9 -12
  329. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.d.ts +0 -2
  330. package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateBodyFitContentDynamicStyles/useCalculateBodyFitContentDynamicStyles.types.d.ts +0 -8
  331. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/components/index.d.ts +0 -1
  332. package/dist/assets/button-actions.css +0 -1
  333. package/dist/assets/chevron-down.css +0 -1
  334. package/dist/chunks/base-button.98379576.js.map +0 -1
  335. package/dist/chunks/button-actions.bd397c79.js +0 -104
  336. package/dist/chunks/button-actions.bd397c79.js.map +0 -1
  337. package/dist/chunks/button.d0c9527d.js.map +0 -1
  338. package/dist/chunks/calendar.0ae43a96.js.map +0 -1
  339. package/dist/chunks/checkbox.f8457c93.js +0 -164
  340. package/dist/chunks/checkbox.f8457c93.js.map +0 -1
  341. package/dist/chunks/chevron-down.b851a6da.js.map +0 -1
  342. package/dist/chunks/controls-group.b827382b.js.map +0 -1
  343. package/dist/chunks/copy.5a4cbd4d.js.map +0 -1
  344. package/dist/chunks/dropdown-default-textbox.819e43f7.js.map +0 -1
  345. package/dist/chunks/dropdown.c05678d0.js.map +0 -1
  346. package/dist/chunks/error-message.0433b539.js +0 -47
  347. package/dist/chunks/error-message.0433b539.js.map +0 -1
  348. package/dist/chunks/footer-actions.67642347.js.map +0 -1
  349. package/dist/chunks/get-slot-text.e5c766d0.js +0 -9
  350. package/dist/chunks/get-slot-text.e5c766d0.js.map +0 -1
  351. package/dist/chunks/index.0cf00b47.js.map +0 -1
  352. package/dist/chunks/index.10aaf539.js.map +0 -1
  353. package/dist/chunks/index.56858f4e.js.map +0 -1
  354. package/dist/chunks/index.f0f8ed98.js.map +0 -1
  355. package/dist/chunks/listbox-option-tag.8d6cccac.js.map +0 -1
  356. package/dist/chunks/listbox.116ed0c1.js.map +0 -1
  357. package/dist/chunks/loading-button.1c201f87.js +0 -84
  358. package/dist/chunks/loading-button.1c201f87.js.map +0 -1
  359. package/dist/chunks/tooltip.2aff4fa6.js.map +0 -1
  360. package/dist/chunks/use-default-slot-validator.83d977a1.js +0 -11
  361. package/dist/chunks/use-default-slot-validator.83d977a1.js.map +0 -1
  362. package/dist/chunks/use-has-slot.068222e6.js +0 -5
  363. package/dist/chunks/use-has-slot.068222e6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../src/components/popover/popover.types.ts","../src/components/popover/components/popover-title/popover-title.vue","../src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../src/components/popover/popover.vue"],"sourcesContent":["import { PopperContainerPosition } from '../popper-container';\n\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" :el=\"BentoTypographyElement.SPAN\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n\n // Enums\n BentoTypographyElement,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" :variant=\"BentoButtonVariant.TERTIARY\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton, BentoButtonVariant } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n\n // Enums\n BentoButtonVariant,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","<template>\n <Transition name=\"b-appear\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n class=\"b-popover\"\n :aria-role=\"PopperContainerAriaRole.POPOVER\"\n :aria-label=\"computedAriaLabel\"\n :target-element=\"targetElement\"\n :position=\"position\"\n :offset=\"[0, 2]\"\n :modifiers=\"modifiers\"\n :fixed-positioning=\"fixedPositioning\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRefs } from 'vue';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import { BentoPopoverPositions } from './popover.types';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n import { useHasSlot } from '@/composables';\n\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-popover',\n components: {\n BentoButtonActions,\n BentoPopoverDismissButton,\n BentoPopoverTitle,\n PopperContainer,\n },\n inheritAttrs: true, // Have to do this to be able to add class for data picker\n props: {\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: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * https://popper.js.org/docs/v2/constructors/#strategy\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Custom set of modifiers. Useful for low-level control over Popper behavior in some really complex use cases.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.TOP,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['dismiss'],\n setup(props, { emit, attrs, slots }) {\n const { ariaLabel, title } = toRefs(props);\n\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n }));\n\n const computedAriaLabel = useAriaLabel({ ariaLabel, label: title });\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n return {\n // Values\n conditionalClasses,\n contentConditionalClasses,\n computedAttributes,\n computedAriaLabel,\n\n // Enums\n PopperContainerAriaRole,\n\n // Events\n dismissPopover,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["BentoPopoverPositions","PopperContainerPosition","_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","BentoTypographyElement","_sfc_main$1","BentoButton","CrossIcon","BentoButtonVariant","_sfc_main","BentoButtonActions","BentoPopoverDismissButton","BentoPopoverTitle","PopperContainer","BentoButtonActionsLayout","value","_a","emit","attrs","slots","ariaLabel","title","toRefs","computedAttributes","computedAriaLabel","useAriaLabel","conditionalClasses","contentConditionalClasses","PopperContainerAriaRole","useHasSlot"],"mappings":";;;;;;;;;;AAEa,MAAAA,IAAA,EAAA,GAAAC,EAAA,GCQbC,IAAAC,EAAA;AAAA,EAAA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,cAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA,EAAA,MAAA,QAAA,SAAA,KAAA;AAAA,EAKA;AAAA,EACA,MAAAC,GAAA;AAGA,UAAAC,IAAAC,EAAA,MAAA,CAAAF,EAAA,YAAA,GAGAG,IAAAD;AAAA,MAAA,MAAAF,EAAA,eAAAI,EAAA,WAAAA,EAAA;AAAA,IACA;AAGA,WAAA;AAAA;AAAA,MAAA,aAAAH;AAAA,MAEA,cAAAE;AAAA;AAAA,MACA,wBAAAE;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;qBC5BAC,IAAAR,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,aAAAS,GAAA,WAAAC,EAAA;AAAA,EACA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,MAAAR,GAAA;AAIA,WAAA;AAAA;AAAA,MAAA,kBAFAE,EAAA,OAAA,EAAA,sCAAAF,EAAA,QAAA,EAAA;AAAA;AAAA,MAIA,oBAAAS;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;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GA4B,IAAA1B,EAAA,OAAA;AAAA,MAAA,kCAAA,CAAA,CAAAF,EAAA;AAAA,IACA,EAAA;AAKA,WAAA;AAAA;AAAA,MAAA,oBAAA2B;AAAA,MAEA,2BAAAC;AAAA,MACA,oBAAAJ;AAAA,MACA,mBAAAC;AAAA;AAAA,MACA,yBAAAI;AAAA;AAAA,MAGA,gBAVA,MAAAX,EAAA,SAAA;AAAA;AAAA,MAaA,SAAAY,EAAAV,CAAA;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover.js","sources":["../src/components/popover/popover.types.ts","../src/components/popover/components/popover-title/popover-title.vue","../src/components/popover/components/popover-dismiss-button/popover-dismiss-button.vue","../src/components/popover/popover.vue"],"sourcesContent":["import { PopperContainerPosition } from '../popper-container';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n","<template>\n <bento-typography :strongest=\"isStrongest\" :variant=\"titleVariant\" el=\"span\">\n {{ title }}\n </bento-typography>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoTypography, BentoTypographyVariant } from '@/components/typography';\n\n export default defineComponent({\n components: { BentoTypography },\n props: {\n /**\n * Indicates if the popover contains an image.\n */\n isImageTitle: { type: Boolean, default: false },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: { type: String, default: null },\n },\n setup(props) {\n // Use strongest only when it has no image\n const isStrongest = computed(() => !props.isImageTitle);\n\n // If an image is present, change the variant from BODY to SUBTITLE and remove the \"strongest\" property of the title\n const titleVariant = computed(() =>\n props.isImageTitle ? BentoTypographyVariant.SUBTITLE : BentoTypographyVariant.BODY\n );\n\n return {\n // Values\n isStrongest,\n titleVariant,\n };\n },\n });\n</script>\n","<template>\n <bento-button :class=\"conditionalClass\" variant=\"tertiary\" @click=\"$emit('click')\">\n <template #iconLeft>\n <cross-icon svg-title=\"dismiss\" />\n </template>\n </bento-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoButton } from '@/components/button';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n export default defineComponent({\n name: 'bento-popover-dismiss-button',\n components: { BentoButton, CrossIcon },\n props: {\n onImage: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const conditionalClass = computed(() => ({ 'b-popover-dismiss-button--on-image': props.onImage }));\n\n return {\n // Values\n conditionalClass,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover-dismiss-button.scss\" />\n","<template>\n <Transition name=\"b-appear\">\n <popper-container\n v-if=\"open\"\n :id=\"computedAttributes['id']\"\n class=\"b-popover\"\n :aria-role=\"PopperContainerAriaRole.POPOVER\"\n :aria-label=\"computedAriaLabel\"\n :target-element=\"targetElement\"\n :position=\"position\"\n :offset=\"[0, 2]\"\n :modifiers=\"modifiers\"\n :fixed-positioning=\"fixedPositioning\"\n :disabled-focus-trap=\"disableFocusTrap\"\n :class=\"conditionalClasses\"\n :arrow=\"{ classes: ['b-popover__arrow'] }\"\n >\n <div v-if=\"hasSlot('image')\" class=\"b-popover__image\">\n <div v-if=\"dismissible\" class=\"b-popover__image-dismiss-button\">\n <bento-popover-dismiss-button on-image @click=\"dismissPopover\" />\n </div>\n <slot name=\"image\"></slot>\n </div>\n <div v-if=\"title\" class=\"b-popover__header\">\n <div class=\"b-popover__header-title\">\n <slot v-if=\"hasSlot('headerIcon')\" name=\"headerIcon\"></slot>\n <bento-popover-title :title=\"title\" :is-image-title=\"!!hasSlot('image')\" />\n </div>\n <div v-if=\"dismissible && !hasSlot('image')\">\n <bento-popover-dismiss-button @click=\"dismissPopover\" />\n </div>\n </div>\n\n <div v-if=\"hasSlot('default')\" class=\"b-popover__content\" :class=\"contentConditionalClasses\">\n <slot></slot>\n </div>\n\n <div v-if=\"actions\" class=\"b-popover__footer\">\n <bento-button-actions :actions=\"actions\" :layout=\"actionsLayout\"></bento-button-actions>\n </div>\n </popper-container>\n </Transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRefs } from 'vue';\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { PopperContainer, PopperContainerAriaRole } from '@/components/popper-container';\n import { BentoPopoverPositions } from './popover.types';\n import { BentoButtonActions, BentoButtonActionsLayout, BentoButtonActionsList } from '@/components/button';\n import BentoPopoverTitle from './components/popover-title/popover-title.vue';\n import BentoPopoverDismissButton from './components/popover-dismiss-button/popover-dismiss-button.vue';\n\n /**\n * Example description of the component...\n *\n * @example\n * import { BentoPopover } from '@adyen/adl-vue2';\n *\n * export default {\n * components: { BentoPopover },\n * template: `\n * <bento-popover id=\"your-popover-id\">\n * ...Example code of the component\n * </bento-popover>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-popover',\n components: {\n BentoButtonActions,\n BentoPopoverDismissButton,\n BentoPopoverTitle,\n PopperContainer,\n },\n inheritAttrs: true, // Have to do this to be able to add class for data picker\n props: {\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: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (value: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(value),\n },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Defines a string value that provides an accessible name for the popover.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent: { type: Boolean, default: false },\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * https://popper.js.org/docs/v2/constructors/#strategy\n */\n fixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Toggles the popover open and closed\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displays the popover in a large size.\n */\n large: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Custom set of modifiers. Useful for low-level control over Popper behavior in some really complex use cases.\n */\n modifiers: { type: Array, default: null },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.TOP,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Displays the popover in a small size.\n */\n small: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Indicates the title you want to give the popover.\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n /**\n * Displays the popover without padding.\n */\n withoutSpace: {\n type: Boolean,\n default: false,\n },\n },\n emits: ['dismiss'],\n setup(props, { emit, attrs, slots }) {\n const computedAttributes = computed(() => ({\n id: attrs.id?.toString() as string,\n }));\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel, title } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: title,\n });\n\n const conditionalClasses = computed(() => ({\n 'b-popover--small': props.small && !props.large,\n 'b-popover--with-divider': !!props.divider,\n 'b-popover--large': props.large && !props.small,\n 'b-popover--fit-content': props.fitContent,\n 'b-popover--without-space': props.withoutSpace,\n }));\n\n const contentConditionalClasses = computed(() => ({\n 'b-popover__content--with-title': !!props.title,\n }));\n\n const dismissPopover = () => emit('dismiss');\n\n return {\n // Values\n computedAriaLabel,\n conditionalClasses,\n contentConditionalClasses,\n computedAttributes,\n\n // Enums\n PopperContainerAriaRole,\n\n // Events\n dismissPopover,\n\n // Methods\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popover.scss\" />\n"],"names":["BentoPopoverPositions","PopperContainerPosition","_sfc_main$2","defineComponent","BentoTypography","props","isStrongest","computed","titleVariant","BentoTypographyVariant","_sfc_main$1","BentoButton","CrossIcon","_sfc_main","BentoButtonActions","BentoPopoverDismissButton","BentoPopoverTitle","PopperContainer","BentoButtonActionsLayout","value","_a","emit","attrs","slots","computedAttributes","ariaLabelAttribute","ref","ariaLabel","title","toRefs","computedAriaLabel","useAriaLabel","conditionalClasses","contentConditionalClasses","PopperContainerAriaRole","useHasSlot"],"mappings":";;;;;;;;;;AAKa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Z,CAAA;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { createPopper as p } from "@popperjs/core";
2
2
  import { defineComponent as l } from "vue";
3
- import { B as n } from "./chunks/index.133e4da0.js";
3
+ import { B as n } from "./chunks/index.c85a1ab9.js";
4
4
  import { n as f } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
5
- import "./assets/index20.css";
6
- var s = /* @__PURE__ */ ((t) => (t.TOP = "top", t.RIGHT = "right", t.BOTTOM = "bottom", t.LEFT = "left", t))(s || {}), a = /* @__PURE__ */ ((t) => (t.AUTO = "auto", t.AUTO_START = "auto-start", t.AUTO_END = "auto-end", t.TOP_START = "top-start", t.TOP_END = "top-end", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t))(a || {}), o = /* @__PURE__ */ ((t) => (t.TOOLTIP = "tooltip", t.POPOVER = "dialog", t))(o || {});
7
- const i = { ...s, ...a }, d = (t, e) => ({
5
+ import "./assets/index6.css";
6
+ var i = /* @__PURE__ */ ((t) => (t.TOP = "top", t.RIGHT = "right", t.BOTTOM = "bottom", t.LEFT = "left", t))(i || {}), a = /* @__PURE__ */ ((t) => (t.AUTO = "auto", t.AUTO_START = "auto-start", t.AUTO_END = "auto-end", t.TOP_START = "top-start", t.TOP_END = "top-end", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t))(a || {}), o = /* @__PURE__ */ ((t) => (t.TOOLTIP = "tooltip", t.POPOVER = "dialog", t))(o || {});
7
+ const s = { ...i, ...a }, d = (t, e) => ({
8
8
  name: "arrow",
9
9
  options: {
10
10
  element: t,
@@ -44,10 +44,6 @@ const i = { ...s, ...a }, d = (t, e) => ({
44
44
  * The id to be set on the component. Use it for accessibility purposes.
45
45
  */
46
46
  id: { type: String, default: null },
47
- /**
48
- * Defines a string value that provides an accessible name for the popper-container.
49
- */
50
- ariaLabel: { type: String, default: null },
51
47
  /**
52
48
  * Reference to the DOM element or Vue component for positioning
53
49
  */
@@ -58,8 +54,8 @@ const i = { ...s, ...a }, d = (t, e) => ({
58
54
  */
59
55
  position: {
60
56
  type: String,
61
- default: i.AUTO,
62
- validator: (t) => Object.values(i).includes(t)
57
+ default: s.AUTO,
58
+ validator: (t) => Object.values(s).includes(t)
63
59
  },
64
60
  /**
65
61
  * Instructs popover to be visible outside of the containing container.
@@ -207,23 +203,23 @@ const i = { ...s, ...a }, d = (t, e) => ({
207
203
  });
208
204
  var T = function() {
209
205
  var e = this, r = e._self._c;
210
- return e._self._setupProxy, r("bento-focus-trap", { ref: "popperContainerRef", staticClass: "b-popper-container", attrs: { id: e.id, disabled: e.disabledFocusTrap, role: e.ariaRole, "aria-label": e.ariaLabel } }, [e._t("default"), e.arrow ? r("span", { ref: "arrow", staticClass: "b-popper-container__arrow", class: e.arrowClasses, attrs: { "data-testid": "arrow" } }) : e._e()], 2);
211
- }, y = [], O = /* @__PURE__ */ f(
206
+ return e._self._setupProxy, r("bento-focus-trap", e._b({ ref: "popperContainerRef", staticClass: "b-popper-container", attrs: { id: e.id, disabled: e.disabledFocusTrap, role: e.ariaRole } }, "bento-focus-trap", e.$attrs, !1), [e._t("default"), e.arrow ? r("span", { ref: "arrow", staticClass: "b-popper-container__arrow", class: e.arrowClasses, attrs: { "data-testid": "arrow" } }) : e._e()], 2);
207
+ }, b = [], y = /* @__PURE__ */ f(
212
208
  _,
213
209
  T,
214
- y,
210
+ b,
215
211
  !1,
216
212
  null,
217
- "1c767d7c",
213
+ "2121be6b",
218
214
  null,
219
215
  null
220
216
  );
221
- const M = O.exports;
217
+ const M = y.exports;
222
218
  export {
223
219
  M as PopperContainer,
224
220
  o as PopperContainerAriaRole,
225
- i as PopperContainerPosition,
226
- s as PopperContainerPositionBasic,
221
+ s as PopperContainerPosition,
222
+ i as PopperContainerPositionBasic,
227
223
  a as PopperContainerPositionExtended
228
224
  };
229
225
  //# sourceMappingURL=popper-container.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popper-container.js","sources":["../src/components/popper-container/popper-container.types.ts","../src/components/popper-container/popper-container.utils.ts","../src/components/popper-container/popper-container.vue"],"sourcesContent":["import type { Modifier, StrictModifiers } from '@popperjs/core';\n\ntype ArrowModifier = Modifier<'arrow', unknown>;\ntype ApplyArrowHideModifier = Modifier<'applyArrowHide', unknown>;\ntype SameWidthModifier = Modifier<'sameWidth', unknown>;\ntype TrackPositionModifer = Modifier<'trackPosition', unknown>;\ntype FlipModifer = Modifier<'flip', unknown>;\nexport type ExtendedModifiers =\n | StrictModifiers\n | ArrowModifier\n | ApplyArrowHideModifier\n | SameWidthModifier\n | TrackPositionModifer\n | FlipModifer;\n\nexport interface PopperContainerArrowProp {\n classes?: string[];\n padding?: string;\n}\n\nexport enum PopperContainerPositionBasic {\n TOP = 'top',\n RIGHT = 'right',\n BOTTOM = 'bottom',\n LEFT = 'left',\n}\n\nexport enum PopperContainerPositionExtended {\n AUTO = 'auto',\n AUTO_START = 'auto-start',\n AUTO_END = 'auto-end',\n TOP_START = 'top-start',\n TOP_END = 'top-end',\n RIGHT_START = 'right-start',\n RIGHT_END = 'right-end',\n BOTTOM_START = 'bottom-start',\n BOTTOM_END = 'bottom-end',\n LEFT_START = 'left-start',\n LEFT_END = 'left-end',\n}\n\n// TODO: add more roles as we figure them out\nexport enum PopperContainerAriaRole {\n TOOLTIP = 'tooltip',\n POPOVER = 'dialog',\n}\n\nexport const PopperContainerPosition = { ...PopperContainerPositionBasic, ...PopperContainerPositionExtended };\nexport type PopperContainerPosition = PopperContainerPositionBasic | PopperContainerPositionExtended;\n\nexport type FallbackPositionProp = PopperContainerPosition[] | PopperContainerPosition;\n","import type { VueNodeElement } from '@/types';\nimport { ExtendedModifiers, FallbackPositionProp, PopperContainerArrowProp } from './popper-container.types';\n\n/**\n * Creates an arrow modifier for popper container.\n * If padding is set in arrow props, then implement in modifier.\n * @param arrow arrow element\n * @param arrowProps arrow props\n * @returns ArrowModifier\n */\nexport const getArrowModifier = (arrow: VueNodeElement, arrowProps: PopperContainerArrowProp) => ({\n name: 'arrow',\n options: {\n element: arrow,\n padding: arrowProps.padding || 0,\n },\n});\n\n/**\n * Created an offset modifier for the popper.\n * If an arrow is set (i.e. an arrow is present in popper) then adjust offset accordingly.\n * See popper docs for more info: https://popper.js.org/docs/v2/modifiers/offset/\n * @param arrow arrow props\n * @param offset offset numbered array\n * @returns OffsetModifier\n */\nexport const getOffsetModifier = (arrowProps: PopperContainerArrowProp, offset: number[]) => ({\n name: 'offset',\n options: { offset: arrowProps ? [offset[0], offset[1] + 7] : offset },\n});\n\n/**\n * Creates popover fallback position for popper if it's scheduled to overflow a given boundary.\n * See docs for more info: https://popper.js.org/docs/v2/modifiers/flip/\n * @param fallbackPosition fallbackPosition\n * @returns FlipModifier\n */\nexport const getFlipModifier = (fallbackPosition: FallbackPositionProp) => ({\n name: 'flip',\n options: {\n fallbackPlacements: Array.isArray(fallbackPosition) ? fallbackPosition : [fallbackPosition],\n },\n});\n\n/**\n * Applies a data-hide attribute to arrow element depending on center offset.\n */\nexport const arrowDataHideAttributeModifier: ExtendedModifiers = {\n name: 'applyArrowHide',\n enabled: true,\n phase: 'write',\n fn({ state }) {\n const { arrow } = state.elements;\n\n if (arrow) {\n if (state.modifiersData.arrow.centerOffset !== 0) {\n arrow.setAttribute('data-hide', '');\n } else {\n arrow.removeAttribute('data-hide');\n }\n }\n },\n};\n\nexport const sameWidthModifier: ExtendedModifiers = {\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n state.elements.popper.style.width = `${(state.elements.reference as HTMLElement).offsetWidth}px`;\n },\n};\n","<template>\n <bento-focus-trap\n :id=\"id\"\n ref=\"popperContainerRef\"\n :disabled=\"disabledFocusTrap\"\n class=\"b-popper-container\"\n :role=\"ariaRole\"\n :aria-label=\"ariaLabel\"\n >\n <slot></slot>\n <span\n v-if=\"arrow\"\n ref=\"arrow\"\n :class=\"arrowClasses\"\n class=\"b-popper-container__arrow\"\n data-testid=\"arrow\"\n ></span>\n </bento-focus-trap>\n</template>\n\n<script lang=\"ts\">\n import { createPopper } from '@popperjs/core';\n import type { Instance, PositioningStrategy } from '@popperjs/core';\n import { defineComponent, PropType } from 'vue';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import {\n ExtendedModifiers,\n FallbackPositionProp,\n PopperContainerAriaRole,\n PopperContainerArrowProp,\n PopperContainerPosition,\n PopperContainerPositionBasic,\n } from './popper-container.types';\n import {\n arrowDataHideAttributeModifier,\n getArrowModifier,\n getFlipModifier,\n getOffsetModifier,\n sameWidthModifier,\n } from './popper-container.utils';\n import type { VueNodeElement } from '@/types';\n\n /**\n * A wrapper for the 'popper/core' package that overlays a small piece of content near a target element.\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * e.g. Tooltip\n * More info here on the package: https://popper.js.org/docs/v2/\n *\n * * @usage\n * import { PopperContainer } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { PopperContainer },\n * computed: {\n * targetElement() {\n * return this.$refs.tooltipTarget;\n * },\n * },\n * template: `\n * <popper-container\n * :target-element=\"targetElement\"\n * :position=\"position\"\n * >\n * {{ content }}\n * </popper-container>`,\n * }\n */\n export default defineComponent({\n components: { BentoFocusTrap },\n props: {\n /**\n * The id to be set on the component. Use it for accessibility purposes.\n */\n id: { type: String, default: null },\n /**\n * Defines a string value that provides an accessible name for the popper-container.\n */\n ariaLabel: { type: String, default: null },\n /**\n * Reference to the DOM element or Vue component for positioning\n */\n targetElement: { type: [Element, Object] as PropType<VueNodeElement>, required: true },\n /**\n * Position relative to the target element\n * @see {@link https://popper.js.org/docs/v2/constructors/#placement}\n */\n position: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: value =>\n Object.values(PopperContainerPosition).includes(value as PopperContainerPositionBasic),\n },\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * https://popper.js.org/docs/v2/constructors/#strategy\n */\n fixedPositioning: { type: Boolean, default: false },\n /**\n * Indicates if container should have additional arrow, pointing at target element\n * Can be just a boolean flag, or an object with additional configuration:\n * @property {Array<string>} arrow.classes – apply any additional classes to the arrow element.\n * @property {string} arrow.padding – useful when content has rounded corners, https://popper.js.org/docs/v2/modifiers/arrow/#padding\n */\n arrow: { type: Object as PropType<PopperContainerArrowProp | boolean>, default: undefined },\n /**\n * Allows to displace a popper container from its target element.\n * @see {@link https://popper.js.org/docs/v2/modifiers/offset/}\n */\n offset: {\n type: Array as PropType<number[]>,\n default: () => [0, 0],\n validator: (value: number[]) => value?.length === 2,\n },\n /**\n * Instructs popper container to have the same width as target element.\n */\n matchWidth: { type: Boolean, default: false },\n /**\n * Disables wrapping focus-trap component.\n * Mostly useful for the storybook demo.\n */\n disabledFocusTrap: { type: Boolean, default: false },\n /**\n * Custom set of modifiers. Useful for low-level control over Popper behavior in some really complex use cases.\n */\n modifiers: { type: Array, default: null },\n /**\n * Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\n */\n fallbackPosition: {\n type: [Array, String] as PropType<FallbackPositionProp>,\n default: null,\n },\n /**\n * The aria role assigned to the container. Defaults to null, which means it's not set if nothing is passed.\n */\n ariaRole: {\n type: String as PropType<PopperContainerAriaRole>,\n default: null,\n validator: value => Object.values(PopperContainerAriaRole).includes(value as PopperContainerAriaRole),\n },\n },\n data: () => ({\n popper: null,\n emittedPosition: null,\n }),\n computed: {\n strategy(): PositioningStrategy {\n return this.fixedPositioning ? 'fixed' : 'absolute';\n },\n /**\n * Retrieves all the popper modifiers to be applied to popover.\n * Read utils file for more info on each modifier.\n */\n allModifiers(): ExtendedModifiers[] {\n const currentModifiers: ExtendedModifiers[] = this.modifiers || [];\n const allModifiers = [\n // Create arrow modifier if arrow props are set\n ...(this.arrow ? [getArrowModifier(this.$refs.arrow as VueNodeElement, this.arrow)] : []),\n // Create offset modifier\n getOffsetModifier(this.arrow, this.offset),\n // Apply data-hide attribute to arrow element depnding on center offset.\n arrowDataHideAttributeModifier,\n // If matchWidth set to true, set the width of popover to same as target element.\n ...(this.matchWidth ? [sameWidthModifier] : []),\n // Emits position of popover when position is updated.\n {\n name: 'trackPosition',\n enabled: true,\n phase: 'afterWrite',\n fn: ({ state }) => {\n // Add conditional to make sure that event is only emitted for new placement values\n if (this.emittedPosition !== state.placement) {\n this.emittedPosition = state.placement;\n this.$emit('position', this.emittedPosition);\n }\n },\n },\n // Sets Flip modifier if fallbackPosition is set\n ...(this.fallbackPosition ? [getFlipModifier(this.fallbackPosition)] : []),\n ...(currentModifiers || []),\n ];\n return allModifiers as ExtendedModifiers[];\n },\n /**\n * Sets default arrow classes if none have been set.\n */\n arrowClasses(): string[] {\n return this?.arrow?.classes ?? [];\n },\n },\n watch: {\n targetElement(element: VueNodeElement) {\n this.destroyPopper();\n if ((this.$refs.popperContainerRef as any).$el && element) {\n this.initPopper();\n }\n },\n position(position: PopperContainerPosition) {\n this.updatePopperOptions({ placement: position });\n },\n strategy(strategy: PositioningStrategy) {\n this.updatePopperOptions({ strategy });\n },\n async arrow(arrow: PopperContainerArrowProp | boolean) {\n if (arrow) {\n // Wait for the next rendering cycle to make sure that arrow element is rendered, but only when it is displayed\n await this.$nextTick();\n }\n this.updateModifiers();\n },\n offset: 'updateModifiers',\n matchWidth: 'updateModifiers',\n },\n mounted() {\n this.initPopper();\n },\n beforeUnmount() {\n this.destroyPopper();\n },\n methods: {\n initPopper() {\n const popperElement = (this.targetElement as any).$el\n ? ((this.targetElement as any).$el as Element)\n : (this.targetElement as Element);\n this.popper = createPopper<ExtendedModifiers>(\n popperElement,\n (this.$refs.popperContainerRef as any).$el as HTMLElement,\n {\n placement: this.position,\n strategy: this.strategy,\n modifiers: this.allModifiers as ExtendedModifiers[],\n }\n );\n },\n destroyPopper() {\n // Add some time before destroy to run fade-out animation\n if (this.popper) {\n (this.popper as Instance).destroy();\n }\n },\n updatePopperOptions(options) {\n if (this.popper) {\n (this.popper as Instance).setOptions(options);\n }\n },\n updateModifiers() {\n this.updatePopperOptions({ modifiers: this.allModifiers });\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popper-container.scss\" />\n"],"names":["PopperContainerPositionBasic","PopperContainerPositionBasic2","PopperContainerPositionExtended","PopperContainerPositionExtended2","PopperContainerAriaRole","PopperContainerAriaRole2","PopperContainerPosition","getArrowModifier","arrow","arrowProps","getOffsetModifier","offset","getFlipModifier","fallbackPosition","arrowDataHideAttributeModifier","state","sameWidthModifier","_sfc_main","defineComponent","BentoFocusTrap","value","currentModifiers","_a","element","position","strategy","popperElement","createPopper","options"],"mappings":";;;;;AAoBY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,MAAA,OACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,OAAA,QAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,aAAA,cACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WACAA,EAAA,cAAA,eACAA,EAAA,YAAA,aACAA,EAAA,eAAA,gBACAA,EAAA,aAAA,cACAA,EAAA,aAAA,cACAA,EAAA,WAAA,YAXQA,IAAAD,KAAA,CAAA,CAAA,GAeAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,UAFQA,IAAAD,KAAA,CAAA,CAAA;AAKL,MAAAE,IAAA,EAAA,GAAAN,GAAA,GAAAE,EAAA,GCrCMK,IAAA,CAAAC,GAAAC,OAAA;AAAA,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;AAEA,SAAA,WAAA;AAAA,EAAA;AAAA,EACA,gBAAA;AAEA,SAAA,cAAA;AAAA,EAAA;AAAA,EACA,SAAA;AAAA,IACA,aAAA;AAEA,YAAAkB,IAAA,KAAA,cAAA,MAAA,KAAA,cAAA,MAAA,KAAA;AAGA,WAAA,SAAAC;AAAA,QAAAD;AAAA,QACA,KAAA,MAAA,mBAAA;AAAA,QACA;AAAA,UACA,WAAA,KAAA;AAAA,UACA,UAAA,KAAA;AAAA,UACA,WAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IACA,gBAAA;AAGA,MAAA,KAAA,UACA,KAAA,OAAA,QAAA;AAAA,IACA;AAAA,IACA,oBAAAE,GAAA;AAEA,MAAA,KAAA,UACA,KAAA,OAAA,WAAAA,CAAA;AAAA,IACA;AAAA,IACA,kBAAA;AAEA,WAAA,oBAAA,EAAA,WAAA,KAAA,aAAA,CAAA;AAAA,IAAA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popper-container.js","sources":["../src/components/popper-container/popper-container.types.ts","../src/components/popper-container/popper-container.utils.ts","../src/components/popper-container/popper-container.vue"],"sourcesContent":["import type { Modifier, StrictModifiers } from '@popperjs/core';\n\ntype ArrowModifier = Modifier<'arrow', unknown>;\ntype ApplyArrowHideModifier = Modifier<'applyArrowHide', unknown>;\ntype SameWidthModifier = Modifier<'sameWidth', unknown>;\ntype TrackPositionModifer = Modifier<'trackPosition', unknown>;\ntype FlipModifer = Modifier<'flip', unknown>;\nexport type ExtendedModifiers =\n | StrictModifiers\n | ArrowModifier\n | ApplyArrowHideModifier\n | SameWidthModifier\n | TrackPositionModifer\n | FlipModifer;\n\nexport interface PopperContainerArrowProp {\n classes?: string[];\n padding?: string;\n}\n\nexport enum PopperContainerPositionBasic {\n TOP = 'top',\n RIGHT = 'right',\n BOTTOM = 'bottom',\n LEFT = 'left',\n}\n\nexport enum PopperContainerPositionExtended {\n AUTO = 'auto',\n AUTO_START = 'auto-start',\n AUTO_END = 'auto-end',\n TOP_START = 'top-start',\n TOP_END = 'top-end',\n RIGHT_START = 'right-start',\n RIGHT_END = 'right-end',\n BOTTOM_START = 'bottom-start',\n BOTTOM_END = 'bottom-end',\n LEFT_START = 'left-start',\n LEFT_END = 'left-end',\n}\n\n// TODO: add more roles as we figure them out\nexport enum PopperContainerAriaRole {\n TOOLTIP = 'tooltip',\n POPOVER = 'dialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const PopperContainerPosition = { ...PopperContainerPositionBasic, ...PopperContainerPositionExtended };\nexport type PopperContainerPosition = PopperContainerPositionBasic | PopperContainerPositionExtended;\n\nexport type FallbackPositionProp = PopperContainerPosition[] | PopperContainerPosition;\n","import type { VueNodeElement } from '@/types';\nimport { ExtendedModifiers, FallbackPositionProp, PopperContainerArrowProp } from './popper-container.types';\n\n/**\n * Creates an arrow modifier for popper container.\n * If padding is set in arrow props, then implement in modifier.\n * @param arrow arrow element\n * @param arrowProps arrow props\n * @returns ArrowModifier\n */\nexport const getArrowModifier = (arrow: VueNodeElement, arrowProps: PopperContainerArrowProp) => ({\n name: 'arrow',\n options: {\n element: arrow,\n padding: arrowProps.padding || 0,\n },\n});\n\n/**\n * Created an offset modifier for the popper.\n * If an arrow is set (i.e. an arrow is present in popper) then adjust offset accordingly.\n * See popper docs for more info: https://popper.js.org/docs/v2/modifiers/offset/\n * @param arrow arrow props\n * @param offset offset numbered array\n * @returns OffsetModifier\n */\nexport const getOffsetModifier = (arrowProps: PopperContainerArrowProp, offset: number[]) => ({\n name: 'offset',\n options: { offset: arrowProps ? [offset[0], offset[1] + 7] : offset },\n});\n\n/**\n * Creates popover fallback position for popper if it's scheduled to overflow a given boundary.\n * See docs for more info: https://popper.js.org/docs/v2/modifiers/flip/\n * @param fallbackPosition fallbackPosition\n * @returns FlipModifier\n */\nexport const getFlipModifier = (fallbackPosition: FallbackPositionProp) => ({\n name: 'flip',\n options: {\n fallbackPlacements: Array.isArray(fallbackPosition) ? fallbackPosition : [fallbackPosition],\n },\n});\n\n/**\n * Applies a data-hide attribute to arrow element depending on center offset.\n */\nexport const arrowDataHideAttributeModifier: ExtendedModifiers = {\n name: 'applyArrowHide',\n enabled: true,\n phase: 'write',\n fn({ state }) {\n const { arrow } = state.elements;\n\n if (arrow) {\n if (state.modifiersData.arrow.centerOffset !== 0) {\n arrow.setAttribute('data-hide', '');\n } else {\n arrow.removeAttribute('data-hide');\n }\n }\n },\n};\n\nexport const sameWidthModifier: ExtendedModifiers = {\n name: 'sameWidth',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: ({ state }) => {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n },\n effect: ({ state }) => {\n state.elements.popper.style.width = `${(state.elements.reference as HTMLElement).offsetWidth}px`;\n },\n};\n","<template>\n <bento-focus-trap\n :id=\"id\"\n ref=\"popperContainerRef\"\n :disabled=\"disabledFocusTrap\"\n class=\"b-popper-container\"\n :role=\"ariaRole\"\n v-bind=\"$attrs\"\n >\n <slot></slot>\n <span\n v-if=\"arrow\"\n ref=\"arrow\"\n :class=\"arrowClasses\"\n class=\"b-popper-container__arrow\"\n data-testid=\"arrow\"\n ></span>\n </bento-focus-trap>\n</template>\n\n<script lang=\"ts\">\n import { createPopper } from '@popperjs/core';\n import type { Instance, PositioningStrategy } from '@popperjs/core';\n import { defineComponent, PropType } from 'vue';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import {\n ExtendedModifiers,\n FallbackPositionProp,\n PopperContainerAriaRole,\n PopperContainerArrowProp,\n PopperContainerPosition,\n PopperContainerPositionBasic,\n } from './popper-container.types';\n import {\n arrowDataHideAttributeModifier,\n getArrowModifier,\n getFlipModifier,\n getOffsetModifier,\n sameWidthModifier,\n } from './popper-container.utils';\n import type { VueNodeElement } from '@/types';\n\n /**\n * A wrapper for the 'popper/core' package that overlays a small piece of content near a target element.\n *\n * NOTE: This component should not be used by itself but more implemented by other exported components\n * e.g. Tooltip\n * More info here on the package: https://popper.js.org/docs/v2/\n *\n * * @usage\n * import { PopperContainer } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { PopperContainer },\n * computed: {\n * targetElement() {\n * return this.$refs.tooltipTarget;\n * },\n * },\n * template: `\n * <popper-container\n * :target-element=\"targetElement\"\n * :position=\"position\"\n * >\n * {{ content }}\n * </popper-container>`,\n * }\n */\n export default defineComponent({\n components: { BentoFocusTrap },\n props: {\n /**\n * The id to be set on the component. Use it for accessibility purposes.\n */\n id: { type: String, default: null },\n /**\n * Reference to the DOM element or Vue component for positioning\n */\n targetElement: { type: [Element, Object] as PropType<VueNodeElement>, required: true },\n /**\n * Position relative to the target element\n * @see {@link https://popper.js.org/docs/v2/constructors/#placement}\n */\n position: {\n type: String as PropType<PopperContainerPosition | `${PopperContainerPosition}`>,\n default: PopperContainerPosition.AUTO,\n validator: value =>\n Object.values(PopperContainerPosition).includes(value as PopperContainerPositionBasic),\n },\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * https://popper.js.org/docs/v2/constructors/#strategy\n */\n fixedPositioning: { type: Boolean, default: false },\n /**\n * Indicates if container should have additional arrow, pointing at target element\n * Can be just a boolean flag, or an object with additional configuration:\n * @property {Array<string>} arrow.classes – apply any additional classes to the arrow element.\n * @property {string} arrow.padding – useful when content has rounded corners, https://popper.js.org/docs/v2/modifiers/arrow/#padding\n */\n arrow: { type: Object as PropType<PopperContainerArrowProp | boolean>, default: undefined },\n /**\n * Allows to displace a popper container from its target element.\n * @see {@link https://popper.js.org/docs/v2/modifiers/offset/}\n */\n offset: {\n type: Array as PropType<number[]>,\n default: () => [0, 0],\n validator: (value: number[]) => value?.length === 2,\n },\n /**\n * Instructs popper container to have the same width as target element.\n */\n matchWidth: { type: Boolean, default: false },\n /**\n * Disables wrapping focus-trap component.\n * Mostly useful for the storybook demo.\n */\n disabledFocusTrap: { type: Boolean, default: false },\n /**\n * Custom set of modifiers. Useful for low-level control over Popper behavior in some really complex use cases.\n */\n modifiers: { type: Array, default: null },\n /**\n * Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\n */\n fallbackPosition: {\n type: [Array, String] as PropType<FallbackPositionProp>,\n default: null,\n },\n /**\n * The aria role assigned to the container. Defaults to null, which means it's not set if nothing is passed.\n */\n ariaRole: {\n type: String as PropType<PopperContainerAriaRole>,\n default: null,\n validator: value => Object.values(PopperContainerAriaRole).includes(value as PopperContainerAriaRole),\n },\n },\n data: () => ({\n popper: null,\n emittedPosition: null,\n }),\n computed: {\n strategy(): PositioningStrategy {\n return this.fixedPositioning ? 'fixed' : 'absolute';\n },\n /**\n * Retrieves all the popper modifiers to be applied to popover.\n * Read utils file for more info on each modifier.\n */\n allModifiers(): ExtendedModifiers[] {\n const currentModifiers: ExtendedModifiers[] = this.modifiers || [];\n const allModifiers = [\n // Create arrow modifier if arrow props are set\n ...(this.arrow ? [getArrowModifier(this.$refs.arrow as VueNodeElement, this.arrow)] : []),\n // Create offset modifier\n getOffsetModifier(this.arrow, this.offset),\n // Apply data-hide attribute to arrow element depnding on center offset.\n arrowDataHideAttributeModifier,\n // If matchWidth set to true, set the width of popover to same as target element.\n ...(this.matchWidth ? [sameWidthModifier] : []),\n // Emits position of popover when position is updated.\n {\n name: 'trackPosition',\n enabled: true,\n phase: 'afterWrite',\n fn: ({ state }) => {\n // Add conditional to make sure that event is only emitted for new placement values\n if (this.emittedPosition !== state.placement) {\n this.emittedPosition = state.placement;\n this.$emit('position', this.emittedPosition);\n }\n },\n },\n // Sets Flip modifier if fallbackPosition is set\n ...(this.fallbackPosition ? [getFlipModifier(this.fallbackPosition)] : []),\n ...(currentModifiers || []),\n ];\n return allModifiers as ExtendedModifiers[];\n },\n /**\n * Sets default arrow classes if none have been set.\n */\n arrowClasses(): string[] {\n return this?.arrow?.classes ?? [];\n },\n },\n watch: {\n targetElement(element: VueNodeElement) {\n this.destroyPopper();\n if ((this.$refs.popperContainerRef as any).$el && element) {\n this.initPopper();\n }\n },\n position(position: PopperContainerPosition) {\n this.updatePopperOptions({ placement: position });\n },\n strategy(strategy: PositioningStrategy) {\n this.updatePopperOptions({ strategy });\n },\n async arrow(arrow: PopperContainerArrowProp | boolean) {\n if (arrow) {\n // Wait for the next rendering cycle to make sure that arrow element is rendered, but only when it is displayed\n await this.$nextTick();\n }\n this.updateModifiers();\n },\n offset: 'updateModifiers',\n matchWidth: 'updateModifiers',\n },\n mounted() {\n this.initPopper();\n },\n beforeUnmount() {\n this.destroyPopper();\n },\n methods: {\n initPopper() {\n const popperElement = (this.targetElement as any).$el\n ? ((this.targetElement as any).$el as Element)\n : (this.targetElement as Element);\n this.popper = createPopper<ExtendedModifiers>(\n popperElement,\n (this.$refs.popperContainerRef as any).$el as HTMLElement,\n {\n placement: this.position,\n strategy: this.strategy,\n modifiers: this.allModifiers as ExtendedModifiers[],\n }\n );\n },\n destroyPopper() {\n // Add some time before destroy to run fade-out animation\n if (this.popper) {\n (this.popper as Instance).destroy();\n }\n },\n updatePopperOptions(options) {\n if (this.popper) {\n (this.popper as Instance).setOptions(options);\n }\n },\n updateModifiers() {\n this.updatePopperOptions({ modifiers: this.allModifiers });\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./popper-container.scss\" />\n"],"names":["PopperContainerPositionBasic","PopperContainerPositionBasic2","PopperContainerPositionExtended","PopperContainerPositionExtended2","PopperContainerAriaRole","PopperContainerAriaRole2","PopperContainerPosition","getArrowModifier","arrow","arrowProps","getOffsetModifier","offset","getFlipModifier","fallbackPosition","arrowDataHideAttributeModifier","state","sameWidthModifier","_sfc_main","defineComponent","BentoFocusTrap","value","currentModifiers","_a","element","position","strategy","popperElement","createPopper","options"],"mappings":";;;;;AAoBY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,MAAA,OACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,E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A,cAAAC,GAAA;AAEA,WAAA,cAAA,GACA,KAAA,MAAA,mBAAA,OAAAA,KACA,KAAA,WAAA;AAAA,IACA;AAAA,IACA,SAAAC,GAAA;AAEA,WAAA,oBAAA,EAAA,WAAAA,EAAA,CAAA;AAAA,IAAA;AAAA,IACA,SAAAC,GAAA;AAEA,WAAA,oBAAA,EAAA,UAAAA,EAAA,CAAA;AAAA,IAAA;AAAA,IACA,MAAA,MAAAjB,GAAA;AAEA,MAAAA,KAEA,MAAA,KAAA,UAAA,GAEA,KAAA,gBAAA;AAAA,IAAA;AAAA,IACA,QAAA;AAAA,IACA,YAAA;AAAA,EACA;AAAA,EACA,UAAA;AAEA,SAAA,WAAA;AAAA,EAAA;AAAA,EACA,gBAAA;AAEA,SAAA,cAAA;AAAA,EAAA;AAAA,EACA,SAAA;AAAA,IACA,aAAA;AAEA,YAAAkB,IAAA,KAAA,cAAA,MAAA,KAAA,cAAA,MAAA,KAAA;AAGA,WAAA,SAAAC;AAAA,QAAAD;AAAA,QACA,KAAA,MAAA,mBAAA;AAAA,QACA;AAAA,UACA,WAAA,KAAA;AAAA,UACA,UAAA,KAAA;AAAA,UACA,WAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IACA,gBAAA;AAGA,MAAA,KAAA,UACA,KAAA,OAAA,QAAA;AAAA,IACA;AAAA,IACA,oBAAAE,GAAA;AAEA,MAAA,KAAA,UACA,KAAA,OAAA,WAAAA,CAAA;AAAA,IACA;AAAA,IACA,kBAAA;AAEA,WAAA,oBAAA,EAAA,WAAA,KAAA,aAAA,CAAA;AAAA,IAAA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;"}
@@ -1,19 +1,19 @@
1
- import { defineComponent as y, toRefs as S, computed as o, toRef as b } from "vue";
2
- import { B, b as I, a as R, d as T } from "./chunks/index.56858f4e.js";
3
- import { u as V } from "./chunks/aria-label.ac9651a5.js";
4
- import { g as f } from "./chunks/unique-id.a2a2b458.js";
5
- import { u as A } from "./chunks/use-has-slot.068222e6.js";
6
- import { u as L } from "./chunks/use-default-slot-validator.83d977a1.js";
7
- import { g as D } from "./chunks/get-slot-text.e5c766d0.js";
8
- import { n as m } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
- import { u as x } from "./chunks/use-form-layout-loading.d03e5d48.js";
10
- import { C as O } from "./chunks/controls-group.b827382b.js";
11
- import { E as k } from "./chunks/error-message.0433b539.js";
12
- import "./assets/index22.css";
13
- var d = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.ERROR = "error", a))(d || {}), u = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(u || {}), n = /* @__PURE__ */ ((a) => (a.UPDATE = "update:model-value", a))(n || {});
14
- const M = y({
1
+ import { defineComponent as m, toRefs as R, computed as o, toRef as y } from "vue";
2
+ import { B as L, d as T } from "./chunks/index.45295dd3.js";
3
+ import { u as A } from "./chunks/aria-label.ac9651a5.js";
4
+ import { g as b } from "./chunks/unique-id.a2a2b458.js";
5
+ import { u as B } from "./chunks/use-has-slot.6052d56a.js";
6
+ import { u as x } from "./chunks/use-default-slot-validator.cbdfe693.js";
7
+ import { g as f } from "./chunks/get-slot-text.c1114034.js";
8
+ import { n as h } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
9
+ import { u as D } from "./chunks/use-form-layout-loading.d03e5d48.js";
10
+ import { C as O } from "./chunks/controls-group.5d3e04dd.js";
11
+ import { E as P } from "./chunks/error-message.3b3c33d4.js";
12
+ import "./assets/index21.css";
13
+ var i = /* @__PURE__ */ ((a) => (a.DISABLED = "disabled", a.READONLY = "readonly", a.ERROR = "error", a))(i || {}), d = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(d || {}), l = /* @__PURE__ */ ((a) => (a.UPDATE = "update:model-value", a.INPUT = "input", a))(l || {});
14
+ const V = m({
15
15
  name: "radio-button",
16
- components: { BentoTypography: B },
16
+ components: { BentoTypography: L },
17
17
  props: {
18
18
  /**
19
19
  * Disable the radio button (optional)
@@ -52,59 +52,58 @@ const M = y({
52
52
  required: !0
53
53
  }
54
54
  },
55
- emits: [n.UPDATE],
55
+ emits: [l.UPDATE],
56
56
  setup(a, { slots: e, emit: r }) {
57
- const t = A(e), { value: l } = S(a), c = f("radio-button"), p = f("description"), s = t("default"), i = t("description");
58
- L("radio-button", s, i);
57
+ const { value: t } = R(a), n = b("radio-button"), u = b("description"), c = f(e)("default"), p = f(e)("description");
58
+ x("radio-button", e.default, e.description);
59
59
  const _ = o(() => ({
60
- [`b-radio-button--${d.DISABLED}`]: a.disabled,
61
- [`b-radio-button--${d.READONLY}`]: a.readonly
62
- })), g = o(() => ({
63
- [`b-radio-button__input--${d.ERROR}`]: a.hasError
64
- })), h = V({
65
- ariaLabel: D(e)("default"),
66
- label: l.value
67
- }), v = o(() => a.hasError), E = o(() => a.value === a.modelValue);
60
+ [`b-radio-button--${i.DISABLED}`]: a.disabled,
61
+ [`b-radio-button--${i.READONLY}`]: a.readonly
62
+ })), s = o(() => ({
63
+ [`b-radio-button__input--${i.ERROR}`]: a.hasError
64
+ })), v = A({
65
+ ariaLabel: f(e)("default"),
66
+ label: t.value
67
+ }), g = o(() => a.hasError), E = o(() => a.value === a.modelValue), C = () => {
68
+ !a.disabled && !a.readonly && r(l.UPDATE, a.value);
69
+ }, I = (S) => {
70
+ a.readonly && S.preventDefault();
71
+ };
68
72
  return {
69
73
  // Values
70
- ariaLabel: h,
71
- ariaInvalid: v,
74
+ ariaLabel: v,
75
+ ariaInvalid: g,
72
76
  isChecked: E,
73
- defaultSlotValue: s,
74
- descriptionSlotValue: i,
77
+ defaultSlotValue: c,
78
+ descriptionSlotValue: p,
75
79
  conditionalClassContainer: _,
76
- conditionalClassInput: g,
77
- radioButtonId: c,
78
- descriptionId: p,
79
- // Events
80
- onChange: () => {
81
- !a.disabled && !a.readonly && r(n.UPDATE, a.value);
82
- },
83
- onClick: (C) => {
84
- a.readonly && C.preventDefault();
85
- },
86
- // Enums
87
- BentoTypographyVariant: I,
88
- BentoTypographyElement: R
80
+ conditionalClassInput: s,
81
+ radioButtonId: n,
82
+ descriptionId: u,
83
+ // Methods
84
+ hasSlot: B(e),
85
+ onChange: C,
86
+ onClick: I
89
87
  };
90
88
  }
91
89
  });
92
- var P = function() {
90
+ var k = function() {
93
91
  var e = this, r = e._self._c;
94
- return e._self._setupProxy, r("div", { staticClass: "b-radio-button", class: e.conditionalClassContainer, attrs: { "data-testid": "radio-button-container" } }, [r("input", { staticClass: "b-radio-button__input", class: e.conditionalClassInput, attrs: { id: e.radioButtonId, "aria-checked": e.isChecked, "aria-label": e.ariaLabel, "aria-invalid": e.ariaInvalid, "aria-describedby": e.descriptionSlotValue ? e.descriptionId : "", disabled: e.disabled, "aria-readonly": e.readonly ? e.readonly : void 0, type: "radio", role: "radio" }, domProps: { checked: e.isChecked, value: e.value }, on: { click: e.onClick, change: e.onChange } }), e.defaultSlotValue ? r("label", { staticClass: "b-radio-button__label-container", attrs: { for: e.radioButtonId } }, [e.defaultSlotValue ? r("bento-typography", { staticClass: "b-radio-button__label", attrs: { el: e.BentoTypographyElement.SPAN, variant: e.BentoTypographyVariant.BODY } }, [e._t("default")], 2) : e._e(), e.defaultSlotValue && e.descriptionSlotValue ? r("bento-typography", { staticClass: "b-radio-button__description", attrs: { id: e.descriptionId, el: e.BentoTypographyElement.SPAN, variant: e.BentoTypographyVariant.BODY } }, [e._t("description")], 2) : e._e()], 1) : e._e()]);
95
- }, N = [], U = /* @__PURE__ */ m(
92
+ return e._self._setupProxy, r("div", { staticClass: "b-radio-button", class: e.conditionalClassContainer, attrs: { "data-testid": "radio-button-container" } }, [r("input", { staticClass: "b-radio-button__input", class: e.conditionalClassInput, attrs: { id: e.radioButtonId, "aria-checked": e.isChecked, "aria-label": e.ariaLabel, "aria-invalid": e.ariaInvalid, "aria-describedby": e.hasSlot("description") ? e.descriptionId : "", disabled: e.disabled, "aria-readonly": e.readonly ? e.readonly : void 0, type: "radio", role: "radio" }, domProps: { checked: e.isChecked, value: e.value }, on: { click: e.onClick, change: e.onChange } }), e.hasSlot("default") ? r("label", { staticClass: "b-radio-button__label-container", attrs: { for: e.radioButtonId } }, [e.hasSlot("default") ? r("bento-typography", { staticClass: "b-radio-button__label", attrs: { el: "span", variant: "body" } }, [e._t("default")], 2) : e._e(), e.hasSlot("default") && e.hasSlot("description") ? r("bento-typography", { staticClass: "b-radio-button__description", attrs: { id: e.descriptionId, el: "span", variant: "body" } }, [e._t("description")], 2) : e._e()], 1) : e._e()]);
93
+ }, M = [], N = /* @__PURE__ */ h(
94
+ V,
95
+ k,
96
96
  M,
97
- P,
98
- N,
99
97
  !1,
100
98
  null,
101
- "6afbb307",
99
+ "1a57816f",
102
100
  null,
103
101
  null
104
102
  );
105
- const $ = U.exports, q = y({
103
+ const U = N.exports, $ = m({
106
104
  name: "bento-radio-group",
107
- components: { ControlsGroup: O, ErrorMessage: k, RadioButton: $ },
105
+ components: { ControlsGroup: O, ErrorMessage: P, RadioButton: U },
106
+ model: { prop: "modelValue" },
108
107
  props: {
109
108
  /**
110
109
  * Descriptive supporting text visbile underneath the label.
@@ -166,18 +165,18 @@ const $ = U.exports, q = y({
166
165
  */
167
166
  variant: {
168
167
  type: String,
169
- default: u.VERTICAL,
170
- validator: (a) => Object.values(u).includes(a)
168
+ default: d.VERTICAL,
169
+ validator: (a) => Object.values(d).includes(a)
171
170
  }
172
171
  },
173
- emits: [n.UPDATE],
172
+ emits: [l.UPDATE, l.INPUT],
174
173
  setup(a, { emit: e }) {
175
- const r = b(a, "modelValue"), t = f("error"), { isReadOnly: l } = x(b(a, "readonly")), c = o(
176
- () => !a.disabled && !l.value && (!!a.errorMessage || a.hasError)
177
- ), p = o(() => !a.disabled && !l.value && !!a.errorMessage), s = o(() => ({
178
- "b-radio-group__buttons--horizontal": a.variant === u.HORIZONTAL
179
- })), i = (_) => {
180
- e(n.UPDATE, _);
174
+ const r = y(a, "modelValue"), t = b("error"), { isReadOnly: n } = D(y(a, "readonly")), u = o(
175
+ () => !a.disabled && !n.value && (!!a.errorMessage || a.hasError)
176
+ ), c = o(() => !a.disabled && !n.value && !!a.errorMessage), p = o(() => ({
177
+ "b-radio-group__buttons--horizontal": a.variant === d.HORIZONTAL
178
+ })), _ = (s) => {
179
+ e(l.UPDATE, s), e(l.INPUT, s);
181
180
  };
182
181
  return a.hasError && T(
183
182
  'BentoRadioGroup "hasError" property',
@@ -189,35 +188,35 @@ const $ = U.exports, q = y({
189
188
  // Values
190
189
  inputValue: r,
191
190
  errorId: t,
192
- isReadOnly: l,
193
- shouldShowError: c,
194
- shouldShowErrorMessage: p,
195
- conditionalClasses: s,
191
+ isReadOnly: n,
192
+ shouldShowError: u,
193
+ shouldShowErrorMessage: c,
194
+ conditionalClasses: p,
196
195
  // Methods
197
- onInput: i
196
+ onInput: _
198
197
  };
199
198
  }
200
199
  });
201
- var w = function() {
200
+ var q = function() {
202
201
  var e = this, r = e._self._c;
203
202
  return e._self._setupProxy, r("div", { staticClass: "b-radio-group" }, [r("controls-group", { staticClass: "b-radio-group__buttons", class: e.conditionalClasses, attrs: { "aria-describedby": e.shouldShowErrorMessage ? e.errorId : "", description: e.description, disabled: e.disabled, form: e.formId, label: e.label, optional: e.optional, required: e.required, "hide-label": e.hideLabel, "tooltip-text": e.tooltipText } }, e._l(e.items, function(t) {
204
203
  return r("radio-button", { key: t.value, attrs: { "model-value": e.inputValue, value: t.value, disabled: e.disabled || t.disabled, readonly: e.isReadOnly || t.readonly, "has-error": e.shouldShowError || t.hasError }, on: { "update:model-value": e.onInput }, scopedSlots: e._u([t.description ? { key: "description", fn: function() {
205
204
  return [e._v(e._s(t.description))];
206
205
  }, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(t.label) + " ")]);
207
206
  }), 1), e.shouldShowErrorMessage ? r("error-message", { staticClass: "b-radio-group__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e()], 1);
208
- }, F = [], G = /* @__PURE__ */ m(
207
+ }, w = [], F = /* @__PURE__ */ h(
208
+ $,
209
209
  q,
210
210
  w,
211
- F,
212
211
  !1,
213
212
  null,
214
- "fc63e591",
213
+ "26b022cc",
215
214
  null,
216
215
  null
217
216
  );
218
- const te = G.exports;
217
+ const ee = F.exports;
219
218
  export {
220
- te as BentoRadioGroup,
221
- u as BentoRadioGroupVariant
219
+ ee as BentoRadioGroup,
220
+ d as BentoRadioGroupVariant
222
221
  };
223
222
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sources":["../src/components/radio-group/components/radio-button/radio-button.types.ts","../src/components/radio-group/radio-group.types.ts","../src/components/radio-group/components/radio-button/radio-button.vue","../src/components/radio-group/radio-group.vue"],"sourcesContent":["export enum BentoRadioButtonStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n","export enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoRadioGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n\nexport enum BentoRadioGroupEvent {\n UPDATE = 'update:model-value',\n}\n","<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <input\n :id=\"radioButtonId\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"descriptionSlotValue ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly ? readonly : undefined\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-radio-button__input\"\n :class=\"conditionalClassInput\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n <label v-if=\"defaultSlotValue\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <bento-typography\n v-if=\"defaultSlotValue\"\n class=\"b-radio-button__label\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n >\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"defaultSlotValue && descriptionSlotValue\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n :el=\"BentoTypographyElement.SPAN\"\n :variant=\"BentoTypographyVariant.BODY\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/utils/ts/unique-id';\n import { computed, ComputedRef, defineComponent, toRefs } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass } from './radio-button.types';\n import { BentoRadioGroupEvent } from '../../radio-group.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\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 * @usage\n * import { RadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { RadioButton },\n * template: `\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * </radio-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'radio-button',\n components: { BentoTypography },\n props: {\n /**\n * Disable the radio button (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows radio-button in error state (optional)\n */\n hasError: {\n type: Boolean,\n 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],\n default: null,\n },\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: {\n type: Boolean,\n 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],\n required: true,\n },\n },\n emits: [BentoRadioGroupEvent.UPDATE],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n const { value } = toRefs(props);\n const radioButtonId = generateUid('radio-button');\n const descriptionId = generateUid('description');\n\n const defaultSlotValue = hasSlot('default');\n const descriptionSlotValue = hasSlot('description');\n\n useDefaultSlotValidator('radio-button', defaultSlotValue, descriptionSlotValue);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n const conditionalClassInput = computed(() => ({\n [`b-radio-button__input--${BentoRadioButtonStateClass.ERROR}`]: props.hasError,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\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(BentoRadioGroupEvent.UPDATE, 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 return {\n // Values\n ariaLabel,\n ariaInvalid,\n isChecked,\n defaultSlotValue,\n descriptionSlotValue,\n conditionalClassContainer,\n conditionalClassInput,\n radioButtonId,\n descriptionId,\n\n // Events\n onChange,\n onClick,\n\n // Enums\n BentoTypographyVariant,\n BentoTypographyElement,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\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 >\n <radio-button\n v-for=\"item in items\"\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 @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n </radio-button>\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 lang=\"ts\">\n import { computed, defineComponent, PropType, toRef } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import RadioButton from './components/radio-button/radio-button.vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupEvent, BentoRadioGroupItems, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\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, BentoRadioGroupVariant } 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=\"BentoRadioGroupVariant.HORIZONTAL\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-radio-group',\n components: { ControlsGroup, ErrorMessage, RadioButton },\n props: {\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 radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If string is passed, all 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 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: { type: Array as PropType<BentoRadioGroupItems>, 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 BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: [Number, String, null], default: null },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all radio-buttons 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 emits: [BentoRadioGroupEvent.UPDATE],\n setup(props, { emit }) {\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\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 const onInput = value => {\n emit(BentoRadioGroupEvent.UPDATE, 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 return {\n // Values\n inputValue,\n errorId,\n isReadOnly,\n shouldShowError,\n shouldShowErrorMessage,\n conditionalClasses,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["BentoRadioButtonStateClass","BentoRadioButtonStateClass2","BentoRadioGroupVariant","BentoRadioGroupVariant2","BentoRadioGroupEvent","BentoRadioGroupEvent2","_sfc_main$1","defineComponent","BentoTypography","props","slots","emit","hasSlot","useHasSlot","value","toRefs","radioButtonId","generateUid","descriptionId","defaultSlotValue","descriptionSlotValue","useDefaultSlotValidator","conditionalClassContainer","computed","conditionalClassInput","ariaLabel","useAriaLabel","getSlotText","ariaInvalid","isChecked","event","BentoTypographyVariant","BentoTypographyElement","_sfc_main","ControlsGroup","ErrorMessage","RadioButton","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","shouldShowError","shouldShowErrorMessage","conditionalClasses","onInput","deprecate"],"mappings":";;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GCAAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAgBAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBADQA,IAAAD,KAAA,CAAA,CAAA;AC0DZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,O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A,MACA,wBAAAC;AAAA,MACA,oBAAAC;AAAA;AAAA,MACA,SAAAC;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"radio-group.js","sources":["../src/components/radio-group/components/radio-button/radio-button.types.ts","../src/components/radio-group/radio-group.types.ts","../src/components/radio-group/components/radio-button/radio-button.vue","../src/components/radio-group/radio-group.vue"],"sourcesContent":["export enum BentoRadioButtonStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\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 interface BentoRadioGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n\nexport enum BentoRadioGroupEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <input\n :id=\"radioButtonId\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly ? readonly : undefined\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-radio-button__input\"\n :class=\"conditionalClassInput\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-radio-button__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\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 </div>\n</template>\n\n<script lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/utils/ts/unique-id';\n import { computed, ComputedRef, defineComponent, toRefs } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass } from './radio-button.types';\n import { BentoRadioGroupEvent } from '../../radio-group.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\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 * @usage\n * import { RadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { RadioButton },\n * template: `\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * </radio-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'radio-button',\n components: { BentoTypography },\n props: {\n /**\n * Disable the radio button (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows radio-button in error state (optional)\n */\n hasError: {\n type: Boolean,\n 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],\n default: null,\n },\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: {\n type: Boolean,\n 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],\n required: true,\n },\n },\n emits: [BentoRadioGroupEvent.UPDATE],\n setup(props, { slots, emit }) {\n const { value } = toRefs(props);\n const radioButtonId = generateUid('radio-button');\n const descriptionId = generateUid('description');\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('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 const conditionalClassInput = computed(() => ({\n [`b-radio-button__input--${BentoRadioButtonStateClass.ERROR}`]: props.hasError,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\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(BentoRadioGroupEvent.UPDATE, 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 return {\n // Values\n ariaLabel,\n ariaInvalid,\n isChecked,\n defaultSlotValue,\n descriptionSlotValue,\n conditionalClassContainer,\n conditionalClassInput,\n radioButtonId,\n descriptionId,\n\n // Methods\n hasSlot: useHasSlot(slots),\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\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 >\n <radio-button\n v-for=\"item in items\"\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 @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n </radio-button>\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 lang=\"ts\">\n import { computed, defineComponent, PropType, toRef } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import RadioButton from './components/radio-button/radio-button.vue';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupEvent, BentoRadioGroupItems, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\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 defineComponent({\n name: 'bento-radio-group',\n components: { ControlsGroup, ErrorMessage, RadioButton },\n model: { prop: 'modelValue' },\n props: {\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 radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If string is passed, all 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 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: { type: Array as PropType<BentoRadioGroupItems>, 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 BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: [Number, String, null], default: null },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all radio-buttons 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 emits: [BentoRadioGroupEvent.UPDATE, BentoRadioGroupEvent.INPUT],\n setup(props, { emit }) {\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\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 const onInput = value => {\n emit(BentoRadioGroupEvent.UPDATE, value);\n emit(BentoRadioGroupEvent.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 return {\n // Values\n inputValue,\n errorId,\n isReadOnly,\n shouldShowError,\n shouldShowErrorMessage,\n conditionalClasses,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["BentoRadioButtonStateClass","BentoRadioButtonStateClass2","BentoRadioGroupVariant","BentoRadioGroupVariant2","BentoRadioGroupEvent","BentoRadioGroupEvent2","_sfc_main$1","defineComponent","BentoTypography","props","slots","emit","value","toRefs","radioButtonId","generateUid","descriptionId","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","conditionalClassContainer","computed","conditionalClassInput","ariaLabel","useAriaLabel","ariaInvalid","isChecked","onChange","onClick","event","useHasSlot","_sfc_main","ControlsGroup","ErrorMessage","RadioButton","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","shouldShowError","shouldShowErrorMessage","conditionalClasses","onInput","deprecate"],"mappings":";;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GCGAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAgBAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACkDZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,YAAA;AAAA,MAKA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA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