@adyen/bento-vue3 1.34.0 → 1.35.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 (203) hide show
  1. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  2. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -1
  5. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +1 -1
  6. package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +1 -0
  7. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue.d.ts +7 -7
  8. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
  9. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue.d.ts +7 -7
  10. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue.d.ts +7 -7
  11. package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +7 -7
  12. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +2 -2
  14. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -3
  15. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
  16. package/dist/@types/packages/vue2/src/utils/ts/get-date-locale/get-date-locale.d.ts +11 -0
  17. package/dist/accordion.js +1 -1
  18. package/dist/action-bar.js +1 -1
  19. package/dist/alert.js +1 -1
  20. package/dist/assets/accordion-item.css +1 -1
  21. package/dist/assets/action-bar.css +1 -1
  22. package/dist/assets/avatar.css +1 -1
  23. package/dist/assets/base-modal.css +1 -1
  24. package/dist/assets/calendar.css +1 -1
  25. package/dist/assets/card.css +1 -1
  26. package/dist/assets/checkbox.css +1 -1
  27. package/dist/assets/code-snippet.css +1 -1
  28. package/dist/assets/currency.css +1 -0
  29. package/dist/assets/data-grid.css +1 -1
  30. package/dist/assets/date-range-picker.css +1 -1
  31. package/dist/assets/dialog-page.css +1 -1
  32. package/dist/assets/dropdown.css +1 -1
  33. package/dist/assets/error-message.css +1 -1
  34. package/dist/assets/filter-bar.css +1 -1
  35. package/dist/assets/header.css +1 -1
  36. package/dist/assets/inspector.css +1 -1
  37. package/dist/assets/loading-button.css +1 -1
  38. package/dist/assets/menu.css +1 -1
  39. package/dist/assets/modal-fullscreen.css +1 -1
  40. package/dist/assets/popover.css +1 -1
  41. package/dist/assets/sidepanel.css +1 -1
  42. package/dist/assets/structured-list-item.css +1 -1
  43. package/dist/assets/tutorial.css +1 -1
  44. package/dist/avatar.js +1 -1
  45. package/dist/button.js +2 -2
  46. package/dist/card.js +1 -1
  47. package/dist/checkbox.js +2 -2
  48. package/dist/chunks/accordion-item.C30QFxol.js +142 -0
  49. package/dist/chunks/accordion-item.C30QFxol.js.map +1 -0
  50. package/dist/chunks/{action-bar.DGQYYi8b.js → action-bar.5XBrXwYv.js} +58 -44
  51. package/dist/chunks/{action-bar.DGQYYi8b.js.map → action-bar.5XBrXwYv.js.map} +1 -1
  52. package/dist/chunks/{alert.Bz4tNKDH.js → alert.BvSx_Bi7.js} +26 -20
  53. package/dist/chunks/{alert.Bz4tNKDH.js.map → alert.BvSx_Bi7.js.map} +1 -1
  54. package/dist/chunks/{avatar.mNlMngHQ.js → avatar.8erKxh8t.js} +13 -13
  55. package/dist/chunks/avatar.8erKxh8t.js.map +1 -0
  56. package/dist/chunks/{base-modal.Bl7DBkt0.js → base-modal.BenvK-Np.js} +35 -29
  57. package/dist/chunks/{base-modal.Bl7DBkt0.js.map → base-modal.BenvK-Np.js.map} +1 -1
  58. package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js → button-actions-with-menu.CHOjMHpd.js} +4 -4
  59. package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js.map → button-actions-with-menu.CHOjMHpd.js.map} +1 -1
  60. package/dist/chunks/{button-actions.hdK5IgrZ.js → button-actions.DyI_dSvx.js} +2 -2
  61. package/dist/chunks/{button-actions.hdK5IgrZ.js.map → button-actions.DyI_dSvx.js.map} +1 -1
  62. package/dist/chunks/{calendar.D--sOCBT.js → calendar.DzYaxc0M.js} +148 -148
  63. package/dist/chunks/calendar.DzYaxc0M.js.map +1 -0
  64. package/dist/chunks/{card.BvSoujBc.js → card.Bt8jcp9I.js} +45 -37
  65. package/dist/chunks/card.Bt8jcp9I.js.map +1 -0
  66. package/dist/chunks/{checkbox-group.CuLP3hPd.js → checkbox-group.B0wngKi6.js} +4 -4
  67. package/dist/chunks/{checkbox-group.CuLP3hPd.js.map → checkbox-group.B0wngKi6.js.map} +1 -1
  68. package/dist/chunks/{checkbox.DMMXn-h8.js → checkbox.Bk_jmkGe.js} +50 -40
  69. package/dist/chunks/{checkbox.DMMXn-h8.js.map → checkbox.Bk_jmkGe.js.map} +1 -1
  70. package/dist/chunks/{code-snippet.BWM5w4CP.js → code-snippet.1SigVnjS.js} +97 -88
  71. package/dist/chunks/code-snippet.1SigVnjS.js.map +1 -0
  72. package/dist/chunks/{controls-group.BnZVHgQK.js → controls-group.COc0kArc.js} +2 -2
  73. package/dist/chunks/{controls-group.BnZVHgQK.js.map → controls-group.COc0kArc.js.map} +1 -1
  74. package/dist/chunks/{copy.h-wVGvID.js → copy.1-HH1fz5.js} +28 -20
  75. package/dist/chunks/{copy.h-wVGvID.js.map → copy.1-HH1fz5.js.map} +1 -1
  76. package/dist/chunks/{currency.CFJy6QYU.js → currency.BdtY-UIM.js} +3 -2
  77. package/dist/chunks/{currency.CFJy6QYU.js.map → currency.BdtY-UIM.js.map} +1 -1
  78. package/dist/chunks/{dashboard-section.BIH2wzgk.js → dashboard-section.BOrGKdY9.js} +2 -2
  79. package/dist/chunks/{dashboard-section.BIH2wzgk.js.map → dashboard-section.BOrGKdY9.js.map} +1 -1
  80. package/dist/chunks/{dashed-underline.CFJdLuJp.js → dashed-underline.BO4BuqUM.js} +2 -2
  81. package/dist/chunks/{dashed-underline.CFJdLuJp.js.map → dashed-underline.BO4BuqUM.js.map} +1 -1
  82. package/dist/chunks/{data-grid-template.21gqdYrs.js → data-grid-template.O946JKTa.js} +2 -2
  83. package/dist/chunks/{data-grid-template.21gqdYrs.js.map → data-grid-template.O946JKTa.js.map} +1 -1
  84. package/dist/chunks/{data-grid.DUwLxtW_.js → data-grid.Bv5TA_zR.js} +578 -532
  85. package/dist/chunks/{data-grid.DUwLxtW_.js.map → data-grid.Bv5TA_zR.js.map} +1 -1
  86. package/dist/chunks/{date-picker.21z_Sw4V.js → date-picker.DvEPEMIM.js} +99 -91
  87. package/dist/chunks/date-picker.DvEPEMIM.js.map +1 -0
  88. package/dist/chunks/{date-range-picker.K2TeW8aX.js → date-range-picker.BLVlkkG_.js} +338 -316
  89. package/dist/chunks/date-range-picker.BLVlkkG_.js.map +1 -0
  90. package/dist/chunks/{date.D8rQMzMG.js → date.CYUV4seY.js} +92 -92
  91. package/dist/chunks/{date.D8rQMzMG.js.map → date.CYUV4seY.js.map} +1 -1
  92. package/dist/chunks/{dropdown-tag.BNJnscD2.js → dropdown-tag.bpKWbC_O.js} +3 -3
  93. package/dist/chunks/{dropdown-tag.BNJnscD2.js.map → dropdown-tag.bpKWbC_O.js.map} +1 -1
  94. package/dist/chunks/{dropdown.ex87AZ7s.js → dropdown.rFZp3hMb.js} +212 -193
  95. package/dist/chunks/dropdown.rFZp3hMb.js.map +1 -0
  96. package/dist/chunks/{error-message.D2Y99KjT.js → error-message.DblYEZ7E.js} +43 -29
  97. package/dist/chunks/{error-message.D2Y99KjT.js.map → error-message.DblYEZ7E.js.map} +1 -1
  98. package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
  99. package/dist/chunks/{filter-bar.BAmG-yML.js → filter-bar.IN7gqxsc.js} +727 -712
  100. package/dist/chunks/filter-bar.IN7gqxsc.js.map +1 -0
  101. package/dist/chunks/{footer-actions.gtxofUAa.js → footer-actions.CyoMN_ca.js} +2 -2
  102. package/dist/chunks/{footer-actions.gtxofUAa.js.map → footer-actions.CyoMN_ca.js.map} +1 -1
  103. package/dist/chunks/{form-layout-title.Boi0QQZL.js → form-layout-title.Bi_3du_6.js} +2 -2
  104. package/dist/chunks/{form-layout-title.Boi0QQZL.js.map → form-layout-title.Bi_3du_6.js.map} +1 -1
  105. package/dist/chunks/{index.B_UZQ6qF.js → get-date-locale.BN8xEjY0.js} +855 -204
  106. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
  107. package/dist/chunks/{header.BMYhkrGT.js → header.Byd6jXl6.js} +104 -98
  108. package/dist/chunks/{header.BMYhkrGT.js.map → header.Byd6jXl6.js.map} +1 -1
  109. package/dist/chunks/{index.Z84QE0E2.js → index.CrhTVr5J.js} +2 -2
  110. package/dist/chunks/{index.Z84QE0E2.js.map → index.CrhTVr5J.js.map} +1 -1
  111. package/dist/chunks/{index.xqFSZOAb.js → index.DDnf1O9p.js} +2 -2
  112. package/dist/chunks/{index.xqFSZOAb.js.map → index.DDnf1O9p.js.map} +1 -1
  113. package/dist/chunks/{index.B_EJflcs.js → index.DPafeRJa.js} +2 -2
  114. package/dist/chunks/{index.B_EJflcs.js.map → index.DPafeRJa.js.map} +1 -1
  115. package/dist/chunks/{input-field.Dely7A8G.js → input-field.CgS1AEGu.js} +3 -3
  116. package/dist/chunks/{input-field.Dely7A8G.js.map → input-field.CgS1AEGu.js.map} +1 -1
  117. package/dist/chunks/{inspector.types.t2SPyhw3.js → inspector.types.xpv2J9pJ.js} +44 -36
  118. package/dist/chunks/{inspector.types.t2SPyhw3.js.map → inspector.types.xpv2J9pJ.js.map} +1 -1
  119. package/dist/chunks/loading-button.Bntgn6Lk.js +137 -0
  120. package/dist/chunks/loading-button.Bntgn6Lk.js.map +1 -0
  121. package/dist/chunks/{menu.CLicp_2I.js → menu.BN5WGXw3.js} +2 -2
  122. package/dist/chunks/{menu.CLicp_2I.js.map → menu.BN5WGXw3.js.map} +1 -1
  123. package/dist/chunks/{modal-fullscreen.Caqa7dDp.js → modal-fullscreen.zljoH4pr.js} +35 -29
  124. package/dist/chunks/{modal-fullscreen.Caqa7dDp.js.map → modal-fullscreen.zljoH4pr.js.map} +1 -1
  125. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js → modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js} +31 -25
  126. package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js.map +1 -0
  127. package/dist/chunks/{pagination.I5w8bpUS.js → pagination.BMn5ryDD.js} +2 -2
  128. package/dist/chunks/{pagination.I5w8bpUS.js.map → pagination.BMn5ryDD.js.map} +1 -1
  129. package/dist/chunks/{popover.DQP3ce2x.js → popover.pDk6zsak.js} +2 -2
  130. package/dist/chunks/{popover.DQP3ce2x.js.map → popover.pDk6zsak.js.map} +1 -1
  131. package/dist/chunks/{radio-group.lOSBHghv.js → radio-group.DUtoFXmr.js} +3 -3
  132. package/dist/chunks/{radio-group.lOSBHghv.js.map → radio-group.DUtoFXmr.js.map} +1 -1
  133. package/dist/chunks/{search-bar.GCRTgBUA.js → search-bar.poJCoGD-.js} +49 -41
  134. package/dist/chunks/{search-bar.GCRTgBUA.js.map → search-bar.poJCoGD-.js.map} +1 -1
  135. package/dist/chunks/{secondary-nav.CGH_6m7u.js → secondary-nav.Dyvd-YBg.js} +2 -2
  136. package/dist/chunks/{secondary-nav.CGH_6m7u.js.map → secondary-nav.Dyvd-YBg.js.map} +1 -1
  137. package/dist/chunks/{selection-card-group.BdTuPhEm.js → selection-card-group.CHBS81j6.js} +3 -3
  138. package/dist/chunks/{selection-card-group.BdTuPhEm.js.map → selection-card-group.CHBS81j6.js.map} +1 -1
  139. package/dist/chunks/{sidepanel.DA8nQepj.js → sidepanel.CuQCXV1E.js} +36 -30
  140. package/dist/chunks/{sidepanel.DA8nQepj.js.map → sidepanel.CuQCXV1E.js.map} +1 -1
  141. package/dist/chunks/{structured-list-item.Z-1ivOFu.js → structured-list-item.1A2sjhP4.js} +35 -29
  142. package/dist/chunks/{structured-list-item.Z-1ivOFu.js.map → structured-list-item.1A2sjhP4.js.map} +1 -1
  143. package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js → summary-grid-item-custom.CuvUVoQ8.js} +2 -2
  144. package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js.map → summary-grid-item-custom.CuvUVoQ8.js.map} +1 -1
  145. package/dist/chunks/{textarea.kYFGQFwd.js → textarea.CHnvON8G.js} +2 -2
  146. package/dist/chunks/{textarea.kYFGQFwd.js.map → textarea.CHnvON8G.js.map} +1 -1
  147. package/dist/chunks/{timeline-item.D-Yy2qQr.js → timeline-item.Dc_l5Xyy.js} +81 -75
  148. package/dist/chunks/{timeline-item.D-Yy2qQr.js.map → timeline-item.Dc_l5Xyy.js.map} +1 -1
  149. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js} +82 -70
  150. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js.map → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js.map} +1 -1
  151. package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js → use-cached-selected-values.CS3gHOyI.js} +86 -72
  152. package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js.map → use-cached-selected-values.CS3gHOyI.js.map} +1 -1
  153. package/dist/code-snippet.js +1 -1
  154. package/dist/currency.js +1 -1
  155. package/dist/dashboard-template.js +1 -1
  156. package/dist/dashed-underline.js +1 -1
  157. package/dist/data-grid-template.js +1 -1
  158. package/dist/data-grid.js +1 -1
  159. package/dist/date-picker.js +2 -2
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/date.js +1 -1
  162. package/dist/dropdown.js +3 -3
  163. package/dist/filter-bar.js +1 -1
  164. package/dist/form-layout.js +1 -1
  165. package/dist/header.js +1 -1
  166. package/dist/index.js +43 -43
  167. package/dist/input-field.js +1 -1
  168. package/dist/inspector.js +1 -1
  169. package/dist/internal.js +5 -5
  170. package/dist/menu.js +1 -1
  171. package/dist/modal-fullscreen.js +1 -1
  172. package/dist/modal.js +2 -2
  173. package/dist/pagination.js +1 -1
  174. package/dist/popover.js +1 -1
  175. package/dist/radio-group.js +1 -1
  176. package/dist/search-bar.js +2 -2
  177. package/dist/secondary-nav.js +1 -1
  178. package/dist/selection-card.js +1 -1
  179. package/dist/sidepanel.js +1 -1
  180. package/dist/structured-list.js +1 -1
  181. package/dist/styles/bento.css +3 -0
  182. package/dist/styles/legacy.css +3 -0
  183. package/dist/styles/styleguide.css +3 -0
  184. package/dist/summary-grid.js +1 -1
  185. package/dist/textarea.js +1 -1
  186. package/dist/timeline.js +1 -1
  187. package/dist/tutorial.js +1 -1
  188. package/dist/web-types.json +1 -1
  189. package/package.json +2 -2
  190. package/dist/chunks/accordion-item.CQ8DLt9l.js +0 -126
  191. package/dist/chunks/accordion-item.CQ8DLt9l.js.map +0 -1
  192. package/dist/chunks/avatar.mNlMngHQ.js.map +0 -1
  193. package/dist/chunks/calendar.D--sOCBT.js.map +0 -1
  194. package/dist/chunks/card.BvSoujBc.js.map +0 -1
  195. package/dist/chunks/code-snippet.BWM5w4CP.js.map +0 -1
  196. package/dist/chunks/date-picker.21z_Sw4V.js.map +0 -1
  197. package/dist/chunks/date-range-picker.K2TeW8aX.js.map +0 -1
  198. package/dist/chunks/dropdown.ex87AZ7s.js.map +0 -1
  199. package/dist/chunks/filter-bar.BAmG-yML.js.map +0 -1
  200. package/dist/chunks/index.B_UZQ6qF.js.map +0 -1
  201. package/dist/chunks/loading-button.Mx-oDIGy.js +0 -123
  202. package/dist/chunks/loading-button.Mx-oDIGy.js.map +0 -1
  203. package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"action-bar.DGQYYi8b.js","sources":["../../../vue2/src/components/action-bar/action-bar.vue"],"sourcesContent":["<template>\n <Transition name=\"b-action-bar__animation\" appear>\n <section class=\"b-action-bar\" :class=\"conditionalClasses\" :aria-label=\"t('actionBar')\">\n <div ref=\"actionBar\" class=\"b-action-bar__container\">\n <div v-if=\"!isConfirmationVariant\" class=\"b-action-bar__close-button\">\n <bento-button variant=\"tertiary\" inverse :aria-label=\"t('close')\" @click=\"emit('close')\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n <bento-typography el=\"span\" stronger class=\"b-action-bar__selection\">\n {{ itemCounter }} {{ isConfirmationVariant ? tc('unsavedChanges', itemCounter) : label }}\n </bento-typography>\n <bento-button-actions\n v-if=\"isConfirmationVariant\"\n :actions=\"confirmationActions\"\n class=\"b-action-bar__actions\"\n inverse\n />\n <button-actions-with-menu\n v-else\n :actions=\"actionsInternal\"\n class=\"b-action-bar__actions\"\n :displayed-actions=\"internalDisplayedActions\"\n menu-position=\"top-end\"\n inverse\n />\n </div>\n </section>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, PropType, provide, ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { type BentoActionBarVariant } from '@/components/action-bar/action-bar.types';\n import ButtonActionsWithMenu from '@/components/internal/button-actions-with-menu/button-actions-with-menu.vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { useWindowSize } from '@vueuse/core';\n\n import messages from './messages.json';\n import { POPOVER_OFFSET_INJECTION_KEY } from '@/components/popover/popover.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // Constants\n const AVERAGE_BUTTON_SIZE = 100;\n const MENU_OFFSET = 7;\n const RESPONSIVE_BREAKPOINT = 500;\n const SPACING = 32;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Required and used for the `default` variant.\n *\n * Each object in the list should have a `title`, an `event` and,\n * optionally, an `icon`.\n *\n * The component will display 4 actions and the hide the rest inside a menu.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: () => [],\n },\n /**\n * How many actions should be visible outside the menu, cannot be more than 4\n */\n visibleActions: {\n type: Number,\n default: 4,\n validator: (value: number) => value > 0 && value <= 4,\n },\n /**\n * Use when there are sticky elements at the bottom, like sticky pagination\n */\n extraBottomSpacing: {\n type: Boolean,\n default: false,\n },\n /**\n * Show how many items are selected\n */\n itemCounter: {\n type: Number,\n required: true,\n },\n /**\n * Label for the selection, e.g. 'selected'/'changed'\n */\n selectionLabel: {\n type: String,\n default: null,\n },\n /**\n * Variant for the action bar\n * @values default, confirmation\n */\n variant: {\n type: String as PropType<BentoActionBarVariant>,\n default: 'default',\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event emitted when the user click the close button\n */\n (e: 'close'): void;\n (e: 'cancel'): void;\n (e: 'save'): void;\n }>();\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n const label = computed(() => (props.selectionLabel ? props.selectionLabel : t('selected')));\n\n // Refs\n const actionBar = ref<HTMLDivElement>(null);\n const { extraBottomSpacing, visibleActions } = toRefs(props);\n const { width } = useWindowSize();\n const internalDisplayedActions = ref(null);\n const internalVisibleActions = ref(null);\n\n const isConfirmationVariant = computed(() => props.variant === 'confirmation');\n\n watch(\n () => visibleActions.value,\n value => {\n internalVisibleActions.value = value <= 4 ? value : 4;\n internalDisplayedActions.value = internalVisibleActions.value;\n },\n { immediate: true }\n );\n\n // Styling\n const conditionalClasses = computed(() => ({\n 'b-action-bar--extra-spacing': extraBottomSpacing.value,\n 'b-action-bar--confirmation': isConfirmationVariant.value,\n }));\n\n // Provide POPOVER_OFFSET_INJECTION_KEY to change the value of the popover offset\n provide(POPOVER_OFFSET_INJECTION_KEY, MENU_OFFSET);\n\n // Manipulate actions array to display as intended\n const actionsInternal = computed(() => {\n // All buttons should be of type secondary in the action bar\n const actions = props.actions.map(action => ({\n ...action,\n variant: 'secondary',\n })) as BentoButtonActionsList;\n // Shown actions should display from left to right in action bar, instead of right to left which is the button actions default\n const shownActions = actions.slice(0, internalDisplayedActions.value).reverse();\n const hiddenActions = actions.slice(internalDisplayedActions.value);\n\n return [...shownActions, ...hiddenActions];\n });\n\n const confirmationActions = computed<BentoButtonActionsList>(() => [\n {\n title: t('save'),\n event: () => emit('save'),\n },\n {\n title: t('cancel'),\n variant: 'secondary',\n event: () => emit('cancel'),\n },\n ]);\n\n // Recursive functions to determine how many actions should be visible/hidden based on the screens width\n const showActions = async () => {\n await nextTick();\n if (\n width.value > actionBar.value.clientWidth + SPACING + AVERAGE_BUTTON_SIZE &&\n internalDisplayedActions.value < internalVisibleActions.value\n ) {\n internalDisplayedActions.value += 1;\n showActions();\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n if (width.value < actionBar.value.clientWidth + SPACING && internalDisplayedActions.value > 0) {\n internalDisplayedActions.value -= 1;\n hideActions();\n }\n };\n\n // Screen width watcher to toggle hidden/visible actions\n watch(\n () => width.value,\n async (newValue, oldValue) => {\n await nextTick();\n if (!actionBar.value) {\n return;\n }\n const isIncreasing = newValue > oldValue;\n if (width.value < RESPONSIVE_BREAKPOINT) {\n internalDisplayedActions.value = 0;\n } else if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Action bar is a floating bar that provides users with quick access to key actions that can be applied to one or multiple items.\n *\n * @example\n * import { BentoActionBar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoActionBar },\n * template: `\n * <bento-action-bar\n * :actions='[\n * {\n * title: 'Delete',\n * critical: true,\n * icon: BinIcon,\n * event: () => true,\n * },\n * {\n * title: 'Edit',\n * icon: EditIcon,\n * event: () => true,\n * }\n * ]'\n * @close=\"closeAction\"\n * :item-counter=\"5\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./action-bar.scss\" />\n"],"names":["__default__","messages","props","__props","emit","__emit","t","tc","useI18n","label","computed","actionBar","ref","extraBottomSpacing","visibleActions","toRefs","width","useWindowSize","internalDisplayedActions","internalVisibleActions","isConfirmationVariant","watch","value","conditionalClasses","provide","POPOVER_OFFSET_INJECTION_KEY","actionsInternal","actions","action","shownActions","hiddenActions","confirmationActions","showActions","nextTick","hideActions","newValue","oldValue","isIncreasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;GAqPIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjMA,UAAAC,IAAAC,GAuDAC,IAAAC,GASA,EAAA,GAAAC,GAAA,IAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAP,EAAA,CAAA,GACAQ,IAAAC,EAAA,MAAAR,EAAA,iBAAAA,EAAA,iBAAAI,EAAA,UAAA,CAAA,GAGAK,IAAAC,EAAA,IAAA,GACA,EAAA,oBAAAC,GAAA,gBAAAC,EAAA,IAAAC,EAAAb,CAAA,GACA,EAAA,OAAAc,EAAA,IAAAC,EAAA,GACAC,IAAAN,EAAA,IAAA,GACAO,IAAAP,EAAA,IAAA,GAEAQ,IAAAV,EAAA,MAAAR,EAAA,YAAA,cAAA;AAEA,IAAAmB;AAAA,MAA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R,YADA,MAAAH,EAAA,GACA,CAAAtB,EAAA;AACI;AAEJ,cAAA0B,IAAAF,IAAAC;AACA,QAAApB,EAAA,QAAA,MACIE,EAAA,QAAA,IAAiCmB,IAEjCL,EAAA,IAEAE,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"action-bar.5XBrXwYv.js","sources":["../../../vue2/src/components/action-bar/action-bar.vue"],"sourcesContent":["<template>\n <Transition name=\"b-action-bar__animation\" appear>\n <section class=\"b-action-bar\" :class=\"conditionalClasses\" :aria-label=\"t('actionBar')\">\n <div ref=\"actionBar\" class=\"b-action-bar__container\">\n <div v-if=\"!isConfirmationVariant\" class=\"b-action-bar__close-button\">\n <bento-button variant=\"tertiary\" inverse :aria-label=\"t('close')\" @click=\"emit('close')\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n <bento-typography el=\"span\" stronger class=\"b-action-bar__selection\">\n {{ itemCounter }} {{ isConfirmationVariant ? tc('unsavedChanges', itemCounter) : label }}\n </bento-typography>\n <bento-button-actions\n v-if=\"isConfirmationVariant\"\n :actions=\"confirmationActions\"\n class=\"b-action-bar__actions\"\n inverse\n />\n <button-actions-with-menu\n v-else\n :actions=\"actionsInternal\"\n class=\"b-action-bar__actions\"\n :displayed-actions=\"internalDisplayedActions\"\n menu-position=\"top-end\"\n inverse\n />\n </div>\n </section>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, PropType, provide, ref, toRefs, watch } from 'vue';\n import { BentoButton, BentoButtonActions, BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { type BentoActionBarVariant } from '@/components/action-bar/action-bar.types';\n import ButtonActionsWithMenu from '@/components/internal/button-actions-with-menu/button-actions-with-menu.vue';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n\n import { useI18n } from '@/utils/ts/i18n';\n import { useWindowSize } from '@vueuse/core';\n\n import messages from './messages.json';\n import { POPOVER_OFFSET_INJECTION_KEY } from '@/components/popover/popover.keys';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // Constants\n const AVERAGE_BUTTON_SIZE = 100;\n const MENU_OFFSET = 7;\n const RESPONSIVE_BREAKPOINT = 500;\n const SPACING = 32;\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Required and used for the `default` variant.\n *\n * Each object in the list should have a `title`, an `event` and,\n * optionally, an `icon`.\n *\n * The component will display 4 actions and the hide the rest inside a menu.\n *\n * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: () => [],\n },\n /**\n * How many actions should be visible outside the menu, cannot be more than 4\n */\n visibleActions: {\n type: Number,\n default: 4,\n validator: (value: number) => value > 0 && value <= 4,\n },\n /**\n * Use when there are sticky elements at the bottom, like sticky pagination\n */\n extraBottomSpacing: {\n type: Boolean,\n default: false,\n },\n /**\n * Show how many items are selected\n */\n itemCounter: {\n type: Number,\n required: true,\n },\n /**\n * Label for the selection, e.g. 'selected'/'changed'\n */\n selectionLabel: {\n type: String,\n default: null,\n },\n /**\n * Variant for the action bar\n * @values default, confirmation\n */\n variant: {\n type: String as PropType<BentoActionBarVariant>,\n default: 'default',\n },\n });\n\n const emit = defineEmits<{\n /**\n * Event emitted when the user click the close button\n */\n (e: 'close'): void;\n (e: 'cancel'): void;\n (e: 'save'): void;\n }>();\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n const label = computed(() => (props.selectionLabel ? props.selectionLabel : t('selected')));\n\n // Refs\n const actionBar = ref<HTMLDivElement>(null);\n const { extraBottomSpacing, visibleActions } = toRefs(props);\n const { width } = useWindowSize();\n const internalDisplayedActions = ref(null);\n const internalVisibleActions = ref(null);\n\n const isConfirmationVariant = computed(() => props.variant === 'confirmation');\n\n watch(\n () => visibleActions.value,\n value => {\n internalVisibleActions.value = value <= 4 ? value : 4;\n internalDisplayedActions.value = internalVisibleActions.value;\n },\n { immediate: true }\n );\n\n // Styling\n const conditionalClasses = computed(() => ({\n 'b-action-bar--extra-spacing': extraBottomSpacing.value,\n 'b-action-bar--confirmation': isConfirmationVariant.value,\n }));\n\n // Provide POPOVER_OFFSET_INJECTION_KEY to change the value of the popover offset\n provide(POPOVER_OFFSET_INJECTION_KEY, MENU_OFFSET);\n\n // Manipulate actions array to display as intended\n const actionsInternal = computed(() => {\n // All buttons should be of type secondary in the action bar\n const actions = props.actions.map(action => ({\n ...action,\n variant: 'secondary',\n })) as BentoButtonActionsList;\n // Shown actions should display from left to right in action bar, instead of right to left which is the button actions default\n const shownActions = actions.slice(0, internalDisplayedActions.value).reverse();\n const hiddenActions = actions.slice(internalDisplayedActions.value);\n\n return [...shownActions, ...hiddenActions];\n });\n\n const confirmationActions = computed<BentoButtonActionsList>(() => [\n {\n title: t('save'),\n event: () => emit('save'),\n },\n {\n title: t('cancel'),\n variant: 'secondary',\n event: () => emit('cancel'),\n },\n ]);\n\n // Recursive functions to determine how many actions should be visible/hidden based on the screens width\n const showActions = async () => {\n await nextTick();\n if (\n width.value > actionBar.value.clientWidth + SPACING + AVERAGE_BUTTON_SIZE &&\n internalDisplayedActions.value < internalVisibleActions.value\n ) {\n internalDisplayedActions.value += 1;\n showActions();\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n if (width.value < actionBar.value.clientWidth + SPACING && internalDisplayedActions.value > 0) {\n internalDisplayedActions.value -= 1;\n hideActions();\n }\n };\n\n // Screen width watcher to toggle hidden/visible actions\n watch(\n () => width.value,\n async (newValue, oldValue) => {\n await nextTick();\n if (!actionBar.value) {\n return;\n }\n const isIncreasing = newValue > oldValue;\n if (width.value < RESPONSIVE_BREAKPOINT) {\n internalDisplayedActions.value = 0;\n } else if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * Action bar is a floating bar that provides users with quick access to key actions that can be applied to one or multiple items.\n *\n * @example\n * import { BentoActionBar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoActionBar },\n * template: `\n * <bento-action-bar\n * :actions='[\n * {\n * title: 'Delete',\n * critical: true,\n * icon: BinIcon,\n * event: () => true,\n * },\n * {\n * title: 'Edit',\n * icon: EditIcon,\n * event: () => true,\n * }\n * ]'\n * @close=\"closeAction\"\n * :item-counter=\"5\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./action-bar.scss\" />\n"],"names":["__default__","messages","props","__props","emit","__emit","t","tc","useI18n","label","computed","actionBar","ref","extraBottomSpacing","visibleActions","toRefs","width","useWindowSize","internalDisplayedActions","internalVisibleActions","isConfirmationVariant","watch","value","conditionalClasses","provide","POPOVER_OFFSET_INJECTION_KEY","actionsInternal","actions","action","shownActions","hiddenActions","confirmationActions","showActions","nextTick","hideActions","newValue","oldValue","isIncreasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqPIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjMA,UAAAC,IAAAC,GAuDAC,IAAAC,GASA,EAAA,GAAAC,GAAA,IAAAC,EAAA,IAAAC,EAAA,EAAA,UAAAP,EAAA,CAAA,GACAQ,IAAAC,EAAA,MAAAR,EAAA,iBAAAA,EAAA,iBAAAI,EAAA,UAAA,CAAA,GAGAK,IAAAC,EAAA,IAAA,GACA,EAAA,oBAAAC,GAAA,gBAAAC,EAAA,IAAAC,EAAAb,CAAA,GACA,EAAA,OAAAc,EAAA,IAAAC,EAAA,GACAC,IAAAN,EAAA,IAAA,GACAO,IAAAP,EAAA,IAAA,GAEAQ,IAAAV,EAAA,MAAAR,EAAA,YAAA,cAAA;AAE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mB,GAAAC,MAAA;AAGR,YADA,MAAAH,EAAA,GACA,CAAAtB,EAAA;AACI;AAEJ,cAAA0B,IAAAF,IAAAC;AACA,QAAApB,EAAA,QAAA,MACIE,EAAA,QAAA,IAAiCmB,IAEjCL,EAAA,IAEAE,EAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,21 +1,21 @@
1
- import { openBlock as o, createElementBlock as _, mergeProps as b, toDisplayString as V, createCommentVNode as c, createElementVNode as s, defineComponent as N, useSlots as A, computed as n, onMounted as R, normalizeClass as D, createBlock as C, resolveDynamicComponent as P, unref as e, withCtx as f, renderSlot as v, createVNode as U } from "vue";
1
+ import { openBlock as o, createElementBlock as _, mergeProps as b, toDisplayString as V, createCommentVNode as c, createElementVNode as s, defineComponent as N, useSlots as R, computed as n, onMounted as A, normalizeClass as P, createBlock as C, resolveDynamicComponent as D, unref as e, withCtx as f, renderSlot as v, createVNode as U } from "vue";
2
2
  import { c as W, a as I, B as y } from "./typography.z9P0Ec3Q.js";
3
- import { B as M } from "./button.Br6CyG40.js";
4
- import { C as F } from "./cross-small.CXWTuKA_.js";
3
+ import { B as F } from "./button.Br6CyG40.js";
4
+ import { C as M } from "./cross-small.CXWTuKA_.js";
5
5
  import { W as Z } from "./warning-filled.Dm_HhqzW.js";
6
- import { C as q } from "./cross-circle-fill.DN5b3_eL.js";
7
- import { C as z } from "./checkmark-circle-fill.ChV7Jy6r.js";
6
+ import { C as j } from "./cross-circle-fill.DN5b3_eL.js";
7
+ import { C as q } from "./checkmark-circle-fill.ChV7Jy6r.js";
8
8
  import { _ as S } from "./_plugin-vue_export-helper.CHgC5LLL.js";
9
- import { u as O } from "./use-has-slot.B7eQSabc.js";
10
- import { u as Y } from "./i18n.DL9GT2-k.js";
9
+ import { u as z } from "./use-has-slot.B7eQSabc.js";
10
+ import { u as J } from "./i18n.DL9GT2-k.js";
11
11
  import "../assets/alert.css";
12
12
  var m = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.TIP = "tip", t))(m || {}), i = /* @__PURE__ */ ((t) => (t.WARNING = "warning", t.CRITICAL = "critical", t.HIGHLIGHT = "highlight", t.SUCCESS = "success", t))(i || {}), T = /* @__PURE__ */ ((t) => (t.CLOSE_ALERT = "close-alert", t))(T || {});
