@adyen/bento-vue2 1.26.0 → 1.27.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 (203) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +513 -136
  3. package/dist/accordion.js +2 -2
  4. package/dist/action-bar.js +61 -146
  5. package/dist/action-bar.js.map +1 -1
  6. package/dist/alert.js +3 -3
  7. package/dist/assets/base-modal.css +1 -1
  8. package/dist/assets/button-actions.css +1 -1
  9. package/dist/assets/button.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown.css +1 -1
  12. package/dist/assets/index.css +1 -1
  13. package/dist/assets/index10.css +1 -1
  14. package/dist/assets/index11.css +1 -1
  15. package/dist/assets/index12.css +1 -1
  16. package/dist/assets/index13.css +1 -1
  17. package/dist/assets/index14.css +1 -1
  18. package/dist/assets/index15.css +1 -1
  19. package/dist/assets/index16.css +1 -1
  20. package/dist/assets/index17.css +1 -1
  21. package/dist/assets/index18.css +1 -1
  22. package/dist/assets/index19.css +1 -1
  23. package/dist/assets/index2.css +1 -1
  24. package/dist/assets/index20.css +1 -1
  25. package/dist/assets/index21.css +1 -1
  26. package/dist/assets/index22.css +1 -1
  27. package/dist/assets/index23.css +1 -1
  28. package/dist/assets/index24.css +1 -1
  29. package/dist/assets/index25.css +1 -1
  30. package/dist/assets/index26.css +1 -1
  31. package/dist/assets/index27.css +1 -1
  32. package/dist/assets/index28.css +1 -1
  33. package/dist/assets/index29.css +1 -1
  34. package/dist/assets/index3.css +1 -1
  35. package/dist/assets/index30.css +1 -1
  36. package/dist/assets/index31.css +1 -1
  37. package/dist/assets/index32.css +1 -1
  38. package/dist/assets/index33.css +1 -1
  39. package/dist/assets/index34.css +1 -1
  40. package/dist/assets/index35.css +1 -1
  41. package/dist/assets/index36.css +1 -1
  42. package/dist/assets/index37.css +1 -1
  43. package/dist/assets/index38.css +1 -1
  44. package/dist/assets/index39.css +1 -1
  45. package/dist/assets/index4.css +1 -1
  46. package/dist/assets/index40.css +1 -1
  47. package/dist/assets/index41.css +1 -1
  48. package/dist/assets/index42.css +1 -1
  49. package/dist/assets/index43.css +1 -1
  50. package/dist/assets/index44.css +1 -1
  51. package/dist/assets/index45.css +1 -1
  52. package/dist/assets/index46.css +1 -1
  53. package/dist/assets/index47.css +1 -1
  54. package/dist/assets/index48.css +1 -1
  55. package/dist/assets/index49.css +1 -0
  56. package/dist/assets/index5.css +1 -1
  57. package/dist/assets/index6.css +1 -1
  58. package/dist/assets/index7.css +1 -1
  59. package/dist/assets/index8.css +1 -1
  60. package/dist/assets/index9.css +1 -1
  61. package/dist/assets/use-cached-selected-values.css +1 -1
  62. package/dist/avatar-image.js +1 -1
  63. package/dist/badge.js +1 -1
  64. package/dist/button.js +5 -5
  65. package/dist/card.js +3 -3
  66. package/dist/checkbox.js +5 -5
  67. package/dist/chunks/{base-button.ad74b6f8.js → base-button.852204dc.js} +2 -2
  68. package/dist/chunks/{base-button.ad74b6f8.js.map → base-button.852204dc.js.map} +1 -1
  69. package/dist/chunks/{base-modal.1fff7abe.js → base-modal.4fb7528b.js} +6 -6
  70. package/dist/chunks/{base-modal.1fff7abe.js.map → base-modal.4fb7528b.js.map} +1 -1
  71. package/dist/chunks/{button-actions-with-menu.e845d77a.js → button-actions-with-menu.bf968959.js} +4 -4
  72. package/dist/chunks/{button-actions-with-menu.e845d77a.js.map → button-actions-with-menu.bf968959.js.map} +1 -1
  73. package/dist/chunks/{button-actions.81db18e8.js → button-actions.87e589e3.js} +31 -29
  74. package/dist/chunks/button-actions.87e589e3.js.map +1 -0
  75. package/dist/chunks/button.cb90b55c.js +101 -0
  76. package/dist/chunks/button.cb90b55c.js.map +1 -0
  77. package/dist/chunks/{calendar.640b8d25.js → calendar.f02e0a5a.js} +5 -5
  78. package/dist/chunks/{calendar.640b8d25.js.map → calendar.f02e0a5a.js.map} +1 -1
  79. package/dist/chunks/{checkbox.bfed007c.js → checkbox.9f9c978a.js} +3 -3
  80. package/dist/chunks/{checkbox.bfed007c.js.map → checkbox.9f9c978a.js.map} +1 -1
  81. package/dist/chunks/{controls-group.4fb50009.js → controls-group.121a307d.js} +3 -3
  82. package/dist/chunks/{controls-group.4fb50009.js.map → controls-group.121a307d.js.map} +1 -1
  83. package/dist/chunks/{copy.f85700c6.js → copy.6808b2dc.js} +4 -4
  84. package/dist/chunks/{copy.f85700c6.js.map → copy.6808b2dc.js.map} +1 -1
  85. package/dist/chunks/{dialog-page.73da22cf.js → dialog-page.7fd7d006.js} +3 -3
  86. package/dist/chunks/{dialog-page.73da22cf.js.map → dialog-page.7fd7d006.js.map} +1 -1
  87. package/dist/chunks/{dropdown-default-textbox.54ca1b18.js → dropdown-default-textbox.d0f17d96.js} +3 -3
  88. package/dist/chunks/{dropdown-default-textbox.54ca1b18.js.map → dropdown-default-textbox.d0f17d96.js.map} +1 -1
  89. package/dist/chunks/{dropdown.10c034aa.js → dropdown.a8037bca.js} +188 -197
  90. package/dist/chunks/dropdown.a8037bca.js.map +1 -0
  91. package/dist/chunks/{error-message.31ec12b7.js → error-message.bdcc1020.js} +2 -2
  92. package/dist/chunks/{error-message.31ec12b7.js.map → error-message.bdcc1020.js.map} +1 -1
  93. package/dist/chunks/{events.58c00e6d.js → events.f14a214b.js} +5 -5
  94. package/dist/chunks/events.f14a214b.js.map +1 -0
  95. package/dist/chunks/{fixed-scroller.4eb9a9ac.js → fixed-scroller.82ef6187.js} +2 -2
  96. package/dist/chunks/{fixed-scroller.4eb9a9ac.js.map → fixed-scroller.82ef6187.js.map} +1 -1
  97. package/dist/chunks/{footer-actions.a1e09b4f.js → footer-actions.58d14a16.js} +4 -4
  98. package/dist/chunks/{footer-actions.a1e09b4f.js.map → footer-actions.58d14a16.js.map} +1 -1
  99. package/dist/chunks/{index.15b088b9.js → index.0a30d358.js} +6 -6
  100. package/dist/chunks/{index.15b088b9.js.map → index.0a30d358.js.map} +1 -1
  101. package/dist/chunks/{index.d553d3d1.js → index.1deef79e.js} +2 -2
  102. package/dist/chunks/{index.d553d3d1.js.map → index.1deef79e.js.map} +1 -1
  103. package/dist/chunks/index.3c69be27.js +85 -0
  104. package/dist/chunks/index.3c69be27.js.map +1 -0
  105. package/dist/chunks/index.561786f6.js +126 -0
  106. package/dist/chunks/index.561786f6.js.map +1 -0
  107. package/dist/chunks/{index.b21197ca.js → index.614a5138.js} +2 -2
  108. package/dist/chunks/{index.b21197ca.js.map → index.614a5138.js.map} +1 -1
  109. package/dist/chunks/{index.8b8c3b16.js → index.854d6498.js} +9 -9
  110. package/dist/chunks/{index.8b8c3b16.js.map → index.854d6498.js.map} +1 -1
  111. package/dist/chunks/{index.885d05a9.js → index.939dd5cf.js} +2 -2
  112. package/dist/chunks/{index.885d05a9.js.map → index.939dd5cf.js.map} +1 -1
  113. package/dist/chunks/{index.1ea85d4a.js → index.a48e7f99.js} +6 -6
  114. package/dist/chunks/{index.1ea85d4a.js.map → index.a48e7f99.js.map} +1 -1
  115. package/dist/chunks/{index.317fca12.js → index.bd1d28d0.js} +3 -3
  116. package/dist/chunks/{index.317fca12.js.map → index.bd1d28d0.js.map} +1 -1
  117. package/dist/chunks/{index.671768a1.js → index.c8621e8e.js} +3 -3
  118. package/dist/chunks/{index.671768a1.js.map → index.c8621e8e.js.map} +1 -1
  119. package/dist/chunks/{index.7eefc59c.js → index.ccc7e8d7.js} +3 -3
  120. package/dist/chunks/{index.7eefc59c.js.map → index.ccc7e8d7.js.map} +1 -1
  121. package/dist/chunks/{index.dd30e538.js → index.e29a6907.js} +2 -2
  122. package/dist/chunks/{index.dd30e538.js.map → index.e29a6907.js.map} +1 -1
  123. package/dist/chunks/{keyboard-navigation.ca47dfa8.js → keyboard-navigation.bbc3d15c.js} +2 -2
  124. package/dist/chunks/{keyboard-navigation.ca47dfa8.js.map → keyboard-navigation.bbc3d15c.js.map} +1 -1
  125. package/dist/chunks/{listbox-option-tag.6bbb6bbe.js → listbox-option-tag.8708be60.js} +3 -3
  126. package/dist/chunks/{listbox-option-tag.6bbb6bbe.js.map → listbox-option-tag.8708be60.js.map} +1 -1
  127. package/dist/chunks/{loading-button.eafc9e1b.js → loading-button.692dbdc8.js} +2 -2
  128. package/dist/chunks/{loading-button.eafc9e1b.js.map → loading-button.692dbdc8.js.map} +1 -1
  129. package/dist/chunks/{payment-method.6c1ce07c.js → payment-method.c55dd352.js} +2 -2
  130. package/dist/chunks/{payment-method.6c1ce07c.js.map → payment-method.c55dd352.js.map} +1 -1
  131. package/dist/chunks/{tooltip.58ef3f4a.js → tooltip.efddb5f3.js} +4 -4
  132. package/dist/chunks/{tooltip.58ef3f4a.js.map → tooltip.efddb5f3.js.map} +1 -1
  133. package/dist/chunks/{use-bento-toast-controller.c3277f73.js → use-bento-toast-controller.5dac1f3c.js} +2 -2
  134. package/dist/chunks/{use-bento-toast-controller.c3277f73.js.map → use-bento-toast-controller.5dac1f3c.js.map} +1 -1
  135. package/dist/chunks/{use-cached-selected-values.69297473.js → use-cached-selected-values.98a9ed01.js} +225 -206
  136. package/dist/chunks/use-cached-selected-values.98a9ed01.js.map +1 -0
  137. package/dist/code-snippet.js +131 -129
  138. package/dist/code-snippet.js.map +1 -1
  139. package/dist/country.js +2 -2
  140. package/dist/currency.js +1 -1
  141. package/dist/dashboard-template.js +109 -0
  142. package/dist/dashboard-template.js.map +1 -0
  143. package/dist/data-grid-template.js +1 -1
  144. package/dist/data-grid.js +78 -70
  145. package/dist/data-grid.js.map +1 -1
  146. package/dist/date-picker.js +8 -8
  147. package/dist/date-range-picker.js +2 -2
  148. package/dist/date.js +1 -1
  149. package/dist/divider.js +1 -1
  150. package/dist/dropdown.js +7 -7
  151. package/dist/empty-state.js +3 -3
  152. package/dist/filter-bar.js +77 -75
  153. package/dist/filter-bar.js.map +1 -1
  154. package/dist/focus-trap.js +1 -1
  155. package/dist/form-layout.js +2 -2
  156. package/dist/header.js +4 -4
  157. package/dist/index.js +82 -79
  158. package/dist/index.js.map +1 -1
  159. package/dist/info-icon.js +3 -3
  160. package/dist/input-field.js +4 -4
  161. package/dist/internal.js +8 -8
  162. package/dist/link.js +1 -1
  163. package/dist/loading-indicator.js +1 -1
  164. package/dist/menu.js +1 -1
  165. package/dist/modal-fullscreen.js +6 -6
  166. package/dist/modal.js +6 -6
  167. package/dist/pagination.js +4 -4
  168. package/dist/payment-method.js +1 -1
  169. package/dist/popover.js +1 -1
  170. package/dist/popper-container.js +1 -1
  171. package/dist/radio-group.js +4 -4
  172. package/dist/search-bar.js +2 -2
  173. package/dist/secondary-nav.js +2 -2
  174. package/dist/segmented-control.js +40 -41
  175. package/dist/segmented-control.js.map +1 -1
  176. package/dist/selection-card.js +4 -4
  177. package/dist/sidepanel.js +6 -6
  178. package/dist/status.js +2 -2
  179. package/dist/stepper.js +4 -4
  180. package/dist/structured-list.js +1 -1
  181. package/dist/summary-grid.js +3 -3
  182. package/dist/tabs.js +68 -67
  183. package/dist/tabs.js.map +1 -1
  184. package/dist/tag.js +3 -3
  185. package/dist/textarea.js +4 -4
  186. package/dist/timeline.js +7 -7
  187. package/dist/toast.js +4 -4
  188. package/dist/toggle.js +2 -2
  189. package/dist/tutorial.js +68 -53
  190. package/dist/tutorial.js.map +1 -1
  191. package/dist/typography.js +1 -1
  192. package/dist/web-types.json +133 -70
  193. package/package.json +9 -6
  194. package/dist/chunks/button-actions.81db18e8.js.map +0 -1
  195. package/dist/chunks/button.9d6435ae.js +0 -100
  196. package/dist/chunks/button.9d6435ae.js.map +0 -1
  197. package/dist/chunks/checkmark.a6ed8f47.js +0 -26
  198. package/dist/chunks/checkmark.a6ed8f47.js.map +0 -1
  199. package/dist/chunks/dropdown.10c034aa.js.map +0 -1
  200. package/dist/chunks/events.58c00e6d.js.map +0 -1
  201. package/dist/chunks/index.aaf965f8.js +0 -147
  202. package/dist/chunks/index.aaf965f8.js.map +0 -1
  203. package/dist/chunks/use-cached-selected-values.69297473.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button-actions-with-menu.e845d77a.js","sources":["../../src/components/internal/button-actions-with-menu/button-actions-with-menu.vue"],"sourcesContent":["<template>\n <div class=\"b-button-actions-with-menu\">\n <div role=\"group\" class=\"b-button-actions-with-menu__container-wrapper\">\n <bento-button-actions :actions=\"computedActions\" :inverse=\"inverse\" />\n <bento-menu v-if=\"computedMenuActions.length\" :data=\"computedMenuActions\" :menu-position=\"menuPosition\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, toRef } from 'vue';\n import BentoMenu from '@/components/menu/menu.vue';\n import { BentoMenuItem } from '@/components/menu/components/menu-item/menu-item.types';\n import { BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { MENU_INVERSE_INJECTION_KEY } from '@/components/menu/menu.keys';\n import { BentoPopoverPositions } from '@/components/popover';\n\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n variant: 'default',\n external: true,\n to: 'https://www.adyen.com/'\n },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: 'primary',\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n\n /**\n * The number of actions to be displayed. The rest of the actions will be collapsed in a menu component.\n */\n displayedActions: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Set inverse color scheme to buttons and menu\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: 'bottom-start',\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n });\n\n const computedActions = computed(() => props.actions.slice(0, props.displayedActions));\n const inverseRef = toRef(props, 'inverse');\n\n provide(MENU_INVERSE_INJECTION_KEY, inverseRef);\n\n const computedMenuActions = computed(() =>\n props.displayedActions !== undefined && props.displayedActions < props.actions.length\n ? (props.actions.slice(props.displayedActions, props.actions.length).map(el => ({\n text: el.title,\n handler: el.event,\n icon: el.icon,\n critical: el.critical,\n disabled: el.disabled,\n })) as BentoMenuItem[])\n : []\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions-with-menu.scss\" />\n"],"names":["__default__","computedActions","computed","props","inverseRef","toRef","provide","MENU_INVERSE_INJECTION_KEY","computedMenuActions","el"],"mappings":";;;;;;AAwJI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA5CAC,IAAAC,EAAA,MAAAC,EAAA,QAAA,MAAA,GAAAA,EAAA,gBAAA,CAAA,GACAC,IAAAC,EAAAF,GAAA,SAAA;AAEA,IAAAG,EAAAC,GAAAH,CAAA;AAEA,UAAAI,IAAAN;AAAA,MAA4B,MAAAC,EAAA,qBAAA,UAAAA,EAAA,mBAAAA,EAAA,QAAA,SAAAA,EAAA,QAAA,MAAAA,EAAA,kBAAAA,EAAA,QAAA,MAAA,EAAA,IAAA,CAAAM,OAAA;AAAA,QAE4D,MAAAA,EAAA;AAAA,QACjE,SAAAA,EAAA;AAAA,QACG,MAAAA,EAAA;AAAA,QACH,UAAAA,EAAA;AAAA,QACI,UAAAA,EAAA;AAAA,MACA,EAAA,IAAA,CAAA;AAAA,IAEhB;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button-actions-with-menu.bf968959.js","sources":["../../src/components/internal/button-actions-with-menu/button-actions-with-menu.vue"],"sourcesContent":["<template>\n <div class=\"b-button-actions-with-menu\">\n <div role=\"group\" class=\"b-button-actions-with-menu__container-wrapper\">\n <bento-button-actions :actions=\"computedActions\" :inverse=\"inverse\" />\n <bento-menu v-if=\"computedMenuActions.length\" :data=\"computedMenuActions\" :menu-position=\"menuPosition\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, toRef } from 'vue';\n import BentoMenu from '@/components/menu/menu.vue';\n import { BentoMenuItem } from '@/components/menu/components/menu-item/menu-item.types';\n import { BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { MENU_INVERSE_INJECTION_KEY } from '@/components/menu/menu.keys';\n import { BentoPopoverPositions } from '@/components/popover';\n\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n variant: 'default',\n external: true,\n to: 'https://www.adyen.com/'\n },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: 'primary',\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n\n /**\n * The number of actions to be displayed. The rest of the actions will be collapsed in a menu component.\n */\n displayedActions: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Set inverse color scheme to buttons and menu\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: 'bottom-start',\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n });\n\n const computedActions = computed(() => props.actions.slice(0, props.displayedActions));\n const inverseRef = toRef(props, 'inverse');\n\n provide(MENU_INVERSE_INJECTION_KEY, inverseRef);\n\n const computedMenuActions = computed(() =>\n props.displayedActions !== undefined && props.displayedActions < props.actions.length\n ? (props.actions.slice(props.displayedActions, props.actions.length).map(el => ({\n text: el.title,\n handler: el.event,\n icon: el.icon,\n critical: el.critical,\n disabled: el.disabled,\n })) as BentoMenuItem[])\n : []\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * :displayedActions=\"2\"\n * />\n */\n\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions-with-menu.scss\" />\n"],"names":["__default__","computedActions","computed","props","inverseRef","toRef","provide","MENU_INVERSE_INJECTION_KEY","computedMenuActions","el"],"mappings":";;;;;;AAwJI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA5CAC,IAAAC,EAAA,MAAAC,EAAA,QAAA,MAAA,GAAAA,EAAA,gBAAA,CAAA,GACAC,IAAAC,EAAAF,GAAA,SAAA;AAEA,IAAAG,EAAAC,GAAAH,CAAA;AAEA,UAAAI,IAAAN;AAAA,MAA4B,MAAAC,EAAA,qBAAA,UAAAA,EAAA,mBAAAA,EAAA,QAAA,SAAAA,EAAA,QAAA,MAAAA,EAAA,kBAAAA,EAAA,QAAA,MAAA,EAAA,IAAA,CAAAM,OAAA;AAAA,QAE4D,MAAAA,EAAA;AAAA,QACjE,SAAAA,EAAA;AAAA,QACG,MAAAA,EAAA;AAAA,QACH,UAAAA,EAAA;AAAA,QACI,UAAAA,EAAA;AAAA,MACA,EAAA,IAAA,CAAA;AAAA,IAEhB;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as v, computed as o } from "vue";
