@adyen/bento-vue3 1.12.0 → 1.13.1

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 (223) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +23 -0
  4. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -1
  5. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
  6. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
  7. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +520 -0
  8. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
  10. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
  11. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +31 -0
  12. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
  13. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
  15. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +3 -2
  16. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
  17. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
  18. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
  19. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +24 -27
  20. package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
  21. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
  22. package/dist/accordion.js +2 -2
  23. package/dist/action-bar.js +5 -5
  24. package/dist/alert.js +26 -25
  25. package/dist/alert.js.map +1 -1
  26. package/dist/assets/base-modal.css +1 -1
  27. package/dist/assets/button.css +1 -1
  28. package/dist/assets/checkbox.css +1 -1
  29. package/dist/assets/controls-group.css +1 -1
  30. package/dist/assets/index.css +1 -1
  31. package/dist/assets/index10.css +1 -1
  32. package/dist/assets/index11.css +1 -1
  33. package/dist/assets/index12.css +1 -1
  34. package/dist/assets/index13.css +1 -1
  35. package/dist/assets/index14.css +1 -1
  36. package/dist/assets/index15.css +1 -1
  37. package/dist/assets/index16.css +1 -1
  38. package/dist/assets/index17.css +1 -1
  39. package/dist/assets/index18.css +1 -1
  40. package/dist/assets/index19.css +1 -1
  41. package/dist/assets/index2.css +1 -1
  42. package/dist/assets/index20.css +1 -1
  43. package/dist/assets/index21.css +1 -1
  44. package/dist/assets/index22.css +1 -1
  45. package/dist/assets/index23.css +1 -1
  46. package/dist/assets/index24.css +1 -1
  47. package/dist/assets/index25.css +1 -1
  48. package/dist/assets/index26.css +1 -1
  49. package/dist/assets/index27.css +1 -1
  50. package/dist/assets/index28.css +1 -1
  51. package/dist/assets/index29.css +1 -1
  52. package/dist/assets/index3.css +1 -1
  53. package/dist/assets/index30.css +1 -1
  54. package/dist/assets/index31.css +1 -1
  55. package/dist/assets/index32.css +1 -1
  56. package/dist/assets/index33.css +1 -1
  57. package/dist/assets/index34.css +1 -1
  58. package/dist/assets/index35.css +1 -1
  59. package/dist/assets/index36.css +1 -1
  60. package/dist/assets/index37.css +1 -1
  61. package/dist/assets/index38.css +1 -1
  62. package/dist/assets/index39.css +1 -1
  63. package/dist/assets/index4.css +1 -1
  64. package/dist/assets/index40.css +1 -1
  65. package/dist/assets/index41.css +1 -1
  66. package/dist/assets/index42.css +1 -1
  67. package/dist/assets/index43.css +1 -1
  68. package/dist/assets/index44.css +1 -1
  69. package/dist/assets/index45.css +1 -1
  70. package/dist/assets/index46.css +1 -1
  71. package/dist/assets/index47.css +1 -1
  72. package/dist/assets/index5.css +1 -1
  73. package/dist/assets/index6.css +1 -1
  74. package/dist/assets/index7.css +1 -1
  75. package/dist/assets/index8.css +1 -1
  76. package/dist/assets/index9.css +1 -1
  77. package/dist/assets/listbox.css +1 -1
  78. package/dist/avatar-image.js +1 -1
  79. package/dist/badge.js +1 -1
  80. package/dist/button.js +99 -111
  81. package/dist/button.js.map +1 -1
  82. package/dist/card.js +2 -2
  83. package/dist/checkbox.js +6 -6
  84. package/dist/chunks/arrow-left.81a91b8f.js.map +1 -1
  85. package/dist/chunks/{base-button.9f2acdeb.js → base-button.35d84224.js} +2 -2
  86. package/dist/chunks/{base-button.9f2acdeb.js.map → base-button.35d84224.js.map} +1 -1
  87. package/dist/chunks/{base-modal.56a671c3.js → base-modal.c4045ec6.js} +101 -98
  88. package/dist/chunks/base-modal.c4045ec6.js.map +1 -0
  89. package/dist/chunks/{button-actions-with-menu.080ccaf8.js → button-actions-with-menu.b3130fc5.js} +3 -3
  90. package/dist/chunks/{button-actions-with-menu.080ccaf8.js.map → button-actions-with-menu.b3130fc5.js.map} +1 -1
  91. package/dist/chunks/{button.7ce49c43.js → button.9a51e27a.js} +24 -24
  92. package/dist/chunks/{button.7ce49c43.js.map → button.9a51e27a.js.map} +1 -1
  93. package/dist/chunks/{calendar.f0f7b405.js → calendar.ac3ea3d9.js} +66 -66
  94. package/dist/chunks/{calendar.f0f7b405.js.map → calendar.ac3ea3d9.js.map} +1 -1
  95. package/dist/chunks/{checkbox.c63cd1d8.js → checkbox.093e5288.js} +3 -3
  96. package/dist/chunks/checkbox.093e5288.js.map +1 -0
  97. package/dist/chunks/checkmark-circle-fill.c45a999d.js.map +1 -1
  98. package/dist/chunks/checkmark-small.c79220d9.js.map +1 -1
  99. package/dist/chunks/checkmark.eb3c7a06.js.map +1 -1
  100. package/dist/chunks/chevron-left.4ee92950.js.map +1 -1
  101. package/dist/chunks/chevron-up.46afb34c.js.map +1 -1
  102. package/dist/chunks/{controls-group.1660076e.js → controls-group.f24676ab.js} +4 -4
  103. package/dist/chunks/{controls-group.1660076e.js.map → controls-group.f24676ab.js.map} +1 -1
  104. package/dist/chunks/{copy.91983fad.js → copy.d5ee2f1a.js} +4 -4
  105. package/dist/chunks/copy.d5ee2f1a.js.map +1 -0
  106. package/dist/chunks/cross-circle-fill.1abec1a2.js.map +1 -1
  107. package/dist/chunks/cross-small.b85406fe.js +29 -0
  108. package/dist/chunks/cross-small.b85406fe.js.map +1 -0
  109. package/dist/chunks/cross.26509efc.js.map +1 -1
  110. package/dist/chunks/{dropdown-default-textbox.157f95f0.js → dropdown-default-textbox.3350778f.js} +2 -2
  111. package/dist/chunks/{dropdown-default-textbox.157f95f0.js.map → dropdown-default-textbox.3350778f.js.map} +1 -1
  112. package/dist/chunks/{dropdown.b0e80aaa.js → dropdown.01c80ffd.js} +22 -22
  113. package/dist/chunks/dropdown.01c80ffd.js.map +1 -0
  114. package/dist/chunks/{field-label.894140ec.js → field-label.a23f17b5.js} +2 -2
  115. package/dist/chunks/{field-label.894140ec.js.map → field-label.a23f17b5.js.map} +1 -1
  116. package/dist/chunks/{fixed-scroller.708a4c4e.js → fixed-scroller.f6bc3063.js} +2 -2
  117. package/dist/chunks/{fixed-scroller.708a4c4e.js.map → fixed-scroller.f6bc3063.js.map} +1 -1
  118. package/dist/chunks/{footer-actions.21ba3026.js → footer-actions.2340bf71.js} +3 -3
  119. package/dist/chunks/{footer-actions.21ba3026.js.map → footer-actions.2340bf71.js.map} +1 -1
  120. package/dist/chunks/{index.3ec651d0.js → index.01e085bf.js} +2 -2
  121. package/dist/chunks/{index.3ec651d0.js.map → index.01e085bf.js.map} +1 -1
  122. package/dist/chunks/{index.9ae856b3.js → index.2f746572.js} +3 -3
  123. package/dist/chunks/{index.9ae856b3.js.map → index.2f746572.js.map} +1 -1
  124. package/dist/chunks/{index.46b7b1d3.js → index.59f8058f.js} +6 -6
  125. package/dist/chunks/{index.46b7b1d3.js.map → index.59f8058f.js.map} +1 -1
  126. package/dist/chunks/{index.762f7ec9.js → index.5c07d389.js} +7 -7
  127. package/dist/chunks/index.5c07d389.js.map +1 -0
  128. package/dist/chunks/{index.d57976cb.js → index.83ca2d5c.js} +28 -28
  129. package/dist/chunks/{index.d57976cb.js.map → index.83ca2d5c.js.map} +1 -1
  130. package/dist/chunks/{index.113137fb.js → index.8a92a332.js} +2 -2
  131. package/dist/chunks/{index.113137fb.js.map → index.8a92a332.js.map} +1 -1
  132. package/dist/chunks/{index.266dd8ff.js → index.8be283d5.js} +2 -2
  133. package/dist/chunks/{index.266dd8ff.js.map → index.8be283d5.js.map} +1 -1
  134. package/dist/chunks/{index.fcfca776.js → index.a56038f2.js} +2 -2
  135. package/dist/chunks/{index.fcfca776.js.map → index.a56038f2.js.map} +1 -1
  136. package/dist/chunks/{index.a25e53b8.js → index.cb2167c3.js} +5 -5
  137. package/dist/chunks/{index.a25e53b8.js.map → index.cb2167c3.js.map} +1 -1
  138. package/dist/chunks/{index.62c5d91f.js → index.e3dba813.js} +3 -3
  139. package/dist/chunks/{index.62c5d91f.js.map → index.e3dba813.js.map} +1 -1
  140. package/dist/chunks/index.eba55960.js +112 -0
  141. package/dist/chunks/index.eba55960.js.map +1 -0
  142. package/dist/chunks/{info-filled.e591599f.js → info-filled.a6f9d7d0.js} +19 -42
  143. package/dist/chunks/info-filled.a6f9d7d0.js.map +1 -0
  144. package/dist/chunks/{listbox-option-tag.1f42ad7f.js → listbox-option-tag.8e75f1a7.js} +3 -3
  145. package/dist/chunks/{listbox-option-tag.1f42ad7f.js.map → listbox-option-tag.8e75f1a7.js.map} +1 -1
  146. package/dist/chunks/listbox.e4f1d305.js +1466 -0
  147. package/dist/chunks/listbox.e4f1d305.js.map +1 -0
  148. package/dist/chunks/{loading-button.52696f0f.js → loading-button.7167caaf.js} +2 -2
  149. package/dist/chunks/{loading-button.52696f0f.js.map → loading-button.7167caaf.js.map} +1 -1
  150. package/dist/chunks/refresh.bd60f6a8.js.map +1 -1
  151. package/dist/chunks/search.ade93bda.js.map +1 -1
  152. package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
  153. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
  154. package/dist/chunks/{tooltip.d366f95d.js → tooltip.1ee20c7d.js} +3 -3
  155. package/dist/chunks/{tooltip.d366f95d.js.map → tooltip.1ee20c7d.js.map} +1 -1
  156. package/dist/code-snippet.js +7 -7
  157. package/dist/code-snippet.js.map +1 -1
  158. package/dist/country.js +2 -2
  159. package/dist/currency.js +1 -1
  160. package/dist/data-grid.js +999 -990
  161. package/dist/data-grid.js.map +1 -1
  162. package/dist/date-picker.js +20 -20
  163. package/dist/date-picker.js.map +1 -1
  164. package/dist/date-range-picker.js +2 -2
  165. package/dist/date.js +1 -1
  166. package/dist/divider.js +1 -1
  167. package/dist/dropdown.js +6 -6
  168. package/dist/empty-state.js +3 -3
  169. package/dist/filter-bar.js +640 -625
  170. package/dist/filter-bar.js.map +1 -1
  171. package/dist/focus-trap.js +1 -1
  172. package/dist/form-layout.js +2 -2
  173. package/dist/header.js +3 -3
  174. package/dist/index.js +262 -256
  175. package/dist/index.js.map +1 -1
  176. package/dist/info-icon.js +3 -3
  177. package/dist/info-icon.js.map +1 -1
  178. package/dist/input-field.js +4 -4
  179. package/dist/internal.js +7 -7
  180. package/dist/link.js +3 -80
  181. package/dist/link.js.map +1 -1
  182. package/dist/loading-indicator.js +1 -1
  183. package/dist/menu.js +1 -1
  184. package/dist/modal.js +4 -4
  185. package/dist/pagination.js +4 -4
  186. package/dist/pagination.js.map +1 -1
  187. package/dist/payment-method.js +2 -2
  188. package/dist/popover.js +1 -1
  189. package/dist/popper-container.js +1 -1
  190. package/dist/radio-group.js +155 -177
  191. package/dist/radio-group.js.map +1 -1
  192. package/dist/search-bar.js +2 -2
  193. package/dist/secondary-nav.js +2 -2
  194. package/dist/segmented-control.js +3 -3
  195. package/dist/sidepanel.js +98 -95
  196. package/dist/sidepanel.js.map +1 -1
  197. package/dist/status.js +2 -2
  198. package/dist/stepper.js +3 -3
  199. package/dist/stepper.js.map +1 -1
  200. package/dist/structured-list.js +1 -1
  201. package/dist/summary-grid.js +3 -3
  202. package/dist/tabs.js +3 -3
  203. package/dist/tag.js +3 -3
  204. package/dist/textarea.js +116 -112
  205. package/dist/textarea.js.map +1 -1
  206. package/dist/timeline.js +6 -6
  207. package/dist/timeline.js.map +1 -1
  208. package/dist/toast.js +8 -7
  209. package/dist/toast.js.map +1 -1
  210. package/dist/toggle.js +2 -2
  211. package/dist/tutorial.js +5 -5
  212. package/dist/tutorial.js.map +1 -1
  213. package/dist/typography.js +1 -1
  214. package/dist/web-types.json +1 -1
  215. package/package.json +2 -2
  216. package/dist/chunks/base-modal.56a671c3.js.map +0 -1
  217. package/dist/chunks/checkbox.c63cd1d8.js.map +0 -1
  218. package/dist/chunks/copy.91983fad.js.map +0 -1
  219. package/dist/chunks/dropdown.b0e80aaa.js.map +0 -1
  220. package/dist/chunks/index.762f7ec9.js.map +0 -1
  221. package/dist/chunks/info-filled.e591599f.js.map +0 -1
  222. package/dist/chunks/listbox.2c0a69a6.js +0 -1419
  223. package/dist/chunks/listbox.2c0a69a6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sources":["../../vue2/src/components/button/components/button-actions/button-actions.types.ts","../../vue2/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}\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 :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 {{ button.title }}\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 lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoButtonVariant } from '@/core/components/button/button.types';\n import BentoButton from '../../button.vue';\n import { BentoButtonActionObject, BentoButtonActionsLayout, BentoButtonActionsList } from './button-actions.types';\n import { BentoLoadingButton } from '../loading-button';\n\n export default defineComponent({\n name: 'bento-button-actions',\n components: { BentoButton, BentoLoadingButton },\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` (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: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\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) =>\n Object.values(BentoButtonActionsLayout).includes(layout),\n },\n\n /**\n * Sets the Button Actions to color scheme inverse\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const reversedActionsList = computed(() => props.actions.slice().reverse());\n const generateButtonVariantByIndex = actionIndex => {\n const lastActionIndex = props.actions.length - 1;\n return actionIndex === lastActionIndex ? BentoButtonVariant.PRIMARY : BentoButtonVariant.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 return {\n // Values\n conditionalClasses,\n reversedActionsList,\n\n // Methods\n generateButtonEvents,\n generateButtonVariantByIndex,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions.scss\" />\n"],"names":["BentoButtonActionsLayoutBasic","BentoButtonActionsLayoutBasic2","BentoButtonActionsLayoutExtended","BentoButtonActionsLayoutExtended2","BentoButtonActionsLayout","_sfc_main","defineComponent","BentoButton","BentoLoadingButton","layout","props","reversedActionsList","computed","generateButtonVariantByIndex","actionIndex","lastActionIndex","BentoButtonVariant","button","openBlock","createElementBlock","_hoisted_1","createElementVNode","normalizeClass","_ctx","index","createBlock","_component_bento_loading_button","mergeProps","toHandlers","withCtx","_component_bento_button","createSlots","resolveDynamicComponent"],"mappings":";;;;;;;AAcY,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,GCkBHG,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,aAAAC,GAAA,oBAAAC,EAAA;AAAA,EACwC,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IACvC,SAAA;AAAA,MAoCM,MAAA;AAAA,MACC,UAA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AA,UACL,OAAAN,EAAA;AAAA,UACyB,SAAAA,EAAA,WAAAM,EAAA,6BAAAC,CAAA;AAAA,QAEjB,GAAAI,EAAAL,EAAA,qBAAAN,CAAA,CAAA,CAAA,GAAA;AAAA,UAAH,SAAAY,EAAA,MAAA;AAAA;;;QAIL,GAAA,MAAA,CAAA,aAAA,YAAA,WAAA,SAAA,SAAA,CAAA,MAAAX,EAAA,GAAAO,EAAAK,GAAAH,EAAA;AAAA,UAAkB,KAAA;AAAA,UAC3B,WAAAV,EAAA;AAAA,UACiB,UAAAA,EAAA;AAAA,UACR,UAAAA,EAAA;AAAA,UACQ,SAAAM,EAAA;AAAA,UACR,MAAAN,EAAA;AAAA,UACJ,SAAAA,EAAA,WAAAM,EAAA,6BAAAC,CAAA;AAAA,QAKN,GAAAI,EAAAL,EAAA,qBAAAN,CAAA,CAAA,CAAA,GAAAc,EAAA;AAAA,UACA,SAAAF,EAAA,MAAA;AAAA;;UAJgB,GAAA;AAAA,QAAA,GAAA;AAAA;;;eACgDX,EAAA,GAAAO,EAAAO,EAAAf,EAAA,QAAAA,EAAA,QAAA,GAAA;AAAA;;;;UAGhD,IAAA;AAAA;;;eACkCC,EAAA,GAAAO,EAAAO,EAAAf,EAAA,SAAA,GAAA;AAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"button.js","sources":["../../vue2/src/components/button/components/button-actions/button-actions.types.ts","../../vue2/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}\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 :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 {{ button.title }}\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</script>\n\n<script lang=\"ts\">\n /**\n * ButtonActions component 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","generateButtonEvents","button"],"mappings":";;;;;;;AAcY,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,sCC+HHG,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA5CAC,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,GAG3CK,IAAA,CAAAC,OAAAA,KAAA,gBAAAA,EAAA,WAAA,SAAA;AAAA,MAEU,OAAAA,EAAA;AAAA,IACkB,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/card.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as j, ref as A, watch as B, computed as a, resolveComponent as v, openBlock as t, createElementBlock as r, normalizeClass as b, renderSlot as h, createCommentVNode as s, withKeys as L, createElementVNode as m, createBlock as C, mergeProps as F, withCtx as _, createVNode as T, Transition as P, normalizeStyle as V } from "vue";
2
- import { B as Y } from "./chunks/index.fcfca776.js";
2
+ import { B as Y } from "./chunks/index.a56038f2.js";
3
3
  import { a as K, C as q } from "./chunks/chevron-up.46afb34c.js";
4
4
  import { u as G } from "./chunks/use-has-slot.4d98bf29.js";
5
5
  import { g as J } from "./chunks/unique-id.a2a2b458.js";
@@ -8,7 +8,7 @@ import { o as X } from "./chunks/resize.a041304d.js";
8
8
  import { u as Z } from "./chunks/use-expandable-content-height.62fc84e5.js";
9
9
  import { BentoButtonActions as ee, BentoButtonActionsLayout as H } from "./button.js";
10
10
  import { _ as ae } from "./chunks/_plugin-vue_export-helper.dad06003.js";
11
- import "./assets/index21.css";
11
+ import "./assets/index5.css";
12
12
  var f = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e))(f || {}), p = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SMALL = "small", e))(p || {});
13
13
  const I = {
14
14
  "en-US": {
package/dist/checkbox.js CHANGED
@@ -1,13 +1,13 @@
1
- import { B, b as l } from "./chunks/checkbox.c63cd1d8.js";
2
- import { a as le } from "./chunks/checkbox.c63cd1d8.js";
1
+ import { B, b as l } from "./chunks/checkbox.093e5288.js";
2
+ import { a as le } from "./chunks/checkbox.093e5288.js";
3
3
  import { defineComponent as M, toRef as I, computed as s, watch as y, ref as T, resolveComponent as m, openBlock as n, createElementBlock as v, createVNode as N, normalizeClass as V, withCtx as d, Fragment as w, renderList as G, createBlock as E, createSlots as O, createTextVNode as k, toDisplayString as C, renderSlot as A, normalizeProps as L, guardReactiveProps as P, createCommentVNode as R } from "vue";
4
4
  import { g as U } from "./chunks/unique-id.a2a2b458.js";
5
- import { d as q } from "./chunks/index.fcfca776.js";
5
+ import { d as q } from "./chunks/index.a56038f2.js";
6
6
  import { u as x } from "./chunks/use-form-layout-loading.d03e5d48.js";
7
- import { C as $ } from "./chunks/controls-group.1660076e.js";
8
- import { E as z } from "./chunks/field-label.894140ec.js";
7
+ import { C as $ } from "./chunks/controls-group.f24676ab.js";
8
+ import { E as z } from "./chunks/field-label.a23f17b5.js";
9
9
  import { _ as D } from "./chunks/_plugin-vue_export-helper.dad06003.js";
10
- import "./assets/index23.css";
10
+ import "./assets/index6.css";
11
11
  var i = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(i || {});
12
12
  const S = "bento-checkbox-group", F = M({
13
13
  name: S,
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-left.81a91b8f.js","sources":["../../../vue2/node_modules/@adyen/ui-assets-icons-16/dist/vue/arrow-left.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1","toDisplayString"],"mappings":";;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARkM,MAAA;AAAA,EAAe,GAAA;;;AAAzN,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"arrow-left.81a91b8f.js","sources":["../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/arrow-left.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.80655 7.25434L8.06077 3.00011L7.00011 1.93945L0.939453 8.00011L7.00011 14.0608L8.06077 13.0001L3.81499 8.75433L14.7508 8.74316L14.7492 7.24316L3.80655 7.25434Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n"],"names":["uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1","toDisplayString"],"mappings":";;;AAKI,IAAAA,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARkM,MAAA;AAAA,EAAe,GAAA;;;AAAzN,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;","x_google_ignoreList":[0]}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, computed as C, ref as y, resolveComponent as _, openBlock as r, createElementBlock as l, normalizeClass as m, renderSlot as u, createCommentVNode as d, createBlock as S, withCtx as k } from "vue";
2
- import { B as g } from "./index.fcfca776.js";
2
+ import { B as g } from "./index.a56038f2.js";
3
3
  import { u as h } from "./use-has-slot.4d98bf29.js";
4
4
  import { _ as L } from "./_plugin-vue_export-helper.dad06003.js";
5
5
  import "../assets/base-button.css";
@@ -113,4 +113,4 @@ export {
113
113
  T as B,
114
114
  n as a
115
115
  };
116
- //# sourceMappingURL=base-button.9f2acdeb.js.map
116
+ //# sourceMappingURL=base-button.35d84224.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-button.9f2acdeb.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-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-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\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 emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,UAAA;AAAA,MAIO,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA,IACb,UAAA;AAAA,MAIU,MAAA;AAAA,MACA,SAAA;AAAA,IACG;AAAA;AAAA;AAAA;AAAA;AAAA,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ACU,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA,IACE,SAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA,IACW,SAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA;EAEA,GAAA;AAAA;;IAGK,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAELH,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAO,EAAAC,GAAA;AAAA,MAFkC,KAAA;AAAA,MAAC,IAAA;AAAA,MAAe,SAAA;AAAA,MAAe,UAAA;AAAA;;;;;;;IAGpFL,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAQ,GAAA;AAAA;;;;;"}
1
+ {"version":3,"file":"base-button.35d84224.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-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-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\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 emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;AAAA;AAAA,IACvB,UAAA;AAA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A;AAAA,EAA4B,OAAA;AAAA;;;;AAf/D,SAAAK,EAAA,GAAAC,EAAA,UAAA;AAAA,IACG,KAAA;AAAA,IACP,OAAAC,EAAA,CAAA,iBAAAC,EAAA,kBAAA,CAAA;AAAA,IACU,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA,IACE,SAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA,IACW,SAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA;EAEA,GAAA;AAAA;;IAGK,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAELH,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAO,EAAAC,GAAA;AAAA,MAFkC,KAAA;AAAA,MAAC,IAAA;AAAA,MAAe,SAAA;AAAA,MAAe,UAAA;AAAA;;;;;;;IAGpFL,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAQ,GAAA;AAAA;;;;;"}
@@ -1,28 +1,29 @@
1
- import { defineComponent as R, useSlots as Q, useAttrs as Y, ref as k, computed as r, watch as w, onMounted as j, openBlock as n, createElementBlock as A, createElementVNode as b, unref as t, normalizeClass as D, withKeys as J, createBlock as c, withCtx as u, normalizeStyle as h, createVNode as I, renderSlot as f, createCommentVNode as i } from "vue";
2
- import { B as G } from "./index.fcfca776.js";
3
- import { a as X } from "./button.7ce49c43.js";
4
- import { B as M } from "./index.113137fb.js";
5
- import { B as Z } from "./index.266dd8ff.js";
6
- import { u as ee } from "./use-has-slot.4d98bf29.js";
7
- import { u as te } from "./i18n.6c402773.js";
8
- import { C as ae } from "./cross.26509efc.js";
9
- import { G as oe, a as se } from "./grid-layout.c2fe3057.js";
10
- import { _ as le } from "./_plugin-vue_export-helper.dad06003.js";
1
+ import { defineComponent as N, useSlots as H, useAttrs as J, ref as B, computed as d, watch as D, onMounted as Q, provide as X, openBlock as n, createElementBlock as A, createElementVNode as _, unref as t, normalizeClass as w, withKeys as Z, createBlock as c, withCtx as m, normalizeStyle as h, createVNode as G, renderSlot as f, createCommentVNode as i } from "vue";
2
+ import { B as M } from "./index.a56038f2.js";
3
+ import { a as ee } from "./button.9a51e27a.js";
4
+ import { B as R } from "./index.8a92a332.js";
5
+ import { B as te } from "./index.8be283d5.js";
6
+ import { u as oe } from "./use-has-slot.4d98bf29.js";
7
+ import { u as ae } from "./i18n.6c402773.js";
8
+ import { g as se } from "./unique-id.a2a2b458.js";
9
+ import { C as le } from "./cross.26509efc.js";
10
+ import { G as ne, a as ie } from "./grid-layout.c2fe3057.js";
11
+ import { _ as de } from "./_plugin-vue_export-helper.dad06003.js";
11
12
  import "../assets/base-modal.css";
12
- var ne = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(ne || {}), E = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(E || {}), v = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(v || {}), y = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(y || {}), ie = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(ie || {}), re = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(re || {});
13
- const T = {
13
+ var re = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(re || {}), E = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(E || {}), v = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(v || {}), y = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(y || {}), ce = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(ce || {}), me = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(me || {});
14
+ const ue = Symbol("modal injection key"), T = {
14
15
  "en-US": {
15
16
  ariaLabelFallback: "modal",
16
17
  close: "Close"
17
18
  }
18
- }, de = { class: "b-modal-base" }, ce = ["role", "aria-label", "open", "onKeydown"], ue = { class: "b-modal-base__wrapper" }, me = { class: "b-modal-base__header" }, be = {
19
+ }, _e = { class: "b-modal-base" }, fe = ["id", "role", "aria-label", "open", "onKeydown"], be = { class: "b-modal-base__wrapper" }, pe = { class: "b-modal-base__header" }, ve = {
19
20
  "aria-label": "modal actions",
20
21
  class: "b-modal-base__actions"
21
- }, fe = R({
22
+ }, ye = N({
22
23
  i18n: { messages: T },
23
24
  name: "base-modal"
24
- }), _e = /* @__PURE__ */ R({
25
- ...fe,
25
+ }), ge = /* @__PURE__ */ N({
26
+ ...ye,
26
27
  props: {
27
28
  /**
28
29
  * List of actions that will be used to render the buttons.
@@ -104,148 +105,149 @@ const T = {
104
105
  withColumnLayout: { type: Boolean, default: !1 }
105
106
  },
106
107
  emits: ["close-modal"],
107
- setup(e, { expose: N, emit: P }) {
108
- const a = e, F = 500, { t: O } = te({ messages: T }), z = Q(), U = Y(), l = ee(z), d = k(null), _ = k(!1), S = r(() => a.isDismissible && !a.hideCloseButton), g = r(() => {
109
- if (!a.customPadding)
108
+ setup(e, { expose: P, emit: F }) {
109
+ const o = e, U = 500, { t: O } = ae({ messages: T }), z = H(), $ = J(), l = oe(z), r = B(null), b = B(!1), S = se("modal"), I = d(() => o.isDismissible && !o.hideCloseButton), g = d(() => {
110
+ if (!o.customPadding)
110
111
  return {};
111
- const o = {
112
- paddingLeft: a.customPadding,
113
- paddingRight: a.customPadding
114
- }, s = { ...o, paddingTop: void 0, paddingBottom: void 0 };
115
- return l("default") || (s.paddingTop = a.customPadding), l("actions") || (s.paddingBottom = a.customPadding), {
116
- header: { ...o, paddingTop: a.customPadding },
112
+ const a = {
113
+ paddingLeft: o.customPadding,
114
+ paddingRight: o.customPadding
115
+ }, s = { ...a, paddingTop: void 0, paddingBottom: void 0 };
116
+ return l("default") || (s.paddingTop = o.customPadding), l("actions") || (s.paddingBottom = o.customPadding), {
117
+ header: { ...a, paddingTop: o.customPadding },
117
118
  content: s,
118
- actions: { ...o, paddingBottom: a.customPadding }
119
+ actions: { ...a, paddingBottom: o.customPadding }
119
120
  };
120
- }), $ = r(() => U["aria-label"] ?? O("ariaLabelFallback")), m = r(() => a.withColumnLayout && a.size === E.LARGE), B = () => {
121
- d.value.showModal();
121
+ }), K = d(() => $["aria-label"] ?? O("ariaLabelFallback")), u = d(() => o.withColumnLayout && o.size === E.LARGE), k = () => {
122
+ r.value.showModal();
122
123
  }, q = () => {
123
- P("close-modal");
124
- }, K = () => {
125
- _.value && (d.value.close(), q(), _.value = !1);
124
+ F("close-modal");
125
+ }, V = () => {
126
+ b.value && (r.value.close(), q(), b.value = !1);
126
127
  }, L = () => {
127
- d.value.open && (_.value = !0);
128
- }, p = (o) => {
129
- o && o.preventDefault(), !(!a.isDismissible && a.modalRole === y.DIALOG) && L();
130
- }, V = ({ target: o }) => {
131
- o && o.tagName === y.DIALOG.toUpperCase() && p();
132
- }, W = r(() => ({
133
- [`b-modal-base__container--${a.size}`]: a.size,
134
- "b-modal-base__container--hide": _.value,
135
- "b-modal-base__container--overflow-visible": a.overflowVisible,
136
- "b-modal-base__container--column-layout": m.value
137
- })), x = r(() => ({
138
- "b-modal-base__content--column-layout": m.value,
128
+ r.value.open && (b.value = !0);
129
+ }, p = (a) => {
130
+ a && a.preventDefault(), !(!o.isDismissible && o.modalRole === y.DIALOG) && L();
131
+ }, W = ({ target: a }) => {
132
+ a && a.tagName === y.DIALOG.toUpperCase() && p();
133
+ }, Y = d(() => ({
134
+ [`b-modal-base__container--${o.size}`]: o.size,
135
+ "b-modal-base__container--hide": b.value,
136
+ "b-modal-base__container--overflow-visible": o.overflowVisible,
137
+ "b-modal-base__container--column-layout": u.value
138
+ })), j = d(() => ({
139
+ "b-modal-base__content--column-layout": u.value,
139
140
  "b-modal-base__content--with-header": l("default"),
140
141
  "b-modal-base__content--with-actions": l("actions")
141
- })), H = r(() => a.columnsSize === v.SMALLER ? [
142
+ })), x = d(() => o.columnsSize === v.SMALLER ? [
142
143
  { small: 4, medium: 4, large: 4 },
143
144
  { small: 8, medium: 8, large: 8 }
144
- ] : a.columnsSize === v.BIGGER ? [
145
+ ] : o.columnsSize === v.BIGGER ? [
145
146
  { small: 8, medium: 8, large: 8 },
146
147
  { small: 4, medium: 4, large: 4 }
147
148
  ] : [
148
149
  { small: 6, medium: 6, large: 6 },
149
150
  { small: 6, medium: 6, large: 6 }
150
151
  ]);
151
- return w(
152
- () => [a.isOpen, d.value],
153
- ([o, s], [, C]) => {
152
+ return D(
153
+ () => [o.isOpen, r.value],
154
+ ([a, s], [, C]) => {
154
155
  if (!s)
155
156
  return;
156
- o ? B() : !C || L();
157
+ a ? k() : !C || L();
157
158
  }
158
- ), w(
159
- () => a.actions,
159
+ ), D(
160
+ () => o.actions,
160
161
  () => {
161
- var o, s;
162
- ((s = (o = a.actions) == null ? void 0 : o[0]) == null ? void 0 : s.state) === "success" && setTimeout(L, F);
162
+ var a, s;
163
+ ((s = (a = o.actions) == null ? void 0 : a[0]) == null ? void 0 : s.state) === "success" && setTimeout(L, U);
163
164
  },
164
165
  { deep: !0 }
165
- ), j(() => {
166
- a.isOpen && d.value && B();
167
- }), N({
166
+ ), Q(() => {
167
+ o.isOpen && r.value && k();
168
+ }), P({
168
169
  internalModalActionClose: p
169
- }), (o, s) => (n(), A("div", de, [
170
- b("dialog", {
170
+ }), X(ue, S), (a, s) => (n(), A("div", _e, [
171
+ _("dialog", {
172
+ id: t(S),
171
173
  ref_key: "modal",
172
- ref: d,
174
+ ref: r,
173
175
  role: e.modalRole,
174
- "aria-label": t($),
175
- class: D(["b-modal-base__container", t(W)]),
176
+ "aria-label": t(K),
177
+ class: w(["b-modal-base__container", t(Y)]),
176
178
  open: e.initiallyOpen,
177
- onAnimationend: K,
178
- onClick: s[0] || (s[0] = (C) => e.isDismissible && V(C)),
179
- onKeydown: J(p, ["esc"])
179
+ onAnimationend: V,
180
+ onClick: s[0] || (s[0] = (C) => e.isDismissible && W(C)),
181
+ onKeydown: Z(p, ["esc"])
180
182
  }, [
181
- e.isOpen || e.initiallyOpen ? (n(), c(t(Z), { key: 0 }, {
182
- default: u(() => [
183
- b("div", ue, [
184
- t(l)("default") || t(S) ? (n(), A("div", {
183
+ e.isOpen || e.initiallyOpen ? (n(), c(t(te), { key: 0 }, {
184
+ default: m(() => [
185
+ _("div", be, [
186
+ t(l)("default") || t(I) ? (n(), A("div", {
185
187
  key: 0,
186
188
  class: "b-modal-base__header-container",
187
189
  style: h(t(g).header)
188
190
  }, [
189
- b("div", me, [
190
- I(t(G), {
191
+ _("div", pe, [
192
+ G(t(M), {
191
193
  class: "b-modal-base__title",
192
194
  "aria-label": "base modal title",
193
195
  el: "span",
194
196
  variant: "title",
195
197
  stronger: ""
196
198
  }, {
197
- default: u(() => [
198
- t(l)("default") ? f(o.$slots, "default", { key: 0 }, void 0, !0) : i("", !0)
199
+ default: m(() => [
200
+ t(l)("default") ? f(a.$slots, "default", { key: 0 }, void 0, !0) : i("", !0)
199
201
  ]),
200
202
  _: 3
201
203
  }),
202
- t(S) ? (n(), c(t(X), {
204
+ t(I) ? (n(), c(t(ee), {
203
205
  key: 0,
204
206
  class: "b-modal-base__close-button",
205
207
  variant: "tertiary",
206
208
  type: "button",
207
209
  onClick: p
208
210
  }, {
209
- default: u(() => [
210
- I(t(ae), {
211
+ default: m(() => [
212
+ G(t(le), {
211
213
  "svg-title": t(O)("close")
212
214
  }, null, 8, ["svg-title"])
213
215
  ]),
214
216
  _: 1
215
217
  })) : i("", !0)
216
218
  ]),
217
- t(m) ? (n(), c(t(M), {
219
+ t(u) ? (n(), c(t(R), {
218
220
  key: 0,
219
221
  class: "b-modal-base__divider"
220
222
  })) : i("", !0)
221
223
  ], 4)) : i("", !0),
222
- b("div", {
223
- class: D(["b-modal-base__content", t(x)]),
224
+ _("div", {
225
+ class: w(["b-modal-base__content", t(j)]),
224
226
  style: h(t(g).content)
225
227
  }, [
226
- t(l)("content") || t(l)("content-col-1") && t(l)("content-col-2") ? (n(), c(t(G), {
228
+ t(l)("content") || t(l)("content-col-1") && t(l)("content-col-2") ? (n(), c(t(M), {
227
229
  key: 0,
228
230
  "aria-label": "base modal content",
229
231
  el: "div",
230
232
  variant: "body",
231
233
  stronger: ""
232
234
  }, {
233
- default: u(() => [
234
- t(m) ? (n(), c(t(oe), {
235
+ default: m(() => [
236
+ t(u) ? (n(), c(t(ne), {
235
237
  key: 0,
236
- "column-width": t(H),
237
- "container-type": t(se).NORMAL,
238
+ "column-width": t(x),
239
+ "container-type": t(ie).NORMAL,
238
240
  "no-gap": "",
239
241
  class: "b-modal-base__grid"
240
242
  }, {
241
- "col-1": u(() => [
242
- f(o.$slots, "content-col-1", {}, void 0, !0)
243
+ "col-1": m(() => [
244
+ f(a.$slots, "content-col-1", {}, void 0, !0)
243
245
  ]),
244
- "col-2": u(() => [
245
- f(o.$slots, "content-col-2", {}, void 0, !0)
246
+ "col-2": m(() => [
247
+ f(a.$slots, "content-col-2", {}, void 0, !0)
246
248
  ]),
247
249
  _: 3
248
- }, 8, ["column-width", "container-type"])) : f(o.$slots, "content", { key: 1 }, void 0, !0)
250
+ }, 8, ["column-width", "container-type"])) : f(a.$slots, "content", { key: 1 }, void 0, !0)
249
251
  ]),
250
252
  _: 3
251
253
  })) : i("", !0)
@@ -255,30 +257,31 @@ const T = {
255
257
  class: "b-modal-base__actions-container",
256
258
  style: h(t(g).actions)
257
259
  }, [
258
- t(m) ? (n(), c(t(M), {
260
+ t(u) ? (n(), c(t(R), {
259
261
  key: 0,
260
262
  class: "b-modal-base__divider"
261
263
  })) : i("", !0),
262
- b("div", be, [
263
- f(o.$slots, "actions", {}, void 0, !0)
264
+ _("div", ve, [
265
+ f(a.$slots, "actions", {}, void 0, !0)
264
266
  ])
265
267
  ], 4)) : i("", !0)
266
268
  ])
267
269
  ]),
268
270
  _: 3
269
271
  })) : i("", !0)
270
- ], 42, ce)
272
+ ], 42, fe)
271
273
  ]));
272
274
  }
273
275
  });
274
- const Be = /* @__PURE__ */ le(_e, [["__scopeId", "data-v-baa96bff"]]);
276
+ const Ge = /* @__PURE__ */ de(ge, [["__scopeId", "data-v-0fa7032d"]]);
275
277
  export {
276
- ne as B,
278
+ re as B,
279
+ ue as M,
277
280
  E as a,
278
281
  v as b,
279
282
  y as c,
280
- ie as d,
281
- re as e,
282
- Be as f
283
+ ce as d,
284
+ me as e,
285
+ Ge as f
283
286
  };
284
- //# sourceMappingURL=base-modal.56a671c3.js.map
287
+ //# sourceMappingURL=base-modal.c4045ec6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-modal.c4045ec6.js","sources":["../../../vue2/src/components/modal/modal.types.ts","../../../vue2/src/components/modal/components/base-modal/base-modal.keys.ts","../../../vue2/src/components/modal/components/base-modal/base-modal.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariant {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n","export const MODAL_DIALOG_ID_INJECTION_KEY = Symbol('modal injection key');\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n :id=\"modalId\"\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @animationend=\"closeModalAfterAnimation\"\n @click=\"isDismissible && closeModalOnClickOutside($event)\"\n @keydown.esc=\"internalModalActionClose\"\n >\n <bento-focus-trap v-if=\"isOpen || initiallyOpen\">\n <div class=\"b-modal-base__wrapper\">\n <div\n v-if=\"hasSlot('default') || showCloseButton\"\n class=\"b-modal-base__header-container\"\n :style=\"customPaddingStyles.header\"\n >\n <div class=\"b-modal-base__header\">\n <bento-typography\n class=\"b-modal-base__title\"\n aria-label=\"base modal title\"\n el=\"span\"\n variant=\"title\"\n stronger\n >\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n <bento-button\n v-if=\"showCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n </div>\n\n <div\n class=\"b-modal-base__content\"\n :class=\"modalContentConditionalClasses\"\n :style=\"customPaddingStyles.content\"\n >\n <bento-typography\n v-if=\"hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))\"\n aria-label=\"base modal content\"\n el=\"div\"\n variant=\"body\"\n stronger\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n no-gap\n class=\"b-modal-base__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n\n <div\n v-if=\"hasSlot('actions')\"\n class=\"b-modal-base__actions-container\"\n :style=\"customPaddingStyles.actions\"\n >\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n\n <div aria-label=\"modal actions\" class=\"b-modal-base__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, provide, ref, useAttrs, useSlots, watch } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalRole, BentoModalSize } from '@/components/modal/modal.types';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoDivider } from '@/components/divider';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { MODAL_DIALOG_ID_INJECTION_KEY } from '@/components/modal/components/base-modal/base-modal.keys';\n import { generateUid } from '@/utils/ts/unique-id';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref<HTMLDialogElement>(null);\n const isClosing = ref(false);\n const modalId = generateUid('modal');\n\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed.\n */\n (e: 'close-modal');\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 * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\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',2\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 * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, required: true },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Defines whether the modal will be an alert modal\n */\n modalRole: { type: String, default: BentoModalRole.DIALOG },\n\n /**\n * Allows the inner elments to overflow the dialog\n */\n overflowVisible: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const showCloseButton = computed(() => props.isDismissible && !props.hideCloseButton);\n\n const customPaddingStyles = computed(() => {\n if (!props.customPadding) {\n return {};\n }\n\n const xPadding = {\n paddingLeft: props.customPadding,\n paddingRight: props.customPadding,\n };\n\n const content = { ...xPadding, paddingTop: undefined, paddingBottom: undefined };\n\n if (!hasSlot('default')) {\n content.paddingTop = props.customPadding;\n }\n\n if (!hasSlot('actions')) {\n content.paddingBottom = props.customPadding;\n }\n\n return {\n header: { ...xPadding, paddingTop: props.customPadding },\n content,\n actions: { ...xPadding, paddingBottom: props.customPadding },\n };\n });\n\n const computedAriaLabel = computed(() => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string));\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit('close-modal');\n };\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value) {\n modal.value.close();\n emitCloseEvent();\n isClosing.value = false;\n }\n };\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n /**\n * If the user has pressed escape, clicked outside or clicked the close icon.\n * Needs to be called from outside, following the \"dialog.close()\" pattern,\n * when the closing event is triggered outside of the \"base-modal\"\n * component (e.g. from a closing action).\n */\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible && props.modalRole === BentoModalRole.DIALOG) {\n return;\n }\n startCloseModalAnimation();\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeModalOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === BentoModalRole.DIALOG.toUpperCase()) {\n internalModalActionClose();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n 'b-modal-base__container--hide': isClosing.value,\n 'b-modal-base__container--overflow-visible': props.overflowVisible,\n 'b-modal-base__container--column-layout': hasColumnLayout.value,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-base__content--column-layout': hasColumnLayout.value,\n 'b-modal-base__content--with-header': hasSlot('default'),\n 'b-modal-base__content--with-actions': hasSlot('actions'),\n }));\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [\n { small: 4, medium: 4, large: 4 },\n { small: 8, medium: 8, large: 8 },\n ];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [\n { small: 8, medium: 8, large: 8 },\n { small: 4, medium: 4, large: 4 },\n ];\n }\n return [\n { small: 6, medium: 6, large: 6 },\n { small: 6, medium: 6, large: 6 },\n ];\n });\n\n watch(\n () => [props.isOpen, modal.value],\n ([newIsOpen, newModalValue], [, oldModalValue]): void => {\n if (!newModalValue) {\n return;\n }\n\n const isFirstMutation = !oldModalValue;\n if (newIsOpen) {\n openModal();\n } else if (!isFirstMutation) {\n startCloseModalAnimation();\n }\n }\n );\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(startCloseModalAnimation, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n },\n { deep: true }\n );\n\n onMounted(() => {\n if (props.isOpen && modal.value) {\n openModal();\n }\n });\n\n /**\n * Expose methods through its 'ref'\n */\n defineExpose({\n internalModalActionClose,\n });\n\n // Let's Children components know they are inside a Modal (dialog element)\n provide(MODAL_DIALOG_ID_INJECTION_KEY, modalId);\n</script>\n\n<script lang=\"ts\">\n /**\n * Dialog container. It creates a dialog HTML element for the modal to use.\n *\n * @example\n * import BaseModal from './components/base-modal/base-modal.vue';\n *\n * export default {\n * components: { BaseModal },\n * template: `\n * <base-modal\n * :hide-close-button=\"true\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </base-modal>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","MODAL_DIALOG_ID_INJECTION_KEY","__default__","defineComponent","messages","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","t","useI18n","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","modal","ref","isClosing","modalId","generateUid","showCloseButton","computed","props","customPaddingStyles","xPadding","content","computedAriaLabel","hasColumnLayout","openModal","emitCloseEvent","emit","closeModalAfterAnimation","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","target","modalConditionalClasses","modalContentConditionalClasses","computedColumnWidth","watch","newIsOpen","newModalValue","oldModalValue","_b","_a","onMounted","expose","provide"],"mappings":";;;;;;;;;;;;AAGY,IAAAA,KAAA,kBAAAC,OACRA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,MAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GASAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EA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A,MAC6B,EAAA,OAAA,GAAA,QAAA,GAAA,OAAA,EAAA;AAAA,IACA,IAGxC4B,EAAA,gBAAA5B,EAAA,SACI;AAAA,MAAO,EAAA,OAAA,GAAA,QAAA,GAAA,OAAA,EAAA;AAAA,MAC6B,EAAA,OAAA,GAAA,QAAA,GAAA,OAAA,EAAA;AAAA,IACA,IAGxC;AAAA,MAAO,EAAA,OAAA,GAAA,QAAA,GAAA,OAAA,EAAA;AAAA,MAC6B,EAAA,OAAA,GAAA,QAAA,GAAA,OAAA,EAAA;AAAA,IACA,CACpC;AAGJ,WAAA8C;AAAA,MAAA,MAAA,CAAAlB,EAAA,QAAAP,EAAA,KAAA;AAAA,MACoC,CAAA,CAAA0B,GAAAC,CAAA,GAAA,CAAA,EAAAC,CAAA,MAAA;AAE5B,YAAA,CAAAD;AACI;AAIJ,QAAAD,IACIb,EAAA,IAFJ,CAAAe,KAIIX,EAAA;AAAA,MACJ;AAAA,IACJ,GAKJQ;AAAA,MAAA,MAAAlB,EAAA;AAAA,MACgB,MAAA;;AAER,UAAAsB,KAAAC,IAAAvB,EAAA,YAAA,gBAAAuB,EAAA,OAAA,gBAAAD,EAAA,WAAA,aACI,WAAAZ,GAAA1B,CAAA;AAAA,MACJ;AAAA,MACJ,EAAA,MAAA,GAAA;AAAA,IACa,GAGjBwC,EAAA,MAAA;AACI,MAAAxB,EAAA,UAAAP,EAAA,SACIa,EAAA;AAAA,IACJ,CAAA,GAMJmB,EAAA;AAAA,MAAa,0BAAAd;AAAA,IACT,CAAA,GAIJe,EAAA9C,IAAAgB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as d, computed as s, toRef as u, provide as l, openBlock as c, createElementBlock as p, createElementVNode as m, createVNode as _, unref as n, createBlock as f, createCommentVNode as v } from "vue";
2
- import { M as b, B as y } from "./index.762f7ec9.js";
3
- import { B as h } from "./index.a25e53b8.js";
2
+ import { M as b, B as y } from "./index.5c07d389.js";
3
+ import { B as h } from "./index.cb2167c3.js";
4
4
  import { BentoButtonActions as B } from "../button.js";
5
5
  import { _ as A } from "./_plugin-vue_export-helper.dad06003.js";
6
6
  import "../assets/button-actions-with-menu.css";
@@ -104,4 +104,4 @@ const C = /* @__PURE__ */ A(M, [["__scopeId", "data-v-f58eba13"]]);
104
104
  export {
105
105
  C as B
106
106
  };
107
- //# sourceMappingURL=button-actions-with-menu.080ccaf8.js.map
107
+ //# sourceMappingURL=button-actions-with-menu.b3130fc5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-actions-with-menu.080ccaf8.js","sources":["../../../vue2/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":";;;;;;;;;GAwJIA,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.b3130fc5.js","sources":["../../../vue2/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":";;;;;;;;;GAwJIA,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;;;;;;;;;;;;;;;;;"}