bootstrap-vue-next 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{BFormCheckbox-BMhyR-J5.js → BFormCheckbox-BYNGQgr2.js} +12 -3
  2. package/dist/BFormCheckbox-BYNGQgr2.js.map +1 -0
  3. package/dist/{BFormRadio-DRViMh6V.js → BFormRadio-DAddcnfE.js} +12 -3
  4. package/dist/BFormRadio-DAddcnfE.js.map +1 -0
  5. package/dist/{BFormSelect-QXCaxgWx.js → BFormSelect-CSS-_kul.js} +13 -3
  6. package/dist/BFormSelect-CSS-_kul.js.map +1 -0
  7. package/dist/bootstrap-vue-next.mjs +3 -3
  8. package/dist/components/BFormCheckbox/BFormCheckboxGroup.vue.d.mts +4 -1
  9. package/dist/components/BFormCheckbox/BFormCheckboxGroup.vue.d.ts +4 -1
  10. package/dist/components/BFormRadio/BFormRadioGroup.vue.d.mts +4 -1
  11. package/dist/components/BFormRadio/BFormRadioGroup.vue.d.ts +4 -1
  12. package/dist/components/BFormSelect/BFormSelect.vue.d.mts +5 -1
  13. package/dist/components/BFormSelect/BFormSelect.vue.d.ts +5 -1
  14. package/dist/composables/useToast/index.d.mts +3 -1
  15. package/dist/composables/useToast/index.d.ts +3 -1
  16. package/dist/src/components/BFormCheckbox/index.mjs +1 -1
  17. package/dist/src/components/BFormRadio/index.mjs +1 -1
  18. package/dist/src/components/BFormSelect/index.mjs +1 -1
  19. package/dist/src/components/index.mjs +3 -3
  20. package/dist/src/composables/orchestratorShared/index.mjs +1 -1
  21. package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
  22. package/dist/src/composables/useToast/index.mjs +62 -2
  23. package/dist/src/composables/useToast/index.mjs.map +1 -1
  24. package/dist/src/types/index.mjs.map +1 -1
  25. package/dist/types/ComponentExposes.d.mts +10 -0
  26. package/dist/types/ComponentExposes.d.ts +10 -0
  27. package/dist/types/index.d.mts +1 -0
  28. package/dist/types/index.d.ts +1 -0
  29. package/package.json +1 -1
  30. package/dist/BFormCheckbox-BMhyR-J5.js.map +0 -1
  31. package/dist/BFormRadio-DRViMh6V.js.map +0 -1
  32. package/dist/BFormSelect-QXCaxgWx.js.map +0 -1
@@ -426,7 +426,7 @@ var BFormCheckboxGroup_default = /* @__PURE__ */ defineComponent({
426
426
  "modelModifiers": {}
427
427
  }),
428
428
  emits: ["update:modelValue"],
