@adyen/bento-vue3 1.7.1 → 1.8.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 +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +25 -13
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +319 -96
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +18 -24
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +146 -116
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.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/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/assets/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +53 -51
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.833c2c5d.js → base-button.aa085dfa.js} +2 -2
- package/dist/chunks/{base-button.833c2c5d.js.map → base-button.aa085dfa.js.map} +1 -1
- package/dist/chunks/{base-modal.a113c504.js → base-modal.3dcf8376.js} +119 -105
- package/dist/chunks/base-modal.3dcf8376.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.e89f1375.js → button-actions-with-menu.3f52ea2d.js} +7 -7
- package/dist/chunks/{button-actions-with-menu.e89f1375.js.map → button-actions-with-menu.3f52ea2d.js.map} +1 -1
- package/dist/chunks/{button.c77b7a17.js → button.82ed953e.js} +2 -2
- package/dist/chunks/button.82ed953e.js.map +1 -0
- package/dist/chunks/calendar.d4ab387d.js +1037 -0
- package/dist/chunks/calendar.d4ab387d.js.map +1 -0
- package/dist/chunks/checkbox.03c4b0fe.js +265 -0
- package/dist/chunks/checkbox.03c4b0fe.js.map +1 -0
- package/dist/chunks/controls-group.807b5fb0.js +95 -0
- package/dist/chunks/controls-group.807b5fb0.js.map +1 -0
- package/dist/chunks/{copy.9ad2bf43.js → copy.28bd4298.js} +4 -4
- package/dist/chunks/{copy.9ad2bf43.js.map → copy.28bd4298.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.6eb46615.js → dropdown-default-textbox.74c4584a.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.6eb46615.js.map → dropdown-default-textbox.74c4584a.js.map} +1 -1
- package/dist/chunks/{dropdown.2c65ead9.js → dropdown.502e1f5c.js} +314 -337
- package/dist/chunks/dropdown.502e1f5c.js.map +1 -0
- package/dist/chunks/field-label.61679178.js +132 -0
- package/dist/chunks/field-label.61679178.js.map +1 -0
- package/dist/chunks/{fixed-scroller.a046719e.js → fixed-scroller.92bb77a6.js} +2 -2
- package/dist/chunks/{fixed-scroller.a046719e.js.map → fixed-scroller.92bb77a6.js.map} +1 -1
- package/dist/chunks/{footer-actions.a4a92a80.js → footer-actions.cefaf1e2.js} +3 -3
- package/dist/chunks/{footer-actions.a4a92a80.js.map → footer-actions.cefaf1e2.js.map} +1 -1
- package/dist/chunks/{grid-layout.7c919507.js → grid-layout.c2fe3057.js} +43 -34
- package/dist/chunks/grid-layout.c2fe3057.js.map +1 -0
- package/dist/chunks/{index.70ec4e97.js → index.0ee895e0.js} +2 -2
- package/dist/chunks/{index.70ec4e97.js.map → index.0ee895e0.js.map} +1 -1
- package/dist/chunks/{index.126b4d7a.js → index.7262642e.js} +3 -3
- package/dist/chunks/{index.126b4d7a.js.map → index.7262642e.js.map} +1 -1
- package/dist/chunks/index.726e2f3c.js +339 -0
- package/dist/chunks/index.726e2f3c.js.map +1 -0
- package/dist/chunks/{index.32ef1db1.js → index.75f3672e.js} +2 -2
- package/dist/chunks/{index.32ef1db1.js.map → index.75f3672e.js.map} +1 -1
- package/dist/chunks/{index.c60cc197.js → index.abb2a1d5.js} +3 -3
- package/dist/chunks/{index.c60cc197.js.map → index.abb2a1d5.js.map} +1 -1
- package/dist/chunks/index.b043371e.js +150 -0
- package/dist/chunks/index.b043371e.js.map +1 -0
- package/dist/chunks/{index.70b710b4.js → index.cf0d3be3.js} +19 -17
- package/dist/chunks/{index.70b710b4.js.map → index.cf0d3be3.js.map} +1 -1
- package/dist/chunks/{index.4c081dd4.js → index.d2542c6a.js} +132 -135
- package/dist/chunks/index.d2542c6a.js.map +1 -0
- package/dist/chunks/index.d80206ed.js +10 -0
- package/dist/chunks/index.d80206ed.js.map +1 -0
- package/dist/chunks/index.e9156fe3.js +817 -0
- package/dist/chunks/index.e9156fe3.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.67ee5da8.js → listbox-option-tag.5b00c85f.js} +3 -3
- package/dist/chunks/{listbox-option-tag.67ee5da8.js.map → listbox-option-tag.5b00c85f.js.map} +1 -1
- package/dist/chunks/{listbox.70dc835e.js → listbox.d07c24e6.js} +4 -4
- package/dist/chunks/{listbox.70dc835e.js.map → listbox.d07c24e6.js.map} +1 -1
- package/dist/chunks/loading-button.ad7cfaee.js +108 -0
- package/dist/chunks/loading-button.ad7cfaee.js.map +1 -0
- package/dist/chunks/{tooltip.f37cc883.js → tooltip.054d2eb6.js} +3 -3
- package/dist/chunks/{tooltip.f37cc883.js.map → tooltip.054d2eb6.js.map} +1 -1
- 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 +847 -820
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +114 -138
- 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 +4 -4
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +17 -16
- 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 +76 -80
- package/dist/header.js.map +1 -1
- package/dist/index.js +207 -205
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +137 -159
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +14 -13
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -359
- package/dist/popover.js.map +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/segmented-control.js +2 -2
- 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 +4 -4
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +125 -149
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +312 -229
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +49 -49
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -120
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.a113c504.js.map +0 -1
- package/dist/chunks/button.c77b7a17.js.map +0 -1
- package/dist/chunks/calendar.c87d4445.js +0 -898
- package/dist/chunks/calendar.c87d4445.js.map +0 -1
- package/dist/chunks/checkbox.5d2e26b9.js +0 -235
- package/dist/chunks/checkbox.5d2e26b9.js.map +0 -1
- package/dist/chunks/controls-group.e9341830.js +0 -136
- package/dist/chunks/controls-group.e9341830.js.map +0 -1
- package/dist/chunks/dropdown.2c65ead9.js.map +0 -1
- package/dist/chunks/error-message.d66968dd.js +0 -49
- package/dist/chunks/error-message.d66968dd.js.map +0 -1
- package/dist/chunks/grid-layout.7c919507.js.map +0 -1
- package/dist/chunks/index.1f97d7e1.js +0 -734
- package/dist/chunks/index.1f97d7e1.js.map +0 -1
- package/dist/chunks/index.4c081dd4.js.map +0 -1
- package/dist/chunks/index.f9c4b579.js +0 -134
- package/dist/chunks/index.f9c4b579.js.map +0 -1
- package/dist/chunks/loading-button.bc08f016.js +0 -109
- package/dist/chunks/loading-button.bc08f016.js.map +0 -1
package/dist/button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../vue2/src/components/button/components/button-actions/button-actions.types.ts","../../vue2/src/components/button/components/button-actions/button-actions.vue"],"sourcesContent":["import type { VueNodeElement } from '@/types';\nimport type { BentoButtonProps, BentoLoadingButtonState } from '@/components/button';\n\nexport interface BentoButtonActionObject extends BentoButtonProps {\n title: string;\n event
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../vue2/src/components/button/components/button-actions/button-actions.types.ts","../../vue2/src/components/button/components/button-actions/button-actions.vue"],"sourcesContent":["import type { VueNodeElement } from '@/types';\nimport type { BentoButtonProps, BentoLoadingButtonState } from '@/components/button';\n\nexport interface BentoButtonActionObject extends BentoButtonProps {\n title: string;\n event?: (event: Event) => void;\n icon?: VueNodeElement;\n state?: BentoLoadingButtonState | `${BentoLoadingButtonState}`;\n}\n\nexport type BentoButtonActionsList = Array<BentoButtonActionObject>;\n\nexport enum BentoButtonActionsLayoutBasic {\n BUTTONS_END = 'buttons-end',\n FILL_CONTAINER = 'fill-container',\n SPACE_BETWEEN = 'space-between',\n VERTICAL_STACK = 'vertical-stack',\n}\nexport enum BentoButtonActionsLayoutExtended {\n BUTTONS_START = 'buttons-start',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport const BentoButtonActionsLayout = { ...BentoButtonActionsLayoutBasic, ...BentoButtonActionsLayoutExtended };\nexport type BentoButtonActionsLayout = BentoButtonActionsLayoutBasic | BentoButtonActionsLayoutExtended;\n","<template>\n <div class=\"b-button-actions\">\n <div class=\"b-button-actions__container-wrapper\" :class=\"conditionalClasses\" role=\"group\">\n <div v-for=\"(button, index) in reversedActionsList\" :key=\"index\" class=\"b-button-actions__button-wrapper\">\n <bento-loading-button\n v-if=\"button.state\"\n :state=\"button.state\"\n :disabled=\"button.disabled\"\n :inverse=\"inverse\"\n :variant=\"button.variant || generateButtonVariantByIndex(index)\"\n v-on=\"generateButtonEvents(button)\"\n >\n {{ button.title }}\n </bento-loading-button>\n <bento-button\n v-else\n :critical=\"button.critical\"\n :disabled=\"button.disabled\"\n :inverse=\"inverse\"\n :variant=\"button.variant || generateButtonVariantByIndex(index)\"\n :link=\"button.link\"\n v-on=\"generateButtonEvents(button)\"\n >\n <template v-if=\"button.icon\" #iconLeft>\n <component :is=\"button.icon\" :svg-title=\"button.title\"></component>\n </template>\n {{ button.title }}\n </bento-button>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoButtonVariant } from '@/core/components/button/button.types';\n import BentoButton from '../../button.vue';\n import { BentoButtonActionObject, BentoButtonActionsLayout, BentoButtonActionsList } from './button-actions.types';\n import { BentoLoadingButton } from '../loading-button';\n\n export default defineComponent({\n name: 'bento-button-actions',\n components: { BentoButton, BentoLoadingButton },\n props: {\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` (optional): 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 * ```\n * [{\n * title: 'Primary',\n * event: () => { ... },\n * icon: FourPeopleIcon,\n * link: {\n variant: 'default',\n external: true,\n to: 'https://www.adyen.com/'\n },\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * disabled: true,\n * variant: BentoButtonVariant.PRIMARY,\n * critical: true\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n required: true,\n },\n\n /**\n * Defines the layout in which the button actions is presented.\n * It can be one of:\n *\n * @values BUTTONS_START\n * @values BUTTONS_END\n * @values FILL_CONTAINER\n * @values SPACE_BETWEEN\n * @values VERTICAL_STACK\n */\n layout: {\n type: String as PropType<BentoButtonActionsLayout | `${BentoButtonActionsLayout}`>,\n default: BentoButtonActionsLayout.BUTTONS_END,\n validator: (layout: BentoButtonActionsLayout) =>\n Object.values(BentoButtonActionsLayout).includes(layout),\n },\n\n /**\n * Sets the Button Actions to color scheme inverse\n */\n inverse: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n const reversedActionsList = computed(() => props.actions.slice().reverse());\n const generateButtonVariantByIndex = actionIndex => {\n const lastActionIndex = props.actions.length - 1;\n return actionIndex === lastActionIndex ? BentoButtonVariant.PRIMARY : BentoButtonVariant.SECONDARY;\n };\n\n const conditionalClasses = computed(() => ({\n [`b-button-actions--${props.layout}`]: true,\n }));\n\n const generateButtonEvents = (button: BentoButtonActionObject) =>\n button?.event !== undefined\n ? {\n click: button.event,\n }\n : {};\n\n return {\n // Values\n conditionalClasses,\n reversedActionsList,\n\n // Methods\n generateButtonEvents,\n generateButtonVariantByIndex,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./button-actions.scss\" />\n"],"names":["BentoButtonActionsLayoutBasic","BentoButtonActionsLayoutBasic2","BentoButtonActionsLayoutExtended","BentoButtonActionsLayoutExtended2","BentoButtonActionsLayout","_sfc_main","defineComponent","BentoButton","BentoLoadingButton","layout","props","reversedActionsList","computed","generateButtonVariantByIndex","actionIndex","lastActionIndex","BentoButtonVariant","button","openBlock","createElementBlock","_hoisted_1","createElementVNode","normalizeClass","_ctx","index","createBlock","_component_bento_loading_button","mergeProps","toHandlers","withCtx","createSlots","resolveDynamicComponent"],"mappings":";;;;;;;AAYY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,eACAA,EAAA,iBAAA,kBACAA,EAAA,gBAAA,iBACAA,EAAA,iBAAA,kBAJQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,gBAAA,iBADQA,IAAAD,KAAA,CAAA,CAAA;AAOL,MAAAE,IAAA,EAAA,GAAAJ,GAAA,GAAAE,EAAA,GCeHG,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,aAAAC,GAAA,oBAAAC,EAAA;AAAA,EACwC,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAA,SAAAC,EAAA,GAAAO,EAAAC,GAAAC,EAAA;AAAA,UAAY,KAAA;AAAA,UACnB,OAAAV,EAAA;AAAA,UACS,UAAAA,EAAA;AAAA,UACO,SAAAM,EAAA;AAAA,UACkB,SAAAN,EAAA,WAAAM,EAAA,6BAAAC,CAAA;AAAA,QAEjB,GAAAI,EAAAL,EAAA,qBAAAN,CAAA,CAAA,CAAA,GAAA;AAAA,UAAH,SAAAY,EAAA,MAAA;AAAA;;;;UAIW,KAAA;AAAA,UACzB,UAAAZ,EAAA;AAAA,UACS,UAAAA,EAAA;AAAA,UACO,SAAAM,EAAA;AAAA,UACH,SAAAN,EAAA,WAAAM,EAAA,6BAAAC,CAAA;AAAA,UACmB,MAAAP,EAAA;AAAA,QAKjC,GAAAW,EAAAL,EAAA,qBAAAN,CAAA,CAAA,CAAA,GAAAa,EAAA;AAAA,UAAe,SAAAD,EAAA,MAAA;AAAA;;UAHC,GAAA;AAAA,QAAA,GAAA;AAAA;;;eAC6BX,EAAA,GAAAO,EAAAM,EAAAd,EAAA,IAAA,GAAA;AAAA;;;;;;;;;;;"}
|
package/dist/card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as j, ref as A, watch as B, computed as a, resolveComponent as v, openBlock as t, createElementBlock as r, normalizeClass as b, renderSlot as p, createCommentVNode as s, withKeys as L, createElementVNode as m, createBlock as C, mergeProps as F, withCtx as f, createVNode as T, Transition as P, normalizeStyle as V } from "vue";
|
|
2
|
-
import { B as Y } from "./chunks/index.
|
|
2
|
+
import { B as Y } from "./chunks/index.75f3672e.js";
|
|
3
3
|
import { a as K, C as q } from "./chunks/chevron-up.9bf21068.js";
|
|
4
4
|
import { u as G } from "./chunks/use-has-slot.4d98bf29.js";
|
|
5
5
|
import { g as J } from "./chunks/unique-id.a2a2b458.js";
|
|
@@ -8,7 +8,7 @@ import { o as X } from "./chunks/resize.a041304d.js";
|
|
|
8
8
|
import { u as Z } from "./chunks/use-expandable-content-height.62fc84e5.js";
|
|
9
9
|
import { BentoButtonActions as ee, BentoButtonActionsLayout as H } from "./button.js";
|
|
10
10
|
import { _ as ae } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
11
|
-
import "./assets/
|
|
11
|
+
import "./assets/index3.css";
|
|
12
12
|
var _ = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e))(_ || {}), h = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.SMALL = "small", e))(h || {});
|
|
13
13
|
const I = {
|
|
14
14
|
"en-US": {
|
package/dist/checkbox.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { B as v, b as l } from "./chunks/checkbox.
|
|
2
|
-
import { a as X } from "./chunks/checkbox.
|
|
1
|
+
import { B as v, b as l } from "./chunks/checkbox.03c4b0fe.js";
|
|
2
|
+
import { a as X } from "./chunks/checkbox.03c4b0fe.js";
|
|
3
3
|
import { defineComponent as E, toRef as _, computed as u, ref as C, watch as B, resolveComponent as p, openBlock as t, createElementBlock as f, createVNode as S, normalizeClass as I, withCtx as c, Fragment as V, renderList as G, createBlock as g, createSlots as M, createTextVNode as y, toDisplayString as k, createCommentVNode as T } from "vue";
|
|
4
4
|
import { g as w } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
-
import { d as L } from "./chunks/index.
|
|
5
|
+
import { d as L } from "./chunks/index.75f3672e.js";
|
|
6
6
|
import { u as x } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
7
|
-
import { C as A } from "./chunks/controls-group.
|
|
8
|
-
import { E as U } from "./chunks/
|
|
7
|
+
import { C as A } from "./chunks/controls-group.807b5fb0.js";
|
|
8
|
+
import { E as U } from "./chunks/field-label.61679178.js";
|
|
9
9
|
import { _ as N } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
10
|
-
import "./assets/
|
|
10
|
+
import "./assets/index5.css";
|
|
11
11
|
var s = /* @__PURE__ */ ((e) => (e.HORIZONTAL = "horizontal", e.VERTICAL = "vertical", e))(s || {});
|
|
12
12
|
const O = E({
|
|
13
13
|
name: "bento-checkbox-group",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as B, computed as C, ref as y, resolveComponent as _, openBlock as r, createElementBlock as l, normalizeClass as m, renderSlot as u, createCommentVNode as d, createBlock as S, withCtx as k } from "vue";
|
|
2
|
-
import { B as g } from "./index.
|
|
2
|
+
import { B as g } from "./index.75f3672e.js";
|
|
3
3
|
import { u as h } from "./use-has-slot.4d98bf29.js";
|
|
4
4
|
import { _ as L } from "./_plugin-vue_export-helper.dad06003.js";
|
|
5
5
|
import "../assets/base-button.css";
|
|
@@ -113,4 +113,4 @@ export {
|
|
|
113
113
|
T as B,
|
|
114
114
|
n as a
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=base-button.
|
|
116
|
+
//# sourceMappingURL=base-button.aa085dfa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-button.
|
|
1
|
+
{"version":3,"file":"base-button.aa085dfa.js","sources":["../../../vue2/src/components/internal/base-button/base-button.types.ts","../../../vue2/src/components/internal/base-button/base-button.vue"],"sourcesContent":["export enum BentoBaseButtonPropClass {\n DESTRUCTIVE = 'critical',\n ICON_ONLY = 'icon-only',\n}\n\nexport enum BentoBaseButtonEvent {\n BLUR = 'blur',\n CLICK = 'click',\n FOCUS = 'focus',\n KEYDOWN_ESC = 'keydown.esc',\n}\n\nexport enum BaseButtonType {\n BUTTON = 'button',\n RESET = 'reset',\n SUBMIT = 'submit',\n}\n","<template>\n <button\n ref=\"bentoBaseButtonRef\"\n class=\"b-base-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :type=\"type\"\n :aria-expanded=\"ariaAttributes['aria-expanded']\"\n @click=\"onClickButton\"\n @focus=\"onFocusButton\"\n @blur=\"onBlurButton\"\n >\n <span v-if=\"hasSlot('iconLeft')\" class=\"b-base-button__icon-left\" data-testid=\"icon-button-left\">\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-base-button__label\">\n <slot />\n </bento-typography>\n <span v-if=\"hasSlot('iconRight')\" class=\"b-base-button__icon-right\" data-testid=\"icon-button-right\">\n <slot name=\"iconRight\" />\n </span>\n </button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoBaseButtonEvent, BentoBaseButtonPropClass } from './base-button.types';\n import type { ButtonHTMLAttributes } from 'vue/types/jsx';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { Booleanish } from '@/types';\n\n /**\n * Base button component to use as a base for all the various types of bento buttons. For internal use only.\n *\n * * @example\n * import { BaseButton, BaseButtonEvent } from '@/components/internal/base-button';\n * import YourImportedIcon from @adyen/ui-assets-icons-16/example-icon';\n *\n * export default {\n * components: { BaseButton, YourImportedIcon },\n * props: {\n * text:\n * },\n * template: `\n * <base-button class=\"your-custom-button-styles\" @click=\"onClick\">\n * <template #iconLeft><your-imported-icon></template>\n * Button text\n * <template #iconRight><your-imported-icon></template>\n * </base-button>\n * `,\n * emits: [BentoButtonEvent.CLICK],\n * setup: (prps, { emit }) => {\n * const onClick = value => emit(BaseButtonEvent.CLICK, value);\n *\n * return {\n * onClick,\n * };\n * }\n * }\n */\n export default defineComponent({\n name: 'base-button',\n components: { BentoTypography },\n props: {\n /**\n * Disables button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n },\n emits: [\n BentoBaseButtonEvent.CLICK,\n BentoBaseButtonEvent.FOCUS,\n BentoBaseButtonEvent.BLUR,\n BentoBaseButtonEvent.KEYDOWN_ESC,\n ],\n setup(props, { slots, emit, attrs }) {\n const ariaAttributes = computed(() => ({\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const bentoBaseButtonRef = ref(null);\n\n const conditionalClasses = computed(() => ({\n [`b-base-button--${BentoBaseButtonPropClass.DESTRUCTIVE}`]: props.critical,\n [`b-base-button--${BentoBaseButtonPropClass.ICON_ONLY}`]: !slots.default,\n }));\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK, e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const onFocusButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.FOCUS, e);\n };\n\n const onBlurButton = (e: FocusEvent) => {\n emit(BentoBaseButtonEvent.BLUR, e);\n };\n\n return {\n // Values\n ariaAttributes,\n conditionalClasses,\n\n // Methods\n onClickButton,\n onFocusButton,\n onBlurButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n bentoBaseButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-button.scss\" />\n"],"names":["BentoBaseButtonPropClass","BentoBaseButtonPropClass2","BentoBaseButtonEvent","BentoBaseButtonEvent2","_sfc_main","defineComponent","BentoTypography","props","slots","emit","attrs","ariaAttributes","computed","_a","bentoBaseButtonRef","ref","conditionalClasses","e","useHasSlot","openBlock","createElementBlock","normalizeClass","_ctx","_cache","args","createCommentVNode","createBlock","_component_bento_typography","_hoisted_3"],"mappings":";;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,cAAA,YACAA,EAAA,YAAA,aAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,OAAA,QACAA,EAAA,QAAA,SACAA,EAAA,QAAA,SACAA,EAAA,cAAA,eAJQA,IAAAD,KAAA,CAAA,CAAA;ACwDR,MAAAE,IAAAC,EAAA;AAAA,EAA+B,MAAA;AAAA,EACrB,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACwB,OAAA;AAAA;AAAA;A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B,OAAA;AAAA;;EAM1B,KAAA;AAAA,EAA4B,OAAA;AAAA;;;;AAf/D,SAAAK,EAAA,GAAAC,EAAA,UAAA;AAAA,IACG,KAAA;AAAA,IACP,OAAAC,EAAA,CAAA,iBAAAC,EAAA,kBAAA,CAAA;AAAA,IACU,UAAAA,EAAA;AAAA,IACG,MAAAA,EAAA;AAAA,IACR,iBAAAA,EAAA,eAAA,eAAA;AAAA,IACE,SAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA,IACW,SAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAF,EAAA,iBAAAA,EAAA,cAAA,GAAAE,CAAA;AAAA;EAEA,GAAA;AAAA;;IAGK,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAELH,EAAA,QAAA,SAAA,KAAAH,EAAA,GAAAO,EAAAC,GAAA;AAAA,MAFkC,KAAA;AAAA,MAAC,IAAA;AAAA,MAAe,SAAA;AAAA,MAAe,UAAA;AAAA;;;;;;;IAGpFL,EAAA,QAAA,WAAA,KAAAH,EAAA,GAAAC,EAAA,QAAAQ,GAAA;AAAA;;;;;"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { B as
|
|
3
|
-
import { a as
|
|
4
|
-
import { BentoDivider as
|
|
5
|
-
import { B as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { C as
|
|
9
|
-
import { G as
|
|
10
|
-
import { _ as
|
|
1
|
+
import { defineComponent as K, useAttrs as V, ref as I, computed as i, watch as R, onMounted as W, resolveComponent as m, openBlock as l, createElementBlock as h, createElementVNode as f, normalizeClass as T, withKeys as H, createVNode as S, withCtx as c, normalizeStyle as E, renderSlot as _, createCommentVNode as d, createBlock as y } from "vue";
|
|
2
|
+
import { B as Q } from "./index.75f3672e.js";
|
|
3
|
+
import { a as Y } from "./button.82ed953e.js";
|
|
4
|
+
import { BentoDivider as j } from "../divider.js";
|
|
5
|
+
import { B as J } from "./index.cf0d3be3.js";
|
|
6
|
+
import { u as X } from "./use-has-slot.4d98bf29.js";
|
|
7
|
+
import { u as Z } from "./i18n.6c402773.js";
|
|
8
|
+
import { C as x } from "./cross.5c36a670.js";
|
|
9
|
+
import { G as ee, a as oe } from "./grid-layout.c2fe3057.js";
|
|
10
|
+
import { _ as te } from "./_plugin-vue_export-helper.dad06003.js";
|
|
11
11
|
import "../assets/base-modal.css";
|
|
12
|
-
var
|
|
13
|
-
const
|
|
12
|
+
var ae = /* @__PURE__ */ ((e) => (e.DEFAULT = "BentoModalDefault", e.DIALOG = "BentoModalDialog", e))(ae || {}), O = /* @__PURE__ */ ((e) => (e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large", e))(O || {}), v = /* @__PURE__ */ ((e) => (e.SMALLER = "smaller", e.EQUAL = "equal", e.BIGGER = "bigger", e))(v || {}), M = /* @__PURE__ */ ((e) => (e.DIALOG = "dialog", e.ALERT_DIALOG = "alertdialog", e))(M || {}), ne = /* @__PURE__ */ ((e) => (e.CONFIRMATION = "confirmation", e.DESTRUCTIVE = "destructive", e.INFO = "info", e.ACKNOWLEDGEMENT = "acknowledgement", e))(ne || {}), B = /* @__PURE__ */ ((e) => (e.CLOSE_MODAL = "close-modal", e))(B || {});
|
|
13
|
+
const P = {
|
|
14
14
|
"en-US": {
|
|
15
|
-
ariaLabelFallback: "modal"
|
|
15
|
+
ariaLabelFallback: "modal",
|
|
16
|
+
close: "Close"
|
|
16
17
|
}
|
|
17
|
-
},
|
|
18
|
-
i18n: { messages:
|
|
18
|
+
}, se = 500, le = K({
|
|
19
|
+
i18n: { messages: P },
|
|
19
20
|
name: "base-modal",
|
|
20
|
-
components: { CrossIcon:
|
|
21
|
+
components: { CrossIcon: x, BentoTypography: Q, BentoButton: Y, BentoDivider: j, BentoFocusTrap: J, GridLayout: ee },
|
|
21
22
|
props: {
|
|
22
23
|
/**
|
|
23
24
|
* List of actions that will be used to render the buttons.
|
|
@@ -56,7 +57,7 @@ const T = {
|
|
|
56
57
|
*/
|
|
57
58
|
columnsSize: {
|
|
58
59
|
type: String,
|
|
59
|
-
default:
|
|
60
|
+
default: v.SMALLER
|
|
60
61
|
},
|
|
61
62
|
/**
|
|
62
63
|
* If provided, manages the padding of the whole modal container
|
|
@@ -98,111 +99,121 @@ const T = {
|
|
|
98
99
|
*/
|
|
99
100
|
withColumnLayout: { type: Boolean, default: !1 }
|
|
100
101
|
},
|
|
101
|
-
emits: [
|
|
102
|
-
setup(e, { slots:
|
|
103
|
-
const { t:
|
|
102
|
+
emits: [B.CLOSE_MODAL],
|
|
103
|
+
setup(e, { slots: n, emit: k }) {
|
|
104
|
+
const { t: p } = Z({ messages: P }), w = V(), r = X(n), t = I(null), u = I(!1), L = i(() => e.isDismissible && !e.hideCloseButton), C = i(() => {
|
|
104
105
|
if (!e.customPadding)
|
|
105
106
|
return {};
|
|
106
107
|
const o = {
|
|
107
108
|
paddingLeft: e.customPadding,
|
|
108
109
|
paddingRight: e.customPadding
|
|
109
110
|
}, s = { ...o, paddingTop: void 0, paddingBottom: void 0 };
|
|
110
|
-
return
|
|
111
|
+
return r("default") || (s.paddingTop = e.customPadding), r("actions") || (s.paddingBottom = e.customPadding), {
|
|
111
112
|
header: { ...o, paddingTop: e.customPadding },
|
|
112
113
|
content: s,
|
|
113
114
|
actions: { ...o, paddingBottom: e.customPadding }
|
|
114
115
|
};
|
|
115
|
-
}),
|
|
116
|
-
() =>
|
|
117
|
-
), b =
|
|
116
|
+
}), A = i(
|
|
117
|
+
() => w["aria-label"] ?? p("ariaLabelFallback")
|
|
118
|
+
), b = i(() => e.withColumnLayout && e.size === O.LARGE), a = () => {
|
|
118
119
|
t.value.showModal();
|
|
119
|
-
},
|
|
120
|
-
B
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
},
|
|
124
|
-
t.value.open && (
|
|
120
|
+
}, D = () => {
|
|
121
|
+
k(B.CLOSE_MODAL);
|
|
122
|
+
}, N = () => {
|
|
123
|
+
u.value && (t.value.close(), D(), u.value = !1);
|
|
124
|
+
}, g = () => {
|
|
125
|
+
t.value.open && (u.value = !0);
|
|
125
126
|
}, G = (o) => {
|
|
126
|
-
o && o.preventDefault(), e.isDismissible &&
|
|
127
|
-
},
|
|
127
|
+
o && o.preventDefault(), e.isDismissible && g();
|
|
128
|
+
}, $ = ({ target: o }) => {
|
|
128
129
|
o && o.tagName === M.DIALOG.toUpperCase() && G();
|
|
129
|
-
},
|
|
130
|
+
}, F = i(() => ({
|
|
130
131
|
[`b-modal-base__container--${e.size}`]: e.size,
|
|
131
|
-
"b-modal-base__container--hide":
|
|
132
|
+
"b-modal-base__container--hide": u.value,
|
|
132
133
|
"b-modal-base__container--overflow-visible": e.overflowVisible,
|
|
133
134
|
"b-modal-base__container--column-layout": b.value
|
|
134
|
-
})),
|
|
135
|
+
})), z = i(() => ({
|
|
135
136
|
"b-modal-base__content--column-layout": b.value,
|
|
136
|
-
"b-modal-base__content--with-header":
|
|
137
|
-
"b-modal-base__content--with-actions":
|
|
138
|
-
})),
|
|
139
|
-
|
|
137
|
+
"b-modal-base__content--with-header": r("default"),
|
|
138
|
+
"b-modal-base__content--with-actions": r("actions")
|
|
139
|
+
})), U = i(() => e.columnsSize === v.SMALLER ? [
|
|
140
|
+
{ small: 4, medium: 4, large: 4 },
|
|
141
|
+
{ small: 8, medium: 8, large: 8 }
|
|
142
|
+
] : e.columnsSize === v.BIGGER ? [
|
|
143
|
+
{ small: 8, medium: 8, large: 8 },
|
|
144
|
+
{ small: 4, medium: 4, large: 4 }
|
|
145
|
+
] : [
|
|
146
|
+
{ small: 6, medium: 6, large: 6 },
|
|
147
|
+
{ small: 6, medium: 6, large: 6 }
|
|
148
|
+
]);
|
|
149
|
+
return R(
|
|
140
150
|
() => [e.isOpen, t.value],
|
|
141
|
-
([o, s], [,
|
|
151
|
+
([o, s], [, q]) => {
|
|
142
152
|
if (!s)
|
|
143
153
|
return;
|
|
144
|
-
o ?
|
|
154
|
+
o ? a() : !q || g();
|
|
145
155
|
}
|
|
146
|
-
),
|
|
156
|
+
), R(
|
|
147
157
|
() => e.actions,
|
|
148
158
|
() => {
|
|
149
159
|
var o, s;
|
|
150
|
-
((s = (o = e.actions) == null ? void 0 : o[0]) == null ? void 0 : s.state) === "success" && setTimeout(
|
|
160
|
+
((s = (o = e.actions) == null ? void 0 : o[0]) == null ? void 0 : s.state) === "success" && setTimeout(g, se);
|
|
151
161
|
},
|
|
152
162
|
{ deep: !0 }
|
|
153
|
-
),
|
|
154
|
-
e.isOpen && t.value &&
|
|
163
|
+
), W(() => {
|
|
164
|
+
e.isOpen && t.value && a();
|
|
155
165
|
}), {
|
|
156
166
|
// Refs
|
|
157
167
|
modal: t,
|
|
158
|
-
computedAriaLabel:
|
|
168
|
+
computedAriaLabel: A,
|
|
169
|
+
showCloseButton: L,
|
|
159
170
|
// Handling the state
|
|
160
|
-
openModal:
|
|
161
|
-
closeModalOnClickOutside:
|
|
162
|
-
closeModalAfterAnimation:
|
|
163
|
-
startCloseModalAnimation:
|
|
171
|
+
openModal: a,
|
|
172
|
+
closeModalOnClickOutside: $,
|
|
173
|
+
closeModalAfterAnimation: N,
|
|
174
|
+
startCloseModalAnimation: g,
|
|
164
175
|
// Methods
|
|
165
176
|
internalModalActionClose: G,
|
|
166
|
-
hasSlot:
|
|
167
|
-
emitCloseEvent:
|
|
168
|
-
t:
|
|
177
|
+
hasSlot: r,
|
|
178
|
+
emitCloseEvent: D,
|
|
179
|
+
t: p,
|
|
169
180
|
// Styles
|
|
170
|
-
modalConditionalClasses:
|
|
171
|
-
modalContentConditionalClasses:
|
|
172
|
-
customPaddingStyles:
|
|
181
|
+
modalConditionalClasses: F,
|
|
182
|
+
modalContentConditionalClasses: z,
|
|
183
|
+
customPaddingStyles: C,
|
|
173
184
|
hasColumnLayout: b,
|
|
174
|
-
computedColumnWidth:
|
|
185
|
+
computedColumnWidth: U,
|
|
175
186
|
// Enums
|
|
176
|
-
GridLayoutContainerType:
|
|
187
|
+
GridLayoutContainerType: oe
|
|
177
188
|
};
|
|
178
189
|
}
|
|
179
190
|
});
|
|
180
|
-
const
|
|
191
|
+
const ie = { class: "b-modal-base" }, de = ["role", "aria-label", "open"], re = { class: "b-modal-base__wrapper" }, ue = { class: "b-modal-base__header" }, me = {
|
|
181
192
|
"aria-label": "modal actions",
|
|
182
193
|
class: "b-modal-base__actions"
|
|
183
194
|
};
|
|
184
|
-
function ce(e,
|
|
185
|
-
const t =
|
|
186
|
-
return l(), h("div",
|
|
187
|
-
|
|
195
|
+
function ce(e, n, k, p, w, r) {
|
|
196
|
+
const t = m("bento-typography"), u = m("cross-icon"), L = m("bento-button"), C = m("bento-divider"), A = m("grid-layout"), b = m("bento-focus-trap");
|
|
197
|
+
return l(), h("div", ie, [
|
|
198
|
+
f("dialog", {
|
|
188
199
|
ref: "modal",
|
|
189
200
|
role: e.modalRole,
|
|
190
201
|
"aria-label": e.computedAriaLabel,
|
|
191
|
-
class:
|
|
202
|
+
class: T(["b-modal-base__container", e.modalConditionalClasses]),
|
|
192
203
|
open: e.initiallyOpen,
|
|
193
|
-
onAnimationend:
|
|
194
|
-
onClick:
|
|
195
|
-
onKeydown:
|
|
204
|
+
onAnimationend: n[0] || (n[0] = (...a) => e.closeModalAfterAnimation && e.closeModalAfterAnimation(...a)),
|
|
205
|
+
onClick: n[1] || (n[1] = (a) => e.isDismissible && e.closeModalOnClickOutside(a)),
|
|
206
|
+
onKeydown: n[2] || (n[2] = H((...a) => e.internalModalActionClose && e.internalModalActionClose(...a), ["esc"]))
|
|
196
207
|
}, [
|
|
197
|
-
S(
|
|
198
|
-
default:
|
|
199
|
-
|
|
200
|
-
e.hasSlot("default") ||
|
|
208
|
+
S(b, null, {
|
|
209
|
+
default: c(() => [
|
|
210
|
+
f("div", re, [
|
|
211
|
+
e.hasSlot("default") || e.showCloseButton ? (l(), h("div", {
|
|
201
212
|
key: 0,
|
|
202
213
|
class: "b-modal-base__header-container",
|
|
203
214
|
style: E(e.customPaddingStyles.header)
|
|
204
215
|
}, [
|
|
205
|
-
|
|
216
|
+
f("div", ue, [
|
|
206
217
|
S(t, {
|
|
207
218
|
class: "b-modal-base__title",
|
|
208
219
|
"aria-label": "base modal title",
|
|
@@ -210,87 +221,90 @@ function ce(e, a, B, L, D, d) {
|
|
|
210
221
|
variant: "title",
|
|
211
222
|
stronger: ""
|
|
212
223
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
e.hasSlot("default") ?
|
|
224
|
+
default: c(() => [
|
|
225
|
+
e.hasSlot("default") ? _(e.$slots, "default", { key: 0 }, void 0, !0) : d("", !0)
|
|
215
226
|
]),
|
|
216
227
|
_: 3
|
|
217
228
|
}),
|
|
218
|
-
e.
|
|
229
|
+
e.showCloseButton ? (l(), y(L, {
|
|
219
230
|
key: 0,
|
|
220
231
|
class: "b-modal-base__close-button",
|
|
221
232
|
variant: "tertiary",
|
|
222
233
|
type: "button",
|
|
223
234
|
onClick: e.internalModalActionClose
|
|
224
235
|
}, {
|
|
225
|
-
default:
|
|
226
|
-
S(
|
|
236
|
+
default: c(() => [
|
|
237
|
+
S(u, {
|
|
238
|
+
"svg-title": e.t("close")
|
|
239
|
+
}, null, 8, ["svg-title"])
|
|
227
240
|
]),
|
|
228
241
|
_: 1
|
|
229
|
-
}, 8, ["onClick"]))
|
|
242
|
+
}, 8, ["onClick"])) : d("", !0)
|
|
230
243
|
]),
|
|
231
|
-
e.hasColumnLayout ? (l(),
|
|
244
|
+
e.hasColumnLayout ? (l(), y(C, {
|
|
232
245
|
key: 0,
|
|
233
246
|
class: "b-modal-base__divider"
|
|
234
|
-
})) :
|
|
235
|
-
], 4)) :
|
|
236
|
-
|
|
237
|
-
class:
|
|
247
|
+
})) : d("", !0)
|
|
248
|
+
], 4)) : d("", !0),
|
|
249
|
+
f("div", {
|
|
250
|
+
class: T(["b-modal-base__content", e.modalContentConditionalClasses]),
|
|
238
251
|
style: E(e.customPaddingStyles.content)
|
|
239
252
|
}, [
|
|
240
|
-
e.hasSlot("content") || e.hasSlot("content-col-1") && e.hasSlot("content-col-2") ? (l(),
|
|
253
|
+
e.hasSlot("content") || e.hasSlot("content-col-1") && e.hasSlot("content-col-2") ? (l(), y(t, {
|
|
241
254
|
key: 0,
|
|
242
255
|
"aria-label": "base modal content",
|
|
243
256
|
el: "div",
|
|
244
257
|
variant: "body",
|
|
245
258
|
stronger: ""
|
|
246
259
|
}, {
|
|
247
|
-
default:
|
|
248
|
-
e.hasColumnLayout ? (l(),
|
|
260
|
+
default: c(() => [
|
|
261
|
+
e.hasColumnLayout ? (l(), y(A, {
|
|
249
262
|
key: 0,
|
|
250
263
|
"column-width": e.computedColumnWidth,
|
|
251
264
|
"container-type": e.GridLayoutContainerType.NORMAL,
|
|
265
|
+
"no-gap": "",
|
|
252
266
|
class: "b-modal-base__grid"
|
|
253
267
|
}, {
|
|
254
|
-
"col-1":
|
|
255
|
-
|
|
268
|
+
"col-1": c(() => [
|
|
269
|
+
_(e.$slots, "content-col-1", {}, void 0, !0)
|
|
256
270
|
]),
|
|
257
|
-
"col-2":
|
|
258
|
-
|
|
271
|
+
"col-2": c(() => [
|
|
272
|
+
_(e.$slots, "content-col-2", {}, void 0, !0)
|
|
259
273
|
]),
|
|
260
274
|
_: 3
|
|
261
|
-
}, 8, ["column-width", "container-type"])) :
|
|
275
|
+
}, 8, ["column-width", "container-type"])) : _(e.$slots, "content", { key: 1 }, void 0, !0)
|
|
262
276
|
]),
|
|
263
277
|
_: 3
|
|
264
|
-
})) :
|
|
278
|
+
})) : d("", !0)
|
|
265
279
|
], 6),
|
|
266
280
|
e.hasSlot("actions") ? (l(), h("div", {
|
|
267
281
|
key: 1,
|
|
268
282
|
class: "b-modal-base__actions-container",
|
|
269
283
|
style: E(e.customPaddingStyles.actions)
|
|
270
284
|
}, [
|
|
271
|
-
e.hasColumnLayout ? (l(),
|
|
285
|
+
e.hasColumnLayout ? (l(), y(C, {
|
|
272
286
|
key: 0,
|
|
273
287
|
class: "b-modal-base__divider"
|
|
274
|
-
})) :
|
|
275
|
-
|
|
276
|
-
|
|
288
|
+
})) : d("", !0),
|
|
289
|
+
f("div", me, [
|
|
290
|
+
_(e.$slots, "actions", {}, void 0, !0)
|
|
277
291
|
])
|
|
278
|
-
], 4)) :
|
|
292
|
+
], 4)) : d("", !0)
|
|
279
293
|
])
|
|
280
294
|
]),
|
|
281
295
|
_: 3
|
|
282
296
|
})
|
|
283
|
-
], 42,
|
|
297
|
+
], 42, de)
|
|
284
298
|
]);
|
|
285
299
|
}
|
|
286
|
-
const
|
|
300
|
+
const Se = /* @__PURE__ */ te(le, [["render", ce], ["__scopeId", "data-v-06699875"]]);
|
|
287
301
|
export {
|
|
288
|
-
|
|
302
|
+
ae as B,
|
|
289
303
|
O as a,
|
|
290
|
-
|
|
304
|
+
v as b,
|
|
291
305
|
M as c,
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
306
|
+
ne as d,
|
|
307
|
+
B as e,
|
|
308
|
+
Se as f
|
|
295
309
|
};
|
|
296
|
-
//# sourceMappingURL=base-modal.
|
|
310
|
+
//# sourceMappingURL=base-modal.3dcf8376.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-modal.3dcf8376.js","sources":["../../../vue2/src/components/modal/modal.types.ts","../../../vue2/src/components/modal/components/base-modal/base-modal.vue"],"sourcesContent":["/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalVariant {\n DEFAULT = 'BentoModalDefault',\n DIALOG = 'BentoModalDialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n LARGE = 'large',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalColumnLayoutVariant {\n SMALLER = 'smaller',\n EQUAL = 'equal',\n BIGGER = 'bigger',\n}\n\nexport enum BentoModalRole {\n DIALOG = 'dialog',\n ALERT_DIALOG = 'alertdialog',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoModalDialogType {\n CONFIRMATION = 'confirmation',\n DESTRUCTIVE = 'destructive',\n INFO = 'info',\n ACKNOWLEDGEMENT = 'acknowledgement',\n}\n\nexport enum BentoModalEvent {\n CLOSE_MODAL = 'close-modal',\n}\n","<template>\n <div class=\"b-modal-base\">\n <dialog\n ref=\"modal\"\n :role=\"modalRole\"\n :aria-label=\"computedAriaLabel\"\n class=\"b-modal-base__container\"\n :class=\"modalConditionalClasses\"\n :open=\"initiallyOpen\"\n @animationend=\"closeModalAfterAnimation\"\n @click=\"isDismissible && closeModalOnClickOutside($event)\"\n @keydown.esc=\"internalModalActionClose\"\n >\n <bento-focus-trap>\n <div class=\"b-modal-base__wrapper\">\n <div\n v-if=\"hasSlot('default') || showCloseButton\"\n class=\"b-modal-base__header-container\"\n :style=\"customPaddingStyles.header\"\n >\n <div class=\"b-modal-base__header\">\n <bento-typography\n class=\"b-modal-base__title\"\n aria-label=\"base modal title\"\n el=\"span\"\n variant=\"title\"\n stronger\n >\n <slot v-if=\"hasSlot('default')\" />\n </bento-typography>\n <bento-button\n v-if=\"showCloseButton\"\n class=\"b-modal-base__close-button\"\n variant=\"tertiary\"\n type=\"button\"\n @click=\"internalModalActionClose\"\n >\n <cross-icon :svg-title=\"t('close')\" />\n </bento-button>\n </div>\n\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n </div>\n\n <div\n class=\"b-modal-base__content\"\n :class=\"modalContentConditionalClasses\"\n :style=\"customPaddingStyles.content\"\n >\n <bento-typography\n v-if=\"hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2'))\"\n aria-label=\"base modal content\"\n el=\"div\"\n variant=\"body\"\n stronger\n >\n <grid-layout\n v-if=\"hasColumnLayout\"\n :column-width=\"computedColumnWidth\"\n :container-type=\"GridLayoutContainerType.NORMAL\"\n no-gap\n class=\"b-modal-base__grid\"\n >\n <template #col-1><slot name=\"content-col-1\"></slot></template>\n <template #col-2><slot name=\"content-col-2\"></slot></template>\n </grid-layout>\n <slot v-else name=\"content\" />\n </bento-typography>\n </div>\n\n <div\n v-if=\"hasSlot('actions')\"\n class=\"b-modal-base__actions-container\"\n :style=\"customPaddingStyles.actions\"\n >\n <bento-divider v-if=\"hasColumnLayout\" class=\"b-modal-base__divider\" />\n\n <div aria-label=\"modal actions\" class=\"b-modal-base__actions\">\n <slot name=\"actions\" />\n </div>\n </div>\n </div>\n </bento-focus-trap>\n </dialog>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalEvent,\n BentoModalRole,\n BentoModalSize,\n } from '@/components/modal/modal.types';\n\n import { BentoTypography } from '@/components/typography';\n import { BentoButton, BentoButtonActionsList } from '@/components/button';\n import { BentoDivider } from '@/components/divider';\n import { BentoFocusTrap } from '@/components/focus-trap';\n import { GridLayout, GridLayoutContainerType } from '@/internal';\n import { useHasSlot } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\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 const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n export default defineComponent({\n i18n: { messages },\n name: 'base-modal',\n components: { CrossIcon, BentoTypography, BentoButton, BentoDivider, BentoFocusTrap, GridLayout },\n props: {\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 * 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 provided, manages the padding of the whole modal container\n */\n customPadding: { type: String, default: null },\n\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: { type: Boolean, required: true },\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 * Defines whether the modal will be an alert modal\n */\n modalRole: { type: String, default: BentoModalRole.DIALOG },\n\n /**\n * Allows the inner elments to overflow the dialog\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 default: BentoModalSize.SMALL,\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 emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const modal = ref(null);\n const isClosing = ref(false);\n\n const showCloseButton = computed(() => props.isDismissible && !props.hideCloseButton);\n\n const customPaddingStyles = computed(() => {\n if (!props.customPadding) {\n return {};\n }\n\n const xPadding = {\n paddingLeft: props.customPadding,\n paddingRight: props.customPadding,\n };\n\n const content = { ...xPadding, paddingTop: undefined, paddingBottom: undefined };\n\n if (!hasSlot('default')) {\n content.paddingTop = props.customPadding;\n }\n\n if (!hasSlot('actions')) {\n content.paddingBottom = props.customPadding;\n }\n\n return {\n header: { ...xPadding, paddingTop: props.customPadding },\n content,\n actions: { ...xPadding, paddingBottom: props.customPadding },\n };\n });\n\n const computedAriaLabel = computed(\n () => (attrs['aria-label'] as string) ?? (t('ariaLabelFallback') as string)\n );\n const hasColumnLayout = computed(() => props.withColumnLayout && props.size === BentoModalSize.LARGE);\n\n const openModal = (): void => {\n modal.value.showModal();\n };\n\n const emitCloseEvent = (): void => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // Handle closing and closing animation for dialog element\n const closeModalAfterAnimation = () => {\n if (isClosing.value) {\n modal.value.close();\n emitCloseEvent();\n isClosing.value = false;\n }\n };\n\n const startCloseModalAnimation = () => {\n if (!modal.value.open) {\n return;\n }\n isClosing.value = true;\n };\n\n // If the user has pressed escape, clicked outside or clicked the close icon\n const internalModalActionClose = (event?: Event) => {\n if (event) {\n event.preventDefault();\n }\n if (!props.isDismissible) {\n return;\n }\n startCloseModalAnimation();\n };\n\n /**\n * Since the dialog HTML element doesn't automatically close when clicking outside, a check on when the user is clicking is needed.\n * If the click doesn't happen in the dialog box itself, the modal closes\n */\n const closeModalOnClickOutside = ({ target }: Event): void => {\n if (target && (target as HTMLElement).tagName === BentoModalRole.DIALOG.toUpperCase()) {\n internalModalActionClose();\n }\n };\n\n const modalConditionalClasses = computed(() => ({\n [`b-modal-base__container--${props.size}`]: props.size,\n 'b-modal-base__container--hide': isClosing.value,\n 'b-modal-base__container--overflow-visible': props.overflowVisible,\n 'b-modal-base__container--column-layout': hasColumnLayout.value,\n }));\n\n const modalContentConditionalClasses = computed(() => ({\n 'b-modal-base__content--column-layout': hasColumnLayout.value,\n 'b-modal-base__content--with-header': hasSlot('default'),\n 'b-modal-base__content--with-actions': hasSlot('actions'),\n }));\n\n const computedColumnWidth = computed(() => {\n if (props.columnsSize === BentoModalColumnLayoutVariant.SMALLER) {\n return [\n { small: 4, medium: 4, large: 4 },\n { small: 8, medium: 8, large: 8 },\n ];\n }\n if (props.columnsSize === BentoModalColumnLayoutVariant.BIGGER) {\n return [\n { small: 8, medium: 8, large: 8 },\n { small: 4, medium: 4, large: 4 },\n ];\n }\n return [\n { small: 6, medium: 6, large: 6 },\n { small: 6, medium: 6, large: 6 },\n ];\n });\n\n watch(\n () => [props.isOpen, modal.value],\n ([newIsOpen, newModalValue], [, oldModalValue]): void => {\n if (!newModalValue) {\n return;\n }\n\n const isFirstMutation = !oldModalValue;\n if (newIsOpen) {\n openModal();\n } else if (!isFirstMutation) {\n startCloseModalAnimation();\n }\n }\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(startCloseModalAnimation, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n },\n { deep: true }\n );\n\n onMounted(() => {\n if (props.isOpen && modal.value) {\n openModal();\n }\n });\n\n return {\n // Refs\n modal,\n computedAriaLabel,\n showCloseButton,\n\n // Handling the state\n openModal,\n closeModalOnClickOutside,\n closeModalAfterAnimation,\n startCloseModalAnimation,\n\n // Methods\n internalModalActionClose,\n hasSlot,\n emitCloseEvent,\n t,\n\n // Styles\n modalConditionalClasses,\n modalContentConditionalClasses,\n customPaddingStyles,\n hasColumnLayout,\n computedColumnWidth,\n\n // Enums\n GridLayoutContainerType,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-modal.scss\" />\n"],"names":["BentoModalVariant","BentoModalVariant2","BentoModalSize","BentoModalSize2","BentoModalColumnLayoutVariant","BentoModalColumnLayoutVariant2","BentoModalRole","BentoModalRole2","BentoModalDialogType","BentoModalDialogType2","BentoModalEvent","BentoModalEvent2","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","defineComponent","messages","CrossIcon","BentoTypography","BentoButton","BentoDivider","BentoFocusTrap","GridLayout","props","slots","emit","t","useI18n","attrs","useAttrs","hasSlot","useHasSlot","modal","ref","isClosing","showCloseButton","computed","customPaddingStyles","xPadding","content","computedAriaLabel","hasColumnLayout","openModal","emitCloseEvent","closeModalAfterAnimation","startCloseModalAnimation","internalModalActionClose","event","closeModalOnClickOutside","target","modalConditionalClasses","modalContentConditionalClasses","computedColumnWidth","watch","newIsOpen","newModalValue","oldModalValue","_b","_a","onMounted","GridLayoutContainerType","_hoisted_2","_hoisted_4","createElementVNode","_ctx","normalizeClass","_cache","args","$event","withCtx","_hoisted_3","openBlock","createElementBlock","normalizeStyle","createVNode","_component_bento_typography","renderSlot","createCommentVNode","_component_cross_icon","createBlock","_component_grid_layout","_hoisted_5"],"mappings":";;;;;;;;;;;AAGY,IAAAA,KAAA,kBAAAC,OACRA,EAAA,UAAA,qBACAA,EAAA,SAAA,oBAFQA,IAAAD,MAAA,CAAA,CAAA,GAQAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,SAAA,UACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GASAE,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,QAAA,SACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAAA,CAAA,GAMAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,eAAA,eAFQA,IAAAD,KAAA,CAAA,CAAA,GAQAE,KAAA,kBAAAC,OACRA,EAAA,eAAA,gBACAA,EAAA,cAAA,eACAA,EAAA,OAAA,QACAA,EAAA,kBAAA,mBAJQA,IAAAD,MAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OACRA,EAAA,cAAA,eADQA,IAAAD,KAAA,CAAA,CAAA;;;;;;GCkERE,KAAA,KAE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EAAA,wBAAA;AAAA,oBACoB,UAAA;AAAA;kBAEV,GAAA;AAAA;sBACLY,EAAAZ,EAAA,QAAA,iBAAA,CAAA,GAAA,QAAA,EAAA;AAAA,oBAAwC,CAAA;AAAA;;;oBAEvD,GAAA;AAAA,kBAAA,GAAA,GAAA,CAAA,gBAAA,gBAAA,CAAA,KAAAY,EAAAZ,EAAA,QAAA,WAAA,EAAA,KAAA,EAAA,GAAA,QAAA,EAAA;AAAA;;;YAKS,GAAA,CAAA;AAAA;cAC0B,KAAA;AAAA,cACjC,OAAA;AAAA;YAE8B,GAAA;AAAA;gBAA+B,KAAA;AAAA;cAEnE,CAAA,KAAAa,EAAA,IAAA,EAAA;AAAA,cAC2Bd,EAAA,OAAAkB,IAAA;AAAA;;;;;;;;;;;"}
|
package/dist/chunks/{button-actions-with-menu.e89f1375.js → button-actions-with-menu.3f52ea2d.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as d, computed as s, toRef as u, provide as l, openBlock as c, createElementBlock as p, createElementVNode as m, createVNode as _, unref as n, createBlock as f, createCommentVNode as v } from "vue";
|
|
2
|
-
import { M as b, B as y } from "./index.
|
|
3
|
-
import {
|
|
4
|
-
import { BentoButtonActions as
|
|
5
|
-
import { _ as
|
|
2
|
+
import { M as b, B as y } from "./index.d2542c6a.js";
|
|
3
|
+
import { B as h } from "./index.726e2f3c.js";
|
|
4
|
+
import { BentoButtonActions as B } from "../button.js";
|
|
5
|
+
import { _ as A } from "./_plugin-vue_export-helper.dad06003.js";
|
|
6
6
|
import "../assets/button-actions-with-menu.css";
|
|
7
7
|
const N = { class: "b-button-actions-with-menu" }, E = {
|
|
8
8
|
role: "group",
|
|
@@ -87,7 +87,7 @@ const N = { class: "b-button-actions-with-menu" }, E = {
|
|
|
87
87
|
);
|
|
88
88
|
return (e, x) => (c(), p("div", N, [
|
|
89
89
|
m("div", E, [
|
|
90
|
-
_(n(
|
|
90
|
+
_(n(B), {
|
|
91
91
|
actions: n(a),
|
|
92
92
|
inverse: o.inverse
|
|
93
93
|
}, null, 8, ["actions", "inverse"]),
|
|
@@ -100,8 +100,8 @@ const N = { class: "b-button-actions-with-menu" }, E = {
|
|
|
100
100
|
]));
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
const C = /* @__PURE__ */
|
|
103
|
+
const C = /* @__PURE__ */ A(M, [["__scopeId", "data-v-f58eba13"]]);
|
|
104
104
|
export {
|
|
105
105
|
C as B
|
|
106
106
|
};
|
|
107
|
-
//# sourceMappingURL=button-actions-with-menu.
|
|
107
|
+
//# sourceMappingURL=button-actions-with-menu.3f52ea2d.js.map
|