@adyen/bento-vue2 1.92.2 → 1.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +8 -0
- package/dist/@types/index.d.ts +483 -136
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/anchor-scroller.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/button-actions.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/drawer.css +1 -0
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -0
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{action-bar.ChuPTyQG.js → action-bar.BPsug0x7.js} +4 -4
- package/dist/chunks/{action-bar.ChuPTyQG.js.map → action-bar.BPsug0x7.js.map} +1 -1
- package/dist/chunks/{ai-tag.Dt8nijLW.js → ai-tag.BfAbJI_v.js} +2 -2
- package/dist/chunks/{ai-tag.Dt8nijLW.js.map → ai-tag.BfAbJI_v.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.DWaykZQj.js → anchor-scroller.cFxql5sk.js} +2 -2
- package/dist/chunks/{anchor-scroller.DWaykZQj.js.map → anchor-scroller.cFxql5sk.js.map} +1 -1
- package/dist/chunks/{base-modal.DMdzcBrq.js → base-modal.ByhHqRuT.js} +5 -5
- package/dist/chunks/{base-modal.DMdzcBrq.js.map → base-modal.ByhHqRuT.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.CXFziNUr.js → button-actions-with-menu.Ctu2EwxW.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.CXFziNUr.js.map → button-actions-with-menu.Ctu2EwxW.js.map} +1 -1
- package/dist/chunks/{button-actions.CXD6_9qN.js → button-actions.CdsmKyvj.js} +3 -3
- package/dist/chunks/{button-actions.CXD6_9qN.js.map → button-actions.CdsmKyvj.js.map} +1 -1
- package/dist/chunks/{calendar.rZsIZPxm.js → calendar.BaPh-1UW.js} +2 -2
- package/dist/chunks/{calendar.rZsIZPxm.js.map → calendar.BaPh-1UW.js.map} +1 -1
- package/dist/chunks/{card.Brma5kdb.js → card.BHssPRpx.js} +2 -2
- package/dist/chunks/{card.Brma5kdb.js.map → card.BHssPRpx.js.map} +1 -1
- package/dist/chunks/{checkbox-group.DmKZQlxZ.js → checkbox-group.KJvcjvpx.js} +3 -3
- package/dist/chunks/{checkbox-group.DmKZQlxZ.js.map → checkbox-group.KJvcjvpx.js.map} +1 -1
- package/dist/chunks/{checkbox.BObXaofv.js → checkbox.B2lQl9BE.js} +2 -2
- package/dist/chunks/{checkbox.BObXaofv.js.map → checkbox.B2lQl9BE.js.map} +1 -1
- package/dist/chunks/{code-snippet.DHAymIXp.js → code-snippet.7SHuhPxc.js} +5 -5
- package/dist/chunks/{code-snippet.DHAymIXp.js.map → code-snippet.7SHuhPxc.js.map} +1 -1
- package/dist/chunks/{controls-group.DSm2Ujwt.js → controls-group.DNmVV2pt.js} +2 -2
- package/dist/chunks/{controls-group.DSm2Ujwt.js.map → controls-group.DNmVV2pt.js.map} +1 -1
- package/dist/chunks/{copy.qqGYFbKJ.js → copy.DcpG08B_.js} +3 -3
- package/dist/chunks/{copy.qqGYFbKJ.js.map → copy.DcpG08B_.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D9rS8myE.js → dashboard-section.BWhw2hvx.js} +3 -3
- package/dist/chunks/{dashboard-section.D9rS8myE.js.map → dashboard-section.BWhw2hvx.js.map} +1 -1
- package/dist/chunks/{dashed-underline.D_FhFRXM.js → dashed-underline.CPTkubjQ.js} +3 -3
- package/dist/chunks/{dashed-underline.D_FhFRXM.js.map → dashed-underline.CPTkubjQ.js.map} +1 -1
- package/dist/chunks/{data-grid-template.CRijG20n.js → data-grid-template.ZB5anthH.js} +3 -3
- package/dist/chunks/{data-grid-template.CRijG20n.js.map → data-grid-template.ZB5anthH.js.map} +1 -1
- package/dist/chunks/{data-grid.CJzEtn4Q.js → data-grid.CuLOPenn.js} +18 -18
- package/dist/chunks/{data-grid.CJzEtn4Q.js.map → data-grid.CuLOPenn.js.map} +1 -1
- package/dist/chunks/{date-picker.C9DIeaWH.js → date-picker.NdHdiufy.js} +8 -8
- package/dist/chunks/{date-picker.C9DIeaWH.js.map → date-picker.NdHdiufy.js.map} +1 -1
- package/dist/chunks/date-range-picker.BFgnw81F.js +1133 -0
- package/dist/chunks/{date-range-picker.zT42F9r4.js.map → date-range-picker.BFgnw81F.js.map} +1 -1
- package/dist/chunks/{dialog-page.EdejG53a.js → dialog-page.CziegEuc.js} +2 -2
- package/dist/chunks/{dialog-page.EdejG53a.js.map → dialog-page.CziegEuc.js.map} +1 -1
- package/dist/chunks/{draggable-handle.BR_aQH5N.js → draggable-handle.BsGnEMAT.js} +2 -2
- package/dist/chunks/{draggable-handle.BR_aQH5N.js.map → draggable-handle.BsGnEMAT.js.map} +1 -1
- package/dist/chunks/drawer.BqqodvlR.js +47 -0
- package/dist/chunks/drawer.BqqodvlR.js.map +1 -0
- package/dist/chunks/{dropdown-tag.z3rsxbpW.js → dropdown-tag.C6hkNptM.js} +3 -3
- package/dist/chunks/{dropdown-tag.z3rsxbpW.js.map → dropdown-tag.C6hkNptM.js.map} +1 -1
- package/dist/chunks/{dropdown.BYJwx-JD.js → dropdown.CF6Gf7ya.js} +5 -5
- package/dist/chunks/{dropdown.BYJwx-JD.js.map → dropdown.CF6Gf7ya.js.map} +1 -1
- package/dist/chunks/{es6.C1DXQV6f.js → es6.Cu3DYUPA.js} +3 -3
- package/dist/chunks/es6.Cu3DYUPA.js.map +1 -0
- package/dist/chunks/{field-label.DjjjkcO6.js → field-label.D7w7mHvW.js} +2 -2
- package/dist/chunks/{field-label.DjjjkcO6.js.map → field-label.D7w7mHvW.js.map} +1 -1
- package/dist/chunks/{file-uploader.Djl0xaDN.js → file-uploader.CX48W2BT.js} +3 -3
- package/dist/chunks/{file-uploader.Djl0xaDN.js.map → file-uploader.CX48W2BT.js.map} +1 -1
- package/dist/chunks/{filter-bar.C5NxhUhF.js → filter-bar.CFXeAK8X.js} +17 -17
- package/dist/chunks/{filter-bar.C5NxhUhF.js.map → filter-bar.CFXeAK8X.js.map} +1 -1
- package/dist/chunks/{focus-trap.DRqjHzt6.js → focus-trap.D4WDxUwu.js} +2 -2
- package/dist/chunks/{focus-trap.DRqjHzt6.js.map → focus-trap.D4WDxUwu.js.map} +1 -1
- package/dist/chunks/{footer-actions.D9mHwk5l.js → footer-actions.BoAzqs48.js} +2 -2
- package/dist/chunks/{footer-actions.D9mHwk5l.js.map → footer-actions.BoAzqs48.js.map} +1 -1
- package/dist/chunks/{header-meta.BSPnWWmi.js → header-meta.pubDFdDH.js} +3 -3
- package/dist/chunks/{header-meta.BSPnWWmi.js.map → header-meta.pubDFdDH.js.map} +1 -1
- package/dist/chunks/{header-with-views.DKD7O8pU.js → header-with-views.wMqUhzME.js} +10 -10
- package/dist/chunks/{header-with-views.DKD7O8pU.js.map → header-with-views.wMqUhzME.js.map} +1 -1
- package/dist/chunks/{header.DyZG7qWe.js → header.9h-5ZCv8.js} +3 -3
- package/dist/chunks/{header.DyZG7qWe.js.map → header.9h-5ZCv8.js.map} +1 -1
- package/dist/chunks/{index.CwzYJHw2.js → index.ByaCaB1Z.js} +15 -15
- package/dist/chunks/{index.CwzYJHw2.js.map → index.ByaCaB1Z.js.map} +1 -1
- package/dist/chunks/{info-icon.DCR42Kvm.js → info-icon.BOX4oIVD.js} +3 -3
- package/dist/chunks/{info-icon.DCR42Kvm.js.map → info-icon.BOX4oIVD.js.map} +1 -1
- package/dist/chunks/{input-field-password.hd-w1gkL.js → input-field-password.Ir5jAkAn.js} +6 -6
- package/dist/chunks/{input-field-password.hd-w1gkL.js.map → input-field-password.Ir5jAkAn.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BRmSDrCn.js → input-field-phone-number.DmC5am2a.js} +3 -3
- package/dist/chunks/{input-field-phone-number.BRmSDrCn.js.map → input-field-phone-number.DmC5am2a.js.map} +1 -1
- package/dist/chunks/{input-field.BgzXEyxn.js → input-field.Cwep4H_C.js} +3 -3
- package/dist/chunks/input-field.Cwep4H_C.js.map +1 -0
- package/dist/chunks/{input-time.CF2kTtAp.js → input-time.CNgIob-u.js} +4 -4
- package/dist/chunks/{input-time.CF2kTtAp.js.map → input-time.CNgIob-u.js.map} +1 -1
- package/dist/chunks/{inspector.BzBPlz-5.js → inspector._xqiBe9X.js} +3 -3
- package/dist/chunks/{inspector.BzBPlz-5.js.map → inspector._xqiBe9X.js.map} +1 -1
- package/dist/chunks/{layout-row.B_IQC9Nq.js → layout-row.Du_4NPVx.js} +8 -8
- package/dist/chunks/{layout-row.B_IQC9Nq.js.map → layout-row.Du_4NPVx.js.map} +1 -1
- package/dist/chunks/{list-item.DqTHh8-Z.js → list-item.Disq4nSZ.js} +2 -2
- package/dist/chunks/{list-item.DqTHh8-Z.js.map → list-item.Disq4nSZ.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.CvbE-EuG.js → listbox-option-tag.B28d45lY.js} +2 -2
- package/dist/chunks/{listbox-option-tag.CvbE-EuG.js.map → listbox-option-tag.B28d45lY.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.De6mevyD.js → modal-fullscreen.CEGc-wKf.js} +4 -4
- package/dist/chunks/{modal-fullscreen.De6mevyD.js.map → modal-fullscreen.CEGc-wKf.js.map} +1 -1
- package/dist/chunks/{modal.B6n5AWs2.js → modal.DMMqMdJF.js} +4 -4
- package/dist/chunks/{modal.B6n5AWs2.js.map → modal.DMMqMdJF.js.map} +1 -1
- package/dist/chunks/navigation-menu-group.KJvGw1tX.js +231 -0
- package/dist/chunks/navigation-menu-group.KJvGw1tX.js.map +1 -0
- package/dist/chunks/{pagination.BzsKZFnw.js → pagination.hOIvu4hj.js} +2 -2
- package/dist/chunks/{pagination.BzsKZFnw.js.map → pagination.hOIvu4hj.js.map} +1 -1
- package/dist/chunks/popover.types.DhuEjpRI.js +6 -0
- package/dist/chunks/{popover.types.hA13DZPg.js.map → popover.types.DhuEjpRI.js.map} +1 -1
- package/dist/chunks/{popper-container.C_n9Ds1W.js → popper-container.D7-KbKnN.js} +2 -2
- package/dist/chunks/{popper-container.C_n9Ds1W.js.map → popper-container.D7-KbKnN.js.map} +1 -1
- package/dist/chunks/{promo-banner.Dc_kK1x9.js → promo-banner.BzKZCMJp.js} +2 -2
- package/dist/chunks/{promo-banner.Dc_kK1x9.js.map → promo-banner.BzKZCMJp.js.map} +1 -1
- package/dist/chunks/{radio-group.Bb-L-0io.js → radio-group.U3G8U7p0.js} +3 -3
- package/dist/chunks/{radio-group.Bb-L-0io.js.map → radio-group.U3G8U7p0.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.CmsmiW87.js → rich-text-editor.BHo3e81W.js} +4 -4
- package/dist/chunks/{rich-text-editor.CmsmiW87.js.map → rich-text-editor.BHo3e81W.js.map} +1 -1
- package/dist/chunks/{search-bar.Brb3OP-y.js → search-bar.CHINuvXx.js} +4 -4
- package/dist/chunks/{search-bar.Brb3OP-y.js.map → search-bar.CHINuvXx.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BBL5zZPK.js → secondary-nav.BWn_I33v.js} +4 -4
- package/dist/chunks/{secondary-nav.BBL5zZPK.js.map → secondary-nav.BWn_I33v.js.map} +1 -1
- package/dist/chunks/{segmented-control.DDtjX-V5.js → segmented-control.Dww21VC2.js} +2 -2
- package/dist/chunks/{segmented-control.DDtjX-V5.js.map → segmented-control.Dww21VC2.js.map} +1 -1
- package/dist/chunks/{selection-card-group.5jzX23fU.js → selection-card-group.DRP4Vk2d.js} +21 -21
- package/dist/chunks/{selection-card-group.5jzX23fU.js.map → selection-card-group.DRP4Vk2d.js.map} +1 -1
- package/dist/chunks/{sidepanel.nW0Bhk_u.js → sidepanel.B9ecjbyC.js} +5 -5
- package/dist/chunks/{sidepanel.nW0Bhk_u.js.map → sidepanel.B9ecjbyC.js.map} +1 -1
- package/dist/chunks/{structured-list-item.BBBtie1s.js → structured-list-item.De_yYayn.js} +4 -4
- package/dist/chunks/{structured-list-item.BBBtie1s.js.map → structured-list-item.De_yYayn.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.Dp_efYVN.js → summary-grid.types.Dc-PJlfH.js} +5 -5
- package/dist/chunks/{summary-grid.types.Dp_efYVN.js.map → summary-grid.types.Dc-PJlfH.js.map} +1 -1
- package/dist/chunks/{tag.D2xagTJv.js → tag.DPNSUeue.js} +2 -2
- package/dist/chunks/{tag.D2xagTJv.js.map → tag.DPNSUeue.js.map} +1 -1
- package/dist/chunks/{textarea.CJS-1I41.js → textarea.C2gJX1kj.js} +3 -3
- package/dist/chunks/{textarea.CJS-1I41.js.map → textarea.C2gJX1kj.js.map} +1 -1
- package/dist/chunks/{timeline-item.CF9jbIRr.js → timeline-item.BKc5c9sS.js} +6 -6
- package/dist/chunks/{timeline-item.CF9jbIRr.js.map → timeline-item.BKc5c9sS.js.map} +1 -1
- package/dist/chunks/{tooltip.BxtnF3is.js → tooltip.Bl6kedql.js} +3 -3
- package/dist/chunks/{tooltip.BxtnF3is.js.map → tooltip.Bl6kedql.js.map} +1 -1
- package/dist/chunks/{tutorial.CoWDVs7_.js → tutorial.C1dZpvsz.js} +4 -4
- package/dist/chunks/{tutorial.CoWDVs7_.js.map → tutorial.C1dZpvsz.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js → use-cached-selected-values.C6aShVBp.js} +2 -2
- package/dist/chunks/{use-cached-selected-values.Du8-wWR2.js.map → use-cached-selected-values.C6aShVBp.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js → use-date-input-formatter.CrkJ_UfS.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.ibZeLD_V.js.map → use-date-input-formatter.CrkJ_UfS.js.map} +1 -1
- package/dist/code-snippet.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/draggable.js +1 -1
- package/dist/drawer.js +5 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown.js +3 -3
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +291 -285
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +11 -11
- package/dist/layout.js +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +7 -0
- package/dist/navigation-menu.js.map +1 -0
- package/dist/pagination.js +1 -1
- package/dist/popover.js +2 -2
- package/dist/popper-container.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.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-dark.css +3 -0
- package/dist/styles/bento-light.css +3 -0
- package/dist/styles/bento.css +3 -0
- package/dist/styles/legacy.css +3 -0
- package/dist/styles/styleguide.css +3 -0
- package/dist/styles/utility.css +9 -0
- package/dist/summary-grid.js +1 -1
- package/dist/tag.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 +236 -2
- package/package.json +5 -5
- package/dist/chunks/date-range-picker.zT42F9r4.js +0 -1097
- package/dist/chunks/es6.C1DXQV6f.js.map +0 -1
- package/dist/chunks/input-field.BgzXEyxn.js.map +0 -1
- package/dist/chunks/popover.types.hA13DZPg.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-fullscreen.De6mevyD.js","sources":["../../src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n :id=\"computedTitleId\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const props = defineProps({\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 * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits([\"close\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n const props = defineProps({\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 * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value && modal.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","props","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","emit","onMounted","useListeners","useListeners$1","getCurrentInstance","instance","_a","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuLIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzHA,EAAA,EAAA,IAAAC,EAAA,GA6DAC,IAAAC,EAAA,GAC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AA,OAAA,CAAAiC,MAAAA,MAAAD;AAAA,IAAqE,GAIzEE,IAAA,CAAAD,OACIA,KACIN,EAAA,MAAA,KAAAM,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAV,EAAAY,IAAAD,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal-fullscreen.CEGc-wKf.js","sources":["../../src/components/modal-fullscreen/components/modal-fullscreen-page.vue","../../src/composables/use-listeners/use-listener.ts","../../src/components/modal-fullscreen/modal-fullscreen.vue"],"sourcesContent":["<template>\n <dialog-page class=\"b-modal-fullscreen-page\" :page-id=\"pageId\" :previous-page=\"previousPage\" always-show-border>\n <template #header>\n <div class=\"b-modal-fullscreen-page__header\">\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--title\">\n <bento-typography\n v-if=\"title\"\n :id=\"computedTitleId\"\n el=\"h2\"\n variant=\"title\"\n class=\"b-modal-fullscreen-page__title\"\n :title=\"title\"\n >{{ title }}</bento-typography\n >\n </div>\n <div\n v-if=\"hasSlot('header')\"\n class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--slot\"\n >\n <slot name=\"header\" />\n </div>\n <div class=\"b-modal-fullscreen-page__header-section b-modal-fullscreen-page__header-section--actions\">\n <bento-typography\n v-if=\"contextualLabel\"\n class=\"b-modal-fullscreen-page__contextual-label\"\n el=\"span\"\n :title=\"contextualLabel\"\n >{{ contextualLabel }}</bento-typography\n >\n <bento-button-actions v-if=\"actions\" class=\"b-modal-fullscreen-page__actions\" :actions=\"actions\" />\n\n <div class=\"b-modal-fullscreen-page__separator\"></div>\n <div class=\"b-modal-fullscreen-page__close-button\">\n <bento-button variant=\"tertiary\" :aria-label=\"t('close')\" @click=\"handleClose\">\n <template #iconLeft><cross-icon :aria-hidden=\"true\" /></template>\n </bento-button>\n </div>\n </div>\n </div>\n </template>\n <template #content>\n <slot />\n </template>\n </dialog-page>\n</template>\n\n<script setup lang=\"ts\">\n import { inject, onMounted, type PropType, useSlots } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import { DialogPage } from '@/internal';\n\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n import CrossIcon from '@adyen/ui-assets-icons-16/vue/cross';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const props = defineProps({\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 * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Identifier of the page, used with activePage prop to handle sidepanel navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n\n /**\n * ID to be applied to the title to be used with aria-labelledby\n */\n titleId: {\n type: String,\n default: undefined,\n },\n });\n const emit = defineEmits([\"close\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const injectedTitleId = inject(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, undefined);\n const computedTitleId = props.titleId ?? injectedTitleId;\n\n const closeModal = inject(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, undefined);\n\n const handleClose = () => {\n emit('close');\n closeModal?.();\n };\n\n onMounted(() => {\n if (props.actions && props.actions.length > 2) {\n throw new Error('Not more than 2 action buttons may be provided in Bento Modal Fullscreen');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * ModalFullscreenPage is used to render different pages of ModalFullscreen component\n *\n * @example\n * import { BentoModalFullscreen, BentoModalFullscreenPage } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen, BentoModalFullscreenPage },\n * template: `\n * <bento-modal-fullscreen active-page='page1' is-open='true'>\n * <bento-modal-fullscreen-page\n * title='Page 1'\n * pageId='page1'\n * contextual-label='Move to next page'\n * :actions=\"[\n * {\n * title: 'Next page',\n * event: () => {\n * activePage.value = 'page2';\n * },\n * }]\">\n * Page 1 info\n * </bento-modal-fullscreen-page>\n * <bento-modal-fullscreen-page\n * title='Page 2'\n * pageId='page2'\n * :actions=\"[\n * {\n * title: 'Save',\n * event: () => {},\n * }]\">\n * Page 2 info\n * </bento-modal-fullscreen-page>\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen-page.scss\" />\n","import { getCurrentInstance, useListeners as vueUseListeners } from 'vue';\n\n/**\n * A composable that provides access to the Vue2 component's listeners (see Vue3 implementation in packages/vue3/composables).\n * The listeners are kebab-case and the colons are removed (e.g. \"click\", \"update-value\").\n *\n * In environments where the Composition API is not available (e.g. during testing),\n * it falls back to using the component's non-reactive `$listeners` object.\n *\n * @returns The component's listeners.\n */\nexport function useListeners() {\n // Return nothing so tests don't require a mock of this function\n if (!window || (!vueUseListeners && !getCurrentInstance)) {\n return {};\n }\n\n if (vueUseListeners) {\n return vueUseListeners() as any;\n }\n\n const instance = getCurrentInstance();\n return instance?.proxy?.$listeners || {};\n}\n","<template>\n <dialog\n :id=\"modalFullscreenId\"\n ref=\"modal\"\n class=\"b-modal-fullscreen\"\n :class=\"conditionalClasses\"\n data-dialog-element=\"modal-fullscreen\"\n :aria-labelledby=\"titleId\"\n @animationend=\"closeModalAfterAnimation\"\n @keydown.esc.prevent=\"closeModal\"\n >\n <bento-focus-trap v-if=\"internalIsOpen\" class=\"b-modal-fullscreen__wrapper\">\n <template v-if=\"props.activePage\">\n <slot />\n </template>\n <bento-modal-fullscreen-page\n v-else\n :actions=\"actions\"\n :contextual-label=\"contextualLabel\"\n :title=\"title\"\n :title-id=\"titleId\"\n @close=\"closeModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot name=\"default\"></slot>\n </template>\n <template v-if=\"hasSlot('header')\" #header>\n <slot name=\"header\"></slot>\n </template>\n </bento-modal-fullscreen-page>\n </bento-focus-trap>\n\n <!-- Enable the toast inside the fullscreen-modal -->\n <template v-if=\"isOpen\">\n <bento-toast />\n </template>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, onUnmounted, type PropType, provide, ref, toRefs, useSlots, watch } from 'vue';\n import { isVue2 } from 'vue-demi';\n\n import { BentoToast } from '@/components/toast';\n import { type BentoButtonActionsList } from '@/components/button';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import BentoModalFullscreenPage from './components/modal-fullscreen-page.vue';\n\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { useListeners } from '@/composables/use-listeners';\n import {\n MODAL_FULLSCREEN_CLOSE_INJECTION_KEY,\n MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY,\n MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY,\n } from '@/components/modal-fullscreen/modal-fullscreen.keys';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n DIALOG_PAGE_CONFIG_INJECTION_KEY,\n DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,\n } from '@/internal';\n\n const props = defineProps({\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 * @see BentoButton for a list of all the other props supported by each button action.\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same as the pageId of the BentoModalFullscreenPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Label shown next to the modal actions\n */\n contextualLabel: {\n type: String,\n default: null,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: null,\n },\n /**\n * Title of the modal\n */\n title: {\n type: String,\n default: null,\n },\n });\n\n const emit = defineEmits([\"before-close\", \"update:active-page\", \"update:is-open\"]);\n\n // Refs\n const { activePage, isOpen } = toRefs(props);\n const modal = ref(null);\n const isClosing = ref(false);\n const modalFullscreenId = generateUid('modal-fullscreen');\n const titleId = generateUid('modal-fullscreen-title');\n const internalIsOpen = ref(false);\n const isMounted = ref(false);\n\n const listeners = useListeners();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n // Animation styling\n const conditionalClasses = computed(() => ({\n 'b-modal-fullscreen--hide': isClosing.value,\n }));\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value && modal.value) {\n modal.value.close();\n if (previousPages.value[0]) {\n emit('update:active-page', previousPages.value[0]);\n }\n previousPages.value = [];\n isClosing.value = false;\n internalIsOpen.value = false;\n emit('update:is-open', false);\n }\n };\n\n /**\n * Emits the `beforeClose` event, if it is being listened to,\n * before closing the modal and omits the closing animation.\n * The animation will be triggered by the change of the `isOpen` prop instead.\n *\n * If no listener for the `before-close`, then the animation will be triggered,\n * which will close the modal and emit the `update:is-open` event instead, after it was closed.\n */\n function closeModal() {\n /**\n * Vue3 appends the prefix \"on\" and changes to camelCase\n */\n const eventName = isVue2 ? 'before-close' : 'onBeforeClose';\n if (listeners[eventName]) {\n emit('before-close');\n return;\n }\n startCloseModalAnimation();\n }\n\n const startCloseModalAnimation = () => {\n if (!modal.value || !modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n onMounted(() => {\n isMounted.value = true;\n });\n\n onUnmounted(() => {\n isMounted.value = false;\n });\n\n // Watching isOpen prop to toggle open/close the dialog element\n watch(\n [() => isOpen.value, modal],\n ([newIsOpen, newModalValue]) => {\n if (!isMounted.value || !newModalValue) {\n return;\n }\n\n if (newIsOpen) {\n internalIsOpen.value = true;\n if (!newModalValue.open) {\n newModalValue.showModal();\n }\n if (!previousPages.value.length) {\n previousPages.value.push(activePage.value);\n }\n } else if (newModalValue.open) {\n startCloseModalAnimation();\n }\n },\n { immediate: true, flush: 'post' }\n );\n\n // lets children components know they are inside a Modal (dialog element)\n provide(MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY, modalFullscreenId);\n provide(MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY, titleId);\n provide(MODAL_FULLSCREEN_CLOSE_INJECTION_KEY, closeModal);\n\n // Pages\n const animation = ref(BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER);\n const pages = ref<Array<string>>([]);\n const previousPages = ref([]);\n const updatePage = page => emit('update:active-page', page);\n\n provide<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY, {\n activePage,\n animation,\n isOpen: internalIsOpen,\n pages,\n previousPages,\n updatePage,\n });\n\n // unregister page if removed / destroyed\n const unregisterPage = (pageIdToRemove: string) => () => {\n pages.value = pages.value?.filter(pageId => pageId !== pageIdToRemove);\n };\n\n // Provide data and function to register page to subcomponent\n const registerPage: BentoDialogPageRegisterPage = pageId => {\n if (pageId) {\n pages.value.push(pageId);\n }\n\n return { unregisterPage: unregisterPage(pageId) };\n };\n\n provide(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY, registerPage);\n</script>\n\n<script lang=\"ts\">\n /**\n * Fullscreen modal takes full available space (no content underneath is visible) and focuses the user's attention exclusively on one complex task or piece of complex information.\n *\n * @example\n * import { BentoModalFullscreen } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModalFullscreen },\n * template: `\n * <bento-modal-fullscreen\n * :is-open=\"isOpen\"\n * @update:is-open=\"isOpen = $event\"\n * title='Fullscreen modal title'\n * contextual-label='Contextual label'\n * :actions=\"[{ title: 'Action', event: () => {}]\"\n * >\n * <template #header>{{ header slot }}</template>\n * {{ content }}\n * </bento-modal-fullscreen>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./modal-fullscreen.scss\" />\n"],"names":["__default__$1","messages","useI18n","slots","useSlots","hasSlot","useHasSlot","injectedTitleId","inject","MODAL_FULLSCREEN_TITLE_ID_INJECTION_KEY","computedTitleId","props","closeModal","MODAL_FULLSCREEN_CLOSE_INJECTION_KEY","handleClose","emit","onMounted","useListeners","useListeners$1","getCurrentInstance","instance","_a","__default__","activePage","isOpen","toRefs","modal","ref","isClosing","modalFullscreenId","generateUid","titleId","internalIsOpen","isMounted","listeners","conditionalClasses","computed","closeModalAfterAnimation","previousPages","startCloseModalAnimation","onUnmounted","watch","newIsOpen","newModalValue","provide","MODAL_FULLSCREEN_DIALOG_ID_INJECTION_KEY","animation","BentoDialogPageAnimation","pages","updatePage","page","DIALOG_PAGE_CONFIG_INJECTION_KEY","unregisterPage","pageIdToRemove","pageId","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuLIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAzHA,EAAA,EAAA,IAAAC,EAAA,GA6DAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAAC,GAAA,MAAA,GACAC,IAAAC,EAAA,WA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EAAA,MAAA,KAAAM,CAAA,GAGJ,EAAA,gBAAAF,EAAAE,CAAA,EAAA;AAGJ,WAAAV,EAAAY,IAAAD,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as d, useSlots as v, onMounted as M, toRefs as k, ref as E, computed as p, useAttrs as L } from "vue";
|
|
2
|
-
import { B as _, h as C, a as c, d as P, e as h, g as m, f as x } from "./base-modal.
|
|
2
|
+
import { B as _, h as C, a as c, d as P, e as h, g as m, f as x } from "./base-modal.ByhHqRuT.js";
|
|
3
3
|
import { u as g } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
|
-
import { F as R } from "./footer-actions.
|
|
4
|
+
import { F as R } from "./footer-actions.BoAzqs48.js";
|
|
5
5
|
import { n as B } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
6
|
import { b as S } from "./button.C9b2AC9w.js";
|
|
7
7
|
import { u as z } from "./index.B6WW_F-J.js";
|
|
8
|
-
import { B as T } from "./button-actions.
|
|
8
|
+
import { B as T } from "./button-actions.CdsmKyvj.js";
|
|
9
9
|
import { d as N } from "./typography.C8lPlsbD.js";
|
|
10
10
|
const $ = d({
|
|
11
11
|
name: "bento-modal-default"
|
|
@@ -457,4 +457,4 @@ const dt = et.exports;
|
|
|
457
457
|
export {
|
|
458
458
|
dt as B
|
|
459
459
|
};
|
|
460
|
-
//# sourceMappingURL=modal.
|
|
460
|
+
//# sourceMappingURL=modal.DMMqMdJF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.B6n5AWs2.js","sources":["../../src/components/modal/components/modal-default/modal-default.vue","../../src/components/modal/components/modal-dialog/modal-dialog.vue","../../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :columns-size=\"columnsSize\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @update:active-page=\"emit('update:active-page', $event)\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions && actions.length > 0\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, type PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, type BentoModalSize } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\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 * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))) && !props.activePage) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </bento-modal-default>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, type PropType, type Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import {\n type BentoButtonActionObject,\n BentoButtonActions,\n type BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('ok') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (props.activePage) {\n throw new Error(\n 'Bento Modal Dialog cannot contain multiple pages. Use Bento Modal default variant instead.'\n );\n }\n\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"computedVariant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n @update:active-page=\"emit('update:active-page', $event)\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, useAttrs, useSlots } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n BentoModalVariantMapping,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type BentoModalVariantProp = BentoModalVariant | `${BentoModalVariant}` | `${BentoModalVariantMapping}`;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariantProp>,\n default: 'default',\n validator: (value: BentoModalVariantProp) =>\n Object.values<BentoModalVariantProp>(BentoModalVariant).includes(value) ||\n Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(value),\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const computedVariant = computed(() => {\n if (Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(props.variant)) {\n return props.variant;\n }\n return BentoModalVariantMapping[props.variant.toUpperCase()];\n });\n\n const customProps = computed(() =>\n computedVariant.value === BentoModalVariantMapping.DEFAULT\n ? {\n activePage: props.activePage,\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n withColumnLayout: props.withColumnLayout,\n columnsSize: props.columnsSize,\n ...attrs,\n }\n : {\n activePage: props.activePage,\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n if (Object.keys(attrs).includes('overflow-visible')) {\n deprecate(\n 'BentoModal \"overflow-visible\" property',\n `\"overflow-visible\" property was made redundant. BentoModal can work correctly without the need to pass the propery.\n Remove the \"overflow-visible\" prop from BentoModal to remove this error.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","props","messages","t","useI18n","actions","dialogType","toRefs","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","attrs","useAttrs","computedVariant","BentoModalVariantMapping","customProps","deprecate"],"mappings":";;;;;;;;;AAqMI,MAAAA,IAAeC,EAAgB;AAAA,EAC3B,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA3JKC,IAAQC,EAAA,GACRC,IAAUC,EAAWH,CAAK,GAuG1BI,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB;AAEA,WAAAC,EAAU,MAAM;AACZ,UAAI,EAAEJ,EAAQ,SAAS,KAAMA,EAAQ,eAAe,KAAKA,EAAQ,eAAe,MAAO,CAACK,EAAM;AAC1F,cAAM,IAAI,MAAM,mEAAmE;AAAA,IAE3F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GC6DDT,IAAeC,EAAgB;AAAA,EAC3B,MAAM,EAAE,UAAAS,EAAA;AAAA,EACR,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtGK,EAAE,GAAAC,MAAMC,EAAgD,GAExDV,IAAQC,EAAA,GACRC,IAAUC,EAAWH,CAAK,GAC1B,EAAE,SAAAW,GAAS,YAAAC,MAAeC,EAAON,CAAK,GACtCO,IAAgDC,EAAI,IAAI,GAExDX,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB,GAEMW,IAAsB,CAACC,MAAiB;AAI1C,MAAAH,EAAS,MAAM,yBAAyBG,CAAK;AAAA,IACjD,GAEMC,IAA+BC,EAAS,MAAM;AAAA,MAChD;AAAA,QACI,OAAOV,EAAE,IAAI;AAAA,QACb,OAAOO;AAAA,QACP,SAASI,EAAmB;AAAA,MAAA;AAA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;;;;;;;iBAxMK7B,IAAQC,EAAA,GACRC,IAAUC,EAAWH,CAAK,GAC1B8B,IAAQC,EAAA,GAmIRC,IAAkBb,EAAS,MACzB,OAAO,OAA8Bc,CAAwB,EAAE,SAAS1B,EAAM,OAAO,IAC9EA,EAAM,UAEV0B,EAAyB1B,EAAM,QAAQ,YAAA,CAAa,CAC9D,GAEK2B,IAAcf;AAAA,MAAS,MACzBa,EAAgB,UAAUC,EAAyB,UAC7C;AAAA,QACI,YAAY1B,EAAM;AAAA,QAClB,iBAAiBA,EAAM;AAAA,QACvB,MAAMA,EAAM;AAAA,QACZ,eAAeA,EAAM;AAAA,QACrB,cAAcA,EAAM;AAAA,QACpB,oBAAoBA,EAAM;AAAA,QAC1B,eAAeA,EAAM,iBAAiB;AAAA,QACtC,kBAAkBA,EAAM;AAAA,QACxB,aAAaA,EAAM;AAAA,QACnB,GAAGuB;AAAA,MAAA,IAEP;AAAA,QACI,YAAYvB,EAAM;AAAA,QAClB,YAAYA,EAAM;AAAA,QAClB,SAASA,EAAM;AAAA,QACf,eAAeA,EAAM,iBAAiB;AAAA,QACtC,GAAGuB;AAAA,MAAA;AAAA,IACP,GAGJ1B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB;AAEA,WAAI,OAAO,KAAKyB,CAAK,EAAE,SAAS,kBAAkB,KAC9CK;AAAA,MACI;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal.DMMqMdJF.js","sources":["../../src/components/modal/components/modal-default/modal-default.vue","../../src/components/modal/components/modal-dialog/modal-dialog.vue","../../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :columns-size=\"columnsSize\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @update:active-page=\"emit('update:active-page', $event)\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions && actions.length > 0\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { defineComponent, onMounted, type PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, type BentoModalSize } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\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 * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))) && !props.activePage) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a Modal based off the `base-modal` component.\n * It allows two column modals as well as content modals.\n *\n * @example\n * import { BentoModalDefault } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDefault },\n * template: `\n * <bento-modal-default\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * <template #content-col-1>\n * // Content on the left side column\n * </template>\n *\n * <template #content-col-2>\n * // Content on the right side column\n * </template>\n *\n * <template v-if=\"actions\" #actions>\n * <footer-actions :actions=\"actions\" />\n * </template>\n * </bento-modal-default>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * const footerActions = [{\n * title: 'Primary action',\n * event: () => { ... }\n * }]\n * }\n * }\n */\n export default defineComponent({\n name: 'bento-modal-default',\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :active-page=\"activePage\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n />\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\" />\n </template>\n </base-modal>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, onMounted, type PropType, type Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { useHasSlot } from '@/composables';\n import {\n type BentoButtonActionObject,\n BentoButtonActions,\n type BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import BaseModal from '@/components/modal/components/base-modal/base-modal.vue';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\"close-modal\"]);\n\n const props = defineProps({\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Text that is displayed in the content section of modal\n */\n content: { type: String, required: true },\n\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: { type: Boolean, required: true },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: { type: Boolean, required: true },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n const modalRef: Ref<InstanceType<typeof BaseModal>> = ref(null);\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n const onCloseActionButton = (event: Event) => {\n // Calls \"base-modal\" internal function to initialize the\n // \"close\" animation and trigger the \"close\" event.\n // This follows the same \"dialog\" pattern of calling \"dialog.close()\"\n modalRef.value.internalModalActionClose(event);\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('ok') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (props.activePage) {\n throw new Error(\n 'Bento Modal Dialog cannot contain multiple pages. Use Bento Modal default variant instead.'\n );\n }\n\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error('Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button');\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Creates a \"dialog\" type of modal.\n * These are are modals that require a deliberate user action or acknowledgement\n * (confirmations or destructive actions).\n *\n * It’s not customizable and consists of title, description label and one action.\n *\n * @example\n * import { BentoModalDialog } from '@/components/modal/components';\n *\n * export default {\n * components: { BentoModalDialog },\n * template: `\n * <bento-modal-dialog\n * dialog-type=\"destructive\"\n * :is-dismissible=\"false\"\n * :is-open=\"isOpen\"\n * @close-modal=\"isOpen = false\"\n * >\n * Dialog content\n * </bento-modal-dialog>\n * `,\n * setup() {\n * const isOpen = ref(true)\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n });\n</script>\n","<template>\n <component\n :is=\"computedVariant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n @update:active-page=\"emit('update:active-page', $event)\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, type PropType, useAttrs, useSlots } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n BentoModalVariantMapping,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { type BentoButtonActionsList } from '@/components/button';\n import { deprecate } from '@/utils/ts/deprecate';\n\n type BentoModalVariantProp = BentoModalVariant | `${BentoModalVariant}` | `${BentoModalVariantMapping}`;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\n const emit = defineEmits([\"update:active-page\", \"close-modal\"]);\n\n const props = defineProps({\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',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * The id of the current active page\n * Should be the same id as the BentoModalPage to be displayed\n */\n activePage: {\n type: String,\n default: null,\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: { type: String, default: null },\n\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: { type: String, default: null },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: { type: Boolean, default: false },\n\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, default: false },\n\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: { type: Boolean, default: null },\n\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: { type: Boolean, default: false },\n\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariantProp>,\n default: 'default',\n validator: (value: BentoModalVariantProp) =>\n Object.values<BentoModalVariantProp>(BentoModalVariant).includes(value) ||\n Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(value),\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: { type: Boolean, default: false },\n });\n\n const computedVariant = computed(() => {\n if (Object.values<BentoModalVariantProp>(BentoModalVariantMapping).includes(props.variant)) {\n return props.variant;\n }\n return BentoModalVariantMapping[props.variant.toUpperCase()];\n });\n\n const customProps = computed(() =>\n computedVariant.value === BentoModalVariantMapping.DEFAULT\n ? {\n activePage: props.activePage,\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n withColumnLayout: props.withColumnLayout,\n columnsSize: props.columnsSize,\n ...attrs,\n }\n : {\n activePage: props.activePage,\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n if (Object.keys(attrs).includes('overflow-visible')) {\n deprecate(\n 'BentoModal \"overflow-visible\" property',\n `\"overflow-visible\" property was made redundant. BentoModal can work correctly without the need to pass the propery.\n Remove the \"overflow-visible\" prop from BentoModal to remove this error.`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Modal is a window that appear over any other page content\n * and focus user attention exclusively on one task or piece of\n * information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n components: { BentoModalDefault, BentoModalDialog },\n });\n</script>\n"],"names":["__default__","defineComponent","slots","useSlots","hasSlot","useHasSlot","onCloseModal","emit","onMounted","props","messages","t","useI18n","actions","dialogType","toRefs","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b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,IAAUC,EAAWH,CAAK,GAC1B8B,IAAQC,EAAA,GAmIRC,IAAkBb,EAAS,MACzB,OAAO,OAA8Bc,CAAwB,EAAE,SAAS1B,EAAM,OAAO,IAC9EA,EAAM,UAEV0B,EAAyB1B,EAAM,QAAQ,YAAA,CAAa,CAC9D,GAEK2B,IAAcf;AAAA,MAAS,MACzBa,EAAgB,UAAUC,EAAyB,UAC7C;AAAA,QACI,YAAY1B,EAAM;AAAA,QAClB,iBAAiBA,EAAM;AAAA,QACvB,MAAMA,EAAM;AAAA,QACZ,eAAeA,EAAM;AAAA,QACrB,cAAcA,EAAM;AAAA,QACpB,oBAAoBA,EAAM;AAAA,QAC1B,eAAeA,EAAM,iBAAiB;AAAA,QACtC,kBAAkBA,EAAM;AAAA,QACxB,aAAaA,EAAM;AAAA,QACnB,GAAGuB;AAAA,MAAA,IAEP;AAAA,QACI,YAAYvB,EAAM;AAAA,QAClB,YAAYA,EAAM;AAAA,QAClB,SAASA,EAAM;AAAA,QACf,eAAeA,EAAM,iBAAiB;AAAA,QACtC,GAAGuB;AAAA,MAAA;AAAA,IACP,GAGJ1B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IACtB;AAEA,WAAI,OAAO,KAAKyB,CAAK,EAAE,SAAS,kBAAkB,KAC9CK;AAAA,MACI;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import { defineComponent as E, useSlots as H, ref as h, computed as c, provide as R, toRef as J, inject as T, onMounted as D, onBeforeUnmount as K, watch as A, onUnmounted as Y } from "vue";
|
|
2
|
+
import { B as M } from "./typography.C8lPlsbD.js";
|
|
3
|
+
import { B as q } from "./button.C9b2AC9w.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { n as S } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import { u as P } from "./use-has-slot.C9lQZ6nz.js";
|
|
7
|
+
import { g as L } from "./generate-uid.NJ8tVoha.js";
|
|
8
|
+
import { u as Z } from "./index.B6WW_F-J.js";
|
|
9
|
+
import { b as V } from "./tooltip.Bl6kedql.js";
|
|
10
|
+
import { k as U } from "./index.ByaCaB1Z.js";
|
|
11
|
+
import { B as Q } from "./link.DB5g6d48.js";
|
|
12
|
+
import { o as X } from "./resize.Bqks3WUm.js";
|
|
13
|
+
import { u as ee } from "./use-expandable-content-height.GkjjbmPy.js";
|
|
14
|
+
import { C as te } from "./chevron-down.eYtgv5ly.js";
|
|
15
|
+
import { C as ne } from "./chevron-up.d8cwIlA_.js";
|
|
16
|
+
import "../assets/navigation-menu-group.css";
|
|
17
|
+
let O = 0;
|
|
18
|
+
const ae = {
|
|
19
|
+
beforeCreate() {
|
|
20
|
+
this.uuid = O.toString(), O += 1;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var se = function() {
|
|
24
|
+
var e = this, n = e._self._c;
|
|
25
|
+
return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#001222", d: "M15.5303 13.4697L14.4697 14.5303L12 12.0605L9.53027 14.5303L8.46973 13.4697L12 9.93945L15.5303 13.4697Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 13.75H0V12.25H7V13.75Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 8.75H0V7.25H7V8.75Z" } }), n("path", { attrs: { fill: "#001222", d: "M15.5303 2.53027L12 6.06055L8.46973 2.53027L9.53027 1.46973L12 3.93945L14.4697 1.46973L15.5303 2.53027Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 3.75H0V2.25H7V3.75Z" } })]);
|
|
26
|
+
}, oe = [], ie = /* @__PURE__ */ S(
|
|
27
|
+
ae,
|
|
28
|
+
se,
|
|
29
|
+
oe,
|
|
30
|
+
!1,
|
|
31
|
+
null,
|
|
32
|
+
null
|
|
33
|
+
);
|
|
34
|
+
const le = ie.exports;
|
|
35
|
+
let G = 0;
|
|
36
|
+
const re = {
|
|
37
|
+
beforeCreate() {
|
|
38
|
+
this.uuid = G.toString(), G += 1;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var ue = function() {
|
|
42
|
+
var e = this, n = e._self._c;
|
|
43
|
+
return n("svg", e._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", e.$attrs, !1), [e.$attrs["svg-title"] ? n("title", [e._v(e._s(e.$attrs["svg-title"]))]) : e._e(), n("path", { attrs: { fill: "#001222", d: "M15.5303 11.5303L12 15.0605L8.46973 11.5303L9.53027 10.4697L12 12.9395L14.4697 10.4697L15.5303 11.5303Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 13.75H0V12.25H7V13.75Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 8.75H0V7.25H7V8.75Z" } }), n("path", { attrs: { fill: "#001222", d: "M15.5303 4.46973L14.4697 5.53027L12 3.06055L9.53027 5.53027L8.46973 4.46973L12 0.939453L15.5303 4.46973Z" } }), n("path", { attrs: { fill: "#001222", d: "M7 3.75H0V2.25H7V3.75Z" } })]);
|
|
44
|
+
}, ce = [], de = /* @__PURE__ */ S(
|
|
45
|
+
re,
|
|
46
|
+
ue,
|
|
47
|
+
ce,
|
|
48
|
+
!1,
|
|
49
|
+
null,
|
|
50
|
+
null
|
|
51
|
+
);
|
|
52
|
+
const ve = de.exports, k = /* @__PURE__ */ Symbol("navigation menu state injection key"), F = {
|
|
53
|
+
"en-US": {
|
|
54
|
+
hideAllPages: "Hide all pages",
|
|
55
|
+
showAllPages: "Show all pages",
|
|
56
|
+
showingCurrentPage: "Showing current page"
|
|
57
|
+
}
|
|
58
|
+
}, pe = {
|
|
59
|
+
i18n: { messages: F }
|
|
60
|
+
}, _e = /* @__PURE__ */ E({
|
|
61
|
+
...pe,
|
|
62
|
+
__name: "navigation-menu",
|
|
63
|
+
props: {
|
|
64
|
+
label: { default: void 0 },
|
|
65
|
+
showExpandAllButton: { type: Boolean, default: !1 },
|
|
66
|
+
activePage: { default: void 0 }
|
|
67
|
+
},
|
|
68
|
+
emits: ["update:active-page"],
|
|
69
|
+
setup(p, { emit: e }) {
|
|
70
|
+
const n = p, t = H(), b = P(t), C = L("navigation-menu-title"), { t: _ } = Z(), r = h([]), v = (i, a, x) => {
|
|
71
|
+
r.value.push({ id: i, setOpen: a, getIsOpen: x });
|
|
72
|
+
}, u = (i) => {
|
|
73
|
+
r.value = r.value.filter((a) => a.id !== i);
|
|
74
|
+
}, o = c(() => r.value.length > 0 && r.value.every((i) => i.getIsOpen())), g = c(() => r.value.length > 0 && n.showExpandAllButton), w = c(() => n.label || b("headerActions") || g.value), m = c(() => o.value ? _("hideAllPages") : _("showAllPages")), f = () => {
|
|
75
|
+
const i = !o.value;
|
|
76
|
+
r.value.forEach(({ setOpen: a }) => a(i));
|
|
77
|
+
}, d = (i) => {
|
|
78
|
+
e("update:active-page", i);
|
|
79
|
+
};
|
|
80
|
+
return R(k, {
|
|
81
|
+
registerGroup: v,
|
|
82
|
+
unregisterGroup: u,
|
|
83
|
+
activePage: J(n, "activePage"),
|
|
84
|
+
updateActivePage: d
|
|
85
|
+
}), { __sfc: !0, props: n, emit: e, slots: t, hasSlot: b, titleId: C, t: _, groups: r, registerGroup: v, unregisterGroup: u, allExpanded: o, computedShowExpandAll: g, showHeader: w, expandButtonLabel: m, toggleAllGroups: f, updateActivePage: d, BentoTypography: M, BentoButton: q, MenuCollapseIcon: le, MenuExpandIcon: ve, vBentoTooltipDirective: V };
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
var me = function() {
|
|
89
|
+
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
90
|
+
return n("nav", { staticClass: "b-navigation-menu", attrs: { "aria-labelledby": e.label ? t.titleId : void 0 } }, [t.showHeader ? n("div", { staticClass: "b-navigation-menu__header" }, [e.label ? n(t.BentoTypography, { staticClass: "b-navigation-menu__title", attrs: { id: t.titleId, el: "p", variant: "caption", stronger: "" } }, [e._v(" " + e._s(e.label) + " ")]) : e._e(), n("div", { staticClass: "b-navigation-menu__actions-container" }, [t.hasSlot("headerActions") ? n("div", { staticClass: "b-navigation-menu__actions" }, [e._t("headerActions")], 2) : e._e(), t.computedShowExpandAll ? n(t.BentoButton, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive", value: t.expandButtonLabel, expression: "expandButtonLabel" }], attrs: { variant: "tertiary-with-background", "aria-label": t.expandButtonLabel }, on: { click: t.toggleAllGroups }, scopedSlots: e._u([{ key: "iconLeft", fn: function() {
|
|
91
|
+
return [t.allExpanded ? n(t.MenuCollapseIcon) : n(t.MenuExpandIcon)];
|
|
92
|
+
}, proxy: !0 }], null, !1, 3696454570) }) : e._e()], 1)], 1) : e._e(), n("ul", { staticClass: "b-navigation-menu__content" }, [e._t("default")], 2)]);
|
|
93
|
+
}, ge = [], fe = /* @__PURE__ */ S(
|
|
94
|
+
_e,
|
|
95
|
+
me,
|
|
96
|
+
ge,
|
|
97
|
+
!1,
|
|
98
|
+
null,
|
|
99
|
+
"ff9bef84"
|
|
100
|
+
);
|
|
101
|
+
const Ue = fe.exports, W = /* @__PURE__ */ Symbol("navigation menu group state injection key"), he = {
|
|
102
|
+
name: "bento-navigation-menu-item"
|
|
103
|
+
}, be = /* @__PURE__ */ E({
|
|
104
|
+
...he,
|
|
105
|
+
props: {
|
|
106
|
+
nested: { type: Boolean, default: !1 },
|
|
107
|
+
label: null,
|
|
108
|
+
link: { default: void 0 },
|
|
109
|
+
value: null,
|
|
110
|
+
alwaysShowActions: { type: Boolean, default: !1 }
|
|
111
|
+
},
|
|
112
|
+
setup(p) {
|
|
113
|
+
const e = p, n = H(), t = P(n), b = c(() => e.link ? Q : "div"), C = c(() => e.link ? { ...e.link, disableTypography: !0 } : {}), _ = h(null), r = h(!1);
|
|
114
|
+
U(_, () => {
|
|
115
|
+
var i;
|
|
116
|
+
const d = ((i = _.value) == null ? void 0 : i.$el) ?? _.value;
|
|
117
|
+
d && (r.value = d.scrollWidth > d.clientWidth);
|
|
118
|
+
});
|
|
119
|
+
const v = L("navigation-menu-item"), u = T(W, null), o = T(k, null), g = c(() => {
|
|
120
|
+
var d;
|
|
121
|
+
return ((d = o == null ? void 0 : o.activePage) == null ? void 0 : d.value) === e.value;
|
|
122
|
+
}), w = c(() => !u || !u.isSemiCollapsed.value ? !0 : g.value), m = c(() => ({
|
|
123
|
+
"b-navigation-menu-item--selected": g.value,
|
|
124
|
+
"b-navigation-menu-item--nested": e.nested,
|
|
125
|
+
"b-navigation-menu-item--hidden": !w.value,
|
|
126
|
+
"b-navigation-menu-item--always-show-actions": e.alwaysShowActions
|
|
127
|
+
}));
|
|
128
|
+
D(() => {
|
|
129
|
+
u && e.nested && u.registerItem(v, () => g.value);
|
|
130
|
+
});
|
|
131
|
+
const f = () => {
|
|
132
|
+
o == null || o.updateActivePage(e.value);
|
|
133
|
+
};
|
|
134
|
+
return K(() => {
|
|
135
|
+
u && e.nested && u.unregisterItem(v);
|
|
136
|
+
}), { __sfc: !0, props: e, slots: n, hasSlot: t, wrapperComponent: b, wrapperProps: C, labelRef: _, isTruncated: r, itemId: v, groupState: u, menuState: o, isSelected: g, isVisible: w, conditionalClasses: m, handleClick: f, BentoTypography: M, vBentoTooltipDirective: V };
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
var Ce = function() {
|
|
140
|
+
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
141
|
+
return n("li", [n(t.wrapperComponent, e._b({ tag: "component", staticClass: "b-navigation-menu-item", class: {
|
|
142
|
+
...t.conditionalClasses,
|
|
143
|
+
"b-navigation-menu-item--no-icon": !t.hasSlot("icon")
|
|
144
|
+
}, attrs: { "aria-current": t.isSelected && e.link ? "page" : void 0, "aria-hidden": t.isVisible ? void 0 : "true", tabindex: t.isVisible ? void 0 : -1, inert: t.isVisible ? void 0 : "" }, on: { click: t.handleClick } }, "component", t.wrapperProps, !1), [!e.nested && t.hasSlot("icon") ? n("div", { staticClass: "b-navigation-menu-item__icon" }, [e._t("icon")], 2) : e._e(), n(t.BentoTypography, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive", value: t.isTruncated ? e.label : void 0, expression: "isTruncated ? label : undefined" }], ref: "labelRef", staticClass: "b-navigation-menu-item__label", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(" " + e._s(e.label) + " ")]), t.hasSlot("action") ? n("div", { staticClass: "b-navigation-menu-item__action" }, [e._t("action")], 2) : e._e()], 1)], 1);
|
|
145
|
+
}, we = [], xe = /* @__PURE__ */ S(
|
|
146
|
+
be,
|
|
147
|
+
Ce,
|
|
148
|
+
we,
|
|
149
|
+
!1,
|
|
150
|
+
null,
|
|
151
|
+
"0f8822ce"
|
|
152
|
+
);
|
|
153
|
+
const Fe = xe.exports, Ie = {
|
|
154
|
+
name: "bento-navigation-menu-group",
|
|
155
|
+
i18n: { messages: F }
|
|
156
|
+
}, ye = /* @__PURE__ */ E({
|
|
157
|
+
...Ie,
|
|
158
|
+
props: {
|
|
159
|
+
isExpanded: { type: Boolean, default: !1 },
|
|
160
|
+
label: null
|
|
161
|
+
},
|
|
162
|
+
emits: ["update:is-expanded"],
|
|
163
|
+
setup(p, { emit: e }) {
|
|
164
|
+
const n = p, t = H(), b = P(t), { t: C } = Z(), _ = c(() => ({
|
|
165
|
+
"b-navigation-menu-group__header--expanded": l.value && !a.value
|
|
166
|
+
})), r = c(() => a.value ? C("showingCurrentPage") : void 0), v = h(null), u = h(!1);
|
|
167
|
+
U(v, () => {
|
|
168
|
+
var y;
|
|
169
|
+
const s = ((y = v.value) == null ? void 0 : y.$el) ?? v.value;
|
|
170
|
+
s && (u.value = s.scrollWidth > s.clientWidth);
|
|
171
|
+
});
|
|
172
|
+
const o = L("navigation-menu-group"), g = L("navigation-menu-group-button"), w = L("navigation-menu-group-content"), m = T(k, null), f = h([]), d = (s, y) => {
|
|
173
|
+
f.value.push({ id: s, isSelected: y });
|
|
174
|
+
}, i = (s) => {
|
|
175
|
+
f.value = f.value.filter((y) => y.id !== s);
|
|
176
|
+
}, a = h(!1);
|
|
177
|
+
R(W, {
|
|
178
|
+
registerItem: d,
|
|
179
|
+
unregisterItem: i,
|
|
180
|
+
isSemiCollapsed: a
|
|
181
|
+
});
|
|
182
|
+
const x = c(() => f.value.some((s) => s.isSelected())), l = h(n.isExpanded), I = h(null), { updateContentHeight: $, contentHeight: B } = ee(I, l), j = c(() => B.value ? { "max-height": B.value } : {}), z = () => {
|
|
183
|
+
l.value && !a.value ? x.value ? a.value = !0 : l.value = !1 : a.value ? a.value = !1 : l.value = !0, e("update:is-expanded", l.value && !a.value);
|
|
184
|
+
}, N = (s) => {
|
|
185
|
+
s ? (l.value = !0, a.value = !1) : x.value ? a.value = !0 : (a.value = !1, l.value = !1), e("update:is-expanded", s);
|
|
186
|
+
};
|
|
187
|
+
return A(
|
|
188
|
+
() => n.isExpanded,
|
|
189
|
+
(s) => {
|
|
190
|
+
a.value || (l.value = s);
|
|
191
|
+
}
|
|
192
|
+
), A(
|
|
193
|
+
() => I.value,
|
|
194
|
+
() => {
|
|
195
|
+
let s = null;
|
|
196
|
+
!s && I.value && (s = X(I.value, () => {
|
|
197
|
+
I.value && $();
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
), A(
|
|
201
|
+
l,
|
|
202
|
+
() => {
|
|
203
|
+
$();
|
|
204
|
+
},
|
|
205
|
+
{ immediate: !0 }
|
|
206
|
+
), D(() => {
|
|
207
|
+
x.value && !l.value && (l.value = !0, e("update:is-expanded", !0)), m && m.registerGroup(o, N, () => l.value && !a.value);
|
|
208
|
+
}), Y(() => m == null ? void 0 : m.unregisterGroup(o)), { __sfc: !0, props: n, slots: t, hasSlot: b, t: C, headerClasses: _, headerAriaDescription: r, labelRef: v, isTruncated: u, groupId: o, buttonId: g, contentId: w, navigationMenuState: m, nestedItems: f, registerItem: d, unregisterItem: i, isSemiCollapsed: a, hasActiveItem: x, emit: e, isOpen: l, contentDiv: I, updateContentHeight: $, contentHeight: B, contentMaxHeight: j, toggleGroup: z, setOpen: N, BentoTypography: M, vBentoTooltipDirective: V, ChevronDownIcon: te, ChevronUpIcon: ne };
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
var Le = function() {
|
|
212
|
+
var e = this, n = e._self._c, t = e._self._setupProxy;
|
|
213
|
+
return n("li", { staticClass: "b-navigation-menu-group" }, [n("button", { staticClass: "b-navigation-menu-group__header", class: {
|
|
214
|
+
...t.headerClasses,
|
|
215
|
+
"b-navigation-menu-group__header--no-icon": !t.hasSlot("icon")
|
|
216
|
+
}, attrs: { id: t.buttonId, type: "button", "aria-expanded": `${t.isOpen && !t.isSemiCollapsed}`, "aria-controls": t.contentId, "aria-description": t.headerAriaDescription }, on: { click: t.toggleGroup } }, [t.hasSlot("icon") ? n("div", { staticClass: "b-navigation-menu-group__icon" }, [e._t("icon")], 2) : e._e(), n(t.BentoTypography, { directives: [{ name: "bento-tooltip-directive", rawName: "v-bento-tooltip-directive", value: t.isTruncated ? e.label : void 0, expression: "isTruncated ? label : undefined" }], ref: "labelRef", staticClass: "b-navigation-menu-group__label", attrs: { el: "span", variant: "body", stronger: "" } }, [e._v(" " + e._s(e.label) + " ")]), n("div", { staticClass: "b-navigation-menu-group__icon b-navigation-menu-group__icon--chevron" }, [t.isOpen && !t.isSemiCollapsed ? n(t.ChevronUpIcon, { attrs: { "aria-hidden": "true" } }) : n(t.ChevronDownIcon, { attrs: { "aria-hidden": "true" } })], 1)], 1), n("Transition", { attrs: { name: "b-navigation-menu-group__animation--content" } }, [n("div", { directives: [{ name: "show", rawName: "v-show", value: t.isOpen, expression: "isOpen" }], staticClass: "b-navigation-menu-group__content-wrapper", style: t.contentMaxHeight, attrs: { id: t.contentId, role: "region", "aria-labelledby": t.buttonId } }, [n("ul", { ref: "contentDiv", staticClass: "b-navigation-menu-group__content" }, [e._t("default")], 2)])])], 1);
|
|
217
|
+
}, Se = [], $e = /* @__PURE__ */ S(
|
|
218
|
+
ye,
|
|
219
|
+
Le,
|
|
220
|
+
Se,
|
|
221
|
+
!1,
|
|
222
|
+
null,
|
|
223
|
+
"abca1d36"
|
|
224
|
+
);
|
|
225
|
+
const We = $e.exports;
|
|
226
|
+
export {
|
|
227
|
+
We as a,
|
|
228
|
+
Fe as b,
|
|
229
|
+
Ue as n
|
|
230
|
+
};
|
|
231
|
+
//# sourceMappingURL=navigation-menu-group.KJvGw1tX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu-group.KJvGw1tX.js","sources":["../../../ui-assets/icons-16/dist/vue/menu-collapse.vue","../../../ui-assets/icons-16/dist/vue/menu-expand.vue","../../src/components/navigation-menu/navigation-menu.keys.ts","../../src/components/navigation-menu/navigation-menu.vue","../../src/components/navigation-menu/components/navigation-menu-group/navigation-menu-group.keys.ts","../../src/components/navigation-menu/components/navigation-menu-item/navigation-menu-item.vue","../../src/components/navigation-menu/components/navigation-menu-group/navigation-menu-group.vue"],"sourcesContent":["\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=\"M15.5303 13.4697L14.4697 14.5303L12 12.0605L9.53027 14.5303L8.46973 13.4697L12 9.93945L15.5303 13.4697Z\"/><path fill=\"#001222\" d=\"M7 13.75H0V12.25H7V13.75Z\"/><path fill=\"#001222\" d=\"M7 8.75H0V7.25H7V8.75Z\"/><path fill=\"#001222\" d=\"M15.5303 2.53027L12 6.06055L8.46973 2.53027L9.53027 1.46973L12 3.93945L14.4697 1.46973L15.5303 2.53027Z\"/><path fill=\"#001222\" d=\"M7 3.75H0V2.25H7V3.75Z\"/></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","\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=\"M15.5303 11.5303L12 15.0605L8.46973 11.5303L9.53027 10.4697L12 12.9395L14.4697 10.4697L15.5303 11.5303Z\"/><path fill=\"#001222\" d=\"M7 13.75H0V12.25H7V13.75Z\"/><path fill=\"#001222\" d=\"M7 8.75H0V7.25H7V8.75Z\"/><path fill=\"#001222\" d=\"M15.5303 4.46973L14.4697 5.53027L12 3.06055L9.53027 5.53027L8.46973 4.46973L12 0.939453L15.5303 4.46973Z\"/><path fill=\"#001222\" d=\"M7 3.75H0V2.25H7V3.75Z\"/></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","export const NAVIGATION_MENU_STATE_INJECTION_KEY = Symbol('navigation menu state injection key');\n","<template>\n <nav class=\"b-navigation-menu\" :aria-labelledby=\"label ? titleId : undefined\">\n <div v-if=\"showHeader\" class=\"b-navigation-menu__header\">\n <bento-typography\n v-if=\"label\"\n :id=\"titleId\"\n el=\"p\"\n variant=\"caption\"\n stronger\n class=\"b-navigation-menu__title\"\n >\n {{ label }}\n </bento-typography>\n <div class=\"b-navigation-menu__actions-container\">\n <div v-if=\"hasSlot('headerActions')\" class=\"b-navigation-menu__actions\">\n <slot name=\"headerActions\" />\n </div>\n <bento-button\n v-if=\"computedShowExpandAll\"\n v-bento-tooltip-directive=\"expandButtonLabel\"\n variant=\"tertiary-with-background\"\n :aria-label=\"expandButtonLabel\"\n @click=\"toggleAllGroups\"\n >\n <template #iconLeft>\n <menu-collapse-icon v-if=\"allExpanded\" />\n <menu-expand-icon v-else />\n </template>\n </bento-button>\n </div>\n </div>\n\n <ul class=\"b-navigation-menu__content\">\n <slot />\n </ul>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, provide, ref, toRef, useSlots } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoButton } from '@/components/button';\n import MenuCollapseIcon from '@adyen/ui-assets-icons-16/vue/menu-collapse';\n import MenuExpandIcon from '@adyen/ui-assets-icons-16/vue/menu-expand';\n import { useHasSlot } from '@/composables';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import type {\n BentoNavigationMenuGroupRegistration,\n BentoNavigationMenuProps,\n BentoNavigationMenuState,\n } from './navigation-menu.types';\n import { NAVIGATION_MENU_STATE_INJECTION_KEY } from './navigation-menu.keys';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n label: { default: undefined },\n showExpandAllButton: { type: Boolean, default: false },\n activePage: { default: undefined }\n});\n\n const emit = defineEmits([\"update:active-page\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const titleId = generateUid('navigation-menu-title');\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const groups = ref<Array<BentoNavigationMenuGroupRegistration>>([]);\n\n const registerGroup = (groupId: string, setOpen: (open: boolean) => void, getIsOpen: () => boolean) => {\n groups.value.push({ id: groupId, setOpen, getIsOpen });\n };\n\n const unregisterGroup = (groupId: string) => {\n groups.value = groups.value.filter(g => g.id !== groupId);\n };\n\n const allExpanded = computed(() => groups.value.length > 0 && groups.value.every(group => group.getIsOpen()));\n\n const computedShowExpandAll = computed(() => groups.value.length > 0 && props.showExpandAllButton);\n\n const showHeader = computed(() => props.label || hasSlot('headerActions') || computedShowExpandAll.value);\n\n const expandButtonLabel = computed(() => (allExpanded.value ? t('hideAllPages') : t('showAllPages')));\n\n const toggleAllGroups = () => {\n const shouldExpand = !allExpanded.value;\n groups.value.forEach(({ setOpen }) => setOpen(shouldExpand));\n };\n\n const updateActivePage = (value: string) => {\n emit('update:active-page', value);\n };\n\n provide<BentoNavigationMenuState>(NAVIGATION_MENU_STATE_INJECTION_KEY, {\n registerGroup,\n unregisterGroup,\n activePage: toRef(props, 'activePage'),\n updateActivePage,\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Navigation menu container component with optional header and action buttons.\n *\n * @usage\n * import { BentoNavigationMenu, BentoNavigationMenuItem, BentoNavigationMenuGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoNavigationMenu, BentoNavigationMenuItem, BentoNavigationMenuGroup },\n * template: `\n * <bento-navigation-menu label=\"Pages\" active-page=\"home\">\n * <template #headerActions>\n * <button>Search</button>\n * </template>\n * <bento-navigation-menu-item value=\"home\" label=\"Home\">\n * <template #icon><home-icon /></template>\n * </bento-navigation-menu-item>\n * <bento-navigation-menu-group label=\"Settings\">\n * <template #icon><folder-icon /></template>\n * <bento-navigation-menu-item nested value=\"general\" label=\"General\" />\n * </bento-navigation-menu-group>\n * </bento-navigation-menu>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./navigation-menu.scss\" />\n","export const NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY = Symbol('navigation menu group state injection key');\n","<template>\n <li>\n <component\n :is=\"wrapperComponent\"\n v-bind=\"wrapperProps\"\n class=\"b-navigation-menu-item\"\n :class=\"{\n ...conditionalClasses,\n 'b-navigation-menu-item--no-icon': !hasSlot('icon'),\n }\"\n :aria-current=\"isSelected && link ? 'page' : undefined\"\n :aria-hidden=\"!isVisible ? 'true' : undefined\"\n :tabindex=\"!isVisible ? -1 : undefined\"\n :inert=\"!isVisible ? '' : undefined\"\n @click=\"handleClick\"\n >\n <div v-if=\"!nested && hasSlot('icon')\" class=\"b-navigation-menu-item__icon\">\n <slot name=\"icon\" />\n </div>\n <bento-typography\n ref=\"labelRef\"\n v-bento-tooltip-directive=\"isTruncated ? label : undefined\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-navigation-menu-item__label\"\n >\n {{ label }}\n </bento-typography>\n <div v-if=\"hasSlot('action')\" class=\"b-navigation-menu-item__action\">\n <slot name=\"action\" />\n </div>\n </component>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onBeforeUnmount, onMounted, ref, useSlots } from 'vue';\n import { useResizeObserver } from '@vueuse/core';\n import { BentoLink } from '@/components/link';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/core/utils/ts';\n import { useHasSlot } from '@/composables';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip';\n import type { BentoNavigationMenuItemProps } from './navigation-menu-item.types';\n import type { BentoNavigationMenuGroupState } from '../navigation-menu-group/navigation-menu-group.types';\n import { NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY } from '../navigation-menu-group/navigation-menu-group.keys';\n import type { BentoNavigationMenuState } from '../../navigation-menu.types';\n import { NAVIGATION_MENU_STATE_INJECTION_KEY } from '../../navigation-menu.keys';\n\n const props = defineProps({\n nested: { type: Boolean, default: false },\n label: null,\n link: { default: undefined },\n value: null,\n alwaysShowActions: { type: Boolean, default: false }\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const wrapperComponent = computed(() => (props.link ? BentoLink : 'div'));\n const wrapperProps = computed(() => (props.link ? { ...props.link, disableTypography: true } : {}));\n\n const labelRef = ref(null);\n const isTruncated = ref(false);\n\n useResizeObserver(labelRef, () => {\n const el = labelRef.value?.$el ?? labelRef.value;\n if (el) {\n isTruncated.value = el.scrollWidth > el.clientWidth;\n }\n });\n\n const itemId = generateUid('navigation-menu-item');\n const groupState = inject<BentoNavigationMenuGroupState | null>(NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY, null);\n const menuState = inject<BentoNavigationMenuState | null>(NAVIGATION_MENU_STATE_INJECTION_KEY, null);\n\n const isSelected = computed(() => menuState?.activePage?.value === props.value);\n\n const isVisible = computed(() => {\n if (!groupState) {\n return true;\n }\n if (!groupState.isSemiCollapsed.value) {\n return true;\n }\n return isSelected.value;\n });\n\n const conditionalClasses = computed(() => ({\n 'b-navigation-menu-item--selected': isSelected.value,\n 'b-navigation-menu-item--nested': props.nested,\n 'b-navigation-menu-item--hidden': !isVisible.value,\n 'b-navigation-menu-item--always-show-actions': props.alwaysShowActions,\n }));\n\n onMounted(() => {\n if (groupState && props.nested) {\n groupState.registerItem(itemId, () => isSelected.value);\n }\n });\n\n const handleClick = () => {\n menuState?.updateActivePage(props.value);\n };\n\n onBeforeUnmount(() => {\n if (groupState && props.nested) {\n groupState.unregisterItem(itemId);\n }\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * Navigation menu item component for rendering individual navigation links.\n * Can be used standalone or nested within a navigation-menu-group.\n *\n * @usage\n * import { BentoNavigationMenuItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoNavigationMenuItem },\n * template: `\n * <bento-navigation-menu-item value=\"home\" label=\"Home\">\n * <template #icon><home-icon /></template>\n * <template #action><star-icon /></template>\n * </bento-navigation-menu-item>\n * `\n * }\n */\n export default {\n name: 'bento-navigation-menu-item',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./navigation-menu-item.scss\" />\n","<template>\n <li class=\"b-navigation-menu-group\">\n <button\n :id=\"buttonId\"\n type=\"button\"\n class=\"b-navigation-menu-group__header\"\n :class=\"{\n ...headerClasses,\n 'b-navigation-menu-group__header--no-icon': !hasSlot('icon'),\n }\"\n :aria-expanded=\"`${isOpen && !isSemiCollapsed}`\"\n :aria-controls=\"contentId\"\n :aria-description=\"headerAriaDescription\"\n @click=\"toggleGroup\"\n >\n <div v-if=\"hasSlot('icon')\" class=\"b-navigation-menu-group__icon\">\n <slot name=\"icon\" />\n </div>\n <bento-typography\n ref=\"labelRef\"\n v-bento-tooltip-directive=\"isTruncated ? label : undefined\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-navigation-menu-group__label\"\n >\n {{ label }}\n </bento-typography>\n <div class=\"b-navigation-menu-group__icon b-navigation-menu-group__icon--chevron\">\n <chevron-up-icon v-if=\"isOpen && !isSemiCollapsed\" aria-hidden=\"true\" />\n <chevron-down-icon v-else aria-hidden=\"true\" />\n </div>\n </button>\n\n <Transition name=\"b-navigation-menu-group__animation--content\">\n <div\n v-show=\"isOpen\"\n :id=\"contentId\"\n class=\"b-navigation-menu-group__content-wrapper\"\n role=\"region\"\n :aria-labelledby=\"buttonId\"\n :style=\"contentMaxHeight\"\n >\n <ul ref=\"contentDiv\" class=\"b-navigation-menu-group__content\">\n <slot />\n </ul>\n </div>\n </Transition>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, onMounted, onUnmounted, provide, ref, useSlots, watch } from 'vue';\n import { useResizeObserver } from '@vueuse/core';\n import { BentoTypography } from '@/components/typography';\n import { observeSizeOfElement } from '@/utils/ts/resize';\n import { useExpandableContentHeight } from '@/composables/use-expandable-content-height/use-expandable-content-height';\n import { useHasSlot } from '@/composables';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import type {\n BentoNavigationMenuGroupProps,\n BentoNavigationMenuGroupState,\n BentoNavigationMenuItemRegistration,\n } from './navigation-menu-group.types';\n import { NAVIGATION_MENU_STATE_INJECTION_KEY } from '../../navigation-menu.keys';\n import { NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY } from './navigation-menu-group.keys';\n import { type BentoNavigationMenuState } from '../../navigation-menu.types';\n import messages from '../../messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n isExpanded: { type: Boolean, default: false },\n label: null\n});\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const headerClasses = computed(() => ({\n 'b-navigation-menu-group__header--expanded': isOpen.value && !isSemiCollapsed.value,\n }));\n\n const headerAriaDescription = computed(() => (isSemiCollapsed.value ? t('showingCurrentPage') : undefined));\n\n const labelRef = ref(null);\n const isTruncated = ref(false);\n\n useResizeObserver(labelRef, () => {\n const el = labelRef.value?.$el ?? labelRef.value;\n if (el) {\n isTruncated.value = el.scrollWidth > el.clientWidth;\n }\n });\n\n const groupId = generateUid('navigation-menu-group');\n const buttonId = generateUid('navigation-menu-group-button');\n const contentId = generateUid('navigation-menu-group-content');\n const navigationMenuState = inject<BentoNavigationMenuState | null>(NAVIGATION_MENU_STATE_INJECTION_KEY, null);\n\n const nestedItems = ref<Array<BentoNavigationMenuItemRegistration>>([]);\n\n const registerItem = (itemId: string, isSelected: () => boolean) => {\n nestedItems.value.push({ id: itemId, isSelected });\n };\n\n const unregisterItem = (itemId: string) => {\n nestedItems.value = nestedItems.value.filter(item => item.id !== itemId);\n };\n\n const isSemiCollapsed = ref(false);\n\n provide<BentoNavigationMenuGroupState>(NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY, {\n registerItem,\n unregisterItem,\n isSemiCollapsed,\n });\n\n const hasActiveItem = computed(() => nestedItems.value.some(item => item.isSelected()));\n\n const emit = defineEmits([\"update:is-expanded\"]);\n\n const isOpen = ref(props.isExpanded);\n const contentDiv = ref<HTMLUListElement>(null);\n\n const { updateContentHeight, contentHeight } = useExpandableContentHeight(contentDiv, isOpen);\n const contentMaxHeight = computed(() => (contentHeight.value ? { 'max-height': contentHeight.value } : {}));\n\n const toggleGroup = () => {\n if (isOpen.value && !isSemiCollapsed.value) {\n if (hasActiveItem.value) {\n isSemiCollapsed.value = true;\n } else {\n isOpen.value = false;\n }\n } else if (isSemiCollapsed.value) {\n isSemiCollapsed.value = false;\n } else {\n isOpen.value = true;\n }\n emit('update:is-expanded', isOpen.value && !isSemiCollapsed.value);\n };\n\n const setOpen = (open: boolean) => {\n if (open) {\n isOpen.value = true;\n isSemiCollapsed.value = false;\n } else if (hasActiveItem.value) {\n isSemiCollapsed.value = true;\n } else {\n isSemiCollapsed.value = false;\n isOpen.value = false;\n }\n emit('update:is-expanded', open);\n };\n\n watch(\n () => props.isExpanded,\n value => {\n if (!isSemiCollapsed.value) {\n isOpen.value = value;\n }\n }\n );\n\n watch(\n () => contentDiv.value,\n () => {\n let observer: ResizeObserver | null = null;\n if (!observer && contentDiv.value) {\n observer = observeSizeOfElement(contentDiv.value, () => {\n if (contentDiv.value) {\n updateContentHeight();\n }\n });\n }\n }\n );\n\n watch(\n isOpen,\n () => {\n updateContentHeight();\n },\n { immediate: true }\n );\n\n onMounted(() => {\n if (hasActiveItem.value && !isOpen.value) {\n isOpen.value = true;\n emit('update:is-expanded', true);\n }\n if (navigationMenuState) {\n navigationMenuState.registerGroup(groupId, setOpen, () => isOpen.value && !isSemiCollapsed.value);\n }\n });\n\n onUnmounted(() => navigationMenuState?.unregisterGroup(groupId));\n</script>\n\n<script lang=\"ts\">\n /**\n * Navigation menu group component for creating collapsible sections.\n *\n * @usage\n * import { BentoNavigationMenuGroup, BentoNavigationMenuItem } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoNavigationMenuGroup, BentoNavigationMenuItem },\n * template: `\n * <bento-navigation-menu-group label=\"Section\" :is-expanded=\"true\">\n * <template #icon><folder-icon /></template>\n * <bento-navigation-menu-item nested value=\"item-1\" label=\"Item 1\" />\n * <bento-navigation-menu-item nested value=\"item-2\" label=\"Item 2\" />\n * </bento-navigation-menu-group>\n * `\n * }\n */\n export default {\n name: 'bento-navigation-menu-group',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./navigation-menu-group.scss\" />\n"],"names":["uuid$1","_sfc_main$4","uuid","_sfc_main$3","NAVIGATION_MENU_STATE_INJECTION_KEY","__default__$2","messages","slots","useSlots","hasSlot","useHasSlot","titleId","generateUid","t","useI18n","groups","ref","registerGroup","groupId","setOpen","getIsOpen","unregisterGroup","g","allExpanded","computed","group","computedShowExpandAll","props","showHeader","expandButtonLabel","toggleAllGroups","shouldExpand","updateActivePage","value","emit","provide","toRef","NAVIGATION_MENU_GROUP_STATE_INJECTION_KEY","__default__$1","wrapperComponent","BentoLink","wrapperProps","labelRef","isTruncated","useResizeObserver","el","_a","itemId","groupState","inject","menuState","isSelected","isVisible","conditionalClasses","onMounted","handleClick","onBeforeUnmount","__default__","headerClasses","isOpen","isSemiCollapsed","headerAriaDescription","buttonId","contentId","navigationMenuState","nestedItems","registerItem","unregisterItem","item","hasActiveItem","contentDiv","updateContentHeight","contentHeight","useExpandableContentHeight","contentMaxHeight","toggleGroup","open","watch","observer","observeSizeOfElement","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;AAOA,IAAAA,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;ACPA,IAAAE,IAAA;AAEA,MAAAC,KAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;uBCdOE,IAAA,uBAAA,qCAAA;;;;;;GCqIHC,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAEf;;;;;;;;;;iBArEAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,uBAAA,GAEA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,CAAA,CAAA,GAEAC,IAAA,CAAAC,GAAAC,GAAAC,MAAA;AACI,MAAAL,EAAA,MAAA,KAAA,EAAA,IAAAG,GAAA,SAAAC,GAAA,WAAAC,EAAA,CAAA;AAAA,IAAqD,GAGzDC,IAAA,CAAAH,MA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EAAA,sBAAAyB,EAAA,SAAA,CAAAC,EAAA,KAAA;AAAA,IAAiE,GAGrEzC,IAAA,CAAAyD,MAAA;AACI,MAAAA,KACIjB,EAAA,QAAA,IACAC,EAAA,QAAA,MAAwBS,EAAA,QAExBT,EAAA,QAAA,MAEAA,EAAA,QAAA,IACAD,EAAA,QAAA,KAEJzB,EAAA,sBAAA0C,CAAA;AAAA,IAA+B;AAGnC,WAAAC;AAAA,MAAA,MAAAlD,EAAA;AAAA,MACgB,CAAAM,MAAA;AAER,QAAA2B,EAAA,UACID,EAAA,QAAA1B;AAAA,MACJ;AAAA,IACJ,GAGJ4C;AAAA,MAAA,MAAAP,EAAA;AAAA,MACqB,MAAA;AAEb,YAAAQ,IAAA;AACA,QAAA,CAAAA,KAAAR,EAAA,UACIQ,IAAAC,EAAAT,EAAA,OAAA,MAAA;AACI,UAAAA,EAAA,SACIC,EAAA;AAAA,QACJ,CAAA;AAAA,MAER;AAAA,IACJ,GAGJM;AAAA,MAAAlB;AAAA,MACI,MAAA;AAEI,QAAAY,EAAA;AAAA,MAAoB;AAAA,MACxB,EAAA,WAAA,GAAA;AAAA,IACkB,GAGtBjB,EAAA,MAAA;AACI,MAAAe,EAAA,SAAA,CAAAV,EAAA,UACIA,EAAA,QAAA,IACAzB,EAAA,sBAAA,EAAA,IAEJ8B,KACIA,EAAA,cAAA9C,GAAAC,GAAA,MAAAwC,EAAA,SAAA,CAAAC,EAAA,KAAA;AAAA,IACJ,CAAA,GAGJoB,EAAA,MAAAhB,KAAA,gBAAAA,EAAA,gBAAA9C,EAAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as d, computed as g, watch as w, useSlots as L, useAttrs as B, ref as $, toRefs as z } from "vue";
|
|
2
2
|
import { p as F, B as f } from "./typography.C8lPlsbD.js";
|
|
3
|
-
import { B as N } from "./dropdown.
|
|
3
|
+
import { B as N } from "./dropdown.CF6Gf7ya.js";
|
|
4
4
|
import { g as S } from "./generate-uid.NJ8tVoha.js";
|
|
5
5
|
import { u as h, g as x, a as y } from "./index.B6WW_F-J.js";
|
|
6
6
|
import { n as _ } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
@@ -393,4 +393,4 @@ const Oe = Se.exports;
|
|
|
393
393
|
export {
|
|
394
394
|
Oe as B
|
|
395
395
|
};
|
|
396
|
-
//# sourceMappingURL=pagination.
|
|
396
|
+
//# sourceMappingURL=pagination.hOIvu4hj.js.map
|