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":"BFormRadio-DAddcnfE.js","names":["$attrs"],"sources":["../src/components/BFormRadio/BFormRadio.vue","../src/components/BFormRadio/BFormRadio.vue","../src/components/BFormRadio/BFormRadioGroupBase.vue","../src/components/BFormRadio/BFormRadioGroupBase.vue","../src/components/BFormRadio/BFormRadioGroup.vue","../src/components/BFormRadio/BFormRadioGroup.vue"],"sourcesContent":["<template>\n <ConditionalWrapper :skip=\"isButtonGroup\" :class=\"computedClasses\">\n <input\n :id=\"computedId\"\n v-bind=\"$attrs\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"inputClasses\"\n type=\"radio\"\n :disabled=\"props.disabled || parentData?.disabled.value || formGroupData?.disabled.value\"\n :required=\"computedRequired || undefined\"\n :name=\"props.name || parentData?.name.value\"\n :form=\"props.form || parentData?.form.value\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :value=\"props.value\"\n :aria-required=\"computedRequired || undefined\"\n />\n <label v-if=\"hasOwnLabel\" :for=\"computedId\" :class=\"labelClasses\">\n <slot />\n </label>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {useFocus} from '@vueuse/core'\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {isEmptySlot} from '../../utils/dom'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {formGroupKey, radioGroupKey} from '../../utils/keys'\nimport type {BFormRadioProps, BFormRadioSlots, RadioValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormRadioProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n autofocus: false,\n button: undefined,\n buttonGroup: false,\n buttonVariant: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n inline: undefined,\n name: undefined,\n plain: undefined,\n required: false,\n reverse: undefined,\n size: undefined,\n state: undefined,\n value: true,\n})\nconst props = useDefaults(_props, 'BFormRadio')\nconst slots = defineSlots<BFormRadioSlots>()\n\nconst modelValue = defineModel<BFormRadioProps['modelValue']>({\n default: undefined,\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(radioGroupKey, null)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst hasDefaultSlot = computed(() => !isEmptySlot(slots.default))\n\n// True default values for props that are undefined to support inheritance\nconst propDefaults = {\n plain: false,\n button: false,\n inline: false,\n reverse: false,\n size: undefined,\n buttonVariant: 'secondary' as const,\n state: null,\n}\n\n// Single source of truth for resolved prop values with parent inheritance and defaults\nconst resolvedProps = computed(() => ({\n plain: props.plain ?? parentData?.plain.value ?? propDefaults.plain,\n button: props.button ?? parentData?.buttons.value ?? propDefaults.button,\n inline: props.inline ?? parentData?.inline.value ?? propDefaults.inline,\n reverse: props.reverse ?? parentData?.reverse.value ?? propDefaults.reverse,\n state: props.state ?? parentData?.state.value ?? propDefaults.state,\n size: props.size ?? parentData?.size.value ?? propDefaults.size,\n buttonVariant:\n props.buttonVariant ?? parentData?.buttonVariant.value ?? propDefaults.buttonVariant,\n}))\n\n// Shorthand for template usage\nconst resolvedPlain = computed(() => resolvedProps.value.plain)\nconst hasOwnLabel = computed(() => hasDefaultSlot.value || !resolvedPlain.value)\n\nconst labelTargetId = computed(() => (hasOwnLabel.value ? null : computedId.value))\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(labelTargetId)\n\nconst localValue = computed({\n get: () => (parentData ? parentData.modelValue.value : modelValue.value),\n set: (newValue) => {\n if (newValue === undefined) return\n if (parentData !== null) {\n parentData.modelValue.value = newValue as RadioValue\n return\n }\n modelValue.value = newValue as RadioValue\n },\n})\n\nconst computedRequired = computed(\n () => !!(props.name ?? parentData?.name.value) && (props.required || parentData?.required.value)\n)\n\nconst isButtonGroup = computed(() => props.buttonGroup || (parentData?.buttons.value ?? false))\n\nconst classesObject = computed(() => ({\n ...resolvedProps.value,\n hasDefaultSlot: hasDefaultSlot.value,\n}))\nconst computedClasses = getClasses(classesObject)\nconst inputClasses = getInputClasses(classesObject)\nconst labelClasses = getLabelClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <ConditionalWrapper :skip=\"isButtonGroup\" :class=\"computedClasses\">\n <input\n :id=\"computedId\"\n v-bind=\"$attrs\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"inputClasses\"\n type=\"radio\"\n :disabled=\"props.disabled || parentData?.disabled.value || formGroupData?.disabled.value\"\n :required=\"computedRequired || undefined\"\n :name=\"props.name || parentData?.name.value\"\n :form=\"props.form || parentData?.form.value\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :value=\"props.value\"\n :aria-required=\"computedRequired || undefined\"\n />\n <label v-if=\"hasOwnLabel\" :for=\"computedId\" :class=\"labelClasses\">\n <slot />\n </label>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {useFocus} from '@vueuse/core'\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {isEmptySlot} from '../../utils/dom'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {formGroupKey, radioGroupKey} from '../../utils/keys'\nimport type {BFormRadioProps, BFormRadioSlots, RadioValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormRadioProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n autofocus: false,\n button: undefined,\n buttonGroup: false,\n buttonVariant: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n inline: undefined,\n name: undefined,\n plain: undefined,\n required: false,\n reverse: undefined,\n size: undefined,\n state: undefined,\n value: true,\n})\nconst props = useDefaults(_props, 'BFormRadio')\nconst slots = defineSlots<BFormRadioSlots>()\n\nconst modelValue = defineModel<BFormRadioProps['modelValue']>({\n default: undefined,\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(radioGroupKey, null)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst hasDefaultSlot = computed(() => !isEmptySlot(slots.default))\n\n// True default values for props that are undefined to support inheritance\nconst propDefaults = {\n plain: false,\n button: false,\n inline: false,\n reverse: false,\n size: undefined,\n buttonVariant: 'secondary' as const,\n state: null,\n}\n\n// Single source of truth for resolved prop values with parent inheritance and defaults\nconst resolvedProps = computed(() => ({\n plain: props.plain ?? parentData?.plain.value ?? propDefaults.plain,\n button: props.button ?? parentData?.buttons.value ?? propDefaults.button,\n inline: props.inline ?? parentData?.inline.value ?? propDefaults.inline,\n reverse: props.reverse ?? parentData?.reverse.value ?? propDefaults.reverse,\n state: props.state ?? parentData?.state.value ?? propDefaults.state,\n size: props.size ?? parentData?.size.value ?? propDefaults.size,\n buttonVariant:\n props.buttonVariant ?? parentData?.buttonVariant.value ?? propDefaults.buttonVariant,\n}))\n\n// Shorthand for template usage\nconst resolvedPlain = computed(() => resolvedProps.value.plain)\nconst hasOwnLabel = computed(() => hasDefaultSlot.value || !resolvedPlain.value)\n\nconst labelTargetId = computed(() => (hasOwnLabel.value ? null : computedId.value))\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(labelTargetId)\n\nconst localValue = computed({\n get: () => (parentData ? parentData.modelValue.value : modelValue.value),\n set: (newValue) => {\n if (newValue === undefined) return\n if (parentData !== null) {\n parentData.modelValue.value = newValue as RadioValue\n return\n }\n modelValue.value = newValue as RadioValue\n },\n})\n\nconst computedRequired = computed(\n () => !!(props.name ?? parentData?.name.value) && (props.required || parentData?.required.value)\n)\n\nconst isButtonGroup = computed(() => props.buttonGroup || (parentData?.buttons.value ?? false))\n\nconst classesObject = computed(() => ({\n ...resolvedProps.value,\n hasDefaultSlot: hasDefaultSlot.value,\n}))\nconst computedClasses = getClasses(classesObject)\nconst inputClasses = getInputClasses(classesObject)\nconst labelClasses = getLabelClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <div\n v-bind=\"computedAttrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"radiogroup\"\n :class=\"computedClasses\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormRadio v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormRadio>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport {radioGroupKey} from '../../utils/keys'\nimport BFormRadio from './BFormRadio.vue'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupBaseProps,\n BFormRadioGroupSlots,\n} from '../../types'\n\n/**\n * Internal base component for BFormRadioGroup.\n * This component is non-generic and uses useDefaults for complete default support.\n * Users should use BFormRadioGroup (the type-safe wrapper) instead.\n * @internal\n */\nconst _props = withDefaults(defineProps<Omit<BFormRadioGroupBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [],\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormRadioGroup')\ndefineSlots<BFormRadioGroupSlots>()\n\nconst modelValue = defineModel<BFormRadioGroupBaseProps['modelValue']>({\n default: null,\n})\n\nconst computedId = useId(() => props.id, 'radio')\nconst computedName = useId(() => props.name, 'radio')\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element, {\n initialValue: props.autofocus,\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed(() =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure disabled respects group-level disabled taking precedence\n return {\n ...option,\n disabled: props.disabled ? true : (option.disabled ?? false),\n }\n }\n // Primitive value - normalize to {text, value}, with group disabled taking precedence\n return {\n text: String(option),\n value: option,\n disabled: props.disabled,\n }\n })\n)\n\nprovide(radioGroupKey, {\n modelValue: modelValue as import('vue').Ref<import('../../types/RadioTypes').RadioValue>,\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\n buttons: toRef(() => props.buttons),\n state: toRef(() => props.state),\n plain: toRef(() => props.plain),\n size: toRef(() => props.size),\n inline: toRef(() => !props.stacked),\n reverse: toRef(() => props.reverse),\n required: toRef(() => props.required),\n disabled: toRef(() => props.disabled),\n})\n\nconst classesObject = computed(() => ({\n required: props.required,\n ariaInvalid: props.ariaInvalid,\n state: props.state,\n validated: props.validated,\n buttons: props.buttons,\n stacked: props.stacked,\n size: props.size,\n}))\nconst computedAttrs = getGroupAttr(classesObject)\nconst computedClasses = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <div\n v-bind=\"computedAttrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"radiogroup\"\n :class=\"computedClasses\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormRadio v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormRadio>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport {radioGroupKey} from '../../utils/keys'\nimport BFormRadio from './BFormRadio.vue'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupBaseProps,\n BFormRadioGroupSlots,\n} from '../../types'\n\n/**\n * Internal base component for BFormRadioGroup.\n * This component is non-generic and uses useDefaults for complete default support.\n * Users should use BFormRadioGroup (the type-safe wrapper) instead.\n * @internal\n */\nconst _props = withDefaults(defineProps<Omit<BFormRadioGroupBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [],\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormRadioGroup')\ndefineSlots<BFormRadioGroupSlots>()\n\nconst modelValue = defineModel<BFormRadioGroupBaseProps['modelValue']>({\n default: null,\n})\n\nconst computedId = useId(() => props.id, 'radio')\nconst computedName = useId(() => props.name, 'radio')\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element, {\n initialValue: props.autofocus,\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed(() =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure disabled respects group-level disabled taking precedence\n return {\n ...option,\n disabled: props.disabled ? true : (option.disabled ?? false),\n }\n }\n // Primitive value - normalize to {text, value}, with group disabled taking precedence\n return {\n text: String(option),\n value: option,\n disabled: props.disabled,\n }\n })\n)\n\nprovide(radioGroupKey, {\n modelValue: modelValue as import('vue').Ref<import('../../types/RadioTypes').RadioValue>,\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\n buttons: toRef(() => props.buttons),\n state: toRef(() => props.state),\n plain: toRef(() => props.plain),\n size: toRef(() => props.size),\n inline: toRef(() => !props.stacked),\n reverse: toRef(() => props.reverse),\n required: toRef(() => props.required),\n disabled: toRef(() => props.disabled),\n})\n\nconst classesObject = computed(() => ({\n required: props.required,\n ariaInvalid: props.ariaInvalid,\n state: props.state,\n validated: props.validated,\n buttons: props.buttons,\n stacked: props.stacked,\n size: props.size,\n}))\nconst computedAttrs = getGroupAttr(classesObject)\nconst computedClasses = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <BFormRadioGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps\" />\n </template>\n\n <slot />\n </BFormRadioGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupProps,\n OptionsValues,\n RadioOption,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormRadioGroupBase from './BFormRadioGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormRadioGroup.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormRadioGroupBase for rendering.\n * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormRadioGroupProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [] as unknown as Options,\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\n\n// Type-safe model value - extracts union from options.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | undefined>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: undefined as any,\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(\n () =>\n (props.options ?? []).map((el) =>\n typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean'\n ? {\n value: el,\n disabled: props.disabled,\n text: el.toString(),\n }\n : {\n value: (el as Record<string, unknown>)[props.valueField as string],\n disabled:\n props.disabled ||\n (((el as Record<string, unknown>)[props.disabledField as string] as\n boolean | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n '',\n }\n ) as RadioOption[]\n)\n\n// Forward all non-option-related props to base component\nconst forwardedProps = computed(() => ({\n id: props.id,\n name: props.name,\n size: props.size,\n state: props.state,\n buttonVariant: props.buttonVariant,\n buttons: props.buttons,\n stacked: props.stacked,\n disabled: props.disabled,\n required: props.required,\n validated: props.validated,\n autofocus: props.autofocus,\n form: props.form,\n ariaInvalid: props.ariaInvalid,\n plain: props.plain,\n reverse: props.reverse,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <BFormRadioGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps\" />\n </template>\n\n <slot />\n </BFormRadioGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupProps,\n OptionsValues,\n RadioOption,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormRadioGroupBase from './BFormRadioGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormRadioGroup.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormRadioGroupBase for rendering.\n * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormRadioGroupProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [] as unknown as Options,\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\n\n// Type-safe model value - extracts union from options.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | undefined>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: undefined as any,\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(\n () =>\n (props.options ?? []).map((el) =>\n typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean'\n ? {\n value: el,\n disabled: props.disabled,\n text: el.toString(),\n }\n : {\n value: (el as Record<string, unknown>)[props.valueField as string],\n disabled:\n props.disabled ||\n (((el as Record<string, unknown>)[props.disabledField as string] as\n boolean | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n '',\n }\n ) as RadioOption[]\n)\n\n// Forward all non-option-related props to base component\nconst forwardedProps = computed(() => ({\n id: props.id,\n name: props.name,\n size: props.size,\n state: props.state,\n buttonVariant: props.buttonVariant,\n buttons: props.buttons,\n stacked: props.stacked,\n disabled: props.disabled,\n required: props.required,\n validated: props.validated,\n autofocus: props.autofocus,\n form: props.form,\n ariaInvalid: props.ariaInvalid,\n plain: props.plain,\n reverse: props.reverse,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?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/BFormRadio/BFormRadio.vue","../src/components/BFormRadio/BFormRadio.vue","../src/components/BFormRadio/BFormRadioGroupBase.vue","../src/components/BFormRadio/BFormRadioGroupBase.vue","../src/components/BFormRadio/BFormRadioGroup.vue","../src/components/BFormRadio/BFormRadioGroup.vue"],"sourcesContent":["<template>\n <ConditionalWrapper :skip=\"isButtonGroup\" :class=\"computedClasses\">\n <input\n :id=\"computedId\"\n v-bind=\"$attrs\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"inputClasses\"\n type=\"radio\"\n :disabled=\"props.disabled || parentData?.disabled.value || formGroupData?.disabled.value\"\n :required=\"computedRequired || undefined\"\n :name=\"props.name || parentData?.name.value\"\n :form=\"props.form || parentData?.form.value\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :value=\"props.value\"\n :aria-required=\"computedRequired || undefined\"\n />\n <label v-if=\"hasOwnLabel\" :for=\"computedId\" :class=\"labelClasses\">\n <slot />\n </label>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {useFocus} from '@vueuse/core'\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {isEmptySlot} from '../../utils/dom'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {formGroupKey, radioGroupKey} from '../../utils/keys'\nimport type {BFormRadioProps, BFormRadioSlots, RadioValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormRadioProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n autofocus: false,\n button: undefined,\n buttonGroup: false,\n buttonVariant: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n inline: undefined,\n name: undefined,\n plain: undefined,\n required: false,\n reverse: undefined,\n size: undefined,\n state: undefined,\n value: true,\n})\nconst props = useDefaults(_props, 'BFormRadio')\nconst slots = defineSlots<BFormRadioSlots>()\n\nconst modelValue = defineModel<BFormRadioProps['modelValue']>({\n default: undefined,\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(radioGroupKey, null)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst hasDefaultSlot = computed(() => !isEmptySlot(slots.default))\n\n// True default values for props that are undefined to support inheritance\nconst propDefaults = {\n plain: false,\n button: false,\n inline: false,\n reverse: false,\n size: undefined,\n buttonVariant: 'secondary' as const,\n state: null,\n}\n\n// Single source of truth for resolved prop values with parent inheritance and defaults\nconst resolvedProps = computed(() => ({\n plain: props.plain ?? parentData?.plain.value ?? propDefaults.plain,\n button: props.button ?? parentData?.buttons.value ?? propDefaults.button,\n inline: props.inline ?? parentData?.inline.value ?? propDefaults.inline,\n reverse: props.reverse ?? parentData?.reverse.value ?? propDefaults.reverse,\n state: props.state ?? parentData?.state.value ?? propDefaults.state,\n size: props.size ?? parentData?.size.value ?? propDefaults.size,\n buttonVariant:\n props.buttonVariant ?? parentData?.buttonVariant.value ?? propDefaults.buttonVariant,\n}))\n\n// Shorthand for template usage\nconst resolvedPlain = computed(() => resolvedProps.value.plain)\nconst hasOwnLabel = computed(() => hasDefaultSlot.value || !resolvedPlain.value)\n\nconst labelTargetId = computed(() => (hasOwnLabel.value ? null : computedId.value))\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(labelTargetId)\n\nconst localValue = computed({\n get: () => (parentData ? parentData.modelValue.value : modelValue.value),\n set: (newValue) => {\n if (newValue === undefined) return\n if (parentData !== null) {\n parentData.modelValue.value = newValue as RadioValue\n return\n }\n modelValue.value = newValue as RadioValue\n },\n})\n\nconst computedRequired = computed(\n () => !!(props.name ?? parentData?.name.value) && (props.required || parentData?.required.value)\n)\n\nconst isButtonGroup = computed(() => props.buttonGroup || (parentData?.buttons.value ?? false))\n\nconst classesObject = computed(() => ({\n ...resolvedProps.value,\n hasDefaultSlot: hasDefaultSlot.value,\n}))\nconst computedClasses = getClasses(classesObject)\nconst inputClasses = getInputClasses(classesObject)\nconst labelClasses = getLabelClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <ConditionalWrapper :skip=\"isButtonGroup\" :class=\"computedClasses\">\n <input\n :id=\"computedId\"\n v-bind=\"$attrs\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"inputClasses\"\n type=\"radio\"\n :disabled=\"props.disabled || parentData?.disabled.value || formGroupData?.disabled.value\"\n :required=\"computedRequired || undefined\"\n :name=\"props.name || parentData?.name.value\"\n :form=\"props.form || parentData?.form.value\"\n :aria-label=\"props.ariaLabel\"\n :aria-labelledby=\"props.ariaLabelledby\"\n :value=\"props.value\"\n :aria-required=\"computedRequired || undefined\"\n />\n <label v-if=\"hasOwnLabel\" :for=\"computedId\" :class=\"labelClasses\">\n <slot />\n </label>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {useFocus} from '@vueuse/core'\nimport {computed, inject, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {isEmptySlot} from '../../utils/dom'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {formGroupKey, radioGroupKey} from '../../utils/keys'\nimport type {BFormRadioProps, BFormRadioSlots, RadioValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BFormRadioProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n ariaLabelledby: undefined,\n autofocus: false,\n button: undefined,\n buttonGroup: false,\n buttonVariant: undefined,\n disabled: false,\n form: undefined,\n id: undefined,\n inline: undefined,\n name: undefined,\n plain: undefined,\n required: false,\n reverse: undefined,\n size: undefined,\n state: undefined,\n value: true,\n})\nconst props = useDefaults(_props, 'BFormRadio')\nconst slots = defineSlots<BFormRadioSlots>()\n\nconst modelValue = defineModel<BFormRadioProps['modelValue']>({\n default: undefined,\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(radioGroupKey, null)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst hasDefaultSlot = computed(() => !isEmptySlot(slots.default))\n\n// True default values for props that are undefined to support inheritance\nconst propDefaults = {\n plain: false,\n button: false,\n inline: false,\n reverse: false,\n size: undefined,\n buttonVariant: 'secondary' as const,\n state: null,\n}\n\n// Single source of truth for resolved prop values with parent inheritance and defaults\nconst resolvedProps = computed(() => ({\n plain: props.plain ?? parentData?.plain.value ?? propDefaults.plain,\n button: props.button ?? parentData?.buttons.value ?? propDefaults.button,\n inline: props.inline ?? parentData?.inline.value ?? propDefaults.inline,\n reverse: props.reverse ?? parentData?.reverse.value ?? propDefaults.reverse,\n state: props.state ?? parentData?.state.value ?? propDefaults.state,\n size: props.size ?? parentData?.size.value ?? propDefaults.size,\n buttonVariant:\n props.buttonVariant ?? parentData?.buttonVariant.value ?? propDefaults.buttonVariant,\n}))\n\n// Shorthand for template usage\nconst resolvedPlain = computed(() => resolvedProps.value.plain)\nconst hasOwnLabel = computed(() => hasDefaultSlot.value || !resolvedPlain.value)\n\nconst labelTargetId = computed(() => (hasOwnLabel.value ? null : computedId.value))\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(labelTargetId)\n\nconst localValue = computed({\n get: () => (parentData ? parentData.modelValue.value : modelValue.value),\n set: (newValue) => {\n if (newValue === undefined) return\n if (parentData !== null) {\n parentData.modelValue.value = newValue as RadioValue\n return\n }\n modelValue.value = newValue as RadioValue\n },\n})\n\nconst computedRequired = computed(\n () => !!(props.name ?? parentData?.name.value) && (props.required || parentData?.required.value)\n)\n\nconst isButtonGroup = computed(() => props.buttonGroup || (parentData?.buttons.value ?? false))\n\nconst classesObject = computed(() => ({\n ...resolvedProps.value,\n hasDefaultSlot: hasDefaultSlot.value,\n}))\nconst computedClasses = getClasses(classesObject)\nconst inputClasses = getInputClasses(classesObject)\nconst labelClasses = getLabelClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <div\n v-bind=\"computedAttrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"radiogroup\"\n :class=\"computedClasses\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormRadio v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormRadio>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport {radioGroupKey} from '../../utils/keys'\nimport BFormRadio from './BFormRadio.vue'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupBaseProps,\n BFormRadioGroupSlots,\n} from '../../types'\n\n/**\n * Internal base component for BFormRadioGroup.\n * This component is non-generic and uses useDefaults for complete default support.\n * Users should use BFormRadioGroup (the type-safe wrapper) instead.\n * @internal\n */\nconst _props = withDefaults(defineProps<Omit<BFormRadioGroupBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [],\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormRadioGroup')\ndefineSlots<BFormRadioGroupSlots>()\n\nconst modelValue = defineModel<BFormRadioGroupBaseProps['modelValue']>({\n default: null,\n})\n\nconst computedId = useId(() => props.id, 'radio')\nconst computedName = useId(() => props.name, 'radio')\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element, {\n initialValue: props.autofocus,\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed(() =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure disabled respects group-level disabled taking precedence\n return {\n ...option,\n disabled: props.disabled ? true : (option.disabled ?? false),\n }\n }\n // Primitive value - normalize to {text, value}, with group disabled taking precedence\n return {\n text: String(option),\n value: option,\n disabled: props.disabled,\n }\n })\n)\n\nprovide(radioGroupKey, {\n modelValue: modelValue as import('vue').Ref<import('../../types/RadioTypes').RadioValue>,\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\n buttons: toRef(() => props.buttons),\n state: toRef(() => props.state),\n plain: toRef(() => props.plain),\n size: toRef(() => props.size),\n inline: toRef(() => !props.stacked),\n reverse: toRef(() => props.reverse),\n required: toRef(() => props.required),\n disabled: toRef(() => props.disabled),\n})\n\nconst classesObject = computed(() => ({\n required: props.required,\n ariaInvalid: props.ariaInvalid,\n state: props.state,\n validated: props.validated,\n buttons: props.buttons,\n stacked: props.stacked,\n size: props.size,\n}))\nconst computedAttrs = getGroupAttr(classesObject)\nconst computedClasses = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <div\n v-bind=\"computedAttrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"radiogroup\"\n :class=\"computedClasses\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormRadio v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormRadio>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport {radioGroupKey} from '../../utils/keys'\nimport BFormRadio from './BFormRadio.vue'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupBaseProps,\n BFormRadioGroupSlots,\n} from '../../types'\n\n/**\n * Internal base component for BFormRadioGroup.\n * This component is non-generic and uses useDefaults for complete default support.\n * Users should use BFormRadioGroup (the type-safe wrapper) instead.\n * @internal\n */\nconst _props = withDefaults(defineProps<Omit<BFormRadioGroupBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [],\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormRadioGroup')\ndefineSlots<BFormRadioGroupSlots>()\n\nconst modelValue = defineModel<BFormRadioGroupBaseProps['modelValue']>({\n default: null,\n})\n\nconst computedId = useId(() => props.id, 'radio')\nconst computedName = useId(() => props.name, 'radio')\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element, {\n initialValue: props.autofocus,\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed(() =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure disabled respects group-level disabled taking precedence\n return {\n ...option,\n disabled: props.disabled ? true : (option.disabled ?? false),\n }\n }\n // Primitive value - normalize to {text, value}, with group disabled taking precedence\n return {\n text: String(option),\n value: option,\n disabled: props.disabled,\n }\n })\n)\n\nprovide(radioGroupKey, {\n modelValue: modelValue as import('vue').Ref<import('../../types/RadioTypes').RadioValue>,\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\n buttons: toRef(() => props.buttons),\n state: toRef(() => props.state),\n plain: toRef(() => props.plain),\n size: toRef(() => props.size),\n inline: toRef(() => !props.stacked),\n reverse: toRef(() => props.reverse),\n required: toRef(() => props.required),\n disabled: toRef(() => props.disabled),\n})\n\nconst classesObject = computed(() => ({\n required: props.required,\n ariaInvalid: props.ariaInvalid,\n state: props.state,\n validated: props.validated,\n buttons: props.buttons,\n stacked: props.stacked,\n size: props.size,\n}))\nconst computedAttrs = getGroupAttr(classesObject)\nconst computedClasses = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <BFormRadioGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps\" />\n </template>\n\n <slot />\n </BFormRadioGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupProps,\n OptionsValues,\n RadioOption,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormRadioGroupBase from './BFormRadioGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormRadioGroup.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormRadioGroupBase for rendering.\n * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormRadioGroupProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [] as unknown as Options,\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\n\n// Type-safe model value - extracts union from options.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | undefined>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: undefined as any,\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(\n () =>\n (props.options ?? []).map((el) =>\n typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean'\n ? {\n value: el,\n disabled: props.disabled,\n text: el.toString(),\n }\n : {\n value: (el as Record<string, unknown>)[props.valueField as string],\n disabled:\n props.disabled ||\n (((el as Record<string, unknown>)[props.disabledField as string] as\n boolean | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n '',\n }\n ) as RadioOption[]\n)\n\n// Forward all non-option-related props to base component\nconst forwardedProps = computed(() => ({\n id: props.id,\n name: props.name,\n size: props.size,\n state: props.state,\n buttonVariant: props.buttonVariant,\n buttons: props.buttons,\n stacked: props.stacked,\n disabled: props.disabled,\n required: props.required,\n validated: props.validated,\n autofocus: props.autofocus,\n form: props.form,\n ariaInvalid: props.ariaInvalid,\n plain: props.plain,\n reverse: props.reverse,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n","<template>\n <BFormRadioGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps\" />\n </template>\n\n <slot />\n </BFormRadioGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport type {\n BFormRadioGroupExposes,\n BFormRadioGroupProps,\n OptionsValues,\n RadioOption,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormRadioGroupBase from './BFormRadioGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormRadioGroup.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormRadioGroupBase for rendering.\n * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormRadioGroupProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n buttonVariant: 'secondary',\n buttons: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n name: undefined,\n options: () => [] as unknown as Options,\n plain: false,\n required: false,\n reverse: false,\n size: undefined,\n stacked: false,\n state: null,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\n\n// Type-safe model value - extracts union from options.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | undefined>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: undefined as any,\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(\n () =>\n (props.options ?? []).map((el) =>\n typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean'\n ? {\n value: el,\n disabled: props.disabled,\n text: el.toString(),\n }\n : {\n value: (el as Record<string, unknown>)[props.valueField as string],\n disabled:\n props.disabled ||\n (((el as Record<string, unknown>)[props.disabledField as string] as\n boolean | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n '',\n }\n ) as RadioOption[]\n)\n\n// Forward all non-option-related props to base component\nconst forwardedProps = computed(() => ({\n id: props.id,\n name: props.name,\n size: props.size,\n state: props.state,\n buttonVariant: props.buttonVariant,\n buttons: props.buttons,\n stacked: props.stacked,\n disabled: props.disabled,\n required: props.required,\n validated: props.validated,\n autofocus: props.autofocus,\n form: props.form,\n ariaInvalid: props.ariaInvalid,\n plain: props.plain,\n reverse: props.reverse,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormRadioGroupExposes)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0DA,MAAM,QAAQ,YAAY,SAAQ,YAAY;EAC9C,MAAM,QAAQ,SAAA;EAEd,MAAM,aAAa,SAA0C,SAAA,YAE5D;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,YAAY;EAErD,MAAM,aAAa,OAAO,eAAe,IAAI;EAE7C,MAAM,QAAQ,eAAe,QAAQ;EAErC,MAAM,EAAC,YAAW,SAAS,OAAO,EAChC,cAAc,MAAM,UACtB,CAAC;EAED,MAAM,iBAAiB,eAAe,CAAC,YAAY,MAAM,OAAO,CAAC;EAGjE,MAAM,eAAe;GACnB,OAAO;GACP,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,MAAM,KAAA;GACN,eAAe;GACf,OAAO;EACT;EAGA,MAAM,gBAAgB,gBAAgB;GACpC,OAAO,MAAM,SAAS,YAAY,MAAM,SAAS,aAAa;GAC9D,QAAQ,MAAM,UAAU,YAAY,QAAQ,SAAS,aAAa;GAClE,QAAQ,MAAM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C,OAAA,UAAA,GAAA,YAgBsB,6BAhBtB,WAgBsB,EAfpB,KAAI,QAAO,GACH,eAAA,OAAc;IACb,YAAA,WAAA;IAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,WAAA,QAAU;IAClB,SAAS,kBAAA;;IAGC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAyC,KAAA,QAAA,UAAA,eAAA,mBAAb,SAAS,CAAA,CAAA,CAAA,CAAA;IAGvC,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as useToNumber } from "./dist-DKc2ivHS.js";
|
|
2
1
|
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
3
2
|
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
4
3
|
import { t as useRtl } from "./useRtl-FeLayV4k.js";
|
|
5
4
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useModel } from "vue";
|
|
5
|
+
import { useToNumber } from "@vueuse/core";
|
|
6
6
|
//#region src/components/BFormRating/BFormRating.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var _hoisted_1 = [
|
|
8
8
|
"id",
|
|
@@ -275,4 +275,4 @@ var BFormRating_default = /* @__PURE__ */ defineComponent({
|
|
|
275
275
|
//#endregion
|
|
276
276
|
export { BFormRating_default as t };
|
|
277
277
|
|
|
278
|
-
//# sourceMappingURL=BFormRating-
|
|
278
|
+
//# sourceMappingURL=BFormRating-CtMmDgrF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormRating-iKFgSFet.js","names":[],"sources":["../src/components/BFormRating/BFormRating.vue","../src/components/BFormRating/BFormRating.vue"],"sourcesContent":["<template>\n <output\n :id=\"computedId\"\n :class=\"computedClasses\"\n :dir=\"computedRtl ? 'rtl' : 'ltr'\"\n :form=\"props.form ? props.form : undefined\"\n role=\"slider\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"computedLength\"\n :aria-valuenow=\"displayValue\"\n :aria-valuetext=\"props.labelValueCurrent(displayValue, computedLength)\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :aria-readonly=\"props.readonly ? true : undefined\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n @keydown=\"onKeydown\"\n >\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"modelValue\"\n />\n <span\n v-if=\"props.showClear && !props.readonly && !props.disabled\"\n class=\"rating-clear-button\"\n @click=\"clearRating\"\n >\n <slot name=\"icon-clear\">\n <svg\n viewBox=\"0 0 16 16\"\n role=\"img\"\n :aria-label=\"props.clearLabel\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"clear-icon\"\n >\n <g>\n <path :d=\"iconPaths.clear\" />\n </g>\n </svg>\n </slot>\n </span>\n <span\n v-for=\"(itemIndex, index) in computedLength\"\n :key=\"itemIndex\"\n class=\"rating-item flex-grow-1\"\n @click=\"selectRating(itemIndex)\"\n >\n <slot :item-index=\"itemIndex\" :is-filled=\"isIconFull(index)\" :is-half=\"isIconHalf(index)\">\n <span class=\"b-form-rating-item\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n :width=\"computedSize\"\n :height=\"computedSize\"\n fill=\"currentColor\"\n :class=\"[iconColors[index]?.class]\"\n :style=\"iconColors[index]?.style\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"getIcon(index)\" />\n </svg>\n </span>\n </slot>\n </span>\n\n <span\n v-if=\"props.showValue || props.showValueMax\"\n :style=\"{fontSize: computedSize}\"\n class=\"rating-value-text\"\n >\n {{ displayValueText }}\n </span>\n </output>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {BFormRatingProps, BFormRatingSlots, Size} from '../../types'\n\nconst lengthDefault = 5\nconst _props = withDefaults(defineProps<Omit<BFormRatingProps, 'modelValue'>>(), {\n clearLabel: 'Clear rating',\n color: '',\n id: undefined,\n inline: false,\n labelValueCurrent: (current: number, max: number) => `${current} of ${max}`,\n locale: undefined,\n noBorder: false,\n precision: 0,\n readonly: false,\n disabled: false,\n form: undefined,\n name: undefined,\n showClear: false,\n showValue: false,\n showValueMax: false,\n size: undefined,\n length: lengthDefault,\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BFormRating')\ndefineSlots<BFormRatingSlots>()\n\nconst modelValue = defineModel<Exclude<BFormRatingProps['modelValue'], undefined>>({default: 0})\n\nconst computedId = useId(() => props.id, 'form-rating')\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || undefined\n const nf = new Intl.NumberFormat(loc)\n return nf.resolvedOptions().locale\n})\n\nconst computedRtl = computed(() => {\n const locale = computedLocale.value\n try {\n const localeObj = new Intl.Locale(locale)\n const {textInfo} = localeObj as Intl.Locale & {textInfo?: {direction: string}}\n if (textInfo) {\n return textInfo.direction === 'rtl'\n }\n } catch {\n // Fallback\n }\n return isRtl?.value ?? false\n})\n\nconst computedClasses = computed(() => [\n 'form-control',\n 'b-form-rating',\n 'align-items-center',\n {\n 'is-readonly': props.readonly,\n 'is-disabled': props.disabled,\n 'no-border': props.noBorder,\n 'd-flex': !props.inline,\n 'd-inline-flex': props.inline,\n 'b-form-rating-inline': props.inline,\n },\n])\n\nconst isIconFull = (index: number): boolean => displayValue.value - index >= 1\nconst isIconHalf = (index: number): boolean => {\n const diff = displayValue.value - index\n return diff >= 0.5 && diff < 1\n}\nconst iconPaths = {\n full: 'M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z',\n half: 'M5.354 5.119 7.538.792A.52.52 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.54.54 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.5.5 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.6.6 0 0 1 .085-.302.51.51 0 0 1 .37-.245zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.56.56 0 0 1 .162-.505l2.907-2.77-4.052-.576a.53.53 0 0 1-.393-.288L8.001 2.223 8 2.226z',\n empty:\n 'M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.522 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z',\n clear:\n 'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708',\n} as const\nconst getIcon = (index: number): string => {\n if (isIconFull(index)) return iconPaths.full\n if (isIconHalf(index)) return iconPaths.half\n return iconPaths.empty\n}\n\nconst hoverValue = ref<number | null>(null)\n\nconst displayValue = computed(() =>\n hoverValue.value !== null ? hoverValue.value : modelValue.value\n)\n\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst computedSize = computed(() => {\n const resolved = {\n sm: 0.875,\n default: 1,\n lg: 1.25,\n } satisfies Record<Size | 'default', number>\n return `${resolved[props.size ?? 'default']}rem`\n})\n\nconst computedFormatter = computed(() => {\n const preciseValue = props.precision > 0 ? props.precision : 0\n return new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumFractionDigits: preciseValue,\n maximumFractionDigits: preciseValue,\n notation: 'standard',\n })\n})\n\nconst displayValueText = computed(() => {\n const val = props.precision > 0 ? roundedValue.value : displayValue.value\n const formattedValue = computedFormatter.value.format(val)\n if (props.showValueMax) {\n const formattedMax = computedFormatter.value.format(computedLength.value)\n return `${formattedValue}/${formattedMax}`\n }\n if (props.showValue) {\n return formattedValue\n }\n return ''\n})\n\nconst roundedValue = computed(() => {\n const val = displayValue.value\n const factor = 10 ** props.precision\n return Math.round((val + Number.EPSILON) * factor) / factor\n})\n\nconst iconColors = computed(() =>\n Array.from({length: computedLength.value}, () => {\n if (props.disabled) {\n return {class: 'is-disabled', style: {}}\n }\n if (props.variant) {\n return {class: `text-${props.variant}`, style: {}}\n }\n if (props.color) {\n return {class: '', style: {color: props.color}}\n }\n return {class: '', style: {}}\n })\n)\n\n//add keyboard support\nconst onKeydown = (e: KeyboardEvent) => {\n if (props.readonly || props.disabled) return\n\n let newValue = modelValue.value\n\n const isRtlMode = computedRtl.value\n\n switch (e.key) {\n case 'ArrowRight':\n newValue = isRtlMode\n ? Math.max(newValue - 1, 0)\n : Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowUp':\n newValue = Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowLeft':\n newValue = isRtlMode\n ? Math.min(newValue + 1, computedLength.value)\n : Math.max(newValue - 1, 0)\n break\n case 'ArrowDown':\n newValue = Math.max(newValue - 1, 0)\n break\n default:\n return\n }\n\n e.preventDefault()\n modelValue.value = newValue\n}\n\nconst selectRating = (itemIndex: number) => {\n if (props.readonly || props.disabled) return\n modelValue.value = hoverValue.value !== null ? hoverValue.value : itemIndex\n}\n\n// clear\nconst clearRating = () => {\n hoverValue.value = null\n modelValue.value = 0\n}\n\ndefineExpose({\n hoverValue,\n})\n</script>\n","<template>\n <output\n :id=\"computedId\"\n :class=\"computedClasses\"\n :dir=\"computedRtl ? 'rtl' : 'ltr'\"\n :form=\"props.form ? props.form : undefined\"\n role=\"slider\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"computedLength\"\n :aria-valuenow=\"displayValue\"\n :aria-valuetext=\"props.labelValueCurrent(displayValue, computedLength)\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :aria-readonly=\"props.readonly ? true : undefined\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n @keydown=\"onKeydown\"\n >\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"modelValue\"\n />\n <span\n v-if=\"props.showClear && !props.readonly && !props.disabled\"\n class=\"rating-clear-button\"\n @click=\"clearRating\"\n >\n <slot name=\"icon-clear\">\n <svg\n viewBox=\"0 0 16 16\"\n role=\"img\"\n :aria-label=\"props.clearLabel\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"clear-icon\"\n >\n <g>\n <path :d=\"iconPaths.clear\" />\n </g>\n </svg>\n </slot>\n </span>\n <span\n v-for=\"(itemIndex, index) in computedLength\"\n :key=\"itemIndex\"\n class=\"rating-item flex-grow-1\"\n @click=\"selectRating(itemIndex)\"\n >\n <slot :item-index=\"itemIndex\" :is-filled=\"isIconFull(index)\" :is-half=\"isIconHalf(index)\">\n <span class=\"b-form-rating-item\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n :width=\"computedSize\"\n :height=\"computedSize\"\n fill=\"currentColor\"\n :class=\"[iconColors[index]?.class]\"\n :style=\"iconColors[index]?.style\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"getIcon(index)\" />\n </svg>\n </span>\n </slot>\n </span>\n\n <span\n v-if=\"props.showValue || props.showValueMax\"\n :style=\"{fontSize: computedSize}\"\n class=\"rating-value-text\"\n >\n {{ displayValueText }}\n </span>\n </output>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {BFormRatingProps, BFormRatingSlots, Size} from '../../types'\n\nconst lengthDefault = 5\nconst _props = withDefaults(defineProps<Omit<BFormRatingProps, 'modelValue'>>(), {\n clearLabel: 'Clear rating',\n color: '',\n id: undefined,\n inline: false,\n labelValueCurrent: (current: number, max: number) => `${current} of ${max}`,\n locale: undefined,\n noBorder: false,\n precision: 0,\n readonly: false,\n disabled: false,\n form: undefined,\n name: undefined,\n showClear: false,\n showValue: false,\n showValueMax: false,\n size: undefined,\n length: lengthDefault,\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BFormRating')\ndefineSlots<BFormRatingSlots>()\n\nconst modelValue = defineModel<Exclude<BFormRatingProps['modelValue'], undefined>>({default: 0})\n\nconst computedId = useId(() => props.id, 'form-rating')\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || undefined\n const nf = new Intl.NumberFormat(loc)\n return nf.resolvedOptions().locale\n})\n\nconst computedRtl = computed(() => {\n const locale = computedLocale.value\n try {\n const localeObj = new Intl.Locale(locale)\n const {textInfo} = localeObj as Intl.Locale & {textInfo?: {direction: string}}\n if (textInfo) {\n return textInfo.direction === 'rtl'\n }\n } catch {\n // Fallback\n }\n return isRtl?.value ?? false\n})\n\nconst computedClasses = computed(() => [\n 'form-control',\n 'b-form-rating',\n 'align-items-center',\n {\n 'is-readonly': props.readonly,\n 'is-disabled': props.disabled,\n 'no-border': props.noBorder,\n 'd-flex': !props.inline,\n 'd-inline-flex': props.inline,\n 'b-form-rating-inline': props.inline,\n },\n])\n\nconst isIconFull = (index: number): boolean => displayValue.value - index >= 1\nconst isIconHalf = (index: number): boolean => {\n const diff = displayValue.value - index\n return diff >= 0.5 && diff < 1\n}\nconst iconPaths = {\n full: 'M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z',\n half: 'M5.354 5.119 7.538.792A.52.52 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.54.54 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.5.5 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.6.6 0 0 1 .085-.302.51.51 0 0 1 .37-.245zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.56.56 0 0 1 .162-.505l2.907-2.77-4.052-.576a.53.53 0 0 1-.393-.288L8.001 2.223 8 2.226z',\n empty:\n 'M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.522 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z',\n clear:\n 'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708',\n} as const\nconst getIcon = (index: number): string => {\n if (isIconFull(index)) return iconPaths.full\n if (isIconHalf(index)) return iconPaths.half\n return iconPaths.empty\n}\n\nconst hoverValue = ref<number | null>(null)\n\nconst displayValue = computed(() =>\n hoverValue.value !== null ? hoverValue.value : modelValue.value\n)\n\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst computedSize = computed(() => {\n const resolved = {\n sm: 0.875,\n default: 1,\n lg: 1.25,\n } satisfies Record<Size | 'default', number>\n return `${resolved[props.size ?? 'default']}rem`\n})\n\nconst computedFormatter = computed(() => {\n const preciseValue = props.precision > 0 ? props.precision : 0\n return new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumFractionDigits: preciseValue,\n maximumFractionDigits: preciseValue,\n notation: 'standard',\n })\n})\n\nconst displayValueText = computed(() => {\n const val = props.precision > 0 ? roundedValue.value : displayValue.value\n const formattedValue = computedFormatter.value.format(val)\n if (props.showValueMax) {\n const formattedMax = computedFormatter.value.format(computedLength.value)\n return `${formattedValue}/${formattedMax}`\n }\n if (props.showValue) {\n return formattedValue\n }\n return ''\n})\n\nconst roundedValue = computed(() => {\n const val = displayValue.value\n const factor = 10 ** props.precision\n return Math.round((val + Number.EPSILON) * factor) / factor\n})\n\nconst iconColors = computed(() =>\n Array.from({length: computedLength.value}, () => {\n if (props.disabled) {\n return {class: 'is-disabled', style: {}}\n }\n if (props.variant) {\n return {class: `text-${props.variant}`, style: {}}\n }\n if (props.color) {\n return {class: '', style: {color: props.color}}\n }\n return {class: '', style: {}}\n })\n)\n\n//add keyboard support\nconst onKeydown = (e: KeyboardEvent) => {\n if (props.readonly || props.disabled) return\n\n let newValue = modelValue.value\n\n const isRtlMode = computedRtl.value\n\n switch (e.key) {\n case 'ArrowRight':\n newValue = isRtlMode\n ? Math.max(newValue - 1, 0)\n : Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowUp':\n newValue = Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowLeft':\n newValue = isRtlMode\n ? Math.min(newValue + 1, computedLength.value)\n : Math.max(newValue - 1, 0)\n break\n case 'ArrowDown':\n newValue = Math.max(newValue - 1, 0)\n break\n default:\n return\n }\n\n e.preventDefault()\n modelValue.value = newValue\n}\n\nconst selectRating = (itemIndex: number) => {\n if (props.readonly || props.disabled) return\n modelValue.value = hoverValue.value !== null ? hoverValue.value : itemIndex\n}\n\n// clear\nconst clearRating = () => {\n hoverValue.value = null\n modelValue.value = 0\n}\n\ndefineExpose({\n hoverValue,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,IAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBtB,MAAM,QAAQ,YAAY,SAAQ,aAAa;EAG/C,MAAM,aAAa,SAA+D,SAAA,YAAa;EAE/F,MAAM,aAAa,cAAY,MAAM,IAAI,aAAa;EAEtD,MAAM,EAAC,OAAO,QAAQ,iBAAgB,OAAO;EAE7C,MAAM,iBAAiB,eAAe;GACpC,MAAM,OAAO,MAAM,UAAU,cAAc,UAAU,KAAA;GAErD,OAAO,IADQ,KAAK,aAAa,GAC1B,CAAA,CAAG,gBAAgB,CAAC,CAAC;EAC9B,CAAC;EAED,MAAM,cAAc,eAAe;GACjC,MAAM,SAAS,eAAe;GAC9B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tMmDgrF.js","names":[],"sources":["../src/components/BFormRating/BFormRating.vue","../src/components/BFormRating/BFormRating.vue"],"sourcesContent":["<template>\n <output\n :id=\"computedId\"\n :class=\"computedClasses\"\n :dir=\"computedRtl ? 'rtl' : 'ltr'\"\n :form=\"props.form ? props.form : undefined\"\n role=\"slider\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"computedLength\"\n :aria-valuenow=\"displayValue\"\n :aria-valuetext=\"props.labelValueCurrent(displayValue, computedLength)\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :aria-readonly=\"props.readonly ? true : undefined\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n @keydown=\"onKeydown\"\n >\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"modelValue\"\n />\n <span\n v-if=\"props.showClear && !props.readonly && !props.disabled\"\n class=\"rating-clear-button\"\n @click=\"clearRating\"\n >\n <slot name=\"icon-clear\">\n <svg\n viewBox=\"0 0 16 16\"\n role=\"img\"\n :aria-label=\"props.clearLabel\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"clear-icon\"\n >\n <g>\n <path :d=\"iconPaths.clear\" />\n </g>\n </svg>\n </slot>\n </span>\n <span\n v-for=\"(itemIndex, index) in computedLength\"\n :key=\"itemIndex\"\n class=\"rating-item flex-grow-1\"\n @click=\"selectRating(itemIndex)\"\n >\n <slot :item-index=\"itemIndex\" :is-filled=\"isIconFull(index)\" :is-half=\"isIconHalf(index)\">\n <span class=\"b-form-rating-item\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n :width=\"computedSize\"\n :height=\"computedSize\"\n fill=\"currentColor\"\n :class=\"[iconColors[index]?.class]\"\n :style=\"iconColors[index]?.style\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"getIcon(index)\" />\n </svg>\n </span>\n </slot>\n </span>\n\n <span\n v-if=\"props.showValue || props.showValueMax\"\n :style=\"{fontSize: computedSize}\"\n class=\"rating-value-text\"\n >\n {{ displayValueText }}\n </span>\n </output>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {BFormRatingProps, BFormRatingSlots, Size} from '../../types'\n\nconst lengthDefault = 5\nconst _props = withDefaults(defineProps<Omit<BFormRatingProps, 'modelValue'>>(), {\n clearLabel: 'Clear rating',\n color: '',\n id: undefined,\n inline: false,\n labelValueCurrent: (current: number, max: number) => `${current} of ${max}`,\n locale: undefined,\n noBorder: false,\n precision: 0,\n readonly: false,\n disabled: false,\n form: undefined,\n name: undefined,\n showClear: false,\n showValue: false,\n showValueMax: false,\n size: undefined,\n length: lengthDefault,\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BFormRating')\ndefineSlots<BFormRatingSlots>()\n\nconst modelValue = defineModel<Exclude<BFormRatingProps['modelValue'], undefined>>({default: 0})\n\nconst computedId = useId(() => props.id, 'form-rating')\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || undefined\n const nf = new Intl.NumberFormat(loc)\n return nf.resolvedOptions().locale\n})\n\nconst computedRtl = computed(() => {\n const locale = computedLocale.value\n try {\n const localeObj = new Intl.Locale(locale)\n const {textInfo} = localeObj as Intl.Locale & {textInfo?: {direction: string}}\n if (textInfo) {\n return textInfo.direction === 'rtl'\n }\n } catch {\n // Fallback\n }\n return isRtl?.value ?? false\n})\n\nconst computedClasses = computed(() => [\n 'form-control',\n 'b-form-rating',\n 'align-items-center',\n {\n 'is-readonly': props.readonly,\n 'is-disabled': props.disabled,\n 'no-border': props.noBorder,\n 'd-flex': !props.inline,\n 'd-inline-flex': props.inline,\n 'b-form-rating-inline': props.inline,\n },\n])\n\nconst isIconFull = (index: number): boolean => displayValue.value - index >= 1\nconst isIconHalf = (index: number): boolean => {\n const diff = displayValue.value - index\n return diff >= 0.5 && diff < 1\n}\nconst iconPaths = {\n full: 'M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z',\n half: 'M5.354 5.119 7.538.792A.52.52 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.54.54 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.5.5 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.6.6 0 0 1 .085-.302.51.51 0 0 1 .37-.245zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.56.56 0 0 1 .162-.505l2.907-2.77-4.052-.576a.53.53 0 0 1-.393-.288L8.001 2.223 8 2.226z',\n empty:\n 'M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.522 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z',\n clear:\n 'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708',\n} as const\nconst getIcon = (index: number): string => {\n if (isIconFull(index)) return iconPaths.full\n if (isIconHalf(index)) return iconPaths.half\n return iconPaths.empty\n}\n\nconst hoverValue = ref<number | null>(null)\n\nconst displayValue = computed(() =>\n hoverValue.value !== null ? hoverValue.value : modelValue.value\n)\n\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst computedSize = computed(() => {\n const resolved = {\n sm: 0.875,\n default: 1,\n lg: 1.25,\n } satisfies Record<Size | 'default', number>\n return `${resolved[props.size ?? 'default']}rem`\n})\n\nconst computedFormatter = computed(() => {\n const preciseValue = props.precision > 0 ? props.precision : 0\n return new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumFractionDigits: preciseValue,\n maximumFractionDigits: preciseValue,\n notation: 'standard',\n })\n})\n\nconst displayValueText = computed(() => {\n const val = props.precision > 0 ? roundedValue.value : displayValue.value\n const formattedValue = computedFormatter.value.format(val)\n if (props.showValueMax) {\n const formattedMax = computedFormatter.value.format(computedLength.value)\n return `${formattedValue}/${formattedMax}`\n }\n if (props.showValue) {\n return formattedValue\n }\n return ''\n})\n\nconst roundedValue = computed(() => {\n const val = displayValue.value\n const factor = 10 ** props.precision\n return Math.round((val + Number.EPSILON) * factor) / factor\n})\n\nconst iconColors = computed(() =>\n Array.from({length: computedLength.value}, () => {\n if (props.disabled) {\n return {class: 'is-disabled', style: {}}\n }\n if (props.variant) {\n return {class: `text-${props.variant}`, style: {}}\n }\n if (props.color) {\n return {class: '', style: {color: props.color}}\n }\n return {class: '', style: {}}\n })\n)\n\n//add keyboard support\nconst onKeydown = (e: KeyboardEvent) => {\n if (props.readonly || props.disabled) return\n\n let newValue = modelValue.value\n\n const isRtlMode = computedRtl.value\n\n switch (e.key) {\n case 'ArrowRight':\n newValue = isRtlMode\n ? Math.max(newValue - 1, 0)\n : Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowUp':\n newValue = Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowLeft':\n newValue = isRtlMode\n ? Math.min(newValue + 1, computedLength.value)\n : Math.max(newValue - 1, 0)\n break\n case 'ArrowDown':\n newValue = Math.max(newValue - 1, 0)\n break\n default:\n return\n }\n\n e.preventDefault()\n modelValue.value = newValue\n}\n\nconst selectRating = (itemIndex: number) => {\n if (props.readonly || props.disabled) return\n modelValue.value = hoverValue.value !== null ? hoverValue.value : itemIndex\n}\n\n// clear\nconst clearRating = () => {\n hoverValue.value = null\n modelValue.value = 0\n}\n\ndefineExpose({\n hoverValue,\n})\n</script>\n","<template>\n <output\n :id=\"computedId\"\n :class=\"computedClasses\"\n :dir=\"computedRtl ? 'rtl' : 'ltr'\"\n :form=\"props.form ? props.form : undefined\"\n role=\"slider\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"computedLength\"\n :aria-valuenow=\"displayValue\"\n :aria-valuetext=\"props.labelValueCurrent(displayValue, computedLength)\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n :aria-readonly=\"props.readonly ? true : undefined\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n @keydown=\"onKeydown\"\n >\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"modelValue\"\n />\n <span\n v-if=\"props.showClear && !props.readonly && !props.disabled\"\n class=\"rating-clear-button\"\n @click=\"clearRating\"\n >\n <slot name=\"icon-clear\">\n <svg\n viewBox=\"0 0 16 16\"\n role=\"img\"\n :aria-label=\"props.clearLabel\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"clear-icon\"\n >\n <g>\n <path :d=\"iconPaths.clear\" />\n </g>\n </svg>\n </slot>\n </span>\n <span\n v-for=\"(itemIndex, index) in computedLength\"\n :key=\"itemIndex\"\n class=\"rating-item flex-grow-1\"\n @click=\"selectRating(itemIndex)\"\n >\n <slot :item-index=\"itemIndex\" :is-filled=\"isIconFull(index)\" :is-half=\"isIconHalf(index)\">\n <span class=\"b-form-rating-item\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n :width=\"computedSize\"\n :height=\"computedSize\"\n fill=\"currentColor\"\n :class=\"[iconColors[index]?.class]\"\n :style=\"iconColors[index]?.style\"\n viewBox=\"0 0 16 16\"\n >\n <path :d=\"getIcon(index)\" />\n </svg>\n </span>\n </slot>\n </span>\n\n <span\n v-if=\"props.showValue || props.showValueMax\"\n :style=\"{fontSize: computedSize}\"\n class=\"rating-value-text\"\n >\n {{ displayValueText }}\n </span>\n </output>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, ref} from 'vue'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {BFormRatingProps, BFormRatingSlots, Size} from '../../types'\n\nconst lengthDefault = 5\nconst _props = withDefaults(defineProps<Omit<BFormRatingProps, 'modelValue'>>(), {\n clearLabel: 'Clear rating',\n color: '',\n id: undefined,\n inline: false,\n labelValueCurrent: (current: number, max: number) => `${current} of ${max}`,\n locale: undefined,\n noBorder: false,\n precision: 0,\n readonly: false,\n disabled: false,\n form: undefined,\n name: undefined,\n showClear: false,\n showValue: false,\n showValueMax: false,\n size: undefined,\n length: lengthDefault,\n variant: undefined,\n})\nconst props = useDefaults(_props, 'BFormRating')\ndefineSlots<BFormRatingSlots>()\n\nconst modelValue = defineModel<Exclude<BFormRatingProps['modelValue'], undefined>>({default: 0})\n\nconst computedId = useId(() => props.id, 'form-rating')\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || undefined\n const nf = new Intl.NumberFormat(loc)\n return nf.resolvedOptions().locale\n})\n\nconst computedRtl = computed(() => {\n const locale = computedLocale.value\n try {\n const localeObj = new Intl.Locale(locale)\n const {textInfo} = localeObj as Intl.Locale & {textInfo?: {direction: string}}\n if (textInfo) {\n return textInfo.direction === 'rtl'\n }\n } catch {\n // Fallback\n }\n return isRtl?.value ?? false\n})\n\nconst computedClasses = computed(() => [\n 'form-control',\n 'b-form-rating',\n 'align-items-center',\n {\n 'is-readonly': props.readonly,\n 'is-disabled': props.disabled,\n 'no-border': props.noBorder,\n 'd-flex': !props.inline,\n 'd-inline-flex': props.inline,\n 'b-form-rating-inline': props.inline,\n },\n])\n\nconst isIconFull = (index: number): boolean => displayValue.value - index >= 1\nconst isIconHalf = (index: number): boolean => {\n const diff = displayValue.value - index\n return diff >= 0.5 && diff < 1\n}\nconst iconPaths = {\n full: 'M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z',\n half: 'M5.354 5.119 7.538.792A.52.52 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.54.54 0 0 1 16 6.32a.55.55 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.5.5 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.6.6 0 0 1 .085-.302.51.51 0 0 1 .37-.245zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.56.56 0 0 1 .162-.505l2.907-2.77-4.052-.576a.53.53 0 0 1-.393-.288L8.001 2.223 8 2.226z',\n empty:\n 'M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.522 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.56.56 0 0 0-.163-.505L1.71 6.745l4.052-.576a.53.53 0 0 0 .393-.288L8 2.223l1.847 3.658a.53.53 0 0 0 .393.288l4.052.575-2.906 2.77a.56.56 0 0 0-.163.506l.694 3.957-3.686-1.894a.5.5 0 0 0-.461 0z',\n clear:\n 'M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708',\n} as const\nconst getIcon = (index: number): string => {\n if (isIconFull(index)) return iconPaths.full\n if (isIconHalf(index)) return iconPaths.half\n return iconPaths.empty\n}\n\nconst hoverValue = ref<number | null>(null)\n\nconst displayValue = computed(() =>\n hoverValue.value !== null ? hoverValue.value : modelValue.value\n)\n\nconst lengthNumber = useToNumber(() => props.length, {nanToZero: true, method: 'parseInt'})\nconst computedLength = computed(() => (lengthNumber.value > 0 ? lengthNumber.value : lengthDefault))\n\nconst computedSize = computed(() => {\n const resolved = {\n sm: 0.875,\n default: 1,\n lg: 1.25,\n } satisfies Record<Size | 'default', number>\n return `${resolved[props.size ?? 'default']}rem`\n})\n\nconst computedFormatter = computed(() => {\n const preciseValue = props.precision > 0 ? props.precision : 0\n return new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumFractionDigits: preciseValue,\n maximumFractionDigits: preciseValue,\n notation: 'standard',\n })\n})\n\nconst displayValueText = computed(() => {\n const val = props.precision > 0 ? roundedValue.value : displayValue.value\n const formattedValue = computedFormatter.value.format(val)\n if (props.showValueMax) {\n const formattedMax = computedFormatter.value.format(computedLength.value)\n return `${formattedValue}/${formattedMax}`\n }\n if (props.showValue) {\n return formattedValue\n }\n return ''\n})\n\nconst roundedValue = computed(() => {\n const val = displayValue.value\n const factor = 10 ** props.precision\n return Math.round((val + Number.EPSILON) * factor) / factor\n})\n\nconst iconColors = computed(() =>\n Array.from({length: computedLength.value}, () => {\n if (props.disabled) {\n return {class: 'is-disabled', style: {}}\n }\n if (props.variant) {\n return {class: `text-${props.variant}`, style: {}}\n }\n if (props.color) {\n return {class: '', style: {color: props.color}}\n }\n return {class: '', style: {}}\n })\n)\n\n//add keyboard support\nconst onKeydown = (e: KeyboardEvent) => {\n if (props.readonly || props.disabled) return\n\n let newValue = modelValue.value\n\n const isRtlMode = computedRtl.value\n\n switch (e.key) {\n case 'ArrowRight':\n newValue = isRtlMode\n ? Math.max(newValue - 1, 0)\n : Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowUp':\n newValue = Math.min(newValue + 1, computedLength.value)\n break\n case 'ArrowLeft':\n newValue = isRtlMode\n ? Math.min(newValue + 1, computedLength.value)\n : Math.max(newValue - 1, 0)\n break\n case 'ArrowDown':\n newValue = Math.max(newValue - 1, 0)\n break\n default:\n return\n }\n\n e.preventDefault()\n modelValue.value = newValue\n}\n\nconst selectRating = (itemIndex: number) => {\n if (props.readonly || props.disabled) return\n modelValue.value = hoverValue.value !== null ? hoverValue.value : itemIndex\n}\n\n// clear\nconst clearRating = () => {\n hoverValue.value = null\n modelValue.value = 0\n}\n\ndefineExpose({\n hoverValue,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,IAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBtB,MAAM,QAAQ,YAAY,SAAQ,aAAa;EAG/C,MAAM,aAAa,SAA+D,SAAA,YAAa;EAE/F,MAAM,aAAa,cAAY,MAAM,IAAI,aAAa;EAEtD,MAAM,EAAC,OAAO,QAAQ,iBAAgB,OAAO;EAE7C,MAAM,iBAAiB,eAAe;GACpC,MAAM,OAAO,MAAM,UAAU,cAAc,UAAU,KAAA;GAErD,OAAO,IADQ,KAAK,aAAa,GAC1B,CAA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,gBAAA,iBAAA,KAAgB,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { d as formGroupKey, f as formSelectKey } from "./keys-BgLwJbLV.js";
|
|
2
|
-
import { S as useToNumber } from "./dist-DKc2ivHS.js";
|
|
3
|
-
import { m as useFocus } from "./dist-9-XTMhb-.js";
|
|
4
2
|
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
5
3
|
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
6
4
|
import { t as useAriaInvalid } from "./useAriaInvalid-CRUhkD2V.js";
|
|
@@ -8,6 +6,7 @@ import { t as useStateClass } from "./useStateClass-BF7kf2zK.js";
|
|
|
8
6
|
import { t as useFormSelect } from "./useFormSelect-CwS8YuiQ.js";
|
|
9
7
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-C8orMj24.js";
|
|
10
8
|
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, defineComponent, guardReactiveProps, inject, mergeModels, mergeProps, normalizeClass, normalizeProps, openBlock, provide, readonly, renderList, renderSlot, toDisplayString, unref, useModel, useTemplateRef, vModelSelect, withCtx, withDirectives } from "vue";
|
|
9
|
+
import { useFocus, useToNumber } from "@vueuse/core";
|
|
11
10
|
//#region src/components/BFormSelect/BFormSelectOptionGroup.vue?vue&type=script&setup=true&lang.ts
|
|
12
11
|
var _hoisted_1$1 = ["label"];
|
|
13
12
|
//#endregion
|
|
@@ -316,4 +315,4 @@ var BFormSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
316
315
|
//#endregion
|
|
317
316
|
export { BFormSelectOptionGroup_default as n, BFormSelect_default as t };
|
|
318
317
|
|
|
319
|
-
//# sourceMappingURL=BFormSelect-
|
|
318
|
+
//# sourceMappingURL=BFormSelect-CeslPN3i.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSelect-CSS-_kul.js","names":["$attrs"],"sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectExposes, BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<BFormSelectBaseProps['modelValue']>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectExposes, BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<BFormSelectBaseProps['modelValue']>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <BFormSelectBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions as any\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps as any\" />\n </template>\n\n <slot />\n </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectExposes,\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n element: computed(() => base?.value?.element ?? null),\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <BFormSelectBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions as any\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps as any\" />\n </template>\n\n <slot />\n </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectExposes,\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n element: computed(() => base?.value?.element ?? null),\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormSelectExposes)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,YAAY,SAAQ,wBAAwB;EAU1D,MAAM,EAAC,sBAAqB,oBAAoB,MAAM,SAAS,KAAK;;GA3ClE,OAAA,UAAA,GAAA,mBAYW,YAAA,EAZA,OAAO,MAAA,KAAA,CAAK,CAAC,MAAA,GAAA;IACtB,WAAqB,KAAA,QAAA,OAAA;KACrB,UAAA,IAAA,GAAA,mBAQoB,UAAA,MAAA,WAPQ,MAAA,iBAAA,IAAlB,QAAQ,UAAK;KADvB,OAAA,UAAA,GAAA,YAQoB,2BARpB,WAQoB,EANjB,KAAK,MAAK,GAAA,E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AO,sBAAsB,EAAY;GAC3C,CAAC;GAGH,OAAO,aAAa,KAAK,OAAO;IAC9B,IAAI,OAAO,OAAO,YAAY,OAAO,OAAO,YAAY,OAAO,OAAO,WACpE,OAAO,mBAAmB,EAAE;IAG9B,OAAO,sBAAsB,EAAY;GAC3C,CAAC;EACH,CAAC;EAID,MAAM,iBAAiB,gBAAgB;GACrC,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,OAAO,MAAM;GACb,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ,OAAO,MAAM;EACf,EAAE;EAEF,MAAM,OAAO,eAAe,OAAO;EACnC,SAAa;GACX,YAAY;IACV,MAAM,OAAO,KAAK;GACpB;GACA,SAAS,eAAe,MAAM,OAAO,WAAW,IAAI;GACpD,aAAa;IACX,MAAM,OAAO,MAAM;GACrB;EACF,CAA8B;;GA/K5B,OAAA,UAAA,GAAA,YAgBkB,yBAhBlB,WAgBkB,EAfhB,KAAI,QAAO,GACH,eAAA,OAAc;IACb,YAAA,WAAA;IAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,WAAA,QAAU;IAClB,SAAS,kBAAA;;IAGC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAgD,KAAA,QAAA,UAAA,eAAA,mBAApB,SAAS,CAAA,CAAA,CAAA,CAAA;IAGvC,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormSelect-CeslPN3i.js","names":["$attrs"],"sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectExposes, BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<BFormSelectBaseProps['modelValue']>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectExposes, BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<BFormSelectBaseProps['modelValue']>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.()\nformGroupData?.track(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <BFormSelectBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions as any\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps as any\" />\n </template>\n\n <slot />\n </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectExposes,\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n element: computed(() => base?.value?.element ?? null),\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormSelectExposes)\n</script>\n","<template>\n <BFormSelectBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as any\"\n :options=\"normalizedOptions as any\"\n >\n <!-- Forward all slots -->\n <template #first>\n <slot name=\"first\" />\n </template>\n\n <template #option=\"slotProps\">\n <slot name=\"option\" v-bind=\"slotProps as any\" />\n </template>\n\n <slot />\n </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n object | string | number | boolean\n )[]\n \"\n>\nimport {computed, useTemplateRef} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectExposes,\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n element: computed(() => base?.value?.element ?? null),\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormSelectExposes)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,YAAY,SAAQ,wBAAwB;EAU1D,MAAM,EAAC,sBAAqB,oBAAoB,MAAM,SAAS,KAAK;;GA3ClE,OAAA,UAAA,GAAA,mBAYW,YAAA,EAZA,OAAO,MAAA,KAAA,CAAK,CAAC,MAAA,GAAA;IACtB,WAAqB,KAAA,QAAA,OAAA;KACrB,UAAA,IAAA,GAAA,mBAQoB,UAAA,MAAA,WAPQ,MAAA,iBAAA,IAAlB,QAAQ,UAAK;KADvB,OAAA,UAAA,GAAA,YAQoB,2BARpB,WAQoB,EANjB,KAAK,MAAK,GAAA,EAAA,SAAA,KAAA,GAAA;MAAA,GACCA,KAAAA;MAAM,GAAK;KAAM,CAAA,GAAA;MAE7B,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,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,OAAO,WACpE,OAAO,mBAAmB,EAAE;IAG9B,OAAO,sBAAsB,EAAY;GAC3C,CAAC;EACH,CAAC;EAID,MAAM,iBAAiB,gBAAgB;GACrC,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,OAAO,MAAM;GACb,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ,OAAO,MAAM;EACf,EAAE;EAEF,MAAM,OAAO,eAAe,OAAO;EACnC,SAAa;GACX,YAAY;IACV,MAAM,OAAO,KAAK;GACpB;GACA,SAAS,eAAe,MAAM,OAAO,WAAW,IAAI;GACpD,aAAa;IACX,MAAM,OAAO,MAAM;GACrB;EACF,CAA8B;;GA/K5B,OAAA,UAAA,GAAA,YAgBkB,yBAhBlB,WAgBkB,EAfhB,KAAI,QAAO,GACH,eAAA,OAAc;IACb,YAAA,WAAA;IAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,WAAA,QAAU;IAClB,SAAS,kBAAA;;IAGC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAgD,KAAA,QAAA,UAAA,eAAA,mBAApB,SAAS,CAAA,CAAA,CAAA,CAAA;IAGvC,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { S as useToNumber } from "./dist-DKc2ivHS.js";
|
|
2
|
-
import { a as onKeyStroke, m as useFocus } from "./dist-9-XTMhb-.js";
|
|
3
1
|
import { i as getSafeDocument } from "./dom-BdUQrX99.js";
|
|
4
2
|
import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
5
3
|
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
6
4
|
import { a as CODE_PAGEUP, i as CODE_PAGEDOWN, n as CODE_HOME, s as CODE_UP, t as CODE_DOWN } from "./constants-Cap5sNf8.js";
|
|
7
5
|
import { t as useRtl } from "./useRtl-FeLayV4k.js";
|
|
8
6
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, onUnmounted, openBlock, renderSlot, toDisplayString, unref, useModel, useTemplateRef } from "vue";
|
|
7
|
+
import { onKeyStroke, useFocus, useToNumber } from "@vueuse/core";
|
|
9
8
|
//#region src/components/BFormSpinbutton/BFormSpinbutton.vue?vue&type=script&setup=true&lang.ts
|
|
10
9
|
var _hoisted_1 = [
|
|
11
10
|
"lang",
|
|
@@ -441,4 +440,4 @@ var BFormSpinbutton_default = /* @__PURE__ */ defineComponent({
|
|
|
441
440
|
//#endregion
|
|
442
441
|
export { BFormSpinbutton_default as t };
|
|
443
442
|
|
|
444
|
-
//# sourceMappingURL=BFormSpinbutton-
|
|
443
|
+
//# sourceMappingURL=BFormSpinbutton-BR9YTfYy.js.map
|