2
- import { a as p } from "./button.9d6435ae.js";
3
- import { B as f } from "./loading-button.eafc9e1b.js";
1
+ import { defineComponent as v, computed as c } from "vue";
2
+ import { a as p } from "./button.cb90b55c.js";
3
+ import { B as f } from "./loading-button.692dbdc8.js";
4
4
  import { n as u } from "./_plugin-vue2_normalizer.71e2aa87.js";
5
5
  import "../assets/button-actions.css";
6
- var l = /* @__PURE__ */ ((n) => (n.BUTTONS_END = "buttons-end", n.FILL_CONTAINER = "fill-container", n.SPACE_BETWEEN = "space-between", n.VERTICAL_STACK = "vertical-stack", n))(l || {}), _ = /* @__PURE__ */ ((n) => (n.BUTTONS_START = "buttons-start", n))(_ || {});
7
- const c = { ...l, ..._ }, g = {}, m = /* @__PURE__ */ v({
6
+ var l = /* @__PURE__ */ ((t) => (t.BUTTONS_END = "buttons-end", t.FILL_CONTAINER = "fill-container", t.SPACE_BETWEEN = "space-between", t.VERTICAL_STACK = "vertical-stack", t))(l || {}), _ = /* @__PURE__ */ ((t) => (t.BUTTONS_START = "buttons-start", t))(_ || {});
7
+ const o = { ...l, ..._ }, g = {}, y = /* @__PURE__ */ v({
8
8
  ...g,
9
9
  __name: "button-actions",
10
10
  props: {
@@ -66,38 +66,40 @@ const c = { ...l, ..._ }, g = {}, m = /* @__PURE__ */ v({
66
66
  */
67
67
  layout: {
68
68
  type: String,
69
- default: c.BUTTONS_END,
70
- validator: (n) => Object.values(c).includes(n)
69
+ default: o.BUTTONS_END,
70
+ validator: (t) => Object.values(o).includes(t)
71
71
  }
72
72
  },
73
- setup(n) {
74
- const t = n, r = o(() => t.actions.slice().reverse()), s = (a) => {
75
- const d = t.actions.length - 1;
76
- return a === d ? "primary" : "secondary";
77
- }, e = o(() => ({
78
- [`b-button-actions--${t.layout}`]: !0
73
+ setup(t) {
74
+ const n = t, a = c(() => n.actions.slice().reverse()), s = (r) => {
75
+ const d = n.actions.length - 1;
76
+ return r === d ? "primary" : "secondary";
77
+ }, e = c(() => ({
78
+ [`b-button-actions--${n.layout}`]: !0
79
79
  }));
80
- return { __sfc: !0, props: t, reversedActionsList: r, generateButtonVariantByIndex: s, conditionalClasses: e, generateButtonEvents: (a) => (a == null ? void 0 : a.event) !== void 0 ? {
81
- click: a.event
82
- } : {}, BentoButton: p, BentoLoadingButton: f };
80
+ return { __sfc: !0, props: n, reversedActionsList: a, generateButtonVariantByIndex: s, conditionalClasses: e, generateButtonEvents: (r) => (r == null ? void 0 : r.event) !== void 0 ? {
81
+ click: r.event
82
+ } : {}, isIconOnly: (r) => r.iconOnly && (r.iconLeft || r.iconRight || r.icon), BentoButton: p, BentoLoadingButton: f };
83
83
  }
84
84
  });
85
- var B = function() {
86
- var t = this, r = t._self._c, s = t._self._setupProxy;
87
- return r("div", { staticClass: "b-button-actions" }, [r("div", { staticClass: "b-button-actions__container-wrapper", class: s.conditionalClasses, attrs: { role: "group" } }, t._l(s.reversedActionsList, function(e, i) {
88
- return r("div", { key: i, staticClass: "b-button-actions__button-wrapper" }, [e.state ? r(s.BentoLoadingButton, t._g({ attrs: { condensed: e.condensed, critical: e.critical, disabled: e.disabled, inverse: t.inverse, state: e.state, variant: e.variant || s.generateButtonVariantByIndex(i) } }, s.generateButtonEvents(e)), [t._v(" " + t._s(e.title) + " ")]) : r(s.BentoButton, t._g({ attrs: { condensed: e.condensed, critical: e.critical, disabled: e.disabled, inverse: t.inverse, link: e.link, variant: e.variant || s.generateButtonVariantByIndex(i) }, scopedSlots: t._u([e.icon || e.iconLeft ? { key: "iconLeft", fn: function() {
89
- return [r(e.icon || e.iconLeft, { tag: "component", attrs: { "svg-title": e.title } })];
90
- }, proxy: !0 } : null, e.iconRight ? { key: "iconRight", fn: function() {
91
- return [r(e.iconRight, { tag: "component", attrs: { "svg-title": e.title } })];
92
- }, proxy: !0 } : null], null, !0) }, s.generateButtonEvents(e)), [t._v(" " + t._s(e.title) + " ")])], 1);
85
+ var m = function() {
86
+ var n = this, a = n._self._c, s = n._self._setupProxy;
87
+ return a("div", { staticClass: "b-button-actions" }, [a("div", { staticClass: "b-button-actions__container-wrapper", class: s.conditionalClasses, attrs: { role: "group" } }, n._l(s.reversedActionsList, function(e, i) {
88
+ return a("div", { key: i, staticClass: "b-button-actions__button-wrapper" }, [e.state ? a(s.BentoLoadingButton, n._g({ attrs: { condensed: e.condensed, critical: e.critical, disabled: e.disabled, inverse: n.inverse, state: e.state, variant: e.variant || s.generateButtonVariantByIndex(i) } }, s.generateButtonEvents(e)), [n._v(" " + n._s(e.title) + " ")]) : a(s.BentoButton, n._g({ attrs: { condensed: e.condensed, critical: e.critical, disabled: e.disabled, inverse: n.inverse, link: e.link, variant: e.variant || s.generateButtonVariantByIndex(i) }, scopedSlots: n._u([e.icon || e.iconLeft ? { key: "iconLeft", fn: function() {
89
+ return [a(e.icon || e.iconLeft, { tag: "component", attrs: { "svg-title": e.title } })];
90
+ }, proxy: !0 } : null, s.isIconOnly(e) ? null : { key: "default", fn: function() {
91
+ return [n._v(" " + n._s(e.title) + " ")];
92
+ }, proxy: !0 }, e.iconRight ? { key: "iconRight", fn: function() {
93
+ return [a(e.iconRight, { tag: "component", attrs: { "svg-title": e.title } })];
94
+ }, proxy: !0 } : null], null, !0) }, s.generateButtonEvents(e)))], 1);
93
95
  }), 0)]);
94
- }, y = [], E = /* @__PURE__ */ u(
96
+ }, B = [], E = /* @__PURE__ */ u(
97
+ y,
95
98
  m,
96
99
  B,
97
- y,
98
100
  !1,
99
101
  null,
100
- "063db1f3",
102
+ "b25746d9",
101
103
  null,
102
104
  null
103
105
  );
@@ -106,6 +108,6 @@ export {
106
108
  L as B,
107
109
  l as a,
108
110
  _ as b,
109
- c
111
+ o as c
110
112
  };
111
- //# sourceMappingURL=button-actions.81db18e8.js.map
113
+ //# sourceMappingURL=button-actions.87e589e3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-actions.87e589e3.js","sources":["../../src/components/button/components/button-actions/button-actions.types.ts","../../src/components/button/components/button-actions/button-actions.vue"],"sourcesContent":["import type { VueNodeElement } from '@/types';\nimport type { BentoButtonProps, BentoLoadingButtonState } from '@/components/button';\n\nexport interface BentoButtonActionObject extends BentoButtonProps {\n title: string;\n event?: (event: Event) => void;\n icon?: VueNodeElement;\n iconLeft?: VueNodeElement;\n iconRight?: VueNodeElement;\n state?: BentoLoadingButtonState | `${BentoLoadingButtonState}`;\n iconOnly?: boolean;\n}\n\nexport type BentoButtonActionsList = Array<BentoButtonActionObject>;\n\nexport enum BentoButtonActionsLayoutBasic {\n BUTTONS_END = 'buttons-end',\n FILL_CONTAINER = 'fill-container',\n SPACE_BETWEEN = 'space-between',\n VERTICAL_STACK = 'vertical-stack',\n}\nexport enum BentoButtonActionsLayoutExtended {\n BUTTONS_START = 'buttons-start',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoButtonActionsLayout = { ...BentoButtonActionsLayoutBasic, ...BentoButtonActionsLayoutExtended };\nexport type BentoButtonActionsLayout = BentoButtonActionsLayoutBasic | BentoButtonActionsLayoutExtended;\n","<template>\n <div class=\"b-button-actions\">\n <div class=\"b-button-actions__container-wrapper\" :class=\"conditionalClasses\" role=\"group\">\n <div v-for=\"(button, index) in reversedActionsList\" :key=\"index\" class=\"b-button-actions__button-wrapper\">\n <bento-loading-button\n v-if=\"button.state\"\n :condensed=\"button.condensed\"\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"inverse\"\n :state=\"button.state\"\n :variant=\"button.variant || generateButtonVariantByIndex(index)\"\n v-on=\"generateButtonEvents(button)\"\n >\n {{ button.title }}\n </bento-loading-button>\n <bento-button\n v-else\n :condensed=\"button.condensed\"\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"inverse\"\n :link=\"button.link\"\n :variant=\"button.variant || generateButtonVariantByIndex(index)\"\n v-on=\"generateButtonEvents(button)\"\n >\n <template v-if=\"button.icon || button.iconLeft\" #iconLeft>\n <component :is=\"button.icon || button.iconLeft\" :svg-title=\"button.title\"></component>\n </template>\n <template v-if=\"!isIconOnly(button)\" #default>\n {{ button.title }}\n </template>\n <template v-if=\"button.iconRight\" #iconRight>\n <component :is=\"button.iconRight\" :svg-title=\"button.title\"></component>\n </template>\n </bento-button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType } from 'vue';\n import BentoButton from '../../button.vue';\n import { BentoButtonActionObject, BentoButtonActionsLayout, BentoButtonActionsList } from './button-actions.types';\n import { BentoLoadingButton } from '../loading-button';\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon` (optional): Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: 'secondary',\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n\n /**\n * Sets the Button Actions to color scheme inverse\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n layout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (layout: BentoButtonActionsLayout) => Object.values(BentoButtonActionsLayout).includes(layout),\n },\n });\n\n const reversedActionsList = computed(() => props.actions.slice().reverse());\n const generateButtonVariantByIndex = actionIndex => {\n const lastActionIndex = props.actions.length - 1;\n return actionIndex === lastActionIndex ? 'primary' : 'secondary';\n };\n\n const conditionalClasses = computed(() => ({\n [`b-button-actions--${props.layout}`]: true,\n }));\n\n const generateButtonEvents = (button: BentoButtonActionObject) =>\n button?.event !== undefined\n ? {\n click: button.event,\n }\n : {};\n\n const isIconOnly = (button: BentoButtonActionObject) =>\n button.iconOnly && (button.iconLeft || button.iconRight || button.icon);\n</script>\n\n<script lang=\"ts\">\n /**\n * ButtonActions component manages a set of actions a user can choose from by displaying a group of buttons.\n *\n * @example\n * import { BentoButtonActions } from '@adyen/bento-vue2';\n * import MachineLearningIcon from '@adyen/ui-assets-icons-16/vue/machine-learning';\n *\n * const clickedAction = () => { //your action here }\n *\n * <template>\n * <bento-button-actions\n * :actions=\"[{\n * title: 'Primary',\n * event: clickedAction,\n * icon: MachineLearningIcon,\n * }, {\n * title: 'Secondary',\n * event: clickedAction,\n * }, {\n * title: 'Tertiary',\n * event: clickedAction,\n * }]\"\n * />\n * </template>\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions.scss\" />\n"],"names":["BentoButtonActionsLayoutBasic","BentoButtonActionsLayoutBasic2","BentoButtonActionsLayoutExtended","BentoButtonActionsLayoutExtended2","BentoButtonActionsLayout","__default__","reversedActionsList","computed","props","generateButtonVariantByIndex","actionIndex","lastActionIndex","conditionalClasses","button"],"mappings":";;;;;AAeY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,eACAA,EAAA,iBAAA,kBACAA,EAAA,gBAAA,iBACAA,EAAA,iBAAA,kBAJQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,gBAAA,iBADQA,IAAAD,KAAA,CAAA,CAAA;AAOL,MAAAE,IAAA,EAAA,GAAAJ,GAAA,GAAAE,EAAA,GCoIHG,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA/CAC,IAAAC,EAAA,MAAAC,EAAA,QAAA,MAAA,EAAA,QAAA,CAAA,GACAC,IAAA,CAAAC,MAAA;AACI,YAAAC,IAAAH,EAAA,QAAA,SAAA;AACA,aAAAE,MAAAC,IAAA,YAAA;AAAA,IAAqD,GAGzDC,IAAAL,EAAA,OAAA;AAAA,MAA2C,CAAA,qBAAAC,EAAA,QAAA,GAAA;AAAA,IACA,EAAA;wIAG3C,CAAAK,OAAAA,KAAA,gBAAAA,EAAA,WAAA,SAAA;AAAA,MAEU,OAAAA,EAAA;AAAA,IACkB,IAAA,CAAA,eAI5B,CAAAA,MAAAA,EAAA,aAAAA,EAAA,YAAAA,EAAA,aAAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,101 @@
1
+ import { defineComponent as y, useAttrs as m, useSlots as v, computed as l } from "vue";
2
+ import { B as g } from "./index.e29a6907.js";
3
+ import { u as C } from "./use-has-slot.fbeb19ec.js";
4
+ import { B as S, a as E } from "./index.bd1d28d0.js";
5
+ import { n as R } from "./_plugin-vue2_normalizer.71e2aa87.js";
6
+ import "../assets/button.css";
7
+ var r = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.TERTIARY = "tertiary", e.TERTIARY_WITH_BACKGROUND = "tertiary-with-background", e))(r || {}), s = /* @__PURE__ */ ((e) => (e.CONDENSED = "condensed", e.DESTRUCTIVE = "critical", e.DISABLED = "disabled", e.ICON_ONLY = "icon-only", e.INVERSE = "inverse", e))(s || {});
8
+ const I = {
9
+ name: "bento-button"
10
+ }, T = /* @__PURE__ */ y({
11
+ ...I,
12
+ props: {
13
+ /**
14
+ * Reduces sizing of button
15
+ */
16
+ condensed: { type: Boolean, default: !1 },
17
+ /**
18
+ * Displays button as critical
19
+ */
20
+ critical: { type: Boolean, default: !1 },
21
+ /**
22
+ * Disables button functionality
23
+ */
24
+ disabled: { type: Boolean, default: !1 },
25
+ /**
26
+ * Sets color set to inverse
27
+ */
28
+ inverse: { type: Boolean, default: !1 },
29
+ /**
30
+ * Object containing props passed on to the BentoLink component. @see BentoLink documentation for which properties you can pass.
31
+ */
32
+ link: { type: Object, default: void 0 },
33
+ /**
34
+ * The default behavior of the button.
35
+ * Possible values are: 'button', 'reset', 'submit'
36
+ */
37
+ type: {
38
+ type: String,
39
+ default: "button"
40
+ },
41
+ /**
42
+ * Types of flavour of Button
43
+ * @values primary, secondary, tertiary, tertiary-with-background
44
+ */
45
+ variant: {
46
+ type: String,
47
+ default: r.PRIMARY,
48
+ validator: (e) => Object.values(r).includes(e)
49
+ }
50
+ },
51
+ emits: ["blur", "click", "focus", "keydown.esc"],
52
+ setup(e, { emit: a }) {
53
+ const t = e, n = m(), i = v(), c = C(i), u = l(() => (t == null ? void 0 : t.link) !== void 0 ? S : "button"), d = l(() => {
54
+ var o, p;
55
+ return {
56
+ "aria-controls": (o = n["aria-controls"]) == null ? void 0 : o.toString(),
57
+ "aria-expanded": (p = n["aria-expanded"]) == null ? void 0 : p.toString()
58
+ };
59
+ }), b = l(
60
+ () => u.value === "button" ? {
61
+ ...d.value,
62
+ disabled: t.disabled,
63
+ type: t.type
64
+ } : { ...t.link, disableTypography: !0, variant: E.DEFAULT, isButton: !0 }
65
+ ), _ = l(() => ({
66
+ [`b-button--${t.variant}${t.critical ? `-${s.DESTRUCTIVE}` : ""}`]: !0
67
+ })), f = l(() => ({
68
+ ..._.value,
69
+ [`b-button--${s.CONDENSED}`]: t.condensed,
70
+ [`b-button--${s.DISABLED}`]: t.disabled,
71
+ [`b-button--${s.INVERSE}`]: t.inverse
72
+ }));
73
+ return { __sfc: !0, props: t, emit: a, attrs: n, slots: i, hasSlot: c, componentType: u, ariaAttributes: d, componentProps: b, variantClass: _, conditionalClasses: f, getIconOnlyClass: () => ({
74
+ [`b-button--${s.ICON_ONLY}`]: !c("default")
75
+ }), onClickButton: (o) => {
76
+ t.disabled ? (o.preventDefault(), o.stopPropagation()) : a("click", o);
77
+ }, BentoTypography: g };
78
+ }
79
+ });
80
+ var D = function() {
81
+ var a = this, t = a._self._c, n = a._self._setupProxy;
82
+ return t(n.componentType, a._b({ tag: "component", staticClass: "b-button", class: { ...n.conditionalClasses, ...n.getIconOnlyClass() }, on: { "!click": function(i) {
83
+ return n.onClickButton.apply(null, arguments);
84
+ } } }, "component", n.componentProps, !1), [n.hasSlot("iconLeft") ? t("span", { staticClass: "b-button__icon-left", attrs: { "data-testid": "icon-button-left" } }, [a._t("iconLeft")], 2) : a._e(), n.hasSlot("default") ? t(n.BentoTypography, { staticClass: "b-button__label", attrs: { el: "span", variant: "body", stronger: "" } }, [a._t("default")], 2) : a._e(), n.hasSlot("iconRight") ? t("span", { staticClass: "b-button__icon-right", attrs: { "data-testid": "icon-button-right" } }, [a._t("iconRight")], 2) : a._e()], 1);
85
+ }, h = [], k = /* @__PURE__ */ R(
86
+ T,
87
+ D,
88
+ h,
89
+ !1,
90
+ null,
91
+ "2e6aa8ec",
92
+ null,
93
+ null
94
+ );
95
+ const B = k.exports;
96
+ export {
97
+ r as B,
98
+ B as a,
99
+ s as b
100
+ };
101
+ //# sourceMappingURL=button.cb90b55c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.cb90b55c.js","sources":["../../../core/src/components/button/button.types.ts","../../src/components/button/button.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoButtonVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n TERTIARY = 'tertiary',\n TERTIARY_WITH_BACKGROUND = 'tertiary-with-background',\n}\n\nexport enum BentoButtonPropClass {\n CONDENSED = 'condensed',\n DESTRUCTIVE = 'critical',\n DISABLED = 'disabled',\n ICON_ONLY = 'icon-only',\n INVERSE = 'inverse',\n}\n\nexport interface BentoButtonProps {\n condensed?: boolean;\n critical?: boolean;\n disabled?: boolean;\n inverse?: boolean;\n variant?: BentoButtonVariant | `${BentoButtonVariant}`;\n type?: string;\n link?: object;\n}\n","<template>\n <component\n :is=\"componentType\"\n v-bind=\"componentProps\"\n class=\"b-button\"\n :class=\"{ ...conditionalClasses, ...getIconOnlyClass() }\"\n @click.capture=\"onClickButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, useAttrs, useSlots } from 'vue';\n import { BentoButtonPropClass, BentoButtonVariant } from '@/core/components/button/button.types';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { Booleanish } from '@/types/prop-types';\n import type { RouterLinkProps } from 'vue-router/types/router';\n import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoLink, BentoLinkVariant } from '@/components/link';\n\n // TODO: replace all this code when migrated to Vue 3 is complete as this is the only\n // current way to extend the `router-link` component in Vue 2 and Vue Router 3\n export interface LinkProps extends RouterLinkProps, AnchorHTMLAttributes {\n // eslint-disable-next-line vue/require-default-prop\n args?: { props: RouterLinkProps };\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n external: boolean;\n }\n\n const props = defineProps({\n /**\n * Reduces sizing of button\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Displays button as critical\n */\n critical: { type: Boolean, default: false },\n\n /**\n * Disables button functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Sets color set to inverse\n */\n inverse: { type: Boolean, default: false },\n\n /**\n * Object containing props passed on to the BentoLink component. @see BentoLink documentation for which properties you can pass.\n */\n link: { type: Object, default: undefined },\n\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n\n /**\n * Types of flavour of Button\n * @values primary, secondary, tertiary, tertiary-with-background\n */\n variant: {\n type: String as PropType<BentoButtonVariant | `${BentoButtonVariant}`>,\n default: BentoButtonVariant.PRIMARY,\n validator: (value: BentoButtonVariant) => Object.values(BentoButtonVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur');\n\n /**\n * Emitted when the button is clicked\n */\n (e: 'click', event: MouseEvent);\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus');\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'keydown.esc');\n }>();\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const componentType = computed(() => {\n if (props?.link !== undefined) {\n return BentoLink;\n }\n return 'button';\n });\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const componentProps = computed(() =>\n componentType.value === 'button'\n ? {\n ...ariaAttributes.value,\n disabled: props.disabled,\n type: props.type,\n }\n : { ...props.link, disableTypography: true, variant: BentoLinkVariant.DEFAULT, isButton: true }\n );\n\n const variantClass = computed(() => ({\n [`b-button--${props.variant}${props.critical ? `-${BentoButtonPropClass.DESTRUCTIVE}` : ''}`]: true,\n }));\n\n const conditionalClasses = computed(() => ({\n ...variantClass.value,\n [`b-button--${BentoButtonPropClass.CONDENSED}`]: props.condensed,\n [`b-button--${BentoButtonPropClass.DISABLED}`]: props.disabled,\n [`b-button--${BentoButtonPropClass.INVERSE}`]: props.inverse,\n }));\n\n const getIconOnlyClass = () => ({\n [`b-button--${BentoButtonPropClass.ICON_ONLY}`]: !hasSlot('default'),\n });\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit('click', e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Button component for all the various types of bento buttons.\n *\n * @example\n * import { BentoButton } from '@adyen/bento-vue2';\n * import { CheckMarkIcon } from '@adyen/ui-assets-icons-16';\n *\n * export default {\n * components: { BentoButton },\n * template: `\n * <bento-button\n * disabled\n * variant=\"secondary\"\n * >\n * <template #iconLeft>\n * <check-mark svg-title=\"checked\" />\n * </template>\n *\n * Button text\n *\n * <template #iconRight>\n * <check-mark svg-title=\"checked\" />\n * </template>\n * </bento-button>\n * `,\n * }\n */\n export default {\n name: 'bento-button',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"@/core/components/button/button.scss\" />\n"],"names":["BentoButtonVariant","BentoButtonVariant2","BentoButtonPropClass","BentoButtonPropClass2","__default__","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","componentType","computed","props","BentoLink","ariaAttributes","_a","_b","componentProps","BentoLinkVariant","variantClass","conditionalClasses","e","emit"],"mappings":";;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,2BAAA,4BAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,cAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WALQA,IAAAD,KAAA,CAAA,CAAA;ACkLR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhFAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,OACIC,KAAA,gBAAAA,EAAA,UAAA,SACIC,IAEJ,QAAO,GAEXC,IAAAH,EAAA,MAAA;;AAAA;AAAA,QAAuC,kBAAAI,IAAAX,EAAA,eAAA,MAAA,gBAAAW,EAAA;AAAA,QACe,kBAAAC,IAAAZ,EAAA,eAAA,MAAA,gBAAAY,EAAA;AAAA,MACA;AAAA,KAAA,GAGtDC,IAAAN;AAAA,MAAuB,MAAAD,EAAA,UAAA,WAAA;AAAA,QAEb,GAAAI,EAAA;AAAA,QACsB,UAAAF,EAAA;AAAA,QACF,MAAAA,EAAA;AAAA,MACJ,IAAA,EAAA,GAAAA,EAAA,MAAA,mBAAA,IAAA,SAAAM,EAAA,SAAA,UAAA,GAAA;AAAA,IAE4E,GAGtGC,IAAAR,EAAA,OAAA;AAAA,MAAqC,CAAA,aAAAC,EAAA,UAAAA,EAAA,WAAA,IAAAX,EAAA,gBAAA,IAAA,GAAA;AAAA,IAC8D,EAAA,GAGnGmB,IAAAT,EAAA,OAAA;AAAA,MAA2C,GAAAQ,EAAA;AAAA,MACvB,CAAA,aAAAlB,EAAA,WAAA,GAAAW,EAAA;AAAA,MACuC,CAAA,aAAAX,EAAA,UAAA,GAAAW,EAAA;AAAA,MACD,CAAA,aAAAX,EAAA,SAAA,GAAAW,EAAA;AAAA,IACD,EAAA;6LAGzD,OAAA;AAAA,MAAgC,CAAA,aAAAX,EAAA,WAAA,GAAA,CAAAO,EAAA,SAAA;AAAA,IACuC,mBAGvE,CAAAa,MAAA;AACI,MAAAT,EAAA,YAGIS,EAAA,eAAA,GACAA,EAAA,gBAAA,KAHAC,EAAA,SAAAD,CAAA;AAAA,IAIJ;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as le, computed as M, ref as F, watch as V, nextTick as Oe, toRef as L, reactive as ye } from "vue";
2
2
  import { r as k, t as N, g as fe, e as oe, d as Ne, f as Se } from "./index.f55fdc32.js";
3
- import { t as T, B as ke, a as Ee, f as ve } from "./index.b21197ca.js";
3
+ import { t as T, B as ke, a as Ee, f as ve } from "./index.614a5138.js";
4
4
  import { e as ue } from "./index.d80206ed.js";
5
- import { a as Me } from "./button.9d6435ae.js";
6
- import { B as be } from "./index.dd30e538.js";
5
+ import { a as Me } from "./button.cb90b55c.js";
6
+ import { B as be } from "./index.e29a6907.js";
7
7
  import { u as we } from "./i18n.eb5b985b.js";
8
8
  import { g as Te } from "./unique-id.a2a2b458.js";
9
9
  import { C as Ie, a as pe } from "./chevron-left.5edf02ac.js";
10
10
  import { n as ie } from "./_plugin-vue2_normalizer.71e2aa87.js";
11
- import { a as xe } from "./keyboard-navigation.ca47dfa8.js";
11
+ import { a as xe } from "./keyboard-navigation.bbc3d15c.js";
12
12
  import "../assets/calendar.css";
13
13
  function q(e, t) {
14
14
  k(2, arguments);
@@ -910,4 +910,4 @@ export {
910
910
  W as s,
911
911
  nt as u
912
912
  };
913
- //# sourceMappingURL=calendar.640b8d25.js.map
913
+ //# sourceMappingURL=calendar.f02e0a5a.js.map