@adyen/bento-vue2 1.68.0 → 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.
- package/dist/@types/index.d.ts +296 -25
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/menu.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/popover.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/chunks/{action-bar.Dy6tfK8c.js → action-bar.DQb7WVVd.js} +2 -2
- package/dist/chunks/{action-bar.Dy6tfK8c.js.map → action-bar.DQb7WVVd.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CcxUTbsI.js → button-actions-with-menu.nPj7sdGE.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.CcxUTbsI.js.map → button-actions-with-menu.nPj7sdGE.js.map} +1 -1
- package/dist/chunks/{dashboard-section.DBT99mLj.js → dashboard-section.BIe6eVHq.js} +2 -2
- package/dist/chunks/{dashboard-section.DBT99mLj.js.map → dashboard-section.BIe6eVHq.js.map} +1 -1
- package/dist/chunks/{data-grid-template.B2lDfM2o.js → data-grid-template.Co0Ecr79.js} +2 -2
- package/dist/chunks/{data-grid-template.B2lDfM2o.js.map → data-grid-template.Co0Ecr79.js.map} +1 -1
- package/dist/chunks/{data-grid.B7Z9_WDY.js → data-grid.erxjh5TN.js} +5 -5
- package/dist/chunks/data-grid.erxjh5TN.js.map +1 -0
- package/dist/chunks/{header-with-views.Bxvu8mq_.js → header-with-views.BUQ-MlAq.js} +3 -3
- package/dist/chunks/{header-with-views.Bxvu8mq_.js.map → header-with-views.BUQ-MlAq.js.map} +1 -1
- package/dist/chunks/{header.DvHS-PnC.js → header.uyxNdQa3.js} +2 -2
- package/dist/chunks/{header.DvHS-PnC.js.map → header.uyxNdQa3.js.map} +1 -1
- package/dist/chunks/{menu.dX3_vU05.js → menu.D0OQgk40.js} +143 -143
- package/dist/chunks/menu.D0OQgk40.js.map +1 -0
- package/dist/chunks/popover.types.CBqyA4ly.js.map +1 -1
- package/dist/chunks/{tutorial.DRRfp81j.js → tutorial.CxrGhLS7.js} +2 -2
- package/dist/chunks/{tutorial.DRRfp81j.js.map → tutorial.CxrGhLS7.js.map} +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +8 -8
- package/dist/internal.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +2 -2
- package/package.json +2 -2
- package/dist/chunks/data-grid.B7Z9_WDY.js.map +0 -1
- package/dist/chunks/menu.dX3_vU05.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.D0OQgk40.js","sources":["../../src/components/menu/menu.keys.ts","../../../ui-assets/icons-16/dist/vue/options-vertical.vue","../../src/components/menu/components/menu-item/menu-item.vue","../../src/components/menu/menu.types.ts","../../src/components/data-grid/components/data-grid-cell/data-grid-cell.keys.ts","../../src/components/menu/components/menu-list-container/menu-list-container.vue","../../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../../src/components/menu/composables/use-dynamic-menu-size/use-dynamic-menu-size.ts","../../src/components/menu/components/menu-item-list/menu-item-list.vue","../../src/components/menu/menu.vue"],"sourcesContent":["export const MENU_INVERSE_INJECTION_KEY = Symbol('menu inverse style injection key');\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#001222\" d=\"M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z\"/><path fill=\"#001222\" d=\"M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z\"/><path fill=\"#001222\" d=\"M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z\"/></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"computedSecondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ computedSecondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { truncate } from '@/utils/ts/truncate';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const MAX_SECONDARY_TEXT_LENGTH = 10;\n\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const computedSecondaryText = computed(() => truncate(props.secondaryText, MAX_SECONDARY_TEXT_LENGTH));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n computedSecondaryText,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { OnClickOutsideOptions } from '@/directives/click-outside/types';\nimport { BentoButton } from '../button';\nimport { BentoPopoverPositions } from '../popover';\nimport { BentoMenuItem } from './components';\nimport { HTMLAttributes } from 'vue';\n\nexport * from './components/menu-item/menu-item.types';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n 'aria-label'?: HTMLAttributes['aria-label'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n variant?: ButtonProps['variant'];\n};\n\nexport interface BentoMenuProps {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button?: BentoMenuButtonProps;\n /**\n * Controls if the menu should close when an item is clicked.\n * Defaults to `true`.\n */\n closeMenuOnItemSelect?: boolean;\n /**\n * The data to be displayed in the list\n */\n data: BentoMenuItem[];\n /**\n * Disables opening the menu when the down arrow key is pressed.\n */\n disableArrowDownOpeningMenu?: boolean;\n /**\n * The position of where the menu should open.\n */\n menuPosition?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning?: boolean;\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth?: number;\n /**\n * Returns focus to the menu button after popover is closed.\n * Disable if focus management is delegated to the parent component.\n * Defaults to `true`.\n */\n revertFocusToButton?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n */\n teleport?: boolean;\n /**\n * Can be used to set the inner teleport component to render the menu's popover in the root `body` DOM node\n * (or `dialog` if popover is inside a dialog).\n *\n * @see {@link OnClickOutsideOptions}\n */\n closeOnClickOutsideOptions?: OnClickOutsideOptions;\n}\n","export const DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY = Symbol('menu registering injection key');\n","<template>\n <div\n ref=\"menuListContainerRef\"\n class=\"b-menu-list-container\"\n data-testid=\"menu-list-container\"\n v-on=\"menuListContainerEvents\"\n ><slot></slot\n ></div>\n</template>\n\n<script setup lang=\"ts\">\n import { DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.keys';\n import { inject, ref } from 'vue';\n import type { DataGridCellRegisterMenu } from '@/components/data-grid/components/data-grid-cell/data-grid-cell.types';\n\n const menuListContainerRef = ref<HTMLDivElement>();\n const menuListContainerEvents = ref({});\n const registeringAndMousingOut = inject<DataGridCellRegisterMenu | false>(\n DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY,\n false\n );\n\n // This is needed by the DataGridCell component in order to keep track of if a teleported menu\n // is being hovered over in the DataGridCellActions.\n if (registeringAndMousingOut) {\n const { registerMenuContainerElement } = registeringAndMousingOut;\n registerMenuContainerElement(menuListContainerRef);\n menuListContainerEvents.value = {\n mouseleave: registeringAndMousingOut?.menuMouseLeave,\n };\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default {\n name: 'bento-menu-list-container',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li v-for=\"(item, index) in computedItems\" :key=\"`sub-menu-item-list-item-${index}`\" role=\"none\">\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-sub-menu-item-list__divider\" />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n addDivider: true,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","import { computed, type CSSProperties, nextTick, type Ref, ref, watch } from 'vue';\n\n// Helper type for the expected shape of the sub-menu ref\ninterface SubMenuRef {\n $el: HTMLElement;\n}\n\n/**\n * A composable that dynamically calculates the width and height for a menu container\n * based on the content of a conditionally rendered sub-menu.\n *\n * @param subMenuItemListRef A ref to the sub-menu component instance(s).\n * @param visibleSubMenuIndex A ref indicating which sub-menu is visible.\n * @param showSubMenu A ref indicating if any sub-menu is visible.\n * @returns A computed style object to be bound to the menu container.\n */\nexport function useDynamicMenuSize(\n subMenuItemListRef: Ref<SubMenuRef[] | null>,\n visibleSubMenuIndex: Ref<number | null>,\n showSubMenu: Ref<boolean>\n) {\n const MAX_MENU_WIDTH = 350;\n const MIN_MENU_WIDTH = 150;\n\n const subMenuWidth = ref(0);\n const subMenuHeight = ref(0);\n\n /**\n * Calculates an element's dimensions in stages using an invisible clone\n * to prevent visual flicker.\n *\n * 1. **Clone**: Creates a 'ghost' copy of the element and adds it to the\n * DOM invisibly.\n * 2. **Measure Ideal Width**: Sets the ghost's width to 'max-content' to find\n * its natural, unwrapped width.\n * 3. **Calculate Final Width**: Clamps the ideal width between the defined\n * MIN and MAX constants.\n * 4. **Measure Final Height**: Applies the final clamped width to the ghost,\n * allowing content to wrap, and then measures the resulting height.\n * 5. **Cleanup**: Removes the ghost element from the DOM.\n */\n const measureSubMenuStyle = (element: HTMLElement) => {\n if (!element || !element.parentElement) {\n return;\n }\n\n // Mount it on the parent element to allow proper height size, otherwise it will be 0\n const parent = element.parentElement;\n\n // Measure the unwrapped width\n const ghost = element.cloneNode(true) as HTMLElement;\n ghost.style.position = 'absolute';\n ghost.style.visibility = 'hidden';\n parent.appendChild(ghost);\n\n // Measure the unwrapped width\n ghost.style.width = 'max-content';\n const unwrappedWidth = ghost.offsetWidth;\n\n // Calculate and store the FINAL clamped width\n const clampedWidth = Math.max(MIN_MENU_WIDTH, Math.min(unwrappedWidth, MAX_MENU_WIDTH));\n subMenuWidth.value = clampedWidth;\n\n // Measure the wrapped height using the final width\n ghost.style.width = `${clampedWidth}px`;\n const height = ghost.offsetHeight;\n\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n\n parent.removeChild(ghost);\n // Update the height ref with the correct, wrapped height\n subMenuHeight.value = height;\n };\n\n watch([visibleSubMenuIndex, showSubMenu], async ([newIndex]) => {\n if (newIndex !== null) {\n await nextTick();\n\n const subMenuElement = subMenuItemListRef.value?.[0]?.$el;\n if (subMenuElement) {\n measureSubMenuStyle(subMenuElement);\n }\n } else {\n subMenuWidth.value = 0;\n subMenuHeight.value = 0;\n }\n });\n\n const computedStyle = computed<CSSProperties>(() => {\n const style: CSSProperties = { width: 'max-content' };\n\n if (showSubMenu.value) {\n if (subMenuHeight.value > 0) {\n style.height = `${subMenuHeight.value}px`;\n }\n if (subMenuWidth.value > 0) {\n style.width = `${subMenuWidth.value}px`;\n }\n }\n\n return style;\n });\n\n return { computedStyle };\n}\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"computedStyle\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n ref=\"menuItemRef\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"menuItemClick(item, index)\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-menu-item-list__divider\" />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, ref } from 'vue';\n import { isVue3 } from 'vue-demi';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n import { useDynamicMenuSize } from '../../composables';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, closes the menu when an item is clicked.\n */\n closeMenuOnItemSelect: {\n type: Boolean,\n default: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, 'menu-item-click'],\n setup(props, { emit, expose }) {\n const menuItemRef = ref(null);\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = async () => {\n // vue 3 requires nextTick to be called before an item can be focused\n // this function does not need to be awaited itself\n\n if (isVue3) {\n await nextTick();\n }\n\n menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n };\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const menuItemClick = (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n\n return;\n }\n\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n\n if (!item.skipClose && props.closeMenuOnItemSelect !== false) {\n closeMenu();\n }\n\n emit('menu-item-click');\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n expose({\n focusItem,\n });\n\n const { computedStyle } = useDynamicMenuSize(subMenuItemListRef, visibleSubMenuIndex, showSubMenu);\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n menuItemRef,\n\n computedData,\n computedStyle,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n menuItemClick,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","<template>\n <div\n :class=\"computedClasses\"\n class=\"b-menu\"\n data-testid=\"menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu()\"\n >\n <bento-toggle-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"computedButtonPropsWithDefaults\"\n :aria-controls=\"showMenu ? menuId : null\"\n :toggled=\"showMenu\"\n :inverse=\"isInverseColorSet\"\n @click=\"toggleShowMenu\"\n >\n <template v-if=\"!hasSlot('default') || hasSlot('iconLeft')\" #iconLeft>\n <slot name=\"iconLeft\">\n <options-vertical-icon :title=\"t('menuButton')\" />\n </slot>\n </template>\n <template v-if=\"hasSlot('default')\" #default>\n <slot />\n </template>\n <template v-if=\"hasSlot('default')\" #iconRight>\n <chevron-down-icon />\n </template>\n </bento-toggle-button>\n\n <bento-teleport v-if=\"menuButtonRef\" :disabled=\"!teleport\">\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n ref=\"popoverRef\"\n :role=\"null\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n :teleport=\"teleport\"\n without-space\n >\n <menu-item-list\n ref=\"menuItemListRef\"\n :close-menu-on-item-select=\"closeMenuOnItemSelect\"\n :data=\"data\"\n :focus-last-element=\"isLastElementFocused\"\n @close=\"closeMenu\"\n @menu-item-click=\"menuItemClick\"\n />\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoToggleButton } from '@/components/button';\n import { DIVIDER_INVERSE_INJECTION_KEY } from '@/components/divider/divider.keys';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { useClickOutside, useHasSlot } from '@/composables';\n import { generateUid } from '@/core/utils/ts';\n import { BentoTeleport } from '@/internal';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { computed, inject, nextTick, onMounted, provide, ref, useSlots } from 'vue';\n import { MenuItemList } from './components';\n import { MENU_INVERSE_INJECTION_KEY } from './menu.keys';\n import { BentoMenuButtonProps, BentoMenuEvent, BentoMenuProps } from './menu.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n button: { default: () =>\n ({\n variant: 'secondary',\n }) as BentoMenuButtonProps },\n closeMenuOnItemSelect: { type: Boolean, default: true },\n data: null,\n disableArrowDownOpeningMenu: { type: Boolean, default: false },\n menuPosition: { default: BentoPopoverPositions.BOTTOM_START },\n menuFixedPositioning: { type: Boolean, default: false },\n menuWidth: { default: null },\n revertFocusToButton: { type: Boolean, default: true },\n teleport: { type: Boolean, default: false },\n closeOnClickOutsideOptions: { default: undefined }\n});\n\n const emit = defineEmits([\"menu-item-click\", \"click-outside\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const menuButtonRef = ref(null);\n const menuItemListRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const popoverRef = ref<HTMLElement>(null);\n const menuId = generateUid('menu');\n\n const isInverseColorSet = inject(MENU_INVERSE_INJECTION_KEY, ref(false));\n provide(DIVIDER_INVERSE_INJECTION_KEY, isInverseColorSet);\n\n const computedClasses = computed(() => ({\n 'b-menu--inverse': isInverseColorSet.value,\n }));\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n const computedButtonPropsWithDefaults = computed<BentoMenuButtonProps>(() => {\n if (!props?.button) {\n return undefined;\n }\n return {\n variant: 'secondary',\n ...props.button,\n };\n });\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = async (revertFocus = props.revertFocusToButton) => {\n if (!showMenu.value) {\n return;\n }\n\n showMenu.value = false;\n\n if (revertFocus) {\n // ensure that menu is closed and re-rendering is completed before focusing\n await nextTick();\n\n menuButtonRef.value?.$el?.focus();\n }\n\n emit(BentoMenuEvent.CLOSE);\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = false;\n if (!props.disableArrowDownOpeningMenu) {\n openMenu();\n }\n };\n\n const onKeyUp = (event: KeyboardEvent) => {\n event.preventDefault();\n\n isLastElementFocused.value = true;\n openMenu();\n };\n\n const menuItemClick = () => {\n emit('menu-item-click');\n };\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(\n popoverRef,\n () => {\n closeMenu();\n emit('click-outside');\n },\n {\n ...props.closeOnClickOutsideOptions,\n ignore: [menuButtonRef, ...(props.closeOnClickOutsideOptions?.ignore ?? [])],\n }\n );\n\n defineExpose({\n /**\n * Control to enable programmatic closing of the menu\n */\n closeMenu,\n });\n\n onMounted(() => {\n if (hasSlot('iconRight')) {\n printDevelopmentWarning(\n '\"bento-menu\" no longer supports the \"iconRight\" slot. The right-aligned icon is now fixed by design.'\n );\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-menu',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["MENU_INVERSE_INJECTION_KEY","uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","conditionalClasses","computed","computedSecondaryText","truncate","e","BentoMenuEvent","BentoMenuEvent2","DATA_GRID_CELL_MENU_REGISTERING_INJECTION_KEY","__default__$1","menuListContainerRef","ref","menuListContainerEvents","registeringAndMousingOut","inject","registerMenuContainerElement","_sfc_main$2","messages","BentoDivider","MenuItem","MenuListContainer","subMenuItemListRefLocal","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","useDynamicMenuSize","subMenuItemListRef","visibleSubMenuIndex","showSubMenu","subMenuWidth","subMenuHeight","measureSubMenuStyle","element","parent","ghost","unwrappedWidth","clampedWidth","height","watch","newIndex","nextTick","subMenuElement","style","_sfc_main$1","SubMenuItemList","expose","menuItemRef","menuItemListRef","menuItemListWrapperRef","focusedIndex","hasMenuItemsWithIcon","computedData","indent","menuItemClick","item","index","focusRight","focusLeft","computedStyle","__default__","slots","useSlots","hasSlot","useHasSlot","t","useI18n","menuButtonRef","showMenu","isLastElementFocused","popoverRef","menuId","generateUid","isInverseColorSet","provide","DIVIDER_INVERSE_INJECTION_KEY","computedClasses","computedMenuWidth","computedButtonPropsWithDefaults","openMenu","revertFocus","toggleShowMenu","onKeyDown","event","onKeyUp","useClickOutside","printDevelopmentWarning"],"mappings":";;;;;;;;;;;;;;;;;;;AAAa,MAAAA,KAAA,OAAA,kCAAA;ACOb,IAAAC,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA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sources":["../../src/components/popover/popover.types.ts"],"sourcesContent":["import { PopperContainerPosition } from '../popper-container';\nimport type { Placement } from '@floating-ui/vue';\nimport type {\n BentoButtonActionsLayout,\n BentoButtonActionsList,\n} from '../button/components/button-actions/button-actions.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n\nexport interface BentoPopoverProps {\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines a string value that provides an accessible name for the popover.\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider?: boolean;\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap?: boolean;\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible?: boolean;\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition?: Placement[];\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent?: boolean;\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning?: boolean;\n\n /**\n * Toggles the popover open and closed\n */\n open?: boolean;\n\n /**\n * Displays the popover in a large size.\n */\n large?: boolean;\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers?: unknown[];\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n\n /**\n * Displays the popover in a small size.\n */\n small?: boolean;\n\n /**\n * Indicates the title you want to give the popover.\n */\n title?: string;\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement:
|
|
1
|
+
{"version":3,"file":"popover.types.CBqyA4ly.js","sources":["../../src/components/popover/popover.types.ts"],"sourcesContent":["import { PopperContainer, PopperContainerPosition } from '../popper-container';\nimport type { Placement } from '@floating-ui/vue';\nimport type {\n BentoButtonActionsLayout,\n BentoButtonActionsList,\n} from '../button/components/button-actions/button-actions.types';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoPopoverPositions = { ...PopperContainerPosition };\nexport type BentoPopoverPositions = PopperContainerPosition;\n\nexport interface BentoPopoverProps {\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions?: BentoButtonActionsList;\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n actionsLayout?: BentoButtonActionsLayout | `${BentoButtonActionsLayout}`;\n\n /**\n * Defines a string value that provides an accessible name for the popover.\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n ariaLabel?: string;\n\n /**\n * Adds a divider line to the actions section, reduces the top/bottom paddings and removes all padding in the \"default\" slot.\n */\n divider?: boolean;\n\n /**\n * Supports disabling focus trap functionality to avoid scroll into view behavior when we don't need it.\n * */\n disableFocusTrap?: boolean;\n\n /**\n * Adds a \"dismiss\" icon that triggers the \"dismiss\" event. Requires the `title` prop to be set.\n */\n dismissible?: boolean;\n\n /**\n * Allows to configure to fallback position to the one specified, it could be ['right', 'top', ...].\n * Useful when not using auto as starting placement.\n * https://floating-ui.com/docs/flip#fallbackplacements\n */\n fallbackPosition?: Placement[];\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent?: boolean;\n\n /**\n * Instructs popover to be visible outside of the containing container.\n * Useful when component would be used in limited containers like Modal, Side panel, etc.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n fixedPositioning?: boolean;\n\n /**\n * Toggles the popover open and closed\n */\n open?: boolean;\n\n /**\n * Displays the popover in a large size.\n */\n large?: boolean;\n\n /**\n * @deprecated\n * NOTE: This property no longer functions since moving to the floating-ui framework.\n */\n modifiers?: unknown[];\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position?: BentoPopoverPositions | `${BentoPopoverPositions}`;\n\n /**\n * Displays the popover in a small size.\n */\n small?: boolean;\n\n /**\n * Indicates the title you want to give the popover.\n */\n title?: string;\n\n /**\n * Popover's target element.\n * The popover will position itself relatively to target element, in specified position.\n */\n targetElement: InstanceType<typeof PopperContainer>['$props']['targetElement'];\n\n /**\n * Displays the popover without padding.\n */\n withoutSpace?: boolean;\n\n /**\n * Allows content to appear outside of the popover. Used when there are nested popovers.\n */\n overflowVisible?: boolean;\n}\n"],"names":["BentoPopoverPositions","PopperContainerPosition"],"mappings":";AAUa,MAAAA,IAAwB,EAAE,GAAGC,EAAwB;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as h, ref as f, computed as a, isRef as F, watch as g, nextTick as $ } from "vue";
|
|
2
|
-
import { B as k } from "./menu.
|
|
2
|
+
import { B as k } from "./menu.D0OQgk40.js";
|
|
3
3
|
import { B as I } from "./popover.Bo4Bkudr.js";
|
|
4
4
|
import { B as S } from "./popover.types.CBqyA4ly.js";
|
|
5
5
|
import { B as w } from "./typography.J1v_SPG3.js";
|
|
@@ -346,4 +346,4 @@ const Ot = lt.exports;
|
|
|
346
346
|
export {
|
|
347
347
|
Ot as t
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=tutorial.
|
|
349
|
+
//# sourceMappingURL=tutorial.CxrGhLS7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.DRRfp81j.js","sources":["../../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../ui-assets/icons-16/dist/vue/blocked.vue","../../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-blocked__a' + uuid + ')'\"><path fill=\"#001222\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits([\"next\", \"finish\", \"restart\"]);\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: t('skipTour'),\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, i) in steps\"\n v-bind=\"getPopoverProps(step, i)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, watch } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The current step index. If provided, will start the tutorial in that step.\n */\n index: {\n type: Number,\n default: null,\n },\n\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const emit = defineEmits([\"update:index\"]);\n\n const currentStep = ref(props.index || 0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n\n watch(currentStep, step => {\n emit('update:index', step);\n });\n\n watch(\n () => props.index,\n value => {\n if (value >= -1 && value <= totalSteps.value) {\n currentStep.value = value;\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_sfc_main$2","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAA,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAC,IAAA;AAAA,MAAmBC,EAAA;AAAA,MACVC,EAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,GAAAC,GAAA,GAAAC,GAAA,UAAAC,EAAA,MAAA;AAEF,gBAAAC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,EAAA,gBAAAd;AAAA,WAKrB,MAAA4B,EAAA,IAGJlB,EAAA,QAAAgB,GACAf,EAAA,QAAAe;AAAA,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;uBCxItBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAxEAC,IAAA7C,EAAA6B,EAAA,SAAA,CAAA,GAEAiB,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA,QACV,eAAApB,EAAA;AAAA;AAAA,QACQ,QAAAqB,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA7B,EAAA,gBAAA6B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"tutorial.CxrGhLS7.js","sources":["../../src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../ui-assets/icons-16/dist/vue/blocked.vue","../../src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../src/components/tutorial/tutorial.vue"],"sourcesContent":["<template>\n <popper-container\n :target-element=\"targetElement\"\n :middleware=\"middleware\"\n position=\"top-start\"\n fixed-positioning\n disabled-focus-trap\n class=\"b-tutorial-indicator\"\n data-testid=\"tutorial-indicator\"\n >\n <div class=\"b-tutorial-indicator__highlight\" :style=\"computedStyles\"></div>\n </popper-container>\n</template>\n\n<script setup lang=\"ts\">\n import { ref } from 'vue';\n import { hide, type Middleware, offset } from '@floating-ui/vue';\n import { PopperContainer } from '@/components/popper-container';\n\n const BORDER_OFFSET = 2;\n\n defineProps({\n /**\n * Tutorial indicator's target element.\n * The indicator will position itself around the target element.\n */\n targetElement: {\n type: PopperContainer.props?.targetElement.type,\n required: true,\n },\n });\n\n const computedStyles = ref({\n width: '0',\n height: '0',\n borderRadius: '0',\n });\n\n function getBorderRadius(element: HTMLElement) {\n try {\n const radius = parseFloat(getComputedStyle(element).getPropertyValue('border-radius'));\n return Number.isNaN(radius) ? '' : `${radius + 2 * BORDER_OFFSET}px`;\n } catch {\n return '';\n }\n }\n\n const middleware = [\n hide(),\n offset({\n mainAxis: BORDER_OFFSET,\n alignmentAxis: -BORDER_OFFSET,\n }),\n {\n name: 'updateIndicatorSize',\n fn: ({ x, y, elements }) => {\n const target = elements.reference as HTMLElement;\n computedStyles.value.width = `${target.offsetWidth + 4 * BORDER_OFFSET}px`;\n computedStyles.value.height = `${target.offsetHeight + 4 * BORDER_OFFSET}px`;\n computedStyles.value.borderRadius = getBorderRadius(target);\n return { x, y };\n },\n } as Middleware,\n ];\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-indicator.scss\" />\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><g :clip-path=\"'url(#uia-ui-assets/icons-16-blocked__a' + uuid + ')'\"><path fill=\"#001222\" d=\"M9.51195 0.398918C8.00859 0.0998821 6.45033 0.253358 5.0342 0.839937C3.61808 1.42652 2.40769 2.41985 1.55611 3.69433C0.704529 4.96881 0.25 6.4672 0.25 8C0.25 10.0554 1.06652 12.0267 2.51992 13.4801C3.97333 14.9335 5.94457 15.75 8 15.75C9.53281 15.75 11.0312 15.2955 12.3057 14.4439C13.5801 13.5923 14.5735 12.3819 15.1601 10.9658C15.7466 9.54967 15.9001 7.99141 15.6011 6.48805C15.3021 4.9847 14.5639 3.60378 13.4801 2.51993C12.3962 1.43607 11.0153 0.697953 9.51195 0.398918ZM5.60823 2.22576C6.75027 1.75271 8.00693 1.62894 9.21931 1.8701C10.4317 2.11125 11.5453 2.70651 12.4194 3.58059C13.2935 4.45466 13.8887 5.56831 14.1299 6.78069C14.3711 7.99307 14.2473 9.24974 13.7742 10.3918C13.5555 10.9198 13.2667 11.4124 12.9177 11.8573L4.14271 3.0823C4.58761 2.73333 5.08018 2.44448 5.60823 2.22576ZM3.08208 4.14298L11.857 12.9179C11.7327 13.0154 11.6044 13.1085 11.4723 13.1967C10.4445 13.8834 9.23613 14.25 8 14.25C6.3424 14.25 4.75268 13.5915 3.58058 12.4194C2.40848 11.2473 1.75 9.65761 1.75 8C1.75 6.76387 2.11656 5.5555 2.80331 4.52769C2.89155 4.39564 2.98456 4.26733 3.08208 4.14298Z\"/></g><defs><clipPath :id=\"'uia-ui-assets/icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n","<template>\n <div v-if=\"active && targetElement\">\n <tutorial-indicator v-if=\"isIndicatorVisible && targetElement\" :target-element=\"targetElement\" />\n\n <bento-popover\n :target-element=\"targetElement\"\n :position=\"position\"\n :open=\"isPopoverOpen\"\n :aria-label=\"title\"\n fixed-positioning\n class=\"b-tutorial-popover\"\n @keydown.esc.native=\"emit('finish')\"\n >\n <template v-if=\"image\" #image>\n <bento-image v-bind=\"image\" aspect-ratio=\"landscape\" class=\"b-tutorial-popover__image\" />\n </template>\n\n <div aria-hidden=\"true\" class=\"b-tutorial-popover__ripple\"></div>\n\n <div class=\"b-tutorial-popover__header\">\n <bento-typography variant=\"title\" el=\"span\"> {{ title }} </bento-typography>\n\n <bento-typography v-if=\"showSteps\" el=\"span\" class=\"b-tutorial-popover__steps\">\n {{ t('stepsOfTotal', { step, totalSteps }) }}\n </bento-typography>\n </div>\n\n <bento-typography>\n <slot />\n </bento-typography>\n\n <div class=\"b-tutorial-popover__footer\">\n <bento-menu\n v-if=\"!isFirstStep\"\n :data=\"menuData\"\n class=\"b-tutorial-popover__menu\"\n data-testid=\"menu-button\"\n />\n <div class=\"b-tutorial-popover__actions\">\n <bento-button-actions :actions=\"computedActions\" layout=\"buttons-end\" />\n </div>\n </div>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, isRef, nextTick, PropType, ref, type default as Vue, watch } from 'vue';\n import { BentoMenu } from '@/components/menu';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoTypography } from '@/components/typography';\n import { type BentoButtonActionObject, BentoButtonActions } from '@/components/button';\n import { BentoImage } from '@/components/image';\n import { TutorialIndicator } from './components/tutorial-indicator';\n import { useI18n } from '@/utils/ts/i18n';\n import type { BentoMenuItem } from '@/components/menu/components';\n import type { VueNodeElement } from '@/types';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from '../../tutorial.types';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n import BlockedIcon from '@adyen/ui-assets-icons-16/vue/blocked';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const DEFAULT_SCROLL_OPTIONS: BentoTutorialScrollOptions = { behavior: 'smooth' };\n\n const props = defineProps({\n /**\n * Optional configuration for the secondary action.\n * In tour tutorials, this is ignored for the introductory step.\n */\n action: {\n type: Object as PropType<BentoButtonActionObject>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is the active step (and should be visible).\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Optional illustration to display at the top of the popover.\n */\n image: {\n type: Object as PropType<BentoTutorialStep['image']>,\n default: null,\n },\n\n /**\n * Popover's position relative to the target element.\n * Possible values are:\n * 'auto', 'auto-start', 'auto-end',\n * 'top', 'top-start', 'top-end'\n * 'right', 'right-start', 'right-end'\n * 'bottom', 'bottom-start', 'bottom-end'\n * 'left', 'left-start', 'left-end'\n */\n position: {\n type: String as PropType<`${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n\n /**\n * Indicates whether this popover is a single tutorial or a tour.\n */\n single: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The tutorial step number.\n * In tour tutorials, `0` is the introductory step, and is displayed next\n * to the title.\n */\n step: {\n type: Number,\n default: null,\n },\n\n /**\n * Tutorial popover's target element.\n * The popover will position itself relatively to target element.\n */\n targetElement: {\n type: [Element, Object] as PropType<VueNodeElement>,\n required: true,\n },\n\n /**\n * The tutorial step title.\n */\n title: {\n type: String,\n required: true,\n },\n\n /**\n * Total count of steps.\n * In tour tutorials, this does not include the introductory step, and is\n * displayed next to the title.\n */\n totalSteps: {\n type: Number,\n default: null,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const emit = defineEmits([\"next\", \"finish\", \"restart\"]);\n\n const ACTION_SKIP = computed<BentoButtonActionObject>(() => ({\n title: t('skipTour') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_START = computed<BentoButtonActionObject>(() => ({\n title: t('startTour') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_NEXT = computed<BentoButtonActionObject>(() => ({\n title: t('next') as string,\n event: () => emit('next'),\n }));\n\n const ACTION_FINISH = computed<BentoButtonActionObject>(() => ({\n title: t('finish') as string,\n event: () => emit('finish'),\n }));\n\n const ACTION_OK = computed<BentoButtonActionObject>(() => ({\n title: t('ok') as string,\n event: () => emit('finish'),\n }));\n\n const isPopoverOpen = ref(false);\n const isIndicatorVisible = ref(false);\n\n const targetElement = computed(() => {\n if (isRef(props.targetElement)) {\n return ((props.targetElement.value as Vue)?.$el || props.targetElement.value) as HTMLElement;\n }\n return ((props.targetElement as Vue).$el || props.targetElement) as HTMLElement;\n });\n\n const isFirstStep = computed(() => props.step === 0);\n const isLastStep = computed(() => props.step === props.totalSteps);\n\n const showSteps = computed(() => !isFirstStep.value);\n\n const menuData = computed<BentoMenuItem[]>(() => [\n {\n text: t('restartTour'),\n handler: () => emit('restart'),\n icon: RefreshIcon,\n },\n ...(isLastStep.value\n ? []\n : [\n {\n text: t('skipTour'),\n handler: () => emit('finish'),\n icon: BlockedIcon,\n },\n ]),\n ]);\n\n const computedActions = computed(() => {\n let primaryAction: BentoButtonActionObject;\n if (isFirstStep.value) {\n primaryAction = props.single ? ACTION_OK.value : ACTION_START.value;\n } else if (isLastStep.value) {\n primaryAction = ACTION_FINISH.value;\n } else {\n primaryAction = ACTION_NEXT.value;\n }\n\n const actions = [primaryAction];\n if (isFirstStep.value && !props.single) {\n actions.push(ACTION_SKIP.value);\n } else if (props.action) {\n actions.push(props.action);\n }\n\n return actions;\n });\n\n watch(\n () => props.active,\n async isActive => {\n if (isActive && targetElement.value?.scrollIntoView) {\n targetElement.value?.scrollIntoView(\n props.scrollOptions != null ? props.scrollOptions : DEFAULT_SCROLL_OPTIONS\n );\n\n // Skip to next tick to preserve popover appear animation\n await nextTick();\n }\n\n isPopoverOpen.value = isActive;\n isIndicatorVisible.value = isActive;\n },\n { immediate: true }\n );\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./tutorial-popover.scss\" />\n","<template>\n <div class=\"b-tutorial\">\n <tutorial-popover\n v-for=\"(step, i) in steps\"\n v-bind=\"getPopoverProps(step, i)\"\n :key=\"step.title\"\n @finish=\"currentStep = -1\"\n @next=\"currentStep += 1\"\n @restart=\"currentStep = 0\"\n >\n {{ step.description }}\n </tutorial-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, watch } from 'vue';\n import { TutorialPopover } from './components/tutorial-popover';\n import type { BentoTutorialScrollOptions, BentoTutorialStep } from './tutorial.types';\n\n const props = defineProps({\n /**\n * The current step index. If provided, will start the tutorial in that step.\n */\n index: {\n type: Number,\n default: null,\n },\n\n /**\n * The steps configuration for the tutorial.\n *\n */\n steps: {\n type: Array as PropType<BentoTutorialStep[]>,\n required: true,\n validator: (value: BentoTutorialStep[]) => value.length > 0,\n },\n\n /**\n * Options to control the scroll into view behavior.\n * Takes the same options as the `scrollIntoView` function\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView}\n */\n scrollOptions: {\n type: [Boolean, Object] as PropType<BentoTutorialScrollOptions>,\n default: null,\n },\n });\n\n const emit = defineEmits([\"update:index\"]);\n\n const currentStep = ref(props.index || 0);\n\n const totalSteps = computed(() => props.steps.length - 1);\n const isSingleTutorial = computed(() => totalSteps.value === 0);\n\n function getPopoverProps(step: BentoTutorialStep, index: number) {\n return {\n // Visual\n targetElement: step.target,\n image: step.image,\n title: step.title,\n step: index,\n totalSteps: totalSteps.value,\n action: step.action,\n scrollOptions: props.scrollOptions,\n\n // Config\n active: index === currentStep.value,\n single: isSingleTutorial.value,\n position: step.position,\n };\n }\n\n watch(currentStep, step => {\n emit('update:index', step);\n });\n\n watch(\n () => props.index,\n value => {\n if (value >= -1 && value <= totalSteps.value) {\n currentStep.value = value;\n }\n }\n );\n</script>\n\n<script lang=\"ts\">\n /**\n * The Tutorial is a temporary popover that should be used to educate users about\n * new or unfamiliar features or experiences.\n *\n * You can use single tutorial or chain them into a tour.\n *\n * Only use this component for new features/experiences that are not obvious and\n * self-explanatory on their own.\n *\n * @example\n * import { BentoTutorial } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoTutorial },\n * template: `\n * <bento-tutorial\n * :steps=\"[\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * image: { src: imageSource, alt: 'Alt text' }\n * },\n * {\n * target: targetElement1,\n * title: 'Tutorial intro title',\n * description: 'Intro body content',\n * action: { title: 'Action label', event: () => {} }\n * },\n * ]\"\n * />\n * `\n * }\n */\n export default {};\n</script>\n"],"names":["computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_sfc_main$2","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","t","useI18n","ACTION_SKIP","computed","emit","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","props","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCI,UAAAA,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI,UAAA;AACI,cAAAC,IAAA,WAAA,iBAAAD,CAAA,EAAA,iBAAA,eAAA,CAAA;AACA,eAAA,OAAA,MAAAC,CAAA,IAAA,KAAA,GAAAA,IAAA,IAAA,CAAA;AAAA,MAAgE,QAAA;AAEhE,eAAA;AAAA,MAAO;AAAA,IACX;AAGJ,UAAAC,IAAA;AAAA,MAAmBC,EAAA;AAAA,MACVC,EAAA;AAAA,QACE,UAAA;AAAA,QACO,eAAA;AAAA,MACM,CAAA;AAAA,MACnB;AAAA,QACD,MAAA;AAAA,QACU,IAAA,CAAA,EAAA,G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AAA,UAAA,QAAAe,EAAA;AAAA,UAAqBb,EAAA,iBAAA,OAAAA,EAAA,gBAAAd;AAAA,WAKrB,MAAA4B,EAAA,IAGJlB,EAAA,QAAAgB,GACAf,EAAA,QAAAe;AAAA,MAA2B;AAAA,MAC/B,EAAA,WAAA,GAAA;AAAA,IACkB;;;;;;;;;;;;;;;;;;uBCxItBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAxEAC,IAAA7C,EAAA6B,EAAA,SAAA,CAAA,GAEAiB,IAAA3B,EAAA,MAAAU,EAAA,MAAA,SAAA,CAAA,GACAkB,IAAA5B,EAAA,MAAA2B,EAAA,UAAA,CAAA;AAEA,aAAAE,EAAAC,GAAAC,GAAA;AACI,aAAA;AAAA;AAAA,QAAO,eAAAD,EAAA;AAAA,QAEiB,OAAAA,EAAA;AAAA,QACR,OAAAA,EAAA;AAAA,QACA,MAAAC;AAAA,QACN,YAAAJ,EAAA;AAAA,QACiB,QAAAG,EAAA;AAAA,QACV,eAAApB,EAAA;AAAA;AAAA,QACQ,QAAAqB,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA7B,EAAA,gBAAA6B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAAX,EAAA;AAAA,MACgB,CAAAsB,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/data-grid.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e, d as o, a as r, b as n, g as i, f as B, e as d, c as s } from "./chunks/data-grid.
|
|
1
|
+
import { B as e, d as o, a as r, b as n, g as i, f as B, e as d, c as s } from "./chunks/data-grid.erxjh5TN.js";
|
|
2
2
|
export {
|
|
3
3
|
e as BentoColumnOverflow,
|
|
4
4
|
o as BentoDataGrid,
|
package/dist/header.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import { u as N } from "./chunks/use-bento-toast-controller.Cn_2Eogn.js";
|
|
|
4
4
|
import { p as g, d } from "./chunks/typography.J1v_SPG3.js";
|
|
5
5
|
import { B as _, c as Y, b as j, a as U } from "./chunks/typography.J1v_SPG3.js";
|
|
6
6
|
import { a as K, b as H } from "./chunks/accordion-item.BNtdoVto.js";
|
|
7
|
-
import { B as W } from "./chunks/action-bar.
|
|
7
|
+
import { B as W } from "./chunks/action-bar.DQb7WVVd.js";
|
|
8
8
|
import { B as J, c as Q, b as X, a as $ } from "./chunks/alert.c1rhDDrU.js";
|
|
9
9
|
import { B as te } from "./chunks/avatar.BgwjpLQO.js";
|
|
10
10
|
import { B as ae, b as ne, a as re } from "./chunks/button.hF-nD1Og.js";
|
|
11
11
|
import { B as Be } from "./chunks/dashed-underline.BbH6Lnd2.js";
|
|
12
|
-
import { B as me, d as pe, a as ue, b as de, g as le, f as ce, e as fe, c as xe } from "./chunks/data-grid.
|
|
12
|
+
import { B as me, d as pe, a as ue, b as de, g as le, f as ce, e as fe, c as xe } from "./chunks/data-grid.erxjh5TN.js";
|
|
13
13
|
import { c as Te, B as ye, a as ge } from "./chunks/card.CASAAsuJ.js";
|
|
14
14
|
import { B as be, a as Ee } from "./chunks/date-picker.DGIS6Pp-.js";
|
|
15
15
|
import { B as De, a as Ie } from "./chunks/date-range-picker.CIaKRXIQ.js";
|
|
@@ -28,7 +28,7 @@ import { B as rt, b as st, c as Bt, a as it } from "./chunks/empty-state.mtXfb1B
|
|
|
28
28
|
import { f as pt } from "./chunks/file-uploader.BPslxGI8.js";
|
|
29
29
|
import { B as dt, b as lt, a as ct, c as ft } from "./chunks/filter-bar.DL19SXF1.js";
|
|
30
30
|
import { f as St, a as Tt, c as yt, b as gt } from "./chunks/form-layout-title.CIynHgCF.js";
|
|
31
|
-
import { h as bt } from "./chunks/header-with-views.
|
|
31
|
+
import { h as bt } from "./chunks/header-with-views.BUQ-MlAq.js";
|
|
32
32
|
import { B as Ct, a as Dt, b as It } from "./chunks/image.C2D2hKat.js";
|
|
33
33
|
import { B as Lt } from "./chunks/info-icon.CYOXx8CL.js";
|
|
34
34
|
import { B as Ft, b as Gt, e as Ot, c as kt, d as wt, a as Mt } from "./chunks/input-field.5S-pUNxA.js";
|
|
@@ -39,11 +39,11 @@ import { B as Wt } from "./chunks/inspector.types.DyHwE18g.js";
|
|
|
39
39
|
import { l as Jt, a as Qt } from "./chunks/layout-row.C_F2wX6d.js";
|
|
40
40
|
import { B as $t, a as eo } from "./chunks/loading-indicator.z8COalOc.js";
|
|
41
41
|
import { B as oo, a as ao } from "./chunks/link.CXy_LoFI.js";
|
|
42
|
-
import { B as ro, a as so } from "./chunks/menu.
|
|
42
|
+
import { B as ro, a as so } from "./chunks/menu.D0OQgk40.js";
|
|
43
43
|
import { B as io } from "./chunks/modal.eoNQ6E3U.js";
|
|
44
44
|
import { c as po, e as uo, f as lo, g as co, d as fo, b as xo, B as So, a as To } from "./chunks/base-modal.CkkfT6r6.js";
|
|
45
45
|
import { m as go, B as ho } from "./chunks/modal-fullscreen.DHotw1RI.js";
|
|
46
|
-
import { B as Eo } from "./chunks/header.
|
|
46
|
+
import { B as Eo } from "./chunks/header.uyxNdQa3.js";
|
|
47
47
|
import { B as Do } from "./chunks/pagination.4J7ZMyf5.js";
|
|
48
48
|
import { B as vo } from "./chunks/payment-method.Cx4nPDtE.js";
|
|
49
49
|
import { B as Po } from "./chunks/payment-method.types.BqtH7RM2.js";
|
|
@@ -68,9 +68,9 @@ import { B as Ma } from "./chunks/textarea.UPM6N9V1.js";
|
|
|
68
68
|
import { t as Aa, b as Na, a as Ra, c as _a, B as Ya, d as ja } from "./chunks/timeline-item.DqLhj0Lb.js";
|
|
69
69
|
import { t as za } from "./chunks/toast.BOyeuS19.js";
|
|
70
70
|
import { B as Ha, b as qa, a as Wa } from "./chunks/toggle.DyXL09-x.js";
|
|
71
|
-
import { t as Ja } from "./chunks/tutorial.
|
|
72
|
-
import { a as Xa, d as $a } from "./chunks/dashboard-section.
|
|
73
|
-
import { d as tn } from "./chunks/data-grid-template.
|
|
71
|
+
import { t as Ja } from "./chunks/tutorial.CxrGhLS7.js";
|
|
72
|
+
import { a as Xa, d as $a } from "./chunks/dashboard-section.BIe6eVHq.js";
|
|
73
|
+
import { d as tn } from "./chunks/data-grid-template.Co0Ecr79.js";
|
|
74
74
|
import { B as an, c as nn, a as rn, b as sn, d as Bn, e as mn } from "./chunks/button-actions.Ju27CRNG.js";
|
|
75
75
|
import { B as un } from "./chunks/toggle-button.DEVVvpkw.js";
|
|
76
76
|
import { C as ln, C as cn } from "./chunks/calendar.DvIQEYwN.js";
|
package/dist/internal.js
CHANGED
|
@@ -10,7 +10,7 @@ import { b as g, c as y, u as D } from "./chunks/use-cached-selected-values.0Eey
|
|
|
10
10
|
import { L as M } from "./chunks/listbox-option-tag.D0Cql_R3.js";
|
|
11
11
|
import { B as W } from "./chunks/teleport.BV6zrDjA.js";
|
|
12
12
|
import { T as v } from "./chunks/tooltip.wQsyAwkC.js";
|
|
13
|
-
import { B as J } from "./chunks/button-actions-with-menu.
|
|
13
|
+
import { B as J } from "./chunks/button-actions-with-menu.nPj7sdGE.js";
|
|
14
14
|
import { f as R } from "./chunks/button-actions.Ju27CRNG.js";
|
|
15
15
|
export {
|
|
16
16
|
R as BUTTON_ACTIONS_WITH_MENU_CONTAINER_INJECTION_KEY,
|
package/dist/menu.js
CHANGED
package/dist/tutorial.js
CHANGED
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "@adyen/bento-vue2",
|
|
4
|
-
"version": "1.68.
|
|
4
|
+
"version": "1.68.2",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -11535,7 +11535,7 @@
|
|
|
11535
11535
|
"description": "Popover's target element.\nThe popover will position itself relatively to target element, in specified position.",
|
|
11536
11536
|
"value": {
|
|
11537
11537
|
"kind": "expression",
|
|
11538
|
-
"type": "
|
|
11538
|
+
"type": "TSIndexedAccessType"
|
|
11539
11539
|
}
|
|
11540
11540
|
},
|
|
11541
11541
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adyen/bento-vue2",
|
|
3
|
-
"version": "1.68.
|
|
3
|
+
"version": "1.68.2",
|
|
4
4
|
"description": "Adyen Bento Vue2 components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"unified": "11.0.5",
|
|
47
47
|
"uuid": "11.0.5",
|
|
48
48
|
"vue-demi": "0.14.10",
|
|
49
|
-
"@adyen/bento-design-tokens": "1.68.
|
|
49
|
+
"@adyen/bento-design-tokens": "1.68.2"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"vue": "~2.7",
|