13
13
  let H = 0;
14
- const j = {
14
+ const O = {
15
15
  beforeCreate() {
16
16
  this.uuid = H.toString(), H += 1;
17
17
  }
18
- }, J = { key: 0 }, K = ["clip-path"], Q = ["id"];
18
+ }, Y = { key: 0 }, K = ["clip-path"], Q = ["id"];
19
19
  function X(t, r, u, d, h, a) {
20
20
  return o(), _("svg", b({ role: "img" }, t.$attrs, {
21
21
  class: "ui-assets-icons-16",
@@ -24,7 +24,7 @@ function X(t, r, u, d, h, a) {
24
24
  height: "16",
25
25
  fill: "none"
26
26
  }), [
27
- t.$attrs["svg-title"] ? (o(), _("title", J, V(t.$attrs["svg-title"]), 1)) : c("", !0),
27
+ t.$attrs["svg-title"] ? (o(), _("title", Y, V(t.$attrs["svg-title"]), 1)) : c("", !0),
28
28
  s("g", {
29
29
  "clip-path": "url(#uia-icons-16-info_filled__a" + t.uuid + ")"
30
30
  }, r[0] || (r[0] = [
@@ -46,13 +46,19 @@ function X(t, r, u, d, h, a) {
46
46
  ])
47
47
  ], 16);
48
48
  }
49
- const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
49
+ const x = /* @__PURE__ */ S(O, [["render", X]]), $ = {
50
50
  "en-US": {
51
51
  highlightIcon: "Highlight icon",
52
52
  successIcon: "Success icon",
53
53
  criticalIcon: "Critical icon",
54
54
  warningIcon: "Warning icon",
55
55
  close: "Close"
56
+ },
57
+ "pt-BR": {
58
+ close: "Fechar"
59
+ },
60
+ "ja-JP": {
61
+ close: "閉じる"
56
62
  }
57
63
  }, tt = ["role"], et = { class: "b-alert__icon" }, ot = { class: "b-alert__content" }, st = {
58
64
  key: 2,
@@ -70,15 +76,15 @@ const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
70
76
  },
71
77
  emits: ["close-alert"],
72
78
  setup(t, { emit: r }) {
73
- const u = A(), d = O(u), h = r, a = t, { t: g } = Y({ messages: $ }), l = n(() => a.variant === m.TIP), w = n(() => ({
79
+ const u = R(), d = z(u), h = r, a = t, { t: g } = J({ messages: $ }), l = n(() => a.variant === m.TIP), w = n(() => ({
74
80
  [`b-alert--${a.type}`]: a.type,
75
81
  [`b-alert--${m.TIP}`]: l.value
76
82
  })), B = n(() => g(`${a.type}Icon`)), k = n(() => {
77
83
  switch (a.type) {
78
84
  case i.CRITICAL:
79
- return q;
85
+ return j;
80
86
  case i.SUCCESS:
81
- return z;
87
+ return q;
82
88
  case i.WARNING:
83
89
  return Z;
84
90
  case i.HIGHLIGHT:
@@ -92,7 +98,7 @@ const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
92
98
  })), L = n(() => a.type === i.HIGHLIGHT ? "status" : "alert"), G = () => {
93
99
  h(T.CLOSE_ALERT);
94
100
  };
95
- return R(() => {
101
+ return A(() => {
96
102
  if (!u.default && !u.description)
97
103
  throw new Error("Alert Component requires a title or a description");
98
104
  }), (p, rt) => (o(), _("div", {
@@ -100,10 +106,10 @@ const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
100
106
  role: L.value
101
107
  }, [
102
108
  s("div", {
103
- class: D(["b-alert__inner-container", w.value])
109
+ class: P(["b-alert__inner-container", w.value])
104
110
  }, [
105
111
  s("div", et, [
106
- (o(), C(P(k.value), {
112
+ (o(), C(D(k.value), {
107
113
  "aria-hidden": "true",
108
114
  "svg-title": B.value
109
115
  }, null, 8, ["svg-title"]))
@@ -135,7 +141,7 @@ const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
135
141
  v(p.$slots, "actions", {}, void 0, !0)
136
142
  ])) : c("", !0)
137
143
  ]),
138
- p.closeButton && !l.value ? (o(), C(e(M), {
144
+ p.closeButton && !l.value ? (o(), C(e(F), {
139
145
  key: 0,
140
146
  class: "b-alert__close-button",
141
147
  variant: "tertiary",
@@ -143,7 +149,7 @@ const x = /* @__PURE__ */ S(j, [["render", X]]), $ = {
143
149
  onClick: G
144
150
  }, {
145
151
  default: f(() => [
146
- U(e(F), {
152
+ U(e(M), {
147
153
  "svg-title": e(g)("close")
148
154
  }, null, 8, ["svg-title"])
149
155
  ]),
@@ -159,4 +165,4 @@ export {
159
165
  i as b,
160
166
  T as c
161
167
  };
162
- //# sourceMappingURL=alert.Bz4tNKDH.js.map
168
+ //# sourceMappingURL=alert.BvSx_Bi7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.Bz4tNKDH.js","sources":["../../../vue2/src/components/alert/alert.types.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/info-filled.vue","../../../vue2/src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\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><g :clip-path=\"'url(#uia-icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M5.0342 0.839937C6.45033 0.253358 8.00859 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM8.75 4.5C8.75 4.23478 8.64464 3.98043 8.45711 3.79289C8.26957 3.60536 8.01522 3.5 7.75 3.5C7.55222 3.5 7.35888 3.55865 7.19443 3.66853C7.02998 3.77841 6.90181 3.93459 6.82612 4.11732C6.75043 4.30004 6.73063 4.50111 6.76921 4.69509C6.8078 4.88907 6.90304 5.06725 7.04289 5.20711C7.18275 5.34696 7.36093 5.4422 7.55491 5.48079C7.74889 5.51937 7.94996 5.49957 8.13268 5.42388C8.31541 5.34819 8.47159 5.22002 8.58147 5.05557C8.69135 4.89112 8.75 4.69778 8.75 4.5ZM8.75 6.25H6.25V7.75H7.25V10.25H6.25V11.75H9.75V10.25H8.75V6.25Z\"/></g><defs><clipPath :id=\"'uia-icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></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","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","messages","slots","useSlots","hasSlot","useHasSlot","emit","__emit","props","__props","t","useI18n","isTipVariant","computed","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkIcon","WarningIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","onMounted"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;AChBR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;mBAVZC,IAAA,CAAA,WAAA,GAAAC,IAAA,CAAA,IAAA;;AAEI,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;gFAFzHC,EAAA,IAAA,EAAA;AAAA;MAE4M,aAAA,qCAAAD,EAAA,OAAA;AAAA;;QAAkE,MAAA;AAAA,QAAe,GAAA;AAAA;IAF7R,IAAA,GAAAL,CAAA;AAAA;;QAE8xC,IAAA,gCAAAK,EAAA;AAAA;;UAAgD,OAAA;AAAA,UAAW,QAAA;AAAA,UAAY,MAAA;AAAA;MAFr2C,IAAA,GAAAJ,CAAA;AAAA;;;;;;;;;;;;;;;GCqKIM,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAErB;;;;;;;;;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types.ts","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/info-filled.vue","../../../vue2/src/components/alert/alert.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertVariant {\n DEFAULT = 'default',\n TIP = 'tip',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoAlertTypeOption {\n WARNING = 'warning',\n CRITICAL = 'critical',\n HIGHLIGHT = 'highlight',\n SUCCESS = 'success',\n}\n\n/**\n * @deprecated from version 2.0.0. Use \"@close-alert\" instead.\n */\nexport enum BentoAlertEvent {\n CLOSE_ALERT = 'close-alert',\n}\n","\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><g :clip-path=\"'url(#uia-icons-16-info_filled__a' + uuid + ')'\"><path fill=\"#00112C\" d=\"M5.0342 0.839937C6.45033 0.253358 8.00859 0.0998821 9.51195 0.398918C11.0153 0.697953 12.3962 1.43607 13.4801 2.51993C14.5639 3.60378 15.3021 4.9847 15.6011 6.48805C15.9001 7.99141 15.7466 9.54967 15.1601 10.9658C14.5735 12.3819 13.5801 13.5923 12.3057 14.4439C11.0312 15.2955 9.53281 15.75 8 15.75C5.94457 15.75 3.97333 14.9335 2.51992 13.4801C1.06652 12.0267 0.25 10.0554 0.25 8C0.25 6.4672 0.704529 4.96881 1.55611 3.69433C2.40769 2.41985 3.61808 1.42652 5.0342 0.839937ZM8.75 4.5C8.75 4.23478 8.64464 3.98043 8.45711 3.79289C8.26957 3.60536 8.01522 3.5 7.75 3.5C7.55222 3.5 7.35888 3.55865 7.19443 3.66853C7.02998 3.77841 6.90181 3.93459 6.82612 4.11732C6.75043 4.30004 6.73063 4.50111 6.76921 4.69509C6.8078 4.88907 6.90304 5.06725 7.04289 5.20711C7.18275 5.34696 7.36093 5.4422 7.55491 5.48079C7.74889 5.51937 7.94996 5.49957 8.13268 5.42388C8.31541 5.34819 8.47159 5.22002 8.58147 5.05557C8.69135 4.89112 8.75 4.69778 8.75 4.5ZM8.75 6.25H6.25V7.75H7.25V10.25H6.25V11.75H9.75V10.25H8.75V6.25Z\"/></g><defs><clipPath :id=\"'uia-icons-16-info_filled__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></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","<template>\n <div class=\"b-alert\" :role=\"computedRole\">\n <div class=\"b-alert__inner-container\" :class=\"alertConditionalClasses\">\n <div class=\"b-alert__icon\">\n <component :is=\"iconComponent\" aria-hidden=\"true\" :svg-title=\"iconSvgTitle\" />\n </div>\n\n <div class=\"b-alert__content\">\n <bento-typography\n v-if=\"hasSlot('default') && !isTipVariant\"\n class=\"b-alert__title\"\n el=\"div\"\n variant=\"body\"\n strongest\n wide\n >\n <slot />\n </bento-typography>\n\n <bento-typography\n v-if=\"hasSlot('description')\"\n class=\"b-alert__description\"\n v-bind=\"descriptionTypography\"\n data-testid=\"alert-description\"\n >\n <slot name=\"description\" />\n </bento-typography>\n\n <div v-if=\"hasSlot('actions') && !isTipVariant\" class=\"b-alert__actions\" data-testid=\"alert-actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <bento-button\n v-if=\"closeButton && !isTipVariant\"\n class=\"b-alert__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"onCloseButtonClick\"\n >\n <cross-small :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n\n // Component\n import { BentoAlertEvent, BentoAlertTypeOption, BentoAlertVariant } from '@/components/alert/alert.types';\n import { BentoTypography, BentoTypographyElement, BentoTypographyVariant } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n\n import CrossSmall from '@adyen/ui-assets-icons-16/vue/cross-small';\n import Warning from '@adyen/ui-assets-icons-16/vue/warning-filled';\n import CrossCircle from '@adyen/ui-assets-icons-16/vue/cross-circle-fill';\n import CheckedCircle from '@adyen/ui-assets-icons-16/vue/checkmark-circle-fill';\n import Info from '@adyen/ui-assets-icons-16/vue/info-filled';\n\n // Utils\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits event when the alert is closed. `closeButton` must be `true`\n */\n (e: 'close-alert');\n }>();\n\n const props = withDefaults(\n defineProps<{\n /**\n * Adds a close button on the right side of the alert\n */\n closeButton?: boolean;\n\n /**\n * Type of a alert; set a distinctive icon and color. Defaults to highlight.\n * @values HIGHLIGHT, SUCCESS, CRITICAL, WARNING\n */\n type?: BentoAlertTypeOption | `${BentoAlertTypeOption}`;\n\n /**\n * Variant for the alert\n * @values DEFAULT, TIP\n */\n variant?: BentoAlertVariant | `${BentoAlertVariant}`;\n }>(),\n {\n closeButton: false,\n type: BentoAlertTypeOption.HIGHLIGHT,\n variant: BentoAlertVariant.DEFAULT,\n }\n );\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isTipVariant = computed(() => props.variant === BentoAlertVariant.TIP);\n\n const alertConditionalClasses = computed(() => ({\n [`b-alert--${props.type}`]: props.type,\n [`b-alert--${BentoAlertVariant.TIP}`]: isTipVariant.value,\n }));\n\n const iconSvgTitle = computed(() => t(`${props.type}Icon`));\n\n const iconComponent = computed(() => {\n switch (props.type) {\n case BentoAlertTypeOption.CRITICAL:\n return CrossCircle;\n case BentoAlertTypeOption.SUCCESS:\n return CheckedCircle;\n case BentoAlertTypeOption.WARNING:\n return Warning;\n case BentoAlertTypeOption.HIGHLIGHT:\n default:\n return Info;\n }\n });\n\n const descriptionTypography = computed(() => ({\n el: BentoTypographyElement.DIV,\n variant: isTipVariant.value ? BentoTypographyVariant.CAPTION : BentoTypographyVariant.BODY,\n wide: true,\n }));\n\n const computedRole = computed(() => (props.type === BentoAlertTypeOption.HIGHLIGHT ? 'status' : 'alert'));\n\n const onCloseButtonClick = () => {\n emit(BentoAlertEvent.CLOSE_ALERT);\n };\n\n onMounted(() => {\n if (!slots.default && !slots.description) {\n throw new Error('Alert Component requires a title or a description');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * An Alert component is used to display a persistent\n * notification containing information important to the user\n *\n * @example\n * import { BentoAlert, BentoAlertTypeOption } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAlert },\n * template: `\n * <bento-alert type=\"highlight\">\n * Title of the Alert\n * </bento-alert>\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-alert',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./alert.scss\" />\n"],"names":["BentoAlertVariant","BentoAlertVariant2","BentoAlertTypeOption","BentoAlertTypeOption2","BentoAlertEvent","BentoAlertEvent2","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__","messages","slots","useSlots","hasSlot","useHasSlot","emit","__emit","props","__props","t","useI18n","isTipVariant","computed","alertConditionalClasses","iconSvgTitle","iconComponent","CrossCircleFillIcon","CheckmarkIcon","WarningIcon","Info","descriptionTypography","BentoTypographyElement","BentoTypographyVariant","computedRole","onCloseButtonClick","onMounted"],"mappings":";;;;;;;;;;;AAGY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WA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AAAL,EAAA,MAAA;AAAA,QAAoB,KAAApB,EAAA;AAEZ,iBAAA6B;AAAA,QAAO,KAAA7B,EAAA;AAEP,iBAAA8B;AAAA,QAAO,KAAA9B,EAAA;AAEP,iBAAA+B;AAAA,QAAO,KAAA/B,EAAA;AAAA,QACe;AAEtB,iBAAAgC;AAAA,MAAO;AAAA,IACf,CAAA,GAGJC,IAAAR,EAAA,OAAA;AAAA,MAA8C,IAAAS,EAAA;AAAA,MACf,SAAAV,EAAA,QAAAW,EAAA,UAAAA,EAAA;AAAA,MAC2D,MAAA;AAAA,IAChF,EAAA,GAGVC,IAAAX,EAAA,MAAAL,EAAA,SAAApB,EAAA,YAAA,WAAA,OAAA,GAEAqC,IAAA,MAAA;AACI,MAAAnB,EAAAhB,EAAA,WAAA;AAAA,IAAgC;AAGpC,WAAAoC,EAAA,MAAA;AACI,UAAA,CAAAxB,EAAA,WAAA,CAAAA,EAAA;AACI,cAAA,IAAA,MAAA,mDAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
@@ -2,11 +2,11 @@ import { ref as k, computed as r, defineComponent as _, toRefs as f, openBlock a
2
2
  import { B as E } from "./typography.z9P0Ec3Q.js";
3
3
  import { _ as g } from "./_plugin-vue_export-helper.CHgC5LLL.js";
4
4
  import "../assets/avatar.css";
5
- const O = (e) => {
6
- const a = k(e);
7
- return r(() => a.value ? a.value.trim().charAt(0).toUpperCase() : null);
5
+ const O = (a) => {
6
+ const e = k(a);
7
+ return r(() => e.value ? e.value.trim().charAt(0).toUpperCase() : null);
8
8
  };
9
- var o = /* @__PURE__ */ ((e) => (e.LARGE = "large", e.SMALL = "small", e))(o || {}), t = /* @__PURE__ */ ((e) => (e.BLUE = "blue", e.GREEN = "green", e.RED = "red", e.YELLOW = "yellow", e))(t || {});
9
+ var o = /* @__PURE__ */ ((a) => (a.LARGE = "large", a.SMALL = "small", a))(o || {}), t = /* @__PURE__ */ ((a) => (a.BLUE = "blue", a.GREEN = "green", a.RED = "red", a.YELLOW = "yellow", a))(t || {});
10
10
  const N = ["src"], U = {
11
11
  key: 1,
12
12
  class: "b-avatar-image__default",
@@ -20,10 +20,10 @@ const N = ["src"], U = {
20
20
  username: { default: null },
21
21
  variant: { default: o.LARGE }
22
22
  },
23
- setup(e) {
24
- const a = e, { username: c } = f(a), d = O(c), m = r(() => ({
25
- [`b-avatar-image--${o.SMALL}`]: a.variant === o.SMALL,
26
- [`b-avatar-image--${a.color}`]: a.color
23
+ setup(a) {
24
+ const e = a, { username: c } = f(e), d = O(c), m = r(() => ({
25
+ [`b-avatar-image--${o.SMALL}`]: e.variant === o.SMALL,
26
+ [`b-avatar-image--${e.color}`]: e.color
27
27
  }));
28
28
  return (s, u) => (l(), i("div", {
29
29
  class: R(["b-avatar-image", m.value]),
@@ -34,7 +34,7 @@ const N = ["src"], U = {
34
34
  key: 0,
35
35
  src: s.src,
36
36
  class: "b-avatar-image__image",
37
- alt: "Profile picture",
37
+ alt: "",
38
38
  "data-testid": "avatar-content"
39
39
  }, null, 8, N)) : (l(), i("div", U, [
40
40
  b(n(E), {
@@ -50,7 +50,7 @@ const N = ["src"], U = {
50
50
  ]))
51
51
  ], 2));
52
52
  }
53
- }), M = /* @__PURE__ */ g(G, [["__scopeId", "data-v-8ae7e8da"]]), D = ["aria-label"], W = {
53
+ }), M = /* @__PURE__ */ g(G, [["__scopeId", "data-v-32750732"]]), D = ["aria-label"], W = {
54
54
  name: "bento-avatar"
55
55
  }, Y = /* @__PURE__ */ _({
56
56
  ...W,
@@ -59,8 +59,8 @@ const N = ["src"], U = {
59
59
  src: { default: null },
60
60
  username: {}
61
61
  },
62
- setup(e) {
63
- const a = e, { username: c } = f(a), d = r(() => a.iconOnly ? a.username : null), m = r(() => a.src ? null : a.username), s = O(c), u = r(() => s.value ? s.value.charCodeAt(0) - 65 : null), A = r(() => {
62
+ setup(a) {
63
+ const e = a, { username: c } = f(e), d = r(() => e.iconOnly ? e.username : null), m = r(() => e.src ? null : e.username), s = O(c), u = r(() => s.value ? s.value.charCodeAt(0) - 65 : null), A = r(() => {
64
64
  const v = 26 / Object.keys(t).length;
65
65
  return u.value <= v ? t.YELLOW : u.value <= v * 2 ? t.BLUE : u.value <= v * 3 ? t.GREEN : t.RED;
66
66
  });
@@ -91,4 +91,4 @@ const N = ["src"], U = {
91
91
  export {
92
92
  V as B
93
93
  };
94
- //# sourceMappingURL=avatar.mNlMngHQ.js.map
94
+ //# sourceMappingURL=avatar.8erKxh8t.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.8erKxh8t.js","sources":["../../../vue2/src/composables/initials.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.types.ts","../../../vue2/src/components/avatar/components/avatar-image/avatar-image.vue","../../../vue2/src/components/avatar/avatar.vue"],"sourcesContent":["import { computed, ComputedRef, ref } from 'vue';\nimport { MaybeRef } from '@/types';\n\n/** Extracts the first letter of a username\n * @param username - The name to return the initials of\n * Common patterns:\n * 1. John => J\n * 2. John Smith => J\n * John Smith Doe Holly => J\n */\nexport const useInitials = (username: MaybeRef<string | null>): ComputedRef<string | null> => {\n const computedUsername = ref(username);\n return computed(() => (computedUsername.value ? computedUsername.value.trim().charAt(0).toUpperCase() : null));\n};\n","export enum BentoAvatarImageVariant {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport enum BentoAvatarImageColor {\n BLUE = 'blue',\n GREEN = 'green',\n RED = 'red',\n YELLOW = 'yellow',\n}\n","<template>\n <div class=\"b-avatar-image\" :class=\"conditionalClasses\" aria-hidden=\"true\" data-testid=\"avatar\">\n <img v-if=\"src\" :src=\"src\" class=\"b-avatar-image__image\" alt=\"\" data-testid=\"avatar-content\" />\n <div v-else class=\"b-avatar-image__default\" data-testid=\"avatar-content\">\n <bento-typography el=\"span\" variant=\"body\" strongest>\n {{ initials }}\n </bento-typography>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { BentoAvatarImageColor, BentoAvatarImageVariant } from './avatar-image.types';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Avatar color. Defaults to yellow.\n */\n color?: BentoAvatarImageColor;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username?: string;\n\n /**\n * Variants supported for small and large.\n * Default - large\n */\n variant?: BentoAvatarImageVariant;\n }>(),\n {\n color: BentoAvatarImageColor.YELLOW,\n src: null,\n username: null,\n variant: BentoAvatarImageVariant.LARGE,\n }\n );\n\n const { username } = toRefs(props);\n const initials = useInitials(username);\n\n const conditionalClasses = computed(() => ({\n [`b-avatar-image--${BentoAvatarImageVariant.SMALL}`]: props.variant === BentoAvatarImageVariant.SMALL,\n [`b-avatar-image--${props.color}`]: props.color,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Image used as user profile inside bento-avatar.\n *\n * @example\n * import { AvatarImage } from './components/avatar-image';\n *\n * export default {\n * components: { AvatarImage },\n * template: `<avatar-image :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar-image.scss\" />\n","<template>\n <div class=\"b-avatar\" :aria-label=\"computedAriaLabel\">\n <avatar-image\n :src=\"src\"\n :username=\"computedUsername\"\n :variant=\"BentoAvatarImageVariant.SMALL\"\n :color=\"avatarColor\"\n />\n <bento-typography v-if=\"!iconOnly\" class=\"b-avatar__label\" el=\"span\" variant=\"body\">\n {{ username }}\n </bento-typography>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRefs } from 'vue';\n import { AvatarImage, BentoAvatarImageColor, BentoAvatarImageVariant } from './components/avatar-image';\n import { BentoTypography } from '@/components/typography';\n import { useInitials } from '@/composables';\n\n const props = withDefaults(\n defineProps<{\n /**\n * Displays the user profile without the label.\n */\n iconOnly?: boolean;\n\n /**\n * Image src to load the profile picture.\n */\n src?: string;\n\n /**\n * Name of the user that will be used both in the label and to extract initials to display default value.\n * John => J\n * John Smith => JS\n * John Smith Doe => JD\n * John Smith Doe Holly => JH\n */\n username: string;\n }>(),\n {\n iconOnly: false,\n src: null,\n }\n );\n\n const { username } = toRefs(props);\n\n const computedAriaLabel = computed(() => (props.iconOnly ? props.username : null));\n const computedUsername = computed(() => (!props.src ? props.username : null));\n const initials = useInitials(username);\n\n // Returns the UTF-16 char code\n const charCode = computed(() => (initials.value ? initials.value.charCodeAt(0) - 65 : null));\n\n // Returns a computed color based on the letter passed\n const avatarColor = computed(() => {\n const numberOfAlphabetLetters = 26;\n const numberOfColors = Object.keys(BentoAvatarImageColor).length;\n const rangeStep = numberOfAlphabetLetters / numberOfColors;\n\n if (charCode.value <= rangeStep) {\n return BentoAvatarImageColor.YELLOW;\n }\n if (charCode.value <= rangeStep * 2) {\n return BentoAvatarImageColor.BLUE;\n }\n if (charCode.value <= rangeStep * 3) {\n return BentoAvatarImageColor.GREEN;\n }\n return BentoAvatarImageColor.RED;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Displays an user profile including an avatar and optionally a label.\n *\n * @example\n * import { BentoAvatar } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAvatar },\n * template: `<bento-avatar :src=\"userAvatarSrc\" username=\"Jane\" />`\n * }\n */\n export default {\n name: 'bento-avatar',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./avatar.scss\" />\n"],"names":["useInitials","username","computedUsername","ref","computed","BentoAvatarImageVariant","BentoAvatarImageVariant2","BentoAvatarImageColor","BentoAvatarImageColor2","__default__$1","props","__props","toRefs","initials","conditionalClasses","__default__","computedAriaLabel","charCode","avatarColor","rangeStep"],"mappings":";;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAAC,IAAAC,EAAAF,CAAA;AACA,S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;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
1
- import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, openBlock as A, createBlock as S, normalizeClass as q, createSlots as te, withCtx as l, createElementVNode as h, normalizeStyle as O, unref as t, renderSlot as c, createCommentVNode as w, createVNode as J, useAttrs as ge, onMounted as ve, provide as G, toRefs as fe, createElementBlock as pe, withKeys as ye, withDirectives as _e } from "vue";
1
+ import { defineComponent as $, useSlots as ee, ref as g, computed as d, inject as ce, watch as Y, nextTick as re, onUnmounted as me, openBlock as A, createBlock as S, normalizeClass as J, createSlots as te, withCtx as l, createElementVNode as L, normalizeStyle as O, unref as t, renderSlot as c, createCommentVNode as w, createVNode as q, useAttrs as ge, onMounted as ve, provide as G, toRefs as fe, createElementBlock as pe, withKeys as ye, withDirectives as _e } from "vue";
2
2
  import { B as be } from "./button.Br6CyG40.js";
3
- import { B as Le } from "./focus-trap.CwkbHfT8.js";
3
+ import { B as he } from "./focus-trap.CwkbHfT8.js";
4
4
  import { u as ae } from "./use-has-slot.B7eQSabc.js";
5
- import { u as he } from "./i18n.DL9GT2-k.js";
5
+ import { u as Le } from "./i18n.DL9GT2-k.js";
6
6
  import { M as Ae } from "./base-modal.keys.C2PQXcE2.js";
7
7
  import { g as Ce } from "./unique-id.XFfoKuc2.js";
8
8
  import { B as Ee } from "./directive.O3yEdalv.js";
9
9
  import { B as Z } from "./typography.z9P0Ec3Q.js";
10
- import { F as Ie } from "./footer-actions.gtxofUAa.js";
10
+ import { F as Ie } from "./footer-actions.CyoMN_ca.js";
11
11
  import { D as Oe, B as Se, b as Pe, a as De } from "./dialog-page.DALFn9KR.js";
12
12
  import { o as ke } from "./resize.Bqks3WUm.js";
13
13
  import { G as Be, a as Te } from "./grid-layout.CqLbbEzI.js";
@@ -19,6 +19,12 @@ const ne = {
19
19
  "en-US": {
20
20
  ariaLabelFallback: "modal",
21
21
  close: "Close"
22
+ },
23
+ "pt-BR": {
24
+ close: "Fechar"
25
+ },
26
+ "ja-JP": {
27
+ close: "閉じる"
22
28
  }
23
29
  }, se = Symbol("modal config data injection key"), Me = { class: "b-modal-page__header" }, ze = {
24
30
  "aria-label": "modal actions",
@@ -136,12 +142,12 @@ const ne = {
136
142
  { small: 6, medium: 6, large: 6 },
137
143
  { small: 6, medium: 6, large: 6 }
138
144
  ]), { activePage: b, height: o, isAnimationActive: P, pageCustomPadding: C, showCloseButton: F, size: U } = ce(se), K = d(() => b.value === n.pageId || !b.value);
139
- let L = null;
145
+ let h = null;
140
146
  return Y(
141
147
  () => b.value,
142
148
  async (s, r) => {
143
149
  var m, v;
144
- K.value && (await re(), o.value = `${(v = (m = p.value) == null ? void 0 : m.$el) == null ? void 0 : v.clientHeight}px`, C.value = n.customPadding, P.value = r !== void 0, L = ke(p.value, () => {
150
+ K.value && (await re(), o.value = `${(v = (m = p.value) == null ? void 0 : m.$el) == null ? void 0 : v.clientHeight}px`, C.value = n.customPadding, P.value = r !== void 0, h = ke(p.value, () => {
145
151
  var T, E;
146
152
  const D = `${(E = (T = p.value) == null ? void 0 : T.$el) == null ? void 0 : E.clientHeight}px`;
147
153
  D && D !== o.value && (o.value = D);
@@ -149,13 +155,13 @@ const ne = {
149
155
  },
150
156
  { immediate: !0 }
151
157
  ), me(() => {
152
- L == null || L.disconnect();
158
+ h == null || h.disconnect();
153
159
  }), (s, r) => {
154
160
  var m;
155
161
  return A(), S(Oe, {
156
162
  ref_key: "page",
157
163
  ref: p,
158
- class: q(["b-modal-page", z.value]),
164
+ class: J(["b-modal-page", z.value]),
159
165
  "page-id": e.pageId,
160
166
  "always-show-border": _.value,
161
167
  "back-button-styling": (m = i.value) == null ? void 0 : m.backButton,
@@ -163,8 +169,8 @@ const ne = {
163
169
  onAnimationend: r[0] || (r[0] = (v) => P.value = !1)
164
170
  }, te({
165
171
  content: l(() => [
166
- h("div", {
167
- class: q(["b-modal-page__content", y.value]),
172
+ L("div", {
173
+ class: J(["b-modal-page__content", y.value]),
168
174
  style: O(i.value.content)
169
175
  }, [
170
176
  t(u)("content") || t(u)("content-col-1") && t(u)("content-col-2") ? (A(), S(t(Z), {
@@ -197,12 +203,12 @@ const ne = {
197
203
  t(u)("default") || t(F) ? {
198
204
  name: "header",
199
205
  fn: l(() => [
200
- h("div", {
206
+ L("div", {
201
207
  class: "b-modal-page__header-container",
202
208
  style: O(i.value.header)
203
209
  }, [
204
- h("div", Me, [
205
- J(t(Z), {
210
+ L("div", Me, [
211
+ q(t(Z), {
206
212
  class: "b-modal-page__title",
207
213
  "aria-label": "base modal title",
208
214
  el: "span",
@@ -222,11 +228,11 @@ const ne = {
222
228
  t(u)("actions") ? {
223
229
  name: "footer",
224
230
  fn: l(() => [
225
- h("div", {
231
+ L("div", {
226
232
  class: "b-modal-page__actions-container",
227
233
  style: O(i.value.actions)
228
234
  }, [
229
- h("div", ze, [
235
+ L("div", ze, [
230
236
  c(s.$slots, "actions", {}, void 0, !0)
231
237
  ])
232
238
  ], 4)
@@ -235,11 +241,11 @@ const ne = {
235
241
  } : e.actions && e.actions.length > 0 ? {
236
242
  name: "footer",
237
243
  fn: l(() => [
238
- h("div", {
244
+ L("div", {
239
245
  class: "b-modal-page__actions-container",
240
246
  style: O(i.value.actions)
241
247
  }, [
242
- J(t(Ie), {
248
+ q(t(Ie), {
243
249
  actions: e.actions,
244
250
  "actions-label": e.actionsLabel,
245
251
  "destructive-actions": e.destructiveActions
@@ -251,11 +257,11 @@ const ne = {
251
257
  ]), 1032, ["class", "page-id", "always-show-border", "back-button-styling", "previous-page"]);
252
258
  };
253
259
  }
254
- }), Ke = /* @__PURE__ */ oe(Ue, [["__scopeId", "data-v-914a0ef3"]]), He = { class: "b-modal-base" }, Ye = ["role", "aria-label", "open"], qe = $({
260
+ }), Ke = /* @__PURE__ */ oe(Ue, [["__scopeId", "data-v-914a0ef3"]]), He = { class: "b-modal-base" }, Ye = ["role", "aria-label", "open"], Je = $({
255
261
  i18n: { messages: ne },
256
262
  name: "base-modal"
257
- }), Je = /* @__PURE__ */ $({
258
- ...qe,
263
+ }), qe = /* @__PURE__ */ $({
264
+ ...Je,
259
265
  props: {
260
266
  /**
261
267
  * List of actions that will be used to render the buttons.
@@ -346,7 +352,7 @@ const ne = {
346
352
  },
347
353
  emits: ["update:active-page", "close-modal"],
348
354
  setup(e, { expose: j, emit: M }) {
349
- const { t: p } = he({ messages: ne }), n = ee(), z = ge(), y = ae(n), i = g(null), _ = g(!1), B = Ce("modal"), b = M, o = e, P = d(() => o.isDismissible && !o.hideCloseButton), C = g(o.customPadding), F = d(() => C.value ? { top: C.value, right: C.value } : {}), U = d(() => z["aria-label"] ?? p("ariaLabelFallback")), K = d(() => o.withColumnLayout && o.size === R.LARGE), L = () => {
355
+ const { t: p } = Le({ messages: ne }), n = ee(), z = ge(), y = ae(n), i = g(null), _ = g(!1), B = Ce("modal"), b = M, o = e, P = d(() => o.isDismissible && !o.hideCloseButton), C = g(o.customPadding), F = d(() => C.value ? { top: C.value, right: C.value } : {}), U = d(() => z["aria-label"] ?? p("ariaLabelFallback")), K = d(() => o.withColumnLayout && o.size === R.LARGE), h = () => {
350
356
  i.value.showModal();
351
357
  }, s = () => {
352
358
  b("close-modal");
@@ -369,7 +375,7 @@ const ne = {
369
375
  ([a, f], [, H]) => {
370
376
  if (!f)
371
377
  return;
372
- a ? (L(), I.value.length || I.value.push(E.value)) : !H || m();
378
+ a ? (h(), I.value.length || I.value.push(E.value)) : !H || m();
373
379
  }
374
380
  ), Y(
375
381
  () => o.actions,
@@ -379,7 +385,7 @@ const ne = {
379
385
  },
380
386
  { deep: !0 }
381
387
  ), ve(() => {
382
- o.isOpen && i.value && L();
388
+ o.isOpen && i.value && h();
383
389
  }), j({
384
390
  internalModalActionClose: v
385
391
  }), G(Ae, B);
@@ -402,18 +408,18 @@ const ne = {
402
408
  previousPages: I,
403
409
  updatePage: ie
404
410
  }), G(De, de), (a, f) => (A(), pe("div", He, [
405
- h("dialog", {
411
+ L("dialog", {
406
412
  ref_key: "modal",
407
413
  ref: i,
408
414
  role: e.modalRole,
409
415
  "aria-label": U.value,
410
416
  style: O({ height: V.value }),
411
- class: q(["b-modal-base__container", T.value]),
417
+ class: J(["b-modal-base__container", T.value]),
412
418
  open: e.initiallyOpen,
413
419
  onAnimationend: r,
414
420
  onKeydown: ye(v, ["esc"])
415
421
  }, [
416
- t(x) || e.initiallyOpen ? _e((A(), S(t(Le), {
422
+ t(x) || e.initiallyOpen ? _e((A(), S(t(he), {
417
423
  key: 0,
418
424
  id: t(B)
419
425
  }, {
@@ -427,7 +433,7 @@ const ne = {
427
433
  onClick: v
428
434
  }, {
429
435
  default: l(() => [
430
- J(t(Ne), {
436
+ q(t(Ne), {
431
437
  "svg-title": t(p)("close")
432
438
  }, null, 8, ["svg-title"])
433
439
  ]),
@@ -484,7 +490,7 @@ const ne = {
484
490
  ], 46, Ye)
485
491
  ]));
486
492
  }
487
- }), dt = /* @__PURE__ */ oe(Je, [["__scopeId", "data-v-e1e1730f"]]);
493
+ }), dt = /* @__PURE__ */ oe(qe, [["__scopeId", "data-v-e1e1730f"]]);
488
494
  export {
489
495
  Ke as B,
490
496
  Ge as a,
@@ -496,4 +502,4 @@ export {
496
502
  $e as g,
497
503
  dt as h
498
504
  };
499
- //# sourceMappingURL=base-modal.Bl7DBkt0.js.map
505
+ //# sourceMappingURL=base-modal.BenvK-Np.js.map