@adyen/bento-vue3 1.68.1 → 1.68.2

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 (45) hide show
  1. package/dist/@types/index.d.ts +3 -1
  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/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/dialog-page.css +1 -1
  9. package/dist/assets/file-uploader.css +1 -1
  10. package/dist/assets/inspector.css +1 -1
  11. package/dist/assets/menu.css +1 -1
  12. package/dist/assets/modal-fullscreen.css +1 -1
  13. package/dist/assets/popover.css +1 -1
  14. package/dist/assets/sidepanel.css +1 -1
  15. package/dist/chunks/{action-bar.C93kgr7l.js → action-bar.CflF49oL.js} +2 -2
  16. package/dist/chunks/{action-bar.C93kgr7l.js.map → action-bar.CflF49oL.js.map} +1 -1
  17. package/dist/chunks/{button-actions-with-menu.DUccmaB2.js → button-actions-with-menu.8ZYh7-9s.js} +2 -2
  18. package/dist/chunks/{button-actions-with-menu.DUccmaB2.js.map → button-actions-with-menu.8ZYh7-9s.js.map} +1 -1
  19. package/dist/chunks/{dashboard-section.CUcq2ahu.js → dashboard-section.Bhd5Lsy2.js} +2 -2
  20. package/dist/chunks/{dashboard-section.CUcq2ahu.js.map → dashboard-section.Bhd5Lsy2.js.map} +1 -1
  21. package/dist/chunks/{data-grid-template.CDsV2GFG.js → data-grid-template.DSwj7e1E.js} +2 -2
  22. package/dist/chunks/{data-grid-template.CDsV2GFG.js.map → data-grid-template.DSwj7e1E.js.map} +1 -1
  23. package/dist/chunks/{data-grid.BbZSu-mA.js → data-grid.BEdELRNZ.js} +6 -7
  24. package/dist/chunks/data-grid.BEdELRNZ.js.map +1 -0
  25. package/dist/chunks/{header-with-views.C9ql_Wem.js → header-with-views.BUed3ocZ.js} +3 -3
  26. package/dist/chunks/{header-with-views.C9ql_Wem.js.map → header-with-views.BUed3ocZ.js.map} +1 -1
  27. package/dist/chunks/{header.wiq0wlgm.js → header.CwKjDgKv.js} +2 -2
  28. package/dist/chunks/{header.wiq0wlgm.js.map → header.CwKjDgKv.js.map} +1 -1
  29. package/dist/chunks/{menu.C-3obPGl.js → menu.EtjeOPXX.js} +182 -183
  30. package/dist/chunks/menu.EtjeOPXX.js.map +1 -0
  31. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js → tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js} +2 -2
  32. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.nYHtTHqy.js.map → tutorial.vue_vue_type_script_setup_true_lang.Dmf8fGaM.js.map} +1 -1
  33. package/dist/dashboard-template.js +1 -1
  34. package/dist/data-grid-template.js +1 -1
  35. package/dist/data-grid.js +1 -1
  36. package/dist/header-with-views.js +1 -1
  37. package/dist/header.js +1 -1
  38. package/dist/index.js +8 -8
  39. package/dist/internal.js +1 -1
  40. package/dist/menu.js +1 -1
  41. package/dist/tutorial.js +1 -1
  42. package/dist/web-types.json +1 -1
  43. package/package.json +4 -4
  44. package/dist/chunks/data-grid.BbZSu-mA.js.map +0 -1
  45. package/dist/chunks/menu.C-3obPGl.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"action-bar.C93kgr7l.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 {{ n(itemCounter) }}\n {{ 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 disable-responsive-behavior\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, n } = 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","n","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":";;;;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,IAAArB,EAAA,MAAA;AAAA,MAAmE;AAAA,QAC/D,OAAAL,EAAA,MAAA;AAAA,QACmB,OAAA,MAAAF,EAAA,MAAA;AAAA,MACS;AAAA,MAC5B;AAAA,QACA,OAAAE,EAAA,QAAA;AAAA,QACqB,SAAA;AAAA,QACR,OAAA,MAAAF,EAAA,QAAA;AAAA,MACiB;AAAA,IAC9B,CAAA,GAIJ6B,IAAA,YAAA;AACI,YAAAC,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,KAAA,OAAAO,EAAA,QAAAC,EAAA,UAIID,EAAA,SAAA,GACAc,EAAA;AAAA,IACJ,GAGJE,IAAA,YAAA;AACI,YAAAD,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,MAAAO,EAAA,QAAA,MACIA,EAAA,SAAA,GACAgB,EAAA;AAAA,IACJ;AAIJ,WAAAb;AAAA,MAAA,MAAAL,EAAA;AAAA,MACgB,OAAAmB,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
