@adyen/bento-vue3 1.34.0 → 1.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +7 -7
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/utils/ts/get-date-locale/get-date-locale.d.ts +11 -0
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/avatar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/code-snippet.css +1 -1
- package/dist/assets/currency.css +1 -0
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/error-message.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/header.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/loading-button.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/assets/structured-list-item.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/avatar.js +1 -1
- package/dist/button.js +2 -2
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/accordion-item.C30QFxol.js +142 -0
- package/dist/chunks/accordion-item.C30QFxol.js.map +1 -0
- package/dist/chunks/{action-bar.DGQYYi8b.js → action-bar.5XBrXwYv.js} +58 -44
- package/dist/chunks/{action-bar.DGQYYi8b.js.map → action-bar.5XBrXwYv.js.map} +1 -1
- package/dist/chunks/{alert.Bz4tNKDH.js → alert.BvSx_Bi7.js} +26 -20
- package/dist/chunks/{alert.Bz4tNKDH.js.map → alert.BvSx_Bi7.js.map} +1 -1
- package/dist/chunks/{avatar.mNlMngHQ.js → avatar.8erKxh8t.js} +13 -13
- package/dist/chunks/avatar.8erKxh8t.js.map +1 -0
- package/dist/chunks/{base-modal.Bl7DBkt0.js → base-modal.BenvK-Np.js} +35 -29
- package/dist/chunks/{base-modal.Bl7DBkt0.js.map → base-modal.BenvK-Np.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js → button-actions-with-menu.CHOjMHpd.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.BLmcwr2f.js.map → button-actions-with-menu.CHOjMHpd.js.map} +1 -1
- package/dist/chunks/{button-actions.hdK5IgrZ.js → button-actions.DyI_dSvx.js} +2 -2
- package/dist/chunks/{button-actions.hdK5IgrZ.js.map → button-actions.DyI_dSvx.js.map} +1 -1
- package/dist/chunks/{calendar.D--sOCBT.js → calendar.DzYaxc0M.js} +148 -148
- package/dist/chunks/calendar.DzYaxc0M.js.map +1 -0
- package/dist/chunks/{card.BvSoujBc.js → card.Bt8jcp9I.js} +45 -37
- package/dist/chunks/card.Bt8jcp9I.js.map +1 -0
- package/dist/chunks/{checkbox-group.CuLP3hPd.js → checkbox-group.B0wngKi6.js} +4 -4
- package/dist/chunks/{checkbox-group.CuLP3hPd.js.map → checkbox-group.B0wngKi6.js.map} +1 -1
- package/dist/chunks/{checkbox.DMMXn-h8.js → checkbox.Bk_jmkGe.js} +50 -40
- package/dist/chunks/{checkbox.DMMXn-h8.js.map → checkbox.Bk_jmkGe.js.map} +1 -1
- package/dist/chunks/{code-snippet.BWM5w4CP.js → code-snippet.1SigVnjS.js} +97 -88
- package/dist/chunks/code-snippet.1SigVnjS.js.map +1 -0
- package/dist/chunks/{controls-group.BnZVHgQK.js → controls-group.COc0kArc.js} +2 -2
- package/dist/chunks/{controls-group.BnZVHgQK.js.map → controls-group.COc0kArc.js.map} +1 -1
- package/dist/chunks/{copy.h-wVGvID.js → copy.1-HH1fz5.js} +28 -20
- package/dist/chunks/{copy.h-wVGvID.js.map → copy.1-HH1fz5.js.map} +1 -1
- package/dist/chunks/{currency.CFJy6QYU.js → currency.BdtY-UIM.js} +3 -2
- package/dist/chunks/{currency.CFJy6QYU.js.map → currency.BdtY-UIM.js.map} +1 -1
- package/dist/chunks/{dashboard-section.BIH2wzgk.js → dashboard-section.BOrGKdY9.js} +2 -2
- package/dist/chunks/{dashboard-section.BIH2wzgk.js.map → dashboard-section.BOrGKdY9.js.map} +1 -1
- package/dist/chunks/{dashed-underline.CFJdLuJp.js → dashed-underline.BO4BuqUM.js} +2 -2
- package/dist/chunks/{dashed-underline.CFJdLuJp.js.map → dashed-underline.BO4BuqUM.js.map} +1 -1
- package/dist/chunks/{data-grid-template.21gqdYrs.js → data-grid-template.O946JKTa.js} +2 -2
- package/dist/chunks/{data-grid-template.21gqdYrs.js.map → data-grid-template.O946JKTa.js.map} +1 -1
- package/dist/chunks/{data-grid.DUwLxtW_.js → data-grid.Bv5TA_zR.js} +578 -532
- package/dist/chunks/{data-grid.DUwLxtW_.js.map → data-grid.Bv5TA_zR.js.map} +1 -1
- package/dist/chunks/{date-picker.21z_Sw4V.js → date-picker.DvEPEMIM.js} +99 -91
- package/dist/chunks/date-picker.DvEPEMIM.js.map +1 -0
- package/dist/chunks/{date-range-picker.K2TeW8aX.js → date-range-picker.BLVlkkG_.js} +338 -316
- package/dist/chunks/date-range-picker.BLVlkkG_.js.map +1 -0
- package/dist/chunks/{date.D8rQMzMG.js → date.CYUV4seY.js} +92 -92
- package/dist/chunks/{date.D8rQMzMG.js.map → date.CYUV4seY.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.BNJnscD2.js → dropdown-tag.bpKWbC_O.js} +3 -3
- package/dist/chunks/{dropdown-tag.BNJnscD2.js.map → dropdown-tag.bpKWbC_O.js.map} +1 -1
- package/dist/chunks/{dropdown.ex87AZ7s.js → dropdown.rFZp3hMb.js} +212 -193
- package/dist/chunks/dropdown.rFZp3hMb.js.map +1 -0
- package/dist/chunks/{error-message.D2Y99KjT.js → error-message.DblYEZ7E.js} +43 -29
- package/dist/chunks/{error-message.D2Y99KjT.js.map → error-message.DblYEZ7E.js.map} +1 -1
- package/dist/chunks/es6.BvpG4Oi6.js.map +1 -1
- package/dist/chunks/{filter-bar.BAmG-yML.js → filter-bar.IN7gqxsc.js} +727 -712
- package/dist/chunks/filter-bar.IN7gqxsc.js.map +1 -0
- package/dist/chunks/{footer-actions.gtxofUAa.js → footer-actions.CyoMN_ca.js} +2 -2
- package/dist/chunks/{footer-actions.gtxofUAa.js.map → footer-actions.CyoMN_ca.js.map} +1 -1
- package/dist/chunks/{form-layout-title.Boi0QQZL.js → form-layout-title.Bi_3du_6.js} +2 -2
- package/dist/chunks/{form-layout-title.Boi0QQZL.js.map → form-layout-title.Bi_3du_6.js.map} +1 -1
- package/dist/chunks/{index.B_UZQ6qF.js → get-date-locale.BN8xEjY0.js} +855 -204
- package/dist/chunks/get-date-locale.BN8xEjY0.js.map +1 -0
- package/dist/chunks/{header.BMYhkrGT.js → header.Byd6jXl6.js} +104 -98
- package/dist/chunks/{header.BMYhkrGT.js.map → header.Byd6jXl6.js.map} +1 -1
- package/dist/chunks/{index.Z84QE0E2.js → index.CrhTVr5J.js} +2 -2
- package/dist/chunks/{index.Z84QE0E2.js.map → index.CrhTVr5J.js.map} +1 -1
- package/dist/chunks/{index.xqFSZOAb.js → index.DDnf1O9p.js} +2 -2
- package/dist/chunks/{index.xqFSZOAb.js.map → index.DDnf1O9p.js.map} +1 -1
- package/dist/chunks/{index.B_EJflcs.js → index.DPafeRJa.js} +2 -2
- package/dist/chunks/{index.B_EJflcs.js.map → index.DPafeRJa.js.map} +1 -1
- package/dist/chunks/{input-field.Dely7A8G.js → input-field.CgS1AEGu.js} +3 -3
- package/dist/chunks/{input-field.Dely7A8G.js.map → input-field.CgS1AEGu.js.map} +1 -1
- package/dist/chunks/{inspector.types.t2SPyhw3.js → inspector.types.xpv2J9pJ.js} +44 -36
- package/dist/chunks/{inspector.types.t2SPyhw3.js.map → inspector.types.xpv2J9pJ.js.map} +1 -1
- package/dist/chunks/loading-button.Bntgn6Lk.js +137 -0
- package/dist/chunks/loading-button.Bntgn6Lk.js.map +1 -0
- package/dist/chunks/{menu.CLicp_2I.js → menu.BN5WGXw3.js} +2 -2
- package/dist/chunks/{menu.CLicp_2I.js.map → menu.BN5WGXw3.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.Caqa7dDp.js → modal-fullscreen.zljoH4pr.js} +35 -29
- package/dist/chunks/{modal-fullscreen.Caqa7dDp.js.map → modal-fullscreen.zljoH4pr.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js → modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js} +31 -25
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.tT8umwqG.js.map +1 -0
- package/dist/chunks/{pagination.I5w8bpUS.js → pagination.BMn5ryDD.js} +2 -2
- package/dist/chunks/{pagination.I5w8bpUS.js.map → pagination.BMn5ryDD.js.map} +1 -1
- package/dist/chunks/{popover.DQP3ce2x.js → popover.pDk6zsak.js} +2 -2
- package/dist/chunks/{popover.DQP3ce2x.js.map → popover.pDk6zsak.js.map} +1 -1
- package/dist/chunks/{radio-group.lOSBHghv.js → radio-group.DUtoFXmr.js} +3 -3
- package/dist/chunks/{radio-group.lOSBHghv.js.map → radio-group.DUtoFXmr.js.map} +1 -1
- package/dist/chunks/{search-bar.GCRTgBUA.js → search-bar.poJCoGD-.js} +49 -41
- package/dist/chunks/{search-bar.GCRTgBUA.js.map → search-bar.poJCoGD-.js.map} +1 -1
- package/dist/chunks/{secondary-nav.CGH_6m7u.js → secondary-nav.Dyvd-YBg.js} +2 -2
- package/dist/chunks/{secondary-nav.CGH_6m7u.js.map → secondary-nav.Dyvd-YBg.js.map} +1 -1
- package/dist/chunks/{selection-card-group.BdTuPhEm.js → selection-card-group.CHBS81j6.js} +3 -3
- package/dist/chunks/{selection-card-group.BdTuPhEm.js.map → selection-card-group.CHBS81j6.js.map} +1 -1
- package/dist/chunks/{sidepanel.DA8nQepj.js → sidepanel.CuQCXV1E.js} +36 -30
- package/dist/chunks/{sidepanel.DA8nQepj.js.map → sidepanel.CuQCXV1E.js.map} +1 -1
- package/dist/chunks/{structured-list-item.Z-1ivOFu.js → structured-list-item.1A2sjhP4.js} +35 -29
- package/dist/chunks/{structured-list-item.Z-1ivOFu.js.map → structured-list-item.1A2sjhP4.js.map} +1 -1
- package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js → summary-grid-item-custom.CuvUVoQ8.js} +2 -2
- package/dist/chunks/{summary-grid-item-custom.Dq3IIEvH.js.map → summary-grid-item-custom.CuvUVoQ8.js.map} +1 -1
- package/dist/chunks/{textarea.kYFGQFwd.js → textarea.CHnvON8G.js} +2 -2
- package/dist/chunks/{textarea.kYFGQFwd.js.map → textarea.CHnvON8G.js.map} +1 -1
- package/dist/chunks/{timeline-item.D-Yy2qQr.js → timeline-item.Dc_l5Xyy.js} +81 -75
- package/dist/chunks/{timeline-item.D-Yy2qQr.js.map → timeline-item.Dc_l5Xyy.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js} +82 -70
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js.map → tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js → use-cached-selected-values.CS3gHOyI.js} +86 -72
- package/dist/chunks/{use-cached-selected-values.ClVxNmUf.js.map → use-cached-selected-values.CS3gHOyI.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +43 -43
- package/dist/input-field.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +5 -5
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/summary-grid.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/accordion-item.CQ8DLt9l.js +0 -126
- package/dist/chunks/accordion-item.CQ8DLt9l.js.map +0 -1
- package/dist/chunks/avatar.mNlMngHQ.js.map +0 -1
- package/dist/chunks/calendar.D--sOCBT.js.map +0 -1
- package/dist/chunks/card.BvSoujBc.js.map +0 -1
- package/dist/chunks/code-snippet.BWM5w4CP.js.map +0 -1
- package/dist/chunks/date-picker.21z_Sw4V.js.map +0 -1
- package/dist/chunks/date-range-picker.K2TeW8aX.js.map +0 -1
- package/dist/chunks/dropdown.ex87AZ7s.js.map +0 -1
- package/dist/chunks/filter-bar.BAmG-yML.js.map +0 -1
- package/dist/chunks/index.B_UZQ6qF.js.map +0 -1
- package/dist/chunks/loading-button.Mx-oDIGy.js +0 -123
- package/dist/chunks/loading-button.Mx-oDIGy.js.map +0 -1
- package/dist/chunks/modal.vue_vue_type_script_setup_true_lang.Dzmth-oW.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutorial.vue_vue_type_script_setup_true_lang.D-ZFDn95.js","sources":["../../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../../vue2/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-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" 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-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div 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<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\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: 'Skip tour',\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<{\n /**\n * Fired every time the step index is changed. `-1` value means the tutorial is finished/skipped.\n */\n (e: 'update:index', value: number);\n }>();\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":["BORDER_OFFSET","computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","props","__props","t","useI18n","emit","__emit","ACTION_SKIP","computed","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;AAmBI,MAAAA,IAAA;;;;;;;;;;;;;;;AAaA,UAAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kGClJtBG,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7GA,UAAA9B,IAAAC,GA8BAG,IAAAC,GAOA0B,IAAArD,EAAAsB,EAAA,SAAA,CAAA,GAEAgC,IAAAzB,EAAA,MAAAP,EAAA,MAAA,SAAA,CAAA,GACAiC,IAAA1B,EAAA,MAAAyB,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,eAAAnC,EAAA;AAAA;AAAA,QACQ,QAAAoC,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA/B,EAAA,gBAAA+B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAA1B,EAAA;AAAA,MACgB,CAAAqC,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"tutorial.vue_vue_type_script_setup_true_lang.DdLmYCOe.js","sources":["../../../vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue","../../../../node_modules/.pnpm/@adyen+ui-assets-icons-16@4.1.0_vue@2.7.16/node_modules/@adyen/ui-assets-icons-16/dist/vue/blocked.vue","../../../vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue","../../../vue2/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-icons-16-blocked__a' + uuid + ')'\"><path fill=\"#00112C\" 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-icons-16-blocked__a' + uuid\"><rect width=\"16\" height=\"16\" fill=\"#fff\"/></clipPath></defs></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div 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<{\n /**\n * Emitted when the user clicks the primary action in popovers during introductory or intermediate steps of tour tutorials\n */\n (e: 'next'): void;\n\n /**\n * Emitted when the user clicks the primary action in a single tutorial, the last step of a tour, or skips the tutorial\n */\n (e: 'finish'): void;\n\n /**\n * Emitted when the user selects the restart tour option\n */\n (e: 'restart'): void;\n }>();\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<{\n /**\n * Fired every time the step index is changed. `-1` value means the tutorial is finished/skipped.\n */\n (e: 'update:index', value: number);\n }>();\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":["BORDER_OFFSET","computedStyles","ref","getBorderRadius","element","radius","middleware","hide","offset","x","y","elements","target","uuid","_hoisted_2$1","_hoisted_3$1","openBlock","createElementBlock","mergeProps","_ctx","createCommentVNode","__default__$1","messages","DEFAULT_SCROLL_OPTIONS","props","__props","t","useI18n","emit","__emit","ACTION_SKIP","computed","ACTION_START","ACTION_NEXT","ACTION_FINISH","ACTION_OK","isPopoverOpen","isIndicatorVisible","targetElement","isRef","_a","isFirstStep","isLastStep","showSteps","menuData","RefreshIcon","BlockedIcon","computedActions","primaryAction","actions","watch","isActive","_b","nextTick","__default__","currentStep","totalSteps","isSingleTutorial","getPopoverProps","step","index","value"],"mappings":";;;;;;;;;;;AAmBI,MAAAA,IAAA;;;;;;;;;;;;;;;AAaA,UAAAC,IAAAC,EAAA;AAAA,MAA2B,OAAA;AAAA,MAChB,QAAA;AAAA,MACC,cAAA;AAAA,IACM,CAAA;AAGlB,aAAAC,EAAAC,GAAA;AACI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;;;;;;;;;;;;;;;;AA7GA,UAAA9B,IAAAC,GA8BAG,IAAAC,GAOA0B,IAAArD,EAAAsB,EAAA,SAAA,CAAA,GAEAgC,IAAAzB,EAAA,MAAAP,EAAA,MAAA,SAAA,CAAA,GACAiC,IAAA1B,EAAA,MAAAyB,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,eAAAnC,EAAA;AAAA;AAAA,QACQ,QAAAoC,MAAAL,EAAA;AAAA,QAGS,QAAAE,EAAA;AAAA,QACL,UAAAE,EAAA;AAAA,MACV;AAAA,IACnB;AAGJ,WAAAT,EAAAK,GAAA,CAAAI,MAAA;AACI,MAAA/B,EAAA,gBAAA+B,CAAA;AAAA,IAAyB,CAAA,GAG7BT;AAAA,MAAA,MAAA1B,EAAA;AAAA,MACgB,CAAAqC,MAAA;AAER,QAAAA,KAAA,MAAAA,KAAAL,EAAA,UACID,EAAA,QAAAM;AAAA,MACJ;AAAA,IACJ;;;;;;;;;;;;;;;","x_google_ignoreList":[1]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { computed as v, ref as
|
|
1
|
+
import { computed as v, ref as P, onMounted as Oe, onUnmounted as Fe, watch as Ie, defineComponent as W, resolveComponent as L, openBlock as f, createElementBlock as _, createVNode as B, withCtx as T, createTextVNode as G, toDisplayString as w, createElementVNode as K, renderSlot as z, mergeProps as U, withKeys as ve, createCommentVNode as Y, createBlock as D, withModifiers as Ye, normalizeProps as ee, guardReactiveProps as ne, withDirectives as ae, vShow as Ae, toRef as se, resolveDirective as pe, toHandlers as te, Fragment as J, renderList as x, createSlots as ie, normalizeClass as fe, unref as ce, normalizeStyle as Ke } from "vue";
|
|
2
2
|
import { B as F, a as Se } from "./keyboard-navigation.Clz1jOaA.js";
|
|
3
|
-
import { B as
|
|
3
|
+
import { B as Z } from "./typography.z9P0Ec3Q.js";
|
|
4
4
|
import { B as qe } from "./loading-indicator.BFMEf39U.js";
|
|
5
5
|
import { B as We } from "./empty-state.CyEWCcDk.js";
|
|
6
6
|
import { u as ue } from "./i18n.DL9GT2-k.js";
|
|
7
7
|
import { d as je } from "./debounce.DUTu11PS.js";
|
|
8
8
|
import { _ as q } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
|
-
import { B as Ce } from "./checkbox.
|
|
9
|
+
import { B as Ce } from "./checkbox.Bk_jmkGe.js";
|
|
10
10
|
import { a as He, C as Xe } from "./chevron-up.DQZG_BP3.js";
|
|
11
|
-
import { B as
|
|
12
|
-
import { C as
|
|
13
|
-
import { B as Qe, a as he } from "./loading-button.
|
|
11
|
+
import { B as Je } from "./base-button.BxUrydaP.js";
|
|
12
|
+
import { C as Ze } from "./cross-small.CXWTuKA_.js";
|
|
13
|
+
import { B as Qe, a as he } from "./loading-button.Bntgn6Lk.js";
|
|
14
14
|
import { o as et } from "./resize.Bqks3WUm.js";
|
|
15
15
|
import "../assets/use-cached-selected-values.css";
|
|
16
16
|
const $e = (e, t, a, c) => {
|
|
@@ -32,7 +32,7 @@ const $e = (e, t, a, c) => {
|
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: u }) {
|
|
35
|
-
const n =
|
|
35
|
+
const n = P(null), s = P([]), l = P(0), r = P(0), i = P(0);
|
|
36
36
|
let y;
|
|
37
37
|
const o = v(() => {
|
|
38
38
|
const C = typeof a == "number" ? e.value.length * a : e.value.reduce((k, S, I) => k + a(I), 0), O = typeof a == "number" ? l.value * a : e.value.slice(0, l.value).reduce((k, S, I) => k + a(I), 0);
|
|
@@ -71,7 +71,7 @@ function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: u })
|
|
|
71
71
|
const C = R();
|
|
72
72
|
l.value = d(), r.value = Math.min(l.value + C + c, e.value.length), s.value = e.value.slice(l.value, r.value);
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, M = () => {
|
|
75
75
|
$();
|
|
76
76
|
};
|
|
77
77
|
t || (Oe(() => {
|
|
@@ -100,7 +100,7 @@ function tt(e, { disabled: t, itemHeight: a, overscan: c = 5, prefixHeight: u })
|
|
|
100
100
|
} : {
|
|
101
101
|
containerRef: n,
|
|
102
102
|
containerProps: m,
|
|
103
|
-
onScroll:
|
|
103
|
+
onScroll: M,
|
|
104
104
|
list: s,
|
|
105
105
|
wrapperProps: o
|
|
106
106
|
};
|
|
@@ -109,7 +109,7 @@ var b = /* @__PURE__ */ ((e) => (e.SELECT = "select", e.SHOW_MORE = "show-more",
|
|
|
109
109
|
const st = W({
|
|
110
110
|
name: "bento-listbox-static-category",
|
|
111
111
|
components: {
|
|
112
|
-
BentoTypography:
|
|
112
|
+
BentoTypography: Z
|
|
113
113
|
},
|
|
114
114
|
props: {
|
|
115
115
|
/**
|
|
@@ -214,7 +214,7 @@ const dt = /* @__PURE__ */ q(rt, [["render", ut]]), bt = W({
|
|
|
214
214
|
name: "bento-listbox-single-select-option",
|
|
215
215
|
components: {
|
|
216
216
|
BentoListboxOption: de,
|
|
217
|
-
BentoTypography:
|
|
217
|
+
BentoTypography: Z,
|
|
218
218
|
CheckmarkIcon: dt
|
|
219
219
|
},
|
|
220
220
|
props: {
|
|
@@ -299,7 +299,7 @@ function ft(e, t, a, c, u, n) {
|
|
|
299
299
|
const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84"]]), ke = ({ items: e, isOptionDisabled: t, hasStaticCategories: a }, c) => {
|
|
300
300
|
const u = v(
|
|
301
301
|
() => a.value ? e.value.flatMap((m) => m.items) : e.value
|
|
302
|
-
), n = v(() => u.value.length - 1), s =
|
|
302
|
+
), n = v(() => u.value.length - 1), s = P(0);
|
|
303
303
|
Oe(() => {
|
|
304
304
|
t && (s.value = e.value.findIndex((m) => !t(m)));
|
|
305
305
|
});
|
|
@@ -403,7 +403,7 @@ const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84
|
|
|
403
403
|
},
|
|
404
404
|
emits: [b.SELECT, b.ENTER, b.SPACE, b.TAB],
|
|
405
405
|
setup(e, { emit: t, expose: a, slots: c }) {
|
|
406
|
-
const u =
|
|
406
|
+
const u = P([]), n = v(() => {
|
|
407
407
|
var m;
|
|
408
408
|
return !!((m = e.selectedValue) != null && m.length) && e.selectedValue.at(0);
|
|
409
409
|
}), s = v(() => !!e.items.some(({ items: m }) => !!m)), l = (m) => (C) => {
|
|
@@ -426,7 +426,7 @@ const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84
|
|
|
426
426
|
[F.ARROW_DOWN]: i,
|
|
427
427
|
[F.HOME]: o,
|
|
428
428
|
[F.END]: d
|
|
429
|
-
},
|
|
429
|
+
}, M = {
|
|
430
430
|
[b.SELECT]: l(b.SELECT),
|
|
431
431
|
[b.SPACE]: l(b.SPACE),
|
|
432
432
|
[b.TAB]: l(b.TAB),
|
|
@@ -456,20 +456,20 @@ const gt = /* @__PURE__ */ q(bt, [["render", ft], ["__scopeId", "data-v-226f4c84
|
|
|
456
456
|
onOptionSelected: l,
|
|
457
457
|
// Keyboard navigation
|
|
458
458
|
listboxListeners: $,
|
|
459
|
-
listboxOptionListeners:
|
|
459
|
+
listboxOptionListeners: M
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
463
|
function pt(e, t, a, c, u, n) {
|
|
464
464
|
const s = L("bento-listbox-single-select-option"), l = L("bento-listbox-single-select-category"), r = pe("bento-keyboard-navigation-directive");
|
|
465
465
|
return ae((f(), _("div", te(e.listboxListeners, !0), [
|
|
466
|
-
e.hasCategories && e.staticCategories ? (f(!0), _(
|
|
466
|
+
e.hasCategories && e.staticCategories ? (f(!0), _(J, { key: 0 }, x(e.items, (i) => (f(), D(l, {
|
|
467
467
|
key: i.value,
|
|
468
468
|
"category-label": i.label,
|
|
469
469
|
role: "group"
|
|
470
470
|
}, {
|
|
471
471
|
default: T(() => [
|
|
472
|
-
(f(!0), _(
|
|
472
|
+
(f(!0), _(J, null, x(i.items, (y) => (f(), D(s, U({
|
|
473
473
|
key: y.value,
|
|
474
474
|
ref_for: !0,
|
|
475
475
|
ref: "listboxItemRef",
|
|
@@ -487,7 +487,7 @@ function pt(e, t, a, c, u, n) {
|
|
|
487
487
|
]), 1040, ["option", "disabled", "selected"]))), 128))
|
|
488
488
|
]),
|
|
489
489
|
_: 2
|
|
490
|
-
}, 1032, ["category-label"]))), 128)) : (f(!0), _(
|
|
490
|
+
}, 1032, ["category-label"]))), 128)) : (f(!0), _(J, { key: 1 }, x(e.items, (i) => (f(), D(s, U({
|
|
491
491
|
key: i.value,
|
|
492
492
|
ref_for: !0,
|
|
493
493
|
ref: "listboxItemRef",
|
|
@@ -519,7 +519,7 @@ const Ct = {
|
|
|
519
519
|
name: "bento-listbox-multi-select-category",
|
|
520
520
|
components: {
|
|
521
521
|
BentoCheckbox: Ce,
|
|
522
|
-
BentoTypography:
|
|
522
|
+
BentoTypography: Z,
|
|
523
523
|
BentoListboxOption: de,
|
|
524
524
|
ChevronDownIcon: He,
|
|
525
525
|
ChevronUpIcon: Xe
|
|
@@ -565,7 +565,7 @@ const Ct = {
|
|
|
565
565
|
},
|
|
566
566
|
emits: [oe.SELECT_CATEGORY, oe.UNSELECT_CATEGORY],
|
|
567
567
|
setup(e, { emit: t }) {
|
|
568
|
-
const a =
|
|
568
|
+
const a = P(!1), { t: c } = ue(), u = (S) => e.isOptionDisabled ? e.isOptionDisabled(S) : !1, n = v(
|
|
569
569
|
() => e.category.items.every((S) => u(S))
|
|
570
570
|
), s = se(e, "staticCategories"), l = v(() => a.value || e.staticCategories), r = v(() => ({
|
|
571
571
|
[`b-listbox-multi-select-category--${ge.DISABLED}`]: n.value,
|
|
@@ -599,14 +599,14 @@ const Ct = {
|
|
|
599
599
|
el: "span",
|
|
600
600
|
variant: e.staticCategories ? "caption" : "body"
|
|
601
601
|
})
|
|
602
|
-
),
|
|
602
|
+
), M = () => {
|
|
603
603
|
t(oe.SELECT_CATEGORY);
|
|
604
604
|
}, m = () => {
|
|
605
605
|
t(oe.UNSELECT_CATEGORY);
|
|
606
606
|
}, { isAllSelected: C, isIndeterminate: O, toggleSelectAll: k } = $e(
|
|
607
607
|
d,
|
|
608
608
|
o,
|
|
609
|
-
|
|
609
|
+
M,
|
|
610
610
|
m
|
|
611
611
|
);
|
|
612
612
|
return {
|
|
@@ -682,7 +682,7 @@ const _t = W({
|
|
|
682
682
|
components: {
|
|
683
683
|
BentoCheckbox: Ce,
|
|
684
684
|
BentoListboxOption: de,
|
|
685
|
-
BentoTypography:
|
|
685
|
+
BentoTypography: Z,
|
|
686
686
|
ListboxMultiSelectCategory: Tt
|
|
687
687
|
},
|
|
688
688
|
props: {
|
|
@@ -776,7 +776,7 @@ const _t = W({
|
|
|
776
776
|
function At(e, t, a, c, u, n) {
|
|
777
777
|
const s = L("bento-checkbox"), l = L("bento-typography"), r = L("bento-listbox-option"), i = L("listbox-multi-select-options", !0), y = L("listbox-multi-select-category");
|
|
778
778
|
return f(), _("div", null, [
|
|
779
|
-
(f(!0), _(
|
|
779
|
+
(f(!0), _(J, null, x(e.items, (o) => (f(), _("div", {
|
|
780
780
|
key: `selected-${o.value}`
|
|
781
781
|
}, [
|
|
782
782
|
e.searching && e.isMultiLevel ? (f(), D(r, {
|
|
@@ -814,7 +814,7 @@ function At(e, t, a, c, u, n) {
|
|
|
814
814
|
], !0)
|
|
815
815
|
]),
|
|
816
816
|
_: 2
|
|
817
|
-
}, 1032, ["class", "disabled"])) : (f(), _(
|
|
817
|
+
}, 1032, ["class", "disabled"])) : (f(), _(J, { key: 1 }, [
|
|
818
818
|
o.items ? (f(), D(y, {
|
|
819
819
|
key: 0,
|
|
820
820
|
category: o,
|
|
@@ -880,6 +880,12 @@ function At(e, t, a, c, u, n) {
|
|
|
880
880
|
const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72"]]), Be = {
|
|
881
881
|
"en-US": {
|
|
882
882
|
remove: "Remove"
|
|
883
|
+
},
|
|
884
|
+
"pt-BR": {
|
|
885
|
+
remove: "Remover"
|
|
886
|
+
},
|
|
887
|
+
"ja-JP": {
|
|
888
|
+
remove: "削除"
|
|
883
889
|
}
|
|
884
890
|
}, kt = { class: "b-listbox-multi-select-chips" }, Bt = {
|
|
885
891
|
i18n: { messages: Be }
|
|
@@ -910,21 +916,21 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
910
916
|
setup(e, { emit: t }) {
|
|
911
917
|
const a = t, { t: c } = ue({ messages: Be }), u = (n) => n.items ? a("unselect-category", n) : a("unselect-item", n);
|
|
912
918
|
return (n, s) => (f(), _("div", kt, [
|
|
913
|
-
(f(!0), _(
|
|
919
|
+
(f(!0), _(J, null, x(e.items, (l) => (f(), _("div", {
|
|
914
920
|
key: `selected-${l.value}`
|
|
915
921
|
}, [
|
|
916
|
-
B(ce(
|
|
922
|
+
B(ce(Je), {
|
|
917
923
|
class: "b-listbox-multi-select-chips__chip",
|
|
918
924
|
disabled: e.isOptionDisabled ? e.isOptionDisabled(l) : null,
|
|
919
925
|
onClick: (r) => u(l)
|
|
920
926
|
}, {
|
|
921
927
|
iconRight: T(() => [
|
|
922
|
-
B(ce(
|
|
928
|
+
B(ce(Ze), {
|
|
923
929
|
"svg-title": ce(c)("remove")
|
|
924
930
|
}, null, 8, ["svg-title"])
|
|
925
931
|
]),
|
|
926
932
|
default: T(() => [
|
|
927
|
-
B(ce(
|
|
933
|
+
B(ce(Z), {
|
|
928
934
|
el: "span",
|
|
929
935
|
variant: "caption",
|
|
930
936
|
class: "b-listbox-multi-select-chips__option-text"
|
|
@@ -947,7 +953,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
947
953
|
numbersSelected: "{number} selected",
|
|
948
954
|
selectAll: "Select all ({total})"
|
|
949
955
|
}
|
|
950
|
-
},
|
|
956
|
+
}, Mt = (e) => {
|
|
951
957
|
const t = v(() => {
|
|
952
958
|
var c;
|
|
953
959
|
return !!((c = e.value) != null && c.find(({ items: u }) => !!u));
|
|
@@ -959,13 +965,13 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
959
965
|
isMultiLevelSelect: t,
|
|
960
966
|
flattenedItemsList: a
|
|
961
967
|
};
|
|
962
|
-
},
|
|
968
|
+
}, Pt = W({
|
|
963
969
|
i18n: { messages: Le },
|
|
964
970
|
name: "bento-listbox-multi-select",
|
|
965
971
|
components: {
|
|
966
972
|
BentoCheckbox: Ce,
|
|
967
973
|
BentoListboxOption: de,
|
|
968
|
-
BentoTypography:
|
|
974
|
+
BentoTypography: Z,
|
|
969
975
|
ListboxMultiSelectOptions: $t,
|
|
970
976
|
ListboxMultiSelectChips: Dt
|
|
971
977
|
},
|
|
@@ -1031,9 +1037,9 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1031
1037
|
},
|
|
1032
1038
|
emits: [b.SELECT],
|
|
1033
1039
|
setup(e, { emit: t, slots: a }) {
|
|
1034
|
-
const { t: c } = ue({ messages: Le }), u =
|
|
1040
|
+
const { t: c } = ue({ messages: Le }), u = P(null), n = P(null), s = P(null), l = v(
|
|
1035
1041
|
() => e.selectedValues.map(({ value: g }) => g)
|
|
1036
|
-
), { isMultiLevelSelect: r, flattenedItemsList: i } =
|
|
1042
|
+
), { isMultiLevelSelect: r, flattenedItemsList: i } = Mt(se(e, "items")), y = (g) => {
|
|
1037
1043
|
var A;
|
|
1038
1044
|
const p = e.isOptionDisabled(g), h = ((A = l.value) == null ? void 0 : A.includes(g.value)) || !1;
|
|
1039
1045
|
return { isDisabled: p, isPreSelected: h };
|
|
@@ -1061,7 +1067,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1061
1067
|
var A;
|
|
1062
1068
|
const g = o.value.length, p = R(), h = ((A = d.value) == null ? void 0 : A.length) || 0;
|
|
1063
1069
|
return h === 0 ? c("selectAll", { total: g }) : h === p ? c("allSelected", { total: p }) : h <= p ? c("numberOfTotalSelected", { number: h, total: p }) : c("numbersSelected", { number: h });
|
|
1064
|
-
}),
|
|
1070
|
+
}), M = (g) => {
|
|
1065
1071
|
const p = (A) => {
|
|
1066
1072
|
const { isDisabled: E, isPreSelected: j } = y(A);
|
|
1067
1073
|
return E && j || !E;
|
|
@@ -1074,7 +1080,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1074
1080
|
}, h = g.filter(p).map(({ value: E }) => E), A = e.selectedValues.filter((E) => !(h != null && h.includes(E.value)));
|
|
1075
1081
|
t(b.SELECT, A);
|
|
1076
1082
|
}, C = () => {
|
|
1077
|
-
|
|
1083
|
+
M(i.value);
|
|
1078
1084
|
}, O = () => {
|
|
1079
1085
|
m(i.value);
|
|
1080
1086
|
}, { isAllSelected: k, isIndeterminate: S, toggleSelectAll: I } = $e(
|
|
@@ -1083,7 +1089,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1083
1089
|
C,
|
|
1084
1090
|
O
|
|
1085
1091
|
), V = (g) => {
|
|
1086
|
-
|
|
1092
|
+
M(g.items);
|
|
1087
1093
|
}, Q = (g) => {
|
|
1088
1094
|
m(g.items);
|
|
1089
1095
|
}, be = (g, p) => {
|
|
@@ -1101,7 +1107,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1101
1107
|
var h, A, E, j;
|
|
1102
1108
|
const g = ["automatic", "button"].includes(e.lazyLoadType), p = ((h = e.selectedValues) == null ? void 0 : h.length) > 0 && ((A = d.value) == null ? void 0 : A.length) !== ((E = i.value) == null ? void 0 : E.length);
|
|
1103
1109
|
return g && e.hasMoreItems ? !!((j = e.selectedValues) != null && j.length) : p;
|
|
1104
|
-
}),
|
|
1110
|
+
}), N = v(() => ["automatic", "button"].includes(e.lazyLoadType) ? !e.hasMoreItems : !0), le = v(
|
|
1105
1111
|
() => u.value ? [u.value] : []
|
|
1106
1112
|
), Re = v(
|
|
1107
1113
|
() => {
|
|
@@ -1113,11 +1119,11 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1113
1119
|
var g, p;
|
|
1114
1120
|
return (p = (g = s.value) == null ? void 0 : g.$children) != null && p.length ? s.value.$children : [];
|
|
1115
1121
|
}
|
|
1116
|
-
),
|
|
1117
|
-
|
|
1122
|
+
), Me = v(() => ({ label: $, value: k })), Pe = v(() => [
|
|
1123
|
+
Me,
|
|
1118
1124
|
...re.value,
|
|
1119
1125
|
...i.value
|
|
1120
|
-
]),
|
|
1126
|
+
]), Ne = (g) => {
|
|
1121
1127
|
[
|
|
1122
1128
|
...le.value,
|
|
1123
1129
|
...Re.value,
|
|
@@ -1125,11 +1131,11 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1125
1131
|
][g].$el.focus();
|
|
1126
1132
|
}, { moveToNextElement: we, moveToPreviousElement: Ue, moveToFirstElement: Ve, moveToLastElement: Ge } = ke(
|
|
1127
1133
|
{
|
|
1128
|
-
items:
|
|
1134
|
+
items: P(Pe),
|
|
1129
1135
|
isOptionDisabled: e.isOptionDisabled,
|
|
1130
1136
|
hasStaticCategories: se(e, "staticCategories")
|
|
1131
1137
|
},
|
|
1132
|
-
|
|
1138
|
+
Ne
|
|
1133
1139
|
), ze = {
|
|
1134
1140
|
[F.ARROW_UP]: (g) => Ue(g),
|
|
1135
1141
|
[F.ARROW_DOWN]: (g) => we(g),
|
|
@@ -1150,7 +1156,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1150
1156
|
selectedItemsList: l,
|
|
1151
1157
|
selectAllCheckboxText: $,
|
|
1152
1158
|
selectedOptions: re,
|
|
1153
|
-
showSelectAllCheckbox:
|
|
1159
|
+
showSelectAllCheckbox: N,
|
|
1154
1160
|
slots: a,
|
|
1155
1161
|
// Enums
|
|
1156
1162
|
BentoListboxEvent: b,
|
|
@@ -1163,7 +1169,7 @@ const $t = /* @__PURE__ */ q(_t, [["render", At], ["__scopeId", "data-v-25938a72
|
|
|
1163
1169
|
listboxListeners: ze
|
|
1164
1170
|
};
|
|
1165
1171
|
}
|
|
1166
|
-
}),
|
|
1172
|
+
}), Nt = {
|
|
1167
1173
|
key: 1,
|
|
1168
1174
|
class: "b-listbox-multi-select__divider"
|
|
1169
1175
|
}, wt = { key: 2 };
|
|
@@ -1194,7 +1200,7 @@ function Ut(e, t, a, c, u, n) {
|
|
|
1194
1200
|
]),
|
|
1195
1201
|
_: 1
|
|
1196
1202
|
}, 512)) : Y("", !0),
|
|
1197
|
-
e.showSelectAllCheckbox ? (f(), _("hr",
|
|
1203
|
+
e.showSelectAllCheckbox ? (f(), _("hr", Nt)) : Y("", !0),
|
|
1198
1204
|
e.showSelectedItems ? (f(), _("div", wt, [
|
|
1199
1205
|
B(i, {
|
|
1200
1206
|
ref: "selectedListboxItemsRef",
|
|
@@ -1231,10 +1237,18 @@ function Ut(e, t, a, c, u, n) {
|
|
|
1231
1237
|
[o]
|
|
1232
1238
|
]);
|
|
1233
1239
|
}
|
|
1234
|
-
const Te = /* @__PURE__ */ q(
|
|
1240
|
+
const Te = /* @__PURE__ */ q(Pt, [["render", Ut], ["__scopeId", "data-v-282f5857"]]), _e = {
|
|
1235
1241
|
"en-US": {
|
|
1236
|
-
|
|
1237
|
-
|
|
1242
|
+
loading: "Loading",
|
|
1243
|
+
showMore: "Show more"
|
|
1244
|
+
},
|
|
1245
|
+
"pt-BR": {
|
|
1246
|
+
loading: "Carregando",
|
|
1247
|
+
showMore: "Mostrar mais"
|
|
1248
|
+
},
|
|
1249
|
+
"ja-JP": {
|
|
1250
|
+
loading: "読み込み中",
|
|
1251
|
+
showMore: "表示内容を増やす"
|
|
1238
1252
|
}
|
|
1239
1253
|
}, Vt = 36, Gt = W({
|
|
1240
1254
|
name: "bento-listbox",
|
|
@@ -1242,7 +1256,7 @@ const Te = /* @__PURE__ */ q(Mt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1242
1256
|
BentoEmptyState: We,
|
|
1243
1257
|
BentoListboxSingleSelect: St,
|
|
1244
1258
|
BentoListboxMultiSelect: Te,
|
|
1245
|
-
BentoTypography:
|
|
1259
|
+
BentoTypography: Z,
|
|
1246
1260
|
BentoLoadingIndicator: qe,
|
|
1247
1261
|
BentoLoadingButton: Qe
|
|
1248
1262
|
},
|
|
@@ -1352,9 +1366,9 @@ const Te = /* @__PURE__ */ q(Mt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1352
1366
|
b.TAB
|
|
1353
1367
|
],
|
|
1354
1368
|
setup(e, { emit: t, slots: a }) {
|
|
1355
|
-
const c =
|
|
1356
|
-
var
|
|
1357
|
-
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((
|
|
1369
|
+
const c = P([]), u = se(e, "items"), { t: n } = ue({ messages: _e }), s = v(() => e.lazyLoadType !== X.AUTOMATIC), l = v(() => e.lazyLoadType === X.AUTOMATIC), r = () => {
|
|
1370
|
+
var N;
|
|
1371
|
+
return typeof (e == null ? void 0 : e.virtualScroll) == "object" && ((N = e == null ? void 0 : e.virtualScroll) != null && N.itemHeight) ? e.virtualScroll.itemHeight : Vt;
|
|
1358
1372
|
}, {
|
|
1359
1373
|
containerRef: i,
|
|
1360
1374
|
containerProps: y,
|
|
@@ -1367,25 +1381,25 @@ const Te = /* @__PURE__ */ q(Mt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1367
1381
|
disabled: (e == null ? void 0 : e.multiple) || (e == null ? void 0 : e.virtualScroll) === !1 || (e == null ? void 0 : e.lazyLoadType) !== "none"
|
|
1368
1382
|
}), $ = v(
|
|
1369
1383
|
() => s.value ? "true" : void 0
|
|
1370
|
-
),
|
|
1384
|
+
), M = v(
|
|
1371
1385
|
() => s.value && e.loading ? "true" : "false"
|
|
1372
1386
|
), m = v(
|
|
1373
1387
|
() => s.value ? "polite" : void 0
|
|
1374
|
-
), C = (
|
|
1375
|
-
t(
|
|
1388
|
+
), C = (N) => (le) => {
|
|
1389
|
+
t(N, le);
|
|
1376
1390
|
}, O = () => {
|
|
1377
1391
|
t(b.SHOW_MORE);
|
|
1378
1392
|
}, k = je(() => {
|
|
1379
|
-
const
|
|
1380
|
-
if (!
|
|
1393
|
+
const N = i.value;
|
|
1394
|
+
if (!N)
|
|
1381
1395
|
return;
|
|
1382
|
-
const le = Math.round(
|
|
1396
|
+
const le = Math.round(N.scrollTop) + N.clientHeight >= N.scrollHeight;
|
|
1383
1397
|
e.hasMoreItems && le && !e.loading && O();
|
|
1384
1398
|
}), S = () => {
|
|
1385
1399
|
l.value ? k() : o();
|
|
1386
1400
|
}, I = v(() => {
|
|
1387
|
-
var
|
|
1388
|
-
return ((
|
|
1401
|
+
var N;
|
|
1402
|
+
return ((N = e.items) == null ? void 0 : N.length) === 0;
|
|
1389
1403
|
}), V = v(
|
|
1390
1404
|
() => e.lazyLoadType === X.BUTTON && e.hasMoreItems
|
|
1391
1405
|
), Q = v(
|
|
@@ -1405,7 +1419,7 @@ const Te = /* @__PURE__ */ q(Mt, [["render", Ut], ["__scopeId", "data-v-282f5857
|
|
|
1405
1419
|
listboxItemRef: c,
|
|
1406
1420
|
// a11y
|
|
1407
1421
|
ariaAtomic: $,
|
|
1408
|
-
ariaBusy:
|
|
1422
|
+
ariaBusy: M,
|
|
1409
1423
|
ariaLive: m,
|
|
1410
1424
|
// Values
|
|
1411
1425
|
containerProps: y,
|
|
@@ -1464,7 +1478,7 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1464
1478
|
]),
|
|
1465
1479
|
_: 1
|
|
1466
1480
|
}))
|
|
1467
|
-
])) : (f(), _(
|
|
1481
|
+
])) : (f(), _(J, { key: 1 }, [
|
|
1468
1482
|
e.multiple ? (f(), D(r, U({
|
|
1469
1483
|
key: 0,
|
|
1470
1484
|
ref: "listboxItemRef",
|
|
@@ -1476,10 +1490,10 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1476
1490
|
searching: e.searching,
|
|
1477
1491
|
"is-option-disabled": e.isOptionDisabled
|
|
1478
1492
|
}, te(e.listboxListeners)), ie({ _: 2 }, [
|
|
1479
|
-
x(e.slots, ($,
|
|
1480
|
-
name:
|
|
1493
|
+
x(e.slots, ($, M) => ({
|
|
1494
|
+
name: M,
|
|
1481
1495
|
fn: T((m) => [
|
|
1482
|
-
z(e.$slots,
|
|
1496
|
+
z(e.$slots, M, ee(ne(m)), void 0, !0)
|
|
1483
1497
|
])
|
|
1484
1498
|
}))
|
|
1485
1499
|
]), 1040, ["has-more-items", "items", "lazy-load-type", "static-categories", "selected-values", "searching", "is-option-disabled"])) : (f(), D(i, U({
|
|
@@ -1490,10 +1504,10 @@ function Kt(e, t, a, c, u, n) {
|
|
|
1490
1504
|
"static-categories": e.staticCategories,
|
|
1491
1505
|
"is-option-disabled": e.isOptionDisabled
|
|
1492
1506
|
}, te(e.listboxListeners)), ie({ _: 2 }, [
|
|
1493
|
-
x(e.slots, ($,
|
|
1494
|
-
name:
|
|
1507
|
+
x(e.slots, ($, M) => ({
|
|
1508
|
+
name: M,
|
|
1495
1509
|
fn: T((m) => [
|
|
1496
|
-
z(e.$slots,
|
|
1510
|
+
z(e.$slots, M, ee(ne(m)), void 0, !0)
|
|
1497
1511
|
])
|
|
1498
1512
|
}))
|
|
1499
1513
|
]), 1040, ["items", "selected-value", "static-categories", "is-option-disabled"])),
|
|
@@ -1526,7 +1540,7 @@ const is = /* @__PURE__ */ q(Gt, [["render", Kt], ["__scopeId", "data-v-c6bccc42
|
|
|
1526
1540
|
}
|
|
1527
1541
|
return null;
|
|
1528
1542
|
}, as = (e, t, a) => {
|
|
1529
|
-
const c =
|
|
1543
|
+
const c = P([]), u = P(), n = (r) => {
|
|
1530
1544
|
u.value = a.value ? r.map(({ value: i }) => i) : r[0].value;
|
|
1531
1545
|
}, s = (r) => {
|
|
1532
1546
|
c.value = r, n(r);
|
|
@@ -1568,6 +1582,6 @@ export {
|
|
|
1568
1582
|
b as a,
|
|
1569
1583
|
is as b,
|
|
1570
1584
|
as as c,
|
|
1571
|
-
|
|
1585
|
+
Mt as u
|
|
1572
1586
|
};
|
|
1573
|
-
//# sourceMappingURL=use-cached-selected-values.
|
|
1587
|
+
//# sourceMappingURL=use-cached-selected-values.CS3gHOyI.js.map
|