bootstrap-vue-next 1.2.3 → 1.2.5
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/{BAccordion-nQptHiXD.js → BAccordion-BfaVicrj.js} +2 -2
- package/dist/{BAccordion-nQptHiXD.js.map → BAccordion-BfaVicrj.js.map} +1 -1
- package/dist/{BAlert-Bl3TOay3.js → BAlert-Czy83dU3.js} +5 -5
- package/dist/{BAlert-Bl3TOay3.js.map → BAlert-Czy83dU3.js.map} +1 -1
- package/dist/{BApp-Bg5xEz8H.js → BApp-DZ9AITOm.js} +22 -3
- package/dist/BApp-DZ9AITOm.js.map +1 -0
- package/dist/BAutocomplete-Bh4Bp5AI.js +437 -0
- package/dist/BAutocomplete-Bh4Bp5AI.js.map +1 -0
- package/dist/{BAvatar-BsStQrBF.js → BAvatar-BJNeQ1fe.js} +2 -2
- package/dist/{BAvatar-BsStQrBF.js.map → BAvatar-BJNeQ1fe.js.map} +1 -1
- package/dist/{BButton-KZu5jczf.js → BButton-DlOQ5sem.js} +2 -2
- package/dist/{BButton-KZu5jczf.js.map → BButton-DlOQ5sem.js.map} +1 -1
- package/dist/{BCard-DELccMG-.js → BCard-Bc1wed-3.js} +2 -2
- package/dist/{BCard-DELccMG-.js.map → BCard-Bc1wed-3.js.map} +1 -1
- package/dist/{BCarousel-BV2EiQRM.js → BCarousel-B-WZR469.js} +4 -5
- package/dist/{BCarousel-BV2EiQRM.js.map → BCarousel-B-WZR469.js.map} +1 -1
- package/dist/{BCollapse-B2q9Ya2S.js → BCollapse-DCjKiTxo.js} +2 -2
- package/dist/{BCollapse-B2q9Ya2S.js.map → BCollapse-DCjKiTxo.js.map} +1 -1
- package/dist/BDateField-Oh-cU-4i.js +456 -0
- package/dist/BDateField-Oh-cU-4i.js.map +1 -0
- package/dist/BDatePicker-HNI11eCe.js +632 -0
- package/dist/BDatePicker-HNI11eCe.js.map +1 -0
- package/dist/{BDropdown-D4gLdtmX.js → BDropdown-04nGcMhm.js} +6 -7
- package/dist/{BDropdown-D4gLdtmX.js.map → BDropdown-04nGcMhm.js.map} +1 -1
- package/dist/{BFormCheckbox-BYNGQgr2.js → BFormCheckbox-zjr8OsNd.js} +2 -2
- package/dist/{BFormCheckbox-BYNGQgr2.js.map → BFormCheckbox-zjr8OsNd.js.map} +1 -1
- package/dist/{BFormFile-C2DnrbK7.js → BFormFile-D_s8tf1m.js} +2 -2
- package/dist/{BFormFile-C2DnrbK7.js.map → BFormFile-D_s8tf1m.js.map} +1 -1
- package/dist/{BFormInput-_AkAy6Wk.js → BFormInput-DnIBPLCx.js} +2 -2
- package/dist/{BFormInput-_AkAy6Wk.js.map → BFormInput-DnIBPLCx.js.map} +1 -1
- package/dist/BFormOtp-Dx2RxPAW.js +150 -0
- package/dist/BFormOtp-Dx2RxPAW.js.map +1 -0
- package/dist/{BFormRadio-DAddcnfE.js → BFormRadio-DUz60sBI.js} +2 -2
- package/dist/{BFormRadio-DAddcnfE.js.map → BFormRadio-DUz60sBI.js.map} +1 -1
- package/dist/{BFormRating-iKFgSFet.js → BFormRating-CtMmDgrF.js} +2 -2
- package/dist/{BFormRating-iKFgSFet.js.map → BFormRating-CtMmDgrF.js.map} +1 -1
- package/dist/{BFormSelect-CSS-_kul.js → BFormSelect-CeslPN3i.js} +2 -3
- package/dist/{BFormSelect-CSS-_kul.js.map → BFormSelect-CeslPN3i.js.map} +1 -1
- package/dist/{BFormSpinbutton-fkVMbQC3.js → BFormSpinbutton-BR9YTfYy.js} +2 -3
- package/dist/{BFormSpinbutton-fkVMbQC3.js.map → BFormSpinbutton-BR9YTfYy.js.map} +1 -1
- package/dist/{BFormTags-CUcyRTCK.js → BFormTags-6qQn0Vlv.js} +2 -3
- package/dist/{BFormTags-CUcyRTCK.js.map → BFormTags-6qQn0Vlv.js.map} +1 -1
- package/dist/{BFormTextarea-CBBlEcrV.js → BFormTextarea-DvLrtG08.js} +3 -3
- package/dist/{BFormTextarea-CBBlEcrV.js.map → BFormTextarea-DvLrtG08.js.map} +1 -1
- package/dist/{BImg-knz2UZQE.js → BImg-Dd8Pc1Ln.js} +2 -2
- package/dist/{BImg-knz2UZQE.js.map → BImg-Dd8Pc1Ln.js.map} +1 -1
- package/dist/{BModal-BjmeVZen.js → BModal-DOmTYI6F.js} +5 -6
- package/dist/{BModal-BjmeVZen.js.map → BModal-DOmTYI6F.js.map} +1 -1
- package/dist/{BNav-B2PlMEMD.js → BNav-D3XbyI1R.js} +2 -2
- package/dist/{BNav-B2PlMEMD.js.map → BNav-D3XbyI1R.js.map} +1 -1
- package/dist/{BOffcanvas-DfR32-ZP.js → BOffcanvas-DyPG7s8I.js} +5 -5
- package/dist/{BOffcanvas-DfR32-ZP.js.map → BOffcanvas-DyPG7s8I.js.map} +1 -1
- package/dist/{BPagination-CfrsVgDp.js → BPagination-DGvgWeYG.js} +3 -3
- package/dist/{BPagination-CfrsVgDp.js.map → BPagination-DGvgWeYG.js.map} +1 -1
- package/dist/{BPlaceholder-DI12zz0a.js → BPlaceholder-BrBmbfIg.js} +3 -3
- package/dist/{BPlaceholder-DI12zz0a.js.map → BPlaceholder-BrBmbfIg.js.map} +1 -1
- package/dist/{BProgress-BNxYppi-.js → BProgress-CXhe6hsN.js} +2 -2
- package/dist/{BProgress-BNxYppi-.js.map → BProgress-CXhe6hsN.js.map} +1 -1
- package/dist/{BTable-BZxX17YU.js → BTable-8jp3wPAI.js} +2 -2
- package/dist/{BTable-BZxX17YU.js.map → BTable-8jp3wPAI.js.map} +1 -1
- package/dist/{BTabs-Zp8CvCL_.js → BTabs-Cfe8HOGE.js} +2 -2
- package/dist/{BTabs-Zp8CvCL_.js.map → BTabs-Cfe8HOGE.js.map} +1 -1
- package/dist/BTimeField-vdultTwg.js +138 -0
- package/dist/BTimeField-vdultTwg.js.map +1 -0
- package/dist/{BToast-CqE2VMW2.js → BToast-vxfpFGe3.js} +5 -5
- package/dist/{BToast-CqE2VMW2.js.map → BToast-vxfpFGe3.js.map} +1 -1
- package/dist/{BTooltip-BHFBLXnr.js → BTooltip-CV5Ogidy.js} +5 -11
- package/dist/BTooltip-CV5Ogidy.js.map +1 -0
- package/dist/bootstrap-vue-next.mjs +36 -36
- package/dist/{classes-BEWWGbj5.js → classes-DCjKFM2E.js} +12 -2
- package/dist/classes-DCjKFM2E.js.map +1 -0
- package/dist/components/BTooltip/BTooltip.vue.d.mts +3 -3
- package/dist/components/BTooltip/BTooltip.vue.d.ts +3 -3
- package/dist/composables/usePopover/index.d.mts +9 -9
- package/dist/composables/usePopover/index.d.ts +9 -9
- package/dist/{floatingUi-Stb1SUvw.js → floatingUi-BhgR4GBJ.js} +10 -168
- package/dist/floatingUi-BhgR4GBJ.js.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/src/components/BAccordion/index.mjs +1 -1
- package/dist/src/components/BAlert/index.mjs +1 -1
- package/dist/src/components/BApp/index.mjs +1 -1
- package/dist/src/components/BAutocomplete/index.mjs +1 -1
- package/dist/src/components/BAvatar/index.mjs +1 -1
- package/dist/src/components/BButton/index.mjs +1 -1
- package/dist/src/components/BCard/index.mjs +1 -1
- package/dist/src/components/BCarousel/index.mjs +1 -1
- package/dist/src/components/BCollapse/index.mjs +1 -1
- package/dist/src/components/BDateField/index.mjs +1 -1
- package/dist/src/components/BDatePicker/index.mjs +1 -1
- package/dist/src/components/BDropdown/index.mjs +1 -1
- package/dist/src/components/BFormCheckbox/index.mjs +1 -1
- package/dist/src/components/BFormFile/index.mjs +1 -1
- package/dist/src/components/BFormInput/index.mjs +1 -1
- package/dist/src/components/BFormOtp/index.mjs +1 -1
- package/dist/src/components/BFormRadio/index.mjs +1 -1
- package/dist/src/components/BFormRating/index.mjs +1 -1
- package/dist/src/components/BFormSelect/index.mjs +1 -1
- package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
- package/dist/src/components/BFormTags/index.mjs +1 -1
- package/dist/src/components/BFormTextarea/index.mjs +1 -1
- package/dist/src/components/BImg/index.mjs +1 -1
- package/dist/src/components/BModal/index.mjs +1 -1
- package/dist/src/components/BNav/index.mjs +1 -1
- package/dist/src/components/BOffcanvas/index.mjs +1 -1
- package/dist/src/components/BPagination/index.mjs +1 -1
- package/dist/src/components/BPlaceholder/index.mjs +1 -1
- package/dist/src/components/BPopover/index.mjs +1 -1
- package/dist/src/components/BProgress/index.mjs +1 -1
- package/dist/src/components/BTable/index.mjs +1 -1
- package/dist/src/components/BTabs/index.mjs +1 -1
- package/dist/src/components/BTimeField/index.mjs +1 -1
- package/dist/src/components/BToast/index.mjs +1 -1
- package/dist/src/components/BTooltip/index.mjs +1 -1
- package/dist/src/components/index.mjs +36 -36
- package/dist/src/composables/index.mjs +1 -1
- package/dist/src/composables/orchestratorShared/index.mjs +145 -27
- package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
- package/dist/src/composables/useColorMode/index.mjs +1 -1
- package/dist/src/composables/useModal/index.mjs +1 -1
- package/dist/src/composables/usePopover/index.mjs +2 -2
- package/dist/src/composables/useScrollLock/index.mjs +1 -2
- package/dist/src/composables/useScrollLock/index.mjs.map +1 -1
- package/dist/src/composables/useScrollspy/index.mjs +1 -2
- package/dist/src/composables/useScrollspy/index.mjs.map +1 -1
- package/dist/src/composables/useToast/index.mjs +1 -1
- package/dist/src/directives/BPopover/index.mjs +2 -2
- package/dist/src/directives/BScrollspy/index.mjs +1 -1
- package/dist/src/directives/BToggle/index.mjs +1 -1
- package/dist/src/directives/BTooltip/index.mjs +2 -2
- package/dist/src/directives/index.mjs +1 -1
- package/dist/src/plugins/index.mjs +1 -1
- package/dist/src/resolvers/index.mjs +1 -1
- package/dist/src/types/index.mjs +1 -1
- package/dist/src/utils/index.mjs +2 -2
- package/dist/types/ComponentOrchestratorTypes.d.mts +8 -1
- package/dist/types/ComponentOrchestratorTypes.d.ts +8 -1
- package/dist/{useCountdownHover-BN8vJIQW.js → useCountdownHover-HZSJZkHq.js} +2 -2
- package/dist/{useCountdownHover-BN8vJIQW.js.map → useCountdownHover-HZSJZkHq.js.map} +1 -1
- package/dist/{useFormInput-C-iXRxog.js → useFormInput-CMtXFoM2.js} +2 -3
- package/dist/{useFormInput-C-iXRxog.js.map → useFormInput-CMtXFoM2.js.map} +1 -1
- package/dist/useSafeScrollLock-BT4KKhxB.js +89 -0
- package/dist/useSafeScrollLock-BT4KKhxB.js.map +1 -0
- package/dist/{useShowHide-B6RQbFDt.js → useShowHide-BLIZLD9E.js} +125 -56
- package/dist/useShowHide-BLIZLD9E.js.map +1 -0
- package/dist/utils/classes.d.mts +10 -0
- package/dist/utils/classes.d.ts +10 -0
- package/dist/{utils-CK56zzsO.js → utils-CvjliJBf.js} +2 -2
- package/dist/{utils-CK56zzsO.js.map → utils-CvjliJBf.js.map} +1 -1
- package/package.json +3 -23
- package/dist/BApp-Bg5xEz8H.js.map +0 -1
- package/dist/BAutocomplete-BFbbKtpz.js +0 -2490
- package/dist/BAutocomplete-BFbbKtpz.js.map +0 -1
- package/dist/BDateField-Bj-Jz7u4.js +0 -906
- package/dist/BDateField-Bj-Jz7u4.js.map +0 -1
- package/dist/BDatePicker-AVTYcVLy.js +0 -5210
- package/dist/BDatePicker-AVTYcVLy.js.map +0 -1
- package/dist/BFormOtp-ClDACqXM.js +0 -577
- package/dist/BFormOtp-ClDACqXM.js.map +0 -1
- package/dist/BTimeField-CbRGjaI6.js +0 -516
- package/dist/BTimeField-CbRGjaI6.js.map +0 -1
- package/dist/BTooltip-BHFBLXnr.js.map +0 -1
- package/dist/DateRangeFieldInput-Cbzjg8iF.js +0 -761
- package/dist/DateRangeFieldInput-Cbzjg8iF.js.map +0 -1
- package/dist/PopperContent-C9eeL6LH.js +0 -1726
- package/dist/PopperContent-C9eeL6LH.js.map +0 -1
- package/dist/VisuallyHidden-BYzyjJiY.js +0 -182
- package/dist/VisuallyHidden-BYzyjJiY.js.map +0 -1
- package/dist/VisuallyHiddenInput-CUrc8XXa.js +0 -180
- package/dist/VisuallyHiddenInput-CUrc8XXa.js.map +0 -1
- package/dist/classes-BEWWGbj5.js.map +0 -1
- package/dist/dist-9-XTMhb-.js +0 -1302
- package/dist/dist-9-XTMhb-.js.map +0 -1
- package/dist/dist-B-regXAP.js +0 -123
- package/dist/dist-B-regXAP.js.map +0 -1
- package/dist/dist-DKc2ivHS.js +0 -411
- package/dist/dist-DKc2ivHS.js.map +0 -1
- package/dist/floating-ui.dom-C7UZexJK.js +0 -1484
- package/dist/floating-ui.dom-C7UZexJK.js.map +0 -1
- package/dist/floatingUi-Stb1SUvw.js.map +0 -1
- package/dist/rolldown-runtime-BBjsoOtd.js +0 -27
- package/dist/useDateField-CQZb799C.js +0 -3679
- package/dist/useDateField-CQZb799C.js.map +0 -1
- package/dist/useForwardExpose-DDvk7mir.js +0 -60
- package/dist/useForwardExpose-DDvk7mir.js.map +0 -1
- package/dist/useKbd-DRsaFU_f.js +0 -76
- package/dist/useKbd-DRsaFU_f.js.map +0 -1
- package/dist/useSafeScrollLock-PVgSASYu.js +0 -1326
- package/dist/useSafeScrollLock-PVgSASYu.js.map +0 -1
- package/dist/useShowHide-B6RQbFDt.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormFile-C2DnrbK7.js","names":[],"sources":["../src/components/BFormFile/useAriaLiveMessage.ts","../src/components/BFormFile/BFormFile.vue","../src/components/BFormFile/BFormFile.vue"],"sourcesContent":["import {nextTick, readonly, ref, unref, watch, type MaybeRef, type Ref} from 'vue'\n\n/**\n * Manages an ARIA live region message with a clear-then-set pattern.\n *\n * Screen readers only announce `aria-live` content on a transition from empty\n * to non-empty text. By clearing the message first and then setting it in the\n * next tick we guarantee that every file selection produces that empty→non-empty\n * transition, even when the same file is selected again.\n */\nexport const useAriaLiveMessage = (\n selectedFiles: Ref<readonly File[]>,\n formatter: MaybeRef<((files: readonly File[]) => string) | undefined>\n) => {\n const ariaLiveMessage = ref('')\n\n const buildMessage = (files: readonly File[]): string => {\n if (files.length === 0) return ''\n const fn = unref(formatter)\n if (fn) {\n return fn(files)\n }\n if (files.length === 1) {\n return `File selected: ${files[0]?.name}`\n }\n return `${files.length} files selected`\n }\n\n watch(selectedFiles, async (files) => {\n ariaLiveMessage.value = ''\n await nextTick()\n ariaLiveMessage.value = buildMessage(files)\n })\n\n return readonly(ariaLiveMessage)\n}\n","<template>\n <div ref=\"rootRef\" v-bind=\"processedAttrs.rootAttrs\" class=\"b-form-file-root\">\n <!-- Optional label -->\n <label\n v-if=\"hasLabelSlot || props.label\"\n class=\"form-label\"\n :class=\"props.labelClass\"\n :for=\"computedId\"\n >\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n\n <!-- Drop zone wrapper -->\n <div\n v-if=\"!props.plain\"\n ref=\"dropZoneRef\"\n v-bind=\"processedAttrs.dropZoneAttrs\"\n class=\"b-form-file-wrapper\"\n :class=\"{\n 'b-form-file-dragging': isOverDropZone && !props.noDrop,\n 'b-form-file-has-files': hasFiles,\n }\"\n >\n <!-- Custom file control (mimics Bootstrap native input) -->\n <div\n class=\"b-form-file-control\"\n :class=\"computedClasses\"\n :aria-disabled=\"props.disabled\"\n @click=\"handleControlClick\"\n >\n <!-- Custom browse button (now on LEFT to match Bootstrap v5) -->\n <button\n v-if=\"!props.noButton\"\n :id=\"computedId\"\n ref=\"browseButtonRef\"\n type=\"button\"\n class=\"b-form-file-button\"\n :disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n @click.stop=\"openFileDialog\"\n >\n {{ effectiveBrowseText }}\n </button>\n\n <!-- File name display -->\n <div class=\"b-form-file-text\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <span v-if=\"hasFiles\">{{ formattedFileNames }}</span>\n <span v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"text-muted\">\n <slot name=\"placeholder\">{{ props.placeholder }}</slot>\n </span>\n </slot>\n </div>\n </div>\n\n <!-- Drag overlay (only shown when dragging) -->\n <div v-if=\"isOverDropZone && !props.noDrop\" class=\"b-form-file-drag-overlay\">\n <slot name=\"drop-placeholder\">\n <div class=\"b-form-file-drag-text\">\n {{ effectiveDropPlaceholder }}\n </div>\n </slot>\n </div>\n\n <!-- Hidden input for form submission (positioned behind UI with z-index) -->\n <input\n ref=\"customInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :name=\"props.name\"\n :form=\"props.form\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :accept=\"computedAccept || undefined\"\n :capture=\"props.capture\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n style=\"\n position: absolute;\n z-index: -5;\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n \"\n />\n </div>\n\n <!-- Plain mode - simple native input -->\n <input\n v-else\n :id=\"computedId\"\n ref=\"plainInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :class=\"computedPlainClasses\"\n :form=\"props.form\"\n :name=\"props.name\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :capture=\"props.capture\"\n :accept=\"computedAccept || undefined\"\n :required=\"props.required || undefined\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :aria-required=\"props.required || undefined\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n @change=\"onPlainChange\"\n />\n\n <!-- External file display (when showFileNames is true and not plain) -->\n <div v-if=\"showExternalDisplay\" class=\"b-form-file-display mt-2\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <div v-if=\"hasFiles\" class=\"small text-muted\">\n {{ formattedFileNames }}\n </div>\n <div v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"small text-muted\">\n <slot name=\"placeholder\">\n {{ props.placeholder }}\n </slot>\n </div>\n </slot>\n </div>\n\n <!-- ARIA live region for screen reader announcements -->\n <div v-if=\"!props.plain\" class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ ariaLiveMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDropZone, useFileDialog} from '@vueuse/core'\nimport {computed, nextTick, onMounted, ref, type Ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {isEmptySlot} from '../../utils/dom'\nimport type {BFormFileProps, BFormFileSlots} from '../../types'\nimport {useAriaLiveMessage} from './useAriaLiveMessage'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormFileProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n accept: '',\n autofocus: false,\n browseText: undefined,\n capture: undefined,\n directory: false,\n disabled: false,\n dropPlaceholder: undefined,\n fileNameFormatter: undefined,\n ariaLiveFormatter: undefined,\n form: undefined,\n id: undefined,\n label: '',\n labelClass: undefined,\n multiple: false,\n name: undefined,\n noButton: false,\n noDrop: false,\n plain: false,\n placeholder: 'No file chosen',\n required: false,\n showFileNames: false,\n size: undefined,\n state: null,\n})\nconst props = useDefaults(_props, 'BFormFile')\nconst slots = defineSlots<BFormFileSlots>()\n\nconst emit = defineEmits<{\n change: [value: Event]\n}>()\n\nconst modelValue = defineModel<Exclude<BFormFileProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n // In plain mode, pass all attributes to the input element\n if (props.plain) {\n return {\n rootAttrs: {},\n dropZoneAttrs: {},\n inputAttrs: attrs,\n }\n }\n // In custom mode, split attributes:\n // - class/style go to root (for layout/positioning)\n // - title goes to drop zone (for tooltip on interactive element)\n // - everything else goes to hidden input (for form functionality)\n const {class: rootClass, style: rootStyle, title: dropZoneTitle, ...inputAttrs} = attrs\n const rootAttrs: Record<string, unknown> = {}\n const dropZoneAttrs: Record<string, unknown> = {}\n if (rootClass !== undefined) rootAttrs.class = rootClass\n if (rootStyle !== undefined) rootAttrs.style = rootStyle\n if (dropZoneTitle !== undefined) dropZoneAttrs.title = dropZoneTitle\n return {\n rootAttrs,\n dropZoneAttrs,\n inputAttrs,\n }\n})\n\nconst computedId = useId(() => props.id)\nconst stateClass = useStateClass(() => props.state)\n\n// Refs\nconst rootRef = useTemplateRef('rootRef')\nconst dropZoneRef = useTemplateRef('dropZoneRef')\nconst browseButtonRef = useTemplateRef('browseButtonRef')\nconst plainInputRef = useTemplateRef<HTMLInputElement>('plainInputRef')\nconst customInputRef = useTemplateRef<HTMLInputElement>('customInputRef')\n\n// Computed accept for file type validation\nconst computedAccept = computed(() =>\n typeof props.accept === 'string' ? props.accept : props.accept.join(',')\n)\n\n// VueUse file dialog (uses our hidden input element)\nconst {\n open,\n reset: resetDialog,\n onChange: onDialogChange,\n} = useFileDialog({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n input: customInputRef as unknown as Ref<HTMLInputElement>,\n})\n\n// VueUse drop zone (replaces manual drag/drop)\n// Note: We don't pass dataTypes because the accept attribute handles validation\n// and there is no reliable way to get MIME types from in all browsers\n// https://github.com/vueuse/vueuse/issues/4523\nconst {isOverDropZone} = useDropZone(dropZoneRef, {\n onDrop: (files) => {\n if (files && !props.noDrop) {\n handleFiles(files)\n }\n },\n multiple: props.multiple || props.directory,\n})\n\n// Computed properties\nconst hasLabelSlot = computed(() => !isEmptySlot(slots.label))\nconst hasPlaceholderSlot = computed(() => !isEmptySlot(slots.placeholder))\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\nconst computedPlainClasses = computed(() => [\n 'form-control',\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\n// Selected files (from dialog or managed state)\nconst internalFiles = ref<readonly File[]>([])\n\nconst selectedFiles = computed<readonly File[]>(() => internalFiles.value)\n\nconst hasFiles = computed(() => selectedFiles.value.length > 0)\n\nconst fileNames = computed(() => selectedFiles.value.map((file) => file.name))\n\nconst formattedFileNames = computed(() => {\n if (!hasFiles.value) return ''\n if (props.fileNameFormatter) {\n return props.fileNameFormatter(selectedFiles.value)\n }\n const names = fileNames.value\n if (names.length === 1) return names[0]\n return `${names.length} files selected`\n})\n\nconst showExternalDisplay = computed(\n () => !props.plain && props.showFileNames && (hasFiles.value || props.placeholder)\n)\n\nconst ariaLiveMessage = useAriaLiveMessage(\n selectedFiles,\n computed(() => props.ariaLiveFormatter)\n)\n\nconst effectiveBrowseText = computed(() => props.browseText ?? 'Browse')\nconst effectiveDropPlaceholder = computed(() => props.dropPlaceholder ?? 'Drop files here...')\n\n// Validate file against accept criteria\nconst isFileAccepted = (file: File): boolean => {\n if (!computedAccept.value) return true\n\n const acceptTypes = computedAccept.value.split(',').map((type) => type.trim())\n\n return acceptTypes.some((acceptType) => {\n // Extension match (e.g., .pdf)\n if (acceptType.startsWith('.')) {\n return file.name.toLowerCase().endsWith(acceptType.toLowerCase())\n }\n // Exact MIME type match (e.g., image/png)\n if (!acceptType.includes('*')) {\n return file.type === acceptType\n }\n // Wildcard MIME type match (e.g., image/* or */*)\n const slashIndex = acceptType.indexOf('/')\n if (slashIndex === -1) {\n // Malformed wildcard pattern (no '/'): do not match anything\n return false\n }\n const category = acceptType.slice(0, slashIndex)\n // */* should match any MIME type\n if (category === '*') {\n return true\n }\n return file.type.startsWith(`${category}/`)\n })\n}\n\n// File handling\nconst handleFiles = (files: File[] | FileList, nativeEvent?: Event) => {\n let fileArray: File[] = []\n\n if (nativeEvent) {\n // Plain mode: read from the event target (browser already filtered via accept)\n const input = nativeEvent.target as HTMLInputElement\n fileArray = input.files ? Array.from(input.files) : []\n } else {\n // Custom mode (drag & drop or file dialog): manually filter and set on hidden input\n fileArray = Array.from(files).filter((file) => isFileAccepted(file))\n if (customInputRef.value && typeof DataTransfer !== 'undefined') {\n try {\n const dataTransfer = new DataTransfer()\n fileArray.forEach((file) => dataTransfer.items.add(file))\n customInputRef.value.files = dataTransfer.files\n } catch {\n // In environments where DataTransfer is not fully supported, skip syncing files on the input\n }\n }\n }\n\n // Update internal state\n internalFiles.value = fileArray\n\n // Update model value\n if (fileArray.length === 0) {\n modelValue.value = null\n } else if (props.directory || props.multiple) {\n modelValue.value = fileArray\n } else {\n const [firstFile] = fileArray\n if (firstFile) {\n modelValue.value = firstFile\n }\n }\n\n // Emit change event in nextTick to ensure DOM updates\n // In plain mode: forward the native event (has target.files)\n // In custom mode: create CustomEvent with files in detail\n nextTick(() => {\n if (nativeEvent) {\n // Plain mode: forward native event\n emit('change', nativeEvent)\n } else {\n // Custom mode: create CustomEvent with files\n const changeEvent = new CustomEvent('change', {\n bubbles: true,\n cancelable: false,\n detail: {\n files: fileArray,\n target: {files: fileArray},\n },\n })\n // Also attach files directly for easier access\n Object.defineProperty(changeEvent, 'files', {\n value: fileArray,\n enumerable: true,\n })\n emit('change', changeEvent)\n }\n })\n}\n\n// Open file dialog\nconst openFileDialog = () => {\n if (!props.disabled) {\n open({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n })\n }\n}\n\n// Handle click on control wrapper (make entire control clickable like Bootstrap v5)\nconst handleControlClick = () => {\n // Don't trigger if clicking the button itself (button has its own handler with .stop)\n // Don't trigger if disabled\n if (!props.disabled) {\n openFileDialog()\n }\n}\n\n// Plain mode change handler\nconst onPlainChange = (e: Event) => {\n const input = e.target as HTMLInputElement\n if (input.files) {\n handleFiles(input.files, e) // Pass native event\n }\n}\n\n// Watch dialog files from useFileDialog\nonDialogChange((files) => {\n if (files) {\n handleFiles(files)\n }\n})\n\n// Reset method\nconst reset = () => {\n internalFiles.value = []\n modelValue.value = null\n resetDialog() // This resets the hidden input in custom mode\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n}\n\n// Focus management\nconst focus = () => {\n if (props.plain) {\n plainInputRef.value?.focus()\n } else {\n browseButtonRef.value?.focus()\n }\n}\n\nconst blur = () => {\n if (props.plain) {\n plainInputRef.value?.blur()\n } else {\n browseButtonRef.value?.blur()\n }\n}\n\n// Autofocus support - initial focus on mount\nonMounted(() => {\n if (props.autofocus) {\n nextTick(() => {\n focus()\n })\n }\n})\n\n// Autofocus support - runtime prop changes\nwatch(\n () => props.autofocus,\n (autofocus) => {\n if (autofocus) {\n focus()\n }\n }\n)\n\n// Watch modelValue changes from parent\nwatch(modelValue, (newValue) => {\n if (newValue === null) {\n internalFiles.value = []\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n } else if (Array.isArray(newValue)) {\n internalFiles.value = newValue as readonly File[]\n } else {\n internalFiles.value = [newValue] as readonly File[]\n }\n})\n\ndefineExpose({\n blur,\n element: computed(() => (props.plain ? plainInputRef.value : browseButtonRef.value)),\n focus,\n reset,\n})\n</script>\n","<template>\n <div ref=\"rootRef\" v-bind=\"processedAttrs.rootAttrs\" class=\"b-form-file-root\">\n <!-- Optional label -->\n <label\n v-if=\"hasLabelSlot || props.label\"\n class=\"form-label\"\n :class=\"props.labelClass\"\n :for=\"computedId\"\n >\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n\n <!-- Drop zone wrapper -->\n <div\n v-if=\"!props.plain\"\n ref=\"dropZoneRef\"\n v-bind=\"processedAttrs.dropZoneAttrs\"\n class=\"b-form-file-wrapper\"\n :class=\"{\n 'b-form-file-dragging': isOverDropZone && !props.noDrop,\n 'b-form-file-has-files': hasFiles,\n }\"\n >\n <!-- Custom file control (mimics Bootstrap native input) -->\n <div\n class=\"b-form-file-control\"\n :class=\"computedClasses\"\n :aria-disabled=\"props.disabled\"\n @click=\"handleControlClick\"\n >\n <!-- Custom browse button (now on LEFT to match Bootstrap v5) -->\n <button\n v-if=\"!props.noButton\"\n :id=\"computedId\"\n ref=\"browseButtonRef\"\n type=\"button\"\n class=\"b-form-file-button\"\n :disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n @click.stop=\"openFileDialog\"\n >\n {{ effectiveBrowseText }}\n </button>\n\n <!-- File name display -->\n <div class=\"b-form-file-text\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <span v-if=\"hasFiles\">{{ formattedFileNames }}</span>\n <span v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"text-muted\">\n <slot name=\"placeholder\">{{ props.placeholder }}</slot>\n </span>\n </slot>\n </div>\n </div>\n\n <!-- Drag overlay (only shown when dragging) -->\n <div v-if=\"isOverDropZone && !props.noDrop\" class=\"b-form-file-drag-overlay\">\n <slot name=\"drop-placeholder\">\n <div class=\"b-form-file-drag-text\">\n {{ effectiveDropPlaceholder }}\n </div>\n </slot>\n </div>\n\n <!-- Hidden input for form submission (positioned behind UI with z-index) -->\n <input\n ref=\"customInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :name=\"props.name\"\n :form=\"props.form\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :accept=\"computedAccept || undefined\"\n :capture=\"props.capture\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n style=\"\n position: absolute;\n z-index: -5;\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n \"\n />\n </div>\n\n <!-- Plain mode - simple native input -->\n <input\n v-else\n :id=\"computedId\"\n ref=\"plainInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :class=\"computedPlainClasses\"\n :form=\"props.form\"\n :name=\"props.name\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :capture=\"props.capture\"\n :accept=\"computedAccept || undefined\"\n :required=\"props.required || undefined\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :aria-required=\"props.required || undefined\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n @change=\"onPlainChange\"\n />\n\n <!-- External file display (when showFileNames is true and not plain) -->\n <div v-if=\"showExternalDisplay\" class=\"b-form-file-display mt-2\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <div v-if=\"hasFiles\" class=\"small text-muted\">\n {{ formattedFileNames }}\n </div>\n <div v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"small text-muted\">\n <slot name=\"placeholder\">\n {{ props.placeholder }}\n </slot>\n </div>\n </slot>\n </div>\n\n <!-- ARIA live region for screen reader announcements -->\n <div v-if=\"!props.plain\" class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ ariaLiveMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDropZone, useFileDialog} from '@vueuse/core'\nimport {computed, nextTick, onMounted, ref, type Ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {isEmptySlot} from '../../utils/dom'\nimport type {BFormFileProps, BFormFileSlots} from '../../types'\nimport {useAriaLiveMessage} from './useAriaLiveMessage'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormFileProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n accept: '',\n autofocus: false,\n browseText: undefined,\n capture: undefined,\n directory: false,\n disabled: false,\n dropPlaceholder: undefined,\n fileNameFormatter: undefined,\n ariaLiveFormatter: undefined,\n form: undefined,\n id: undefined,\n label: '',\n labelClass: undefined,\n multiple: false,\n name: undefined,\n noButton: false,\n noDrop: false,\n plain: false,\n placeholder: 'No file chosen',\n required: false,\n showFileNames: false,\n size: undefined,\n state: null,\n})\nconst props = useDefaults(_props, 'BFormFile')\nconst slots = defineSlots<BFormFileSlots>()\n\nconst emit = defineEmits<{\n change: [value: Event]\n}>()\n\nconst modelValue = defineModel<Exclude<BFormFileProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n // In plain mode, pass all attributes to the input element\n if (props.plain) {\n return {\n rootAttrs: {},\n dropZoneAttrs: {},\n inputAttrs: attrs,\n }\n }\n // In custom mode, split attributes:\n // - class/style go to root (for layout/positioning)\n // - title goes to drop zone (for tooltip on interactive element)\n // - everything else goes to hidden input (for form functionality)\n const {class: rootClass, style: rootStyle, title: dropZoneTitle, ...inputAttrs} = attrs\n const rootAttrs: Record<string, unknown> = {}\n const dropZoneAttrs: Record<string, unknown> = {}\n if (rootClass !== undefined) rootAttrs.class = rootClass\n if (rootStyle !== undefined) rootAttrs.style = rootStyle\n if (dropZoneTitle !== undefined) dropZoneAttrs.title = dropZoneTitle\n return {\n rootAttrs,\n dropZoneAttrs,\n inputAttrs,\n }\n})\n\nconst computedId = useId(() => props.id)\nconst stateClass = useStateClass(() => props.state)\n\n// Refs\nconst rootRef = useTemplateRef('rootRef')\nconst dropZoneRef = useTemplateRef('dropZoneRef')\nconst browseButtonRef = useTemplateRef('browseButtonRef')\nconst plainInputRef = useTemplateRef<HTMLInputElement>('plainInputRef')\nconst customInputRef = useTemplateRef<HTMLInputElement>('customInputRef')\n\n// Computed accept for file type validation\nconst computedAccept = computed(() =>\n typeof props.accept === 'string' ? props.accept : props.accept.join(',')\n)\n\n// VueUse file dialog (uses our hidden input element)\nconst {\n open,\n reset: resetDialog,\n onChange: onDialogChange,\n} = useFileDialog({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n input: customInputRef as unknown as Ref<HTMLInputElement>,\n})\n\n// VueUse drop zone (replaces manual drag/drop)\n// Note: We don't pass dataTypes because the accept attribute handles validation\n// and there is no reliable way to get MIME types from in all browsers\n// https://github.com/vueuse/vueuse/issues/4523\nconst {isOverDropZone} = useDropZone(dropZoneRef, {\n onDrop: (files) => {\n if (files && !props.noDrop) {\n handleFiles(files)\n }\n },\n multiple: props.multiple || props.directory,\n})\n\n// Computed properties\nconst hasLabelSlot = computed(() => !isEmptySlot(slots.label))\nconst hasPlaceholderSlot = computed(() => !isEmptySlot(slots.placeholder))\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\nconst computedPlainClasses = computed(() => [\n 'form-control',\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\n// Selected files (from dialog or managed state)\nconst internalFiles = ref<readonly File[]>([])\n\nconst selectedFiles = computed<readonly File[]>(() => internalFiles.value)\n\nconst hasFiles = computed(() => selectedFiles.value.length > 0)\n\nconst fileNames = computed(() => selectedFiles.value.map((file) => file.name))\n\nconst formattedFileNames = computed(() => {\n if (!hasFiles.value) return ''\n if (props.fileNameFormatter) {\n return props.fileNameFormatter(selectedFiles.value)\n }\n const names = fileNames.value\n if (names.length === 1) return names[0]\n return `${names.length} files selected`\n})\n\nconst showExternalDisplay = computed(\n () => !props.plain && props.showFileNames && (hasFiles.value || props.placeholder)\n)\n\nconst ariaLiveMessage = useAriaLiveMessage(\n selectedFiles,\n computed(() => props.ariaLiveFormatter)\n)\n\nconst effectiveBrowseText = computed(() => props.browseText ?? 'Browse')\nconst effectiveDropPlaceholder = computed(() => props.dropPlaceholder ?? 'Drop files here...')\n\n// Validate file against accept criteria\nconst isFileAccepted = (file: File): boolean => {\n if (!computedAccept.value) return true\n\n const acceptTypes = computedAccept.value.split(',').map((type) => type.trim())\n\n return acceptTypes.some((acceptType) => {\n // Extension match (e.g., .pdf)\n if (acceptType.startsWith('.')) {\n return file.name.toLowerCase().endsWith(acceptType.toLowerCase())\n }\n // Exact MIME type match (e.g., image/png)\n if (!acceptType.includes('*')) {\n return file.type === acceptType\n }\n // Wildcard MIME type match (e.g., image/* or */*)\n const slashIndex = acceptType.indexOf('/')\n if (slashIndex === -1) {\n // Malformed wildcard pattern (no '/'): do not match anything\n return false\n }\n const category = acceptType.slice(0, slashIndex)\n // */* should match any MIME type\n if (category === '*') {\n return true\n }\n return file.type.startsWith(`${category}/`)\n })\n}\n\n// File handling\nconst handleFiles = (files: File[] | FileList, nativeEvent?: Event) => {\n let fileArray: File[] = []\n\n if (nativeEvent) {\n // Plain mode: read from the event target (browser already filtered via accept)\n const input = nativeEvent.target as HTMLInputElement\n fileArray = input.files ? Array.from(input.files) : []\n } else {\n // Custom mode (drag & drop or file dialog): manually filter and set on hidden input\n fileArray = Array.from(files).filter((file) => isFileAccepted(file))\n if (customInputRef.value && typeof DataTransfer !== 'undefined') {\n try {\n const dataTransfer = new DataTransfer()\n fileArray.forEach((file) => dataTransfer.items.add(file))\n customInputRef.value.files = dataTransfer.files\n } catch {\n // In environments where DataTransfer is not fully supported, skip syncing files on the input\n }\n }\n }\n\n // Update internal state\n internalFiles.value = fileArray\n\n // Update model value\n if (fileArray.length === 0) {\n modelValue.value = null\n } else if (props.directory || props.multiple) {\n modelValue.value = fileArray\n } else {\n const [firstFile] = fileArray\n if (firstFile) {\n modelValue.value = firstFile\n }\n }\n\n // Emit change event in nextTick to ensure DOM updates\n // In plain mode: forward the native event (has target.files)\n // In custom mode: create CustomEvent with files in detail\n nextTick(() => {\n if (nativeEvent) {\n // Plain mode: forward native event\n emit('change', nativeEvent)\n } else {\n // Custom mode: create CustomEvent with files\n const changeEvent = new CustomEvent('change', {\n bubbles: true,\n cancelable: false,\n detail: {\n files: fileArray,\n target: {files: fileArray},\n },\n })\n // Also attach files directly for easier access\n Object.defineProperty(changeEvent, 'files', {\n value: fileArray,\n enumerable: true,\n })\n emit('change', changeEvent)\n }\n })\n}\n\n// Open file dialog\nconst openFileDialog = () => {\n if (!props.disabled) {\n open({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n })\n }\n}\n\n// Handle click on control wrapper (make entire control clickable like Bootstrap v5)\nconst handleControlClick = () => {\n // Don't trigger if clicking the button itself (button has its own handler with .stop)\n // Don't trigger if disabled\n if (!props.disabled) {\n openFileDialog()\n }\n}\n\n// Plain mode change handler\nconst onPlainChange = (e: Event) => {\n const input = e.target as HTMLInputElement\n if (input.files) {\n handleFiles(input.files, e) // Pass native event\n }\n}\n\n// Watch dialog files from useFileDialog\nonDialogChange((files) => {\n if (files) {\n handleFiles(files)\n }\n})\n\n// Reset method\nconst reset = () => {\n internalFiles.value = []\n modelValue.value = null\n resetDialog() // This resets the hidden input in custom mode\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n}\n\n// Focus management\nconst focus = () => {\n if (props.plain) {\n plainInputRef.value?.focus()\n } else {\n browseButtonRef.value?.focus()\n }\n}\n\nconst blur = () => {\n if (props.plain) {\n plainInputRef.value?.blur()\n } else {\n browseButtonRef.value?.blur()\n }\n}\n\n// Autofocus support - initial focus on mount\nonMounted(() => {\n if (props.autofocus) {\n nextTick(() => {\n focus()\n })\n }\n})\n\n// Autofocus support - runtime prop changes\nwatch(\n () => props.autofocus,\n (autofocus) => {\n if (autofocus) {\n focus()\n }\n }\n)\n\n// Watch modelValue changes from parent\nwatch(modelValue, (newValue) => {\n if (newValue === null) {\n internalFiles.value = []\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n } else if (Array.isArray(newValue)) {\n internalFiles.value = newValue as readonly File[]\n } else {\n internalFiles.value = [newValue] as readonly File[]\n }\n})\n\ndefineExpose({\n blur,\n element: computed(() => (props.plain ? plainInputRef.value : browseButtonRef.value)),\n focus,\n reset,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAa,sBACX,eACA,cACG;CACH,MAAM,kBAAkB,IAAI,EAAE;CAE9B,MAAM,gBAAgB,UAAmC;EACvD,IAAI,MAAM,WAAW,GAAG,OAAO;EAC/B,MAAM,KAAK,MAAM,SAAS;EAC1B,IAAI,IACF,OAAO,GAAG,KAAK;EAEjB,IAAI,MAAM,WAAW,GACnB,OAAO,kBAAkB,MAAM,EAAE,EAAE;EAErC,OAAO,GAAG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AIM,OAJN,aAIM,CAHJ,WAEO,KAAA,QAAA,eAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,WAAW,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAOhB,CAAA,MAAA,KAAA,CAAK,CAAC,SAAlB,UAAA,GAAA,mBAEM,OAFN,aAEM,gBADD,MAAA,eAAA,CAAe,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
|
|
1
|
+
{"version":3,"file":"BFormFile-D_s8tf1m.js","names":[],"sources":["../src/components/BFormFile/useAriaLiveMessage.ts","../src/components/BFormFile/BFormFile.vue","../src/components/BFormFile/BFormFile.vue"],"sourcesContent":["import {nextTick, readonly, ref, unref, watch, type MaybeRef, type Ref} from 'vue'\n\n/**\n * Manages an ARIA live region message with a clear-then-set pattern.\n *\n * Screen readers only announce `aria-live` content on a transition from empty\n * to non-empty text. By clearing the message first and then setting it in the\n * next tick we guarantee that every file selection produces that empty→non-empty\n * transition, even when the same file is selected again.\n */\nexport const useAriaLiveMessage = (\n selectedFiles: Ref<readonly File[]>,\n formatter: MaybeRef<((files: readonly File[]) => string) | undefined>\n) => {\n const ariaLiveMessage = ref('')\n\n const buildMessage = (files: readonly File[]): string => {\n if (files.length === 0) return ''\n const fn = unref(formatter)\n if (fn) {\n return fn(files)\n }\n if (files.length === 1) {\n return `File selected: ${files[0]?.name}`\n }\n return `${files.length} files selected`\n }\n\n watch(selectedFiles, async (files) => {\n ariaLiveMessage.value = ''\n await nextTick()\n ariaLiveMessage.value = buildMessage(files)\n })\n\n return readonly(ariaLiveMessage)\n}\n","<template>\n <div ref=\"rootRef\" v-bind=\"processedAttrs.rootAttrs\" class=\"b-form-file-root\">\n <!-- Optional label -->\n <label\n v-if=\"hasLabelSlot || props.label\"\n class=\"form-label\"\n :class=\"props.labelClass\"\n :for=\"computedId\"\n >\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n\n <!-- Drop zone wrapper -->\n <div\n v-if=\"!props.plain\"\n ref=\"dropZoneRef\"\n v-bind=\"processedAttrs.dropZoneAttrs\"\n class=\"b-form-file-wrapper\"\n :class=\"{\n 'b-form-file-dragging': isOverDropZone && !props.noDrop,\n 'b-form-file-has-files': hasFiles,\n }\"\n >\n <!-- Custom file control (mimics Bootstrap native input) -->\n <div\n class=\"b-form-file-control\"\n :class=\"computedClasses\"\n :aria-disabled=\"props.disabled\"\n @click=\"handleControlClick\"\n >\n <!-- Custom browse button (now on LEFT to match Bootstrap v5) -->\n <button\n v-if=\"!props.noButton\"\n :id=\"computedId\"\n ref=\"browseButtonRef\"\n type=\"button\"\n class=\"b-form-file-button\"\n :disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n @click.stop=\"openFileDialog\"\n >\n {{ effectiveBrowseText }}\n </button>\n\n <!-- File name display -->\n <div class=\"b-form-file-text\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <span v-if=\"hasFiles\">{{ formattedFileNames }}</span>\n <span v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"text-muted\">\n <slot name=\"placeholder\">{{ props.placeholder }}</slot>\n </span>\n </slot>\n </div>\n </div>\n\n <!-- Drag overlay (only shown when dragging) -->\n <div v-if=\"isOverDropZone && !props.noDrop\" class=\"b-form-file-drag-overlay\">\n <slot name=\"drop-placeholder\">\n <div class=\"b-form-file-drag-text\">\n {{ effectiveDropPlaceholder }}\n </div>\n </slot>\n </div>\n\n <!-- Hidden input for form submission (positioned behind UI with z-index) -->\n <input\n ref=\"customInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :name=\"props.name\"\n :form=\"props.form\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :accept=\"computedAccept || undefined\"\n :capture=\"props.capture\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n style=\"\n position: absolute;\n z-index: -5;\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n \"\n />\n </div>\n\n <!-- Plain mode - simple native input -->\n <input\n v-else\n :id=\"computedId\"\n ref=\"plainInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :class=\"computedPlainClasses\"\n :form=\"props.form\"\n :name=\"props.name\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :capture=\"props.capture\"\n :accept=\"computedAccept || undefined\"\n :required=\"props.required || undefined\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :aria-required=\"props.required || undefined\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n @change=\"onPlainChange\"\n />\n\n <!-- External file display (when showFileNames is true and not plain) -->\n <div v-if=\"showExternalDisplay\" class=\"b-form-file-display mt-2\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <div v-if=\"hasFiles\" class=\"small text-muted\">\n {{ formattedFileNames }}\n </div>\n <div v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"small text-muted\">\n <slot name=\"placeholder\">\n {{ props.placeholder }}\n </slot>\n </div>\n </slot>\n </div>\n\n <!-- ARIA live region for screen reader announcements -->\n <div v-if=\"!props.plain\" class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ ariaLiveMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDropZone, useFileDialog} from '@vueuse/core'\nimport {computed, nextTick, onMounted, ref, type Ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {isEmptySlot} from '../../utils/dom'\nimport type {BFormFileProps, BFormFileSlots} from '../../types'\nimport {useAriaLiveMessage} from './useAriaLiveMessage'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormFileProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n accept: '',\n autofocus: false,\n browseText: undefined,\n capture: undefined,\n directory: false,\n disabled: false,\n dropPlaceholder: undefined,\n fileNameFormatter: undefined,\n ariaLiveFormatter: undefined,\n form: undefined,\n id: undefined,\n label: '',\n labelClass: undefined,\n multiple: false,\n name: undefined,\n noButton: false,\n noDrop: false,\n plain: false,\n placeholder: 'No file chosen',\n required: false,\n showFileNames: false,\n size: undefined,\n state: null,\n})\nconst props = useDefaults(_props, 'BFormFile')\nconst slots = defineSlots<BFormFileSlots>()\n\nconst emit = defineEmits<{\n change: [value: Event]\n}>()\n\nconst modelValue = defineModel<Exclude<BFormFileProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n // In plain mode, pass all attributes to the input element\n if (props.plain) {\n return {\n rootAttrs: {},\n dropZoneAttrs: {},\n inputAttrs: attrs,\n }\n }\n // In custom mode, split attributes:\n // - class/style go to root (for layout/positioning)\n // - title goes to drop zone (for tooltip on interactive element)\n // - everything else goes to hidden input (for form functionality)\n const {class: rootClass, style: rootStyle, title: dropZoneTitle, ...inputAttrs} = attrs\n const rootAttrs: Record<string, unknown> = {}\n const dropZoneAttrs: Record<string, unknown> = {}\n if (rootClass !== undefined) rootAttrs.class = rootClass\n if (rootStyle !== undefined) rootAttrs.style = rootStyle\n if (dropZoneTitle !== undefined) dropZoneAttrs.title = dropZoneTitle\n return {\n rootAttrs,\n dropZoneAttrs,\n inputAttrs,\n }\n})\n\nconst computedId = useId(() => props.id)\nconst stateClass = useStateClass(() => props.state)\n\n// Refs\nconst rootRef = useTemplateRef('rootRef')\nconst dropZoneRef = useTemplateRef('dropZoneRef')\nconst browseButtonRef = useTemplateRef('browseButtonRef')\nconst plainInputRef = useTemplateRef<HTMLInputElement>('plainInputRef')\nconst customInputRef = useTemplateRef<HTMLInputElement>('customInputRef')\n\n// Computed accept for file type validation\nconst computedAccept = computed(() =>\n typeof props.accept === 'string' ? props.accept : props.accept.join(',')\n)\n\n// VueUse file dialog (uses our hidden input element)\nconst {\n open,\n reset: resetDialog,\n onChange: onDialogChange,\n} = useFileDialog({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n input: customInputRef as unknown as Ref<HTMLInputElement>,\n})\n\n// VueUse drop zone (replaces manual drag/drop)\n// Note: We don't pass dataTypes because the accept attribute handles validation\n// and there is no reliable way to get MIME types from in all browsers\n// https://github.com/vueuse/vueuse/issues/4523\nconst {isOverDropZone} = useDropZone(dropZoneRef, {\n onDrop: (files) => {\n if (files && !props.noDrop) {\n handleFiles(files)\n }\n },\n multiple: props.multiple || props.directory,\n})\n\n// Computed properties\nconst hasLabelSlot = computed(() => !isEmptySlot(slots.label))\nconst hasPlaceholderSlot = computed(() => !isEmptySlot(slots.placeholder))\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\nconst computedPlainClasses = computed(() => [\n 'form-control',\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\n// Selected files (from dialog or managed state)\nconst internalFiles = ref<readonly File[]>([])\n\nconst selectedFiles = computed<readonly File[]>(() => internalFiles.value)\n\nconst hasFiles = computed(() => selectedFiles.value.length > 0)\n\nconst fileNames = computed(() => selectedFiles.value.map((file) => file.name))\n\nconst formattedFileNames = computed(() => {\n if (!hasFiles.value) return ''\n if (props.fileNameFormatter) {\n return props.fileNameFormatter(selectedFiles.value)\n }\n const names = fileNames.value\n if (names.length === 1) return names[0]\n return `${names.length} files selected`\n})\n\nconst showExternalDisplay = computed(\n () => !props.plain && props.showFileNames && (hasFiles.value || props.placeholder)\n)\n\nconst ariaLiveMessage = useAriaLiveMessage(\n selectedFiles,\n computed(() => props.ariaLiveFormatter)\n)\n\nconst effectiveBrowseText = computed(() => props.browseText ?? 'Browse')\nconst effectiveDropPlaceholder = computed(() => props.dropPlaceholder ?? 'Drop files here...')\n\n// Validate file against accept criteria\nconst isFileAccepted = (file: File): boolean => {\n if (!computedAccept.value) return true\n\n const acceptTypes = computedAccept.value.split(',').map((type) => type.trim())\n\n return acceptTypes.some((acceptType) => {\n // Extension match (e.g., .pdf)\n if (acceptType.startsWith('.')) {\n return file.name.toLowerCase().endsWith(acceptType.toLowerCase())\n }\n // Exact MIME type match (e.g., image/png)\n if (!acceptType.includes('*')) {\n return file.type === acceptType\n }\n // Wildcard MIME type match (e.g., image/* or */*)\n const slashIndex = acceptType.indexOf('/')\n if (slashIndex === -1) {\n // Malformed wildcard pattern (no '/'): do not match anything\n return false\n }\n const category = acceptType.slice(0, slashIndex)\n // */* should match any MIME type\n if (category === '*') {\n return true\n }\n return file.type.startsWith(`${category}/`)\n })\n}\n\n// File handling\nconst handleFiles = (files: File[] | FileList, nativeEvent?: Event) => {\n let fileArray: File[] = []\n\n if (nativeEvent) {\n // Plain mode: read from the event target (browser already filtered via accept)\n const input = nativeEvent.target as HTMLInputElement\n fileArray = input.files ? Array.from(input.files) : []\n } else {\n // Custom mode (drag & drop or file dialog): manually filter and set on hidden input\n fileArray = Array.from(files).filter((file) => isFileAccepted(file))\n if (customInputRef.value && typeof DataTransfer !== 'undefined') {\n try {\n const dataTransfer = new DataTransfer()\n fileArray.forEach((file) => dataTransfer.items.add(file))\n customInputRef.value.files = dataTransfer.files\n } catch {\n // In environments where DataTransfer is not fully supported, skip syncing files on the input\n }\n }\n }\n\n // Update internal state\n internalFiles.value = fileArray\n\n // Update model value\n if (fileArray.length === 0) {\n modelValue.value = null\n } else if (props.directory || props.multiple) {\n modelValue.value = fileArray\n } else {\n const [firstFile] = fileArray\n if (firstFile) {\n modelValue.value = firstFile\n }\n }\n\n // Emit change event in nextTick to ensure DOM updates\n // In plain mode: forward the native event (has target.files)\n // In custom mode: create CustomEvent with files in detail\n nextTick(() => {\n if (nativeEvent) {\n // Plain mode: forward native event\n emit('change', nativeEvent)\n } else {\n // Custom mode: create CustomEvent with files\n const changeEvent = new CustomEvent('change', {\n bubbles: true,\n cancelable: false,\n detail: {\n files: fileArray,\n target: {files: fileArray},\n },\n })\n // Also attach files directly for easier access\n Object.defineProperty(changeEvent, 'files', {\n value: fileArray,\n enumerable: true,\n })\n emit('change', changeEvent)\n }\n })\n}\n\n// Open file dialog\nconst openFileDialog = () => {\n if (!props.disabled) {\n open({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n })\n }\n}\n\n// Handle click on control wrapper (make entire control clickable like Bootstrap v5)\nconst handleControlClick = () => {\n // Don't trigger if clicking the button itself (button has its own handler with .stop)\n // Don't trigger if disabled\n if (!props.disabled) {\n openFileDialog()\n }\n}\n\n// Plain mode change handler\nconst onPlainChange = (e: Event) => {\n const input = e.target as HTMLInputElement\n if (input.files) {\n handleFiles(input.files, e) // Pass native event\n }\n}\n\n// Watch dialog files from useFileDialog\nonDialogChange((files) => {\n if (files) {\n handleFiles(files)\n }\n})\n\n// Reset method\nconst reset = () => {\n internalFiles.value = []\n modelValue.value = null\n resetDialog() // This resets the hidden input in custom mode\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n}\n\n// Focus management\nconst focus = () => {\n if (props.plain) {\n plainInputRef.value?.focus()\n } else {\n browseButtonRef.value?.focus()\n }\n}\n\nconst blur = () => {\n if (props.plain) {\n plainInputRef.value?.blur()\n } else {\n browseButtonRef.value?.blur()\n }\n}\n\n// Autofocus support - initial focus on mount\nonMounted(() => {\n if (props.autofocus) {\n nextTick(() => {\n focus()\n })\n }\n})\n\n// Autofocus support - runtime prop changes\nwatch(\n () => props.autofocus,\n (autofocus) => {\n if (autofocus) {\n focus()\n }\n }\n)\n\n// Watch modelValue changes from parent\nwatch(modelValue, (newValue) => {\n if (newValue === null) {\n internalFiles.value = []\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n } else if (Array.isArray(newValue)) {\n internalFiles.value = newValue as readonly File[]\n } else {\n internalFiles.value = [newValue] as readonly File[]\n }\n})\n\ndefineExpose({\n blur,\n element: computed(() => (props.plain ? plainInputRef.value : browseButtonRef.value)),\n focus,\n reset,\n})\n</script>\n","<template>\n <div ref=\"rootRef\" v-bind=\"processedAttrs.rootAttrs\" class=\"b-form-file-root\">\n <!-- Optional label -->\n <label\n v-if=\"hasLabelSlot || props.label\"\n class=\"form-label\"\n :class=\"props.labelClass\"\n :for=\"computedId\"\n >\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n\n <!-- Drop zone wrapper -->\n <div\n v-if=\"!props.plain\"\n ref=\"dropZoneRef\"\n v-bind=\"processedAttrs.dropZoneAttrs\"\n class=\"b-form-file-wrapper\"\n :class=\"{\n 'b-form-file-dragging': isOverDropZone && !props.noDrop,\n 'b-form-file-has-files': hasFiles,\n }\"\n >\n <!-- Custom file control (mimics Bootstrap native input) -->\n <div\n class=\"b-form-file-control\"\n :class=\"computedClasses\"\n :aria-disabled=\"props.disabled\"\n @click=\"handleControlClick\"\n >\n <!-- Custom browse button (now on LEFT to match Bootstrap v5) -->\n <button\n v-if=\"!props.noButton\"\n :id=\"computedId\"\n ref=\"browseButtonRef\"\n type=\"button\"\n class=\"b-form-file-button\"\n :disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n @click.stop=\"openFileDialog\"\n >\n {{ effectiveBrowseText }}\n </button>\n\n <!-- File name display -->\n <div class=\"b-form-file-text\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <span v-if=\"hasFiles\">{{ formattedFileNames }}</span>\n <span v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"text-muted\">\n <slot name=\"placeholder\">{{ props.placeholder }}</slot>\n </span>\n </slot>\n </div>\n </div>\n\n <!-- Drag overlay (only shown when dragging) -->\n <div v-if=\"isOverDropZone && !props.noDrop\" class=\"b-form-file-drag-overlay\">\n <slot name=\"drop-placeholder\">\n <div class=\"b-form-file-drag-text\">\n {{ effectiveDropPlaceholder }}\n </div>\n </slot>\n </div>\n\n <!-- Hidden input for form submission (positioned behind UI with z-index) -->\n <input\n ref=\"customInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :name=\"props.name\"\n :form=\"props.form\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :required=\"props.required\"\n :accept=\"computedAccept || undefined\"\n :capture=\"props.capture\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n tabindex=\"-1\"\n aria-hidden=\"true\"\n style=\"\n position: absolute;\n z-index: -5;\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n \"\n />\n </div>\n\n <!-- Plain mode - simple native input -->\n <input\n v-else\n :id=\"computedId\"\n ref=\"plainInputRef\"\n v-bind=\"processedAttrs.inputAttrs\"\n type=\"file\"\n :class=\"computedPlainClasses\"\n :form=\"props.form\"\n :name=\"props.name\"\n :multiple=\"props.multiple || props.directory\"\n :disabled=\"props.disabled\"\n :capture=\"props.capture\"\n :accept=\"computedAccept || undefined\"\n :required=\"props.required || undefined\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :aria-required=\"props.required || undefined\"\n :directory=\"props.directory || undefined\"\n :webkitdirectory=\"props.directory || undefined\"\n @change=\"onPlainChange\"\n />\n\n <!-- External file display (when showFileNames is true and not plain) -->\n <div v-if=\"showExternalDisplay\" class=\"b-form-file-display mt-2\">\n <slot name=\"file-name\" :files=\"selectedFiles\" :names=\"fileNames\">\n <div v-if=\"hasFiles\" class=\"small text-muted\">\n {{ formattedFileNames }}\n </div>\n <div v-else-if=\"hasPlaceholderSlot || props.placeholder\" class=\"small text-muted\">\n <slot name=\"placeholder\">\n {{ props.placeholder }}\n </slot>\n </div>\n </slot>\n </div>\n\n <!-- ARIA live region for screen reader announcements -->\n <div v-if=\"!props.plain\" class=\"visually-hidden\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ ariaLiveMessage }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {useDropZone, useFileDialog} from '@vueuse/core'\nimport {computed, nextTick, onMounted, ref, type Ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {isEmptySlot} from '../../utils/dom'\nimport type {BFormFileProps, BFormFileSlots} from '../../types'\nimport {useAriaLiveMessage} from './useAriaLiveMessage'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormFileProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n accept: '',\n autofocus: false,\n browseText: undefined,\n capture: undefined,\n directory: false,\n disabled: false,\n dropPlaceholder: undefined,\n fileNameFormatter: undefined,\n ariaLiveFormatter: undefined,\n form: undefined,\n id: undefined,\n label: '',\n labelClass: undefined,\n multiple: false,\n name: undefined,\n noButton: false,\n noDrop: false,\n plain: false,\n placeholder: 'No file chosen',\n required: false,\n showFileNames: false,\n size: undefined,\n state: null,\n})\nconst props = useDefaults(_props, 'BFormFile')\nconst slots = defineSlots<BFormFileSlots>()\n\nconst emit = defineEmits<{\n change: [value: Event]\n}>()\n\nconst modelValue = defineModel<Exclude<BFormFileProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n // In plain mode, pass all attributes to the input element\n if (props.plain) {\n return {\n rootAttrs: {},\n dropZoneAttrs: {},\n inputAttrs: attrs,\n }\n }\n // In custom mode, split attributes:\n // - class/style go to root (for layout/positioning)\n // - title goes to drop zone (for tooltip on interactive element)\n // - everything else goes to hidden input (for form functionality)\n const {class: rootClass, style: rootStyle, title: dropZoneTitle, ...inputAttrs} = attrs\n const rootAttrs: Record<string, unknown> = {}\n const dropZoneAttrs: Record<string, unknown> = {}\n if (rootClass !== undefined) rootAttrs.class = rootClass\n if (rootStyle !== undefined) rootAttrs.style = rootStyle\n if (dropZoneTitle !== undefined) dropZoneAttrs.title = dropZoneTitle\n return {\n rootAttrs,\n dropZoneAttrs,\n inputAttrs,\n }\n})\n\nconst computedId = useId(() => props.id)\nconst stateClass = useStateClass(() => props.state)\n\n// Refs\nconst rootRef = useTemplateRef('rootRef')\nconst dropZoneRef = useTemplateRef('dropZoneRef')\nconst browseButtonRef = useTemplateRef('browseButtonRef')\nconst plainInputRef = useTemplateRef<HTMLInputElement>('plainInputRef')\nconst customInputRef = useTemplateRef<HTMLInputElement>('customInputRef')\n\n// Computed accept for file type validation\nconst computedAccept = computed(() =>\n typeof props.accept === 'string' ? props.accept : props.accept.join(',')\n)\n\n// VueUse file dialog (uses our hidden input element)\nconst {\n open,\n reset: resetDialog,\n onChange: onDialogChange,\n} = useFileDialog({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n input: customInputRef as unknown as Ref<HTMLInputElement>,\n})\n\n// VueUse drop zone (replaces manual drag/drop)\n// Note: We don't pass dataTypes because the accept attribute handles validation\n// and there is no reliable way to get MIME types from in all browsers\n// https://github.com/vueuse/vueuse/issues/4523\nconst {isOverDropZone} = useDropZone(dropZoneRef, {\n onDrop: (files) => {\n if (files && !props.noDrop) {\n handleFiles(files)\n }\n },\n multiple: props.multiple || props.directory,\n})\n\n// Computed properties\nconst hasLabelSlot = computed(() => !isEmptySlot(slots.label))\nconst hasPlaceholderSlot = computed(() => !isEmptySlot(slots.placeholder))\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\nconst computedPlainClasses = computed(() => [\n 'form-control',\n stateClass.value,\n {\n [`form-control-${props.size}`]: props.size !== undefined,\n },\n])\n\n// Selected files (from dialog or managed state)\nconst internalFiles = ref<readonly File[]>([])\n\nconst selectedFiles = computed<readonly File[]>(() => internalFiles.value)\n\nconst hasFiles = computed(() => selectedFiles.value.length > 0)\n\nconst fileNames = computed(() => selectedFiles.value.map((file) => file.name))\n\nconst formattedFileNames = computed(() => {\n if (!hasFiles.value) return ''\n if (props.fileNameFormatter) {\n return props.fileNameFormatter(selectedFiles.value)\n }\n const names = fileNames.value\n if (names.length === 1) return names[0]\n return `${names.length} files selected`\n})\n\nconst showExternalDisplay = computed(\n () => !props.plain && props.showFileNames && (hasFiles.value || props.placeholder)\n)\n\nconst ariaLiveMessage = useAriaLiveMessage(\n selectedFiles,\n computed(() => props.ariaLiveFormatter)\n)\n\nconst effectiveBrowseText = computed(() => props.browseText ?? 'Browse')\nconst effectiveDropPlaceholder = computed(() => props.dropPlaceholder ?? 'Drop files here...')\n\n// Validate file against accept criteria\nconst isFileAccepted = (file: File): boolean => {\n if (!computedAccept.value) return true\n\n const acceptTypes = computedAccept.value.split(',').map((type) => type.trim())\n\n return acceptTypes.some((acceptType) => {\n // Extension match (e.g., .pdf)\n if (acceptType.startsWith('.')) {\n return file.name.toLowerCase().endsWith(acceptType.toLowerCase())\n }\n // Exact MIME type match (e.g., image/png)\n if (!acceptType.includes('*')) {\n return file.type === acceptType\n }\n // Wildcard MIME type match (e.g., image/* or */*)\n const slashIndex = acceptType.indexOf('/')\n if (slashIndex === -1) {\n // Malformed wildcard pattern (no '/'): do not match anything\n return false\n }\n const category = acceptType.slice(0, slashIndex)\n // */* should match any MIME type\n if (category === '*') {\n return true\n }\n return file.type.startsWith(`${category}/`)\n })\n}\n\n// File handling\nconst handleFiles = (files: File[] | FileList, nativeEvent?: Event) => {\n let fileArray: File[] = []\n\n if (nativeEvent) {\n // Plain mode: read from the event target (browser already filtered via accept)\n const input = nativeEvent.target as HTMLInputElement\n fileArray = input.files ? Array.from(input.files) : []\n } else {\n // Custom mode (drag & drop or file dialog): manually filter and set on hidden input\n fileArray = Array.from(files).filter((file) => isFileAccepted(file))\n if (customInputRef.value && typeof DataTransfer !== 'undefined') {\n try {\n const dataTransfer = new DataTransfer()\n fileArray.forEach((file) => dataTransfer.items.add(file))\n customInputRef.value.files = dataTransfer.files\n } catch {\n // In environments where DataTransfer is not fully supported, skip syncing files on the input\n }\n }\n }\n\n // Update internal state\n internalFiles.value = fileArray\n\n // Update model value\n if (fileArray.length === 0) {\n modelValue.value = null\n } else if (props.directory || props.multiple) {\n modelValue.value = fileArray\n } else {\n const [firstFile] = fileArray\n if (firstFile) {\n modelValue.value = firstFile\n }\n }\n\n // Emit change event in nextTick to ensure DOM updates\n // In plain mode: forward the native event (has target.files)\n // In custom mode: create CustomEvent with files in detail\n nextTick(() => {\n if (nativeEvent) {\n // Plain mode: forward native event\n emit('change', nativeEvent)\n } else {\n // Custom mode: create CustomEvent with files\n const changeEvent = new CustomEvent('change', {\n bubbles: true,\n cancelable: false,\n detail: {\n files: fileArray,\n target: {files: fileArray},\n },\n })\n // Also attach files directly for easier access\n Object.defineProperty(changeEvent, 'files', {\n value: fileArray,\n enumerable: true,\n })\n emit('change', changeEvent)\n }\n })\n}\n\n// Open file dialog\nconst openFileDialog = () => {\n if (!props.disabled) {\n open({\n accept: computedAccept.value,\n multiple: props.multiple || props.directory,\n directory: props.directory,\n })\n }\n}\n\n// Handle click on control wrapper (make entire control clickable like Bootstrap v5)\nconst handleControlClick = () => {\n // Don't trigger if clicking the button itself (button has its own handler with .stop)\n // Don't trigger if disabled\n if (!props.disabled) {\n openFileDialog()\n }\n}\n\n// Plain mode change handler\nconst onPlainChange = (e: Event) => {\n const input = e.target as HTMLInputElement\n if (input.files) {\n handleFiles(input.files, e) // Pass native event\n }\n}\n\n// Watch dialog files from useFileDialog\nonDialogChange((files) => {\n if (files) {\n handleFiles(files)\n }\n})\n\n// Reset method\nconst reset = () => {\n internalFiles.value = []\n modelValue.value = null\n resetDialog() // This resets the hidden input in custom mode\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n}\n\n// Focus management\nconst focus = () => {\n if (props.plain) {\n plainInputRef.value?.focus()\n } else {\n browseButtonRef.value?.focus()\n }\n}\n\nconst blur = () => {\n if (props.plain) {\n plainInputRef.value?.blur()\n } else {\n browseButtonRef.value?.blur()\n }\n}\n\n// Autofocus support - initial focus on mount\nonMounted(() => {\n if (props.autofocus) {\n nextTick(() => {\n focus()\n })\n }\n})\n\n// Autofocus support - runtime prop changes\nwatch(\n () => props.autofocus,\n (autofocus) => {\n if (autofocus) {\n focus()\n }\n }\n)\n\n// Watch modelValue changes from parent\nwatch(modelValue, (newValue) => {\n if (newValue === null) {\n internalFiles.value = []\n if (plainInputRef.value) {\n plainInputRef.value.value = ''\n }\n } else if (Array.isArray(newValue)) {\n internalFiles.value = newValue as readonly File[]\n } else {\n internalFiles.value = [newValue] as readonly File[]\n }\n})\n\ndefineExpose({\n blur,\n element: computed(() => (props.plain ? plainInputRef.value : browseButtonRef.value)),\n focus,\n reset,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAa,sBACX,eACA,cACG;CACH,MAAM,kBAAkB,IAAI,EAAE;CAE9B,MAAM,gBAAgB,UAAmC;EACvD,IAAI,MAAM,WAAW,GAAG,OAAO;EAC/B,MAAM,KAAK,MAAM,SAAS;EAC1B,IAAI,IACF,OAAO,GAAG,KAAK;EAEjB,IAAI,MAAM,WAAW,GACnB,OAAO,kBAAkB,MAAM,EAAE,EAAE;EAErC,OAAO,GAAG,MAAM,OAAO;CACzB;CAEA,MAAM,eAAe,OAAO,UAAU;EACpC,gBAAgB,QAAQ;EACxB,MAAM,SAAS;EACf,gBAAgB,QAAQ,aAAa,KAAK;CAC5C,CAAC;CAED,OAAO,SAAS,eAAe;AACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECiJA,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,mBAAA,IAAA,IAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as inputGroupKey } from "./keys-BgLwJbLV.js";
|
|
2
2
|
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
3
|
-
import { n as normalizeInput, t as useFormInput } from "./useFormInput-
|
|
3
|
+
import { n as normalizeInput, t as useFormInput } from "./useFormInput-CMtXFoM2.js";
|
|
4
4
|
import { computed, createElementBlock, defineComponent, inject, mergeModels, normalizeClass, openBlock, unref, useModel, useTemplateRef } from "vue";
|
|
5
5
|
//#region src/components/BFormInput/BFormInput.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = [
|
|
@@ -133,4 +133,4 @@ var BFormInput_default = /* @__PURE__ */ defineComponent({
|
|
|
133
133
|
//#endregion
|
|
134
134
|
export { BFormInput_default as t };
|
|
135
135
|
|
|
136
|
-
//# sourceMappingURL=BFormInput-
|
|
136
|
+
//# sourceMappingURL=BFormInput-DnIBPLCx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormInput-
|
|
1
|
+
{"version":3,"file":"BFormInput-DnIBPLCx.js","names":[],"sources":["../src/components/BFormInput/BFormInput.vue","../src/components/BFormInput/BFormInput.vue"],"sourcesContent":["<template>\n <input\n :id=\"computedId\"\n ref=\"_input\"\n :value=\"computedValue\"\n :class=\"computedClasses\"\n :name=\"props.name || undefined\"\n :form=\"props.form || undefined\"\n :type=\"props.type\"\n :disabled=\"isDisabled\"\n :placeholder=\"props.placeholder\"\n :required=\"props.required || undefined\"\n :autocomplete=\"props.autocomplete || undefined\"\n :readonly=\"props.readonly || props.plaintext\"\n :min=\"props.min\"\n :max=\"props.max\"\n :step=\"props.step\"\n :list=\"props.type !== 'password' ? props.list : undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n @input=\"onInput\"\n @change=\"onChange\"\n @blur=\"onBlur\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {normalizeInput} from '../../utils/normalizeInput'\nimport type {BFormInputProps} from '../../types'\nimport {useFormInput} from '../../composables/useFormInput'\nimport {inputGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<Omit<BFormInputProps, 'modelValue'>>(), {\n max: undefined,\n min: undefined,\n step: undefined,\n type: 'text',\n // CommonInputProps\n ariaInvalid: undefined,\n autocomplete: undefined,\n autofocus: false,\n debounce: 0,\n debounceMaxWait: Number.NaN,\n disabled: false,\n form: undefined,\n formatter: undefined,\n id: undefined,\n lazyFormatter: false,\n list: undefined,\n modelValue: '',\n name: undefined,\n placeholder: undefined,\n plaintext: false,\n readonly: false,\n required: false,\n size: undefined,\n state: undefined,\n // End CommonInputProps\n})\nconst props = useDefaults(_props, 'BFormInput')\n\nconst [modelValue, modelModifiers] = defineModel<\n Exclude<BFormInputProps['modelValue'], undefined>,\n 'trim' | 'lazy' | 'number'\n>({\n default: '',\n set: (v) => normalizeInput(v, modelModifiers),\n})\n\nconst input = useTemplateRef('_input')\n\nconst inInputGroup = inject(inputGroupKey, false)\n\nconst {\n computedId,\n computedAriaInvalid,\n computedValue,\n onInput,\n onChange,\n onBlur,\n stateClass,\n focus,\n blur,\n isDisabled,\n} = useFormInput(props, input, modelValue, modelModifiers)\n\nconst computedClasses = computed(() => {\n const isRange = props.type === 'range'\n const isColor = props.type === 'color'\n return [\n stateClass.value,\n {\n 'form-range': isRange,\n 'form-control': isColor || (!props.plaintext && !isRange) || (isRange && inInputGroup),\n 'form-control-color': isColor,\n 'form-control-plaintext': props.plaintext && !isRange && !isColor,\n [`form-control-${props.size}`]: !!props.size,\n },\n ]\n})\n\ndefineExpose({\n blur,\n element: input,\n flushDebounce: onBlur,\n focus,\n})\n</script>\n","<template>\n <input\n :id=\"computedId\"\n ref=\"_input\"\n :value=\"computedValue\"\n :class=\"computedClasses\"\n :name=\"props.name || undefined\"\n :form=\"props.form || undefined\"\n :type=\"props.type\"\n :disabled=\"isDisabled\"\n :placeholder=\"props.placeholder\"\n :required=\"props.required || undefined\"\n :autocomplete=\"props.autocomplete || undefined\"\n :readonly=\"props.readonly || props.plaintext\"\n :min=\"props.min\"\n :max=\"props.max\"\n :step=\"props.step\"\n :list=\"props.type !== 'password' ? props.list : undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n @input=\"onInput\"\n @change=\"onChange\"\n @blur=\"onBlur\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {normalizeInput} from '../../utils/normalizeInput'\nimport type {BFormInputProps} from '../../types'\nimport {useFormInput} from '../../composables/useFormInput'\nimport {inputGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<Omit<BFormInputProps, 'modelValue'>>(), {\n max: undefined,\n min: undefined,\n step: undefined,\n type: 'text',\n // CommonInputProps\n ariaInvalid: undefined,\n autocomplete: undefined,\n autofocus: false,\n debounce: 0,\n debounceMaxWait: Number.NaN,\n disabled: false,\n form: undefined,\n formatter: undefined,\n id: undefined,\n lazyFormatter: false,\n list: undefined,\n modelValue: '',\n name: undefined,\n placeholder: undefined,\n plaintext: false,\n readonly: false,\n required: false,\n size: undefined,\n state: undefined,\n // End CommonInputProps\n})\nconst props = useDefaults(_props, 'BFormInput')\n\nconst [modelValue, modelModifiers] = defineModel<\n Exclude<BFormInputProps['modelValue'], undefined>,\n 'trim' | 'lazy' | 'number'\n>({\n default: '',\n set: (v) => normalizeInput(v, modelModifiers),\n})\n\nconst input = useTemplateRef('_input')\n\nconst inInputGroup = inject(inputGroupKey, false)\n\nconst {\n computedId,\n computedAriaInvalid,\n computedValue,\n onInput,\n onChange,\n onBlur,\n stateClass,\n focus,\n blur,\n isDisabled,\n} = useFormInput(props, input, modelValue, modelModifiers)\n\nconst computedClasses = computed(() => {\n const isRange = props.type === 'range'\n const isColor = props.type === 'color'\n return [\n stateClass.value,\n {\n 'form-range': isRange,\n 'form-control': isColor || (!props.plaintext && !isRange) || (isRange && inInputGroup),\n 'form-control-color': isColor,\n 'form-control-plaintext': props.plaintext && !isRange && !isColor,\n [`form-control-${props.size}`]: !!props.size,\n },\n ]\n})\n\ndefineExpose({\n blur,\n element: input,\n flushDebounce: onBlur,\n focus,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,MAAM,QAAQ,YAAY,SAAQ,YAAY;EAE9C,MAAM,CAAC,YAAY,kBAAkB,SAGpC,SAAA,cAAC,EAEA,MAAM,MAAM,eAAe,GAAG,cAAc,EAC9C,CAAC;EAED,MAAM,QAAQ,eAAe,QAAQ;EAErC,MAAM,eAAe,OAAO,eAAe,KAAK;EAEhD,MAAM,EACJ,YACA,qBACA,eACA,SACA,UACA,QACA,YACA,OACA,MACA,eACE,aAAa,OAAO,OAAO,YAAY,cAAc;EAEzD,MAAM,kBAAkB,eAAe;GACrC,MAAM,UAAU,MAAM,SAAS;GAC/B,MAAM,UAAU,MAAM,SAAS;GAC/B,OAAO,CACL,WAAW,OACX;IACE,cAAc;IACd,gBAAgB,WAAY,CAAC,MAAM,aAAa,CAAC,WAAa,WAAW;IACzE,sBAAsB;IACtB,0BAA0B,MAAM,aAAa,CAAC,WAAW,CAAC;KACzD,gBAAgB,MAAM,SAAS,CAAC,CAAC,MAAM;GAC1C,CACF;EACF,CAAC;EAED,SAAa;GACX;GACA,SAAS;GACT,eAAe;GACf;EACF,CAAC;;GA3GC,OAAA,UAAA,GAAA,mBAsBE,SAAA;IArBC,IAAI,MAAA,UAAA;IACL,KAAI;IACH,OAAO,MAAA,aAAA;IACP,OAAK,eAAE,gBAAA,KAAe;IACtB,MAAM,MAAA,KAAA,CAAK,CAAC,QAAQ,KAAA;IACpB,MAAM,MAAA,KAAA,CAAK,CAAC,QAAQ,KAAA;IACpB,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,UAAU,MAAA,UAAA;IACV,aAAa,MAAA,KAAA,CAAK,CAAC;IACnB,UAAU,MAAA,KAAA,CAAK,CAAC,YAAY,KAAA;IAC5B,cAAc,MAAA,KAAA,CAAK,CAAC,gBAAgB,KAAA;IACpC,UAAU,MAAA,KAAA,CAAK,CAAC,YAAY,MAAA,KAAA,CAAK,CAAC;IAClC,KAAK,MAAA,KAAA,CAAK,CAAC;IACX,KAAK,MAAA,KAAA,CAAK,CAAC;IACX,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,MAAM,MAAA,KAAA,CAAK,CAAC,SAAI,aAAkB,MAAA,KAAA,CAAK,CAAC,OAAO,KAAA;IAC/C,iBAAe,MAAA,KAAA,CAAK,CAAC,YAAY,KAAA;IACjC,gBAAc,MAAA,mBAAA;IACd,SAAK,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,MAAA,OAAA,KAAA,MAAA,OAAA,CAAA,CAAA,GAAA,IAAA;IACP,UAAM,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,MAAA,QAAA,KAAA,MAAA,QAAA,CAAA,CAAA,GAAA,IAAA;IACR,QAAI,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,MAAA,MAAA,KAAA,MAAA,MAAA,CAAA,CAAA,GAAA,IAAA"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
2
|
+
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
3
|
+
import { t as BFormInput_default } from "./BFormInput-DnIBPLCx.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createElementBlock, createVNode, defineComponent, mergeModels, normalizeClass, openBlock, renderList, unref, useModel, withCtx } from "vue";
|
|
5
|
+
import { useToNumber } from "@vueuse/core";
|
|
6
|
+
import { PinInputInput, PinInputRoot } from "reka-ui";
|
|
7
|
+
//#region src/components/BFormOtp/BFormOtp.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var lengthDefault = 6;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/components/BFormOtp/BFormOtp.vue
|
|
11
|
+
var BFormOtp_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "BFormOtp",
|
|
13
|
+
props: /*@__PURE__*/ mergeModels({
|
|
14
|
+
ariaInvalid: {
|
|
15
|
+
type: [Boolean, String],
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
ariaLabel: { default: void 0 },
|
|
19
|
+
autofocus: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
dir: { default: void 0 },
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
form: { default: void 0 },
|
|
29
|
+
id: { default: void 0 },
|
|
30
|
+
length: { default: lengthDefault },
|
|
31
|
+
mask: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
name: { default: void 0 },
|
|
36
|
+
otp: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false
|
|
39
|
+
},
|
|
40
|
+
placeholder: { default: "" },
|
|
41
|
+
plaintext: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
45
|
+
readonly: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
required: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false
|
|
52
|
+
},
|
|
53
|
+
separator: {},
|
|
54
|
+
size: { default: void 0 },
|
|
55
|
+
state: {
|
|
56
|
+
type: [Boolean, null],
|
|
57
|
+
default: null
|
|
58
|
+
},
|
|
59
|
+
type: { default: "text" }
|
|
60
|
+
}, {
|
|
61
|
+
"modelValue": { default: () => [] },
|
|
62
|
+
"modelModifiers": {}
|
|
63
|
+
}),
|
|
64
|
+
emits: /*@__PURE__*/ mergeModels(["complete"], ["update:modelValue"]),
|
|
65
|
+
setup(__props, { emit: __emit }) {
|
|
66
|
+
const props = useDefaults(__props, "BFormOtp");
|
|
67
|
+
const emit = __emit;
|
|
68
|
+
const modelValue = useModel(__props, "modelValue");
|
|
69
|
+
const computedId = useId$1(() => props.id, "form-otp");
|
|
70
|
+
const lengthNumber = useToNumber(() => props.length, {
|
|
71
|
+
nanToZero: true,
|
|
72
|
+
method: "parseInt"
|
|
73
|
+
});
|
|
74
|
+
const computedLength = computed(() => lengthNumber.value > 0 ? lengthNumber.value : lengthDefault);
|
|
75
|
+
const rootClasses = computed(() => [
|
|
76
|
+
"b-form-otp",
|
|
77
|
+
"d-flex",
|
|
78
|
+
"gap-2",
|
|
79
|
+
"align-items-center",
|
|
80
|
+
{ [`b-form-otp-${props.size}`]: !!props.size }
|
|
81
|
+
]);
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return openBlock(), createBlock(unref(PinInputRoot), {
|
|
84
|
+
id: unref(computedId),
|
|
85
|
+
modelValue: modelValue.value,
|
|
86
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
87
|
+
class: normalizeClass(rootClasses.value),
|
|
88
|
+
disabled: unref(props).disabled,
|
|
89
|
+
dir: unref(props).dir,
|
|
90
|
+
mask: unref(props).mask,
|
|
91
|
+
name: unref(props).name,
|
|
92
|
+
otp: unref(props).otp,
|
|
93
|
+
placeholder: unref(props).placeholder,
|
|
94
|
+
required: unref(props).required,
|
|
95
|
+
type: unref(props).type,
|
|
96
|
+
onComplete: _cache[1] || (_cache[1] = ($event) => emit("complete", $event))
|
|
97
|
+
}, {
|
|
98
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(computedLength.value, (_, i) => {
|
|
99
|
+
return openBlock(), createBlock(unref(PinInputInput), {
|
|
100
|
+
key: i,
|
|
101
|
+
index: i,
|
|
102
|
+
disabled: unref(props).disabled,
|
|
103
|
+
"as-child": ""
|
|
104
|
+
}, {
|
|
105
|
+
default: withCtx(() => [createVNode(BFormInput_default, {
|
|
106
|
+
class: "b-form-otp-field",
|
|
107
|
+
"aria-label": `${unref(props).ariaLabel || "Pin"} ${i + 1} of ${computedLength.value}`,
|
|
108
|
+
"aria-invalid": unref(props).ariaInvalid,
|
|
109
|
+
autofocus: unref(props).autofocus && i === 0,
|
|
110
|
+
disabled: unref(props).disabled,
|
|
111
|
+
form: unref(props).form,
|
|
112
|
+
plaintext: unref(props).plaintext,
|
|
113
|
+
readonly: unref(props).readonly,
|
|
114
|
+
size: unref(props).size,
|
|
115
|
+
state: unref(props).state
|
|
116
|
+
}, null, 8, [
|
|
117
|
+
"aria-label",
|
|
118
|
+
"aria-invalid",
|
|
119
|
+
"autofocus",
|
|
120
|
+
"disabled",
|
|
121
|
+
"form",
|
|
122
|
+
"plaintext",
|
|
123
|
+
"readonly",
|
|
124
|
+
"size",
|
|
125
|
+
"state"
|
|
126
|
+
])]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1032, ["index", "disabled"]);
|
|
129
|
+
}), 128))]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 8, [
|
|
132
|
+
"id",
|
|
133
|
+
"modelValue",
|
|
134
|
+
"class",
|
|
135
|
+
"disabled",
|
|
136
|
+
"dir",
|
|
137
|
+
"mask",
|
|
138
|
+
"name",
|
|
139
|
+
"otp",
|
|
140
|
+
"placeholder",
|
|
141
|
+
"required",
|
|
142
|
+
"type"
|
|
143
|
+
]);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
//#endregion
|
|
148
|
+
export { BFormOtp_default as t };
|
|
149
|
+
|
|
150
|
+
//# sourceMappingURL=BFormOtp-Dx2RxPAW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BFormOtp-Dx2RxPAW.js","names":[],"sources":["../src/components/BFormOtp/BFormOtp.vue","../src/components/BFormOtp/BFormOtp.vue"],"sourcesContent":["<template>\n <PinInputRoot\n :id=\"computedId\"\n v-model=\"modelValue\"\n :class=\"rootClasses\"\n :disabled=\"props.disabled\"\n :dir=\"props.dir\"\n :mask=\"props.mask\"\n :name=\"props.name\"\n :otp=\"props.otp\"\n :placeholder=\"props.placeholder\"\n :required=\"props.required\"\n :type=\"props.type\"\n @complete=\"emit('complete', $event)\"\n >\n <PinInputInput\n v-for=\"(_, i) in computedLength\"\n :key=\"i\"\n :index=\"i\"\n :disabled=\"props.disabled\"\n as-child\n >\n <BFormInput\n class=\"b-form-otp-field\"\n :aria-label=\"`${props.ariaLabel || 'Pin'} ${i + 1} of ${computedLength}`\"\n :aria-invalid=\"props.ariaInvalid\"\n :autofocus=\"props.autofocus && i === 0\"\n :disabled=\"props.disabled\"\n :form=\"props.form\"\n :plaintext=\"props.plaintext\"\n :readonly=\"props.readonly\"\n :size=\"props.size\"\n :state=\"props.state\"\n />\n </PinInputInput>\n </PinInputRoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {PinInputInput, PinInputRoot} from 'reka-ui'\nimport type {BFormOtpProps} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BFormInput from '../BFormInput/BFormInput.vue'\n\nconst lengthDefault = 6\nconst _props = withDefaults(defineProps<Omit<BFormOtpProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n ariaLabel: undefined,\n autofocus: false,\n dir: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n length: lengthDefault,\n mask: false,\n name: undefined,\n otp: false,\n placeholder: '',\n plaintext: false,\n readonly: false,\n required: false,\n size: undefined,\n state: null,\n type: 'text',\n})\nconst props = useDefaults(_props, 'BFormOtp')\nconst emit = defineEmits<{\n complete: [value: string[]]\n}>()\n\nconst modelValue = defineModel<BFormOtpProps['modelValue']>({default: () => []})\n\nconst computedId = useId(() => props.id, 'form-otp')\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst rootClasses = computed(() => [\n 'b-form-otp',\n 'd-flex',\n 'gap-2',\n 'align-items-center',\n {\n [`b-form-otp-${props.size}`]: !!props.size,\n },\n])\n</script>\n","<template>\n <PinInputRoot\n :id=\"computedId\"\n v-model=\"modelValue\"\n :class=\"rootClasses\"\n :disabled=\"props.disabled\"\n :dir=\"props.dir\"\n :mask=\"props.mask\"\n :name=\"props.name\"\n :otp=\"props.otp\"\n :placeholder=\"props.placeholder\"\n :required=\"props.required\"\n :type=\"props.type\"\n @complete=\"emit('complete', $event)\"\n >\n <PinInputInput\n v-for=\"(_, i) in computedLength\"\n :key=\"i\"\n :index=\"i\"\n :disabled=\"props.disabled\"\n as-child\n >\n <BFormInput\n class=\"b-form-otp-field\"\n :aria-label=\"`${props.ariaLabel || 'Pin'} ${i + 1} of ${computedLength}`\"\n :aria-invalid=\"props.ariaInvalid\"\n :autofocus=\"props.autofocus && i === 0\"\n :disabled=\"props.disabled\"\n :form=\"props.form\"\n :plaintext=\"props.plaintext\"\n :readonly=\"props.readonly\"\n :size=\"props.size\"\n :state=\"props.state\"\n />\n </PinInputInput>\n </PinInputRoot>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {PinInputInput, PinInputRoot} from 'reka-ui'\nimport type {BFormOtpProps} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BFormInput from '../BFormInput/BFormInput.vue'\n\nconst lengthDefault = 6\nconst _props = withDefaults(defineProps<Omit<BFormOtpProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n ariaLabel: undefined,\n autofocus: false,\n dir: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n length: lengthDefault,\n mask: false,\n name: undefined,\n otp: false,\n placeholder: '',\n plaintext: false,\n readonly: false,\n required: false,\n size: undefined,\n state: null,\n type: 'text',\n})\nconst props = useDefaults(_props, 'BFormOtp')\nconst emit = defineEmits<{\n complete: [value: string[]]\n}>()\n\nconst modelValue = defineModel<BFormOtpProps['modelValue']>({default: () => []})\n\nconst computedId = useId(() => props.id, 'form-otp')\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst rootClasses = computed(() => [\n 'b-form-otp',\n 'd-flex',\n 'gap-2',\n 'align-items-center',\n {\n [`b-form-otp-${props.size}`]: !!props.size,\n },\n])\n</script>\n"],"mappings":";;;;;;;AA+CA,IAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBtB,MAAM,QAAQ,YAAY,SAAQ,UAAU;EAC5C,MAAM,OAAO;EAIb,MAAM,aAAa,SAAwC,SAAA,YAAoB;EAE/E,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EACnD,MAAM,eAAe,kBAAkB,MAAM,QAAQ;GAAC,WAAW;GAAM,QAAQ;EAAU,CAAC;EAC1F,MAAM,iBAAiB,eAAgB,aAAa,QAAQ,IAAI,aAAa,QAAQ,aAAc;EAEnG,MAAM,cAAc,eAAe;GACjC;GACA;GACA;GACA;GACA,GACG,cAAc,MAAM,SAAS,CAAC,CAAC,MAAM,KACxC;EACF,CAAC;;GAtFC,OAAA,UAAA,GAAA,YAkCe,MAAA,YAAA,GAAA;IAjCZ,IAAI,MAAA,UAAA;IACI,YAAA,WAAA;IAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,WAAU,QAAA;IAClB,OAAK,eAAE,YAAA,KAAW;IAClB,UAAU,MAAA,KAAA,CAAK,CAAC;IAChB,KAAK,MAAA,KAAA,CAAK,CAAC;IACX,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,KAAK,MAAA,KAAA,CAAK,CAAC;IACX,aAAa,MAAA,KAAA,CAAK,CAAC;IACnB,UAAU,MAAA,KAAA,CAAK,CAAC;IAChB,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,YAAQ,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,YAAa,MAAM;;IAGhC,SAAA,cAAgC,EADlC,UAAA,IAAA,GAAA,mBAmBgB,UAAA,MAAA,WAlBG,eAAA,QAAT,GAAG,MAAC;KADd,OAAA,UAAA,GAAA,YAmBgB,MAAA,aAAA,GAAA;MAjBb,KAAK;MACL,OAAO;MACP,UAAU,MAAA,KAAA,CAAK,CAAC;MACjB,YAAA;;MAEA,SAAA,cAWE,CAXF,YAWE,oBAAA;OAVA,OAAM;OACL,cAAU,GAAK,MAAA,KAAA,CAAK,CAAC,aAAS,MAAA,GAAa,IAAC,EAAA,MAAW,eAAA;OACvD,gBAAc,MAAA,KAAA,CAAK,CAAC;OACpB,WAAW,MAAA,KAAA,CAAK,CAAC,aAAa,MAAC;OAC/B,UAAU,MAAA,KAAA,CAAK,CAAC;OAChB,MAAM,MAAA,KAAA,CAAK,CAAC;OACZ,WAAW,MAAA,KAAA,CAAK,CAAC;OACjB,UAAU,MAAA,KAAA,CAAK,CAAC;OAChB,MAAM,MAAA,KAAA,CAAK,CAAC;OACZ,OAAO,MAAA,KAAA,CAAK,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { d as formGroupKey, y as radioGroupKey } from "./keys-BgLwJbLV.js";
|
|
2
|
-
import { m as useFocus } from "./dist-9-XTMhb-.js";
|
|
3
2
|
import { o as isEmptySlot } from "./dom-BdUQrX99.js";
|
|
4
3
|
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
5
4
|
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
6
5
|
import { t as ConditionalWrapper_default } from "./ConditionalWrapper-CCIk52zt.js";
|
|
7
6
|
import { a as getLabelClasses, i as getInputClasses, n as getGroupAttr, r as getGroupClasses, t as getClasses } from "./useFormCheck-fArncQY5.js";
|
|
8
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, inject, mergeModels, mergeProps, normalizeClass, normalizeProps, openBlock, provide, renderList, renderSlot, toDisplayString, toRef, unref, useModel, useSlots, useTemplateRef, vModelRadio, withCtx, withDirectives } from "vue";
|
|
8
|
+
import { useFocus } from "@vueuse/core";
|
|
9
9
|
//#region src/components/BFormRadio/BFormRadio.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _hoisted_1$1 = [
|
|
11
11
|
"id",
|
|
@@ -437,4 +437,4 @@ var BFormRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
437
437
|
//#endregion
|
|
438
438
|
export { BFormRadio_default as n, BFormRadioGroup_default as t };
|
|
439
439
|
|
|
440
|
-
//# sourceMappingURL=BFormRadio-
|
|
440
|
+
//# sourceMappingURL=BFormRadio-DUz60sBI.js.map
|