+ {"version":3,"file":"action-bar.CflF49oL.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 {{ n(itemCounter) }}\n {{ 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 disable-responsive-behavior\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, n } = 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","n","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","conf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A,GAAAW,GAAA,GAAAC,CAAA;AAAA,IAAyC,CAAA,GAG7CC,IAAArB,EAAA,MAAA;AAAA,MAAmE;AAAA,QAC/D,OAAAL,EAAA,MAAA;AAAA,QACmB,OAAA,MAAAF,EAAA,MAAA;AAAA,MACS;AAAA,MAC5B;AAAA,QACA,OAAAE,EAAA,QAAA;AAAA,QACqB,SAAA;AAAA,QACR,OAAA,MAAAF,EAAA,QAAA;AAAA,MACiB;AAAA,IAC9B,CAAA,GAIJ6B,IAAA,YAAA;AACI,YAAAC,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,KAAA,OAAAO,EAAA,QAAAC,EAAA,UAIID,EAAA,SAAA,GACAc,EAAA;AAAA,IACJ,GAGJE,IAAA,YAAA;AACI,YAAAD,EAAA,GACAjB,EAAA,QAAAL,EAAA,MAAA,cAAA,MAAAO,EAAA,QAAA,MACIA,EAAA,SAAA,GACAgB,EAAA;AAAA,IACJ;AAIJ,WAAAb;AAAA,MAAA,MAAAL,EAAA;AAAA,MACgB,OAAAmB,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,5 +1,5 @@
1
1
  import { ref as v, watch as b, nextTick as f, defineComponent as A, toRef as y, computed as p, provide as _, createElementBlock as B, openBlock as h, createElementVNode as w, normalizeClass as N, createVNode as k, createBlock as E, createCommentVNode as C, unref as I } from "vue";
2
- import { M as W, B as T } from "./menu.C-3obPGl.js";
2
+ import { M as W, B as T } from "./menu.EtjeOPXX.js";
3
3
  import { f as M, B as R } from "./button-actions.CZdO9YOk.js";
4
4
  import { u as g } from "./index.FNUaPG4G.js";
5
5
  import { _ as O } from "./_plugin-vue_export-helper.CHgC5LLL.js";
@@ -88,4 +88,4 @@ const L = (m) => {
88
88
  export {
89
89
  P as B
90
90
  };
91
- //# sourceMappingURL=button-actions-with-menu.DUccmaB2.js.map
91
+ //# sourceMappingURL=button-actions-with-menu.8ZYh7-9s.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-actions-with-menu.DUccmaB2.js","sources":["../../../vue2/src/components/internal/button-actions-with-menu/composables/use-responsive-actions.ts","../../../vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue"],"sourcesContent":["import { useWindowSize } from '@vueuse/core';\nimport { nextTick, Ref, ref, watch } from 'vue';\n\ninterface UseResponsiveActionsProps {\n breakpoint?: number;\n container: Ref<HTMLElement>;\n defaultActionsCount: number;\n offset?: Ref<HTMLElement>;\n}\n\nexport const useResponsiveActions = (props: UseResponsiveActionsProps) => {\n const { breakpoint, container, defaultActionsCount, offset } = props;\n\n const { width: windowWidth } = useWindowSize();\n\n const displayedActionsCount = ref<number>(defaultActionsCount);\n\n const AVERAGE_BUTTON_WIDTH = 150; // button size + gap\n\n const showActions = async () => {\n await nextTick();\n\n const availableSpace = container.value.clientWidth;\n const totalActionWidth =\n AVERAGE_BUTTON_WIDTH * displayedActionsCount.value +\n (offset?.value?.offsetWidth ?? 0) +\n AVERAGE_BUTTON_WIDTH;\n\n // Only add actions if there's enough space and we haven't reached max\n if (availableSpace >= totalActionWidth && displayedActionsCount.value < defaultActionsCount) {\n displayedActionsCount.value += 1;\n\n showActions(); // keep trying to show more\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n\n const availableSpace = container.value.clientWidth;\n const totalActionWidth = AVERAGE_BUTTON_WIDTH * displayedActionsCount.value + (offset?.value?.offsetWidth ?? 0);\n\n // Hide actions if they overflow the container\n if (availableSpace < totalActionWidth && displayedActionsCount.value > 0) {\n displayedActionsCount.value -= 1;\n\n hideActions(); // keep hiding until it fits\n }\n };\n\n watch([windowWidth, container], async ([newWidth, containerEl], [oldWidth]) => {\n if (!containerEl || !defaultActionsCount || newWidth > breakpoint) {\n return;\n }\n\n await nextTick();\n\n const isIncreasing = newWidth > oldWidth;\n\n if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n });\n\n return {\n displayedActionsCount,\n };\n};\n","<template>\n <div class=\"b-button-actions-with-menu\">\n <div\n ref=\"buttonActionsWithMenu\"\n role=\"group\"\n class=\"b-button-actions-with-menu__container-wrapper\"\n :class=\"conditionalClasses\"\n >\n <bento-button-actions :actions=\"computedActions\" :inverse=\"inverse\" :layout=\"actionsLayout\" />\n <bento-menu\n v-if=\"computedMenuActions.length\"\n ref=\"menu\"\n :data=\"computedMenuActions\"\n :menu-position=\"menuPosition\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoButtonActions } from '@/components/button';\n import { BentoMenuItem } from '@/components/menu/components/menu-item/menu-item.types';\n import { MENU_INVERSE_INJECTION_KEY } from '@/components/menu/menu.keys';\n import BentoMenu from '@/components/menu/menu.vue';\n import { computed, provide, ref, toRef } from 'vue';\n import { BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY } from './button-actions-with-menu.keys';\n import { ButtonActionsWithMenuProps } from './button-actions-with-menu.types';\n import { useResponsiveActions } from './composables/use-responsive-actions';\n\n const props = withDefaults(defineProps<ButtonActionsWithMenuProps>(), {\n actionsLayout: 'buttons-end',\n disableResponsiveBehavior: false,\n displayedActions: undefined,\n inverse: false,\n hideDisplayedActionsBreakpoint: 0,\n menuPosition: 'bottom-start',\n });\n\n const inverseRef = toRef(props, 'inverse');\n const buttonActionsWithMenu = ref<HTMLDivElement>(null);\n const menu = ref(null);\n const stackButtons = ref(false);\n\n const computedActions = computed(() => {\n const displayedActionsLimit = props.hideDisplayedActionsBreakpoint\n ? displayedActionsCount.value\n : props.displayedActions;\n\n return props.actions.slice(0, displayedActionsLimit);\n });\n const computedMenuRef = computed(() => menu?.value?.$el);\n\n const { displayedActionsCount } = useResponsiveActions({\n breakpoint: props.hideDisplayedActionsBreakpoint,\n container: buttonActionsWithMenu,\n defaultActionsCount: props.displayedActions,\n offset: computedMenuRef,\n });\n\n provide(MENU_INVERSE_INJECTION_KEY, inverseRef);\n\n if (!props.disableResponsiveBehavior) {\n provide(BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY, { buttonActionsWithMenu, menu, stackButtons });\n }\n\n const conditionalClasses = computed(() => ({\n [`b-button-actions-with-menu__container-wrapper--buttons-end`]: props.actionsLayout === 'buttons-end',\n [`b-button-actions-with-menu__container-wrapper--buttons-start`]: props.actionsLayout === 'buttons-start',\n [`b-button-actions-with-menu__container-wrapper--stacked-buttons`]: stackButtons.value,\n }));\n\n const computedMenuActions = computed(() =>\n displayedActionsCount.value !== undefined && displayedActionsCount.value < props.actions.length\n ? (props.actions.slice(displayedActionsCount.value, props.actions.length).map(el => ({\n text: el.title,\n handler: el.event,\n icon: el.icon,\n critical: el.critical,\n disabled: el.disabled,\n })) as BentoMenuItem[])\n : []\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * {\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * },\n * {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\"\n * :displayedActions=\"2\"\n * />\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions-with-menu.scss\" />\n"],"names":["useResponsiveActions","props","breakpoint","container","defaultActionsCount","offset","windowWidth","useWindowSize","displayedActionsCount","ref","AVERAGE_BUTTON_WIDTH","showActions","nextTick","availableSpace","totalActionWidth","_a","hideActions","watch","newWidth","containerEl","oldWidth","__default__","__props","inverseRef","toRef","buttonActionsWithMenu","menu","stackButtons","computedActions","computed","displayedActionsLimit","computedMenuRef","provide","MENU_INVERSE_INJECTION_KEY","BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY","conditionalClasses","computedMenuActions","el"],"mappings":";;;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAA,EAAA,YAAAC,GAAA,WAAAC,GAAA,qBAAAC,GAAA,QAAAC,EAAA,IAAAJ,GAEA,EAAA,OAAAK,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAAL,CAAA,GAEAM,IAAA,KAEAC,IAAA,YAAA;;AACI,UAAAC,EAAA;AAEA,UAAAC,IAAAV,EAAA,MAAA,aACAW,IAAAJ,IAAAF,EAAA,WAAAO,IAAAV,KAAA,gBAAAA,EAAA,UAAA,gBAAAU,EAAA,gBAAA,KAAAL;AAMA,IAAAG,KAAAC,KAAAN,EAAA,QAAAJ,MACII,EAAA,SAAA,GAEAG,EAAA;AAAA,EACJ,GAGJK,IAAA,YAAA;;AACI,UAAAJ,EAAA;AAEA,UAAAC,IAAAV,EAAA,MAAA,aACAW,IAAAJ,IAAAF,EAAA,WAAAO,IAAAV,KAAA,gBAAAA,EAAA,UAAA,gBAAAU,EAAA,gBAAA;AAGA,IAAAF,IAAAC,KAAAN,EAAA,QAAA,MACIA,EAAA,SAAA,GAEAQ,EAAA;AAAA,EACJ;AAGJ,SAAAC,EAAA,CAAAX,GAAAH,CAAA,GAAA,OAAA,CAAAe,GAAAC,CAAA,GAAA,CAAAC,CAAA,MAAA;AACI,QAAA,CAAAD,KAAA,CAAAf,KAAAc,IAAAhB;AACI;AAGJ,UAAAU,EAAA,GAEAM,IAAAE,IAGIT,EAAA,IAEAK,EAAA;AAAA,EACJ,CAAA,GAGJ;AAAA,IAAO,uBAAAR;AAAA,EACH;AAER,gDC0CIa,IAAA,CAAA;;;;;;;;;;;;;AAlFA,UAAApB,IAAAqB,GASAC,IAAAC,EAAAvB,GAAA,SAAA,GACAwB,IAAAhB,EAAA,IAAA,GACAiB,IAAAjB,EAAA,IAAA,GACAkB,IAAAlB,EAAA,EAAA,GAEAmB,IAAAC,EAAA,MAAA;AACI,YAAAC,IAAA7B,EAAA,iCAAAO,EAAA,QAAAP,EAAA;AAIA,aAAAA,EAAA,QAAA,MAAA,GAAA6B,CAAA;AAAA,IAAmD,CAAA,GAEvDC,IAAAF,EAAA,MAAA;;AAAA,cAAAd,IAAAW,KAAA,gBAAAA,EAAA,UAAA,gBAAAX,EAAA;AAAA,KAAA,GAEA,EAAA,uBAAAP,EAAA,IAAAR,EAAA;AAAA,MAAuD,YAAAC,EAAA;AAAA,MACjC,WAAAwB;AAAA,MACP,qBAAAxB,EAAA;AAAA,MACgB,QAAA8B;AAAA,IACnB,CAAA;AAGZ,IAAAC,EAAAC,GAAAV,CAAA,GAEAtB,EAAA,6BACI+B,EAAAE,GAAA,EAAA,uBAAAT,GAAA,MAAAC,GAAA,cAAAC,EAAA,CAAA;AAGJ,UAAAQ,IAAAN,EAAA,OAAA;AAAA,MAA2C,8DAAA5B,EAAA,kBAAA;AAAA,MACiD,gEAAAA,EAAA,kBAAA;AAAA,MACE,kEAAA0B,EAAA;AAAA,IACT,EAAA,GAGrFS,IAAAP;AAAA,MAA4B,MAAArB,EAAA,UAAA,UAAAA,EAAA,QAAAP,EAAA,QAAA,SAAAA,EAAA,QAAA,MAAAO,EAAA,OAAAP,EAAA,QAAA,MAAA,EAAA,IAAA,CAAAoC,OAAA;AAAA,QAEiE,MAAAA,EAAA;AAAA,QACtE,SAAAA,EAAA;AAAA,QACG,MAAAA,EAAA;AAAA,QACH,UAAAA,EAAA;AAAA,QACI,UAAAA,EAAA;AAAA,MACA,EAAA,IAAA,CAAA;AAAA,IAEhB;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button-actions-with-menu.8ZYh7-9s.js","sources":["../../../vue2/src/components/internal/button-actions-with-menu/composables/use-responsive-actions.ts","../../../vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue"],"sourcesContent":["import { useWindowSize } from '@vueuse/core';\nimport { nextTick, Ref, ref, watch } from 'vue';\n\ninterface UseResponsiveActionsProps {\n breakpoint?: number;\n container: Ref<HTMLElement>;\n defaultActionsCount: number;\n offset?: Ref<HTMLElement>;\n}\n\nexport const useResponsiveActions = (props: UseResponsiveActionsProps) => {\n const { breakpoint, container, defaultActionsCount, offset } = props;\n\n const { width: windowWidth } = useWindowSize();\n\n const displayedActionsCount = ref<number>(defaultActionsCount);\n\n const AVERAGE_BUTTON_WIDTH = 150; // button size + gap\n\n const showActions = async () => {\n await nextTick();\n\n const availableSpace = container.value.clientWidth;\n const totalActionWidth =\n AVERAGE_BUTTON_WIDTH * displayedActionsCount.value +\n (offset?.value?.offsetWidth ?? 0) +\n AVERAGE_BUTTON_WIDTH;\n\n // Only add actions if there's enough space and we haven't reached max\n if (availableSpace >= totalActionWidth && displayedActionsCount.value < defaultActionsCount) {\n displayedActionsCount.value += 1;\n\n showActions(); // keep trying to show more\n }\n };\n\n const hideActions = async () => {\n await nextTick();\n\n const availableSpace = container.value.clientWidth;\n const totalActionWidth = AVERAGE_BUTTON_WIDTH * displayedActionsCount.value + (offset?.value?.offsetWidth ?? 0);\n\n // Hide actions if they overflow the container\n if (availableSpace < totalActionWidth && displayedActionsCount.value > 0) {\n displayedActionsCount.value -= 1;\n\n hideActions(); // keep hiding until it fits\n }\n };\n\n watch([windowWidth, container], async ([newWidth, containerEl], [oldWidth]) => {\n if (!containerEl || !defaultActionsCount || newWidth > breakpoint) {\n return;\n }\n\n await nextTick();\n\n const isIncreasing = newWidth > oldWidth;\n\n if (isIncreasing) {\n showActions();\n } else {\n hideActions();\n }\n });\n\n return {\n displayedActionsCount,\n };\n};\n","<template>\n <div class=\"b-button-actions-with-menu\">\n <div\n ref=\"buttonActionsWithMenu\"\n role=\"group\"\n class=\"b-button-actions-with-menu__container-wrapper\"\n :class=\"conditionalClasses\"\n >\n <bento-button-actions :actions=\"computedActions\" :inverse=\"inverse\" :layout=\"actionsLayout\" />\n <bento-menu\n v-if=\"computedMenuActions.length\"\n ref=\"menu\"\n :data=\"computedMenuActions\"\n :menu-position=\"menuPosition\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoButtonActions } from '@/components/button';\n import { BentoMenuItem } from '@/components/menu/components/menu-item/menu-item.types';\n import { MENU_INVERSE_INJECTION_KEY } from '@/components/menu/menu.keys';\n import BentoMenu from '@/components/menu/menu.vue';\n import { computed, provide, ref, toRef } from 'vue';\n import { BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY } from './button-actions-with-menu.keys';\n import { ButtonActionsWithMenuProps } from './button-actions-with-menu.types';\n import { useResponsiveActions } from './composables/use-responsive-actions';\n\n const props = withDefaults(defineProps<ButtonActionsWithMenuProps>(), {\n actionsLayout: 'buttons-end',\n disableResponsiveBehavior: false,\n displayedActions: undefined,\n inverse: false,\n hideDisplayedActionsBreakpoint: 0,\n menuPosition: 'bottom-start',\n });\n\n const inverseRef = toRef(props, 'inverse');\n const buttonActionsWithMenu = ref<HTMLDivElement>(null);\n const menu = ref(null);\n const stackButtons = ref(false);\n\n const computedActions = computed(() => {\n const displayedActionsLimit = props.hideDisplayedActionsBreakpoint\n ? displayedActionsCount.value\n : props.displayedActions;\n\n return props.actions.slice(0, displayedActionsLimit);\n });\n const computedMenuRef = computed(() => menu?.value?.$el);\n\n const { displayedActionsCount } = useResponsiveActions({\n breakpoint: props.hideDisplayedActionsBreakpoint,\n container: buttonActionsWithMenu,\n defaultActionsCount: props.displayedActions,\n offset: computedMenuRef,\n });\n\n provide(MENU_INVERSE_INJECTION_KEY, inverseRef);\n\n if (!props.disableResponsiveBehavior) {\n provide(BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY, { buttonActionsWithMenu, menu, stackButtons });\n }\n\n const conditionalClasses = computed(() => ({\n [`b-button-actions-with-menu__container-wrapper--buttons-end`]: props.actionsLayout === 'buttons-end',\n [`b-button-actions-with-menu__container-wrapper--buttons-start`]: props.actionsLayout === 'buttons-start',\n [`b-button-actions-with-menu__container-wrapper--stacked-buttons`]: stackButtons.value,\n }));\n\n const computedMenuActions = computed(() =>\n displayedActionsCount.value !== undefined && displayedActionsCount.value < props.actions.length\n ? (props.actions.slice(displayedActionsCount.value, props.actions.length).map(el => ({\n text: el.title,\n handler: el.event,\n icon: el.icon,\n critical: el.critical,\n disabled: el.disabled,\n })) as BentoMenuItem[])\n : []\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * An internal button actions component with the option to display some of the actions in a menu.\n *\n * @example\n * <button-actions-with-menu\n * :actions=\"[\n * {\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n * variant: 'default',\n * external: true,\n * to: 'https://www.adyen.com/'\n * },\n * },\n * {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\"\n * :displayedActions=\"2\"\n * />\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions-with-menu.scss\" />\n"],"names":["useResponsiveActions","props","breakpoint","container","defaultActionsCount","offset","windowWidth","useWindowSize","displayedActionsCount","ref","AVERAGE_BUTTON_WIDTH","showActions","nextTick","availableSpace","totalActionWidth","_a","hideActions","watch","newWidth","containerEl","oldWidth","__default__","__props","inverseRef","toRef","buttonActionsWithMenu","menu","stackButtons","computedActions","computed","displayedActionsLimit","computedMenuRef","provide","MENU_INVERSE_INJECTION_KEY","BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY","conditionalClasses","computedMenuActions","el"],"mappings":";;;;;;AAUa,MAAAA,IAAA,CAAAC,MAAA;AACT,QAAA,EAAA,YAAAC,GAAA,WAAAC,GAAA,qBAAAC,GAAA,QAAAC,EAAA,IAAAJ,GAEA,EAAA,OAAAK,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAAL,CAAA,GAEAM,IAAA,KAEAC,IAAA,YAAA;;AACI,UAAAC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AAAA,MACjC,WAAAwB;AAAA,MACP,qBAAAxB,EAAA;AAAA,MACgB,QAAA8B;AAAA,IACnB,CAAA;AAGZ,IAAAC,EAAAC,GAAAV,CAAA,GAEAtB,EAAA,6BACI+B,EAAAE,GAAA,EAAA,uBAAAT,GAAA,MAAAC,GAAA,cAAAC,EAAA,CAAA;AAGJ,UAAAQ,IAAAN,EAAA,OAAA;AAAA,MAA2C,8DAAA5B,EAAA,kBAAA;AAAA,MACiD,gEAAAA,EAAA,kBAAA;AAAA,MACE,kEAAA0B,EAAA;AAAA,IACT,EAAA,GAGrFS,IAAAP;AAAA,MAA4B,MAAArB,EAAA,UAAA,UAAAA,EAAA,QAAAP,EAAA,QAAA,SAAAA,EAAA,QAAA,MAAAO,EAAA,OAAAP,EAAA,QAAA,MAAA,EAAA,IAAA,CAAAoC,OAAA;AAAA,QAEiE,MAAAA,EAAA;AAAA,QACtE,SAAAA,EAAA;AAAA,QACG,MAAAA,EAAA;AAAA,QACH,UAAAA,EAAA;AAAA,QACI,UAAAA,EAAA;AAAA,MACA,EAAA,IAAA,CAAA;AAAA,IAEhB;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as I, useSlots as F, ref as u, computed as d, watch as g, onUnmounted as L, createElementBlock as l, openBlock as a, createVNode as $, createElementVNode as f, unref as s, mergeProps as R, createSlots as H, withCtx as _, renderSlot as i, normalizeClass as C, createCommentVNode as W, createBlock as w, Fragment as M, renderList as U, onMounted as q } from "vue";
2
- import { B as E } from "./header.wiq0wlgm.js";
2
+ import { B as E } from "./header.CwKjDgKv.js";
3
3
  import { B as A, a as G } from "./tab.CAt51ksU.js";
4
4
  import { c as J } from "./index.FNUaPG4G.js";
5
5
  import { o as K } from "./resize.Bqks3WUm.js";
@@ -162,4 +162,4 @@ export {
162
162
  vt as a,
163
163
  pt as d
164
164
  };
165
- //# sourceMappingURL=dashboard-section.CUcq2ahu.js.map
165
+ //# sourceMappingURL=dashboard-section.Bhd5Lsy2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-section.CUcq2ahu.js","sources":["../../../vue2/src/templates/dashboard-template/dashboard-template.vue","../../../vue2/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 :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\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 = withDefaults(\n defineProps<{\n /**\n * The header that goes to the top of the template\n */\n header: BentoDashboardTemplateHeader;\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?: BentoDashboardTemplateTabs;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs?: boolean;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyFilters?: boolean;\n }>(),\n {\n tabs: undefined,\n stickyTabs: false,\n stickyFilters: false,\n }\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 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 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 computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\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 }\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 }\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 = withDefaults(\n defineProps<{\n /**\n * The header of the section\n */\n header: BentoDashboardTemplateHeader;\n\n /**\n * Renders the section to take only half of the page\n */\n halfWidth?: boolean;\n }>(),\n {\n halfWidth: false,\n }\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","props","__props","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;;;;GAqKIA,IAAA,CAAA;;;;;;;;;;AArHA,UAAAC,IAAAC,GA+BAC,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AAZ,EAAA,UACIH,EAAA,UAAAa,IAAAd,EAAA,UAAA,gBAAAc,EAAA,wBAAA,SAAA;AAAA,MACJ;AAAA,IACJ,GAGJO,EAAA,MAAA;AACI,MAAAnB,KAAA,QAAAA,EAAA;AAAA,IAAmC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGC/CvCoB,KAAA,CAAA;;;;;;;;AA1DA,UAAA9B,IAAAC,GAiBAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEA6B,IAAAlB,EAAA,OAAA;AAAA,MAA2C,mCAAAb,EAAA;AAAA,IACE,EAAA;AAG7C,WAAAgC,EAAA,MAAA;AACI,WAAA5B,EAAA,eAAA,KAAAA,EAAA,eAAA,MAAAJ,EAAA;AACI,cAAA,IAAA,MAAA,yEAAA;AAAA,IACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dashboard-section.Bhd5Lsy2.js","sources":["../../../vue2/src/templates/dashboard-template/dashboard-template.vue","../../../vue2/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 :sticky=\"stickyTabs\"\n :sticky-options=\"computedTabsOptions\"\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 = withDefaults(\n defineProps<{\n /**\n * The header that goes to the top of the template\n */\n header: BentoDashboardTemplateHeader;\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?: BentoDashboardTemplateTabs;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs?: boolean;\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyFilters?: boolean;\n }>(),\n {\n tabs: undefined,\n stickyTabs: false,\n stickyFilters: false,\n }\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 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 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 computedTabsOptions = computed(() => (tabsPosition.value ? { top: tabsPosition.value } : undefined));\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 }\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 }\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 = withDefaults(\n defineProps<{\n /**\n * The header of the section\n */\n header: BentoDashboardTemplateHeader;\n\n /**\n * Renders the section to take only half of the page\n */\n halfWidth?: boolean;\n }>(),\n {\n halfWidth: false,\n }\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","props","__props","slots","useSlots","hasSlot","useHasSlot","tabsRef","ref","filtersRef","isFiltersPinned","filtersElementObserver","tabsPosition","hasStickyFilters","computed","hasStickyTabs","dashboardFiltersConditionalClasses","dashboardTopSectionConditionalClasses","tabsSlots","el","getTabTitle","index","_b","_a","computedTabsOptions","y","useWindowScroll","watch","observeSizeOfElement","filtersHeight","onUnmounted","__default__","conditionalClasses","onMounted"],"mappings":";;;;;;;;;;;;GAqKIA,IAAA,CAAA;;;;;;;;;;AArHA,UAAAC,IAAAC,GA+BAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,EAAA;AACA,QAAAG,IAAA;AACA,UAAAC,IAAAJ,EAAA,CAAA,GAEAK,IAAAC,EAAA,MAAAL,EAAA,SAAAR,EAAA,aAAA,GACAc,IAAAD,EAAA,MAAAP,EAAA,SAAAN,EAAA,UAAA,GAEAe,IAAAF,EAAA,OAAA;AAAA,MAA2D,yCAAAb,EAAA;AAAA,MACR,8CAAAY,EAAA,SAAA,CAAAE,EAAA,SAAAL,EAAA;AAAA,IAEuB,EAAA,GAG1EO,IAAAH,EAAA,OAAA;AAAA,MAA8D,6CAAAb,EAAA,cAAAA,EAAA;AAAA,IACa,EAAA,GAG3EiB,IAAAJ,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAgB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAA,CAAAC,MAAA;;AAAA,eAAAC,KAAAC,IAAAtB,KAAA,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as N, createElementBlock as m, openBlock as c, createVNode as T, unref as n, mergeProps as _, toHandlers as O, withCtx as l, renderSlot as s, createElementVNode as j, createCommentVNode as x, createBlock as C, createSlots as P, normalizeClass as V, Fragment as w, renderList as L, toRef as g } from "vue";
2
- import { B as z } from "./header.wiq0wlgm.js";
2
+ import { B as z } from "./header.CwKjDgKv.js";
3
3
  import { B as F } from "./inspector.CoZCPfHC.js";
4
4
  import { B as J, a as K } from "./tab.CAt51ksU.js";
5
5
  import { u as M } from "./use-has-slot.B7eQSabc.js";
@@ -141,4 +141,4 @@ const q = { class: "b-data-grid-template" }, Q = { class: "b-data-grid-template_
141
141
  export {
142
142
  rt as d
143
143
  };
144
- //# sourceMappingURL=data-grid-template.CDsV2GFG.js.map
144
+ //# sourceMappingURL=data-grid-template.DSwj7e1E.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-grid-template.CDsV2GFG.js","sources":["../../../vue2/src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-inspector v-bind=\"computedInspectorProps\" ref=\"inspectorRef\" v-on=\"inspectorEvents\">\n <template #page>\n <div class=\"b-data-grid-template__header\">\n <slot name=\"header\">\n <bento-header v-bind=\"header\" variant=\"component\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n </slot>\n </div>\n\n <div\n v-if=\"hasSlot('additionalContent')\"\n ref=\"additionalContentRef\"\n class=\"b-data-grid-template__additional-content\"\n :class=\"additionalContentConditionalClasses\"\n >\n <slot name=\"additionalContent\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"stickyAdditionalContent ? { top: computedStickyAdditionalContentHeight } : null\"\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\n <slot v-else />\n </template>\n\n <template #content>\n <slot name=\"inspector-content\" />\n </template>\n </bento-inspector>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoHeader } from '@/components/header';\n import { BentoInspector } from '@/components/inspector';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateInspector,\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 default: undefined,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currenly 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 additional content slot with a sticky positioning\n */\n stickyAdditionalContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n\n /**\n * All the inspector properties that can be set on the inner inspector component.\n */\n inspector: {\n type: Object as PropType<BentoDataGridTemplateInspector>,\n default: undefined,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits update event when activeTabIndex changes internally\n */\n (e: 'update:tabs', value: BentoDataGridTemplateTabs): void;\n\n /**\n * Emits update event when the inspector's `isOpen` state changes\n */\n (e: 'update:is-open:inspector', value: boolean): void;\n\n /**\n * Emits update event when the inspector's `activePage` changes\n */\n (e: 'update:active-page:inspector', value: string): void;\n\n /**\n * Emits event when the inspector's expand button is clicked\n */\n (e: 'expand:inspector', value: boolean): void;\n }>();\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n const inspectorRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\n }));\n\n const computedInspectorProps = computed(() => ({\n title: '',\n ...props.inspector,\n }));\n\n const computedStickyAdditionalContentHeight = computed(() => additionalContentRef?.value?.offsetHeight);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const inspectorEvents = computed(() => ({\n 'update:is-open': (value: boolean) => emit('update:is-open:inspector', value),\n 'update:active-page': (value: string) => emit('update:active-page:inspector', value),\n expand: (value: boolean) => emit('expand:inspector', value),\n }));\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 stickyAdditionalContent: Ref<boolean> = toRef(props, 'stickyAdditionalContent');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n const additionalContentSlotRef: Ref<UnwrapRef<HTMLDivElement>> | null = additionalContentRef;\n\n // return values to the Tab component\n return {\n isDataGridTemplate,\n stickyTabs,\n tabsRef,\n stickyAdditionalContent,\n additionalContentSlotRef,\n };\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__","props","__props","slots","useSlots","hasSlot","useHasSlot","emit","__emit","tabsRef","ref","additionalContentRef","inspectorRef","additionalContentConditionalClasses","computed","computedInspectorProps","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","inspectorEvents","value","emitTabs","newActiveTabIndex","getTabTitle","index","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY","stickyTabs","toRef","stickyAdditionalContent"],"mappings":";;;;;;;;4FA2MIA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/IA,UAAAC,IAAAC,GA2CAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,GAsBAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GAEAG,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAb,EAAA;AAAA,IACE,EAAA,GAG9Dc,IAAAD,EAAA,OAAA;AAAA,MAA+C,OAAA;AAAA,MACpC,GAAAb,EAAA;AAAA,IACE,EAAA,GAGbe,IAAAF,EAAA,MAAA;;AAAA,cAAAG,IAAAN,KAAA,gBAAAA,EAAA,UAAA,gBAAAM,EAAA;AAAA,KAAA,GAEAC,IAAAJ,EAAA,MAAA;;AAAA,cAAAK,KAAAF,IAAAR,EAAA,UAAA,gBAAAQ,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAN,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAkB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAAR,EAAA,OAAA;AAAA,MAAwC,kBAAA,CAAAS,MAAAhB,EAAA,4BAAAgB,CAAA;AAAA,MACwC,sBAAA,CAAAA,MAAAhB,EAAA,gCAAAgB,CAAA;AAAA,MACO,QAAA,CAAAA,MAAAhB,EAAA,oBAAAgB,CAAA;AAAA,IACzB,EAAA,GAG9DC,IAAA,CAAAC,MAAA;AACI,MAAAlB,EAAA,eAAA,EAAA,GAAAN,EAAA,MAAA,gBAAAwB,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAR,KAAAF,IAAAhB,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAgB,EAAAU,OAAA,gBAAAR,EAAA,UAAA,OAAAQ,IAAA,CAAA;AAAA;AAmBA,WAAAC,EAAAC,GAjBA,MAAA;AAEI,YAAAC,IAAAC,EAAA9B,GAAA,YAAA,GACA+B,IAAAD,EAAA9B,GAAA,yBAAA;AAKA,aAAA;AAAA,QAAO;AAAA,QACH,YAAA6B;AAAA,QACA,SANJZ;AAAA,QAOI,yBAAAc;AAAA,QACA,0BAPJrB;AAAA,MAQI;AAAA,IACJ,CAGJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"data-grid-template.DSwj7e1E.js","sources":["../../../vue2/src/templates/data-grid-template/data-grid-template.vue"],"sourcesContent":["<template>\n <main class=\"b-data-grid-template\">\n <bento-inspector v-bind=\"computedInspectorProps\" ref=\"inspectorRef\" v-on=\"inspectorEvents\">\n <template #page>\n <div class=\"b-data-grid-template__header\">\n <slot name=\"header\">\n <bento-header v-bind=\"header\" variant=\"component\">\n <template v-if=\"hasSlot('infoIconTooltipContent')\" #infoIconTooltipContent>\n <slot name=\"infoIconTooltipContent\" />\n </template>\n </bento-header>\n </slot>\n </div>\n\n <div\n v-if=\"hasSlot('additionalContent')\"\n ref=\"additionalContentRef\"\n class=\"b-data-grid-template__additional-content\"\n :class=\"additionalContentConditionalClasses\"\n >\n <slot name=\"additionalContent\" />\n </div>\n\n <bento-tabs\n v-if=\"tabsSlots.length > 1\"\n ref=\"tabsRef\"\n :active-tab-index=\"tabs.activeTabIndex\"\n :sticky=\"stickyTabs\"\n :sticky-options=\"stickyAdditionalContent ? { top: computedStickyAdditionalContentHeight } : null\"\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\n <slot v-else />\n </template>\n\n <template #content>\n <slot name=\"inspector-content\" />\n </template>\n </bento-inspector>\n </main>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoHeader } from '@/components/header';\n import { BentoInspector } from '@/components/inspector';\n import { BentoTab, BentoTabs } from '@/components/tabs';\n import { useHasSlot } from '@/composables';\n import { computed, PropType, provide, Ref, ref, toRef, UnwrapRef, useSlots } from 'vue';\n import { DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY } from './data-grid-template.keys';\n import type {\n BentoDataGridTemplateDataGrid,\n BentoDataGridTemplateHeader,\n BentoDataGridTemplateInspector,\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 default: undefined,\n },\n\n /**\n * All the tab properties that can be set on the inner tab components.\n * - tabs.activeTabIndex: the currenly 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 additional content slot with a sticky positioning\n */\n stickyAdditionalContent: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Renders the tabs with a sticky positioning\n */\n stickyTabs: {\n type: Boolean,\n default: false,\n },\n\n /**\n * All the inspector properties that can be set on the inner inspector component.\n */\n inspector: {\n type: Object as PropType<BentoDataGridTemplateInspector>,\n default: undefined,\n },\n });\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const emit = defineEmits<{\n /**\n * Emits update event when activeTabIndex changes internally\n */\n (e: 'update:tabs', value: BentoDataGridTemplateTabs): void;\n\n /**\n * Emits update event when the inspector's `isOpen` state changes\n */\n (e: 'update:is-open:inspector', value: boolean): void;\n\n /**\n * Emits update event when the inspector's `activePage` changes\n */\n (e: 'update:active-page:inspector', value: string): void;\n\n /**\n * Emits event when the inspector's expand button is clicked\n */\n (e: 'expand:inspector', value: boolean): void;\n }>();\n\n const tabsRef = ref(null);\n const additionalContentRef = ref(null);\n const inspectorRef = ref(null);\n\n const additionalContentConditionalClasses = computed(() => ({\n 'b-data-grid-template__additional-content--sticky': props.stickyAdditionalContent,\n }));\n\n const computedInspectorProps = computed(() => ({\n title: '',\n ...props.inspector,\n }));\n\n const computedStickyAdditionalContentHeight = computed(() => additionalContentRef?.value?.offsetHeight);\n\n const computedTabsRef = computed(() => tabsRef.value?.$refs?.tablistwrapper);\n\n const tabsSlots = computed(() => Object.keys(slots).filter(el => el?.includes('tab-')));\n\n const inspectorEvents = computed(() => ({\n 'update:is-open': (value: boolean) => emit('update:is-open:inspector', value),\n 'update:active-page': (value: string) => emit('update:active-page:inspector', value),\n expand: (value: boolean) => emit('expand:inspector', value),\n }));\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 stickyAdditionalContent: Ref<boolean> = toRef(props, 'stickyAdditionalContent');\n const tabsRef: Ref<UnwrapRef<HTMLDivElement>> | null = computedTabsRef;\n const additionalContentSlotRef: Ref<UnwrapRef<HTMLDivElement>> | null = additionalContentRef;\n\n // return values to the Tab component\n return {\n isDataGridTemplate,\n stickyTabs,\n tabsRef,\n stickyAdditionalContent,\n additionalContentSlotRef,\n };\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__","props","__props","slots","useSlots","hasSlot","useHasSlot","emit","__emit","tabsRef","ref","additionalContentRef","inspectorRef","additionalContentConditionalClasses","computed","computedInspectorProps","computedStickyAdditionalContentHeight","_a","computedTabsRef","_b","tabsSlots","el","inspectorEvents","value","emitTabs","newActiveTabIndex","getTabTitle","index","provide","DATA_GRID_REGISTER_TEMPLATE_INJECTION_KEY","stickyTabs","toRef","stickyAdditionalContent"],"mappings":";;;;;;;;4FA2MIA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/IA,UAAAC,IAAAC,GA2CAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,GAsBAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,IAAA,GACAE,IAAAF,EAAA,IAAA,GAEAG,IAAAC,EAAA,OAAA;AAAA,MAA4D,oDAAAb,EAAA;AAAA,IACE,EAAA,GAG9Dc,IAAAD,EAAA,OAAA;AAAA,MAA+C,OAAA;AAAA,MACpC,GAAAb,EAAA;AAAA,IACE,EAAA,GAGbe,IAAAF,EAAA,MAAA;;AAAA,cAAAG,IAAAN,KAAA,gBAAAA,EAAA,UAAA,gBAAAM,EAAA;AAAA,KAAA,GAEAC,IAAAJ,EAAA,MAAA;;AAAA,cAAAK,KAAAF,IAAAR,EAAA,UAAA,gBAAAQ,EAAA,UAAA,gBAAAE,EAAA;AAAA,KAAA,GAEAC,IAAAN,EAAA,MAAA,OAAA,KAAAX,CAAA,EAAA,OAAA,CAAAkB,MAAAA,KAAA,gBAAAA,EAAA,SAAA,OAAA,CAAA,GAEAC,IAAAR,EAAA,OAAA;AAAA,MAAwC,kBAAA,CAAAS,MAAAhB,EAAA,4BAAAgB,CAAA;AAAA,MACwC,sBAAA,CAAAA,MAAAhB,EAAA,gCAAAgB,CAAA;AAAA,MACO,QAAA,CAAAA,MAAAhB,EAAA,oBAAAgB,CAAA;AAAA,IACzB,EAAA,GAG9DC,IAAA,CAAAC,MAAA;AACI,MAAAlB,EAAA,eAAA,EAAA,GAAAN,EAAA,MAAA,gBAAAwB,EAAA,CAAA;AAAA,IAAwE,GAG5EC,IAAA,CAAAC,MAAA;;AAAA,eAAAR,KAAAF,IAAAhB,KAAA,gBAAAA,EAAA,KAAA,SAAA,gBAAAgB,EAAAU,OAAA,gBAAAR,EAAA,UAAA,OAAAQ,IAAA,CAAA;AAAA;AAmBA,WAAAC,EAAAC,GAjBA,MAAA;AAEI,YAAAC,IAAAC,EAAA9B,GAAA,YAAA,GACA+B,IAAAD,EAAA9B,GAAA,yBAAA;AAKA,aAAA;AAAA,QAAO;AAAA,QACH,YAAA6B;AAAA,QACA,SANJZ;AAAA,QAOI,yBAAAc;AAAA,QACA,0BAPJrB;AAAA,MAQI;AAAA,IACJ,CAGJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ import { c as ml } from "./popper-container.types.BCZMbVFD.js";
11
11
  import { B as hl } from "./dashed-underline.DkzQkpaf.js";
12
12
  import { B as Ke, p as sn } from "./typography.DN5eC5ch.js";
13
13
  import { u as Ue } from "./i18n.B6g5VX0q.js";
14
- import { B as Cl } from "./action-bar.C93kgr7l.js";
14
+ import { B as Cl } from "./action-bar.CflF49oL.js";
15
15
  import { B as wl } from "./pagination.fYQak4C8.js";
16
16
  import { B as Ct } from "./loading-indicator.DEepb9Wl.js";
17
17
  import { u as wt } from "./use-has-slot.B7eQSabc.js";
@@ -33,7 +33,7 @@ import { S as Ol } from "./search.PczW-onY.js";
33
33
  import { B as bt } from "./toggle-button.NQwrfSr1.js";
34
34
  import { B as nt } from "./checkbox.DGrG3GN1.js";
35
35
  import { B as Tl } from "./info-icon.DprUQ9fj.js";
36
- import { B as ct, O as Nl, D as Il } from "./menu.C-3obPGl.js";
36
+ import { B as ct, O as Nl, D as Il } from "./menu.EtjeOPXX.js";
37
37
  import { B as Mt } from "./popover.types.V8old-GW.js";
38
38
  import { A as $l } from "./dialog-page.C80HOigq.js";
39
39
  import { H as Dl, S as kl } from "./show.CT4Augxb.js";
@@ -1254,8 +1254,7 @@ const zo = /* @__PURE__ */ ae(Mo, [["render", Uo]]), gn = {
1254
1254
  onInput: W[0] || (W[0] = (ee) => d.$emit(o(te).DESELECT_ALL))
1255
1255
  }, null, 8, ["aria-label", "model-value"])) : (u(), G(o(ct), {
1256
1256
  key: 1,
1257
- "aria-label": o(l)("selectAllMenu"),
1258
- button: { variant: "tertiary", condensed: !0 },
1257
+ button: { variant: "tertiary", condensed: !0, "aria-label": o(l)("selectAllMenu") },
1259
1258
  data: T.value,
1260
1259
  class: "b-data-grid-columns__select-column-menu",
1261
1260
  "disable-arrow-down-opening-menu": "",
@@ -1280,7 +1279,7 @@ const zo = /* @__PURE__ */ ae(Mo, [["render", Uo]]), gn = {
1280
1279
  ])
1281
1280
  ]),
1282
1281
  _: 1
1283
- }, 8, ["aria-label", "data"]))
1282
+ }, 8, ["button", "data"]))
1284
1283
  ], 64)) : B("", !0)
1285
1284
  ], 2)) : (u(), L(ve, { key: 1 }, [
1286
1285
  O("div", {
@@ -1376,7 +1375,7 @@ const zo = /* @__PURE__ */ ae(Mo, [["render", Uo]]), gn = {
1376
1375
  ], 64)) : B("", !0)
1377
1376
  ], 2));
1378
1377
  }
1379
- }), Yo = /* @__PURE__ */ ae(Ko, [["__scopeId", "data-v-15a1b61b"]]);
1378
+ }), Yo = /* @__PURE__ */ ae(Ko, [["__scopeId", "data-v-5b2a1205"]]);
1380
1379
  var ke = /* @__PURE__ */ ((e) => (e.CONFIG_SETTINGS = "config-settings", e.UPDATE_COLUMNS = "update:columns", e))(ke || {});
1381
1380
  let Kt = 0;
1382
1381
  const Xo = {
@@ -3858,4 +3857,4 @@ export {
3858
3857
  z as f,
3859
3858
  lt as g
3860
3859
  };
3861
- //# sourceMappingURL=data-grid.BbZSu-mA.js.map
3860
+ //# sourceMappingURL=data-grid.BEdELRNZ.js.map