@adyen/bento-vue3 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.types.d.ts +1079 -3
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +8 -7
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +2 -2
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/dialog-page.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/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index48.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/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +2 -2
- package/dist/checkbox.js +1 -1
- package/dist/chunks/{base-modal.63e229a7.js → base-modal.2cbe3db4.js} +3 -3
- package/dist/chunks/{base-modal.63e229a7.js.map → base-modal.2cbe3db4.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.d6826d2b.js → button-actions-with-menu.c4e74ccf.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.d6826d2b.js.map → button-actions-with-menu.c4e74ccf.js.map} +1 -1
- package/dist/chunks/{button-actions.dcfa4863.js → button-actions.bf01695d.js} +3 -3
- package/dist/chunks/{button-actions.dcfa4863.js.map → button-actions.bf01695d.js.map} +1 -1
- package/dist/chunks/{button.09a85d48.js → button.c8e45849.js} +2 -2
- package/dist/chunks/{button.09a85d48.js.map → button.c8e45849.js.map} +1 -1
- package/dist/chunks/{calendar.2d30e6bf.js → calendar.8fa02af5.js} +2 -2
- package/dist/chunks/{calendar.2d30e6bf.js.map → calendar.8fa02af5.js.map} +1 -1
- package/dist/chunks/{copy.ae6eb33c.js → copy.ef632ddb.js} +4 -4
- package/dist/chunks/{copy.ae6eb33c.js.map → copy.ef632ddb.js.map} +1 -1
- package/dist/chunks/{dialog-page.fa8cd314.js → dialog-page.95f9077f.js} +2 -2
- package/dist/chunks/{dialog-page.fa8cd314.js.map → dialog-page.95f9077f.js.map} +1 -1
- package/dist/chunks/{dropdown.d5a800b1.js → dropdown.c6e6e118.js} +24 -24
- package/dist/chunks/{dropdown.d5a800b1.js.map → dropdown.c6e6e118.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.a27181f0.js → fixed-scroller.56ab5fd5.js} +2 -2
- package/dist/chunks/{fixed-scroller.a27181f0.js.map → fixed-scroller.56ab5fd5.js.map} +1 -1
- package/dist/chunks/{footer-actions.1a3be1c3.js → footer-actions.e44e3ef7.js} +3 -3
- package/dist/chunks/{footer-actions.1a3be1c3.js.map → footer-actions.e44e3ef7.js.map} +1 -1
- package/dist/chunks/{index.9213cd28.js → index.037ae52f.js} +2 -2
- package/dist/chunks/{index.9213cd28.js.map → index.037ae52f.js.map} +1 -1
- package/dist/chunks/{index.358fcf5c.js → index.2464f954.js} +5 -5
- package/dist/chunks/{index.358fcf5c.js.map → index.2464f954.js.map} +1 -1
- package/dist/chunks/{index.299ed134.js → index.2bd868ee.js} +2 -2
- package/dist/chunks/{index.299ed134.js.map → index.2bd868ee.js.map} +1 -1
- package/dist/chunks/{index.e8e4c870.js → index.3fbd3e7b.js} +25 -25
- package/dist/chunks/{index.e8e4c870.js.map → index.3fbd3e7b.js.map} +1 -1
- package/dist/chunks/{index.c2872321.js → index.642a2c58.js} +2 -2
- package/dist/chunks/{index.c2872321.js.map → index.642a2c58.js.map} +1 -1
- package/dist/chunks/{index.70c1282d.js → index.6a5bcd83.js} +5 -5
- package/dist/chunks/{index.70c1282d.js.map → index.6a5bcd83.js.map} +1 -1
- package/dist/chunks/{index.5e79bb18.js → index.86770f4e.js} +2 -2
- package/dist/chunks/{index.5e79bb18.js.map → index.86770f4e.js.map} +1 -1
- package/dist/chunks/{index.b4ca0b44.js → index.8a2cbeda.js} +3 -3
- package/dist/chunks/{index.b4ca0b44.js.map → index.8a2cbeda.js.map} +1 -1
- package/dist/chunks/{index.eba75263.js → index.ac470d80.js} +5 -5
- package/dist/chunks/{index.eba75263.js.map → index.ac470d80.js.map} +1 -1
- package/dist/chunks/{index.47437c1b.js → index.df6f2540.js} +10 -10
- package/dist/chunks/{index.47437c1b.js.map → index.df6f2540.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.34a061e6.js → listbox-option-tag.42db4934.js} +2 -2
- package/dist/chunks/{listbox-option-tag.34a061e6.js.map → listbox-option-tag.42db4934.js.map} +1 -1
- package/dist/chunks/{listbox.a54c9e2e.js → listbox.23422e37.js} +2 -2
- package/dist/chunks/{listbox.a54c9e2e.js.map → listbox.23422e37.js.map} +1 -1
- package/dist/chunks/{loading-button.b770140c.js → loading-button.2363626a.js} +2 -2
- package/dist/chunks/{loading-button.b770140c.js.map → loading-button.2363626a.js.map} +1 -1
- package/dist/chunks/{tooltip.f252f6b5.js → tooltip.57d595f3.js} +2 -2
- package/dist/chunks/{tooltip.f252f6b5.js.map → tooltip.57d595f3.js.map} +1 -1
- package/dist/code-snippet.js +6 -6
- package/dist/country.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +17 -17
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +5 -5
- package/dist/empty-state.js +2 -2
- package/dist/filter-bar.js +14 -14
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +3 -3
- package/dist/index.js +16 -16
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +1 -1
- package/dist/internal.js +6 -6
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +5 -5
- package/dist/modal.js +5 -5
- package/dist/pagination.js +3 -3
- package/dist/payment-method.js +53 -53
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +2 -2
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +2 -2
- package/dist/tag.js +2 -2
- package/dist/textarea.js +2 -2
- package/dist/timeline.js +5 -5
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +5 -5
- package/dist/web-types.json +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as a, mergeProps as T, toDisplayString as y, createCommentVNode as $, createElementVNode as V, defineComponent as w, ref as C, computed as v, resolveComponent as m, resolveDirective as h, withDirectives as f, renderSlot as R, createBlock as P, createSlots as E, withCtx as _, createVNode as H, createTextVNode as S } from "vue";
|
|
2
|
-
import { a as D } from "./button.
|
|
3
|
-
import { c as O } from "./index.
|
|
4
|
-
import { B } from "./tooltip.
|
|
2
|
+
import { a as D } from "./button.c8e45849.js";
|
|
3
|
+
import { c as O } from "./index.8a2cbeda.js";
|
|
4
|
+
import { B } from "./tooltip.57d595f3.js";
|
|
5
5
|
import { u as F } from "./i18n.f7e6533e.js";
|
|
6
6
|
import { _ as k } from "./_plugin-vue_export-helper.dad06003.js";
|
|
7
7
|
import "../assets/copy.css";
|
|
@@ -142,4 +142,4 @@ export {
|
|
|
142
142
|
K as C,
|
|
143
143
|
o as a
|
|
144
144
|
};
|
|
145
|
-
//# sourceMappingURL=copy.
|
|
145
|
+
//# sourceMappingURL=copy.ef632ddb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy.
|
|
1
|
+
{"version":3,"file":"copy.ef632ddb.js","sources":["../../../vue2/src/components/internal/copy/copy.types.ts","../../../../node_modules/@adyen/ui-assets-icons-16/dist/vue/copy.vue","../../../vue2/src/components/internal/copy/copy.vue"],"sourcesContent":["import type { BentoButton } from '../../button';\n\nexport enum CopyTooltipState {\n DEFAULT = 'default',\n COPYING = 'copying',\n ERROR = 'error',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\nexport type BentoCopyButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <div class=\"b-copy\" @mouseleave=\"resetText\" @focusout=\"resetText\">\n <span v-if=\"$slots.default\" v-bento-tooltip-directive:[tooltipPosition]=\"copyText\" @click=\"onClickCopy\">\n <slot />\n </span>\n <bento-button\n v-else\n v-bento-tooltip-directive:[tooltipPosition]=\"copyText\"\n v-bind=\"button\"\n @click=\"onClickCopy\"\n >\n <template #iconLeft>\n <copy-icon :svg-title=\"svgTitle\" />\n </template>\n <template v-if=\"buttonText\" #default>\n {{ buttonText }}\n </template>\n </bento-button>\n <div v-if=\"showScreenReaderAlert\" role=\"alert\" class=\"b-copy__screen-reader-alert\">{{ $t('copied') }}</div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoButton } from '@/components/button';\n import { PopperContainerPosition } from '@/components/popper-container';\n import { BentoTooltipDirective } from '@/directives';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoCopyButtonProps, CopyTooltipState } from './copy.types';\n import CopyIcon from '@adyen/ui-assets-icons-16/vue/copy';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * An internal button component that copies text to the user's clipboard.\n *\n * @example\n * import { Copy } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { Copy },\n * template: `\n * <copy :text=\"textToCopy\" />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'copy',\n components: { BentoButton, CopyIcon },\n directives: { BentoTooltipDirective },\n props: {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoCopyButtonProps>,\n default: () =>\n ({\n variant: 'tertiary',\n } as BentoCopyButtonProps),\n },\n\n /**\n * Sets the button text of the copy button.\n */\n buttonText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Defines the string that will get copied to the clipboard\n */\n text: {\n type: String,\n required: true,\n },\n\n /**\n * Position the tooltip should take if space is available. Defaults to 'top'\n */\n tooltipPosition: {\n type: String as PropType<PopperContainerPosition>,\n default: PopperContainerPosition.TOP,\n },\n },\n setup(props) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const copyState = ref<CopyTooltipState>(CopyTooltipState.DEFAULT);\n\n const showScreenReaderAlert = ref(false);\n const onClickCopy = async () => {\n try {\n await navigator.clipboard.writeText(props.text);\n copyState.value = CopyTooltipState.COPYING;\n showScreenReaderAlert.value = true;\n } catch (e) {\n copyState.value = CopyTooltipState.ERROR;\n }\n };\n\n const resetText = () => {\n copyState.value = CopyTooltipState.DEFAULT;\n showScreenReaderAlert.value = false;\n };\n\n const copyText = computed(() => {\n switch (copyState.value) {\n case CopyTooltipState.COPYING:\n return t('copied');\n case CopyTooltipState.ERROR:\n return t('copyFailed');\n case CopyTooltipState.DEFAULT:\n default:\n return t('copy');\n }\n });\n\n const svgTitle = computed(() => (props?.buttonText ? undefined : t('copy')));\n\n return {\n copyText,\n onClickCopy,\n resetText,\n showScreenReaderAlert,\n svgTitle,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./copy.scss\" />\n"],"names":["CopyTooltipState","CopyTooltipState2","uuid","openBlock","createElementBlock","mergeProps","_ctx","_hoisted_1$1","toDisplayString","_sfc_main","defineComponent","messages","BentoButton","CopyIcon","BentoTooltipDirective","PopperContainerPosition","props","useI18n","copyState","ref","showScreenReaderAlert","onClickCopy","resetText","copyText","computed","svgTitle","_directive_bento_tooltip_directive","resolveDirective","_cache","args","renderSlot","withDirectives","createBlock","_component_bento_button","createSlots","withCtx"],"mappings":";;;;;;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,UAAA,WACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACGR,IAAAE,IAAA;;EAGI,eAAA;8BAEIA,KAAA;AAAA;;EARkM,MAAA;AAAA,EAAe,GAAA;;;AAAzN,SAAAC,EAAA,GAAAC,EAAA,OAAAC,EAAA,EAAA,MAAA,MAAA,GAAAC,EAAA,QAAA;AAAA,IAAgC,OAAA;AAAA,IAA2B,OAAA;AAAA,IAAmC,OAAA;AAAA,IAAW,QAAA;AAAA,IAAY,MAAA;AAAA;6BAAYH,EAAA,GAAAC,EAAA,SAAAG,GAAAC,EAAAF,EAAA,OAAA,WAAA,CAAA,GAAA,CAAA;;;;;;;;;;GC6CjIG,IAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAAA,EACX,YAAA,EAAA,aAAAC,GAAA,UAAAC,EAAA;AAAA,EAC8B,YAAA,EAAA,uBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IAC7B,QAAA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J;AAER,CAAA;;EAhHkD,KAAA;AAAA,EAAM,MAAA;AAAA;;;mDAClDC,IAAAC,EAAA,yBAAA;;IAlByB,OAAA;AAAA,IAAc,cAAAC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,IACvB,YAAAD,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,IAAAC,MAAAvB,EAAA,aAAAA,EAAA,UAAA,GAAAuB,CAAA;AAAA,EAAQ,GAAA;AAAA;MAAiE,KAAA;AAAA;IAC/E,GAAA;AAAA,MAD6DC,EAAAxB,EAAA,QAAA,WAAA,CAAA,GAAA,QAAA,EAAA;AAAA,IAAnB,CAAA,IAAA;AAAA,MAGtD,CAAAoB,GAAApB,EAAA,UAAAA,EAAA,eAAA;AAAA,IAAA,CAAA,IAAAyB,GAAA5B,EAAA,GAAA6B,EAAAC,GAAA5B,EAAA,EAAA,KAAA,EAAA,GAAAC,EAAA,QAAA,EAAA,SAAAA,EAAA,YAAA,CAAA,GAAA4B,EAAA;AAAA,MAOuC,UAAAC,EAAA,MAAA;AAAA;;MAEnB,GAAA;AAAA,IAAA,GAAA;AAAA;;;;;;;;;IAIY,CAAA;AAAA;;;;","x_google_ignoreList":[1]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Y, useSlots as F, ref as d, computed as n, inject as k, watch as P, nextTick as E, onUnmounted as q, openBlock as r, createBlock as M, Transition as Q, unref as e, withCtx as w, createElementBlock as c, normalizeClass as A, normalizeStyle as W, createVNode as N, createCommentVNode as v, renderSlot as h } from "vue";
|
|
2
|
-
import { a as X } from "./button.
|
|
2
|
+
import { a as X } from "./button.c8e45849.js";
|
|
3
3
|
import { A as Z } from "./arrow-left.81a91b8f.js";
|
|
4
4
|
import { u as ee } from "./use-has-slot.4d98bf29.js";
|
|
5
5
|
import { u as ae } from "./i18n.f7e6533e.js";
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
le as a,
|
|
148
148
|
se as b
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=dialog-page.
|
|
150
|
+
//# sourceMappingURL=dialog-page.95f9077f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-page.fa8cd314.js","sources":["../../../vue2/src/components/internal/dialog-page/dialog-page.types.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.keys.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isOpen: Ref<boolean>;\n pages: Ref<string[]>;\n previousPages: Ref<string[]>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div v-if=\"hasSlot('content')\" ref=\"contentElement\" class=\"b-dialog-page__content\" @scroll=\"onScroll\">\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fires when the animation ends\n */\n (e: 'animationend'): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtTop.value),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtBottom.value),\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isOpen, pages, previousPages, updatePage } = inject<BentoDialogPageConfigData>(\n DIALOG_PAGE_CONFIG_INJECTION_KEY\n );\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n emit('animationend');\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","animation","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","unregisterPage","onUnmounted"],"mappings":";;;;;;;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA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,MAAA;AAGA,WAAA0B,EAAA,MAAAD,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dialog-page.95f9077f.js","sources":["../../../vue2/src/components/internal/dialog-page/dialog-page.types.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.keys.ts","../../../vue2/src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["import { Ref } from 'vue';\n\nexport enum BentoDialogPageAnimation {\n TRANSITION_LEVEL_DEEPER = 'b-dialog-page__animation--level-deeper',\n TRANSITION_LEVEL_UPPER = 'b-dialog-page__animation--level-upper',\n}\n\nexport interface BentoDialogPageConfigData {\n activePage: Ref<string>;\n animation: Ref<string>;\n isOpen: Ref<boolean>;\n pages: Ref<string[]>;\n previousPages: Ref<string[]>;\n updatePage: (page: string) => void;\n}\n\nexport type BentoDialogPageRegisterPage = (pageId: string) => { unregisterPage: () => void };\n","export const DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY = Symbol('dialog registerPage injection key');\nexport const DIALOG_PAGE_CONFIG_INJECTION_KEY = Symbol('dialog page config data injection key');\n","<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div v-if=\"hasSlot('content')\" ref=\"contentElement\" class=\"b-dialog-page__content\" @scroll=\"onScroll\">\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onUnmounted, PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n BentoDialogPageConfigData,\n BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Fires when the animation ends\n */\n (e: 'animationend'): void;\n }>();\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isScrollAtTop = ref(true);\n const isScrollAtBottom = ref(false);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtTop.value),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !isScrollAtBottom.value),\n }));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n\n isScrollAtTop.value = contentElement.value.scrollTop === 0;\n isScrollAtBottom.value =\n contentElement.value.scrollHeight - contentElement.value.clientHeight === contentElement.value.scrollTop;\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isOpen, pages, previousPages, updatePage } = inject<BentoDialogPageConfigData>(\n DIALOG_PAGE_CONFIG_INJECTION_KEY\n );\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n emit('animationend');\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n // Unregister page on unmounting the page\n onUnmounted(() => unregisterPage());\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["BentoDialogPageAnimation","BentoDialogPageAnimation2","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","DIALOG_PAGE_CONFIG_INJECTION_KEY","__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isScrollAtTop","isScrollAtBottom","showPage","computed","activePage","props","headerConditionalClasses","footerConditionalClasses","onScroll","calculateScroll","watchedValue","nextTick","animation","isOpen","pages","previousPages","updatePage","inject","watch","showBackButton","hasPreviousPages","updateAnimation","emit","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","unregisterPage","onUnmounted"],"mappings":";;;;;;;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,0BAAA,0CACAA,EAAA,yBAAA,yCAFQA,IAAAD,KAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ref as w, watch as Se, computed as f, defineComponent as z, useSlots as xe, toRefs as we, openBlock as g, createBlock as P, resolveDynamicComponent as Le, unref as a, mergeProps as A, withCtx as F, createElementVNode as Q, withKeys as ze, createVNode as J, toHandlers as Z, createSlots as ae, renderList as oe, renderSlot as Y, normalizeProps as ne, guardReactiveProps as se, createElementBlock as M, toDisplayString as ue, createCommentVNode as K, normalizeClass as ie, withDirectives as G, vShow as ve, nextTick as T, useAttrs as We, toRef as _, inject as je, createTextVNode as Ue } from "vue";
|
|
2
2
|
import { d as me, B as qe } from "./index.995d6d84.js";
|
|
3
|
+
import { D as le, a as ye, b as He, c as Je } from "./dropdown-default-textbox.e5689274.js";
|
|
4
|
+
import { _ as q } from "./_plugin-vue_export-helper.dad06003.js";
|
|
3
5
|
import { g as U } from "./unique-id.a2a2b458.js";
|
|
4
|
-
import { u as
|
|
6
|
+
import { u as Ye } from "./aria-label.ac9651a5.js";
|
|
5
7
|
import { u as ce } from "./i18n.f7e6533e.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { B as
|
|
8
|
-
import { B as R, a as
|
|
9
|
-
import { b as c, a as re, B as de, u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { F as
|
|
12
|
-
import { a as
|
|
13
|
-
import { a as
|
|
14
|
-
import { _ as q } from "./_plugin-vue_export-helper.dad06003.js";
|
|
15
|
-
import { D as le, a as be, b as tt, c as lt } from "./dropdown-default-textbox.e5689274.js";
|
|
8
|
+
import { u as Ze } from "./use-form-layout-loading.d03e5d48.js";
|
|
9
|
+
import { B as Ge } from "./directive.0408e565.js";
|
|
10
|
+
import { B as R, a as Qe } from "./keyboard-navigation.ca47dfa8.js";
|
|
11
|
+
import { b as c, a as re, B as de, u as Xe } from "./listbox.23422e37.js";
|
|
12
|
+
import { u as Ve } from "./use-has-slot.4d98bf29.js";
|
|
13
|
+
import { F as et, E as tt } from "./error-message.002c5b52.js";
|
|
14
|
+
import { a as be } from "./index.8a2cbeda.js";
|
|
15
|
+
import { a as lt } from "./index.6a5bcd83.js";
|
|
16
16
|
import "../assets/dropdown.css";
|
|
17
17
|
var D = /* @__PURE__ */ ((e) => (e.DEFAULT = "DropdownInputDefault", e.SMALL = "DropdownInputSmall", e))(D || {});
|
|
18
18
|
const fe = {
|
|
@@ -179,7 +179,7 @@ const fe = {
|
|
|
179
179
|
* Reference to the DOM element or Vue component for positioning
|
|
180
180
|
* the Dropdown container.
|
|
181
181
|
*/
|
|
182
|
-
targetElement: { type:
|
|
182
|
+
targetElement: { type: be.props.targetElement.type, required: !0 },
|
|
183
183
|
/**
|
|
184
184
|
* Enables virtual scrolling if set to true or by providing an object with itemHeight function.
|
|
185
185
|
* The itemHeight function is used to calculate the height of rendered item given it's index.
|
|
@@ -195,7 +195,7 @@ const fe = {
|
|
|
195
195
|
})), L = f(() => ({
|
|
196
196
|
"b-dropdown-options-container__listbox--small": l.inputSize === D.SMALL,
|
|
197
197
|
"b-dropdown-options-container__listbox--single": !(l != null && l.multiple)
|
|
198
|
-
})), { actions: $, internalSelectedValue: O, listeners: S, onEscapeKey: E, onOutsideDropdownClick: N } = at(s, r, y, t), i = f(() => l != null && l.multiple ?
|
|
198
|
+
})), { actions: $, internalSelectedValue: O, listeners: S, onEscapeKey: E, onOutsideDropdownClick: N } = at(s, r, y, t), i = f(() => l != null && l.multiple ? lt : be), p = f(() => {
|
|
199
199
|
var B;
|
|
200
200
|
const b = {
|
|
201
201
|
"min-width": `${(B = l == null ? void 0 : l.targetElement) == null ? void 0 : B.clientWidth}px`,
|
|
@@ -388,13 +388,13 @@ const yt = /* @__PURE__ */ q(ft, [["render", mt]]), bt = { class: "b-dropdown-sm
|
|
|
388
388
|
}, r = () => {
|
|
389
389
|
o("close");
|
|
390
390
|
}, d = {
|
|
391
|
-
[
|
|
392
|
-
[
|
|
391
|
+
[ye.OPEN]: s,
|
|
392
|
+
[ye.CLOSE]: r
|
|
393
393
|
};
|
|
394
394
|
return (u, y) => (g(), M("div", {
|
|
395
395
|
class: ie(["b-dropdown-small-textbox", a(l)])
|
|
396
396
|
}, [
|
|
397
|
-
J(
|
|
397
|
+
J(He, A({ ...u.$attrs, ...u.$props }, { class: "b-dropdown-small-textbox__textbox" }, Z(d)), {
|
|
398
398
|
icon: F(() => [
|
|
399
399
|
Q("div", bt, [
|
|
400
400
|
G(J(a(yt), { "svg-title": "opened" }, null, 512), [
|
|
@@ -540,7 +540,7 @@ const Oe = {
|
|
|
540
540
|
i18n: { messages: Oe },
|
|
541
541
|
name: "b-dropdown",
|
|
542
542
|
components: {
|
|
543
|
-
DropdownInputDefault:
|
|
543
|
+
DropdownInputDefault: Je,
|
|
544
544
|
DropdownInputSmall: St
|
|
545
545
|
}
|
|
546
546
|
}), It = /* @__PURE__ */ z({
|
|
@@ -703,7 +703,7 @@ const Oe = {
|
|
|
703
703
|
emits: ["input", "show-more"],
|
|
704
704
|
setup(e, { emit: o }) {
|
|
705
705
|
var pe;
|
|
706
|
-
const t = e, l = We(), n = xe(), s =
|
|
706
|
+
const t = e, l = We(), n = xe(), s = Ve(n), { t: r } = ce({ messages: Oe }), d = w(null), u = w(null), y = w(null), v = w(!1), h = U("bento-dropdown-options-container"), L = U("dropdown-label"), $ = U("dropdown-description"), O = U("dropdown-error"), { isReadOnly: S } = Ze(_(t, "readonly")), E = w(l["aria-label"]), { ariaLabel: N } = we(t), i = Ye({
|
|
707
707
|
ariaLabel: E.value,
|
|
708
708
|
// TODO: take this line away when the aria-label props is removed
|
|
709
709
|
label: N,
|
|
@@ -733,7 +733,7 @@ const Oe = {
|
|
|
733
733
|
}), Be = f(() => {
|
|
734
734
|
const m = t.items.findIndex(({ value: C }) => t.value === C);
|
|
735
735
|
return m > 0 ? m : 0;
|
|
736
|
-
}), { isMultiLevelSelect: Ie, flattenedItemsList: _e } =
|
|
736
|
+
}), { isMultiLevelSelect: Ie, flattenedItemsList: _e } = Xe(k), Re = f(() => {
|
|
737
737
|
var m;
|
|
738
738
|
if (t.multiple) {
|
|
739
739
|
const C = (m = t == null ? void 0 : t.value) == null ? void 0 : m.length;
|
|
@@ -790,7 +790,7 @@ const Oe = {
|
|
|
790
790
|
return G((g(), M("div", {
|
|
791
791
|
class: ie(["b-dropdown", a(B)])
|
|
792
792
|
}, [
|
|
793
|
-
e.label ? (g(), P(a(
|
|
793
|
+
e.label ? (g(), P(a(et), {
|
|
794
794
|
key: 0,
|
|
795
795
|
id: a(L),
|
|
796
796
|
condensed: e.condensed,
|
|
@@ -836,7 +836,7 @@ const Oe = {
|
|
|
836
836
|
}))
|
|
837
837
|
]), 1064, ["condensed", "value", "additional-items-selected", "ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "aria-label", "aria-readonly", "readonly", "disabled", "display-value", "dynamic-filtering", "is-invalid", "multiple", "open", "selected-value-item", "show-slot-content-in-multiple"]))
|
|
838
838
|
], 16)), [
|
|
839
|
-
[a(
|
|
839
|
+
[a(Qe)]
|
|
840
840
|
]),
|
|
841
841
|
d.value ? (g(), P(a(st), A({
|
|
842
842
|
key: 1,
|
|
@@ -868,7 +868,7 @@ const Oe = {
|
|
|
868
868
|
])
|
|
869
869
|
}))
|
|
870
870
|
]), 1040, ["id", "aria-label", "empty-state", "debounce-time", "disabled", "input-size", "is-option-disabled", "items", "multiple", "static-categories", "open", "selected-value", "searching", "target-element", "loading", "has-more-items", "lazy-load-type", "virtual-scroll"])) : K("", !0),
|
|
871
|
-
e.errorMessage ? (g(), P(a(
|
|
871
|
+
e.errorMessage ? (g(), P(a(tt), {
|
|
872
872
|
key: 2,
|
|
873
873
|
id: a(O),
|
|
874
874
|
"error-message": e.errorMessage,
|
|
@@ -888,7 +888,7 @@ const Oe = {
|
|
|
888
888
|
_: 3
|
|
889
889
|
}, 8, ["id", "class"])) : K("", !0)
|
|
890
890
|
], 2)), [
|
|
891
|
-
[a(
|
|
891
|
+
[a(Ge), Me]
|
|
892
892
|
]);
|
|
893
893
|
};
|
|
894
894
|
}
|
|
@@ -900,4 +900,4 @@ export {
|
|
|
900
900
|
D as a,
|
|
901
901
|
Ct as u
|
|
902
902
|
};
|
|
903
|
-
//# sourceMappingURL=dropdown.
|
|
903
|
+
//# sourceMappingURL=dropdown.c6e6e118.js.map
|