@adyen/bento-vue2 1.43.0 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/@types/index.d.ts +101 -53
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/button-actions.css +1 -1
  8. package/dist/assets/card.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/dialog-page.css +1 -1
  11. package/dist/assets/dropdown-default-textbox.css +1 -1
  12. package/dist/assets/dropdown.css +1 -1
  13. package/dist/assets/file-uploader.css +1 -1
  14. package/dist/assets/header.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/popover.css +1 -1
  19. package/dist/assets/selection-card-group.css +1 -1
  20. package/dist/assets/sidepanel.css +1 -1
  21. package/dist/assets/textarea.css +1 -1
  22. package/dist/button.js +7 -8
  23. package/dist/button.js.map +1 -1
  24. package/dist/card.js +1 -1
  25. package/dist/chunks/{action-bar.kPPYSgQK.js → action-bar.Dx12xlEW.js} +15 -15
  26. package/dist/chunks/action-bar.Dx12xlEW.js.map +1 -0
  27. package/dist/chunks/{base-modal.DroVbSCn.js → base-modal.BrqNR-ah.js} +2 -2
  28. package/dist/chunks/{base-modal.DroVbSCn.js.map → base-modal.BrqNR-ah.js.map} +1 -1
  29. package/dist/chunks/{button-actions-with-menu.dp6C-PKX.js → button-actions-with-menu.ptKgeQEb.js} +38 -29
  30. package/dist/chunks/button-actions-with-menu.ptKgeQEb.js.map +1 -0
  31. package/dist/chunks/button-actions.BIQ3qA8q.js +252 -0
  32. package/dist/chunks/button-actions.BIQ3qA8q.js.map +1 -0
  33. package/dist/chunks/{card.BcjxzwZV.js → card.D9g7fZDX.js} +2 -2
  34. package/dist/chunks/{card.BcjxzwZV.js.map → card.D9g7fZDX.js.map} +1 -1
  35. package/dist/chunks/{code-snippet.DuZDA7gH.js → code-snippet.rmKiWrIv.js} +4 -4
  36. package/dist/chunks/{code-snippet.DuZDA7gH.js.map → code-snippet.rmKiWrIv.js.map} +1 -1
  37. package/dist/chunks/{dashboard-section.CExqPbQb.js → dashboard-section._KVy37B0.js} +2 -2
  38. package/dist/chunks/{dashboard-section.CExqPbQb.js.map → dashboard-section._KVy37B0.js.map} +1 -1
  39. package/dist/chunks/{dashed-underline.dGO33Q_E.js → dashed-underline.DX5QlK14.js} +2 -2
  40. package/dist/chunks/{dashed-underline.dGO33Q_E.js.map → dashed-underline.DX5QlK14.js.map} +1 -1
  41. package/dist/chunks/{data-grid-template.BF7JMfoJ.js → data-grid-template.BgTUIoak.js} +2 -2
  42. package/dist/chunks/{data-grid-template.BF7JMfoJ.js.map → data-grid-template.BgTUIoak.js.map} +1 -1
  43. package/dist/chunks/{data-grid.BXB98JQr.js → data-grid.sAbzCVND.js} +9 -9
  44. package/dist/chunks/{data-grid.BXB98JQr.js.map → data-grid.sAbzCVND.js.map} +1 -1
  45. package/dist/chunks/{date-picker.Dfg1_eo6.js → date-picker.DrSWxADA.js} +3 -3
  46. package/dist/chunks/{date-picker.Dfg1_eo6.js.map → date-picker.DrSWxADA.js.map} +1 -1
  47. package/dist/chunks/{date-range-picker.xYGf0SRg.js → date-range-picker.CFIOD59O.js} +6 -6
  48. package/dist/chunks/{date-range-picker.xYGf0SRg.js.map → date-range-picker.CFIOD59O.js.map} +1 -1
  49. package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js → dropdown-default-textbox.ZAFh7KqG.js} +111 -103
  50. package/dist/chunks/{dropdown-default-textbox.DPZmj7xJ.js.map → dropdown-default-textbox.ZAFh7KqG.js.map} +1 -1
  51. package/dist/chunks/{dropdown-tag.B4RMse5R.js → dropdown-tag.Ntdp7P7W.js} +2 -2
  52. package/dist/chunks/{dropdown-tag.B4RMse5R.js.map → dropdown-tag.Ntdp7P7W.js.map} +1 -1
  53. package/dist/chunks/{dropdown.BfzsI2Th.js → dropdown.DC9un4VJ.js} +240 -234
  54. package/dist/chunks/{dropdown.BfzsI2Th.js.map → dropdown.DC9un4VJ.js.map} +1 -1
  55. package/dist/chunks/es6.C-HLzYPA.js +11 -0
  56. package/dist/chunks/{es6.b4enG1py.js.map → es6.C-HLzYPA.js.map} +1 -1
  57. package/dist/chunks/{file-uploader.CK-Frs_q.js → file-uploader.ItCr8Ezn.js} +228 -227
  58. package/dist/chunks/file-uploader.ItCr8Ezn.js.map +1 -0
  59. package/dist/chunks/{filter-bar.hBPWastb.js → filter-bar.Dowrph-Z.js} +18 -19
  60. package/dist/chunks/{filter-bar.hBPWastb.js.map → filter-bar.Dowrph-Z.js.map} +1 -1
  61. package/dist/chunks/{footer-actions.DwnLB4NW.js → footer-actions.B3GJ1wNP.js} +2 -2
  62. package/dist/chunks/{footer-actions.DwnLB4NW.js.map → footer-actions.B3GJ1wNP.js.map} +1 -1
  63. package/dist/chunks/{header.CAJtHW1k.js → header.BLjdXtYJ.js} +4 -4
  64. package/dist/chunks/{header.CAJtHW1k.js.map → header.BLjdXtYJ.js.map} +1 -1
  65. package/dist/chunks/{input-field-password.BmfOGkrH.js → input-field-password.CgxF9jhq.js} +3 -3
  66. package/dist/chunks/{input-field-password.BmfOGkrH.js.map → input-field-password.CgxF9jhq.js.map} +1 -1
  67. package/dist/chunks/{input-field.CHD3Fzzg.js → input-field.CcjqGkLs.js} +2 -2
  68. package/dist/chunks/{input-field.CHD3Fzzg.js.map → input-field.CcjqGkLs.js.map} +1 -1
  69. package/dist/chunks/{menu.N41WnXc8.js → menu.B78fzH_k.js} +81 -54
  70. package/dist/chunks/menu.B78fzH_k.js.map +1 -0
  71. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js → modal-fullscreen.DgftXCJe.js} +2 -2
  72. package/dist/chunks/{modal-fullscreen.BbNe6M9T.js.map → modal-fullscreen.DgftXCJe.js.map} +1 -1
  73. package/dist/chunks/{modal.Cb4zg5fN.js → modal.BA745pfv.js} +4 -4
  74. package/dist/chunks/{modal.Cb4zg5fN.js.map → modal.BA745pfv.js.map} +1 -1
  75. package/dist/chunks/{pagination.DORr-ox0.js → pagination.CfwtuZ7R.js} +2 -2
  76. package/dist/chunks/{pagination.DORr-ox0.js.map → pagination.CfwtuZ7R.js.map} +1 -1
  77. package/dist/chunks/{popover.Uy-vuQq5.js → popover.ZlmaSYms.js} +2 -2
  78. package/dist/chunks/{popover.Uy-vuQq5.js.map → popover.ZlmaSYms.js.map} +1 -1
  79. package/dist/chunks/{search-bar.BtFX4039.js → search-bar.lYuXPzBX.js} +3 -3
  80. package/dist/chunks/{search-bar.BtFX4039.js.map → search-bar.lYuXPzBX.js.map} +1 -1
  81. package/dist/chunks/{secondary-nav.DtnWRhFW.js → secondary-nav.CF6WPYn4.js} +3 -3
  82. package/dist/chunks/{secondary-nav.DtnWRhFW.js.map → secondary-nav.CF6WPYn4.js.map} +1 -1
  83. package/dist/chunks/{selection-card-group.B6XXbJsv.js → selection-card-group.CjuBQ2UA.js} +4 -4
  84. package/dist/chunks/{selection-card-group.B6XXbJsv.js.map → selection-card-group.CjuBQ2UA.js.map} +1 -1
  85. package/dist/chunks/{sidepanel.CRJN9Acz.js → sidepanel.NUx7L5f1.js} +2 -2
  86. package/dist/chunks/{sidepanel.CRJN9Acz.js.map → sidepanel.NUx7L5f1.js.map} +1 -1
  87. package/dist/chunks/{teleport.CQKBJZU5.js → teleport.B5fwsT5y.js} +26 -17
  88. package/dist/chunks/teleport.B5fwsT5y.js.map +1 -0
  89. package/dist/chunks/textarea.F-JyRtIw.js +196 -0
  90. package/dist/chunks/{textarea.Y3yd_3ll.js.map → textarea.F-JyRtIw.js.map} +1 -1
  91. package/dist/chunks/{timeline-item.CCV4U3Zx.js → timeline-item.BJyB8-Wv.js} +3 -3
  92. package/dist/chunks/{timeline-item.CCV4U3Zx.js.map → timeline-item.BJyB8-Wv.js.map} +1 -1
  93. package/dist/chunks/{tutorial.4r7MKNEU.js → tutorial.DFvMZAN5.js} +4 -4
  94. package/dist/chunks/{tutorial.4r7MKNEU.js.map → tutorial.DFvMZAN5.js.map} +1 -1
  95. package/dist/chunks/{use-cached-selected-values.CAlfyb_L.js → use-cached-selected-values.BiqVX5O7.js} +26 -26
  96. package/dist/chunks/{use-cached-selected-values.CAlfyb_L.js.map → use-cached-selected-values.BiqVX5O7.js.map} +1 -1
  97. package/dist/code-snippet.js +1 -1
  98. package/dist/dashboard-template.js +1 -1
  99. package/dist/dashed-underline.js +1 -1
  100. package/dist/data-grid-template.js +1 -1
  101. package/dist/data-grid.js +1 -1
  102. package/dist/date-picker.js +1 -1
  103. package/dist/date-range-picker.js +1 -1
  104. package/dist/dropdown.js +4 -4
  105. package/dist/file-uploader.js +1 -1
  106. package/dist/filter-bar.js +1 -1
  107. package/dist/header.js +1 -1
  108. package/dist/index.js +85 -86
  109. package/dist/index.js.map +1 -1
  110. package/dist/input-field-password.js +1 -1
  111. package/dist/input-field.js +1 -1
  112. package/dist/internal.js +28 -24
  113. package/dist/internal.js.map +1 -1
  114. package/dist/menu.js +1 -1
  115. package/dist/modal-fullscreen.js +1 -1
  116. package/dist/modal.js +2 -2
  117. package/dist/pagination.js +1 -1
  118. package/dist/popover.js +1 -1
  119. package/dist/search-bar.js +2 -2
  120. package/dist/secondary-nav.js +1 -1
  121. package/dist/selection-card.js +1 -1
  122. package/dist/sidepanel.js +1 -1
  123. package/dist/textarea.js +1 -1
  124. package/dist/timeline.js +1 -1
  125. package/dist/tutorial.js +1 -1
  126. package/dist/web-types.json +48 -2
  127. package/package.json +2 -2
  128. package/dist/assets/loading-button.css +0 -1
  129. package/dist/chunks/action-bar.kPPYSgQK.js.map +0 -1
  130. package/dist/chunks/button-actions-with-menu.dp6C-PKX.js.map +0 -1
  131. package/dist/chunks/button-actions.Cpx4PQp0.js +0 -111
  132. package/dist/chunks/button-actions.Cpx4PQp0.js.map +0 -1
  133. package/dist/chunks/es6.b4enG1py.js +0 -10
  134. package/dist/chunks/file-uploader.CK-Frs_q.js.map +0 -1
  135. package/dist/chunks/loading-button.CiPmvU7F.js +0 -113
  136. package/dist/chunks/loading-button.CiPmvU7F.js.map +0 -1
  137. package/dist/chunks/menu.N41WnXc8.js.map +0 -1
  138. package/dist/chunks/teleport.CQKBJZU5.js.map +0 -1
  139. package/dist/chunks/textarea.Y3yd_3ll.js +0 -192
  140. package/dist/chunks/use-click-outside.D6aIgS15.js +0 -14
  141. package/dist/chunks/use-click-outside.D6aIgS15.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-section.CExqPbQb.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n class=\"b-dashboard-template__tabs\"\n :class=\"dashboardTabsConditionalClasses\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const isTabsPinned = ref(false);\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTabsConditionalClasses = computed(() => ({\n 'b-dashboard-template__tabs--sticky': props.stickyTabs,\n 'b-dashboard-template__tabs--show-border': props.stickyTabs && isTabsPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n (tabsRef.value.tablistwrapper.$el as HTMLDivElement).style.top = `${tabsPosition.value}px`;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n if (hasStickyTabs.value) {\n isTabsPinned.value =\n (tabsRef.value.tablistwrapper.$el as HTMLDivElement)?.getBoundingClientRect().top ===\n tabsPosition.value;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","isTabsPinned","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTabsConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AAuJI,MAAAA,IAAA,CAAA;;;;;;;;;;iBAhGAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,EAAA,GACAK,IAAAL,EAAA,CAAA,GAEAM,IAAAC,EAAA,MAAAN,EAAA,SAAAO,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAR,EAAA,SAAAS,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAP,EAAA;AAAA,IAEuB,EAAA,GAG1ES,IAAAJ,EAAA,OAAA;AAAA,MAAwD,sCAAAC,EAAA;AAAA,MACR,2CAAAA,EAAA,cAAAJ,EAAA;AAAA,IACgC,EAAA,GAGhFQ,IAAAL,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EK,IAAAN,EAAA,MAAA,OAAA,KAAAZ,CAAA,EAAA,OAAA,CAAAmB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAV,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAU,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEA,EAAA,GAAAG,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAApB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAmB,EAAArB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAQ,EAAA,OAAA;AACI,kBAAAc,IAAAtB,EAAA,MAAA;AACA,YAAAI,EAAA,QAAAC,EAAA,QAAAiB,IAAA,GACAxB,EAAA,MAAA,eAAA,IAAA,MAAA,MAAA,GAAAM,EAAA,KAAA;AAAA,UAAsF;AAAA,QAC1F,CAAA;AAAA,MAER;AAAA,IACJ,GAGJgB;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIJ,EAAA,UAAAgB,IAAAjB,EAAA,UAAA,gBAAAiB,EAAA,wBAAA,SAAA,IAEJT,EAAA,UACIL,EAAA,UAAAa,IAAAlB,EAAA,MAAA,eAAA,QAAA,gBAAAkB,EAAA,wBAAA,SAAAZ,EAAA;AAAA,MAGJ;AAAA,IACJ,GAGJmB,EAAA,MAAA;AACI,MAAArB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;sBC7CvCsB,IAAA,CAAA;;;;;;;;iBAzCA9B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA+B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA9B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAW,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dashboard-section._KVy37B0.js","sources":["../../src/templates/dashboard-template/dashboard-template.vue","../../src/templates/dashboard-template/components/dashboard-section/dashboard-section.vue"],"sourcesContent":["<template>\n <main class=\"b-dashboard-template\">\n <bento-header v-bind=\"header\" variant=\"page\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div class=\"b-dashboard-template__top-section\" :class=\"dashboardTopSectionConditionalClasses\">\n <div\n v-if=\"hasSlot('filters')\"\n ref=\"filtersRef\"\n class=\"b-dashboard-template__filters\"\n :class=\"dashboardFiltersConditionalClasses\"\n data-testid=\"filters\"\n >\n <slot name=\"filters\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n class=\"b-dashboard-template__tabs\"\n :class=\"dashboardTabsConditionalClasses\"\n data-testid=\"tabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <div class=\"b-dashboard-template__container b-dashboard-template__container--tabs\">\n <slot :name=\"`tab-${index + 1}`\" />\n </div>\n </bento-tab>\n </bento-tabs>\n <div v-else class=\"b-dashboard-template__container\">\n <slot />\n </div>\n </div>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onUnmounted, ref, useSlots, watch } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useWindowScroll } from '@vueuse/core';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader, BentoDashboardTemplateTabs } from './dashboard-template.types';\n\n const props = defineProps({\n header: null,\n tabs: { default: undefined },\n stickyTabs: { type: Boolean, default: false },\n stickyFilters: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const tabsRef = ref<InstanceType<typeof BentoTabs>>();\n const filtersRef = ref<HTMLDivElement>(null);\n const isFiltersPinned = ref(false);\n let filtersElementObserver: ResizeObserver | null = null;\n const isTabsPinned = ref(false);\n const tabsPosition = ref(0);\n\n const hasStickyFilters = computed(() => filtersRef.value && props.stickyFilters);\n const hasStickyTabs = computed(() => tabsRef.value && props.stickyTabs);\n\n const dashboardFiltersConditionalClasses = computed(() => ({\n 'b-dashboard-template__filters--sticky': props.stickyFilters,\n 'b-dashboard-template__filters--show-border':\n hasStickyFilters.value && !hasStickyTabs.value && isFiltersPinned.value,\n }));\n\n const dashboardTabsConditionalClasses = computed(() => ({\n 'b-dashboard-template__tabs--sticky': props.stickyTabs,\n 'b-dashboard-template__tabs--show-border': props.stickyTabs && isTabsPinned.value,\n }));\n\n const dashboardTopSectionConditionalClasses = computed(() => ({\n 'b-dashboard-template__top-section--sticky': props.stickyTabs || props.stickyFilters,\n }));\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const { y } = useWindowScroll();\n\n watch(\n () => filtersRef.value,\n () => {\n if (!filtersElementObserver && filtersRef.value) {\n filtersElementObserver = observeSizeOfElement(filtersRef.value, () => {\n if (filtersRef.value && hasStickyTabs.value) {\n const filtersHeight = filtersRef.value.offsetHeight;\n tabsPosition.value = hasStickyFilters.value ? filtersHeight : 0;\n (tabsRef.value.tablistwrapper.$el as HTMLDivElement).style.top = `${tabsPosition.value}px`;\n }\n });\n }\n }\n );\n\n watch(\n () => y.value,\n () => {\n if (hasStickyFilters.value) {\n isFiltersPinned.value = filtersRef.value?.getBoundingClientRect().top === 0;\n }\n if (hasStickyTabs.value) {\n isTabsPinned.value =\n (tabsRef.value.tablistwrapper.$el as HTMLDivElement)?.getBoundingClientRect().top ===\n tabsPosition.value;\n }\n }\n );\n\n onUnmounted(() => {\n filtersElementObserver?.disconnect();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard template is a full page template used to visualize data on pages such as data dashboards and reports.\n *\n * @example\n * import { BentoDashboardTemplate, BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardTemplate, BentoDashboardSection },\n * template: `\n * <bento-dashboard-template :header=\"{ title: 'Dashboard'}\" :tabs=\"tabs: [{ title: 'Tab 1' }, { title: 'Tab 2' }]\" sticky-tabs sticky-filters>\n * <template #tab-1>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * <template #controls>\n * // Add your controls here\n * </template>\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * <template #tab-2>\n * <bento-dashboard-section :header=\"{ title: 'Section'}\">\n * // Add your content here\n * </bento-dashboard-section>\n * </template>\n * </bento-dashboard-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-template.scss\" />\n","<template>\n <div class=\"b-dashboard-section\" :class=\"conditionalClasses\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-dashboard-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('controls')\" class=\"b-dashboard-section__controls\">\n <slot name=\"controls\"></slot>\n </div>\n <div v-if=\"!hasSlot('content-col-1') && !hasSlot('content-col-2')\" class=\"b-dashboard-section__content\">\n <slot name=\"default\"></slot>\n </div>\n <div v-else class=\"b-dashboard-section__columns\">\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-1\"></slot></div>\n <div class=\"b-dashboard-section__content\"><slot name=\"content-col-2\"></slot></div>\n </div>\n <bento-divider class=\"b-dashboard-section__divider\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoDivider } from '@/components/divider';\n import { useHasSlot } from '@/composables';\n import type { BentoDashboardTemplateHeader } from '../../dashboard-template.types';\n\n const props = defineProps({\n header: null,\n halfWidth: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const conditionalClasses = computed(() => ({\n 'b-dashboard-section--half-width': props.halfWidth,\n }));\n\n onMounted(() => {\n if ((hasSlot('content-col-1') || hasSlot('content-col-2')) && props.halfWidth) {\n throw new Error('`content-col-1` and `content-col-2` cannot be used with half-width prop');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Dashboard section is subcomponent of Dashboard template meant to be used to create the different sections within the page.\n *\n * @example\n * import { BentoDashboardSection } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashboardSection },\n * template: `\n * <bento-dashboard-section :header=\"{ title: 'Section' }\" half-width>\n * <template #controls>\n * // Add your controls here\n * </template>\n * // You can render content with two cols\n * <template #content-col-1>\n * // Add your content here\n * </template>\n * <template #content-col-2>\n * // Add your content here\n * </template>\n * // Or you can render full width content by using default slot\n * // Add your content here\n * </bento-dashboard-section>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashboard-section.scss\" />\n"],"names":["__default__$1","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","isTabsPinned","tabsPosition","hasStickyFilters","computed","props","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTabsConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;AAuJI,MAAAA,IAAA,CAAA;;;;;;;;;;iBAhGAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,EAAA,GACAK,IAAAL,EAAA,CAAA,GAEAM,IAAAC,EAAA,MAAAN,EAAA,SAAAO,EAAA,aAAA,GACAC,IAAAF,EAAA,MAAAR,EAAA,SAAAS,EAAA,UAAA,GAEAE,IAAAH,EAAA,OAAA;AAAA,MAA2D,yCAAAC,EAAA;AAAA,MACR,8CAAAF,EAAA,SAAA,CAAAG,EAAA,SAAAP,EAAA;AAAA,IAEuB,EAAA,GAG1ES,IAAAJ,EAAA,OAAA;AAAA,MAAwD,sCAAAC,EAAA;AAAA,MACR,2CAAAA,EAAA,cAAAJ,EAAA;AAAA,IACgC,EAAA,GAGhFQ,IAAAL,EAAA,OAAA;AAAA,MAA8D,6CAAAC,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EK,IAAAN,EAAA,MAAA,OAAA,KAAAZ,CAAA,EAAA,OAAA,CAAAmB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAV,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAU,EAAAF,OAAA,gBAAAC,EAAA,UAAA,OAAAD,IAAA,CAAA;AAAA,OAEA,EAAA,GAAAG,EAAA,IAAAC,EAAA;AAEA,WAAAC;AAAA,MAAA,MAAApB,EAAA;AAAA,MACqB,MAAA;AAEb,QAAA,CAAAE,KAAAF,EAAA,UACIE,IAAAmB,EAAArB,EAAA,OAAA,MAAA;AACI,cAAAA,EAAA,SAAAQ,EAAA,OAAA;AACI,kBAAAc,IAAAtB,EAAA,MAAA;AACA,YAAAI,EAAA,QAAAC,EAAA,QAAAiB,IAAA,GACAxB,EAAA,MAAA,eAAA,IAAA,MAAA,MAAA,GAAAM,EAAA,KAAA;AAAA,UAAsF;AAAA,QAC1F,CAAA;AAAA,MAER;AAAA,IACJ,GAGJgB;AAAA,MAAA,MAAAF,EAAA;AAAA,MACY,MAAA;;AAEJ,QAAAb,EAAA,UACIJ,EAAA,UAAAgB,IAAAjB,EAAA,UAAA,gBAAAiB,EAAA,wBAAA,SAAA,IAEJT,EAAA,UACIL,EAAA,UAAAa,IAAAlB,EAAA,MAAA,eAAA,QAAA,gBAAAkB,EAAA,wBAAA,SAAAZ,EAAA;AAAA,MAGJ;AAAA,IACJ,GAGJmB,EAAA,MAAA;AACI,MAAArB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;sBC7CvCsB,IAAA,CAAA;;;;;;;;iBAzCA9B,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA+B,IAAAnB,EAAA,OAAA;AAAA,MAA2C,mCAAAC,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAmB,EAAA,MAAA;AACI,WAAA9B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAW,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as h, useSlots as P, ref as p, computed as d, watch as T } from "vue";
2
- import { B as O } from "./popover.Uy-vuQq5.js";
2
+ import { B as O } from "./popover.ZlmaSYms.js";
3
3
  import { B as x } from "./typography.Bu_WAKdf.js";
4
4
  import { u as B } from "./use-has-slot.C9lQZ6nz.js";
5
5
  import { B as g } from "./tooltip.DH8TqpYV.js";
@@ -56,4 +56,4 @@ const U = C.exports;
56
56
  export {
57
57
  U as d
58
58
  };
59
- //# sourceMappingURL=dashed-underline.dGO33Q_E.js.map
59
+ //# sourceMappingURL=dashed-underline.DX5QlK14.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashed-underline.dGO33Q_E.js","sources":["../../src/components/dashed-underline/dashed-underline.vue"],"sourcesContent":["<template>\n <span\n ref=\"element\"\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n class=\"b-dashed-underline\"\n tabindex=\"0\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <slot></slot>\n <bento-popover\n v-if=\"element && hasPopover\"\n :open=\"isOpen\"\n :target-element=\"element\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <slot name=\"popover-content\">\n <bento-typography>\n {{ popoverText }}\n </bento-typography>\n </slot>\n </bento-popover>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useSlots, watch } from 'vue';\n import { BentoPopover, type BentoPopoverPositions } from '@/components/popover';\n import {\n type BentoTooltipPosition,\n BentoTooltipDirective as vBentoTooltipDirective,\n } from '@/directives/tooltip/index';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n const props = defineProps({\n popoverText: { default: null },\n popoverPosition: { default: 'top' },\n tooltipText: { default: null },\n tooltipPosition: { default: 'top' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const element = ref<HTMLSpanElement>(null);\n const isOpen = ref(false);\n\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (!element.value || !(e?.relatedTarget instanceof Element) || !element.value.contains(e.relatedTarget)) {\n closePopover();\n }\n };\n\n const hasPopover = computed(() => props.popoverText || hasSlot('popover-content'));\n\n const shouldShowTooltipPopoverError = computed(() => !props.tooltipText && !hasPopover.value);\n\n watch(\n shouldShowTooltipPopoverError,\n value => {\n if (value) {\n throw new Error(\n 'BentoDashedUnderline requires either a tooltip or a popover to be configured. Check the docs for more info.'\n );\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The dashed underline serves as a visual cue to indicate that additional information is available for\n * a specific word or phrase without adding an icon.\n *\n * @example\n * import { BentoDashedUnderline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashedUnderline },\n * template: `\n * <bento-dashed-underline>\n * annotated text\n * </bento-dashed-underline>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashed-underline.scss\" />\n"],"names":["__default__","CLOSING_POPOVER_DELAY_MS","slots","useSlots","hasSlot","useHasSlot","element","ref","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","infoIconOnFocus","infoIconOnFocusOut","e","hasPopover","computed","props","shouldShowTooltipPopoverError","watch","value"],"mappings":";;;;;;;AAyHI,MAAAA,IAAA,CAAA;;;;;;;;;;iBAjFAC,IAAA,KASAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEAE,IAAAF,EAAA,GAEAG,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAAP,CAAA;AAEnB,MAAAQ,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAT,EAAA,SAAA,GAAAS,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAT,EAAA,MAAA,SAAAS,EAAA,aAAA,MACIJ,EAAA;AAAA,IACJ,GAGJK,IAAAC,EAAA,MAAAC,EAAA,eAAAd,EAAA,iBAAA,CAAA,GAEAe,IAAAF,EAAA,MAAA,CAAAC,EAAA,eAAA,CAAAF,EAAA,KAAA;AAEA,WAAAI;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dashed-underline.DX5QlK14.js","sources":["../../src/components/dashed-underline/dashed-underline.vue"],"sourcesContent":["<template>\n <span\n ref=\"element\"\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n class=\"b-dashed-underline\"\n tabindex=\"0\"\n @mouseenter=\"openPopover\"\n @mouseleave=\"closePopover\"\n @focus=\"infoIconOnFocus\"\n @focusout=\"infoIconOnFocusOut\"\n >\n <slot></slot>\n <bento-popover\n v-if=\"element && hasPopover\"\n :open=\"isOpen\"\n :target-element=\"element\"\n :position=\"popoverPosition\"\n role=\"tooltip\"\n fit-content\n disable-focus-trap\n >\n <slot name=\"popover-content\">\n <bento-typography>\n {{ popoverText }}\n </bento-typography>\n </slot>\n </bento-popover>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\n import { computed, ref, useSlots, watch } from 'vue';\n import { BentoPopover, type BentoPopoverPositions } from '@/components/popover';\n import {\n type BentoTooltipPosition,\n BentoTooltipDirective as vBentoTooltipDirective,\n } from '@/directives/tooltip/index';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n\n const CLOSING_POPOVER_DELAY_MS = 200;\n\n const props = defineProps({\n popoverText: { default: null },\n popoverPosition: { default: 'top' },\n tooltipText: { default: null },\n tooltipPosition: { default: 'top' }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const element = ref<HTMLSpanElement>(null);\n const isOpen = ref(false);\n\n const closingTimeOutId = ref();\n\n const openPopover = () => {\n isOpen.value = true;\n if (closingTimeOutId.value) {\n clearTimeout(closingTimeOutId.value);\n }\n };\n\n const closePopover = () => {\n // We want to delay closing for a couple of seconds so\n // it doesn't flicker if a user hovers over the icon and then inside the popover.\n const timeOutId = setTimeout(() => {\n isOpen.value = false;\n }, CLOSING_POPOVER_DELAY_MS);\n closingTimeOutId.value = timeOutId;\n };\n\n const infoIconOnFocus = () => {\n openPopover();\n };\n\n /**\n * Only close popover on blur if the newly focus element is not a child of this element\n * @param e - the event that contains the newly focused element\n */\n const infoIconOnFocusOut = (e: FocusEvent) => {\n if (!element.value || !(e?.relatedTarget instanceof Element) || !element.value.contains(e.relatedTarget)) {\n closePopover();\n }\n };\n\n const hasPopover = computed(() => props.popoverText || hasSlot('popover-content'));\n\n const shouldShowTooltipPopoverError = computed(() => !props.tooltipText && !hasPopover.value);\n\n watch(\n shouldShowTooltipPopoverError,\n value => {\n if (value) {\n throw new Error(\n 'BentoDashedUnderline requires either a tooltip or a popover to be configured. Check the docs for more info.'\n );\n }\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The dashed underline serves as a visual cue to indicate that additional information is available for\n * a specific word or phrase without adding an icon.\n *\n * @example\n * import { BentoDashedUnderline } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDashedUnderline },\n * template: `\n * <bento-dashed-underline>\n * annotated text\n * </bento-dashed-underline>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./dashed-underline.scss\" />\n"],"names":["__default__","CLOSING_POPOVER_DELAY_MS","slots","useSlots","hasSlot","useHasSlot","element","ref","isOpen","closingTimeOutId","openPopover","closePopover","timeOutId","infoIconOnFocus","infoIconOnFocusOut","e","hasPopover","computed","props","shouldShowTooltipPopoverError","watch","value"],"mappings":";;;;;;;AAyHI,MAAAA,IAAA,CAAA;;;;;;;;;;iBAjFAC,IAAA,KASAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GAEAE,IAAAF,EAAA,GAEAG,IAAA,MAAA;AACI,MAAAF,EAAA,QAAA,IACAC,EAAA,SACI,aAAAA,EAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,MAAA;AAGI,YAAAC,IAAA,WAAA,MAAA;AACI,QAAAJ,EAAA,QAAA;AAAA,MAAe,GAAAP,CAAA;AAEnB,MAAAQ,EAAA,QAAAG;AAAA,IAAyB,GAG7BC,IAAA,MAAA;AACI,MAAAH,EAAA;AAAA,IAAY,GAOhBI,IAAA,CAAAC,MAAA;AACI,OAAA,CAAAT,EAAA,SAAA,GAAAS,KAAA,gBAAAA,EAAA,0BAAA,YAAA,CAAAT,EAAA,MAAA,SAAAS,EAAA,aAAA,MACIJ,EAAA;AAAA,IACJ,GAGJK,IAAAC,EAAA,MAAAC,EAAA,eAAAd,EAAA,iBAAA,CAAA,GAEAe,IAAAF,EAAA,MAAA,CAAAC,EAAA,eAAA,CAAAF,EAAA,KAAA;AAEA,WAAAI;AAAA,MAAAD;AAAA,MACI,CAAAE,MAAA;AAEI,YAAAA;AACI,gBAAA,IAAA;AAAA,YAAU;AAAA,UACN;AAAA,MAER;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as m, useSlots as u, ref as T, computed as b, provide as v, toRef as y } from "vue";
2
- import { B as C } from "./header.CAJtHW1k.js";
2
+ import { B as C } from "./header.BLjdXtYJ.js";
3
3
  import { B as g, a as R } from "./tabs.Casntai-.js";
4
4
  import { u as I } from "./use-has-slot.C9lQZ6nz.js";
5
5
  import { D as S } from "./data-grid-template.keys.2_AkxuNT.js";
@@ -66,4 +66,4 @@ const N = G.exports;
66
66
  export {
67
67
  N as d
68
68
  };
69
- //# sourceMappingURL=data-grid-template.BF7JMfoJ.js.map
69
+ //# sourceMappingURL=data-grid-template.BgTUIoak.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-grid-template.BF7JMfoJ.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template b-data-grid-template--sticky-tabs\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-data-grid-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('additionalContent')\" class=\"b-data-grid-template__additional-content\">\n <slot name=\"additionalContent\" />\n </div>\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n class=\"b-data-grid-template__tabs\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n <slot v-else />\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n required: true,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\"]);\n\n const tabsRef = ref(null);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablist);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n\n // return values to the Tab component\n return { isDataGridTemplate, stickyTabs, tabsRef };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","computedTabsRef","computed","_b","_a","tabsSlots","el","emitTabs","newActiveTabIndex","emit","props","getTabTitle","index","registerDatagridInDataGridTemplate","toRef","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;AAqHI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArDAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,MAAA;;AAAA,cAAAC,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAA,UAAA,gBAAAD,EAAA;AAAA,KAAA,GAEAE,IAAAH,EAAA,MAAA,OAAA,KAAAP,CAAA,EAAA,OAAA,CAAAW,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,eAAA,EAAA,GAAAC,EAAA,MAAA,gBAAAF,EAAA,CAAA;AAAA,IAAwE,GAG5EG,IAAA,CAAAC,MAAA;;AAAA,eAAAT,KAAAC,IAAAM,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAN,EAAAQ,OAAA,gBAAAT,EAAA,UAAA,OAAAS,IAAA,CAAA;AAAA,OAEAC,IAAA,OAMI,EAAA,wBAAA,YAJAC,EAAAJ,GAAA,YAAA,GAIA,SAHAT,EAGA;AAGJ,WAAAc,EAAAC,GAAAH,CAAA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"data-grid-template.BgTUIoak.js","sources":["../../src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template b-data-grid-template--sticky-tabs\">\n <bento-header v-bind=\"header\" variant=\"component\" class=\"b-data-grid-template__header\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n <div v-if=\"hasSlot('additionalContent')\" class=\"b-data-grid-template__additional-content\">\n <slot name=\"additionalContent\" />\n </div>\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n class=\"b-data-grid-template__tabs\"\n @update:active-tab-index=\"emitTabs\"\n >\n <bento-tab v-for=\"(_item, index) in tabsSlots\" :key=\"`tab-${index}`\" :title=\"getTabTitle(index)\">\n <slot :name=\"`tab-${index + 1}`\" />\n </bento-tab>\n </bento-tabs>\n <slot v-else />\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { BentoHeader } from '@/components/header';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateTabs,\n } from './data-grid-template.types';\n\n const props = defineProps({\n /**\n * The header that goes to the top of the template\n */\n header: {\n type: Object as PropType<BentoDataGridTemplateHeader>,\n required: true,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currently active tab index.\n * - tabs.tabs: an array of BentoTab props, the first item in the array will affect the `tab-1` slot and so on.\n */\n tabs: {\n type: Object as PropType<BentoDataGridTemplateTabs>,\n default: undefined,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits([\"update:tabs\"]);\n\n const tabsRef = ref(null);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablist);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const emitTabs = (newActiveTabIndex: number) => {\n emit('update:tabs', { ...props.tabs, activeTabIndex: newActiveTabIndex });\n };\n\n const getTabTitle = (index: number) => props?.tabs.tabs?.[index]?.title ?? `Tab ${index + 1}`;\n\n const registerDatagridInDataGridTemplate: BentoDataGridTemplateDataGrid = () => {\n const isDataGridTemplate = true;\n const stickyTabs: Ref<boolean> = toRef(props, 'stickyTabs');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n\n // return values to the Tab component\n return { isDataGridTemplate, stickyTabs, tabsRef };\n };\n\n provide(DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY, registerDatagridInDataGridTemplate);\n</script>\n\n<script lang=\"ts\">\n /**\n * The data grid template is a restrictive, full-page data grid used to display information from a data set.\n * You can use this data grid template when your user needs a clear overview of data or a way of organizing and analyzing the data in their own way.\n * This data grid template shouldn’t be confused with the data grid.\n *\n * @example\n * import { BentoDataGridTemplate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDataGridTemplate },\n * template: `\n * // If you want to display multiple data grids in the same page (they will be rendered in different tabs)\n * <bento-data-grid-template>\n * <template #tab-1><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 1\"/></template>\n * <template #tab-2><bento-data-grid v-bind=\"your-data-grid-args\" title=\"Title for tab 2\"/></template>\n * </bento-data-grid-template>\n * // Alternatively, if you only want to pass one data grid to your template:\n * <bento-data-grid-template>\n * <template #default><bento-data-grid v-bind=\"your-data-grid-args\"/></template>\n * </bento-data-grid-template>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./data-grid-template.scss\" />\n"],"names":["__default__","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","computedTabsRef","computed","_b","_a","tabsSlots","el","emitTabs","newActiveTabIndex","emit","props","getTabTitle","index","registerDatagridInDataGridTemplate","toRef","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY"],"mappings":";;;;;;;AAqHI,MAAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBArDAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAIAI,IAAAC,EAAA,IAAA,GAEAC,IAAAC,EAAA,MAAA;;AAAA,cAAAC,KAAAC,IAAAL,EAAA,UAAA,gBAAAK,EAAA,UAAA,gBAAAD,EAAA;AAAA,KAAA,GAEAE,IAAAH,EAAA,MAAA,OAAA,KAAAP,CAAA,EAAA,OAAA,CAAAW,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;AACI,MAAAC,EAAA,eAAA,EAAA,GAAAC,EAAA,MAAA,gBAAAF,EAAA,CAAA;AAAA,IAAwE,GAG5EG,IAAA,CAAAC,MAAA;;AAAA,eAAAT,KAAAC,IAAAM,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAN,EAAAQ,OAAA,gBAAAT,EAAA,UAAA,OAAAS,IAAA,CAAA;AAAA,OAEAC,IAAA,OAMI,EAAA,wBAAA,YAJAC,EAAAJ,GAAA,YAAA,GAIA,SAHAT,EAGA;AAGJ,WAAAc,EAAAC,GAAAH,CAAA;;;;;;;;;;;;;;;;;;;"}
@@ -6,8 +6,8 @@ import { C as ot } from "./cross.CsUPDmaA.js";
6
6
  import { N as ke } from "./checkbox-input.Bo4NxNOh.js";
7
7
  import { d as rn } from "./popper-container.CnWphJTN.js";
8
8
  import { K as te, B as dn } from "./tooltip.DH8TqpYV.js";
9
- import { B as cn } from "./action-bar.kPPYSgQK.js";
10
- import { B as un } from "./pagination.DORr-ox0.js";
9
+ import { B as cn } from "./action-bar.Dx12xlEW.js";
10
+ import { B as un } from "./pagination.CfwtuZ7R.js";
11
11
  import { B as Te } from "./loading-indicator.z8COalOc.js";
12
12
  import { B as me, p as lt } from "./typography.Bu_WAKdf.js";
13
13
  import { u as Ae } from "./use-has-slot.C9lQZ6nz.js";
@@ -15,27 +15,27 @@ import { u as fn } from "./aria-label.CaUURpnB.js";
15
15
  import { g as gn } from "./get-slot-text.Cgn-E48s.js";
16
16
  import { u as ie } from "./i18n.BQkEbtPM.js";
17
17
  import { B as _n } from "./empty-state.B8ZeRgDi.js";
18
- import { B as Ce } from "./filter-bar.hBPWastb.js";
18
+ import { B as Ce } from "./filter-bar.Dowrph-Z.js";
19
19
  import { E as vn } from "./tabs.keys.Bc2pSKRw.js";
20
20
  import { D as Cn } from "./data-grid-template.keys.2_AkxuNT.js";
21
21
  import { o as Ne } from "./resize.Bqks3WUm.js";
22
22
  import "./index.Cl4_42j5.js";
23
- import { a as Ge, B as hn } from "./popover.Uy-vuQq5.js";
23
+ import { a as Ge, B as hn } from "./popover.ZlmaSYms.js";
24
24
  import { B as at } from "./button.CufUNBkv.js";
25
25
  import { B as it } from "./toggle.INRYdQzz.js";
26
- import { B as mn } from "./search-bar.BtFX4039.js";
27
- import { u as pn } from "./dropdown.BfzsI2Th.js";
26
+ import { B as mn } from "./search-bar.lYuXPzBX.js";
27
+ import { u as pn } from "./dropdown.DC9un4VJ.js";
28
28
  import { g as we } from "./generate-uid.D-HFI38h.js";
29
29
  import { S as Sn } from "./search.CBKhp7zB.js";
30
30
  import { B as Ie } from "./toggle-button.CYplDIO-.js";
31
31
  import { B as Ln } from "./directive.O3yEdalv.js";
32
32
  import { B as rt } from "./checkbox.B1qjI4R_.js";
33
33
  import { B as wn } from "./info-icon.p-28zHUJ.js";
34
- import { B as dt, O as En, D as Rn } from "./menu.N41WnXc8.js";
34
+ import { B as dt, O as En, D as Rn } from "./menu.B78fzH_k.js";
35
35
  import { A as yn } from "./dialog-page.CplkzZGZ.js";
36
36
  import { H as bn, S as On } from "./show.IEAxtCB7.js";
37
37
  import { l as We } from "./events.CMzGybJJ.js";
38
- import { B as Tn, a as An } from "./loading-button.CiPmvU7F.js";
38
+ import { d as Tn, e as An } from "./button-actions.BIQ3qA8q.js";
39
39
  import { u as Nn } from "./use-expandable-content-height.GkjjbmPy.js";
40
40
  import { E as In } from "./link.v-y0fKjn.js";
41
41
  import { C as Dn } from "./copy.DgzxvExj.js";
@@ -2553,4 +2553,4 @@ export {
2553
2553
  T as e,
2554
2554
  he as f
2555
2555
  };
2556
- //# sourceMappingURL=data-grid.BXB98JQr.js.map
2556
+ //# sourceMappingURL=data-grid.sAbzCVND.js.map