@adyen/bento-vue2 1.11.0 → 1.12.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/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +38 -29
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +43 -1306
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +5 -11
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +43 -44
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/{useKeyboardNavigation.d.ts → use-keyboard-navigation.d.ts} +3 -13
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-keyboard-navigation.types.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +48 -1674
- package/dist/@types/packages/vue2/src/components/dropdown/index.d.ts +6 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +12 -12
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +17 -11
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +16 -60
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +59 -49
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +39 -291
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +76 -83
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +15 -15
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.bd61ab14.js → base-button.1f07b7c1.js} +2 -2
- package/dist/chunks/{base-button.bd61ab14.js.map → base-button.1f07b7c1.js.map} +1 -1
- package/dist/chunks/base-modal.9d63bdaf.js +200 -0
- package/dist/chunks/base-modal.9d63bdaf.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.767344df.js → button-actions-with-menu.4c5091f4.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.767344df.js.map → button-actions-with-menu.4c5091f4.js.map} +1 -1
- package/dist/chunks/{button.bb5b4909.js → button.133f145e.js} +2 -2
- package/dist/chunks/{button.bb5b4909.js.map → button.133f145e.js.map} +1 -1
- package/dist/chunks/{calendar.4ab3c2dc.js → calendar.9a8605d1.js} +8 -7
- package/dist/chunks/{calendar.4ab3c2dc.js.map → calendar.9a8605d1.js.map} +1 -1
- package/dist/chunks/{checkbox.c684c20a.js → checkbox.d8b810c7.js} +3 -3
- package/dist/chunks/{checkbox.c684c20a.js.map → checkbox.d8b810c7.js.map} +1 -1
- package/dist/chunks/{controls-group.d25f5044.js → controls-group.bf152dea.js} +3 -3
- package/dist/chunks/{controls-group.d25f5044.js.map → controls-group.bf152dea.js.map} +1 -1
- package/dist/chunks/{copy.36c058e9.js → copy.68a7d416.js} +4 -4
- package/dist/chunks/{copy.36c058e9.js.map → copy.68a7d416.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.1cba89ea.js → dropdown-default-textbox.c595fd31.js} +129 -148
- package/dist/chunks/dropdown-default-textbox.c595fd31.js.map +1 -0
- package/dist/chunks/dropdown.eaee22a3.js +797 -0
- package/dist/chunks/dropdown.eaee22a3.js.map +1 -0
- package/dist/chunks/{field-label.a0c54b7d.js → field-label.66f52c8f.js} +2 -2
- package/dist/chunks/{field-label.a0c54b7d.js.map → field-label.66f52c8f.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.5c90f692.js → fixed-scroller.01fc96f7.js} +2 -2
- package/dist/chunks/{fixed-scroller.5c90f692.js.map → fixed-scroller.01fc96f7.js.map} +1 -1
- package/dist/chunks/{footer-actions.b14cfca8.js → footer-actions.38e99891.js} +3 -3
- package/dist/chunks/{footer-actions.b14cfca8.js.map → footer-actions.38e99891.js.map} +1 -1
- package/dist/chunks/{index.aaedd8f9.js → index.14758ff7.js} +3 -3
- package/dist/chunks/{index.aaedd8f9.js.map → index.14758ff7.js.map} +1 -1
- package/dist/chunks/index.18773b0b.js +637 -0
- package/dist/chunks/index.18773b0b.js.map +1 -0
- package/dist/chunks/{index.7d2ea1de.js → index.2cfe4a09.js} +2 -2
- package/dist/chunks/{index.7d2ea1de.js.map → index.2cfe4a09.js.map} +1 -1
- package/dist/chunks/{index.1e8c900a.js → index.3b7d40b7.js} +2 -2
- package/dist/chunks/{index.1e8c900a.js.map → index.3b7d40b7.js.map} +1 -1
- package/dist/chunks/{index.f18f79eb.js → index.45aa17fc.js} +5 -5
- package/dist/chunks/{index.f18f79eb.js.map → index.45aa17fc.js.map} +1 -1
- package/dist/chunks/{index.b0a89960.js → index.99a2184a.js} +2 -2
- package/dist/chunks/{index.b0a89960.js.map → index.99a2184a.js.map} +1 -1
- package/dist/chunks/{index.f2223abb.js → index.9b669c12.js} +6 -6
- package/dist/chunks/{index.f2223abb.js.map → index.9b669c12.js.map} +1 -1
- package/dist/chunks/{index.720f0cbf.js → index.b38a191d.js} +13 -12
- package/dist/chunks/{index.720f0cbf.js.map → index.b38a191d.js.map} +1 -1
- package/dist/chunks/{index.58282364.js → index.d90c5838.js} +3 -3
- package/dist/chunks/{index.58282364.js.map → index.d90c5838.js.map} +1 -1
- package/dist/chunks/{index.75f0e99f.js → index.eb527b75.js} +6 -6
- package/dist/chunks/{index.75f0e99f.js.map → index.eb527b75.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.9103c011.js → listbox-option-tag.168c794c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.9103c011.js.map → listbox-option-tag.168c794c.js.map} +1 -1
- package/dist/chunks/{listbox.7cf6d6b4.js → listbox.23c6b393.js} +6 -6
- package/dist/chunks/{listbox.7cf6d6b4.js.map → listbox.23c6b393.js.map} +1 -1
- package/dist/chunks/{loading-button.fb025a2e.js → loading-button.44d698b9.js} +2 -2
- package/dist/chunks/{loading-button.fb025a2e.js.map → loading-button.44d698b9.js.map} +1 -1
- package/dist/chunks/{tooltip.f48beb54.js → tooltip.f91b2040.js} +3 -3
- package/dist/chunks/{tooltip.f48beb54.js.map → tooltip.f91b2040.js.map} +1 -1
- package/dist/chunks/{useCountryItems.6b7985bf.js → use-country-items.6b7985bf.js} +1 -1
- package/dist/chunks/use-country-items.6b7985bf.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +460 -451
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +38 -38
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +102 -132
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +54 -53
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +218 -215
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +38 -28
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +209 -302
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +88 -88
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +4 -4
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +5 -5
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/typography.js +1 -1
- package/dist/web-types.json +3739 -3589
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +0 -12
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDropdownSearchFilter.d.ts +0 -3
- package/dist/chunks/base-modal.5640a66a.js +0 -222
- package/dist/chunks/base-modal.5640a66a.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.1cba89ea.js.map +0 -1
- package/dist/chunks/dropdown.4152cc00.js +0 -887
- package/dist/chunks/dropdown.4152cc00.js.map +0 -1
- package/dist/chunks/index.179d485c.js +0 -635
- package/dist/chunks/index.179d485c.js.map +0 -1
- package/dist/chunks/useCountryItems.6b7985bf.js.map +0 -1
- /package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/{useDropdownOptionsListbox.d.ts → use-dropdown-options-listbox.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/composables/{useCountryItems.d.ts → use-country-items.d.ts} +0 -0
package/dist/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.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 :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #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 lang=\"ts\">\n import { defineComponent, onMounted, PropType } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, FooterActions },\n props: {\n /**\n * Adds a cross icon on the right side of the alert\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 required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\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 * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\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: {\n type: Boolean,\n default: false,\n },\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 * 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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\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: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n\n return {\n // Methods\n onCloseModal,\n hasSlot,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n ref=\"modalRef\"\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\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 lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, Ref, ref, toRefs } from 'vue';\n import { BentoModalDialogType, BentoModalEvent, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n props: {\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 required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\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 * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\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 * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\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(BentoModalEvent.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('okButtonText') 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 (!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(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\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\n return {\n // Refs\n modalRef,\n\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\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 </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of 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 name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\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: {\n type: Boolean,\n default: false,\n },\n\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 // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n 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 * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\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 * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\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 * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const attrs = useAttrs();\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\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 overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n return {\n onCloseModal,\n customProps,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["_sfc_main$2","defineComponent","BaseModal","FooterActions","BentoModalColumnLayoutVariant","BentoModalEvent","props","slots","emit","hasSlot","useHasSlot","onCloseModal","onMounted","_sfc_main$1","messages","BentoButtonActions","t","useI18n","actions","dialogType","toRefs","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalRole","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","BentoModalDefault","BentoModalDialog","BentoModalVariant","value","BentoModalSize","attrs","useAttrs","customProps","watch"],"mappings":";;;;;;;;AA0CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,eAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IAC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GAAAqC;AAAA,MACA;AAAA,IAAA,GAGAhC,IAAA,MAAA;AACA,MAAAH,EAAAH,EAAA,WAAA;AAAA,IAAA;AAKA,WAAAyC;AAAA,MACA,MAAAxC,EAAA;AAAA,MACA,MAAA;;AACA,UAAA4B,KAAAH,IAAAzB,EAAA,YAAA,gBAAAyB,EAAA,OAAA,gBAAAG,EAAA,WAAA,aACA,WAAAvB,GAAAyB,CAAA;AAAA,MAEA;AAAA,IAAA,GAGA;AAAA,MACA,cAAAzB;AAAA,MACA,aAAAkC;AAAA,MACA,SAAAnC,EAAAH,CAAA;AAAA,IAAA;AAAA,EAEA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal.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 :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #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, PropType, useSlots } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed.\n */\n (e: 'close-modal');\n }>();\n\n 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 * 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 * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\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')))) {\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 :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\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, PropType, Ref, ref, toRefs, useSlots } from 'vue';\n import { BentoModalDialogType, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits<{\n (e: 'close-modal');\n }>();\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 * 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 * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\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('okButtonText') 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 (!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=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\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 </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, useSlots, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalSize,\n BentoModalVariant,\n } from './modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const attrs = useAttrs();\n const emit = defineEmits<{\n /**\n * Emitted when the modal is closed\n */\n (e: 'close-modal');\n }>();\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 * 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 * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: { type: Boolean, default: false },\n\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).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 customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\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 overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit('close-modal');\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\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","messages","t","useI18n","actions","dialogType","toRefs","props","modalRef","ref","onCloseActionButton","event","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalDefault","BentoModalDialog","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","attrs","useAttrs","customProps","BentoModalVariant","watch"],"mappings":";;;;;;;;;AAoMI,MAAAA,IAAeC,EAAgB;AAAA,EAC3B,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5JD,UAAMC,IAAQC,KACRC,IAAUC,EAAWH,CAAK,GAwG1BI,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IAAA;AAGtB,WAAAC,EAAU,MAAM;AACR,UAAA,EAAEJ,EAAQ,SAAS,KAAMA,EAAQ,eAAe,KAAKA,EAAQ,eAAe;AACtE,cAAA,IAAI,MAAM,mEAAmE;AAAA,IACvF,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCsDDJ,IAAeC,EAAgB;AAAA,EAC3B,MAAM,EAAE,UAAAQ,EAAS;AAAA,EACjB,MAAM;AACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhGK,EAAE,GAAAC,EAAE,IAAIC,EAAgD,GAExDT,IAAQC,KACRC,IAAUC,EAAWH,CAAK,GAC1B,EAAE,SAAAU,GAAS,YAAAC,EAAW,IAAIC,EAAOC,CAAK,GACtCC,IAAgDC,EAAI,IAAI,GAExDX,IAAe,MAAM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,YAAY,EAAE,mBAAA6B,GAAmB,kBAAAC,EAAiB;AACtD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBApMKC,IAA6C,KAE7C9B,IAAQC,KACRC,IAAUC,EAAWH,CAAK,GAC1B+B,IAAQC,KAkIRC,IAAcd;AAAA,MAAS,MACzBN,EAAM,YAAYqB,EAAkB,UAC9B;AAAA,QACI,iBAAiBrB,EAAM;AAAA,QACvB,MAAMA,EAAM;AAAA,QACZ,eAAeA,EAAM;AAAA,QACrB,cAAcA,EAAM;AAAA,QACpB,oBAAoBA,EAAM;AAAA,QAC1B,eAAeA,EAAM,iBAAiB;AAAA,QACtC,iBAAiBA,EAAM;AAAA,QACvB,kBAAkBA,EAAM;AAAA,QACxB,YAAYA,EAAM;AAAA,QAClB,GAAGkB;AAAA,MAAA,IAEP;AAAA,QACI,YAAYlB,EAAM;AAAA,QAClB,SAASA,EAAM;AAAA,QACf,eAAeA,EAAM,iBAAiB;AAAA,QACtC,iBAAiBA,EAAM;AAAA,QACvB,GAAGkB;AAAA,MACP;AAAA,IAAA,GAGJ3B,IAAe,MAAM;AACvB,MAAAC,EAAK,aAAa;AAAA,IAAA;AAKtB,WAAA8B;AAAA,MACI,MAAMtB,EAAM;AAAA,MACZ,MAAM;;AACF,UAAIc,KAAAH,IAAAX,EAAM,YAAN,gBAAAW,EAAgB,OAAhB,gBAAAG,EAAoB,WAAU,aAC9B,WAAWvB,GAAc0B,CAA0C;AAAA,MAE3E;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/pagination.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { B as C } from "./chunks/index.
|
|
4
|
-
import { B as b } from "./chunks/dropdown.
|
|
1
|
+
import { defineComponent as p, ref as P, computed as r, toRefs as L } from "vue";
|
|
2
|
+
import { u as N } from "./chunks/aria-label.ac9651a5.js";
|
|
3
|
+
import { B as C } from "./chunks/index.99a2184a.js";
|
|
4
|
+
import { B as b } from "./chunks/dropdown.eaee22a3.js";
|
|
5
5
|
import { g as T } from "./chunks/unique-id.a2a2b458.js";
|
|
6
6
|
import { g as y, a as x } from "./chunks/i18n.eb5b985b.js";
|
|
7
|
-
import { n as
|
|
8
|
-
import { a as
|
|
9
|
-
import "./assets/
|
|
10
|
-
const
|
|
7
|
+
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
+
import { a as S } from "./chunks/button.133f145e.js";
|
|
9
|
+
import "./assets/index34.css";
|
|
10
|
+
const I = {
|
|
11
11
|
"en-US": {
|
|
12
12
|
showingItems: "Showing {itemCount} items",
|
|
13
13
|
showingItemsWithTotal: "Showing {itemCount} of {totalCount} items"
|
|
@@ -32,16 +32,16 @@ const S = {
|
|
|
32
32
|
showingItems: "Mostrando {itemCount} artículos",
|
|
33
33
|
showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} artículos"
|
|
34
34
|
}
|
|
35
|
-
},
|
|
35
|
+
}, O = 50, v = [
|
|
36
36
|
{ label: "10", value: 10 },
|
|
37
37
|
{ label: "20", value: 20 },
|
|
38
38
|
{ label: "50", value: 50 },
|
|
39
39
|
// DEFAULT_NUMBER_OF_RESULTS
|
|
40
40
|
{ label: "75", value: 75 },
|
|
41
41
|
{ label: "100", value: 100 }
|
|
42
|
-
],
|
|
42
|
+
], R = p({
|
|
43
43
|
name: "bento-pagination-context-results-per-page",
|
|
44
|
-
i18n: { messages:
|
|
44
|
+
i18n: { messages: I },
|
|
45
45
|
components: {
|
|
46
46
|
BentoDropdown: b,
|
|
47
47
|
BentoTypography: C
|
|
@@ -52,8 +52,8 @@ const S = {
|
|
|
52
52
|
*/
|
|
53
53
|
itemsPerPage: {
|
|
54
54
|
type: Number,
|
|
55
|
-
default:
|
|
56
|
-
validator: (a) =>
|
|
55
|
+
default: O,
|
|
56
|
+
validator: (a) => v.some(({ value: t }) => t === a)
|
|
57
57
|
},
|
|
58
58
|
/**
|
|
59
59
|
* The total number of items the pager is paging through.
|
|
@@ -62,40 +62,40 @@ const S = {
|
|
|
62
62
|
},
|
|
63
63
|
emits: ["select"],
|
|
64
64
|
setup(a, { emit: t }) {
|
|
65
|
-
const e = T("b-pagination-context-number-elements"), n = P(
|
|
65
|
+
const e = T("b-pagination-context-number-elements"), n = P(v), g = x(), u = (o) => {
|
|
66
66
|
t("select", o);
|
|
67
|
-
},
|
|
67
|
+
}, c = r(() => a.totalCount ? "showingItemsWithTotal" : "showingItems");
|
|
68
68
|
return {
|
|
69
69
|
// Values
|
|
70
70
|
dropdownId: e,
|
|
71
71
|
dropdownOptions: n,
|
|
72
|
-
i18nComponent:
|
|
73
|
-
translationPathKey:
|
|
72
|
+
i18nComponent: g,
|
|
73
|
+
translationPathKey: c,
|
|
74
74
|
// Methods
|
|
75
75
|
getI18nProps: y,
|
|
76
76
|
// Events
|
|
77
|
-
onSelectChange:
|
|
77
|
+
onSelectChange: u
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
var
|
|
81
|
+
var F = function() {
|
|
82
82
|
var t = this, e = t._self._c;
|
|
83
83
|
return t._self._setupProxy, e("div", { staticClass: "b-pagination-results-per-page" }, [e("bento-typography", { attrs: { el: "div" } }, [e(t.i18nComponent, t._b({ tag: "component", staticClass: "b-pagination-results-per-page__dropdown-container", attrs: { tag: "div", plural: t.totalCount }, scopedSlots: t._u([{ key: "itemCount", fn: function() {
|
|
84
84
|
return [e("bento-dropdown", { staticClass: "b-pagination-results-per-page__dropdown", attrs: { id: t.dropdownId, "aria-label": t.$t(t.translationPathKey, { itemCount: t.itemsPerPage, totalCount: t.totalCount }), condensed: "", items: t.dropdownOptions, value: t.itemsPerPage }, on: { input: t.onSelectChange } })];
|
|
85
85
|
}, proxy: !0 }, t.totalCount ? { key: "totalCount", fn: function() {
|
|
86
86
|
return [t._v(t._s(t.totalCount))];
|
|
87
87
|
}, proxy: !0 } : null], null, !0) }, "component", t.getI18nProps(t.translationPathKey), !1))], 1)], 1);
|
|
88
|
-
},
|
|
89
|
-
O,
|
|
88
|
+
}, B = [], k = /* @__PURE__ */ l(
|
|
90
89
|
R,
|
|
91
90
|
F,
|
|
91
|
+
B,
|
|
92
92
|
!1,
|
|
93
93
|
null,
|
|
94
94
|
"5b81c002",
|
|
95
95
|
null,
|
|
96
96
|
null
|
|
97
97
|
);
|
|
98
|
-
const
|
|
98
|
+
const A = k.exports, E = {
|
|
99
99
|
"en-US": {
|
|
100
100
|
pageOfTotalPages: "Page {page} of {totalPages}",
|
|
101
101
|
pageOneOfOne: "Page 1 of 1",
|
|
@@ -126,8 +126,8 @@ const k = B.exports, A = {
|
|
|
126
126
|
pageOneOfOne: "Página 1 de 1",
|
|
127
127
|
pageNumber: "Página {page}"
|
|
128
128
|
}
|
|
129
|
-
},
|
|
130
|
-
i18n: { messages:
|
|
129
|
+
}, M = p({
|
|
130
|
+
i18n: { messages: E },
|
|
131
131
|
name: "bento-pagination-context",
|
|
132
132
|
components: {
|
|
133
133
|
BentoDropdown: b,
|
|
@@ -156,17 +156,17 @@ const k = B.exports, A = {
|
|
|
156
156
|
},
|
|
157
157
|
emits: ["page-selected"],
|
|
158
158
|
setup(a, { emit: t }) {
|
|
159
|
-
const e = T("bento-pagination-context-current-page"), n = (s) => t("page-selected", s),
|
|
159
|
+
const e = T("bento-pagination-context-current-page"), n = (s) => t("page-selected", s), g = x(), u = (s) => ({
|
|
160
160
|
label: s.toString(),
|
|
161
161
|
value: s
|
|
162
|
-
}),
|
|
163
|
-
() => Array.from(new Array(a.totalPages),
|
|
162
|
+
}), c = (s, _) => _ + 1, o = r(
|
|
163
|
+
() => Array.from(new Array(a.totalPages), c).map(u)
|
|
164
164
|
);
|
|
165
165
|
return {
|
|
166
166
|
// Values
|
|
167
167
|
dropdownId: e,
|
|
168
168
|
listOfAvailablePages: o,
|
|
169
|
-
i18nComponent:
|
|
169
|
+
i18nComponent: g,
|
|
170
170
|
// Methods
|
|
171
171
|
getI18nProps: y,
|
|
172
172
|
// Events
|
|
@@ -174,17 +174,17 @@ const k = B.exports, A = {
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
var
|
|
177
|
+
var Z = function() {
|
|
178
178
|
var t = this, e = t._self._c;
|
|
179
179
|
return t._self._setupProxy, e("div", { staticClass: "b-pagination-context" }, [t.totalPages > 1 ? e("bento-typography", { attrs: { el: "div" } }, [e(t.i18nComponent, t._b({ tag: "component", attrs: { tag: "div" }, scopedSlots: t._u([{ key: "page", fn: function() {
|
|
180
180
|
return [e("bento-dropdown", { staticClass: "b-pagination-context__dropdown", attrs: { id: t.dropdownId, "aria-label": t.$t("pageOfTotalPages", { page: t.page, totalPages: t.totalPages }), condensed: "", items: t.listOfAvailablePages, value: t.page, "virtual-scroll": t.virtualScroll }, on: { input: t.onPageSelectChange } })];
|
|
181
181
|
}, proxy: !0 }, { key: "totalPages", fn: function() {
|
|
182
182
|
return [t._v(t._s(t.totalPages))];
|
|
183
183
|
}, proxy: !0 }], null, !1, 1835443900) }, "component", t.getI18nProps("pageOfTotalPages"), !1))], 1) : t.totalPages === 1 ? e("bento-typography", { attrs: { el: "span" } }, [t._v(" " + t._s(t.$t("pageOneOfOne")) + " ")]) : e("bento-typography", { attrs: { el: "span" } }, [t._v(" " + t._s(t.$t("pageNumber", { page: t.page })) + " ")])], 1);
|
|
184
|
-
},
|
|
185
|
-
E,
|
|
184
|
+
}, z = [], W = /* @__PURE__ */ l(
|
|
186
185
|
M,
|
|
187
186
|
Z,
|
|
187
|
+
z,
|
|
188
188
|
!1,
|
|
189
189
|
null,
|
|
190
190
|
"a1e4b8ee",
|
|
@@ -192,86 +192,86 @@ var M = function() {
|
|
|
192
192
|
null
|
|
193
193
|
);
|
|
194
194
|
const D = W.exports;
|
|
195
|
-
let
|
|
196
|
-
const
|
|
195
|
+
let d = 0;
|
|
196
|
+
const U = {
|
|
197
197
|
beforeCreate() {
|
|
198
|
-
this.uuid =
|
|
198
|
+
this.uuid = d.toString(), d += 1;
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
|
-
var
|
|
201
|
+
var j = function() {
|
|
202
202
|
var t = this, e = t._self._c;
|
|
203
203
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", d: "M9.06055 8.00011L12.0605 5.00011L10.9999 3.93945L6.93923 8.00011L10.9999 12.0608L12.0605 11.0001L9.06055 8.00011Z" } }), e("path", { attrs: { fill: "#00112C", d: "M4.25 4.25L4.25 11.75H5.75L5.75 4.25L4.25 4.25Z" } })]);
|
|
204
|
-
},
|
|
205
|
-
z,
|
|
204
|
+
}, J = [], K = /* @__PURE__ */ l(
|
|
206
205
|
U,
|
|
207
206
|
j,
|
|
207
|
+
J,
|
|
208
208
|
!1,
|
|
209
209
|
null,
|
|
210
210
|
null,
|
|
211
211
|
null,
|
|
212
212
|
null
|
|
213
213
|
);
|
|
214
|
-
const
|
|
214
|
+
const V = K.exports;
|
|
215
215
|
let m = 0;
|
|
216
|
-
const
|
|
216
|
+
const H = {
|
|
217
217
|
beforeCreate() {
|
|
218
218
|
this.uuid = m.toString(), m += 1;
|
|
219
219
|
}
|
|
220
220
|
};
|
|
221
|
-
var
|
|
221
|
+
var q = function() {
|
|
222
222
|
var t = this, e = t._self._c;
|
|
223
223
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", d: "M6.93945 7.99962L3.93945 10.9996L5.00011 12.0603L9.06077 7.99963L5.00011 3.93896L3.93945 4.99963L6.93945 7.99962Z" } }), e("path", { attrs: { fill: "#00112C", d: "M11.75 11.7497V4.24974L10.25 4.24974V11.7497H11.75Z" } })]);
|
|
224
|
-
},
|
|
225
|
-
V,
|
|
224
|
+
}, G = [], Q = /* @__PURE__ */ l(
|
|
226
225
|
H,
|
|
227
226
|
q,
|
|
227
|
+
G,
|
|
228
228
|
!1,
|
|
229
229
|
null,
|
|
230
230
|
null,
|
|
231
231
|
null,
|
|
232
232
|
null
|
|
233
233
|
);
|
|
234
|
-
const
|
|
234
|
+
const X = Q.exports;
|
|
235
235
|
let f = 0;
|
|
236
|
-
const
|
|
236
|
+
const Y = {
|
|
237
237
|
beforeCreate() {
|
|
238
238
|
this.uuid = f.toString(), f += 1;
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
var
|
|
241
|
+
var tt = function() {
|
|
242
242
|
var t = this, e = t._self._c;
|
|
243
243
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", d: "M10.5608 5.00011L7.56077 8.00011L10.5608 11.0001L9.50011 12.0608L5.43945 8.00011L9.50011 3.93945L10.5608 5.00011Z" } })]);
|
|
244
|
-
},
|
|
245
|
-
X,
|
|
244
|
+
}, et = [], at = /* @__PURE__ */ l(
|
|
246
245
|
Y,
|
|
247
246
|
tt,
|
|
247
|
+
et,
|
|
248
248
|
!1,
|
|
249
249
|
null,
|
|
250
250
|
null,
|
|
251
251
|
null,
|
|
252
252
|
null
|
|
253
253
|
);
|
|
254
|
-
const
|
|
254
|
+
const nt = at.exports;
|
|
255
255
|
let h = 0;
|
|
256
|
-
const
|
|
256
|
+
const ot = {
|
|
257
257
|
beforeCreate() {
|
|
258
258
|
this.uuid = h.toString(), h += 1;
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
var
|
|
261
|
+
var st = function() {
|
|
262
262
|
var t = this, e = t._self._c;
|
|
263
263
|
return e("svg", t._b({ staticClass: "ui-assets-icons-16", attrs: { role: "img", xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "none" } }, "svg", t.$attrs, !1), [t.$attrs["svg-title"] ? e("title", [t._v(t._s(t.$attrs["svg-title"]))]) : t._e(), e("path", { attrs: { fill: "#00112C", d: "M5.43924 10.9999L8.43924 7.99989L5.43924 4.99989L6.4999 3.93923L10.5606 7.99989L6.4999 12.0605L5.43924 10.9999Z" } })]);
|
|
264
|
-
},
|
|
265
|
-
nt,
|
|
264
|
+
}, it = [], rt = /* @__PURE__ */ l(
|
|
266
265
|
ot,
|
|
267
266
|
st,
|
|
267
|
+
it,
|
|
268
268
|
!1,
|
|
269
269
|
null,
|
|
270
270
|
null,
|
|
271
271
|
null,
|
|
272
272
|
null
|
|
273
273
|
);
|
|
274
|
-
const
|
|
274
|
+
const lt = rt.exports, gt = {
|
|
275
275
|
"en-US": {
|
|
276
276
|
navigateToTheFirstPage: "Navigate to the first page",
|
|
277
277
|
navigateToThePreviousPage: "Navigate to the previous page",
|
|
@@ -308,15 +308,15 @@ const rt = it.exports, lt = {
|
|
|
308
308
|
navigateToTheNextPage: "Ir a la página siguiente",
|
|
309
309
|
navigateToTheLastPage: "Ir a la última página"
|
|
310
310
|
}
|
|
311
|
-
},
|
|
312
|
-
i18n: { messages:
|
|
311
|
+
}, ut = p({
|
|
312
|
+
i18n: { messages: gt },
|
|
313
313
|
name: "adl-pagination-controls",
|
|
314
314
|
components: {
|
|
315
|
-
BentoButton:
|
|
316
|
-
SkipLeft:
|
|
317
|
-
SkipRight:
|
|
318
|
-
ChevronLeft:
|
|
319
|
-
ChevronRight:
|
|
315
|
+
BentoButton: S,
|
|
316
|
+
SkipLeft: V,
|
|
317
|
+
SkipRight: X,
|
|
318
|
+
ChevronLeft: nt,
|
|
319
|
+
ChevronRight: lt
|
|
320
320
|
},
|
|
321
321
|
props: {
|
|
322
322
|
/**
|
|
@@ -334,16 +334,16 @@ const rt = it.exports, lt = {
|
|
|
334
334
|
},
|
|
335
335
|
emits: ["navigate"],
|
|
336
336
|
setup(a, { emit: t }) {
|
|
337
|
-
const e =
|
|
337
|
+
const e = r(() => a.page === 1), n = r(() => a.page === a.totalPages), g = r(() => !a.hasNext || n.value), u = r(() => {
|
|
338
338
|
const o = !a.hasNext, s = !a.totalPages;
|
|
339
339
|
return o || n.value || s;
|
|
340
340
|
});
|
|
341
341
|
return {
|
|
342
342
|
// Values
|
|
343
|
-
isNextButtonDisabled:
|
|
343
|
+
isNextButtonDisabled: g,
|
|
344
344
|
isCurrentPageFirst: e,
|
|
345
345
|
isCurrentPageLast: n,
|
|
346
|
-
isLastPageButtonDisabled:
|
|
346
|
+
isLastPageButtonDisabled: u,
|
|
347
347
|
// Events
|
|
348
348
|
navigate: (o) => {
|
|
349
349
|
t("navigate", o);
|
|
@@ -351,7 +351,7 @@ const rt = it.exports, lt = {
|
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
-
var
|
|
354
|
+
var ct = function() {
|
|
355
355
|
var t = this, e = t._self._c;
|
|
356
356
|
return t._self._setupProxy, e("ul", { staticClass: "b-pagination-controls" }, [e("li", { staticClass: "b-pagination-controls__item" }, [e("bento-button", { attrs: { disabled: t.isCurrentPageFirst, variant: "tertiary", condensed: "" }, on: { click: function(n) {
|
|
357
357
|
return t.navigate(1);
|
|
@@ -370,9 +370,9 @@ var ut = function() {
|
|
|
370
370
|
} }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
|
|
371
371
|
return [e("skip-right", { attrs: { "svg-title": t.$t("navigateToTheLastPage") } })];
|
|
372
372
|
}, proxy: !0 }]) })], 1)]);
|
|
373
|
-
}, pt = [],
|
|
374
|
-
gt,
|
|
373
|
+
}, pt = [], _t = /* @__PURE__ */ l(
|
|
375
374
|
ut,
|
|
375
|
+
ct,
|
|
376
376
|
pt,
|
|
377
377
|
!1,
|
|
378
378
|
null,
|
|
@@ -380,7 +380,7 @@ var ut = function() {
|
|
|
380
380
|
null,
|
|
381
381
|
null
|
|
382
382
|
);
|
|
383
|
-
const
|
|
383
|
+
const vt = _t.exports, dt = {
|
|
384
384
|
"en-US": {
|
|
385
385
|
paginatedNavigation: "Paginated navigation",
|
|
386
386
|
showingItemsWithTotal: "Showing {itemCount} of {totalCount} item | Showing {itemCount} of {totalCount} items"
|
|
@@ -405,13 +405,13 @@ const _t = ct.exports, dt = {
|
|
|
405
405
|
paginatedNavigation: "Navegación por páginas",
|
|
406
406
|
showingItemsWithTotal: "Mostrando {itemCount} de {totalCount} artículo | Mostrando {itemCount} de {totalCount} artículos"
|
|
407
407
|
}
|
|
408
|
-
},
|
|
408
|
+
}, mt = p({
|
|
409
409
|
i18n: { messages: dt },
|
|
410
410
|
name: "bento-pagination",
|
|
411
411
|
components: {
|
|
412
412
|
BentoPaginationContext: D,
|
|
413
|
-
BentoPaginationControls:
|
|
414
|
-
BentoPaginationResultsPerPage:
|
|
413
|
+
BentoPaginationControls: vt,
|
|
414
|
+
BentoPaginationResultsPerPage: A
|
|
415
415
|
},
|
|
416
416
|
props: {
|
|
417
417
|
/**
|
|
@@ -463,25 +463,25 @@ const _t = ct.exports, dt = {
|
|
|
463
463
|
},
|
|
464
464
|
emits: ["navigate", "items-page", "update:page", "update:size"],
|
|
465
465
|
setup(a, { attrs: t, emit: e }) {
|
|
466
|
-
const n = P(t["aria-label"]), { ariaLabel:
|
|
466
|
+
const n = P(t["aria-label"]), { ariaLabel: g } = L(a), u = N({
|
|
467
467
|
ariaLabel: n.value,
|
|
468
468
|
// TODO: take this line away when the aria-label props is removed
|
|
469
|
-
label:
|
|
470
|
-
}),
|
|
469
|
+
label: g
|
|
470
|
+
}), c = r(
|
|
471
471
|
() => !a.totalCount || !a.size ? null : Math.ceil(a.totalCount / a.size)
|
|
472
|
-
), o = (
|
|
473
|
-
e("navigate",
|
|
474
|
-
}, s = (
|
|
475
|
-
o(
|
|
476
|
-
}, _ = (
|
|
477
|
-
e("items-page",
|
|
478
|
-
}, $ =
|
|
472
|
+
), o = (i, w) => {
|
|
473
|
+
a.hidePageSize ? e("navigate", i) : e("navigate", i, w ?? (a == null ? void 0 : a.size)), e("update:page", i);
|
|
474
|
+
}, s = (i) => {
|
|
475
|
+
o(i);
|
|
476
|
+
}, _ = (i) => {
|
|
477
|
+
e("items-page", i), e("update:size", i), o(1, i);
|
|
478
|
+
}, $ = r(() => ({
|
|
479
479
|
"b-pagination__navigation--no-results-per-page": a.hidePageSize
|
|
480
480
|
}));
|
|
481
481
|
return {
|
|
482
482
|
// Values
|
|
483
|
-
computedAriaLabel:
|
|
484
|
-
totalPages:
|
|
483
|
+
computedAriaLabel: u,
|
|
484
|
+
totalPages: c,
|
|
485
485
|
navigationConditionalClasses: $,
|
|
486
486
|
// Events
|
|
487
487
|
navigate: o,
|
|
@@ -490,21 +490,21 @@ const _t = ct.exports, dt = {
|
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
|
-
var
|
|
493
|
+
var ft = function() {
|
|
494
494
|
var t = this, e = t._self._c;
|
|
495
495
|
return t._self._setupProxy, e("div", { staticClass: "b-pagination" }, [e("nav", { staticClass: "b-pagination__navigation", class: t.navigationConditionalClasses, attrs: { "aria-label": t.computedAriaLabel } }, [t.hidePageSize ? t._e() : e("bento-pagination-results-per-page", { staticClass: "b-pagination__results-per-page", attrs: { "items-per-page": t.size, "total-count": t.totalCount }, on: { select: t.onItemsPerPageChange } }), e("div", { staticClass: "b-pagination__page-navigator" }, [e("bento-pagination-context", { staticClass: "b-pagination__context", attrs: { "total-pages": t.totalPages, page: t.page, "total-count": t.totalCount, "virtual-scroll": t.virtualScroll }, on: { "page-selected": t.onPageSelected } }), e("div", { staticClass: "b-pagination__divider" }), e("bento-pagination-controls", { staticClass: "b-pagination__controls", attrs: { "has-next": t.hasNext, page: t.page, "total-pages": t.totalPages }, on: { navigate: t.navigate } })], 1)], 1)]);
|
|
496
|
-
},
|
|
497
|
-
vt,
|
|
496
|
+
}, ht = [], Pt = /* @__PURE__ */ l(
|
|
498
497
|
mt,
|
|
499
498
|
ft,
|
|
499
|
+
ht,
|
|
500
500
|
!1,
|
|
501
501
|
null,
|
|
502
|
-
"
|
|
502
|
+
"e5b7432e",
|
|
503
503
|
null,
|
|
504
504
|
null
|
|
505
505
|
);
|
|
506
|
-
const
|
|
506
|
+
const Nt = Pt.exports;
|
|
507
507
|
export {
|
|
508
|
-
|
|
508
|
+
Nt as BentoPagination
|
|
509
509
|
};
|
|
510
510
|
//# sourceMappingURL=pagination.js.map
|