429
- setup(__props) {
429
+ setup(__props, { expose: __expose }) {
430
430
  const props = __props;
431
431
  const modelValue = useModel(__props, "modelValue");
432
432
  const normalizedOptions = computed(() => (props.options ?? []).map((el) => typeof el === "string" || typeof el === "number" || typeof el === "boolean" ? {
@@ -456,8 +456,17 @@ var BFormCheckboxGroup_default = /* @__PURE__ */ defineComponent({
456
456
  reverse: props.reverse,
457
457
  switches: props.switches
458
458
  }));
459
+ const base = useTemplateRef("_base");
460
+ __expose({
461
+ blur: () => {
462
+ base?.value?.blur();
463
+ },
464
+ focus: () => {
465
+ base?.value?.focus();
466
+ }
467
+ });
459
468
  return (_ctx, _cache) => {
460
- return openBlock(), createBlock(BFormCheckboxGroupBase_default, mergeProps(forwardedProps.value, {
469
+ return openBlock(), createBlock(BFormCheckboxGroupBase_default, mergeProps({ ref: "_base" }, forwardedProps.value, {
461
470
  modelValue: modelValue.value,
462
471
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
463
472
  options: normalizedOptions.value
@@ -473,4 +482,4 @@ var BFormCheckboxGroup_default = /* @__PURE__ */ defineComponent({
473
482
  //#endregion
474
483
  export { BFormCheckbox_default as n, BFormCheckboxGroup_default as t };
475
484
 
476
- //# sourceMappingURL=BFormCheckbox-BMhyR-J5.js.map
485
+ //# sourceMappingURL=BFormCheckbox-BYNGQgr2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BFormCheckbox-BYNGQgr2.js","names":[],"sources":["../src/components/BFormCheckbox/BFormCheckbox.vue","../src/components/BFormCheckbox/BFormCheckbox.vue","../src/components/BFormCheckbox/BFormCheckboxGroupBase.vue","../src/components/BFormCheckbox/BFormCheckboxGroupBase.vue","../src/components/BFormCheckbox/BFormCheckboxGroup.vue","../src/components/BFormCheckbox/BFormCheckboxGroup.vue"],"sourcesContent":["<template>\n <ConditionalWrapper\n :skip=\"isButtonGroup\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"computedWrapperClasses\"\n >\n <input\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedInputClasses\"\n type=\"checkbox\"\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 :aria-required=\"computedRequired || undefined\"\n :value=\"props.value\"\n :true-value=\"props.value\"\n :false-value=\"props.uncheckedValue\"\n :indeterminate=\"indeterminate || undefined\"\n v-bind=\"processedAttrs.inputAttrs\"\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, useAttrs, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {checkboxGroupKey, formGroupKey} from '../../utils/keys'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BFormCheckboxProps, BFormCheckboxSlots, CheckboxValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(\n defineProps<Omit<BFormCheckboxProps, 'modelValue' | 'indeterminate'>>(),\n {\n wrapperAttrs: undefined,\n inputClass: undefined,\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 switch: undefined,\n uncheckedValue: undefined,\n value: true,\n }\n)\nconst props = useDefaults(_props, 'BFormCheckbox')\nconst slots = defineSlots<BFormCheckboxSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<BFormCheckboxProps['modelValue']>({\n default: undefined,\n})\nconst indeterminate = defineModel<Exclude<BFormCheckboxProps['indeterminate'], undefined>>(\n 'indeterminate',\n {\n default: false,\n }\n)\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...inputAttrs} = attrs\n return {wrapperClass, inputAttrs}\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(checkboxGroupKey, 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 switch: 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 switch: props.switch ?? parentData?.switch.value ?? propDefaults.switch,\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: (newVal) => {\n // Indeterminate is implicitly cleared when the checked state is changed to any value\n // by the user. We reflect that here by setting our indetermiate model to false\n // which will emit the indeterminate event to the parent\n indeterminate.value = false\n if (parentData !== null && Array.isArray(newVal)) {\n // The type cast isn't perfect. Array.isArray detects CheckboxValue.unknown[],\n // but since it's parentData, it should always be CheckboxValue[]\n // It doesn't quite work when props.value is an [], but this is more of a Vue issue\n parentData.modelValue.value = newVal as CheckboxValue[]\n return\n }\n modelValue.value = newVal as CheckboxValue\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 wrapperClasses = getClasses(classesObject)\nconst computedWrapperClasses = computed(() => [\n wrapperClasses.value,\n processedAttrs.value.wrapperClass,\n])\nconst inputClasses = getInputClasses(classesObject)\nconst computedInputClasses = computed(() => [inputClasses.value, props.inputClass])\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\n :skip=\"isButtonGroup\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"computedWrapperClasses\"\n >\n <input\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedInputClasses\"\n type=\"checkbox\"\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 :aria-required=\"computedRequired || undefined\"\n :value=\"props.value\"\n :true-value=\"props.value\"\n :false-value=\"props.uncheckedValue\"\n :indeterminate=\"indeterminate || undefined\"\n v-bind=\"processedAttrs.inputAttrs\"\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, useAttrs, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {checkboxGroupKey, formGroupKey} from '../../utils/keys'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BFormCheckboxProps, BFormCheckboxSlots, CheckboxValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(\n defineProps<Omit<BFormCheckboxProps, 'modelValue' | 'indeterminate'>>(),\n {\n wrapperAttrs: undefined,\n inputClass: undefined,\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 switch: undefined,\n uncheckedValue: undefined,\n value: true,\n }\n)\nconst props = useDefaults(_props, 'BFormCheckbox')\nconst slots = defineSlots<BFormCheckboxSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<BFormCheckboxProps['modelValue']>({\n default: undefined,\n})\nconst indeterminate = defineModel<Exclude<BFormCheckboxProps['indeterminate'], undefined>>(\n 'indeterminate',\n {\n default: false,\n }\n)\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...inputAttrs} = attrs\n return {wrapperClass, inputAttrs}\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(checkboxGroupKey, 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 switch: 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 switch: props.switch ?? parentData?.switch.value ?? propDefaults.switch,\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: (newVal) => {\n // Indeterminate is implicitly cleared when the checked state is changed to any value\n // by the user. We reflect that here by setting our indetermiate model to false\n // which will emit the indeterminate event to the parent\n indeterminate.value = false\n if (parentData !== null && Array.isArray(newVal)) {\n // The type cast isn't perfect. Array.isArray detects CheckboxValue.unknown[],\n // but since it's parentData, it should always be CheckboxValue[]\n // It doesn't quite work when props.value is an [], but this is more of a Vue issue\n parentData.modelValue.value = newVal as CheckboxValue[]\n return\n }\n modelValue.value = newVal as CheckboxValue\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 wrapperClasses = getClasses(classesObject)\nconst computedWrapperClasses = computed(() => [\n wrapperClasses.value,\n processedAttrs.value.wrapperClass,\n])\nconst inputClasses = getInputClasses(classesObject)\nconst computedInputClasses = computed(() => [inputClasses.value, props.inputClass])\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=\"attrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"group\"\n :class=\"classes\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormCheckbox v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormCheckbox>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport type {\n BFormCheckboxGroupExposes,\n BFormCheckboxGroupBaseProps,\n CheckboxValue,\n} from '../../types'\nimport BFormCheckbox from './BFormCheckbox.vue'\nimport {checkboxGroupKey} from '../../utils/keys'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<Omit<BFormCheckboxGroupBaseProps, '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 switches: false,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormCheckboxGroup')\n\nconst modelValue = defineModel<CheckboxValue[]>({\n default: () => [],\n})\n\nconst computedId = useId(() => props.id, 'checkbox')\nconst computedName = useId(() => props.name, 'checkbox')\nconst _element = useTemplateRef('_element')\n\nconst {focused} = useFocus(_element, {\n initialValue: props.autofocus,\n})\n\n// Provide context to child checkboxes\nprovide(checkboxGroupKey, {\n modelValue: modelValue as import('vue').Ref<\n readonly import('../../types/CheckboxTypes').CheckboxValue[]\n >,\n switch: toRef(() => props.switches),\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\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 buttons: toRef(() => props.buttons),\n disabled: toRef(() => props.disabled),\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed<Array<{text: string; value: CheckboxValue; disabled: boolean}>>(\n () =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure text and disabled are defined, with group disabled taking precedence\n return {\n ...option,\n text: option.text ?? String(option.value ?? ''),\n value: option.value ?? null,\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\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 attrs = getGroupAttr(classesObject)\nconst classes = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormCheckboxGroupExposes)\n</script>\n","<template>\n <div\n v-bind=\"attrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"group\"\n :class=\"classes\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormCheckbox v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormCheckbox>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport type {\n BFormCheckboxGroupExposes,\n BFormCheckboxGroupBaseProps,\n CheckboxValue,\n} from '../../types'\nimport BFormCheckbox from './BFormCheckbox.vue'\nimport {checkboxGroupKey} from '../../utils/keys'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<Omit<BFormCheckboxGroupBaseProps, '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 switches: false,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormCheckboxGroup')\n\nconst modelValue = defineModel<CheckboxValue[]>({\n default: () => [],\n})\n\nconst computedId = useId(() => props.id, 'checkbox')\nconst computedName = useId(() => props.name, 'checkbox')\nconst _element = useTemplateRef('_element')\n\nconst {focused} = useFocus(_element, {\n initialValue: props.autofocus,\n})\n\n// Provide context to child checkboxes\nprovide(checkboxGroupKey, {\n modelValue: modelValue as import('vue').Ref<\n readonly import('../../types/CheckboxTypes').CheckboxValue[]\n >,\n switch: toRef(() => props.switches),\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\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 buttons: toRef(() => props.buttons),\n disabled: toRef(() => props.disabled),\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed<Array<{text: string; value: CheckboxValue; disabled: boolean}>>(\n () =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure text and disabled are defined, with group disabled taking precedence\n return {\n ...option,\n text: option.text ?? String(option.value ?? ''),\n value: option.value ?? null,\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\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 attrs = getGroupAttr(classesObject)\nconst classes = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n} satisfies BFormCheckboxGroupExposes)\n</script>\n","<template>\n <BFormCheckboxGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as unknown as CheckboxValue[]\"\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 </BFormCheckboxGroupBase>\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 BFormCheckboxGroupExposes,\n BFormCheckboxGroupProps,\n BFormCheckboxGroupSlots,\n CheckboxValue,\n OptionsValues,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormCheckboxGroupBase from './BFormCheckboxGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormCheckboxGroup.\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 * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is array of those value types\n * - Object arrays with 'value' field: modelValue is array of value field types\n * - Use 'as const' on options for literal type inference\n */\n\n// Generic props - type safety happens here\nconst props = withDefaults(defineProps<Omit<BFormCheckboxGroupProps<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 switches: false,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\ndefineSlots<BFormCheckboxGroupSlots>()\n\n// Type-safe model value - extracts union from options, wraps in array.\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 default: () => [],\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n (props.options ?? []).map(\n (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 String((el as Record<string, unknown>)[props.valueField as string]),\n }) as {text: string; value: CheckboxValue; disabled: boolean}\n )\n)\n\n// Forward all non-option-related props\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 switches: props.switches,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormCheckboxGroupExposes)\n</script>\n","<template>\n <BFormCheckboxGroupBase\n ref=\"_base\"\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as unknown as CheckboxValue[]\"\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 </BFormCheckboxGroupBase>\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 BFormCheckboxGroupExposes,\n BFormCheckboxGroupProps,\n BFormCheckboxGroupSlots,\n CheckboxValue,\n OptionsValues,\n} from '../../types'\nimport {computed, useTemplateRef} from 'vue'\nimport BFormCheckboxGroupBase from './BFormCheckboxGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormCheckboxGroup.\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 * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is array of those value types\n * - Object arrays with 'value' field: modelValue is array of value field types\n * - Use 'as const' on options for literal type inference\n */\n\n// Generic props - type safety happens here\nconst props = withDefaults(defineProps<Omit<BFormCheckboxGroupProps<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 switches: false,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\ndefineSlots<BFormCheckboxGroupSlots>()\n\n// Type-safe model value - extracts union from options, wraps in array.\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 default: () => [],\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n (props.options ?? []).map(\n (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 String((el as Record<string, unknown>)[props.valueField as string]),\n }) as {text: string; value: CheckboxValue; disabled: boolean}\n )\n)\n\n// Forward all non-option-related props\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 switches: props.switches,\n}))\n\nconst base = useTemplateRef('_base')\ndefineExpose({\n blur: () => {\n base?.value?.blur()\n },\n focus: () => {\n base?.value?.focus()\n },\n} satisfies BFormCheckboxGroupExposes)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEA,MAAM,QAAQ,YAAY,SAA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M,OAAO,MAAM;GACrB;EACF,CAAqC;;GAtInC,OAAA,UAAA,GAAA,YAgByB,gCAhBzB,WAgByB,EAfvB,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"}
@@ -382,7 +382,7 @@ var BFormRadioGroup_default = /* @__PURE__ */ defineComponent({
382
382
  "modelModifiers": {}
383
383
  }),
384
384
  emits: ["update:modelValue"],
385
- setup(__props) {
385
+ setup(__props, { expose: __expose }) {
386
386
  const props = __props;
387
387
  const modelValue = useModel(__props, "modelValue");
388
388
  const normalizedOptions = computed(() => (props.options ?? []).map((el) => typeof el === "string" || typeof el === "number" || typeof el === "boolean" ? {
@@ -411,8 +411,17 @@ var BFormRadioGroup_default = /* @__PURE__ */ defineComponent({
411
411
  plain: props.plain,
412
412
  reverse: props.reverse
413
413
  }));
414
+ const base = useTemplateRef("_base");
415
+ __expose({
416
+ blur: () => {
417
+ base?.value?.blur();
418
+ },
419
+ focus: () => {
420
+ base?.value?.focus();
421
+ }
422
+ });
414
423
  return (_ctx, _cache) => {
415
- return openBlock(), createBlock(BFormRadioGroupBase_default, mergeProps(forwardedProps.value, {
424
+ return openBlock(), createBlock(BFormRadioGroupBase_default, mergeProps({ ref: "_base" }, forwardedProps.value, {
416
425
  modelValue: modelValue.value,
417
426
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
418
427
  options: normalizedOptions.value
@@ -428,4 +437,4 @@ var BFormRadioGroup_default = /* @__PURE__ */ defineComponent({
428
437
  //#endregion
429
438
  export { BFormRadio_default as n, BFormRadioGroup_default as t };
430
439
 
431
- //# sourceMappingURL=BFormRadio-DRViMh6V.js.map
440
+ //# sourceMappingURL=BFormRadio-DAddcnfE.js.map
@@ -0,0 +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?.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;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,MAAM;GACZ,aAAa,MAAM;GACnB,OAAO,MAAM;GACb,SAAS,MAAM;EACjB,EAAE;EAEF,MAAM,OAAO,eAAe,OAAO;EACnC,SAAa;GACX,YAAY;IACV,MAAM,OAAO,KAAK;GACpB;GACA,aAAa;IACX,MAAM,OAAO,MAAM;GACrB;EACF,CAAkC;;GAlIhC,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"}
@@ -242,7 +242,7 @@ var BFormSelect_default = /* @__PURE__ */ defineComponent({
242
242
  "modelModifiers": {}
243
243
  }),
244
244
  emits: ["update:modelValue"],
245
- setup(__props) {
245
+ setup(__props, { expose: __expose }) {
246
246
  const props = __props;
247
247
  const modelValue = useModel(__props, "modelValue");
248
248
  const normalizeSimpleOption = (el) => ({
@@ -289,8 +289,18 @@ var BFormSelect_default = /* @__PURE__ */ defineComponent({
289
289
  size: props.size,
290
290
  state: props.state
291
291
  }));
292
+ const base = useTemplateRef("_base");
293
+ __expose({
294
+ blur: () => {
295
+ base?.value?.blur();
296
+ },
297
+ element: computed(() => base?.value?.element ?? null),
298
+ focus: () => {
299
+ base?.value?.focus();
300
+ }
301
+ });
292
302
  return (_ctx, _cache) => {
293
- return openBlock(), createBlock(BFormSelectBase_default, mergeProps(forwardedProps.value, {
303
+ return openBlock(), createBlock(BFormSelectBase_default, mergeProps({ ref: "_base" }, forwardedProps.value, {
294
304
  modelValue: modelValue.value,
295
305
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
296
306
  options: normalizedOptions.value
@@ -306,4 +316,4 @@ var BFormSelect_default = /* @__PURE__ */ defineComponent({
306
316
  //#endregion
307
317
  export { BFormSelectOptionGroup_default as n, BFormSelect_default as t };
308
318
 
309
- //# sourceMappingURL=BFormSelect-QXCaxgWx.js.map
319
+ //# sourceMappingURL=BFormSelect-CSS-_kul.js.map
@@ -0,0 +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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;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"}
@@ -42,12 +42,12 @@ import { t as BForm_default } from "./BForm-BOoX6AAr.js";
42
42
  import { t as BFormSelectOption_default } from "./BFormSelectOption-C8orMj24.js";
43
43
  import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "./BForm-CcbrqF35.js";
44
44
  import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-BTNOXbQ6.js";
45
- import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "./BFormCheckbox-BMhyR-J5.js";
45
+ import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "./BFormCheckbox-BYNGQgr2.js";
46
46
  import { t as BFormFile_default } from "./BFormFile-C2DnrbK7.js";
47
47
  import { t as BFormGroup_default } from "./BFormGroup-D3R7DxxF.js";
48
- import { n as BFormRadio_default, t as BFormRadioGroup_default } from "./BFormRadio-DRViMh6V.js";
48
+ import { n as BFormRadio_default, t as BFormRadioGroup_default } from "./BFormRadio-DAddcnfE.js";
49
49
  import { t as BFormRating_default } from "./BFormRating-iKFgSFet.js";
50
- import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "./BFormSelect-QXCaxgWx.js";
50
+ import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "./BFormSelect-CSS-_kul.js";
51
51
  import { t as BFormSpinbutton_default } from "./BFormSpinbutton-fkVMbQC3.js";
52
52
  import { t as BFormTags_default } from "./BFormTags-CUcyRTCK.js";
53
53
  import { t as BFormTextarea_default } from "./BFormTextarea-CBBlEcrV.js";
@@ -7,7 +7,10 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ focus: () => void;
13
+ }>) => void;
11
14
  attrs: any;
12
15
  slots: BFormCheckboxGroupSlots;
13
16
  emit: (event: "update:modelValue", value: OptionsValues<Options>[] | undefined) => void;
@@ -7,7 +7,10 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ focus: () => void;
13
+ }>) => void;
11
14
  attrs: any;
12
15
  slots: BFormCheckboxGroupSlots;
13
16
  emit: (event: "update:modelValue", value: OptionsValues<Options>[] | undefined) => void;
@@ -7,7 +7,10 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ focus: () => void;
13
+ }>) => void;
11
14
  attrs: any;
12
15
  slots: {
13
16
  first?: (props: {}) => any;
@@ -7,7 +7,10 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ focus: () => void;
13
+ }>) => void;
11
14
  attrs: any;
12
15
  slots: {
13
16
  first?: (props: {}) => any;
@@ -7,7 +7,11 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ element: import('vue').ComputedRef<HTMLSelectElement | null>;
13
+ focus: () => void;
14
+ }>) => void;
11
15
  attrs: any;
12
16
  slots: BFormSelectSlots<OptionsValues<Options>>;
13
17
  emit: (event: "update:modelValue", value: OptionsValues<Options> | OptionsValues<Options>[] | null) => void;
@@ -7,7 +7,11 @@ declare const __VLS_export: <Options extends readonly (object | string | number
7
7
  }> & (typeof globalThis extends {
8
8
  __VLS_PROPS_FALLBACK: infer P;
9
9
  } ? P : {});
10
- expose: (exposed: {}) => void;
10
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
11
+ blur: () => void;
12
+ element: import('vue').ComputedRef<HTMLSelectElement | null>;
13
+ focus: () => void;
14
+ }>) => void;
11
15
  attrs: any;
12
16
  slots: BFormSelectSlots<OptionsValues<Options>>;
13
17
  emit: (event: "update:modelValue", value: OptionsValues<Options> | OptionsValues<Options>[] | null) => void;
@@ -1,10 +1,12 @@
1
1
  import { MaybeRef, Ref } from 'vue';
2
2
  import { OrchestratorStoreObject } from '../../utils/keys';
3
- import { ComponentController, ToastOrchestratorArrayValue, ToastOrchestratorCreateParamBase } from '../../types';
3
+ import { ComponentController, ControllerKey, ToastOrchestratorArrayValue, ToastOrchestratorCreateParamBase } from '../../types';
4
4
  import { BToast } from '../../components';
5
5
  export declare const useToast: () => {
6
6
  _isToastAppend: Readonly<Ref<boolean, boolean>>;
7
7
  _isOrchestratorInstalled: Readonly<Ref<boolean, boolean>>;
8
8
  store: Ref<OrchestratorStoreObject, OrchestratorStoreObject>;
9
9
  create: <ComponentProps extends Record<string, unknown> = Record<string, unknown>, T extends ToastOrchestratorCreateParamBase<ComponentProps> = ToastOrchestratorCreateParamBase<ComponentProps>>(obj?: MaybeRef<T>) => ComponentController<typeof BToast, Ref<ToastOrchestratorArrayValue>>;
10
+ hide: (trigger?: string, id?: ControllerKey) => void;
11
+ hideAll: (trigger?: string) => void;
10
12
  };
@@ -1,10 +1,12 @@
1
1
  import { MaybeRef, Ref } from 'vue';
2
2
  import { OrchestratorStoreObject } from '../../utils/keys';
3
- import { ComponentController, ToastOrchestratorArrayValue, ToastOrchestratorCreateParamBase } from '../../types';
3
+ import { ComponentController, ControllerKey, ToastOrchestratorArrayValue, ToastOrchestratorCreateParamBase } from '../../types';
4
4
  import { BToast } from '../../components';
5
5
  export declare const useToast: () => {
6
6
  _isToastAppend: Readonly<Ref<boolean, boolean>>;
7
7
  _isOrchestratorInstalled: Readonly<Ref<boolean, boolean>>;
8
8
  store: Ref<OrchestratorStoreObject, OrchestratorStoreObject>;
9
9
  create: <ComponentProps extends Record<string, unknown> = Record<string, unknown>, T extends ToastOrchestratorCreateParamBase<ComponentProps> = ToastOrchestratorCreateParamBase<ComponentProps>>(obj?: MaybeRef<T>) => ComponentController<typeof BToast, Ref<ToastOrchestratorArrayValue>>;
10
+ hide: (trigger?: string, id?: ControllerKey) => void;
11
+ hideAll: (trigger?: string) => void;
10
12
  };
@@ -1,2 +1,2 @@
1
- import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "../../../BFormCheckbox-BMhyR-J5.js";
1
+ import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "../../../BFormCheckbox-BYNGQgr2.js";
2
2
  export { BFormCheckbox_default as BFormCheckbox, BFormCheckboxGroup_default as BFormCheckboxGroup };
@@ -1,2 +1,2 @@
1
- import { n as BFormRadio_default, t as BFormRadioGroup_default } from "../../../BFormRadio-DRViMh6V.js";
1
+ import { n as BFormRadio_default, t as BFormRadioGroup_default } from "../../../BFormRadio-DAddcnfE.js";
2
2
  export { BFormRadio_default as BFormRadio, BFormRadioGroup_default as BFormRadioGroup };
@@ -1,3 +1,3 @@
1
1
  import { t as BFormSelectOption_default } from "../../../BFormSelectOption-C8orMj24.js";
2
- import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../../BFormSelect-QXCaxgWx.js";
2
+ import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../../BFormSelect-CSS-_kul.js";
3
3
  export { BFormSelect_default as BFormSelect, BFormSelectOption_default as BFormSelectOption, BFormSelectOptionGroup_default as BFormSelectOptionGroup };
@@ -36,12 +36,12 @@ import { t as BForm_default } from "../../BForm-BOoX6AAr.js";
36
36
  import { t as BFormSelectOption_default } from "../../BFormSelectOption-C8orMj24.js";
37
37
  import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../BForm-CcbrqF35.js";
38
38
  import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../BFormValidFeedback-BTNOXbQ6.js";
39
- import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "../../BFormCheckbox-BMhyR-J5.js";
39
+ import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "../../BFormCheckbox-BYNGQgr2.js";
40
40
  import { t as BFormFile_default } from "../../BFormFile-C2DnrbK7.js";
41
41
  import { t as BFormGroup_default } from "../../BFormGroup-D3R7DxxF.js";
42
- import { n as BFormRadio_default, t as BFormRadioGroup_default } from "../../BFormRadio-DRViMh6V.js";
42
+ import { n as BFormRadio_default, t as BFormRadioGroup_default } from "../../BFormRadio-DAddcnfE.js";
43
43
  import { t as BFormRating_default } from "../../BFormRating-iKFgSFet.js";
44
- import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../BFormSelect-QXCaxgWx.js";
44
+ import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../BFormSelect-CSS-_kul.js";
45
45
  import { t as BFormSpinbutton_default } from "../../BFormSpinbutton-fkVMbQC3.js";
46
46
  import { t as BFormTags_default } from "../../BFormTags-CUcyRTCK.js";
47
47
  import { t as BFormTextarea_default } from "../../BFormTextarea-CBBlEcrV.js";
@@ -48,9 +48,9 @@ var buildController = (id, store) => {
48
48
  if (!item) return;
49
49
  try {
50
50
  if (item.value.props.modelValue) {
51
+ controller.hide("destroy");
51
52
  await basePromise;
52
53
  await nextTick();
53
- controller.hide("destroy");
54
54
  }
55
55
  } finally {
56
56
  store.value.delete(id);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/composables/orchestratorShared/index.ts"],"sourcesContent":["import {type ComponentPublicInstance, inject, nextTick, provide, readonly, type Ref, ref} from 'vue'\nimport type {ComponentController, ControllerKey, PromiseWithController} from '../../types'\nimport type {BvTriggerableEvent} from '../../utils'\nimport {orchestratorRegistryKey, type OrchestratorStoreObject} from '../../utils/keys'\n\n/* oxlint-disable-next-line no-explicit-any */\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nexport type ValueInMapRecord<MapRecord> = MapRecord extends Map<any, infer I> ? I : never\n\nexport const buildController = <\n TComponent,\n TStore extends Readonly<Ref<OrchestratorStoreObject[keyof OrchestratorStoreObject]>>,\n>(\n id: ControllerKey,\n store: TStore\n): PromiseWithController<TComponent, ValueInMapRecord<TStore['value']>> => {\n let resolveFunc: (value: BvTriggerableEvent) => void = () => {}\n\n const basePromise = new Promise<BvTriggerableEvent>((resolve) => {\n resolveFunc = resolve\n })\n\n type RefWithMethods = ComponentPublicInstance<TComponent> & {\n show?: () => void\n hide?: (trigger?: string, noEmit?: boolean) => void\n toggle?: () => void\n }\n const findItem = () => store.value.get(id)\n\n const controller = {\n id,\n ref: null as RefWithMethods | null,\n async show() {\n const currentModelValue = controller.get()?.value.props.modelValue\n if (currentModelValue) {\n const event = await basePromise\n return Object.assign(Object.create(event), {\n [Symbol.asyncDispose]: controller.destroy,\n })\n }\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'show' in refWithMethods &&\n typeof refWithMethods.show === 'function'\n ) {\n refWithMethods.show()\n } else {\n controller.set({modelValue: true})\n }\n const event = await basePromise\n return Object.assign(Object.create(event), {\n [Symbol.asyncDispose]: controller.destroy,\n })\n },\n hide(trigger?: string) {\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'hide' in refWithMethods &&\n typeof refWithMethods.hide === 'function'\n ) {\n refWithMethods.hide(trigger, true)\n } else {\n controller.set({modelValue: false})\n }\n },\n toggle() {\n const currentItem = controller.get()\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'toggle' in refWithMethods &&\n typeof refWithMethods.toggle === 'function'\n ) {\n refWithMethods.toggle()\n } else {\n controller.set({modelValue: !currentItem?.value.props.modelValue})\n }\n },\n get: findItem,\n set(val: Partial<ValueInMapRecord<TStore['value']>['value']['props']>) {\n const current = findItem()\n if (current?.value) {\n current.value = {\n ...current.value,\n props: {\n ...current.value.props,\n ...val,\n /* oxlint-disable no-explicit-any */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n } as any,\n }\n }\n },\n async destroy() {\n const item = findItem()\n if (!item) return\n try {\n if (item.value.props.modelValue) {\n await basePromise\n await nextTick()\n controller.hide('destroy')\n }\n } finally {\n store.value.delete(id)\n }\n },\n [Symbol.asyncDispose]() {\n return controller.destroy()\n },\n } as ComponentController<TComponent, ValueInMapRecord<TStore['value']>>\n\n return {\n controller,\n resolve: resolveFunc,\n }\n}\n\nexport const _newOrchestratorRegistry = (): {\n store: Readonly<Ref<OrchestratorStoreObject>>\n _isToastAppend: Readonly<Ref<boolean>>\n _setToastAppend: (value: boolean) => void\n _isOrchestratorInstalled: Readonly<Ref<boolean>>\n _setOrchestratorInstalled: (value: boolean) => void\n} => {\n const _isOrchestratorInstalled = ref(false)\n const _isToastAppend = ref(false)\n\n return {\n store: ref({\n modal: new Map(),\n tooltip: new Map(),\n popover: new Map(),\n toast: new Map(),\n }),\n _isOrchestratorInstalled: readonly(_isOrchestratorInstalled),\n _setOrchestratorInstalled: (v) => {\n _isOrchestratorInstalled.value = v\n },\n _isToastAppend: readonly(_isToastAppend),\n _setToastAppend: (v) => {\n _isToastAppend.value = v\n },\n }\n}\n\nexport const useOrchestratorRegistry = () => {\n const orchestratorRegistry = inject(orchestratorRegistryKey, null)\n\n if (orchestratorRegistry) {\n return orchestratorRegistry\n }\n const newOrchestratorRegistry = _newOrchestratorRegistry()\n provide(orchestratorRegistryKey, newOrchestratorRegistry)\n return newOrchestratorRegistry\n}\n\nexport const getOrchestratorControllerId = (propId: string | undefined) => {\n const id: ControllerKey = propId || Symbol('OrchestratorItem')\n\n return {\n /**\n * This id is used for stability in the store, using the createIdWatcher will update the store if the id ever changes\n */\n storeId: id,\n /**\n * Do not pass in the symbol as a prop. Html attribute cannot be a symbol. Thus it's internal\n */\n htmlAttributeId: typeof id === 'string' ? id : undefined,\n }\n}\n"],"mappings":";;;AASA,IAAa,mBAIX,IACA,UACyE;CACzE,IAAI,oBAAyD,CAAC;CAE9D,MAAM,cAAc,IAAI,SAA6B,YAAY;EAC/D,cAAc;CAChB,CAAC;CAOD,MAAM,iBAAiB,MAAM,MAAM,IAAI,EAAE;CAEzC,MAAM,aAAa;EACjB;EACA,KAAK;EACL,MAAM,OAAO;GAEX,IAD0B,WAAW,IAAI,CAAC,EAAE,MAAM,MAAM,YACjC;IACrB,MAAM,QAAQ,MAAM;IACpB,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG,GACxC,OAAO,eAAe,WAAW,QACpC,CAAC;GACH;GACA,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,UAAU,kBACV,OAAO,eAAe,SAAS,YAE/B,eAAe,KAAK;QAEpB,WAAW,IAAI,EAAC,YAAY,KAAI,CAAC;GAEnC,MAAM,QAAQ,MAAM;GACpB,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG,GACxC,OAAO,eAAe,WAAW,QACpC,CAAC;EACH;EACA,KAAK,SAAkB;GACrB,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,UAAU,kBACV,OAAO,eAAe,SAAS,YAE/B,eAAe,KAAK,SAAS,IAAI;QAEjC,WAAW,IAAI,EAAC,YAAY,MAAK,CAAC;EAEtC;EACA,SAAS;GACP,MAAM,cAAc,WAAW,IAAI;GACnC,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,YAAY,kBACZ,OAAO,eAAe,WAAW,YA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T,iBAAiB,OAAO,OAAO,WAAW,KAAK,KAAA;CACjD;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/composables/orchestratorShared/index.ts"],"sourcesContent":["import {type ComponentPublicInstance, inject, nextTick, provide, readonly, type Ref, ref} from 'vue'\nimport type {ComponentController, ControllerKey, PromiseWithController} from '../../types'\nimport type {BvTriggerableEvent} from '../../utils'\nimport {orchestratorRegistryKey, type OrchestratorStoreObject} from '../../utils/keys'\n\n/* oxlint-disable-next-line no-explicit-any */\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nexport type ValueInMapRecord<MapRecord> = MapRecord extends Map<any, infer I> ? I : never\n\nexport const buildController = <\n TComponent,\n TStore extends Readonly<Ref<OrchestratorStoreObject[keyof OrchestratorStoreObject]>>,\n>(\n id: ControllerKey,\n store: TStore\n): PromiseWithController<TComponent, ValueInMapRecord<TStore['value']>> => {\n let resolveFunc: (value: BvTriggerableEvent) => void = () => {}\n\n const basePromise = new Promise<BvTriggerableEvent>((resolve) => {\n resolveFunc = resolve\n })\n\n type RefWithMethods = ComponentPublicInstance<TComponent> & {\n show?: () => void\n hide?: (trigger?: string, noEmit?: boolean) => void\n toggle?: () => void\n }\n const findItem = () => store.value.get(id)\n\n const controller = {\n id,\n ref: null as RefWithMethods | null,\n async show() {\n const currentModelValue = controller.get()?.value.props.modelValue\n if (currentModelValue) {\n const event = await basePromise\n return Object.assign(Object.create(event), {\n [Symbol.asyncDispose]: controller.destroy,\n })\n }\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'show' in refWithMethods &&\n typeof refWithMethods.show === 'function'\n ) {\n refWithMethods.show()\n } else {\n controller.set({modelValue: true})\n }\n const event = await basePromise\n return Object.assign(Object.create(event), {\n [Symbol.asyncDispose]: controller.destroy,\n })\n },\n hide(trigger?: string) {\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'hide' in refWithMethods &&\n typeof refWithMethods.hide === 'function'\n ) {\n refWithMethods.hide(trigger, true)\n } else {\n controller.set({modelValue: false})\n }\n },\n toggle() {\n const currentItem = controller.get()\n const refWithMethods = controller.ref\n if (\n refWithMethods !== null &&\n 'toggle' in refWithMethods &&\n typeof refWithMethods.toggle === 'function'\n ) {\n refWithMethods.toggle()\n } else {\n controller.set({modelValue: !currentItem?.value.props.modelValue})\n }\n },\n get: findItem,\n set(val: Partial<ValueInMapRecord<TStore['value']>['value']['props']>) {\n const current = findItem()\n if (current?.value) {\n current.value = {\n ...current.value,\n props: {\n ...current.value.props,\n ...val,\n /* oxlint-disable no-explicit-any */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n } as any,\n }\n }\n },\n async destroy() {\n const item = findItem()\n if (!item) return\n try {\n if (item.value.props.modelValue) {\n controller.hide('destroy')\n await basePromise\n await nextTick()\n }\n } finally {\n store.value.delete(id)\n }\n },\n [Symbol.asyncDispose]() {\n return controller.destroy()\n },\n } as ComponentController<TComponent, ValueInMapRecord<TStore['value']>>\n\n return {\n controller,\n resolve: resolveFunc,\n }\n}\n\nexport const _newOrchestratorRegistry = (): {\n store: Readonly<Ref<OrchestratorStoreObject>>\n _isToastAppend: Readonly<Ref<boolean>>\n _setToastAppend: (value: boolean) => void\n _isOrchestratorInstalled: Readonly<Ref<boolean>>\n _setOrchestratorInstalled: (value: boolean) => void\n} => {\n const _isOrchestratorInstalled = ref(false)\n const _isToastAppend = ref(false)\n\n return {\n store: ref({\n modal: new Map(),\n tooltip: new Map(),\n popover: new Map(),\n toast: new Map(),\n }),\n _isOrchestratorInstalled: readonly(_isOrchestratorInstalled),\n _setOrchestratorInstalled: (v) => {\n _isOrchestratorInstalled.value = v\n },\n _isToastAppend: readonly(_isToastAppend),\n _setToastAppend: (v) => {\n _isToastAppend.value = v\n },\n }\n}\n\nexport const useOrchestratorRegistry = () => {\n const orchestratorRegistry = inject(orchestratorRegistryKey, null)\n\n if (orchestratorRegistry) {\n return orchestratorRegistry\n }\n const newOrchestratorRegistry = _newOrchestratorRegistry()\n provide(orchestratorRegistryKey, newOrchestratorRegistry)\n return newOrchestratorRegistry\n}\n\nexport const getOrchestratorControllerId = (propId: string | undefined) => {\n const id: ControllerKey = propId || Symbol('OrchestratorItem')\n\n return {\n /**\n * This id is used for stability in the store, using the createIdWatcher will update the store if the id ever changes\n */\n storeId: id,\n /**\n * Do not pass in the symbol as a prop. Html attribute cannot be a symbol. Thus it's internal\n */\n htmlAttributeId: typeof id === 'string' ? id : undefined,\n }\n}\n"],"mappings":";;;AASA,IAAa,mBAIX,IACA,UACyE;CACzE,IAAI,oBAAyD,CAAC;CAE9D,MAAM,cAAc,IAAI,SAA6B,YAAY;EAC/D,cAAc;CAChB,CAAC;CAOD,MAAM,iBAAiB,MAAM,MAAM,IAAI,EAAE;CAEzC,MAAM,aAAa;EACjB;EACA,KAAK;EACL,MAAM,OAAO;GAEX,IAD0B,WAAW,IAAI,CAAC,EAAE,MAAM,MAAM,YACjC;IACrB,MAAM,QAAQ,MAAM;IACpB,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG,GACxC,OAAO,eAAe,WAAW,QACpC,CAAC;GACH;GACA,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,UAAU,kBACV,OAAO,eAAe,SAAS,YAE/B,eAAe,KAAK;QAEpB,WAAW,IAAI,EAAC,YAAY,KAAI,CAAC;GAEnC,MAAM,QAAQ,MAAM;GACpB,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAAG,GACxC,OAAO,eAAe,WAAW,QACpC,CAAC;EACH;EACA,KAAK,SAAkB;GACrB,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,UAAU,kBACV,OAAO,eAAe,SAAS,YAE/B,eAAe,KAAK,SAAS,IAAI;QAEjC,WAAW,IAAI,EAAC,YAAY,MAAK,CAAC;EAEtC;EACA,SAAS;GACP,MAAM,cAAc,WAAW,IAAI;GACnC,MAAM,iBAAiB,WAAW;GAClC,IACE,mBAAmB,QACnB,YAAY,kBACZ,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;EAIL,SAAS;;;;EAIT,iBAAiB,OAAO,OAAO,WAAW,KAAK,KAAA;CACjD;AACF"}
@@ -1,4 +1,4 @@
1
- import { _ as orchestratorRegistryKey } from "../../../keys-BgLwJbLV.js";
1
+ import { _ as orchestratorRegistryKey, x as showHideRegistryKey } from "../../../keys-BgLwJbLV.js";
2
2
  import { buildController, getOrchestratorControllerId } from "../orchestratorShared/index.mjs";
3
3
  import { t as BToast_default } from "../../../BToast-Di9HwBOV.js";
4
4
  import { computed, inject, markRaw, onScopeDispose, ref } from "vue";
@@ -8,6 +8,7 @@ var useToast = () => {
8
8
  const orchestratorRegistry = inject(orchestratorRegistryKey, null);
9
9
  if (!orchestratorRegistry) throw new Error("useToast() must be called within setup(), and BApp, useRegistry or plugin must be installed/provided.");
10
10
  const { store, _isToastAppend, _isOrchestratorInstalled } = orchestratorRegistry;
11
+ const showHideRegistry = inject(showHideRegistryKey, null);
11
12
  /**
12
13
  * @returns {ComponentController<typeof BToast, ToastOrchestratorParam>}
13
14
  */
@@ -53,11 +54,70 @@ var useToast = () => {
53
54
  }, true);
54
55
  return controller;
55
56
  }
57
+ /**
58
+ * Hides a mounted BToast that registered itself under `id`. Going through the component, rather
59
+ * than through the store, is what lets the trigger flow through the regular hide cycle
60
+ *
61
+ * @returns whether a toast was found
62
+ */
63
+ const hideRegisteredInstance = (id, trigger) => {
64
+ if (typeof id !== "string") return false;
65
+ const instances = showHideRegistry?.values.value.get(id)?.instances;
66
+ if (!instances) return false;
67
+ for (let i = instances.length - 1; i >= 0; i--) {
68
+ const instance = instances[i];
69
+ if (instance?.component.type !== BToast_default) continue;
70
+ instance.hide(trigger, true);
71
+ return true;
72
+ }
73
+ return false;
74
+ };
75
+ /**
76
+ * Hides a toast that lives in the orchestrator store. Prefers the mounted instance, falling back
77
+ * to the store entry itself, which also covers toasts that the orchestrator has yet to render
78
+ * and toasts rendered through a custom `component`
79
+ */
80
+ const hideStoreItem = (item, trigger) => {
81
+ if (hideRegisteredInstance(item.value.props.id ?? item.value.id, trigger)) return;
82
+ item.value = {
83
+ ...item.value,
84
+ props: {
85
+ ...item.value.props,
86
+ modelValue: false
87
+ }
88
+ };
89
+ };
90
+ /**
91
+ * Hide all toasts
92
+ * @param trigger - The trigger to hide all toasts
93
+ */
94
+ const hideAll = (trigger) => {
95
+ for (const item of store.value.toast.values()) hideStoreItem(item, trigger);
96
+ };
97
+ /**
98
+ * Hide a toast
99
+ * @param trigger - The trigger to hide the toast
100
+ * @param id - The id of the toast to hide, when omitted every toast is hidden
101
+ */
102
+ const hide = (trigger, id) => {
103
+ if (id === void 0) {
104
+ hideAll(trigger);
105
+ return;
106
+ }
107
+ const item = store.value.toast.get(id);
108
+ if (item) {
109
+ hideStoreItem(item, trigger);
110
+ return;
111
+ }
112
+ hideRegisteredInstance(id, trigger);
113
+ };
56
114
  return {
57
115
  _isToastAppend,
58
116
  _isOrchestratorInstalled,
59
117
  store,
60
- create
118
+ create,
119
+ hide,
120
+ hideAll
61
121
  };
62
122
  };
63
123
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/composables/useToast/index.ts"],"sourcesContent":["import {\n type ComponentPublicInstance,\n computed,\n type ComputedRef,\n inject,\n markRaw,\n type MaybeRef,\n onScopeDispose,\n ref,\n type Ref,\n} from 'vue'\nimport {orchestratorRegistryKey, type OrchestratorStoreObject} from '../../utils/keys'\nimport type {ContainerPosition} from '../../types/Alignment'\nimport type {\n ComponentController,\n ToastOrchestratorArrayValue,\n ToastOrchestratorCreateParamBase,\n} from '../../types'\nimport {buildController, getOrchestratorControllerId} from '../orchestratorShared'\nimport {BToast} from '../../components'\n\nconst posDefault: ContainerPosition = 'top-end'\n\nexport const useToast = () => {\n const orchestratorRegistry = inject(orchestratorRegistryKey, null)\n if (!orchestratorRegistry)\n throw new Error(\n 'useToast() must be called within setup(), and BApp, useRegistry or plugin must be installed/provided.'\n )\n const {store, _isToastAppend, _isOrchestratorInstalled} = orchestratorRegistry\n\n /**\n * @returns {ComponentController<typeof BToast, ToastOrchestratorParam>}\n */\n // Uses a `function` declaration (rather than a generic arrow function assigned to a const) so\n // that TypeScript preserves per-call generic inference when `create` is returned as part of\n // `useToast()`'s inferred return object.\n function create<\n ComponentProps extends Record<string, unknown> = Record<string, unknown>,\n T extends ToastOrchestratorCreateParamBase<ComponentProps> = ToastOrchestratorCreateParamBase<ComponentProps>,\n >(\n obj: MaybeRef<T> = {} as T\n ): ComponentController<typeof BToast, Ref<ToastOrchestratorArrayValue>> {\n if (!_isOrchestratorInstalled.value)\n throw new Error('The BApp component must be mounted to use the toast composable')\n\n const toastComp = markRaw(BToast)\n const resolvedProps = ref(obj)\n const toastStore = computed(() => store.value.toast)\n const {htmlAttributeId, storeId} = getOrchestratorControllerId(resolvedProps.value.id)\n\n const {resolve, controller} = buildController<\n typeof BToast,\n ComputedRef<OrchestratorStoreObject['toast']>\n >(storeId, toastStore)\n\n const value = computed<ToastOrchestratorArrayValue>({\n get: () => {\n const {component = toastComp, options, slots, ...props} = resolvedProps.value\n\n return {\n component,\n options,\n slots,\n id: storeId,\n fns: {\n resolve,\n setRef: (v: ComponentPublicInstance) => {\n controller.ref = v\n },\n destroy: controller.destroy,\n },\n props: {\n ...props,\n id: htmlAttributeId,\n position: props.position || posDefault,\n },\n }\n },\n set: (v) => {\n resolvedProps.value = {\n ...resolvedProps.value,\n ...v.props,\n }\n },\n })\n\n toastStore.value.set(storeId, value)\n\n onScopeDispose(async () => {\n await controller[Symbol.asyncDispose]()\n }, true)\n\n return controller\n }\n\n return {\n _isToastAppend,\n _isOrchestratorInstalled,\n store,\n create,\n }\n}\n"],"mappings":";;;;;AAqBA,IAAM,aAAgC;AAEtC,IAAa,iBAAiB;CAC5B,MAAM,uBAAuB,OAAO,yBAAyB,IAAI;CACjE,IAAI,CAAC,sBACH,MAAM,IAAI,MACR,uGACF;CACF,MAAM,EAAC,OAAO,gBAAgB,6BAA4B;;;;CAQ1D,SAAS,OAIP,MAAmB,CAAC,GACkD;EACtE,IAAI,CAAC,yBAAyB,OAC5B,MAAM,IAAI,MAAM,gEAAgE;EAElF,MAAM,YAAY,QAAQ,cAAM;EAChC,MAAM,gBAAgB,IAAI,GAAG;EAC7B,MAAM,aAAa,eAAe,MAAM,MAAM,KAAK;EACnD,MAAM,EAAC,iBAAiB,YAAW,4BAA4B,cAAc,MAAM,EAAE;EAErF,MAAM,EAAC,SAAS,eAAc,gBAG5B,SAAS,UAAU;EAErB,MAAM,QAAQ,SAAsC;GAClD,WAAW;IACT,MAAM,EAAC,YAAY,WAAW,SAAS,OAAO,GAAG,UAAS,cAAc;IAExE,OAAO;KACL;KACA;KACA;KACA,IAAI;KACJ,KAAK;MACH;MACA,SAAS,MAA+B;OACtC,WAAW,MAAM;MACnB;MACA,SAAS,WAAW;KACtB;KACA,OAAO;MACL,GAAG;MACH,IAAI;MACJ,UAAU,MAAM,YAAY;KAC9B;IACF;GACF;GACA,MAAM,MAAM;IACV,cAAc,QAAQ;KACpB,GAAG,cAAc;KACjB,GAAG,EAAE;IACP;GACF;EACF,CAAC;EAED,WAAW,MAAM,IAAI,SAAS,KAAK;EAEnC,eAAe,YAAY;GACzB,MAAM,WAAW,OAAO,aAAa,CAAC;EACxC,GAAG,IAAI;EAEP,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/composables/useToast/index.ts"],"sourcesContent":["import {\n type ComponentPublicInstance,\n computed,\n type ComputedRef,\n inject,\n markRaw,\n type MaybeRef,\n onScopeDispose,\n ref,\n type Ref,\n} from 'vue'\nimport {\n orchestratorRegistryKey,\n type OrchestratorStoreObject,\n showHideRegistryKey,\n} from '../../utils/keys'\nimport type {ContainerPosition} from '../../types/Alignment'\nimport type {\n ComponentController,\n ControllerKey,\n ToastOrchestratorArrayValue,\n ToastOrchestratorCreateParamBase,\n} from '../../types'\nimport {buildController, getOrchestratorControllerId} from '../orchestratorShared'\nimport {BToast} from '../../components'\n\nconst posDefault: ContainerPosition = 'top-end'\n\nexport const useToast = () => {\n const orchestratorRegistry = inject(orchestratorRegistryKey, null)\n if (!orchestratorRegistry)\n throw new Error(\n 'useToast() must be called within setup(), and BApp, useRegistry or plugin must be installed/provided.'\n )\n const {store, _isToastAppend, _isOrchestratorInstalled} = orchestratorRegistry\n const showHideRegistry = inject(showHideRegistryKey, null)\n\n /**\n * @returns {ComponentController<typeof BToast, ToastOrchestratorParam>}\n */\n // Uses a `function` declaration (rather than a generic arrow function assigned to a const) so\n // that TypeScript preserves per-call generic inference when `create` is returned as part of\n // `useToast()`'s inferred return object.\n function create<\n ComponentProps extends Record<string, unknown> = Record<string, unknown>,\n T extends ToastOrchestratorCreateParamBase<ComponentProps> =\n ToastOrchestratorCreateParamBase<ComponentProps>,\n >(\n obj: MaybeRef<T> = {} as T\n ): ComponentController<typeof BToast, Ref<ToastOrchestratorArrayValue>> {\n if (!_isOrchestratorInstalled.value)\n throw new Error('The BApp component must be mounted to use the toast composable')\n\n const toastComp = markRaw(BToast)\n const resolvedProps = ref(obj)\n const toastStore = computed(() => store.value.toast)\n const {htmlAttributeId, storeId} = getOrchestratorControllerId(resolvedProps.value.id)\n\n const {resolve, controller} = buildController<\n typeof BToast,\n ComputedRef<OrchestratorStoreObject['toast']>\n >(storeId, toastStore)\n\n const value = computed<ToastOrchestratorArrayValue>({\n get: () => {\n const {component = toastComp, options, slots, ...props} = resolvedProps.value\n\n return {\n component,\n options,\n slots,\n id: storeId,\n fns: {\n resolve,\n setRef: (v: ComponentPublicInstance) => {\n controller.ref = v\n },\n destroy: controller.destroy,\n },\n props: {\n ...props,\n id: htmlAttributeId,\n position: props.position || posDefault,\n },\n }\n },\n set: (v) => {\n resolvedProps.value = {\n ...resolvedProps.value,\n ...v.props,\n }\n },\n })\n\n toastStore.value.set(storeId, value)\n\n onScopeDispose(async () => {\n await controller[Symbol.asyncDispose]()\n }, true)\n\n return controller\n }\n\n /**\n * Hides a mounted BToast that registered itself under `id`. Going through the component, rather\n * than through the store, is what lets the trigger flow through the regular hide cycle\n *\n * @returns whether a toast was found\n */\n const hideRegisteredInstance = (id: ControllerKey, trigger?: string): boolean => {\n // The show/hide registry is keyed by the html id, symbols never reach it\n if (typeof id !== 'string') return false\n const instances = showHideRegistry?.values.value.get(id)?.instances\n if (!instances) return false\n // Every show/hide component shares this registry, so an id may resolve to a BCollapse or a\n // BModal. Only toasts are ours to hide. Newest first, the way the registry's getActive does\n for (let i = instances.length - 1; i >= 0; i--) {\n const instance = instances[i]\n if (instance?.component.type !== BToast) continue\n instance.hide(trigger, true)\n return true\n }\n return false\n }\n\n /**\n * Hides a toast that lives in the orchestrator store. Prefers the mounted instance, falling back\n * to the store entry itself, which also covers toasts that the orchestrator has yet to render\n * and toasts rendered through a custom `component`\n */\n const hideStoreItem = (item: Ref<ToastOrchestratorArrayValue>, trigger?: string): void => {\n if (hideRegisteredInstance(item.value.props.id ?? item.value.id, trigger)) return\n item.value = {\n ...item.value,\n props: {\n ...item.value.props,\n modelValue: false,\n },\n }\n }\n\n /**\n * Hide all toasts\n * @param trigger - The trigger to hide all toasts\n */\n const hideAll = (trigger?: string): void => {\n for (const item of store.value.toast.values()) {\n hideStoreItem(item, trigger)\n }\n }\n\n /**\n * Hide a toast\n * @param trigger - The trigger to hide the toast\n * @param id - The id of the toast to hide, when omitted every toast is hidden\n */\n const hide = (trigger?: string, id?: ControllerKey): void => {\n if (id === undefined) {\n hideAll(trigger)\n return\n }\n const item = store.value.toast.get(id)\n if (item) {\n hideStoreItem(item, trigger)\n return\n }\n // Not created through the composable, it could still be a BToast declared in a template\n hideRegisteredInstance(id, trigger)\n }\n\n return {\n _isToastAppend,\n _isOrchestratorInstalled,\n store,\n create,\n hide,\n hideAll,\n }\n}\n"],"mappings":";;;;;AA0BA,IAAM,aAAgC;AAEtC,IAAa,iBAAiB;CAC5B,MAAM,uBAAuB,OAAO,yBAAyB,IAAI;CACjE,IAAI,CAAC,sBACH,MAAM,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AS,KAAK,SAAS,IAAI;GAC3B,OAAO;EACT;EACA,OAAO;CACT;;;;;;CAOA,MAAM,iBAAiB,MAAwC,YAA2B;EACxF,IAAI,uBAAuB,KAAK,MAAM,MAAM,MAAM,KAAK,MAAM,IAAI,OAAO,GAAG;EAC3E,KAAK,QAAQ;GACX,GAAG,KAAK;GACR,OAAO;IACL,GAAG,KAAK,MAAM;IACd,YAAY;GACd;EACF;CACF;;;;;CAMA,MAAM,WAAW,YAA2B;EAC1C,KAAK,MAAM,QAAQ,MAAM,MAAM,MAAM,OAAO,GAC1C,cAAc,MAAM,OAAO;CAE/B;;;;;;CAOA,MAAM,QAAQ,SAAkB,OAA6B;EAC3D,IAAI,OAAO,KAAA,GAAW;GACpB,QAAQ,OAAO;GACf;EACF;EACA,MAAM,OAAO,MAAM,MAAM,MAAM,IAAI,EAAE;EACrC,IAAI,MAAM;GACR,cAAc,MAAM,OAAO;GAC3B;EACF;EAEA,uBAAuB,IAAI,OAAO;CACpC;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/types/index.ts"],"sourcesContent":["export type {\n AlignmentCommon,\n AlignmentContent,\n AlignmentHorizontal,\n AlignmentJustifyContent,\n AlignmentTextHorizontal,\n AlignmentVertical,\n CombinedPlacement,\n ContainerHorizontalAlign,\n ContainerPosition,\n ContainerVerticalAlign,\n Placement,\n VerticalAlign,\n} from './Alignment'\nexport type {Animation} from './Animation'\nexport type {AriaInvalid} from './AriaInvalid'\nexport type {\n BTableInitialSortDirection,\n TableHeadClickedEventObject,\n TableRowEventObject,\n BTableSortByOrder,\n BTableSelectMode,\n BTableFilterFunction,\n isTableField,\n isTableFieldRaw,\n NoProviderTypes,\n TableThScope,\n TableDetailsReturn,\n TableSelectedReturn,\n TablePrimaryKey,\n BTableProvider,\n BTableProviderContext,\n BTableSortBy,\n TableField,\n TableFieldFormatter,\n TableFieldFormatterObject,\n TableFieldRaw,\n TableItem,\n TableRowThead,\n TableRowType,\n TableStrictClassValue,\n} from './TableTypes'\nexport type {\n BaseButtonVariant,\n BaseColorVariant,\n BaseTextColorVariant,\n ButtonVariant,\n ColorExtendables,\n ColorVariant,\n TextColorVariant,\n} from './ColorTypes'\nexport type {BaseSize, Size} from './Size'\nexport type {BootstrapVueOptions, showHide} from './BootstrapVueOptions'\nexport type * from './ComponentEmits'\nexport type {BreadcrumbItem, BreadcrumbItemRaw} from './BreadcrumbTypes'\nexport type * from './BreakpointProps'\nexport type {ButtonType} from './ButtonType'\nexport type {CheckboxOption, CheckboxOptionRaw, CheckboxValue} from './CheckboxTypes'\nexport type {\n ComplexSelectOption,\n ComplexSelectOptionRaw,\n SelectValue,\n SelectOption,\n SelectOptionRaw,\n} from './SelectTypes'\nexport type {InputType} from './InputType'\nexport type {LinkTarget} from './LinkTarget'\nexport type {LinkOpacity, UnderlineOffset, UnderlineOpacity} from './LinkDecorators'\nexport type {LiteralUnion} from './LiteralUnion'\nexport type {PaginationPage} from './PaginationPage'\nexport type {PlaceholderAnimation, PlaceholderSize} from './PlaceholderTypes'\nexport type {PopoverPlacement} from './PopoverPlacement'\nexport type {Position} from './Position'\nexport type {RadioOption, RadioOptionRaw, RadioValue} from './RadioTypes'\nexport type {RadiusElement, RadiusElementExtendables} from './RadiusElement'\nexport type {SpinnerType} from './SpinnerType'\nexport type {TabType} from './Tab'\nexport type {TransitionMode} from './TransitionMode'\nexport type * from './ComponentProps'\nexport type * from './ComponentSlots'\nexport type {\n TooltipOrchestratorCreateParam as OrchestratedTooltip,\n ToastOrchestratorCreateParam as OrchestratedToast,\n PopoverOrchestratorCreateParam as OrchestratedPopover,\n ModalOrchestratorCreateParam as OrchestratedModal,\n} from './ComponentOrchestratorTypes'\nexport type * from './ComponentOrchestratorTypes'\n\nexport {\n // Real\n composableNames,\n // Real\n directiveNames,\n // Real\n componentNames,\n componentsWithExternalPath,\n composablesWithExternalPath,\n directivesWithExternalPath,\n type ComponentType,\n type ComposableType,\n type DirectiveType,\n} from './BootstrapVueOptions'\nexport type {ValidationState} from './CommonTypes'\nexport type {MaybePromise} from './MaybePromise'\nexport type {ExtractItemValue, OptionsValues} from './OptionsTypes'\n"],"mappings":""}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/types/index.ts"],"sourcesContent":["export type {\n AlignmentCommon,\n AlignmentContent,\n AlignmentHorizontal,\n AlignmentJustifyContent,\n AlignmentTextHorizontal,\n AlignmentVertical,\n CombinedPlacement,\n ContainerHorizontalAlign,\n ContainerPosition,\n ContainerVerticalAlign,\n Placement,\n VerticalAlign,\n} from './Alignment'\nexport type {Animation} from './Animation'\nexport type {AriaInvalid} from './AriaInvalid'\nexport type {\n BTableInitialSortDirection,\n TableHeadClickedEventObject,\n TableRowEventObject,\n BTableSortByOrder,\n BTableSelectMode,\n BTableFilterFunction,\n isTableField,\n isTableFieldRaw,\n NoProviderTypes,\n TableThScope,\n TableDetailsReturn,\n TableSelectedReturn,\n TablePrimaryKey,\n BTableProvider,\n BTableProviderContext,\n BTableSortBy,\n TableField,\n TableFieldFormatter,\n TableFieldFormatterObject,\n TableFieldRaw,\n TableItem,\n TableRowThead,\n TableRowType,\n TableStrictClassValue,\n} from './TableTypes'\nexport type {\n BaseButtonVariant,\n BaseColorVariant,\n BaseTextColorVariant,\n ButtonVariant,\n ColorExtendables,\n ColorVariant,\n TextColorVariant,\n} from './ColorTypes'\nexport type {BaseSize, Size} from './Size'\nexport type {BootstrapVueOptions, showHide} from './BootstrapVueOptions'\nexport type * from './ComponentEmits'\nexport type {BreadcrumbItem, BreadcrumbItemRaw} from './BreadcrumbTypes'\nexport type * from './BreakpointProps'\nexport type {ButtonType} from './ButtonType'\nexport type {CheckboxOption, CheckboxOptionRaw, CheckboxValue} from './CheckboxTypes'\nexport type {\n ComplexSelectOption,\n ComplexSelectOptionRaw,\n SelectValue,\n SelectOption,\n SelectOptionRaw,\n} from './SelectTypes'\nexport type {InputType} from './InputType'\nexport type {LinkTarget} from './LinkTarget'\nexport type {LinkOpacity, UnderlineOffset, UnderlineOpacity} from './LinkDecorators'\nexport type {LiteralUnion} from './LiteralUnion'\nexport type {PaginationPage} from './PaginationPage'\nexport type {PlaceholderAnimation, PlaceholderSize} from './PlaceholderTypes'\nexport type {PopoverPlacement} from './PopoverPlacement'\nexport type {Position} from './Position'\nexport type {RadioOption, RadioOptionRaw, RadioValue} from './RadioTypes'\nexport type {RadiusElement, RadiusElementExtendables} from './RadiusElement'\nexport type {SpinnerType} from './SpinnerType'\nexport type {TabType} from './Tab'\nexport type {TransitionMode} from './TransitionMode'\nexport type * from './ComponentExposes'\nexport type * from './ComponentProps'\nexport type * from './ComponentSlots'\nexport type {\n TooltipOrchestratorCreateParam as OrchestratedTooltip,\n ToastOrchestratorCreateParam as OrchestratedToast,\n PopoverOrchestratorCreateParam as OrchestratedPopover,\n ModalOrchestratorCreateParam as OrchestratedModal,\n} from './ComponentOrchestratorTypes'\nexport type * from './ComponentOrchestratorTypes'\n\nexport {\n // Real\n composableNames,\n // Real\n directiveNames,\n // Real\n componentNames,\n componentsWithExternalPath,\n composablesWithExternalPath,\n directivesWithExternalPath,\n type ComponentType,\n type ComposableType,\n type DirectiveType,\n} from './BootstrapVueOptions'\nexport type {ValidationState} from './CommonTypes'\nexport type {MaybePromise} from './MaybePromise'\nexport type {ExtractItemValue, OptionsValues} from './OptionsTypes'\n"],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { ComputedRef, ShallowRef } from 'vue';
2
+ export interface blurFocusExposes {
3
+ blur: () => void;
4
+ focus: () => void;
5
+ }
6
+ export type BFormCheckboxGroupExposes = blurFocusExposes;
7
+ export type BFormRadioGroupExposes = blurFocusExposes;
8
+ export interface BFormSelectExposes extends blurFocusExposes {
9
+ element: Readonly<ShallowRef<HTMLSelectElement | null, HTMLSelectElement | null> | ComputedRef<HTMLSelectElement | null>>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { ComputedRef, ShallowRef } from 'vue';
2
+ export interface blurFocusExposes {
3
+ blur: () => void;
4
+ focus: () => void;
5
+ }
6
+ export type BFormCheckboxGroupExposes = blurFocusExposes;
7
+ export type BFormRadioGroupExposes = blurFocusExposes;
8
+ export interface BFormSelectExposes extends blurFocusExposes {
9
+ element: Readonly<ShallowRef<HTMLSelectElement | null, HTMLSelectElement | null> | ComputedRef<HTMLSelectElement | null>>;
10
+ }
@@ -24,6 +24,7 @@ export type { RadiusElement, RadiusElementExtendables } from './RadiusElement';
24
24
  export type { SpinnerType } from './SpinnerType';
25
25
  export type { TabType } from './Tab';
26
26
  export type { TransitionMode } from './TransitionMode';
27
+ export type * from './ComponentExposes';
27
28
  export type * from './ComponentProps';
28
29
  export type * from './ComponentSlots';
29
30
  export type { TooltipOrchestratorCreateParam as OrchestratedTooltip, ToastOrchestratorCreateParam as OrchestratedToast, PopoverOrchestratorCreateParam as OrchestratedPopover, ModalOrchestratorCreateParam as OrchestratedModal, } from './ComponentOrchestratorTypes';
@@ -24,6 +24,7 @@ export type { RadiusElement, RadiusElementExtendables } from './RadiusElement';
24
24
  export type { SpinnerType } from './SpinnerType';
25
25
  export type { TabType } from './Tab';
26
26
  export type { TransitionMode } from './TransitionMode';
27
+ export type * from './ComponentExposes';
27
28
  export type * from './ComponentProps';
28
29
  export type * from './ComponentSlots';
29
30
  export type { TooltipOrchestratorCreateParam as OrchestratedTooltip, ToastOrchestratorCreateParam as OrchestratedToast, PopoverOrchestratorCreateParam as OrchestratedPopover, ModalOrchestratorCreateParam as OrchestratedModal, } from './ComponentOrchestratorTypes';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "bootstrap-vue-next",
3
3
  "displayName": "BootstrapVueNext",
4
4
  "description": "Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development",
5
- "version": "1.1.0",
5
+ "version": "1.2.1",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "main": "./dist/bootstrap-vue-next.mjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"BFormCheckbox-BMhyR-J5.js","names":[],"sources":["../src/components/BFormCheckbox/BFormCheckbox.vue","../src/components/BFormCheckbox/BFormCheckbox.vue","../src/components/BFormCheckbox/BFormCheckboxGroupBase.vue","../src/components/BFormCheckbox/BFormCheckboxGroupBase.vue","../src/components/BFormCheckbox/BFormCheckboxGroup.vue","../src/components/BFormCheckbox/BFormCheckboxGroup.vue"],"sourcesContent":["<template>\n <ConditionalWrapper\n :skip=\"isButtonGroup\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"computedWrapperClasses\"\n >\n <input\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedInputClasses\"\n type=\"checkbox\"\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 :aria-required=\"computedRequired || undefined\"\n :value=\"props.value\"\n :true-value=\"props.value\"\n :false-value=\"props.uncheckedValue\"\n :indeterminate=\"indeterminate || undefined\"\n v-bind=\"processedAttrs.inputAttrs\"\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, useAttrs, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {checkboxGroupKey, formGroupKey} from '../../utils/keys'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BFormCheckboxProps, BFormCheckboxSlots, CheckboxValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(\n defineProps<Omit<BFormCheckboxProps, 'modelValue' | 'indeterminate'>>(),\n {\n wrapperAttrs: undefined,\n inputClass: undefined,\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 switch: undefined,\n uncheckedValue: undefined,\n value: true,\n }\n)\nconst props = useDefaults(_props, 'BFormCheckbox')\nconst slots = defineSlots<BFormCheckboxSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<BFormCheckboxProps['modelValue']>({\n default: undefined,\n})\nconst indeterminate = defineModel<Exclude<BFormCheckboxProps['indeterminate'], undefined>>(\n 'indeterminate',\n {\n default: false,\n }\n)\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...inputAttrs} = attrs\n return {wrapperClass, inputAttrs}\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(checkboxGroupKey, 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 switch: 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 switch: props.switch ?? parentData?.switch.value ?? propDefaults.switch,\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: (newVal) => {\n // Indeterminate is implicitly cleared when the checked state is changed to any value\n // by the user. We reflect that here by setting our indetermiate model to false\n // which will emit the indeterminate event to the parent\n indeterminate.value = false\n if (parentData !== null && Array.isArray(newVal)) {\n // The type cast isn't perfect. Array.isArray detects CheckboxValue.unknown[],\n // but since it's parentData, it should always be CheckboxValue[]\n // It doesn't quite work when props.value is an [], but this is more of a Vue issue\n parentData.modelValue.value = newVal as CheckboxValue[]\n return\n }\n modelValue.value = newVal as CheckboxValue\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 wrapperClasses = getClasses(classesObject)\nconst computedWrapperClasses = computed(() => [\n wrapperClasses.value,\n processedAttrs.value.wrapperClass,\n])\nconst inputClasses = getInputClasses(classesObject)\nconst computedInputClasses = computed(() => [inputClasses.value, props.inputClass])\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\n :skip=\"isButtonGroup\"\n v-bind=\"props.wrapperAttrs\"\n :class=\"computedWrapperClasses\"\n >\n <input\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedInputClasses\"\n type=\"checkbox\"\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 :aria-required=\"computedRequired || undefined\"\n :value=\"props.value\"\n :true-value=\"props.value\"\n :false-value=\"props.uncheckedValue\"\n :indeterminate=\"indeterminate || undefined\"\n v-bind=\"processedAttrs.inputAttrs\"\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, useAttrs, useTemplateRef} from 'vue'\nimport {getClasses, getInputClasses, getLabelClasses} from '../../composables/useFormCheck'\nimport {checkboxGroupKey, formGroupKey} from '../../utils/keys'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {BFormCheckboxProps, BFormCheckboxSlots, CheckboxValue} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(\n defineProps<Omit<BFormCheckboxProps, 'modelValue' | 'indeterminate'>>(),\n {\n wrapperAttrs: undefined,\n inputClass: undefined,\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 switch: undefined,\n uncheckedValue: undefined,\n value: true,\n }\n)\nconst props = useDefaults(_props, 'BFormCheckbox')\nconst slots = defineSlots<BFormCheckboxSlots>()\nconst attrs = useAttrs()\n\nconst modelValue = defineModel<BFormCheckboxProps['modelValue']>({\n default: undefined,\n})\nconst indeterminate = defineModel<Exclude<BFormCheckboxProps['indeterminate'], undefined>>(\n 'indeterminate',\n {\n default: false,\n }\n)\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...inputAttrs} = attrs\n return {wrapperClass, inputAttrs}\n})\n\nconst computedId = useId(() => props.id, 'form-check')\n\nconst parentData = inject(checkboxGroupKey, 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 switch: 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 switch: props.switch ?? parentData?.switch.value ?? propDefaults.switch,\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: (newVal) => {\n // Indeterminate is implicitly cleared when the checked state is changed to any value\n // by the user. We reflect that here by setting our indetermiate model to false\n // which will emit the indeterminate event to the parent\n indeterminate.value = false\n if (parentData !== null && Array.isArray(newVal)) {\n // The type cast isn't perfect. Array.isArray detects CheckboxValue.unknown[],\n // but since it's parentData, it should always be CheckboxValue[]\n // It doesn't quite work when props.value is an [], but this is more of a Vue issue\n parentData.modelValue.value = newVal as CheckboxValue[]\n return\n }\n modelValue.value = newVal as CheckboxValue\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 wrapperClasses = getClasses(classesObject)\nconst computedWrapperClasses = computed(() => [\n wrapperClasses.value,\n processedAttrs.value.wrapperClass,\n])\nconst inputClasses = getInputClasses(classesObject)\nconst computedInputClasses = computed(() => [inputClasses.value, props.inputClass])\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=\"attrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"group\"\n :class=\"classes\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormCheckbox v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormCheckbox>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport type {BFormCheckboxGroupBaseProps, CheckboxValue} from '../../types'\nimport BFormCheckbox from './BFormCheckbox.vue'\nimport {checkboxGroupKey} from '../../utils/keys'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<Omit<BFormCheckboxGroupBaseProps, '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 switches: false,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormCheckboxGroup')\n\nconst modelValue = defineModel<CheckboxValue[]>({\n default: () => [],\n})\n\nconst computedId = useId(() => props.id, 'checkbox')\nconst computedName = useId(() => props.name, 'checkbox')\nconst _element = useTemplateRef('_element')\n\nconst {focused} = useFocus(_element, {\n initialValue: props.autofocus,\n})\n\n// Provide context to child checkboxes\nprovide(checkboxGroupKey, {\n modelValue: modelValue as import('vue').Ref<\n readonly import('../../types/CheckboxTypes').CheckboxValue[]\n >,\n switch: toRef(() => props.switches),\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\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 buttons: toRef(() => props.buttons),\n disabled: toRef(() => props.disabled),\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed<Array<{text: string; value: CheckboxValue; disabled: boolean}>>(\n () =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure text and disabled are defined, with group disabled taking precedence\n return {\n ...option,\n text: option.text ?? String(option.value ?? ''),\n value: option.value ?? null,\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\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 attrs = getGroupAttr(classesObject)\nconst classes = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <div\n v-bind=\"attrs\"\n :id=\"computedId\"\n ref=\"_element\"\n role=\"group\"\n :class=\"classes\"\n class=\"bv-no-focus-ring\"\n tabindex=\"-1\"\n >\n <slot name=\"first\" />\n <BFormCheckbox v-for=\"(item, index) in normalizedOptions\" :key=\"index\" v-bind=\"item\">\n <slot name=\"option\" v-bind=\"item\">\n {{ item.text }}\n </slot>\n </BFormCheckbox>\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, provide, toRef, useTemplateRef} from 'vue'\nimport type {BFormCheckboxGroupBaseProps, CheckboxValue} from '../../types'\nimport BFormCheckbox from './BFormCheckbox.vue'\nimport {checkboxGroupKey} from '../../utils/keys'\nimport {getGroupAttr, getGroupClasses} from '../../composables/useFormCheck'\nimport {useFocus} from '@vueuse/core'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<Omit<BFormCheckboxGroupBaseProps, '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 switches: false,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormCheckboxGroup')\n\nconst modelValue = defineModel<CheckboxValue[]>({\n default: () => [],\n})\n\nconst computedId = useId(() => props.id, 'checkbox')\nconst computedName = useId(() => props.name, 'checkbox')\nconst _element = useTemplateRef('_element')\n\nconst {focused} = useFocus(_element, {\n initialValue: props.autofocus,\n})\n\n// Provide context to child checkboxes\nprovide(checkboxGroupKey, {\n modelValue: modelValue as import('vue').Ref<\n readonly import('../../types/CheckboxTypes').CheckboxValue[]\n >,\n switch: toRef(() => props.switches),\n buttonVariant: toRef(() => props.buttonVariant),\n form: toRef(() => props.form),\n name: computedName,\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 buttons: toRef(() => props.buttons),\n disabled: toRef(() => props.disabled),\n})\n\n// Normalize options to always be objects with text/value fields\nconst normalizedOptions = computed<Array<{text: string; value: CheckboxValue; disabled: boolean}>>(\n () =>\n props.options.map((option) => {\n if (typeof option === 'object' && option !== null) {\n // Ensure text and disabled are defined, with group disabled taking precedence\n return {\n ...option,\n text: option.text ?? String(option.value ?? ''),\n value: option.value ?? null,\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\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 attrs = getGroupAttr(classesObject)\nconst classes = getGroupClasses(classesObject)\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <BFormCheckboxGroupBase\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as unknown as CheckboxValue[]\"\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 </BFormCheckboxGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport type {\n BFormCheckboxGroupProps,\n BFormCheckboxGroupSlots,\n CheckboxValue,\n OptionsValues,\n} from '../../types'\nimport {computed} from 'vue'\nimport BFormCheckboxGroupBase from './BFormCheckboxGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormCheckboxGroup.\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 * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is array of those value types\n * - Object arrays with 'value' field: modelValue is array of value field types\n * - Use 'as const' on options for literal type inference\n */\n\n// Generic props - type safety happens here\nconst props = withDefaults(defineProps<Omit<BFormCheckboxGroupProps<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 switches: false,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\ndefineSlots<BFormCheckboxGroupSlots>()\n\n// Type-safe model value - extracts union from options, wraps in array.\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 default: () => [],\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n (props.options ?? []).map(\n (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\n | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n String((el as Record<string, unknown>)[props.valueField as string]),\n }) as {text: string; value: CheckboxValue; disabled: boolean}\n )\n)\n\n// Forward all non-option-related props\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 switches: props.switches,\n}))\n</script>\n","<template>\n <BFormCheckboxGroupBase\n v-bind=\"forwardedProps\"\n v-model=\"modelValue as unknown as CheckboxValue[]\"\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 </BFormCheckboxGroupBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport type {\n BFormCheckboxGroupProps,\n BFormCheckboxGroupSlots,\n CheckboxValue,\n OptionsValues,\n} from '../../types'\nimport {computed} from 'vue'\nimport BFormCheckboxGroupBase from './BFormCheckboxGroupBase.vue'\n\n/**\n * Type-safe wrapper component for BFormCheckboxGroup.\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 * Supports both complex objects and simple scalar types (string, number, boolean).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is array of those value types\n * - Object arrays with 'value' field: modelValue is array of value field types\n * - Use 'as const' on options for literal type inference\n */\n\n// Generic props - type safety happens here\nconst props = withDefaults(defineProps<Omit<BFormCheckboxGroupProps<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 switches: false,\n textField: 'text',\n validated: false,\n valueField: 'value',\n})\ndefineSlots<BFormCheckboxGroupSlots>()\n\n// Type-safe model value - extracts union from options, wraps in array.\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 default: () => [],\n})\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n (props.options ?? []).map(\n (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\n | undefined) ??\n false),\n text:\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n String((el as Record<string, unknown>)[props.valueField as string]),\n }) as {text: string; value: CheckboxValue; disabled: boolean}\n )\n)\n\n// Forward all non-option-related props\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 switches: props.switches,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEA,MAAM,QAAQ,YAAY,SAAQ,eAAe;EACjD,MAAM,QAAQ,SAAA;EACd,MAAM,QAAQ,SAAS;EAEvB,MAAM,aAAa,SAA6C,SAAA,YAE/D;EACD,MAAM,gBAAgB,SACrB,SAAC,eAIF;EAEA,MAAM,iBAAiB,eAAe;GACpC,MAAM,EAAC,OAAO,cAAc,GAAG,eAAc;GAC7C,OAAO;IAAC;IAAc;GAAU;EAClC,CAAC;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,YAAY;EAErD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{"version":3,"file":"BFormRadio-DRViMh6V.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 {BFormRadioGroupBaseProps, BFormRadioGroupSlots} 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})\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 {BFormRadioGroupBaseProps, BFormRadioGroupSlots} 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})\n</script>\n","<template>\n <BFormRadioGroupBase\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\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport type {BFormRadioGroupProps, OptionsValues, RadioOption} from '../../types'\nimport {computed} 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\n | 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</script>\n","<template>\n <BFormRadioGroupBase\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\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport type {BFormRadioGroupProps, OptionsValues, RadioOption} from '../../types'\nimport {computed} 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\n | 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</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,UAAU,YAAY,OAAO,SAAS,aAAa;GACjE,SAAS,MAAM,WAAW,YAAY,QAAQ,SAAS,aAAa;GACpE,OAAO,MAAM,SAAS,YAAY,MAAM,SAAS,aAAa;GAC9D,MAAM,MAAM,QAAQ,YAAY,KAAK,SAAS,aAAa;GAC3D,eACE,MAAM,iBAAiB,YAAY,cAAc,SAAS,aAAa;EAC3E,EAAE;EAGF,MAAM,gBAAgB,eAAe,cAAc,MAAM,KAAK;EAC9D,MAAM,cAAc,eAAe,eAAe,SAAS,CAAC,cAAc,KAA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/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 {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})\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 {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})\n</script>\n","<template>\n <BFormSelectBase\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\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\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</script>\n","<template>\n <BFormSelectBase\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\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\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</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,UAFP,WAEO,EAAA,SAAA,KAAA,GAFqB,MAAM,SAE3B,CADF,gBAAA,gBAAA,OAAO,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;IAGlB,WAAQ,KAAA,QAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE6DZ,MAAM,QAAQ,YAAY,SAAQ,aA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