bootstrap-vue-next 0.46.0 → 0.46.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BForm-C5PR2ust.js → BForm-CcbrqF35.js} +2 -2
- package/dist/{BForm-C5PR2ust.js.map → BForm-CcbrqF35.js.map} +1 -1
- package/dist/{BFormGroup-BE5tGz_g.js → BFormGroup-D3R7DxxF.js} +2 -2
- package/dist/{BFormGroup-BE5tGz_g.js.map → BFormGroup-D3R7DxxF.js.map} +1 -1
- package/dist/{BFormSpinbutton-Bt590uT6.js → BFormSpinbutton-fkVMbQC3.js} +4 -2
- package/dist/BFormSpinbutton-fkVMbQC3.js.map +1 -0
- package/dist/{BFormValidFeedback-ClqLRxtH.js → BFormValidFeedback-BTNOXbQ6.js} +2 -2
- package/dist/{BFormValidFeedback-ClqLRxtH.js.map → BFormValidFeedback-BTNOXbQ6.js.map} +1 -1
- package/dist/{BTabs-BVcu9DPg.js → BTabs-BKmkVWrZ.js} +4 -4
- package/dist/BTabs-BKmkVWrZ.js.map +1 -0
- package/dist/bootstrap-vue-next.mjs +5 -5
- package/dist/src/components/BForm/index.mjs +2 -2
- package/dist/src/components/BFormGroup/index.mjs +1 -1
- package/dist/src/components/BFormSpinbutton/index.mjs +1 -1
- package/dist/src/components/BTabs/index.mjs +1 -1
- package/dist/src/components/index.mjs +5 -5
- package/package.json +1 -1
- package/dist/BFormSpinbutton-Bt590uT6.js.map +0 -1
- package/dist/BTabs-BVcu9DPg.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
|
|
|
3
3
|
import { t as useId$1 } from "./useId-Fh-Arhb7.js";
|
|
4
4
|
import { t as useFormSelect } from "./useFormSelect-CwS8YuiQ.js";
|
|
5
5
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-C8orMj24.js";
|
|
6
|
-
import { a as useProvideFormGroupData } from "./BFormValidFeedback-
|
|
6
|
+
import { a as useProvideFormGroupData } from "./BFormValidFeedback-BTNOXbQ6.js";
|
|
7
7
|
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
8
8
|
//#region src/components/BForm/BFormDatalistBase.vue?vue&type=script&setup=true&lang.ts
|
|
9
9
|
var _hoisted_1$1 = ["id"];
|
|
@@ -110,4 +110,4 @@ var BFormFloatingLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
110
110
|
//#endregion
|
|
111
111
|
export { BFormDatalist_default as n, BFormFloatingLabel_default as t };
|
|
112
112
|
|
|
113
|
-
//# sourceMappingURL=BForm-
|
|
113
|
+
//# sourceMappingURL=BForm-CcbrqF35.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BForm-C5PR2ust.js","names":[],"sources":["../src/components/BForm/BFormDatalistBase.vue","../src/components/BForm/BFormDatalistBase.vue","../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ 'text' in option ? option.text : '' }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormDatalistBaseProps} from '../../types'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\n\n/**\n * Base component for BFormDatalist - non-generic implementation using useDefaults.\n * Renders a datalist element with normalized options.\n * Filters out complex/grouped options as datalist doesn't support them.\n */\nconst _props = withDefaults(defineProps<BFormDatalistBaseProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(() =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt))\n)\n</script>\n","<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ 'text' in option ? option.text : '' }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormDatalistBaseProps} from '../../types'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\n\n/**\n * Base component for BFormDatalist - non-generic implementation using useDefaults.\n * Renders a datalist element with normalized options.\n * Filters out complex/grouped options as datalist doesn't support them.\n */\nconst _props = withDefaults(defineProps<BFormDatalistBaseProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(() =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt))\n)\n</script>\n","<template>\n <BFormDatalistBase v-bind=\"forwardedProps\" :options=\"normalizedOptions as any\">\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 </BFormDatalistBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Item = Record<string, unknown> | string | number | boolean,\n ValueKey extends Item extends Record<string, unknown> ? keyof Item : string =\n Item extends Record<string, unknown> ? keyof Item : never\n \"\n>\nimport {computed} from 'vue'\nimport BFormDatalistBase from './BFormDatalistBase.vue'\nimport type {BFormDatalistProps, BFormDatalistSlots, SelectOption} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormDatalist.\n * Provides generic type safety for options and field names.\n * Normalizes typed options and forwards to BFormDatalistBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n */\nconst props = withDefaults(defineProps<BFormDatalistProps<Item, ValueKey>>(), {\n disabled: false,\n disabledField: 'disabled' as keyof Item & string,\n id: undefined,\n options: () => [],\n textField: 'text' as keyof Item & string,\n // @ts-expect-error - ValueKey default doesn't satisfy InferDefault but works at runtime\n valueField: 'value',\n})\ndefineSlots<\n BFormDatalistSlots<Item extends Record<string, unknown> ? Item[ValueKey & keyof Item] : Item>\n>()\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n props.options.map((el) => {\n if (typeof el === 'string') {\n return el\n }\n if (typeof el === 'number') {\n return String(el)\n }\n if (typeof el === 'boolean') {\n return String(el)\n }\n return {\n value: (el as Record<string, unknown>)[props.valueField as string],\n text:\n ((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 })\n)\n\n// Forward all props except options (which we normalize) and field mappings (already used)\nconst forwardedProps = computed(() => ({\n disabled: props.disabled,\n id: props.id,\n}))\n</script>\n","<template>\n <BFormDatalistBase v-bind=\"forwardedProps\" :options=\"normalizedOptions as any\">\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 </BFormDatalistBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Item = Record<string, unknown> | string | number | boolean,\n ValueKey extends Item extends Record<string, unknown> ? keyof Item : string =\n Item extends Record<string, unknown> ? keyof Item : never\n \"\n>\nimport {computed} from 'vue'\nimport BFormDatalistBase from './BFormDatalistBase.vue'\nimport type {BFormDatalistProps, BFormDatalistSlots, SelectOption} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormDatalist.\n * Provides generic type safety for options and field names.\n * Normalizes typed options and forwards to BFormDatalistBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n */\nconst props = withDefaults(defineProps<BFormDatalistProps<Item, ValueKey>>(), {\n disabled: false,\n disabledField: 'disabled' as keyof Item & string,\n id: undefined,\n options: () => [],\n textField: 'text' as keyof Item & string,\n // @ts-expect-error - ValueKey default doesn't satisfy InferDefault but works at runtime\n valueField: 'value',\n})\ndefineSlots<\n BFormDatalistSlots<Item extends Record<string, unknown> ? Item[ValueKey & keyof Item] : Item>\n>()\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n props.options.map((el) => {\n if (typeof el === 'string') {\n return el\n }\n if (typeof el === 'number') {\n return String(el)\n }\n if (typeof el === 'boolean') {\n return String(el)\n }\n return {\n value: (el as Record<string, unknown>)[props.valueField as string],\n text:\n ((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 })\n)\n\n// Forward all props except options (which we normalize) and field mappings (already used)\nconst forwardedProps = computed(() => ({\n disabled: props.disabled,\n id: props.id,\n}))\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormFloatingLabelProps, BFormFloatingLabelSlots} from '../../types'\nimport {inject} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport {formGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n\n// Boundary: BFormFloatingLabel renders its own <label for>. State/disabled forward through\n// from the outer BFormGroup; the isolated label-target registry isn't read, so descendant\n// claims never reach the outer group.\nconst parentFormGroupData = inject(formGroupKey, null)?.()\nif (parentFormGroupData) useProvideFormGroupData(parentFormGroupData)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormFloatingLabelProps, BFormFloatingLabelSlots} from '../../types'\nimport {inject} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport {formGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n\n// Boundary: BFormFloatingLabel renders its own <label for>. State/disabled forward through\n// from the outer BFormGroup; the isolated label-target registry isn't read, so descendant\n// claims never reach the outer group.\nconst parentFormGroupData = inject(formGroupKey, null)?.()\nif (parentFormGroupData) useProvideFormGroupData(parentFormGroupData)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ,YAAY,SAAQ,eAAe;EAEjD,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU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A,GAAA;IAExC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAgD,KAAA,QAAA,UAAA,eAAA,mBAApB,SAAS,CAAA,CAAA,CAAA,CAAA;IAGvC,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;EEYZ,MAAM,QAAQ,YAAY,SAAQ,oBAAoB;EAMtD,MAAM,sBAAsB,OAAO,cAAc,IAAI,CAAC,GAAG;EACzD,IAAI,qBAAqB,wBAAwB,mBAAmB;;GA7BlE,OAAA,UAAA,GAAA,mBAOM,OAPN,YAOM,CANJ,WAAQ,KAAA,QAAA,SAAA,GACR,mBAIQ,SAAA,EAJA,KAAK,MAAA,KAAA,CAAK,CAAC,SAAA,GAAA,CACjB,WAEO,KAAA,QAAA,SAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,GAAA,UAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BForm-CcbrqF35.js","names":[],"sources":["../src/components/BForm/BFormDatalistBase.vue","../src/components/BForm/BFormDatalistBase.vue","../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormDatalist.vue","../src/components/BForm/BFormFloatingLabel.vue","../src/components/BForm/BFormFloatingLabel.vue"],"sourcesContent":["<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ 'text' in option ? option.text : '' }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormDatalistBaseProps} from '../../types'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\n\n/**\n * Base component for BFormDatalist - non-generic implementation using useDefaults.\n * Renders a datalist element with normalized options.\n * Filters out complex/grouped options as datalist doesn't support them.\n */\nconst _props = withDefaults(defineProps<BFormDatalistBaseProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(() =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt))\n)\n</script>\n","<template>\n <datalist :id=\"computedId\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptsWrapper\"\n :key=\"index\"\n v-bind=\"option\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ 'text' in option ? option.text : '' }}\n </slot>\n </BFormSelectOption>\n <slot />\n </datalist>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormDatalistBaseProps} from '../../types'\nimport {computed} from 'vue'\nimport BFormSelectOption from '../BFormSelect/BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useFormSelect} from '../../composables/useFormSelect'\n\n/**\n * Base component for BFormDatalist - non-generic implementation using useDefaults.\n * Renders a datalist element with normalized options.\n * Filters out complex/grouped options as datalist doesn't support them.\n */\nconst _props = withDefaults(defineProps<BFormDatalistBaseProps>(), {\n disabled: false,\n disabledField: 'disabled',\n id: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormDatalist')\n\nconst computedId = useId(() => props.id, 'datalist')\n\nconst {normalizedOptions, isComplex} = useFormSelect(\n () => props.options,\n computed(() => ({...props, optionsField: 'options', labelField: 'label'}))\n)\n\nconst normalizedOptsWrapper = computed(() =>\n // Datalist doesn't support complex options\n normalizedOptions.value.filter((opt) => !isComplex(opt))\n)\n</script>\n","<template>\n <BFormDatalistBase v-bind=\"forwardedProps\" :options=\"normalizedOptions as any\">\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 </BFormDatalistBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Item = Record<string, unknown> | string | number | boolean,\n ValueKey extends Item extends Record<string, unknown> ? keyof Item : string =\n Item extends Record<string, unknown> ? keyof Item : never\n \"\n>\nimport {computed} from 'vue'\nimport BFormDatalistBase from './BFormDatalistBase.vue'\nimport type {BFormDatalistProps, BFormDatalistSlots, SelectOption} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormDatalist.\n * Provides generic type safety for options and field names.\n * Normalizes typed options and forwards to BFormDatalistBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n */\nconst props = withDefaults(defineProps<BFormDatalistProps<Item, ValueKey>>(), {\n disabled: false,\n disabledField: 'disabled' as keyof Item & string,\n id: undefined,\n options: () => [],\n textField: 'text' as keyof Item & string,\n // @ts-expect-error - ValueKey default doesn't satisfy InferDefault but works at runtime\n valueField: 'value',\n})\ndefineSlots<\n BFormDatalistSlots<Item extends Record<string, unknown> ? Item[ValueKey & keyof Item] : Item>\n>()\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n props.options.map((el) => {\n if (typeof el === 'string') {\n return el\n }\n if (typeof el === 'number') {\n return String(el)\n }\n if (typeof el === 'boolean') {\n return String(el)\n }\n return {\n value: (el as Record<string, unknown>)[props.valueField as string],\n text:\n ((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 })\n)\n\n// Forward all props except options (which we normalize) and field mappings (already used)\nconst forwardedProps = computed(() => ({\n disabled: props.disabled,\n id: props.id,\n}))\n</script>\n","<template>\n <BFormDatalistBase v-bind=\"forwardedProps\" :options=\"normalizedOptions as any\">\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 </BFormDatalistBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Item = Record<string, unknown> | string | number | boolean,\n ValueKey extends Item extends Record<string, unknown> ? keyof Item : string =\n Item extends Record<string, unknown> ? keyof Item : never\n \"\n>\nimport {computed} from 'vue'\nimport BFormDatalistBase from './BFormDatalistBase.vue'\nimport type {BFormDatalistProps, BFormDatalistSlots, SelectOption} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormDatalist.\n * Provides generic type safety for options and field names.\n * Normalizes typed options and forwards to BFormDatalistBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n */\nconst props = withDefaults(defineProps<BFormDatalistProps<Item, ValueKey>>(), {\n disabled: false,\n disabledField: 'disabled' as keyof Item & string,\n id: undefined,\n options: () => [],\n textField: 'text' as keyof Item & string,\n // @ts-expect-error - ValueKey default doesn't satisfy InferDefault but works at runtime\n valueField: 'value',\n})\ndefineSlots<\n BFormDatalistSlots<Item extends Record<string, unknown> ? Item[ValueKey & keyof Item] : Item>\n>()\n\n// Type-safe normalization of options\nconst normalizedOptions = computed(() =>\n props.options.map((el) => {\n if (typeof el === 'string') {\n return el\n }\n if (typeof el === 'number') {\n return String(el)\n }\n if (typeof el === 'boolean') {\n return String(el)\n }\n return {\n value: (el as Record<string, unknown>)[props.valueField as string],\n text:\n ((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 })\n)\n\n// Forward all props except options (which we normalize) and field mappings (already used)\nconst forwardedProps = computed(() => ({\n disabled: props.disabled,\n id: props.id,\n}))\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormFloatingLabelProps, BFormFloatingLabelSlots} from '../../types'\nimport {inject} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport {formGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n\n// Boundary: BFormFloatingLabel renders its own <label for>. State/disabled forward through\n// from the outer BFormGroup; the isolated label-target registry isn't read, so descendant\n// claims never reach the outer group.\nconst parentFormGroupData = inject(formGroupKey, null)?.()\nif (parentFormGroupData) useProvideFormGroupData(parentFormGroupData)\n</script>\n","<template>\n <div class=\"form-floating\">\n <slot />\n <label :for=\"props.labelFor\">\n <slot name=\"label\">\n {{ props.label }}\n </slot>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormFloatingLabelProps, BFormFloatingLabelSlots} from '../../types'\nimport {inject} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport {formGroupKey} from '../../utils/keys'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n\n// Boundary: BFormFloatingLabel renders its own <label for>. State/disabled forward through\n// from the outer BFormGroup; the isolated label-target registry isn't read, so descendant\n// claims never reach the outer group.\nconst parentFormGroupData = inject(formGroupKey, null)?.()\nif (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,MAAM,iBAAiB,gBAAgB;GACrC,UAAU,MAAM;GAChB,IAAI,MAAM;EACZ,EAAE;;GAzEA,OAAA,UAAA,GAAA,YAWoB,2BAXpB,WAA2B,eAWP,OAXqB,EAAG,SAAS,kBAAA,MAAA,CAAA,GAAA;IAExC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAgD,KAAA,QAAA,UAAA,eAAA,mBAApB,SAAS,CAAA,CAAA,CAAA,CAAA;IAGvC,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;EEYZ,MAAM,QAAQ,YAAY,SAAQ,oBAAoB;EAMtD,MAAM,sBAAsB,OAAO,cAAc,IAAI,CAAC,GAAG;EACzD,IAAI,qBAAqB,wBAAwB,mBAAmB;;GA7BlE,OAAA,UAAA,GAAA,mBAOM,OAPN,YAOM,CANJ,WAAQ,KAAA,QAAA,SAAA,GACR,mBAIQ,SAAA,EAJA,KAAK,MAAA,KAAA,CAAK,CAAC,SAAA,GAAA,CACjB,WAEO,KAAA,QAAA,SAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,GAAA,UAAA,CAAA,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { a as upperFirst } from "./stringUtils-CVySsg3y.js";
|
|
|
5
5
|
import { t as useAriaInvalid } from "./useAriaInvalid-CRUhkD2V.js";
|
|
6
6
|
import { t as useStateClass } from "./useStateClass-BF7kf2zK.js";
|
|
7
7
|
import { t as BCol_default } from "./BCol-DiZFbqU5.js";
|
|
8
|
-
import { a as useProvideFormGroupData, i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-
|
|
8
|
+
import { a as useProvideFormGroupData, i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-BTNOXbQ6.js";
|
|
9
9
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, toRef, unref, useSlots, useTemplateRef, withCtx } from "vue";
|
|
10
10
|
//#region src/utils/props.ts
|
|
11
11
|
/**
|
|
@@ -497,4 +497,4 @@ var BFormGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
497
497
|
//#endregion
|
|
498
498
|
export { BFormGroup_default as t };
|
|
499
499
|
|
|
500
|
-
//# sourceMappingURL=BFormGroup-
|
|
500
|
+
//# sourceMappingURL=BFormGroup-D3R7DxxF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormGroup-BE5tGz_g.js","names":["$attrs"],"sources":["../src/utils/props.ts","../src/components/BFormGroupContent.vue","../src/components/BFormGroupContent.vue","../src/components/BFormGroupLabel.vue","../src/components/BFormGroupLabel.vue","../src/components/BFormGroup/BFormGroup.vue","../src/components/BFormGroup/BFormGroup.vue"],"sourcesContent":["// Suffix can be a falsey value so nothing is appended to string\n// (helps when looping over props & some shouldn't change)\n\nimport {upperFirst} from './stringUtils'\n\n/**\n * Use data last parameters to allow for currying\n *\n * @param suffix\n * @param value\n * @returns\n */\nexport const suffixPropName = (suffix: string, value: string): string =>\n value + (suffix ? upperFirst(suffix) : '')\n","<template>\n <BFormInvalidFeedback\n v-if=\"hasInvalidFeedbackSlot || invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"hasValidFeedbackSlot || validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"valid-feedback\">{{ validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"hasDescriptionSlot || description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ description }}</slot>\n </BFormText>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useSlots} from 'vue'\nimport type {ValidationState} from '../types'\nimport BFormInvalidFeedback from './BForm/BFormInvalidFeedback.vue'\nimport BFormValidFeedback from './BForm/BFormValidFeedback.vue'\nimport BFormText from './BForm/BFormText.vue'\n\ndefineProps<{\n invalidFeedback: string | undefined\n validFeedback: string | undefined\n description: string | undefined\n feedbackAriaLive: string | undefined\n state: ValidationState | undefined\n tooltip: boolean | undefined\n invalidFeedbackId: string | undefined\n validFeedbackId: string | undefined\n descriptionId: string | undefined\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n 'invalid-feedback'?: (props: Record<string, never>) => any\n 'valid-feedback'?: (props: Record<string, never>) => any\n 'description'?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst slots = useSlots()\nconst hasInvalidFeedbackSlot = computed(() => !!slots['invalid-feedback'])\nconst hasValidFeedbackSlot = computed(() => !!slots['valid-feedback'])\nconst hasDescriptionSlot = computed(() => !!slots['description'])\n</script>\n","<template>\n <BFormInvalidFeedback\n v-if=\"hasInvalidFeedbackSlot || invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"hasValidFeedbackSlot || validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"valid-feedback\">{{ validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"hasDescriptionSlot || description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ description }}</slot>\n </BFormText>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useSlots} from 'vue'\nimport type {ValidationState} from '../types'\nimport BFormInvalidFeedback from './BForm/BFormInvalidFeedback.vue'\nimport BFormValidFeedback from './BForm/BFormValidFeedback.vue'\nimport BFormText from './BForm/BFormText.vue'\n\ndefineProps<{\n invalidFeedback: string | undefined\n validFeedback: string | undefined\n description: string | undefined\n feedbackAriaLive: string | undefined\n state: ValidationState | undefined\n tooltip: boolean | undefined\n invalidFeedbackId: string | undefined\n validFeedbackId: string | undefined\n descriptionId: string | undefined\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n 'invalid-feedback'?: (props: Record<string, never>) => any\n 'valid-feedback'?: (props: Record<string, never>) => any\n 'description'?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst slots = useSlots()\nconst hasInvalidFeedbackSlot = computed(() => !!slots['invalid-feedback'])\nconst hasValidFeedbackSlot = computed(() => !!slots['valid-feedback'])\nconst hasDescriptionSlot = computed(() => !!slots['description'])\n</script>\n","<template>\n <BCol\n v-if=\"isHorizontal\"\n v-bind=\"labelColProps\"\n :id=\"labelId\"\n :tag=\"labelTag\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"[labelAlignClasses, labelClasses]\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport BCol from './BContainer/BCol.vue'\n\ndefineProps<{\n label: string | undefined\n labelTag: string\n labelId: string | undefined\n computedLabelFor: string | null\n isFieldset: boolean\n isHorizontal: boolean\n labelColProps: Record<string, unknown>\n labelAlignClasses: string[]\n labelClasses: ClassValue\n}>()\n\nconst emit = defineEmits<{\n legendClick: [event: MouseEvent]\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n label?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <BCol\n v-if=\"isHorizontal\"\n v-bind=\"labelColProps\"\n :id=\"labelId\"\n :tag=\"labelTag\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"[labelAlignClasses, labelClasses]\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport BCol from './BContainer/BCol.vue'\n\ndefineProps<{\n label: string | undefined\n labelTag: string\n labelId: string | undefined\n computedLabelFor: string | null\n isFieldset: boolean\n isHorizontal: boolean\n labelColProps: Record<string, unknown>\n labelAlignClasses: string[]\n labelClasses: ClassValue\n}>()\n\nconst emit = defineEmits<{\n legendClick: [event: MouseEvent]\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n label?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <fieldset\n :id=\"computedId\"\n :disabled=\"props.disabled\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : undefined\"\n v-bind=\"$attrs\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n class=\"b-form-group\"\n >\n <!-- End of definitions -->\n <BFormRow v-if=\"isHorizontal\">\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BCol v-bind=\"contentColProps\" ref=\"_content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </BCol>\n </BFormRow>\n <template v-else>\n <div v-if=\"isFloating\" ref=\"_content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </div>\n <template v-else>\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </template>\n </template>\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, toRef, useTemplateRef} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport type {BFormGroupProps, BFormGroupSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport BFormGroupContent from '../BFormGroupContent.vue'\nimport BFormGroupLabel from '../BFormGroupLabel.vue'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\nconst slots = defineSlots<BFormGroupSlots>()\n\nconst computedState = toRef(() => props.state)\nconst computedDisabled = toRef(() => props.disabled)\nconst {singleLabelTargetId} = useProvideFormGroupData({\n state: computedState,\n disabled: computedDisabled,\n})\nconst computedLabelFor = computed(() => props.labelFor ?? singleLabelTargetId.value)\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = useTemplateRef<HTMLDivElement | InstanceType<typeof BCol> | null>('_content')\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n if (breakpoint === 'xs') {\n result.push(`text-${propValue}`)\n } else {\n result.push(`text-${breakpoint}-${propValue}`)\n }\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\nconst isFloating = computed(() => props.floating && !isHorizontal.value)\n\nconst stateClass = useStateClass(computedState)\nconst computedAriaInvalid = useAriaInvalid(() => props.ariaInvalid, computedState)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (computedLabelFor.value || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n // In horizontal mode, content.value is a BCol component instance, not a DOM element\n // Access the DOM element via $el property\n const contentElement =\n isHorizontal.value && content.value && '$el' in content.value\n ? (content.value.$el as HTMLElement)\n : (content.value as HTMLDivElement | null)\n if (!contentElement) return\n\n const inputs = [\n ...contentElement.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!isFieldset.value ? 'label' : 'legend'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !isFloating.value && !computedLabelFor.value,\n 'col-form-label': isHorizontal.value || (!isFloating.value && !computedLabelFor.value),\n 'pt-0': !isHorizontal.value && !isFloating.value && !computedLabelFor.value,\n 'd-block': !isHorizontal.value && (isFloating.value || !!computedLabelFor.value),\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n isHorizontal.value ? null : labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !isFloating.value && !computedLabelFor.value)\n\nconst hasDescription = computed(() => !!slots.description || !!props.description)\nconst hasInvalidFeedback = computed(() => !!slots['invalid-feedback'] || !!props.invalidFeedback)\nconst hasValidFeedback = computed(() => !!slots['valid-feedback'] || !!props.validFeedback)\n\nconst computedAriaDescribedby = computed<string | null>(() => {\n const ids: string[] = []\n if (hasDescription.value) ids.push(descriptionId.value)\n if (computedState.value === false && hasInvalidFeedback.value) ids.push(invalidFeedbackId.value)\n if (computedState.value === true && hasValidFeedback.value) ids.push(validFeedbackId.value)\n return ids.length > 0 ? ids.join(' ') : null\n})\n\nconst labelShowing = computed(() => !!slots.label || !!props.label || isHorizontal.value)\n\nconst labelComponentProps = computed(() => ({\n label: props.label,\n labelTag: labelTag.value,\n labelId: labelId.value,\n computedLabelFor: computedLabelFor.value,\n isFieldset: isFieldset.value,\n isHorizontal: isHorizontal.value,\n labelColProps: labelColProps.value,\n labelAlignClasses: labelAlignClasses.value,\n labelClasses: labelClasses.value,\n}))\n\nconst contentComponentProps = computed(() => ({\n invalidFeedback: props.invalidFeedback,\n validFeedback: props.validFeedback,\n description: props.description,\n feedbackAriaLive: props.feedbackAriaLive,\n state: computedState.value,\n tooltip: props.tooltip,\n invalidFeedbackId: invalidFeedbackId.value,\n validFeedbackId: validFeedbackId.value,\n descriptionId: descriptionId.value,\n}))\n</script>\n","<template>\n <fieldset\n :id=\"computedId\"\n :disabled=\"props.disabled\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : undefined\"\n v-bind=\"$attrs\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n class=\"b-form-group\"\n >\n <!-- End of definitions -->\n <BFormRow v-if=\"isHorizontal\">\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BCol v-bind=\"contentColProps\" ref=\"_content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </BCol>\n </BFormRow>\n <template v-else>\n <div v-if=\"isFloating\" ref=\"_content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </div>\n <template v-else>\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </template>\n </template>\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, toRef, useTemplateRef} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport type {BFormGroupProps, BFormGroupSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport BFormGroupContent from '../BFormGroupContent.vue'\nimport BFormGroupLabel from '../BFormGroupLabel.vue'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\nconst slots = defineSlots<BFormGroupSlots>()\n\nconst computedState = toRef(() => props.state)\nconst computedDisabled = toRef(() => props.disabled)\nconst {singleLabelTargetId} = useProvideFormGroupData({\n state: computedState,\n disabled: computedDisabled,\n})\nconst computedLabelFor = computed(() => props.labelFor ?? singleLabelTargetId.value)\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = useTemplateRef<HTMLDivElement | InstanceType<typeof BCol> | null>('_content')\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n if (breakpoint === 'xs') {\n result.push(`text-${propValue}`)\n } else {\n result.push(`text-${breakpoint}-${propValue}`)\n }\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\nconst isFloating = computed(() => props.floating && !isHorizontal.value)\n\nconst stateClass = useStateClass(computedState)\nconst computedAriaInvalid = useAriaInvalid(() => props.ariaInvalid, computedState)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (computedLabelFor.value || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n // In horizontal mode, content.value is a BCol component instance, not a DOM element\n // Access the DOM element via $el property\n const contentElement =\n isHorizontal.value && content.value && '$el' in content.value\n ? (content.value.$el as HTMLElement)\n : (content.value as HTMLDivElement | null)\n if (!contentElement) return\n\n const inputs = [\n ...contentElement.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!isFieldset.value ? 'label' : 'legend'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !isFloating.value && !computedLabelFor.value,\n 'col-form-label': isHorizontal.value || (!isFloating.value && !computedLabelFor.value),\n 'pt-0': !isHorizontal.value && !isFloating.value && !computedLabelFor.value,\n 'd-block': !isHorizontal.value && (isFloating.value || !!computedLabelFor.value),\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n isHorizontal.value ? null : labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !isFloating.value && !computedLabelFor.value)\n\nconst hasDescription = computed(() => !!slots.description || !!props.description)\nconst hasInvalidFeedback = computed(() => !!slots['invalid-feedback'] || !!props.invalidFeedback)\nconst hasValidFeedback = computed(() => !!slots['valid-feedback'] || !!props.validFeedback)\n\nconst computedAriaDescribedby = computed<string | null>(() => {\n const ids: string[] = []\n if (hasDescription.value) ids.push(descriptionId.value)\n if (computedState.value === false && hasInvalidFeedback.value) ids.push(invalidFeedbackId.value)\n if (computedState.value === true && hasValidFeedback.value) ids.push(validFeedbackId.value)\n return ids.length > 0 ? ids.join(' ') : null\n})\n\nconst labelShowing = computed(() => !!slots.label || !!props.label || isHorizontal.value)\n\nconst labelComponentProps = computed(() => ({\n label: props.label,\n labelTag: labelTag.value,\n labelId: labelId.value,\n computedLabelFor: computedLabelFor.value,\n isFieldset: isFieldset.value,\n isHorizontal: isHorizontal.value,\n labelColProps: labelColProps.value,\n labelAlignClasses: labelAlignClasses.value,\n labelClasses: labelClasses.value,\n}))\n\nconst contentComponentProps = computed(() => ({\n invalidFeedback: props.invalidFeedback,\n validFeedback: props.validFeedback,\n description: props.description,\n feedbackAriaLive: props.feedbackAriaLive,\n state: computedState.value,\n tooltip: props.tooltip,\n invalidFeedbackId: invalidFeedbackId.value,\n validFeedbackId: validFeedbackId.value,\n descriptionId: descriptionId.value,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,IAAa,kBAAkB,QAAgB,UAC7C,SAAS,SAAS,WAAW,MAAM,IAAI;;;;;;;;;;;;;;;;;ECsCzC,MAAM,QAAQ,SAAS;EACvB,MAAM,yBAAyB,eAAe,CAAC,CAAC,MAAM,mBAAmB;EACzE,MAAM,uBAAuB,eAAe,CAAC,CAAC,MAAM,iBAAiB;EACrE,MAAM,qBAAqB,eAAe,CAAC,CAAC,MAAM,cAAc;;;IApDtD,uBAAA,SAA0B,QAAA,mBADlC,UAAA,GAAA,YAQuB,8BAAA;;KANpB,IAAI,QAAA;KACJ,aAAW,QAAA;KACX,OAAO,QAAA;KACP,SAAS,QAAA;;KAEV,SAAA,cAA0D,CAA1D,WAA0D,KAAA,QAAA,oBAAA,CAAA,SAAA,CAAzB,gBAAA,gBAAA,QAAA,eAAe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MAAA;MAClC,IAAA,cAA2B,CAA3B,WAA2B,KAAA,QAAA,aAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormGroup-D3R7DxxF.js","names":["$attrs"],"sources":["../src/utils/props.ts","../src/components/BFormGroupContent.vue","../src/components/BFormGroupContent.vue","../src/components/BFormGroupLabel.vue","../src/components/BFormGroupLabel.vue","../src/components/BFormGroup/BFormGroup.vue","../src/components/BFormGroup/BFormGroup.vue"],"sourcesContent":["// Suffix can be a falsey value so nothing is appended to string\n// (helps when looping over props & some shouldn't change)\n\nimport {upperFirst} from './stringUtils'\n\n/**\n * Use data last parameters to allow for currying\n *\n * @param suffix\n * @param value\n * @returns\n */\nexport const suffixPropName = (suffix: string, value: string): string =>\n value + (suffix ? upperFirst(suffix) : '')\n","<template>\n <BFormInvalidFeedback\n v-if=\"hasInvalidFeedbackSlot || invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"hasValidFeedbackSlot || validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"valid-feedback\">{{ validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"hasDescriptionSlot || description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ description }}</slot>\n </BFormText>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useSlots} from 'vue'\nimport type {ValidationState} from '../types'\nimport BFormInvalidFeedback from './BForm/BFormInvalidFeedback.vue'\nimport BFormValidFeedback from './BForm/BFormValidFeedback.vue'\nimport BFormText from './BForm/BFormText.vue'\n\ndefineProps<{\n invalidFeedback: string | undefined\n validFeedback: string | undefined\n description: string | undefined\n feedbackAriaLive: string | undefined\n state: ValidationState | undefined\n tooltip: boolean | undefined\n invalidFeedbackId: string | undefined\n validFeedbackId: string | undefined\n descriptionId: string | undefined\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n 'invalid-feedback'?: (props: Record<string, never>) => any\n 'valid-feedback'?: (props: Record<string, never>) => any\n 'description'?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst slots = useSlots()\nconst hasInvalidFeedbackSlot = computed(() => !!slots['invalid-feedback'])\nconst hasValidFeedbackSlot = computed(() => !!slots['valid-feedback'])\nconst hasDescriptionSlot = computed(() => !!slots['description'])\n</script>\n","<template>\n <BFormInvalidFeedback\n v-if=\"hasInvalidFeedbackSlot || invalidFeedback\"\n :id=\"invalidFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"invalid-feedback\">{{ invalidFeedback }}</slot>\n </BFormInvalidFeedback>\n <BFormValidFeedback\n v-if=\"hasValidFeedbackSlot || validFeedback\"\n :id=\"validFeedbackId\"\n :aria-live=\"feedbackAriaLive\"\n :state=\"state\"\n :tooltip=\"tooltip\"\n >\n <slot name=\"valid-feedback\">{{ validFeedback }}</slot>\n </BFormValidFeedback>\n <BFormText v-if=\"hasDescriptionSlot || description\" :id=\"descriptionId\">\n <slot name=\"description\">{{ description }}</slot>\n </BFormText>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useSlots} from 'vue'\nimport type {ValidationState} from '../types'\nimport BFormInvalidFeedback from './BForm/BFormInvalidFeedback.vue'\nimport BFormValidFeedback from './BForm/BFormValidFeedback.vue'\nimport BFormText from './BForm/BFormText.vue'\n\ndefineProps<{\n invalidFeedback: string | undefined\n validFeedback: string | undefined\n description: string | undefined\n feedbackAriaLive: string | undefined\n state: ValidationState | undefined\n tooltip: boolean | undefined\n invalidFeedbackId: string | undefined\n validFeedbackId: string | undefined\n descriptionId: string | undefined\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n 'invalid-feedback'?: (props: Record<string, never>) => any\n 'valid-feedback'?: (props: Record<string, never>) => any\n 'description'?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst slots = useSlots()\nconst hasInvalidFeedbackSlot = computed(() => !!slots['invalid-feedback'])\nconst hasValidFeedbackSlot = computed(() => !!slots['valid-feedback'])\nconst hasDescriptionSlot = computed(() => !!slots['description'])\n</script>\n","<template>\n <BCol\n v-if=\"isHorizontal\"\n v-bind=\"labelColProps\"\n :id=\"labelId\"\n :tag=\"labelTag\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"[labelAlignClasses, labelClasses]\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport BCol from './BContainer/BCol.vue'\n\ndefineProps<{\n label: string | undefined\n labelTag: string\n labelId: string | undefined\n computedLabelFor: string | null\n isFieldset: boolean\n isHorizontal: boolean\n labelColProps: Record<string, unknown>\n labelAlignClasses: string[]\n labelClasses: ClassValue\n}>()\n\nconst emit = defineEmits<{\n legendClick: [event: MouseEvent]\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n label?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <BCol\n v-if=\"isHorizontal\"\n v-bind=\"labelColProps\"\n :id=\"labelId\"\n :tag=\"labelTag\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"[labelAlignClasses, labelClasses]\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </BCol>\n <component\n :is=\"labelTag\"\n v-else\n :id=\"labelId\"\n :for=\"computedLabelFor || null\"\n :tabindex=\"isFieldset ? '-1' : null\"\n :class=\"labelClasses\"\n @click=\"isFieldset ? (e: MouseEvent) => emit('legendClick', e) : undefined\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\nimport BCol from './BContainer/BCol.vue'\n\ndefineProps<{\n label: string | undefined\n labelTag: string\n labelId: string | undefined\n computedLabelFor: string | null\n isFieldset: boolean\n isHorizontal: boolean\n labelColProps: Record<string, unknown>\n labelAlignClasses: string[]\n labelClasses: ClassValue\n}>()\n\nconst emit = defineEmits<{\n legendClick: [event: MouseEvent]\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n label?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <fieldset\n :id=\"computedId\"\n :disabled=\"props.disabled\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : undefined\"\n v-bind=\"$attrs\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n class=\"b-form-group\"\n >\n <!-- End of definitions -->\n <BFormRow v-if=\"isHorizontal\">\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BCol v-bind=\"contentColProps\" ref=\"_content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </BCol>\n </BFormRow>\n <template v-else>\n <div v-if=\"isFloating\" ref=\"_content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </div>\n <template v-else>\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </template>\n </template>\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, toRef, useTemplateRef} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport type {BFormGroupProps, BFormGroupSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport BFormGroupContent from '../BFormGroupContent.vue'\nimport BFormGroupLabel from '../BFormGroupLabel.vue'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\nconst slots = defineSlots<BFormGroupSlots>()\n\nconst computedState = toRef(() => props.state)\nconst computedDisabled = toRef(() => props.disabled)\nconst {singleLabelTargetId} = useProvideFormGroupData({\n state: computedState,\n disabled: computedDisabled,\n})\nconst computedLabelFor = computed(() => props.labelFor ?? singleLabelTargetId.value)\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = useTemplateRef<HTMLDivElement | InstanceType<typeof BCol> | null>('_content')\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n if (breakpoint === 'xs') {\n result.push(`text-${propValue}`)\n } else {\n result.push(`text-${breakpoint}-${propValue}`)\n }\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\nconst isFloating = computed(() => props.floating && !isHorizontal.value)\n\nconst stateClass = useStateClass(computedState)\nconst computedAriaInvalid = useAriaInvalid(() => props.ariaInvalid, computedState)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (computedLabelFor.value || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n // In horizontal mode, content.value is a BCol component instance, not a DOM element\n // Access the DOM element via $el property\n const contentElement =\n isHorizontal.value && content.value && '$el' in content.value\n ? (content.value.$el as HTMLElement)\n : (content.value as HTMLDivElement | null)\n if (!contentElement) return\n\n const inputs = [\n ...contentElement.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!isFieldset.value ? 'label' : 'legend'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !isFloating.value && !computedLabelFor.value,\n 'col-form-label': isHorizontal.value || (!isFloating.value && !computedLabelFor.value),\n 'pt-0': !isHorizontal.value && !isFloating.value && !computedLabelFor.value,\n 'd-block': !isHorizontal.value && (isFloating.value || !!computedLabelFor.value),\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n isHorizontal.value ? null : labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !isFloating.value && !computedLabelFor.value)\n\nconst hasDescription = computed(() => !!slots.description || !!props.description)\nconst hasInvalidFeedback = computed(() => !!slots['invalid-feedback'] || !!props.invalidFeedback)\nconst hasValidFeedback = computed(() => !!slots['valid-feedback'] || !!props.validFeedback)\n\nconst computedAriaDescribedby = computed<string | null>(() => {\n const ids: string[] = []\n if (hasDescription.value) ids.push(descriptionId.value)\n if (computedState.value === false && hasInvalidFeedback.value) ids.push(invalidFeedbackId.value)\n if (computedState.value === true && hasValidFeedback.value) ids.push(validFeedbackId.value)\n return ids.length > 0 ? ids.join(' ') : null\n})\n\nconst labelShowing = computed(() => !!slots.label || !!props.label || isHorizontal.value)\n\nconst labelComponentProps = computed(() => ({\n label: props.label,\n labelTag: labelTag.value,\n labelId: labelId.value,\n computedLabelFor: computedLabelFor.value,\n isFieldset: isFieldset.value,\n isHorizontal: isHorizontal.value,\n labelColProps: labelColProps.value,\n labelAlignClasses: labelAlignClasses.value,\n labelClasses: labelClasses.value,\n}))\n\nconst contentComponentProps = computed(() => ({\n invalidFeedback: props.invalidFeedback,\n validFeedback: props.validFeedback,\n description: props.description,\n feedbackAriaLive: props.feedbackAriaLive,\n state: computedState.value,\n tooltip: props.tooltip,\n invalidFeedbackId: invalidFeedbackId.value,\n validFeedbackId: validFeedbackId.value,\n descriptionId: descriptionId.value,\n}))\n</script>\n","<template>\n <fieldset\n :id=\"computedId\"\n :disabled=\"props.disabled\"\n :aria-invalid=\"computedAriaInvalid\"\n :aria-labelledby=\"isFieldset && isHorizontal ? labelId : undefined\"\n v-bind=\"$attrs\"\n :class=\"[stateClass, {'was-validated': props.validated}]\"\n class=\"b-form-group\"\n >\n <!-- End of definitions -->\n <BFormRow v-if=\"isHorizontal\">\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BCol v-bind=\"contentColProps\" ref=\"_content\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </BCol>\n </BFormRow>\n <template v-else>\n <div v-if=\"isFloating\" ref=\"_content\" class=\"form-floating\">\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </div>\n <template v-else>\n <BFormGroupLabel\n v-if=\"labelShowing\"\n v-bind=\"labelComponentProps\"\n @legend-click=\"onLegendClick\"\n >\n <template v-if=\"slots.label\" #label>\n <slot name=\"label\" />\n </template>\n </BFormGroupLabel>\n <slot\n :id=\"computedId\"\n :aria-describedby=\"computedAriaDescribedby\"\n :description-id=\"descriptionId\"\n :label-id=\"labelId\"\n />\n <BFormGroupContent v-bind=\"contentComponentProps\">\n <template v-if=\"slots['invalid-feedback']\" #invalid-feedback>\n <slot name=\"invalid-feedback\" />\n </template>\n <template v-if=\"slots['valid-feedback']\" #valid-feedback>\n <slot name=\"valid-feedback\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n </BFormGroupContent>\n </template>\n </template>\n </fieldset>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, toRef, useTemplateRef} from 'vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {attemptFocus, isVisible} from '../../utils/dom'\nimport BCol from '../BContainer/BCol.vue'\nimport BFormRow from '../BForm/BFormRow.vue'\nimport {suffixPropName} from '../../utils/props'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useId} from '../../composables/useId'\nimport type {BFormGroupProps, BFormGroupSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useProvideFormGroupData} from '../../composables/useProvideFormGroupData'\nimport BFormGroupContent from '../BFormGroupContent.vue'\nimport BFormGroupLabel from '../BFormGroupLabel.vue'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst INPUTS = ['input', 'select', 'textarea']\n\nconst _props = withDefaults(defineProps<BFormGroupProps>(), {\n ariaInvalid: undefined,\n contentCols: undefined,\n contentColsLg: undefined,\n contentColsMd: undefined,\n contentColsSm: undefined,\n contentColsXl: undefined,\n description: undefined,\n disabled: false,\n feedbackAriaLive: 'assertive',\n floating: false,\n id: undefined,\n invalidFeedback: undefined,\n label: undefined,\n labelAlign: undefined,\n labelAlignLg: undefined,\n labelAlignMd: undefined,\n labelAlignSm: undefined,\n labelAlignXl: undefined,\n labelClass: undefined,\n labelCols: undefined,\n labelColsLg: undefined,\n labelColsMd: undefined,\n labelColsSm: undefined,\n labelColsXl: undefined,\n labelFor: undefined,\n labelSize: undefined,\n labelVisuallyHidden: false,\n state: null,\n tooltip: false,\n validFeedback: undefined,\n validated: false,\n})\nconst props = useDefaults(_props, 'BFormGroup')\nconst slots = defineSlots<BFormGroupSlots>()\n\nconst computedState = toRef(() => props.state)\nconst computedDisabled = toRef(() => props.disabled)\nconst {singleLabelTargetId} = useProvideFormGroupData({\n state: computedState,\n disabled: computedDisabled,\n})\nconst computedLabelFor = computed(() => props.labelFor ?? singleLabelTargetId.value)\n\nconst breakPoints = ['xs', 'sm', 'md', 'lg', 'xl']\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst getColProps = (props: any, prefix: string) =>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n breakPoints.reduce((result: any, breakpoint: string) => {\n const suffix = suffixPropName(breakpoint === 'xs' ? '' : breakpoint, `${prefix}Cols`)\n let propValue = props[suffix]\n propValue = propValue === '' ? true : propValue || false\n\n if (!(typeof propValue === 'boolean') && propValue !== 'auto') {\n const val = Number.parseInt(propValue)\n propValue = Number.isNaN(val) ? 0 : val\n propValue = propValue > 0 ? propValue : false\n }\n\n if (propValue) {\n if (breakpoint === 'xs') {\n result[typeof propValue === 'boolean' ? 'col' : 'cols'] = propValue\n } else {\n result[breakpoint || (typeof propValue === 'boolean' ? 'col' : 'cols')] = propValue\n }\n }\n return result\n }, {})\n\nconst content = useTemplateRef<HTMLDivElement | InstanceType<typeof BCol> | null>('_content')\n\nconst contentColProps = computed(() => getColProps(props, 'content'))\nconst labelAlignClasses = computed(() =>\n ((props: BFormGroupProps, prefix: string) =>\n breakPoints.reduce((result: string[], breakpoint) => {\n const suffix = suffixPropName(\n breakpoint === 'xs' ? '' : breakpoint,\n `${prefix}Align`\n ) as keyof BFormGroupProps\n const propValue: string = props[suffix] || null\n if (propValue) {\n if (breakpoint === 'xs') {\n result.push(`text-${propValue}`)\n } else {\n result.push(`text-${breakpoint}-${propValue}`)\n }\n }\n return result\n }, []))(props, 'label')\n)\nconst labelColProps = computed(() => getColProps(props, 'label'))\nconst isHorizontal = computed(\n () => Object.keys(contentColProps.value).length > 0 || Object.keys(labelColProps.value).length > 0\n)\nconst isFloating = computed(() => props.floating && !isHorizontal.value)\n\nconst stateClass = useStateClass(computedState)\nconst computedAriaInvalid = useAriaInvalid(() => props.ariaInvalid, computedState)\n\nconst onLegendClick = (event: Readonly<MouseEvent>) => {\n if (computedLabelFor.value || content.value === null) return\n\n const {target} = event\n const tagName = target ? (target as HTMLElement).tagName : ''\n\n if ([...INPUTS, 'a', 'button', 'label'].indexOf(tagName) !== -1) return\n\n // In horizontal mode, content.value is a BCol component instance, not a DOM element\n // Access the DOM element via $el property\n const contentElement =\n isHorizontal.value && content.value && '$el' in content.value\n ? (content.value.$el as HTMLElement)\n : (content.value as HTMLDivElement | null)\n if (!contentElement) return\n\n const inputs = [\n ...contentElement.querySelectorAll(INPUTS.map((v) => `${v}:not([disabled])`).join()),\n ].filter(isVisible)\n const [inp] = inputs\n if (inputs.length === 1 && inp instanceof HTMLElement) {\n attemptFocus(inp)\n }\n}\n\nconst computedId = useId(() => props.id)\nconst labelId = useId(undefined, '_BV_label_')\nconst labelTag = computed(() => (!isFieldset.value ? 'label' : 'legend'))\nconst labelClasses = computed(() => [\n isHorizontal.value ? 'col-form-label' : 'form-label',\n {\n 'bv-no-focus-ring': !isFloating.value && !computedLabelFor.value,\n 'col-form-label': isHorizontal.value || (!isFloating.value && !computedLabelFor.value),\n 'pt-0': !isHorizontal.value && !isFloating.value && !computedLabelFor.value,\n 'd-block': !isHorizontal.value && (isFloating.value || !!computedLabelFor.value),\n [`col-form-label-${props.labelSize}`]: !!props.labelSize,\n 'visually-hidden': props.labelVisuallyHidden,\n },\n isHorizontal.value ? null : labelAlignClasses.value,\n props.labelClass,\n])\n\nconst invalidFeedbackId = useId(undefined, '_BV_feedback_invalid_')\n\nconst validFeedbackId = useId(undefined, '_BV_feedback_valid_')\nconst descriptionId = useId(undefined, '_BV_description_')\n\nconst isFieldset = computed(() => !isFloating.value && !computedLabelFor.value)\n\nconst hasDescription = computed(() => !!slots.description || !!props.description)\nconst hasInvalidFeedback = computed(() => !!slots['invalid-feedback'] || !!props.invalidFeedback)\nconst hasValidFeedback = computed(() => !!slots['valid-feedback'] || !!props.validFeedback)\n\nconst computedAriaDescribedby = computed<string | null>(() => {\n const ids: string[] = []\n if (hasDescription.value) ids.push(descriptionId.value)\n if (computedState.value === false && hasInvalidFeedback.value) ids.push(invalidFeedbackId.value)\n if (computedState.value === true && hasValidFeedback.value) ids.push(validFeedbackId.value)\n return ids.length > 0 ? ids.join(' ') : null\n})\n\nconst labelShowing = computed(() => !!slots.label || !!props.label || isHorizontal.value)\n\nconst labelComponentProps = computed(() => ({\n label: props.label,\n labelTag: labelTag.value,\n labelId: labelId.value,\n computedLabelFor: computedLabelFor.value,\n isFieldset: isFieldset.value,\n isHorizontal: isHorizontal.value,\n labelColProps: labelColProps.value,\n labelAlignClasses: labelAlignClasses.value,\n labelClasses: labelClasses.value,\n}))\n\nconst contentComponentProps = computed(() => ({\n invalidFeedback: props.invalidFeedback,\n validFeedback: props.validFeedback,\n description: props.description,\n feedbackAriaLive: props.feedbackAriaLive,\n state: computedState.value,\n tooltip: props.tooltip,\n invalidFeedbackId: invalidFeedbackId.value,\n validFeedbackId: validFeedbackId.value,\n descriptionId: descriptionId.value,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;AAYA,IAAa,kBAAkB,QAAgB,UAC7C,SAAS,SAAS,WAAW,MAAM,IAAI;;;;;;;;;;;;;;;;;ECsCzC,MAAM,QAAQ,SAAS;EACvB,MAAM,yBAAyB,eAAe,CAAC,CAAC,MAAM,mBAAmB;EACzE,MAAM,uBAAuB,eAAe,CAAC,CAAC,MAAM,iBAAiB;EACrE,MAAM,qBAAqB,eAAe,CAAC,CAAC,MAAM,cAAc;;;IApDtD,uBAAA,SAA0B,QAAA,mBADlC,UAAA,GAAA,YAQuB,8BAAA;;KANpB,IAAI,QAAA;KACJ,aAAW,QAAA;KACX,OAAO,QAAA;KACP,SAAS,QAAA;;KAEV,SAAA,cAA0D,CAA1D,WAA0D,KAAA,QAAA,oBAAA,CAAA,SAAA,CAAzB,gBAAA,gBAAA,QAAA,eAAe,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;IAG1C,qBAAA,SAAwB,QAAA,iBADhC,UAAA,GAAA,YAQqB,4BAAA;;KANlB,IAAI,QAAA;KACJ,aAAW,QAAA;KACX,OAAO,QAAA;KACP,SAAS,QAAA;;KAEV,SAAA,cAAsD,CAAtD,WAAsD,KAAA,QAAA,kBAAA,CAAA,SAAA,CAAvB,gBAAA,gBAAA,QAAA,aAAa,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;IAE7B,mBAAA,SAAsB,QAAA,eAAvC,UAAA,GAAA,YAEY,mBAAA;;KAFyC,IAAI,QAAA;;KACvD,SAAA,cAAiD,CAAjD,WAAiD,K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A,QAAA,aAAA,CAAA,CAAA;;;;GAIjC,GAAA,GAAA,MAAA,UAAA,GAAA,mBA2BW,UAAA,EAAA,KAAA,EAAA,GAAA;IAzBD,aAAA,SADR,UAAA,GAAA,YAQkB,yBARlB,WAQkB,EAAA,KAAA,EAAA,GANR,oBAAA,OAAmB,EACZ,cAAa,CAAA,GAAA,YAAA,EAAA,GAAA,EAAA,GAAA,CAEZ,MAAM,QAAA;KAAQ,MAAA;KAC5B,IAAA,cAAqB,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;IAGzB,WAKE,KAAA,QAAA,WAAA;KAJC,IAAI,MAAA,UAAA;KACJ,iBAAkB,wBAAA;KAClB,eAAgB,MAAA,aAAA;KAChB,SAAU,MAAA,OAAA;;IAEb,YAUoB,2BAAA,eAAA,mBAVO,sBAAA,KAAqB,CAAA,GAAA,YAAA,EAAA,GAAA,EAAA,GAAA;KAC9B,MAAK,sBAAA;MAAuB,MAAA;MAC1C,IAAA,cAAgC,CAAhC,WAAgC,KAAA,QAAA,kBAAA,CAAA,CAAA;;;KAElB,MAAK,oBAAA;MAAqB,MAAA;MACxC,IAAA,cAA8B,CAA9B,WAA8B,KAAA,QAAA,gBAAA,CAAA,CAAA;;;KAEhB,MAAM,cAAA;MAAc,MAAA;MAClC,IAAA,cAA2B,CAA3B,WAA2B,KAAA,QAAA,aAAA,CAAA,CAAA"}
|
|
@@ -22,6 +22,7 @@ var _hoisted_3 = [
|
|
|
22
22
|
"dir",
|
|
23
23
|
"tabindex",
|
|
24
24
|
"aria-label",
|
|
25
|
+
"aria-controls",
|
|
25
26
|
"aria-invalid",
|
|
26
27
|
"aria-required",
|
|
27
28
|
"aria-valuemin",
|
|
@@ -421,7 +422,8 @@ var BFormSpinbutton_default = /* @__PURE__ */ defineComponent({
|
|
|
421
422
|
role: "spinbutton",
|
|
422
423
|
"aria-live": "off",
|
|
423
424
|
"aria-label": unref(props).ariaLabel || void 0,
|
|
424
|
-
"aria-
|
|
425
|
+
"aria-controls": unref(props).ariaControls || void 0,
|
|
426
|
+
"aria-invalid": unref(props).state === false || modelValue.value === null && unref(props).required ? true : void 0,
|
|
425
427
|
"aria-required": unref(props).required ? true : void 0,
|
|
426
428
|
"aria-valuemin": computedMin.value,
|
|
427
429
|
"aria-valuemax": computedMax.value,
|
|
@@ -439,4 +441,4 @@ var BFormSpinbutton_default = /* @__PURE__ */ defineComponent({
|
|
|
439
441
|
//#endregion
|
|
440
442
|
export { BFormSpinbutton_default as t };
|
|
441
443
|
|
|
442
|
-
//# sourceMappingURL=BFormSpinbutton-
|
|
444
|
+
//# sourceMappingURL=BFormSpinbutton-fkVMbQC3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BFormSpinbutton-fkVMbQC3.js","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-controls=\"props.ariaControls || undefined\"\n :aria-invalid=\"\n props.state === false || (modelValue === null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-controls=\"props.ariaControls || undefined\"\n :aria-invalid=\"\n props.state === false || (modelValue === null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6hBA,IAAM,gBAAgB;CACpB,KAAK;CACL,KAAK;CACL,MAAM;CACN,aAAa;CACb,gBAAgB;CAChB,iBAAiB;CACjB,kBAAkB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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B,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,KAAU,IAAI,KAAA;IAEvE,GAAA,CAAA,mBAEM,OAAA,MAAA,iBADA,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,KAAU,IAAI,MAAA,KAAA,CAAK,CAAC,gBAAW,EAAA,GAAA,CAAA,CAAA,GAAA,IAAA,UAAA;IAK/E,WAUO,KAAA,QAVO,QAAA,MAAQ,OAAO,KAAK,MAAI,EAAiC,UAAW,MAAA,OAAA,EAAO,SAUlF,CATL,mBAQS,UART,WACU,QAOD,MAPS,OAAO,QAAM;KAC5B,aAAS,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,IAAA;KACjC,cAAU,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,IAAA;IAEnC,CAAA,GAAA,EAAA,UAAA,GAAA,mBAEM,OAAA,eAAA,mBAFO,QAAA,MAAQ,OAAO,GAAG,CAAA,GAAA,CAC7B,mBAAqC,QAAA,eAAA,mBAAvB,QAAA,MAAQ,OAAO,IAAI,CAAA,GAAA,MAAA,EAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,CAAA,CAAA"}
|
|
@@ -160,7 +160,7 @@ var BFormValidFeedback_default = /* @__PURE__ */ defineComponent({
|
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
setup(__props) {
|
|
163
|
-
const props = useDefaults(__props, "
|
|
163
|
+
const props = useDefaults(__props, "BFormValidFeedback");
|
|
164
164
|
const computedShow = computed(() => props.forceShow === true || props.state === true);
|
|
165
165
|
const computedClasses = computed(() => ({
|
|
166
166
|
"d-block": computedShow.value,
|
|
@@ -190,4 +190,4 @@ var BFormValidFeedback_default = /* @__PURE__ */ defineComponent({
|
|
|
190
190
|
//#endregion
|
|
191
191
|
export { useProvideFormGroupData as a, BFormInvalidFeedback_default as i, BFormText_default as n, BFormRow_default as r, BFormValidFeedback_default as t };
|
|
192
192
|
|
|
193
|
-
//# sourceMappingURL=BFormValidFeedback-
|
|
193
|
+
//# sourceMappingURL=BFormValidFeedback-BTNOXbQ6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormValidFeedback-ClqLRxtH.js","names":[],"sources":["../src/composables/useProvideFormGroupData.ts","../src/components/BForm/BFormInvalidFeedback.vue","../src/components/BForm/BFormInvalidFeedback.vue","../src/components/BForm/BFormRow.vue","../src/components/BForm/BFormRow.vue","../src/components/BForm/BFormText.vue","../src/components/BForm/BFormText.vue","../src/components/BForm/BFormValidFeedback.vue","../src/components/BForm/BFormValidFeedback.vue"],"sourcesContent":["import {computed, onUnmounted, provide, type Ref, shallowRef} from 'vue'\nimport type {ValidationState} from '../types/CommonTypes'\nimport {formGroupKey} from '../utils/keys'\n\nconst useLabelTargetRegistry = () => {\n const labelTargetIds = shallowRef<Readonly<Ref<string | null>>[]>([])\n\n // Track runs in the descendant's setup, so onUnmounted binds to the descendant.\n const track = (idRef: Readonly<Ref<string | null>>) => {\n labelTargetIds.value = [...labelTargetIds.value, idRef]\n onUnmounted(() => {\n labelTargetIds.value = labelTargetIds.value.filter((r: Readonly<Ref<string | null>>) => r !== idRef)\n })\n }\n\n return {labelTargetIds, track}\n}\n\n/**\n * Provides formGroupKey for descendant form controls. Each provider has its own isolated\n * label-target registry: BFormGroup uses the resulting `singleLabelTargetId` to drive its\n * label/legend rendering. Intermediate components (e.g. BFormFloatingLabel) call this with\n * passed-through state/disabled, acting as a boundary — their registry exists but is unused,\n * so descendant claims never reach an outer BFormGroup.\n */\nexport const useProvideFormGroupData = ({\n state,\n disabled,\n}: {\n state: Readonly<Ref<ValidationState | undefined>>\n disabled: Readonly<Ref<boolean>>\n}) => {\n const {labelTargetIds, track} = useLabelTargetRegistry()\n\n provide(formGroupKey, () => ({state, disabled, track}))\n\n // null unless exactly one distinct non-empty id is currently registered.\n const singleLabelTargetId = computed<string | null>(() => {\n let single: string | null = null\n for (const r of labelTargetIds.value) {\n const v = r.value\n if (!v) continue\n if (single !== null && single !== v) return null\n single = v\n }\n return single\n })\n\n return {singleLabelTargetId}\n}\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormInvalidFeedbackProps, BFormInvalidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormInvalidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormInvalidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow || props.state === false)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'invalid-feedback': !props.tooltip,\n 'invalid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormInvalidFeedbackProps, BFormInvalidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormInvalidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormInvalidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow || props.state === false)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'invalid-feedback': !props.tooltip,\n 'invalid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"row d-flex flex-wrap\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormRowProps, BFormRowSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormRowProps>(), {\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BFormRow')\ndefineSlots<BFormRowSlots>()\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"row d-flex flex-wrap\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormRowProps, BFormRowSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormRowProps>(), {\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BFormRow')\ndefineSlots<BFormRowSlots>()\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" :class=\"computedClasses\">\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTextProps, BFormTextSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTextProps>(), {\n id: undefined,\n inline: false,\n tag: 'small',\n text: undefined,\n textVariant: 'body-secondary',\n})\nconst props = useDefaults(_props, 'BFormText')\ndefineSlots<BFormTextSlots>()\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'form-text': !props.inline,\n },\n])\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" :class=\"computedClasses\">\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTextProps, BFormTextSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTextProps>(), {\n id: undefined,\n inline: false,\n tag: 'small',\n text: undefined,\n textVariant: 'body-secondary',\n})\nconst props = useDefaults(_props, 'BFormText')\ndefineSlots<BFormTextSlots>()\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'form-text': !props.inline,\n },\n])\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormValidFeedbackProps, BFormValidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormValidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormValidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow === true || props.state === true)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'valid-feedback': !props.tooltip,\n 'valid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormValidFeedbackProps, BFormValidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormValidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormValidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow === true || props.state === true)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'valid-feedback': !props.tooltip,\n 'valid-tooltip': props.tooltip,\n}))\n</script>\n"],"mappings":";;;;;AAIA,IAAM,+BAA+B;CACnC,MAAM,iBAAiB,WAA2C,CAAC,CAAC;CAGpE,MAAM,SAAS,UAAwC;EACrD,eAAe,QAAQ,CAAC,GAAG,eAAe,OAAO,KAAK;EACtD,kBAAkB;GAChB,eAAe,QAAQ,eAAe,MAAM,QAAQ,MAAoC,MAAM,KAAK;EACrG,CAAC;CACH;CAEA,OAAO;EAAC;EAAgB;CAAK;AAC/B;;;;;;;;AASA,IAAa,2BAA2B,EACtC,OACA,eAII;CACJ,MAAM,EAAC,gBAAgB,UAAS,uBAAuB;CAEvD,QAAQ,qBAAqB;EAAC;EAAO;EAAU;CAAK,EAAE;CActD,OAAO,EAAC,qBAXoB,eAA8B;EACxD,IAAI,SAAwB;EAC5B,KAAK,MAAM,KAAK,eAAe,OAAO;GACpC,MAAM,IAAI,EAAE;GACZ,IAAI,CAAC,GAAG;GACR,IAAI,WAAW,QAAQ,WAAW,GAAG,OAAO;GAC5C,SAAS;EACX;EACA,OAAO;CACT,CAEQ,EAAmB;AAC7B;;;;;;;;;;;;;;;;;;;;;;;;;ECnBA,MAAM,QAAQ,YAAY,SAAQ,sBAAsB;EAGxD,MAAM,eAAe,eAAe,MAAM,aAAa,MAAM,UAAU,KAAK;EAE5E,MAAM,kBAAkB,gBAAgB;GACtC,WAAW,aAAa;GACxB,oBAAoB,CAAC,MAA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AGxD,MAAM,eAAe,eAAe,MAAM,cAAc,QAAQ,MAAM,UAAU,IAAI;EAEpF,MAAM,kBAAkB,gBAAgB;GACtC,WAAW,aAAa;GACxB,kBAAkB,CAAC,MAAM;GACzB,iBAAiB,MAAM;EACzB,EAAE;;GAtCA,OAAA,UAAA,GAAA,YAWY,wBAVL,MAAA,KAAA,CAAK,CAAC,GAAG,GAAA;IACb,IAAI,MAAA,KAAA,CAAK,CAAC;IACV,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,aAAW,MAAA,KAAA,CAAK,CAAC;IACjB,eAAa,MAAA,KAAA,CAAK,CAAC,WAAQ,OAAU,KAAA;IACrC,OAAK,eAAE,gBAAA,KAAe;;IAEvB,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormValidFeedback-BTNOXbQ6.js","names":[],"sources":["../src/composables/useProvideFormGroupData.ts","../src/components/BForm/BFormInvalidFeedback.vue","../src/components/BForm/BFormInvalidFeedback.vue","../src/components/BForm/BFormRow.vue","../src/components/BForm/BFormRow.vue","../src/components/BForm/BFormText.vue","../src/components/BForm/BFormText.vue","../src/components/BForm/BFormValidFeedback.vue","../src/components/BForm/BFormValidFeedback.vue"],"sourcesContent":["import {computed, onUnmounted, provide, type Ref, shallowRef} from 'vue'\nimport type {ValidationState} from '../types/CommonTypes'\nimport {formGroupKey} from '../utils/keys'\n\nconst useLabelTargetRegistry = () => {\n const labelTargetIds = shallowRef<Readonly<Ref<string | null>>[]>([])\n\n // Track runs in the descendant's setup, so onUnmounted binds to the descendant.\n const track = (idRef: Readonly<Ref<string | null>>) => {\n labelTargetIds.value = [...labelTargetIds.value, idRef]\n onUnmounted(() => {\n labelTargetIds.value = labelTargetIds.value.filter((r: Readonly<Ref<string | null>>) => r !== idRef)\n })\n }\n\n return {labelTargetIds, track}\n}\n\n/**\n * Provides formGroupKey for descendant form controls. Each provider has its own isolated\n * label-target registry: BFormGroup uses the resulting `singleLabelTargetId` to drive its\n * label/legend rendering. Intermediate components (e.g. BFormFloatingLabel) call this with\n * passed-through state/disabled, acting as a boundary — their registry exists but is unused,\n * so descendant claims never reach an outer BFormGroup.\n */\nexport const useProvideFormGroupData = ({\n state,\n disabled,\n}: {\n state: Readonly<Ref<ValidationState | undefined>>\n disabled: Readonly<Ref<boolean>>\n}) => {\n const {labelTargetIds, track} = useLabelTargetRegistry()\n\n provide(formGroupKey, () => ({state, disabled, track}))\n\n // null unless exactly one distinct non-empty id is currently registered.\n const singleLabelTargetId = computed<string | null>(() => {\n let single: string | null = null\n for (const r of labelTargetIds.value) {\n const v = r.value\n if (!v) continue\n if (single !== null && single !== v) return null\n single = v\n }\n return single\n })\n\n return {singleLabelTargetId}\n}\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormInvalidFeedbackProps, BFormInvalidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormInvalidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormInvalidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow || props.state === false)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'invalid-feedback': !props.tooltip,\n 'invalid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormInvalidFeedbackProps, BFormInvalidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormInvalidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormInvalidFeedback')\ndefineSlots<BFormInvalidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow || props.state === false)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'invalid-feedback': !props.tooltip,\n 'invalid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"row d-flex flex-wrap\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormRowProps, BFormRowSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormRowProps>(), {\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BFormRow')\ndefineSlots<BFormRowSlots>()\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"row d-flex flex-wrap\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormRowProps, BFormRowSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormRowProps>(), {\n tag: 'div',\n})\nconst props = useDefaults(_props, 'BFormRow')\ndefineSlots<BFormRowSlots>()\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" :class=\"computedClasses\">\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTextProps, BFormTextSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTextProps>(), {\n id: undefined,\n inline: false,\n tag: 'small',\n text: undefined,\n textVariant: 'body-secondary',\n})\nconst props = useDefaults(_props, 'BFormText')\ndefineSlots<BFormTextSlots>()\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'form-text': !props.inline,\n },\n])\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" :class=\"computedClasses\">\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport type {BFormTextProps, BFormTextSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormTextProps>(), {\n id: undefined,\n inline: false,\n tag: 'small',\n text: undefined,\n textVariant: 'body-secondary',\n})\nconst props = useDefaults(_props, 'BFormText')\ndefineSlots<BFormTextSlots>()\n\nconst colorClasses = useColorVariantClasses(props)\nconst computedClasses = computed(() => [\n colorClasses.value,\n {\n 'form-text': !props.inline,\n },\n])\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormValidFeedbackProps, BFormValidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormValidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormValidFeedback')\ndefineSlots<BFormValidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow === true || props.state === true)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'valid-feedback': !props.tooltip,\n 'valid-tooltip': props.tooltip,\n}))\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"props.id\"\n :role=\"props.role\"\n :aria-live=\"props.ariaLive\"\n :aria-atomic=\"props.ariaLive ? true : undefined\"\n :class=\"computedClasses\"\n >\n <slot>\n {{ props.text }}\n </slot>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BFormValidFeedbackProps, BFormValidFeedbackSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormValidFeedbackProps>(), {\n ariaLive: undefined,\n forceShow: false,\n id: undefined,\n role: undefined,\n state: null,\n tag: 'div',\n text: undefined,\n tooltip: false,\n})\nconst props = useDefaults(_props, 'BFormValidFeedback')\ndefineSlots<BFormValidFeedbackSlots>()\n\nconst computedShow = computed(() => props.forceShow === true || props.state === true)\n\nconst computedClasses = computed(() => ({\n 'd-block': computedShow.value,\n 'valid-feedback': !props.tooltip,\n 'valid-tooltip': props.tooltip,\n}))\n</script>\n"],"mappings":";;;;;AAIA,IAAM,+BAA+B;CACnC,MAAM,iBAAiB,WAA2C,CAAC,CAAC;CAGpE,MAAM,SAAS,UAAwC;EACrD,eAAe,QAAQ,CAAC,GAAG,eAAe,OAAO,KAAK;EACtD,kBAAkB;GAChB,eAAe,QAAQ,eAAe,MAAM,QAAQ,MAAoC,MAAM,KAAK;EACrG,CAAC;CACH;CAEA,OAAO;EAAC;EAAgB;CAAK;AAC/B;;;;;;;;AASA,IAAa,2BAA2B,EACtC,OACA,eAII;CACJ,MAAM,EAAC,gBAAgB,UAAS,uBAAuB;CAEvD,QAAQ,qBAAqB;EAAC;EAAO;EAAU;CAAK,EAAE;CActD,OAAO,EAAC,qBAXoB,eAA8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Aa,CAAC,MAAM,OACtB,CACF,CAAC;;GA7BC,OAAA,UAAA,GAAA,YAIY,wBAJI,MAAA,KAAA,CAAK,CAAC,GAAG,GAAA;IAAG,IAAI,MAAA,KAAA,CAAK,CAAC;IAAK,OAAK,eAAE,gBAAA,KAAe;;IAC/D,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE2BnB,MAAM,QAAQ,YAAY,SAAQ,oBAAoB;EAGtD,MAAM,eAAe,eAAe,MAAM,cAAc,QAAQ,MAAM,UAAU,IAAI;EAEpF,MAAM,kBAAkB,gBAAgB;GACtC,WAAW,aAAa;GACxB,kBAAkB,CAAC,MAAM;GACzB,iBAAiB,MAAM;EACzB,EAAE;;GAtCA,OAAA,UAAA,GAAA,YAWY,wBAVL,MAAA,KAAA,CAAK,CAAC,GAAG,GAAA;IACb,IAAI,MAAA,KAAA,CAAK,CAAC;IACV,MAAM,MAAA,KAAA,CAAK,CAAC;IACZ,aAAW,MAAA,KAAA,CAAK,CAAC;IACjB,eAAa,MAAA,KAAA,CAAK,CAAC,WAAQ,OAAU,KAAA;IACrC,OAAK,eAAE,gBAAA,KAAe;;IAEvB,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -266,13 +266,13 @@ var BTabs_default = /* @__PURE__ */ defineComponent({
|
|
|
266
266
|
const tabElementsArray = ref([]);
|
|
267
267
|
const isChildActive = ref(false);
|
|
268
268
|
const initialIds = ref([]);
|
|
269
|
-
const
|
|
269
|
+
const selectedTabHasExplicitId = ref(false);
|
|
270
270
|
const updateTabElementsArray = () => {
|
|
271
271
|
const tabElements = flattenFragments(slots.default?.({}) ?? []);
|
|
272
272
|
tabElementsArray.value = (Array.isArray(tabElements) ? tabElements : [tabElements]).filter((tab) => tab.type === BTab_default);
|
|
273
273
|
if (initialIds.value.length === 0) {
|
|
274
274
|
initialIds.value = tabElementsArray.value.map((tab) => unref(useId$1(() => tab.props?.id, "tabpane")));
|
|
275
|
-
|
|
275
|
+
selectedTabHasExplicitId.value = activeIndex.value > -1 && tabElementsArray.value[activeIndex.value]?.props?.id !== void 0;
|
|
276
276
|
}
|
|
277
277
|
isChildActive.value = tabElementsArray.value.some((tab) => tab.props?.active !== void 0 && tab.props?.active !== false);
|
|
278
278
|
};
|
|
@@ -332,7 +332,7 @@ var BTabs_default = /* @__PURE__ */ defineComponent({
|
|
|
332
332
|
let updateInitialActiveIndex = false;
|
|
333
333
|
let updateInitialActiveId = false;
|
|
334
334
|
let delayedTabSelection = false;
|
|
335
|
-
if (activeIndex.value > -1 && !activeId.value && !
|
|
335
|
+
if (activeIndex.value > -1 && !activeId.value && !selectedTabHasExplicitId.value && tabElementsArray.value.length > 0) {
|
|
336
336
|
delayedTabSelection = true;
|
|
337
337
|
updateInitialActiveId = true;
|
|
338
338
|
} else if (activeIndex.value === -1 && activeId.value) {
|
|
@@ -594,4 +594,4 @@ var BTabs_default = /* @__PURE__ */ defineComponent({
|
|
|
594
594
|
//#endregion
|
|
595
595
|
export { BTab_default as n, BTabs_default as t };
|
|
596
596
|
|
|
597
|
-
//# sourceMappingURL=BTabs-
|
|
597
|
+
//# sourceMappingURL=BTabs-BKmkVWrZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BTabs-BKmkVWrZ.js","names":[],"sources":["../src/components/BTabs/BTab.vue","../src/components/BTabs/BTab.vue","../src/components/BTabsTabContent.vue","../src/components/BTabsTabContent.vue","../src/components/BTabs/BTabs.vue","../src/components/BTabs/BTabs.vue"],"sourcesContent":["<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n ref=\"_el\"\n class=\"tab-pane\"\n :class=\"computedClasses\"\n role=\"tabpanel\"\n :aria-labelledby=\"computedButtonId\"\n v-bind=\"processedAttrs\"\n >\n <slot v-if=\"showSlot\" />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, onUnmounted, ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {TabType} from '../../types/Tab'\nimport type {BTabProps} from '../../types/ComponentProps'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport type {BTabSlots} from '../../types/ComponentSlots'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BTabProps, 'active'>>(), {\n buttonId: undefined,\n disabled: false,\n id: undefined,\n lazy: undefined,\n unmountLazy: undefined,\n noBody: false,\n tag: 'div',\n title: undefined,\n titleItemClass: undefined,\n titleLinkAttrs: undefined,\n titleLinkClass: undefined,\n})\nconst props = useDefaults(_props, 'BTab')\nconst slots = defineSlots<BTabSlots>()\nconst attrs = useAttrs()\n\nconst activeModel = defineModel<Exclude<BTabProps['active'], undefined>>('active', {\n default: false,\n})\n\nconst parentData = inject(tabsInjectionKey, null)\n\nconst localId = ref(props.id)\nconst internalId = useId('', 'tabpane')\nconst computedId = computed(() => props.id ?? localId.value ?? internalId.value)\nconst computedButtonId = useId(() => props.buttonId, 'tab')\n\nconst lazyRenderCompleted = ref(false)\nconst el = useTemplateRef('_el')\n\nconst processedAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {onClick: _, ...tabAttrs} = attrs\n return tabAttrs\n})\n\nfunction updateTab() {\n if (!parentData) return\n const newId = parentData.registerTab(\n computed(\n () =>\n ({\n internalId: internalId.value,\n id: computedId.value,\n active: activeModel.value,\n buttonId: computedButtonId.value,\n disabled: props.disabled,\n title: props.title,\n titleComponent: slots.title,\n titleItemClass: props.titleItemClass,\n titleLinkAttrs: props.titleLinkAttrs,\n titleLinkClass: props.titleLinkClass,\n onClick: attrs.onClick,\n el,\n }) as TabType\n )\n )\n if (newId !== localId.value) {\n localId.value = newId\n }\n}\n\nif (parentData) {\n updateTab()\n if (activeModel.value) {\n parentData.activateTab(internalId.value)\n }\n}\n\nonUnmounted(() => {\n if (!parentData) return\n parentData.unregisterTab(internalId.value)\n})\n\nconst isActive = computed(() => parentData?.activeId.value === computedId.value)\nconst show = ref(isActive.value)\n\nconst computedLazy = computed(() => !!(parentData?.lazy.value || props.lazy))\n\nconst computedActive = computed(() => isActive.value && !props.disabled)\nconst showSlot = computed(\n () =>\n computedActive.value ||\n !computedLazy.value ||\n (computedLazy.value && !props.unmountLazy && lazyRenderCompleted.value)\n)\n\nwatch(showSlot, (shown) => {\n if (shown && !lazyRenderCompleted.value) lazyRenderCompleted.value = true\n})\n\nwatch(isActive, (active) => {\n if (active) {\n activeModel.value = true\n setTimeout(() => {\n show.value = true\n }, 0)\n return\n }\n show.value = false\n activeModel.value = false\n})\n\nwatch(activeModel, (active) => {\n if (props.disabled) {\n activeModel.value = false\n return\n }\n if (!parentData) return\n if (!active) {\n if (isActive.value) {\n parentData.activateTab(undefined)\n }\n return\n }\n if (!isActive.value) {\n parentData.activateTab(internalId.value)\n }\n})\n\nconst computedClasses = computed(() => [\n {\n 'active': isActive.value,\n 'show': show.value,\n 'card-body': parentData?.card.value && props.noBody === false,\n 'fade': !parentData?.noFade.value,\n },\n show.value ? parentData?.activeTabClass.value : parentData?.inactiveTabClass.value,\n parentData?.tabClass.value,\n])\n\ndefineExpose({\n activate: () => {\n activeModel.value = true\n },\n deactivate: () => {\n activeModel.value = false\n },\n})\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n ref=\"_el\"\n class=\"tab-pane\"\n :class=\"computedClasses\"\n role=\"tabpanel\"\n :aria-labelledby=\"computedButtonId\"\n v-bind=\"processedAttrs\"\n >\n <slot v-if=\"showSlot\" />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, onUnmounted, ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {TabType} from '../../types/Tab'\nimport type {BTabProps} from '../../types/ComponentProps'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport type {BTabSlots} from '../../types/ComponentSlots'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BTabProps, 'active'>>(), {\n buttonId: undefined,\n disabled: false,\n id: undefined,\n lazy: undefined,\n unmountLazy: undefined,\n noBody: false,\n tag: 'div',\n title: undefined,\n titleItemClass: undefined,\n titleLinkAttrs: undefined,\n titleLinkClass: undefined,\n})\nconst props = useDefaults(_props, 'BTab')\nconst slots = defineSlots<BTabSlots>()\nconst attrs = useAttrs()\n\nconst activeModel = defineModel<Exclude<BTabProps['active'], undefined>>('active', {\n default: false,\n})\n\nconst parentData = inject(tabsInjectionKey, null)\n\nconst localId = ref(props.id)\nconst internalId = useId('', 'tabpane')\nconst computedId = computed(() => props.id ?? localId.value ?? internalId.value)\nconst computedButtonId = useId(() => props.buttonId, 'tab')\n\nconst lazyRenderCompleted = ref(false)\nconst el = useTemplateRef('_el')\n\nconst processedAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {onClick: _, ...tabAttrs} = attrs\n return tabAttrs\n})\n\nfunction updateTab() {\n if (!parentData) return\n const newId = parentData.registerTab(\n computed(\n () =>\n ({\n internalId: internalId.value,\n id: computedId.value,\n active: activeModel.value,\n buttonId: computedButtonId.value,\n disabled: props.disabled,\n title: props.title,\n titleComponent: slots.title,\n titleItemClass: props.titleItemClass,\n titleLinkAttrs: props.titleLinkAttrs,\n titleLinkClass: props.titleLinkClass,\n onClick: attrs.onClick,\n el,\n }) as TabType\n )\n )\n if (newId !== localId.value) {\n localId.value = newId\n }\n}\n\nif (parentData) {\n updateTab()\n if (activeModel.value) {\n parentData.activateTab(internalId.value)\n }\n}\n\nonUnmounted(() => {\n if (!parentData) return\n parentData.unregisterTab(internalId.value)\n})\n\nconst isActive = computed(() => parentData?.activeId.value === computedId.value)\nconst show = ref(isActive.value)\n\nconst computedLazy = computed(() => !!(parentData?.lazy.value || props.lazy))\n\nconst computedActive = computed(() => isActive.value && !props.disabled)\nconst showSlot = computed(\n () =>\n computedActive.value ||\n !computedLazy.value ||\n (computedLazy.value && !props.unmountLazy && lazyRenderCompleted.value)\n)\n\nwatch(showSlot, (shown) => {\n if (shown && !lazyRenderCompleted.value) lazyRenderCompleted.value = true\n})\n\nwatch(isActive, (active) => {\n if (active) {\n activeModel.value = true\n setTimeout(() => {\n show.value = true\n }, 0)\n return\n }\n show.value = false\n activeModel.value = false\n})\n\nwatch(activeModel, (active) => {\n if (props.disabled) {\n activeModel.value = false\n return\n }\n if (!parentData) return\n if (!active) {\n if (isActive.value) {\n parentData.activateTab(undefined)\n }\n return\n }\n if (!isActive.value) {\n parentData.activateTab(internalId.value)\n }\n})\n\nconst computedClasses = computed(() => [\n {\n 'active': isActive.value,\n 'show': show.value,\n 'card-body': parentData?.card.value && props.noBody === false,\n 'fade': !parentData?.noFade.value,\n },\n show.value ? parentData?.activeTabClass.value : parentData?.inactiveTabClass.value,\n parentData?.tabClass.value,\n])\n\ndefineExpose({\n activate: () => {\n activeModel.value = true\n },\n deactivate: () => {\n activeModel.value = false\n },\n})\n</script>\n","<template>\n <div class=\"tab-content\" :class=\"contentClass\">\n <slot />\n <div v-if=\"showEmpty\" key=\"bv-empty-tab\" class=\"tab-pane active\" :class=\"{'card-body': card}\">\n <slot name=\"empty\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\n\ndefineProps<{\n contentClass: ClassValue | undefined\n showEmpty: boolean\n card: boolean\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n default?: (props: Record<string, never>) => any\n empty?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <div class=\"tab-content\" :class=\"contentClass\">\n <slot />\n <div v-if=\"showEmpty\" key=\"bv-empty-tab\" class=\"tab-pane active\" :class=\"{'card-body': card}\">\n <slot name=\"empty\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\n\ndefineProps<{\n contentClass: ClassValue | undefined\n showEmpty: boolean\n card: boolean\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n default?: (props: Record<string, never>) => any\n empty?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" class=\"tabs\" :class=\"computedClasses\">\n <BTabsTabContent v-if=\"props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n <div\n :class=\"[\n props.navWrapperClass,\n {'card-header': props.card, 'ms-auto': vertical && props.end},\n ]\"\n >\n <ul\n class=\"nav\"\n :class=\"[navTabsClasses, props.navClass]\"\n role=\"tablist\"\n :aria-orientation=\"props.vertical ? 'vertical' : 'horizontal'\"\n >\n <slot name=\"tabs-start\" />\n <li\n v-for=\"(tab, idx) in tabs\"\n :key=\"tab.id ?? tab.internalId\"\n class=\"nav-item\"\n :class=\"tab.titleItemClass\"\n role=\"presentation\"\n >\n <button\n :id=\"tab.buttonId\"\n class=\"nav-link\"\n :class=\"[tab.navItemClasses, tab.titleLinkClass, tab.active ? props.activeNavLinkClass : props.inactiveNavLinkClass]\"\n role=\"tab\"\n :aria-controls=\"tab.id\"\n :aria-selected=\"tab.active\"\n :disabled=\"tab.disabled\"\n :tabindex=\"props.noKeyNav ? undefined : tab.active ? undefined : -1\"\n type=\"button\"\n v-bind=\"tab.titleLinkAttrs\"\n @keydown.left.exact=\"!props.vertical && keynav($event, -1)\"\n @keydown.left.shift=\"!props.vertical && keynav($event, -999)\"\n @keydown.up.exact=\"props.vertical && keynav($event, -1)\"\n @keydown.up.shift=\"props.vertical && keynav($event, -999)\"\n @keydown.right.exact=\"!props.vertical && keynav($event, 1)\"\n @keydown.right.shift=\"!props.vertical && keynav($event, 999)\"\n @keydown.down.exact=\"props.vertical && keynav($event, 1)\"\n @keydown.down.shift=\"props.vertical && keynav($event, 999)\"\n @keydown.page-up=\"keynav($event, -999)\"\n @keydown.page-down=\"keynav($event, 999)\"\n @keydown.home=\"keynav($event, -999)\"\n @keydown.end=\"keynav($event, 999)\"\n @click.stop=\"(e) => handleClick(e, idx)\"\n >\n <component :is=\"tab.titleComponent\" v-if=\"tab.titleComponent\" />\n <template v-else>\n {{ tab.title }}\n </template>\n </button>\n </li>\n <slot name=\"tabs-end\" />\n </ul>\n </div>\n <BTabsTabContent v-if=\"!props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n type Ref,\n ref,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {BvEvent} from '../../utils/classes'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useId} from '../../composables/useId'\nimport type {TabType, BTabsProps, BTabsEmits, BTabsSlots} from '../../types'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {getSafeDocument, sortSlotElementsByPosition} from '../../utils/dom'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BTab from './BTab.vue'\nimport BTabsTabContent from '../BTabsTabContent.vue'\n\nconst _props = withDefaults(defineProps<Omit<BTabsProps, 'modelValue' | 'activeIndex'>>(), {\n activeNavItemClass: undefined,\n activeNavLinkClass: undefined,\n activeTabClass: undefined,\n align: undefined,\n card: false,\n contentClass: undefined,\n end: false,\n fill: false,\n id: undefined,\n inactiveNavItemClass: undefined,\n inactiveNavLinkClass: undefined,\n inactiveTabClass: undefined,\n justified: false,\n lazy: false,\n navClass: undefined,\n navItemClass: undefined,\n navWrapperClass: undefined,\n noFade: false,\n noKeyNav: false,\n noNavStyle: false,\n pills: false,\n small: false,\n tag: 'div',\n tabClass: undefined,\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BTabs')\nconst emit = defineEmits<BTabsEmits>()\nconst slots = defineSlots<BTabsSlots>()\n\nconst activeIndex = defineModel<Exclude<BTabsProps['index'], undefined>>('index', {\n default: -1,\n})\nconst activeId = defineModel<BTabsProps['modelValue']>({\n default: undefined,\n})\n\nconst tabsInternal = ref<Ref<TabType>[]>([])\n\nconst tabElementsArray = ref<VNode[]>([])\n\nconst isChildActive = ref(false)\nconst initialIds = ref<string[]>([])\nconst selectedTabHasExplicitId = ref(false)\n\nconst updateTabElementsArray = () => {\n const tabElements = flattenFragments(slots.default?.({}) ?? [])\n tabElementsArray.value = (Array.isArray(tabElements) ? tabElements : [tabElements]).filter(\n (tab) => tab.type === BTab\n )\n // only get the ids once in setup context\n if (initialIds.value.length === 0) {\n // we need to get the ids of the tabs before they are registered. After that we use the internalId for the tabpane\n initialIds.value = tabElementsArray.value.map((tab) =>\n unref(useId(() => tab.props?.id, 'tabpane'))\n )\n // Whether the *initially selected* tab carries an explicit ID.\n //\n // Only that tab matters. The delayed-selection path below exists because\n // a generated ID is not final until the child registers; an explicit ID\n // is final immediately. Asking `.some()` across every tab got this wrong\n // for a mixed list — a single ID-bearing sibling made an ID-less target\n // look safe, so the ID was read pre-mount, failed to match after\n // registration, and the selection fell back to the first tab (#2773).\n selectedTabHasExplicitId.value =\n activeIndex.value > -1 && tabElementsArray.value[activeIndex.value]?.props?.id !== undefined\n }\n isChildActive.value = tabElementsArray.value.some(\n (tab) => tab.props?.active !== undefined && tab.props?.active !== false\n )\n}\nupdateTabElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateTabElementsArray()\n nextTick(() => {\n sortTabs()\n })\n }\n)\n\nconst tabs = computed(() => {\n if (tabsInternal.value.length === 0) {\n // fail back on the slot elements, the children haven't been registered yet\n const _activeIndex = tabElementsArray.value.findIndex(\n (tab) =>\n (tab.props?.active !== undefined &&\n (tab.props.disabled === false || tab.props.disabled === undefined)) ||\n (activeId.value && tab.props?.id === activeId.value)\n )\n return tabElementsArray.value.map((tab, index) => {\n const active =\n _activeIndex !== -1\n ? index === _activeIndex\n : activeIndex.value > -1\n ? index === activeIndex.value\n : index === 0\n return {\n id: tab.props?.id ?? initialIds.value[index],\n internalId: `premount-${index}`, // temporary id for the tab\n buttonId: tab.props?.buttonId,\n disabled: tab.props?.disabled,\n title: tab.props?.title,\n titleComponent: (tab.children as {title: unknown})?.title,\n titleItemClass: tab.props?.titleItemClass,\n titleLinkAttrs: tab.props?.titleLinkAttrs,\n titleLinkClass: tab.props?.titleLinkClass,\n onClick: tab.props?.onClick,\n active,\n navItemClasses: [\n {\n active,\n disabled: !(tab.props?.disabled === false || tab.props?.disabled === undefined),\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n }\n return tabsInternal.value.map((_tab) => {\n const tab = unref(_tab)\n const active = tab.id === activeId.value\n\n return {\n ...tab,\n active,\n navItemClasses: [\n {\n active,\n disabled: tab.disabled,\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n})\n\nlet initialized = false\nlet updateInitialActiveIndex = false\nlet updateInitialActiveId = false\nlet delayedTabSelection = false\n\n// Check if we need to delay tab selection:\n// - We have v-model:index (activeIndex) but no v-model (activeId)\n// - AND the selected tab has no explicit ID (so it will use a generated one)\n// - AND we have tabs to select from\nconst needsDelayedSelection =\n activeIndex.value > -1 &&\n !activeId.value &&\n !selectedTabHasExplicitId.value &&\n tabElementsArray.value.length > 0\n\nif (needsDelayedSelection) {\n // Delay tab selection until children register with their generated IDs\n delayedTabSelection = true\n updateInitialActiveId = true\n} else if (activeIndex.value === -1 && activeId.value) {\n if (tabs.value.findIndex((t) => t.id === activeId.value) !== -1) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n } else {\n updateInitialActiveIndex = true\n }\n} else if (activeIndex.value > -1 && !activeId.value) {\n if (tabs.value[activeIndex.value]?.id) {\n activeId.value = tabs.value[activeIndex.value]?.id\n } else {\n updateInitialActiveId = true\n }\n} else if (activeIndex.value === -1 && !activeId.value && !isChildActive.value) {\n activeIndex.value = tabs.value.findIndex((t) => t.disabled === undefined || t.disabled === false)\n activeId.value = tabs.value[activeIndex.value]?.id\n} else if (activeIndex.value === -1 && !activeId.value && isChildActive.value) {\n activeIndex.value = tabs.value.findIndex(\n (t) =>\n t.active !== undefined &&\n t.active !== false &&\n (t.disabled === undefined || t.disabled === false)\n )\n activeId.value = tabs.value[activeIndex.value]?.id\n}\n\nfunction updateInitialIndexAndId() {\n // we get the computedIds after registering the tabs\n if (updateInitialActiveIndex) {\n const index = tabs.value.findIndex((t) => t.id === activeId.value)\n if (index !== -1) {\n nextTick(() => {\n activeIndex.value = index\n updateInitialActiveIndex = false\n })\n }\n }\n if (updateInitialActiveId) {\n // Wait for tabs to be registered if we're doing delayed selection\n if (delayedTabSelection && tabsInternal.value.length === 0) {\n // Children haven't registered yet, wait\n return\n }\n if (activeIndex.value > -1 && tabs.value[activeIndex.value]?.id) {\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n updateInitialActiveId = false\n delayedTabSelection = false\n })\n }\n }\n}\n\nupdateInitialIndexAndId()\n\nconst showEmpty = computed(() => !(tabs?.value && tabs.value.length > 0))\n\nconst tabContentProps = computed(() => ({\n contentClass: props.contentClass,\n showEmpty: showEmpty.value,\n card: props.card,\n}))\n\nconst computedClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-items-start': props.vertical,\n}))\n\nconst alignment = useAlignment(() => props.align)\n\nconst navTabsClasses = computed(() => ({\n 'nav-pills': props.pills,\n 'nav-underline': props.underline,\n 'flex-column me-3': props.vertical,\n [alignment.value]: props.align !== undefined,\n 'nav-fill': props.fill,\n 'card-header-tabs': props.card && !props.pills && !props.underline,\n 'card-header-pills': props.card && props.pills,\n 'nav-justified': props.justified,\n 'nav-tabs': !props.noNavStyle && !props.pills && !props.underline,\n 'small': props.small,\n}))\n\nconst handleClick = (event: Readonly<MouseEvent>, index: number) => {\n if (\n index >= 0 &&\n !tabs.value[index]?.disabled &&\n tabs.value[index]?.onClick &&\n typeof tabs.value[index].onClick === 'function'\n ) {\n tabs.value[index].onClick?.(event)\n if (event.defaultPrevented) {\n getSafeDocument()?.getElementById(tabs.value[index].buttonId)?.blur()\n return\n }\n }\n activeIndex.value = index\n}\n\nconst keynav = (e: Event, direction: number) => {\n if (tabs.value.length <= 0 || props.noKeyNav) return\n e.preventDefault()\n e.stopPropagation()\n activeIndex.value = nextIndex(activeIndex.value + direction, direction)\n nextTick(() => {\n if (activeIndex.value >= 0) {\n getSafeDocument()?.getElementById(tabs.value[activeIndex.value]?.buttonId)?.focus()\n }\n })\n}\n\nconst nextIndex = (start: number, direction: number) => {\n let index = start\n let minIdx = -1\n let maxIdx = -1\n\n for (let i = 0; i < tabs.value.length; i++) {\n if (!tabs.value[i]?.disabled) {\n if (minIdx === -1) minIdx = i\n maxIdx = i\n }\n }\n\n while (index >= minIdx && index <= maxIdx && tabs.value[index]?.disabled) {\n index += direction\n }\n\n if (index < minIdx) index = minIdx\n if (index > maxIdx) index = maxIdx\n\n return index\n}\n\nlet previousIndex: number | undefined\nlet isReverting = false\nwatch(activeIndex, (newValue, oldValue) => {\n // Early exit if there are no tabs or all tabs are disabled\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n\n // If we're reverting due to a prevented event, don't process further\n if (isReverting) {\n isReverting = false\n return\n }\n // Calculate the next valid index\n const index = nextIndex(newValue, newValue > oldValue ? 1 : -1)\n if (index !== newValue) {\n // If the index is not the same as the new value, set the previous index to the old value\n // this is to prevent the event from being emitted twice\n previousIndex = oldValue\n activeIndex.value = index\n return\n }\n // Emit the activate-tab event\n const tabEvent = new BvEvent('activate-tab', {cancelable: true})\n emit('activate-tab', {\n newTabId: tabs.value[index]?.id,\n prevTabId: tabs.value[previousIndex ?? oldValue]?.id,\n newTabIndex: index,\n prevTabIndex: previousIndex ?? oldValue,\n event: tabEvent,\n })\n // If the event is prevented, revert to the previous index\n if (tabEvent.defaultPrevented) {\n isReverting = true\n const prev = previousIndex ?? oldValue ?? nextIndex(0, 1)\n previousIndex = undefined\n // Update the active id this will also trigger the activeId watch which will update the activeIndex\n // this is to make sure we handle case that starts with id change.\n if (activeId.value !== tabs.value[prev]?.id) {\n activeId.value = tabs.value[prev]?.id\n }\n nextTick(() => {\n if (prev >= 0) {\n getSafeDocument()?.getElementById(tabs.value[prev]?.buttonId)?.focus()\n }\n })\n return\n }\n\n // Update the active id\n if (activeId.value !== tabs.value[index]?.id) {\n activeId.value = tabs.value[index]?.id\n }\n previousIndex = undefined\n})\n\nwatch(activeId, (newValue, oldValue) => {\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n const index = tabs.value.findIndex((t) => t.id === newValue)\n // If the new tab is the same as the current tab, do nothing\n if (index === activeIndex.value) return\n const oldIndex = tabs.value.findIndex((t) => t.id === oldValue)\n // If the new tab is disabled, find the next enabled tab\n if (tabs.value[index]?.disabled) {\n // activeIndex watcher will update the activeId to the next enabled tab\n activeIndex.value = nextIndex(index, index > oldIndex ? 1 : -1)\n return\n }\n // If the new tab is not found, find the first enabled tab\n if (index === -1) {\n // activeIndex watcher will update the activeId to the first enabled tab\n activeIndex.value = nextIndex(0, 1)\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n })\n return\n }\n // change to the next tab\n activeIndex.value = index\n})\n\nconst registerTab = (tab: Ref<TabType>) => {\n const idx = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n if (idx === -1) {\n tabsInternal.value.push(tab)\n if (initialized) {\n nextTick(() => {\n sortTabs()\n })\n } else {\n // If we're doing delayed tab selection, try to update now that a tab has registered\n if (delayedTabSelection) {\n nextTick(() => {\n updateInitialIndexAndId()\n })\n }\n }\n } else {\n tabsInternal.value[idx] = tab\n if (initialized) {\n // sort just in case the tab was moved\n sortTabs()\n }\n }\n const idx2 = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n return tab.value.id ?? (!initialized ? initialIds.value[idx2] : tab.value.internalId)\n}\n\nonMounted(() => {\n updateInitialIndexAndId()\n sortTabs()\n initialized = true\n})\n\nconst sortTabs = () => {\n tabsInternal.value.sort((a, b) => sortSlotElementsByPosition(a.value.el.value, b.value.el.value))\n if (\n activeId.value &&\n activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value)\n ) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n }\n}\n\nconst unregisterTab = (id: string) => {\n tabsInternal.value = tabsInternal.value.filter((t) => t.value.internalId !== id)\n}\n\nprovide(tabsInjectionKey, {\n lazy: toRef(() => props.lazy),\n card: toRef(() => props.card),\n noFade: toRef(() => props.noFade),\n activeTabClass: toRef(() => props.activeTabClass),\n inactiveTabClass: toRef(() => props.inactiveTabClass),\n tabClass: toRef(() => props.tabClass),\n registerTab,\n unregisterTab,\n activeId,\n activateTab: (internalId) => {\n const idx = tabs.value.findIndex((t) => t.internalId === internalId)\n if (internalId === undefined || idx === -1) {\n activeIndex.value = nextIndex(0, 1)\n return\n }\n activeIndex.value = idx\n },\n})\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" class=\"tabs\" :class=\"computedClasses\">\n <BTabsTabContent v-if=\"props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n <div\n :class=\"[\n props.navWrapperClass,\n {'card-header': props.card, 'ms-auto': vertical && props.end},\n ]\"\n >\n <ul\n class=\"nav\"\n :class=\"[navTabsClasses, props.navClass]\"\n role=\"tablist\"\n :aria-orientation=\"props.vertical ? 'vertical' : 'horizontal'\"\n >\n <slot name=\"tabs-start\" />\n <li\n v-for=\"(tab, idx) in tabs\"\n :key=\"tab.id ?? tab.internalId\"\n class=\"nav-item\"\n :class=\"tab.titleItemClass\"\n role=\"presentation\"\n >\n <button\n :id=\"tab.buttonId\"\n class=\"nav-link\"\n :class=\"[tab.navItemClasses, tab.titleLinkClass, tab.active ? props.activeNavLinkClass : props.inactiveNavLinkClass]\"\n role=\"tab\"\n :aria-controls=\"tab.id\"\n :aria-selected=\"tab.active\"\n :disabled=\"tab.disabled\"\n :tabindex=\"props.noKeyNav ? undefined : tab.active ? undefined : -1\"\n type=\"button\"\n v-bind=\"tab.titleLinkAttrs\"\n @keydown.left.exact=\"!props.vertical && keynav($event, -1)\"\n @keydown.left.shift=\"!props.vertical && keynav($event, -999)\"\n @keydown.up.exact=\"props.vertical && keynav($event, -1)\"\n @keydown.up.shift=\"props.vertical && keynav($event, -999)\"\n @keydown.right.exact=\"!props.vertical && keynav($event, 1)\"\n @keydown.right.shift=\"!props.vertical && keynav($event, 999)\"\n @keydown.down.exact=\"props.vertical && keynav($event, 1)\"\n @keydown.down.shift=\"props.vertical && keynav($event, 999)\"\n @keydown.page-up=\"keynav($event, -999)\"\n @keydown.page-down=\"keynav($event, 999)\"\n @keydown.home=\"keynav($event, -999)\"\n @keydown.end=\"keynav($event, 999)\"\n @click.stop=\"(e) => handleClick(e, idx)\"\n >\n <component :is=\"tab.titleComponent\" v-if=\"tab.titleComponent\" />\n <template v-else>\n {{ tab.title }}\n </template>\n </button>\n </li>\n <slot name=\"tabs-end\" />\n </ul>\n </div>\n <BTabsTabContent v-if=\"!props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n type Ref,\n ref,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {BvEvent} from '../../utils/classes'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useId} from '../../composables/useId'\nimport type {TabType, BTabsProps, BTabsEmits, BTabsSlots} from '../../types'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {getSafeDocument, sortSlotElementsByPosition} from '../../utils/dom'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BTab from './BTab.vue'\nimport BTabsTabContent from '../BTabsTabContent.vue'\n\nconst _props = withDefaults(defineProps<Omit<BTabsProps, 'modelValue' | 'activeIndex'>>(), {\n activeNavItemClass: undefined,\n activeNavLinkClass: undefined,\n activeTabClass: undefined,\n align: undefined,\n card: false,\n contentClass: undefined,\n end: false,\n fill: false,\n id: undefined,\n inactiveNavItemClass: undefined,\n inactiveNavLinkClass: undefined,\n inactiveTabClass: undefined,\n justified: false,\n lazy: false,\n navClass: undefined,\n navItemClass: undefined,\n navWrapperClass: undefined,\n noFade: false,\n noKeyNav: false,\n noNavStyle: false,\n pills: false,\n small: false,\n tag: 'div',\n tabClass: undefined,\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BTabs')\nconst emit = defineEmits<BTabsEmits>()\nconst slots = defineSlots<BTabsSlots>()\n\nconst activeIndex = defineModel<Exclude<BTabsProps['index'], undefined>>('index', {\n default: -1,\n})\nconst activeId = defineModel<BTabsProps['modelValue']>({\n default: undefined,\n})\n\nconst tabsInternal = ref<Ref<TabType>[]>([])\n\nconst tabElementsArray = ref<VNode[]>([])\n\nconst isChildActive = ref(false)\nconst initialIds = ref<string[]>([])\nconst selectedTabHasExplicitId = ref(false)\n\nconst updateTabElementsArray = () => {\n const tabElements = flattenFragments(slots.default?.({}) ?? [])\n tabElementsArray.value = (Array.isArray(tabElements) ? tabElements : [tabElements]).filter(\n (tab) => tab.type === BTab\n )\n // only get the ids once in setup context\n if (initialIds.value.length === 0) {\n // we need to get the ids of the tabs before they are registered. After that we use the internalId for the tabpane\n initialIds.value = tabElementsArray.value.map((tab) =>\n unref(useId(() => tab.props?.id, 'tabpane'))\n )\n // Whether the *initially selected* tab carries an explicit ID.\n //\n // Only that tab matters. The delayed-selection path below exists because\n // a generated ID is not final until the child registers; an explicit ID\n // is final immediately. Asking `.some()` across every tab got this wrong\n // for a mixed list — a single ID-bearing sibling made an ID-less target\n // look safe, so the ID was read pre-mount, failed to match after\n // registration, and the selection fell back to the first tab (#2773).\n selectedTabHasExplicitId.value =\n activeIndex.value > -1 && tabElementsArray.value[activeIndex.value]?.props?.id !== undefined\n }\n isChildActive.value = tabElementsArray.value.some(\n (tab) => tab.props?.active !== undefined && tab.props?.active !== false\n )\n}\nupdateTabElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateTabElementsArray()\n nextTick(() => {\n sortTabs()\n })\n }\n)\n\nconst tabs = computed(() => {\n if (tabsInternal.value.length === 0) {\n // fail back on the slot elements, the children haven't been registered yet\n const _activeIndex = tabElementsArray.value.findIndex(\n (tab) =>\n (tab.props?.active !== undefined &&\n (tab.props.disabled === false || tab.props.disabled === undefined)) ||\n (activeId.value && tab.props?.id === activeId.value)\n )\n return tabElementsArray.value.map((tab, index) => {\n const active =\n _activeIndex !== -1\n ? index === _activeIndex\n : activeIndex.value > -1\n ? index === activeIndex.value\n : index === 0\n return {\n id: tab.props?.id ?? initialIds.value[index],\n internalId: `premount-${index}`, // temporary id for the tab\n buttonId: tab.props?.buttonId,\n disabled: tab.props?.disabled,\n title: tab.props?.title,\n titleComponent: (tab.children as {title: unknown})?.title,\n titleItemClass: tab.props?.titleItemClass,\n titleLinkAttrs: tab.props?.titleLinkAttrs,\n titleLinkClass: tab.props?.titleLinkClass,\n onClick: tab.props?.onClick,\n active,\n navItemClasses: [\n {\n active,\n disabled: !(tab.props?.disabled === false || tab.props?.disabled === undefined),\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n }\n return tabsInternal.value.map((_tab) => {\n const tab = unref(_tab)\n const active = tab.id === activeId.value\n\n return {\n ...tab,\n active,\n navItemClasses: [\n {\n active,\n disabled: tab.disabled,\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n})\n\nlet initialized = false\nlet updateInitialActiveIndex = false\nlet updateInitialActiveId = false\nlet delayedTabSelection = false\n\n// Check if we need to delay tab selection:\n// - We have v-model:index (activeIndex) but no v-model (activeId)\n// - AND the selected tab has no explicit ID (so it will use a generated one)\n// - AND we have tabs to select from\nconst needsDelayedSelection =\n activeIndex.value > -1 &&\n !activeId.value &&\n !selectedTabHasExplicitId.value &&\n tabElementsArray.value.length > 0\n\nif (needsDelayedSelection) {\n // Delay tab selection until children register with their generated IDs\n delayedTabSelection = true\n updateInitialActiveId = true\n} else if (activeIndex.value === -1 && activeId.value) {\n if (tabs.value.findIndex((t) => t.id === activeId.value) !== -1) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n } else {\n updateInitialActiveIndex = true\n }\n} else if (activeIndex.value > -1 && !activeId.value) {\n if (tabs.value[activeIndex.value]?.id) {\n activeId.value = tabs.value[activeIndex.value]?.id\n } else {\n updateInitialActiveId = true\n }\n} else if (activeIndex.value === -1 && !activeId.value && !isChildActive.value) {\n activeIndex.value = tabs.value.findIndex((t) => t.disabled === undefined || t.disabled === false)\n activeId.value = tabs.value[activeIndex.value]?.id\n} else if (activeIndex.value === -1 && !activeId.value && isChildActive.value) {\n activeIndex.value = tabs.value.findIndex(\n (t) =>\n t.active !== undefined &&\n t.active !== false &&\n (t.disabled === undefined || t.disabled === false)\n )\n activeId.value = tabs.value[activeIndex.value]?.id\n}\n\nfunction updateInitialIndexAndId() {\n // we get the computedIds after registering the tabs\n if (updateInitialActiveIndex) {\n const index = tabs.value.findIndex((t) => t.id === activeId.value)\n if (index !== -1) {\n nextTick(() => {\n activeIndex.value = index\n updateInitialActiveIndex = false\n })\n }\n }\n if (updateInitialActiveId) {\n // Wait for tabs to be registered if we're doing delayed selection\n if (delayedTabSelection && tabsInternal.value.length === 0) {\n // Children haven't registered yet, wait\n return\n }\n if (activeIndex.value > -1 && tabs.value[activeIndex.value]?.id) {\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n updateInitialActiveId = false\n delayedTabSelection = false\n })\n }\n }\n}\n\nupdateInitialIndexAndId()\n\nconst showEmpty = computed(() => !(tabs?.value && tabs.value.length > 0))\n\nconst tabContentProps = computed(() => ({\n contentClass: props.contentClass,\n showEmpty: showEmpty.value,\n card: props.card,\n}))\n\nconst computedClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-items-start': props.vertical,\n}))\n\nconst alignment = useAlignment(() => props.align)\n\nconst navTabsClasses = computed(() => ({\n 'nav-pills': props.pills,\n 'nav-underline': props.underline,\n 'flex-column me-3': props.vertical,\n [alignment.value]: props.align !== undefined,\n 'nav-fill': props.fill,\n 'card-header-tabs': props.card && !props.pills && !props.underline,\n 'card-header-pills': props.card && props.pills,\n 'nav-justified': props.justified,\n 'nav-tabs': !props.noNavStyle && !props.pills && !props.underline,\n 'small': props.small,\n}))\n\nconst handleClick = (event: Readonly<MouseEvent>, index: number) => {\n if (\n index >= 0 &&\n !tabs.value[index]?.disabled &&\n tabs.value[index]?.onClick &&\n typeof tabs.value[index].onClick === 'function'\n ) {\n tabs.value[index].onClick?.(event)\n if (event.defaultPrevented) {\n getSafeDocument()?.getElementById(tabs.value[index].buttonId)?.blur()\n return\n }\n }\n activeIndex.value = index\n}\n\nconst keynav = (e: Event, direction: number) => {\n if (tabs.value.length <= 0 || props.noKeyNav) return\n e.preventDefault()\n e.stopPropagation()\n activeIndex.value = nextIndex(activeIndex.value + direction, direction)\n nextTick(() => {\n if (activeIndex.value >= 0) {\n getSafeDocument()?.getElementById(tabs.value[activeIndex.value]?.buttonId)?.focus()\n }\n })\n}\n\nconst nextIndex = (start: number, direction: number) => {\n let index = start\n let minIdx = -1\n let maxIdx = -1\n\n for (let i = 0; i < tabs.value.length; i++) {\n if (!tabs.value[i]?.disabled) {\n if (minIdx === -1) minIdx = i\n maxIdx = i\n }\n }\n\n while (index >= minIdx && index <= maxIdx && tabs.value[index]?.disabled) {\n index += direction\n }\n\n if (index < minIdx) index = minIdx\n if (index > maxIdx) index = maxIdx\n\n return index\n}\n\nlet previousIndex: number | undefined\nlet isReverting = false\nwatch(activeIndex, (newValue, oldValue) => {\n // Early exit if there are no tabs or all tabs are disabled\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n\n // If we're reverting due to a prevented event, don't process further\n if (isReverting) {\n isReverting = false\n return\n }\n // Calculate the next valid index\n const index = nextIndex(newValue, newValue > oldValue ? 1 : -1)\n if (index !== newValue) {\n // If the index is not the same as the new value, set the previous index to the old value\n // this is to prevent the event from being emitted twice\n previousIndex = oldValue\n activeIndex.value = index\n return\n }\n // Emit the activate-tab event\n const tabEvent = new BvEvent('activate-tab', {cancelable: true})\n emit('activate-tab', {\n newTabId: tabs.value[index]?.id,\n prevTabId: tabs.value[previousIndex ?? oldValue]?.id,\n newTabIndex: index,\n prevTabIndex: previousIndex ?? oldValue,\n event: tabEvent,\n })\n // If the event is prevented, revert to the previous index\n if (tabEvent.defaultPrevented) {\n isReverting = true\n const prev = previousIndex ?? oldValue ?? nextIndex(0, 1)\n previousIndex = undefined\n // Update the active id this will also trigger the activeId watch which will update the activeIndex\n // this is to make sure we handle case that starts with id change.\n if (activeId.value !== tabs.value[prev]?.id) {\n activeId.value = tabs.value[prev]?.id\n }\n nextTick(() => {\n if (prev >= 0) {\n getSafeDocument()?.getElementById(tabs.value[prev]?.buttonId)?.focus()\n }\n })\n return\n }\n\n // Update the active id\n if (activeId.value !== tabs.value[index]?.id) {\n activeId.value = tabs.value[index]?.id\n }\n previousIndex = undefined\n})\n\nwatch(activeId, (newValue, oldValue) => {\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n const index = tabs.value.findIndex((t) => t.id === newValue)\n // If the new tab is the same as the current tab, do nothing\n if (index === activeIndex.value) return\n const oldIndex = tabs.value.findIndex((t) => t.id === oldValue)\n // If the new tab is disabled, find the next enabled tab\n if (tabs.value[index]?.disabled) {\n // activeIndex watcher will update the activeId to the next enabled tab\n activeIndex.value = nextIndex(index, index > oldIndex ? 1 : -1)\n return\n }\n // If the new tab is not found, find the first enabled tab\n if (index === -1) {\n // activeIndex watcher will update the activeId to the first enabled tab\n activeIndex.value = nextIndex(0, 1)\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n })\n return\n }\n // change to the next tab\n activeIndex.value = index\n})\n\nconst registerTab = (tab: Ref<TabType>) => {\n const idx = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n if (idx === -1) {\n tabsInternal.value.push(tab)\n if (initialized) {\n nextTick(() => {\n sortTabs()\n })\n } else {\n // If we're doing delayed tab selection, try to update now that a tab has registered\n if (delayedTabSelection) {\n nextTick(() => {\n updateInitialIndexAndId()\n })\n }\n }\n } else {\n tabsInternal.value[idx] = tab\n if (initialized) {\n // sort just in case the tab was moved\n sortTabs()\n }\n }\n const idx2 = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n return tab.value.id ?? (!initialized ? initialIds.value[idx2] : tab.value.internalId)\n}\n\nonMounted(() => {\n updateInitialIndexAndId()\n sortTabs()\n initialized = true\n})\n\nconst sortTabs = () => {\n tabsInternal.value.sort((a, b) => sortSlotElementsByPosition(a.value.el.value, b.value.el.value))\n if (\n activeId.value &&\n activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value)\n ) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n }\n}\n\nconst unregisterTab = (id: string) => {\n tabsInternal.value = tabsInternal.value.filter((t) => t.value.internalId !== id)\n}\n\nprovide(tabsInjectionKey, {\n lazy: toRef(() => props.lazy),\n card: toRef(() => props.card),\n noFade: toRef(() => props.noFade),\n activeTabClass: toRef(() => props.activeTabClass),\n inactiveTabClass: toRef(() => props.inactiveTabClass),\n tabClass: toRef(() => props.tabClass),\n registerTab,\n unregisterTab,\n activeId,\n activateTab: (internalId) => {\n const idx = tabs.value.findIndex((t) => t.internalId === internalId)\n if (internalId === undefined || idx === -1) {\n activeIndex.value = nextIndex(0, 1)\n return\n }\n activeIndex.value = idx\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ,YAAY,SAAQ,MAAM;EACxC,MAAM,QAAQ,SAAA;EACd,MAAM,QAAQ,SAAS;EAEvB,MAAM,cAAc,SAAoD,SAAC,QAExE;EAED,MAAM,aAAa,OAAO,kBAAkB,IAAI;EAEhD,MAAM,UAAU,IAAI,MAAM,EAAE;EAC5B,MAAM,aAAa,QAAM,IAAI,SAAS;EACtC,MAAM,aAAa,eAAe,MAAM,MAAM,QAAQ,SAAS,WAAW,KAAK;EAC/E,MAAM,mBAAmB,cAAY,MAAM,UAAU,KAAK;EAE1D,MAAM,sBAAsB,IAAI,KAAK;EACrC,MAAM,KAAK,eAAe,KAAK;EAE/B,MAAM,iBAAiB,eAAe;GAEpC,MAAM,EAAC,SAAS,GAAG,GAAG,aAAY;GAClC,OAAO;EACT,CAAC;EAED,SAAS,YAAY;GACnB,IAAI,CAAC,YAAY;GACjB,MAAM,QAAQ,WAAW,YACvB,gBAEK;IACC,YAAY,WAAW;IACvB,IAAI,WAAW;IACf,QAAQ,YAAY;IACpB,UAAU,iBAAiB;IAC3B,UAAU,MAAM;IAChB,OAAO,MAAM;IACb,gBAAgB,MAAM;IACtB,gBAAgB,MAAM;IACtB,gBAAgB,MAAM;IACtB,gBAAgB,MAAM;IACtB,SAAS,MAAM;IACf;GACF,EACJ,CACF;GACA,IAAI,UAAU,QAAQ,OACpB,QAAQ,QAAQ;EAEpB;EAEA,IAAI,YAAY;GACd,UAAU;GACV,IAAI,YAAY,OACd,WAAW,YAAY,WAAW,KAAK;EAE3C;EAEA,kBAAkB;GAChB,IAAI,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AA,UAAA;;KAGJ,CAAA,MAAA,KAAA,CAAK,CAAC,OAA9B,UAAA,GAAA,YAKkB,yBAAA,eAAA,WAAA,EAAA,KAAA,EAAA,GALyB,gBAAA,KAAe,CAAA,GAAA;MAE7C,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;MAFvB,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -40,15 +40,15 @@ import { t as BDropdown_default } from "./BDropdown-CnxUzs42.js";
|
|
|
40
40
|
import { a as BDropdownGroup_default, i as BDropdownHeader_default, n as BDropdownItemButton_default, o as BDropdownForm_default, r as BDropdownItem_default, s as BDropdownDivider_default, t as BDropdownText_default } from "./BDropdown-D4VSJJxu.js";
|
|
41
41
|
import { t as BForm_default } from "./BForm-BOoX6AAr.js";
|
|
42
42
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-C8orMj24.js";
|
|
43
|
-
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "./BForm-
|
|
44
|
-
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-
|
|
43
|
+
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "./BForm-CcbrqF35.js";
|
|
44
|
+
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-BTNOXbQ6.js";
|
|
45
45
|
import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "./BFormCheckbox-BMhyR-J5.js";
|
|
46
46
|
import { t as BFormFile_default } from "./BFormFile-BVrDprWL.js";
|
|
47
|
-
import { t as BFormGroup_default } from "./BFormGroup-
|
|
47
|
+
import { t as BFormGroup_default } from "./BFormGroup-D3R7DxxF.js";
|
|
48
48
|
import { n as BFormRadio_default, t as BFormRadioGroup_default } from "./BFormRadio-DRViMh6V.js";
|
|
49
49
|
import { t as BFormRating_default } from "./BFormRating-AEiF8K8T.js";
|
|
50
50
|
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "./BFormSelect-DdjH8482.js";
|
|
51
|
-
import { t as BFormSpinbutton_default } from "./BFormSpinbutton-
|
|
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-DlDe26DL.js";
|
|
54
54
|
import { t as BInputGroupText_default } from "./BInputGroup-Bjh7zXyI.js";
|
|
@@ -64,7 +64,7 @@ import { t as BPagination_default } from "./BPagination-D_Hfk6OF.js";
|
|
|
64
64
|
import { a as BPlaceholder_default, i as BPlaceholderButton_default, n as BPlaceholderTable_default, r as BPlaceholderCard_default, t as BPlaceholderWrapper_default } from "./BPlaceholder-DvOCnqDh.js";
|
|
65
65
|
import { t as BTableSimple_default } from "./BTableSimple-2Z7ssnuG.js";
|
|
66
66
|
import { a as BTh_default, c as BTbody_default, i as BThead_default, n as BTableLite_default, o as BTfoot_default, r as BTr_default, s as BTd_default, t as BTable_default } from "./BTable-BZxX17YU.js";
|
|
67
|
-
import { n as BTab_default, t as BTabs_default } from "./BTabs-
|
|
67
|
+
import { n as BTab_default, t as BTabs_default } from "./BTabs-BKmkVWrZ.js";
|
|
68
68
|
import { t as BToast_default } from "./BToast-Di9HwBOV.js";
|
|
69
69
|
import { t as BTooltip_default } from "./BTooltip-BxaUtV4m.js";
|
|
70
70
|
import { t as components_exports } from "./src/components/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as BForm_default } from "../../../BForm-BOoX6AAr.js";
|
|
2
|
-
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../../BForm-
|
|
3
|
-
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../../BFormValidFeedback-
|
|
2
|
+
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../../BForm-CcbrqF35.js";
|
|
3
|
+
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../../BFormValidFeedback-BTNOXbQ6.js";
|
|
4
4
|
export { BForm_default as BForm, BFormDatalist_default as BFormDatalist, BFormFloatingLabel_default as BFormFloatingLabel, BFormInvalidFeedback_default as BFormInvalidFeedback, BFormRow_default as BFormRow, BFormText_default as BFormText, BFormValidFeedback_default as BFormValidFeedback };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as BFormGroup_default } from "../../../BFormGroup-
|
|
1
|
+
import { t as BFormGroup_default } from "../../../BFormGroup-D3R7DxxF.js";
|
|
2
2
|
export { BFormGroup_default as BFormGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as BFormSpinbutton_default } from "../../../BFormSpinbutton-
|
|
1
|
+
import { t as BFormSpinbutton_default } from "../../../BFormSpinbutton-fkVMbQC3.js";
|
|
2
2
|
export { BFormSpinbutton_default as BFormSpinbutton };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as BTab_default, t as BTabs_default } from "../../../BTabs-
|
|
1
|
+
import { n as BTab_default, t as BTabs_default } from "../../../BTabs-BKmkVWrZ.js";
|
|
2
2
|
export { BTab_default as BTab, BTabs_default as BTabs };
|
|
@@ -34,15 +34,15 @@ import { t as BDropdown_default } from "../../BDropdown-CnxUzs42.js";
|
|
|
34
34
|
import { a as BDropdownGroup_default, i as BDropdownHeader_default, n as BDropdownItemButton_default, o as BDropdownForm_default, r as BDropdownItem_default, s as BDropdownDivider_default, t as BDropdownText_default } from "../../BDropdown-D4VSJJxu.js";
|
|
35
35
|
import { t as BForm_default } from "../../BForm-BOoX6AAr.js";
|
|
36
36
|
import { t as BFormSelectOption_default } from "../../BFormSelectOption-C8orMj24.js";
|
|
37
|
-
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../BForm-
|
|
38
|
-
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../BFormValidFeedback-
|
|
37
|
+
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../BForm-CcbrqF35.js";
|
|
38
|
+
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../BFormValidFeedback-BTNOXbQ6.js";
|
|
39
39
|
import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "../../BFormCheckbox-BMhyR-J5.js";
|
|
40
40
|
import { t as BFormFile_default } from "../../BFormFile-BVrDprWL.js";
|
|
41
|
-
import { t as BFormGroup_default } from "../../BFormGroup-
|
|
41
|
+
import { t as BFormGroup_default } from "../../BFormGroup-D3R7DxxF.js";
|
|
42
42
|
import { n as BFormRadio_default, t as BFormRadioGroup_default } from "../../BFormRadio-DRViMh6V.js";
|
|
43
43
|
import { t as BFormRating_default } from "../../BFormRating-AEiF8K8T.js";
|
|
44
44
|
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../BFormSelect-DdjH8482.js";
|
|
45
|
-
import { t as BFormSpinbutton_default } from "../../BFormSpinbutton-
|
|
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-DlDe26DL.js";
|
|
48
48
|
import { t as BInputGroupText_default } from "../../BInputGroup-Bjh7zXyI.js";
|
|
@@ -55,7 +55,7 @@ import { t as BPagination_default } from "../../BPagination-D_Hfk6OF.js";
|
|
|
55
55
|
import { a as BPlaceholder_default, i as BPlaceholderButton_default, n as BPlaceholderTable_default, r as BPlaceholderCard_default, t as BPlaceholderWrapper_default } from "../../BPlaceholder-DvOCnqDh.js";
|
|
56
56
|
import { t as BTableSimple_default } from "../../BTableSimple-2Z7ssnuG.js";
|
|
57
57
|
import { a as BTh_default, c as BTbody_default, i as BThead_default, n as BTableLite_default, o as BTfoot_default, r as BTr_default, s as BTd_default, t as BTable_default } from "../../BTable-BZxX17YU.js";
|
|
58
|
-
import { n as BTab_default, t as BTabs_default } from "../../BTabs-
|
|
58
|
+
import { n as BTab_default, t as BTabs_default } from "../../BTabs-BKmkVWrZ.js";
|
|
59
59
|
import { t as BToast_default } from "../../BToast-Di9HwBOV.js";
|
|
60
60
|
import { t as BTooltip_default } from "../../BTooltip-BxaUtV4m.js";
|
|
61
61
|
//#region src/components/index.ts
|
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": "0.46.
|
|
5
|
+
"version": "0.46.2",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./dist/bootstrap-vue-next.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSpinbutton-Bt590uT6.js","names":[],"sources":["../src/components/BFormSpinbutton/BFormSpinbutton.vue","../src/components/BFormSpinbutton/BFormSpinbutton.vue"],"sourcesContent":["<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n","<template>\n <div\n ref=\"_element\"\n class=\"b-form-spinbutton form-control\"\n :class=\"computedClasses\"\n role=\"group\"\n :lang=\"computedLocale\"\n :tabindex=\"props.disabled ? undefined : '-1'\"\n :title=\"props.ariaLabel\"\n @click=\"focused = true\"\n >\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.top.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.top.button\"\n @mousedown=\"buttons.top.handler\"\n @touchstart=\"buttons.top.handler\"\n >\n <svg v-bind=\"buttons.top.svg\">\n <path v-bind=\"buttons.top.path\" />\n </svg>\n </button>\n </slot>\n <input\n v-if=\"props.name && !props.disabled\"\n key=\"hidden\"\n type=\"hidden\"\n :name=\"props.name\"\n :form=\"props.form\"\n :value=\"valueAsFixed\"\n />\n <output\n :id=\"computedId\"\n key=\"output\"\n class=\"flex-grow-1\"\n :class=\"computedSpinClasses\"\n :dir=\"(isRtl ?? false) ? 'rtl' : 'ltr'\"\n :tabindex=\"props.disabled ? undefined : '0'\"\n role=\"spinbutton\"\n aria-live=\"off\"\n :aria-label=\"props.ariaLabel || undefined\"\n :aria-invalid=\"\n props.state === false || (!modelValue !== null && props.required) ? true : undefined\n \"\n :aria-required=\"props.required ? true : undefined\"\n :aria-valuemin=\"computedMin\"\n :aria-valuemax=\"computedMax\"\n :aria-valuenow=\"modelValue !== null ? modelValue : undefined\"\n :aria-valuetext=\"modelValue !== null ? computedFormatter(modelValue) : undefined\"\n >\n <bdi>\n {{ (modelValue !== null ? computedFormatter(modelValue) : props.placeholder) || '' }}\n </bdi>\n </output>\n <!-- eslint-disable-next-line prettier/prettier -->\n <!-- prettier-ignore -->\n <slot :name=\"(buttons.bottom.slot.name as 'increment' | 'decrement')\" :has-focus=\"focused\">\n <button\n v-bind=\"buttons.bottom.button\"\n @mousedown=\"buttons.bottom.handler\"\n @touchstart=\"buttons.bottom.handler\"\n >\n <svg v-bind=\"buttons.bottom.svg\">\n <path v-bind=\"buttons.bottom.path\" />\n </svg>\n </button>\n </slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, onUnmounted, useTemplateRef} from 'vue'\nimport {\n CODE_DOWN,\n CODE_END,\n CODE_HOME,\n CODE_PAGEDOWN,\n CODE_PAGEUP,\n CODE_UP,\n} from '../../utils/constants'\nimport {onKeyStroke, useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useRtl} from '../../composables/useRtl'\nimport type {\n BFormSpinbuttonEmits,\n BFormSpinbuttonProps,\n BFormSpinbuttonSlots,\n ButtonType,\n} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst KEY_CODES = [CODE_UP, CODE_DOWN, CODE_HOME, CODE_END, CODE_PAGEUP, CODE_PAGEDOWN]\n\nconst _props = withDefaults(defineProps<Omit<BFormSpinbuttonProps, 'modelValue'>>(), {\n ariaControls: undefined,\n ariaLabel: undefined,\n disabled: false,\n form: undefined,\n formatterFn: undefined,\n id: undefined,\n inline: false,\n labelDecrement: 'Decrement',\n labelIncrement: 'Increment',\n locale: undefined,\n max: defaultValues.max,\n min: defaultValues.min,\n name: undefined,\n placeholder: undefined,\n readonly: false,\n repeatDelay: defaultValues.repeatDelay,\n repeatInterval: defaultValues.repeatInterval,\n repeatStepMultiplier: defaultValues.repeatMultiplier,\n repeatThreshold: defaultValues.repeatThreshold,\n required: false,\n size: undefined,\n state: null,\n step: defaultValues.step,\n vertical: false,\n wrap: false,\n})\nconst props = useDefaults(_props, 'BFormSpinbutton')\nconst emit = defineEmits<BFormSpinbuttonEmits>()\ndefineSlots<BFormSpinbuttonSlots>()\n\nconst modelValue = defineModel<Exclude<BFormSpinbuttonProps['modelValue'], undefined>>({\n default: null,\n})\n\nconst element = useTemplateRef('_element')\n\nconst {focused} = useFocus(element)\n\nconst computedId = useId(() => props.id, 'spinbutton')\n\nconst computedClasses = computed(() => ({\n 'disabled': props.disabled,\n 'readonly': props.readonly,\n 'focus': focused.value,\n 'd-inline-flex': props.inline || props.vertical,\n 'd-flex': !props.inline && !props.vertical,\n 'align-items-stretch': !props.vertical,\n 'flex-column': props.vertical,\n [`form-control-${props.size}`]: props.size !== undefined,\n}))\n\nconst computedSpinClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-self-center': !props.vertical,\n 'align-items-center': props.vertical,\n 'border-top': props.vertical,\n 'border-bottom': props.vertical,\n 'border-start': !props.vertical,\n 'border-end': !props.vertical,\n}))\n\n//non-reactive properties\nlet $_autoDelayTimer: ReturnType<typeof setTimeout> | undefined\nlet $_autoRepeatTimer: ReturnType<typeof setTimeout> | undefined\nlet $_keyIsDown = false\n\n// const computedInline = computed(() => props.inline && !props.vertical)\n\n// const computedReadonly = computed(() => props.readonly && !props.disabled)\n\nconst stepNumber = useToNumber(() => props.step)\nconst computedStep = computed(() =>\n Number.isNaN(stepNumber.value) ? defaultValues.step : stepNumber.value\n)\n\nconst minNumber = useToNumber(() => props.min)\nconst computedMin = computed(() =>\n Number.isNaN(minNumber.value) ? defaultValues.min : minNumber.value\n)\n\nconst maxNumber = useToNumber(() => props.max)\nconst computedMax = computed(() => {\n const step = computedStep.value\n const min = computedMin.value\n return Math.floor((maxNumber.value - min) / step) * step + min\n})\n\nconst repeatDelayNumber = useToNumber(() => props.repeatDelay, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedDelay = computed(() =>\n repeatDelayNumber.value > 0 ? repeatDelayNumber.value : defaultValues.repeatDelay\n)\n\nconst repeatIntervalNumber = useToNumber(() => props.repeatInterval, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedInterval = computed(() =>\n repeatIntervalNumber.value > 0 ? repeatIntervalNumber.value : defaultValues.repeatInterval\n)\n\nconst repeatThresholdNumber = useToNumber(() => props.repeatThreshold, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedThreshold = computed(() =>\n Math.max(\n Number.isNaN(repeatThresholdNumber.value)\n ? defaultValues.repeatThreshold\n : repeatThresholdNumber.value,\n 1\n )\n)\n\nconst repeatStepMultiplierNumber = useToNumber(() => props.repeatStepMultiplier, {\n nanToZero: true,\n method: 'parseInt',\n})\nconst computedStepMultiplier = computed(() =>\n Math.max(\n Number.isNaN(repeatStepMultiplierNumber.value)\n ? defaultValues.repeatMultiplier\n : repeatStepMultiplierNumber.value,\n 1\n )\n)\n\nconst computedPrecision = computed(() => {\n const step = computedStep.value\n return Math.floor(step) === step ? 0 : (step.toString().split('.')[1] || '').length\n})\n\nconst computedMultiplier = computed(() => Math.pow(10, computedPrecision.value || 0))\n\nconst valueAsFixed = computed(() =>\n modelValue.value === null ? '' : modelValue.value.toFixed(computedPrecision.value)\n)\n\nconst {isRtl, locale: globalLocale} = useRtl()\n\nconst computedLocale = computed(() => {\n const loc = (props.locale ?? globalLocale?.value) || 'locale'\n const locales = [loc]\n const nf = new Intl.NumberFormat(locales)\n return nf.resolvedOptions().locale\n})\n\nconst defaultFormatter = () =>\n new Intl.NumberFormat(computedLocale.value, {\n style: 'decimal',\n useGrouping: false,\n minimumIntegerDigits: 1,\n minimumFractionDigits: computedPrecision.value,\n maximumFractionDigits: computedPrecision.value,\n notation: 'standard',\n }).format\n\nconst computedFormatter = computed(() => props.formatterFn ?? defaultFormatter())\n\nconst stepValue = (direction: number) => {\n // Sets a new incremented or decremented value, supporting optional wrapping\n // Direction is either +1 or -1 (or a multiple thereof)\n let {value} = modelValue\n if (!props.disabled && value !== null) {\n const step = computedStep.value * direction\n const min = computedMin.value\n const max = computedMax.value\n const multiplier = computedMultiplier.value\n const {wrap} = props\n // We ensure that the value steps like a native input\n value = Math.round((value - min) / step) * step + min + step\n // We ensure that precision is maintained (decimals)\n value = Math.round(value * multiplier) / multiplier\n // Handle if wrapping is enabled\n modelValue.value = value > max ? (wrap ? min : max) : value < min ? (wrap ? max : min) : value\n }\n}\n\nconst stepUp = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = computedMin.value\n return\n }\n stepValue(+1 * multiplier)\n}\n\nconst stepDown = (multiplier = 1) => {\n if (modelValue.value === null) {\n modelValue.value = props.wrap ? computedMax.value : computedMin.value\n return\n }\n stepValue(-1 * multiplier)\n}\n\nconst stopEvent = (event: Readonly<Event>) => {\n event.preventDefault()\n event.stopImmediatePropagation()\n}\n\nonKeyStroke(\n KEY_CODES,\n (event) => {\n const {code, altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n // https://w3c.github.io/aria-practices/#spinbutton\n stopEvent(event)\n if ($_keyIsDown) {\n // Keypress is already in progress\n return\n }\n\n resetTimers()\n if ([CODE_UP, CODE_DOWN].includes(code)) {\n // The following use the custom auto-repeat handling\n\n $_keyIsDown = true\n if (code === CODE_UP) {\n handleStepRepeat(event, stepUp)\n return\n }\n if (code === CODE_DOWN) {\n handleStepRepeat(event, stepDown)\n }\n return\n }\n // These use native OS key repeating\n if (code === CODE_PAGEUP) {\n stepUp(computedStepMultiplier.value)\n return\n }\n if (code === CODE_PAGEDOWN) {\n stepDown(computedStepMultiplier.value)\n return\n }\n if (code === CODE_HOME) {\n modelValue.value = computedMin.value\n return\n }\n if (code === CODE_END) {\n modelValue.value = computedMax.value\n }\n },\n {target: element, eventName: 'keydown'}\n)\n\nonKeyStroke(\n KEY_CODES,\n (event: Readonly<KeyboardEvent>) => {\n // Emit a change event when the keyup happens\n\n const {altKey, ctrlKey, metaKey} = event\n\n if (props.disabled || props.readonly || altKey || ctrlKey || metaKey) return\n\n stopEvent(event)\n resetTimers()\n $_keyIsDown = false\n emit('change', modelValue.value)\n },\n {target: element, eventName: 'keyup'}\n)\n\n// takes in a mount or Keyboard Event\nconst handleStepRepeat = (event: Readonly<Event>, stepper: (step: number) => void) => {\n const {type} = event || {}\n\n if (!props.disabled && !props.readonly) {\n if (isMouseEvent(event)) {\n // We only respond to left (main === 0) button clicks\n if (type === 'mousedown' && event.button) return\n }\n resetTimers()\n // Step the counter initially\n stepper(1)\n const threshold = computedThreshold.value\n const multiplier = computedStepMultiplier.value\n const delay = computedDelay.value\n const interval = computedInterval.value\n\n // Initiate the delay/repeat interval\n $_autoDelayTimer = setTimeout(() => {\n let count = 0\n $_autoRepeatTimer = setInterval(() => {\n // After N initial repeats, we increase the incrementing step amount\n // We do this to minimize screen reader announcements of the value\n // (values are announced every change, which can be chatty for SR users)\n // And to make it easer to select a value when the range is large\n stepper(count < threshold ? 1 : multiplier)\n count++\n }, interval)\n }, delay)\n }\n}\n\nconst isMouseEvent = (evt: Readonly<Event>): evt is MouseEvent =>\n evt.type === 'mouseup' || evt.type === 'mousedown'\n\nconst onMouseup: EventListener = (event: Readonly<Event>) => {\n // `<body>` listener, only enabled when mousedown starts\n\n if (isMouseEvent(event)) {\n if (event.type === 'mouseup' && event.button) {\n // Ignore non left button (main === 0) mouse button click\n return\n }\n }\n\n stopEvent(event)\n resetTimers()\n setMouseup('removeEventListener')\n // Trigger the change event\n emit('change', modelValue.value)\n}\n\nconst setMouseup = (operation: 'addEventListener' | 'removeEventListener') => {\n const doc = getSafeDocument()\n if (doc === null) return\n\n if (operation === 'addEventListener') {\n doc.body.addEventListener('mouseup', onMouseup)\n doc.body.addEventListener('touchend', onMouseup, {passive: false})\n } else {\n doc.body.removeEventListener('mouseup', onMouseup)\n doc.body.removeEventListener('touchend', onMouseup)\n }\n}\nconst resetTimers = () => {\n clearTimeout($_autoDelayTimer)\n clearInterval($_autoRepeatTimer)\n $_autoDelayTimer = undefined\n $_autoRepeatTimer = undefined\n}\n\nconst buttons = computed(() => {\n const incrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-plus',\n viewBox: '0 0 16 16',\n },\n path: {\n d: 'M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z',\n },\n } as const\n\n const decrementSvgAttrs = {\n svg: {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '16',\n height: '16',\n fill: 'currentColor',\n class: 'bi bi-dash',\n viewBox: '0 0 16 16',\n },\n path: {d: 'M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'},\n } as const\n\n const sharedButtonAttrs = {\n 'class': [{'py-0': !props.vertical}, 'btn', 'btn-sm', 'border-0', 'rounded-0'],\n 'tabindex': '-1',\n 'type': 'button' as ButtonType,\n 'disabled': props.disabled || props.readonly,\n 'aria-disabled': props.disabled || props.readonly ? true : undefined,\n 'aria-controls': computedId.value,\n }\n\n const sharedSvgAttrs = {\n 'aria-hidden': true,\n 'scale': focused.value ? 1.5 : 1.25,\n }\n\n const handler = (event: Readonly<Event>, stepper: (multiplier?: number) => void) => {\n if (!props.disabled && !props.readonly) {\n stopEvent(event)\n setMouseup('addEventListener')\n // Since we `preventDefault()`, we must manually focus the button\n // Though it's likely captured from the element click focus\n focused.value = true\n handleStepRepeat(event, stepper)\n }\n }\n\n const incrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelIncrement || undefined,\n 'aria-keyshortcuts': 'ArrowUp',\n },\n svg: {\n ...sharedSvgAttrs,\n ...incrementSvgAttrs.svg,\n },\n path: {\n ...incrementSvgAttrs.path,\n },\n slot: {\n name: 'increment',\n },\n handler: (e: Event) => handler(e, stepUp),\n }\n\n const decrementAttrs = {\n button: {\n ...sharedButtonAttrs,\n 'aria-label': props.labelDecrement || undefined,\n 'aria-keyshortcuts': 'ArrowDown',\n },\n svg: {\n ...sharedSvgAttrs,\n ...decrementSvgAttrs.svg,\n },\n path: {\n ...decrementSvgAttrs.path,\n },\n slot: {\n name: 'decrement',\n },\n handler: (e: Readonly<Event>) => handler(e, stepDown),\n }\n\n return {\n top: {\n ...(props.vertical ? incrementAttrs : decrementAttrs),\n },\n bottom: {\n ...(!props.vertical ? incrementAttrs : decrementAttrs),\n },\n }\n})\n\nonUnmounted(() => {\n // Cleanup event listeners\n setMouseup('removeEventListener')\n})\n</script>\n\n<script lang=\"ts\">\nconst defaultValues = {\n min: 1,\n max: 100,\n step: 1,\n repeatDelay: 500,\n repeatInterval: 100,\n repeatThreshold: 10,\n repeatMultiplier: 4,\n} as const\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;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WAAQ,OAAU,KAAA;KACvC,iBAAe,YAAA;KACf,iBAAe,YAAA;KACf,iBAAe,WAAA,UAAU,OAAY,WAAA,QAAa,KAAA;KAClD,kBAAgB,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,KAAU,IAAI,KAAA;IAEvE,GAAA,CAAA,mBAEM,OAAA,MAAA,iBADA,WAAA,UAAU,OAAY,kBAAA,MAAkB,WAAA,KAAU,IAAI,MAAA,KAAA,CAAK,CAAC,gBAAW,EAAA,GAAA,CAAA,CAAA,GAAA,IAAA,UAAA;IAK/E,WAUO,KAAA,QAVO,QAAA,MAAQ,OAAO,KAAK,MAAI,EAAiC,UAAW,MAAA,OAAA,EAAO,SAUlF,CATL,mBAQS,UART,WACU,QAOD,MAPS,OAAO,QAAM;KAC5B,aAAS,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,IAAA;KACjC,cAAU,OAAA,OAAA,OAAA,MAAE,GAAA,SAAA,QAAA,MAAQ,OAAO,WAAf,QAAA,MAAQ,OAAO,QAAO,GAAA,IAAA;IAEnC,CAAA,GAAA,EAAA,UAAA,GAAA,mBAEM,OAAA,eAAA,mBAFO,QAAA,MAAQ,OAAO,GAAG,CAAA,GAAA,CAC7B,mBAAqC,QAAA,eAAA,mBAAvB,QAAA,MAAQ,OAAO,IAAI,CAAA,GAAA,MAAA,EAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,CAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BTabs-BVcu9DPg.js","names":[],"sources":["../src/components/BTabs/BTab.vue","../src/components/BTabs/BTab.vue","../src/components/BTabsTabContent.vue","../src/components/BTabsTabContent.vue","../src/components/BTabs/BTabs.vue","../src/components/BTabs/BTabs.vue"],"sourcesContent":["<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n ref=\"_el\"\n class=\"tab-pane\"\n :class=\"computedClasses\"\n role=\"tabpanel\"\n :aria-labelledby=\"computedButtonId\"\n v-bind=\"processedAttrs\"\n >\n <slot v-if=\"showSlot\" />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, onUnmounted, ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {TabType} from '../../types/Tab'\nimport type {BTabProps} from '../../types/ComponentProps'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport type {BTabSlots} from '../../types/ComponentSlots'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BTabProps, 'active'>>(), {\n buttonId: undefined,\n disabled: false,\n id: undefined,\n lazy: undefined,\n unmountLazy: undefined,\n noBody: false,\n tag: 'div',\n title: undefined,\n titleItemClass: undefined,\n titleLinkAttrs: undefined,\n titleLinkClass: undefined,\n})\nconst props = useDefaults(_props, 'BTab')\nconst slots = defineSlots<BTabSlots>()\nconst attrs = useAttrs()\n\nconst activeModel = defineModel<Exclude<BTabProps['active'], undefined>>('active', {\n default: false,\n})\n\nconst parentData = inject(tabsInjectionKey, null)\n\nconst localId = ref(props.id)\nconst internalId = useId('', 'tabpane')\nconst computedId = computed(() => props.id ?? localId.value ?? internalId.value)\nconst computedButtonId = useId(() => props.buttonId, 'tab')\n\nconst lazyRenderCompleted = ref(false)\nconst el = useTemplateRef('_el')\n\nconst processedAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {onClick: _, ...tabAttrs} = attrs\n return tabAttrs\n})\n\nfunction updateTab() {\n if (!parentData) return\n const newId = parentData.registerTab(\n computed(\n () =>\n ({\n internalId: internalId.value,\n id: computedId.value,\n active: activeModel.value,\n buttonId: computedButtonId.value,\n disabled: props.disabled,\n title: props.title,\n titleComponent: slots.title,\n titleItemClass: props.titleItemClass,\n titleLinkAttrs: props.titleLinkAttrs,\n titleLinkClass: props.titleLinkClass,\n onClick: attrs.onClick,\n el,\n }) as TabType\n )\n )\n if (newId !== localId.value) {\n localId.value = newId\n }\n}\n\nif (parentData) {\n updateTab()\n if (activeModel.value) {\n parentData.activateTab(internalId.value)\n }\n}\n\nonUnmounted(() => {\n if (!parentData) return\n parentData.unregisterTab(internalId.value)\n})\n\nconst isActive = computed(() => parentData?.activeId.value === computedId.value)\nconst show = ref(isActive.value)\n\nconst computedLazy = computed(() => !!(parentData?.lazy.value || props.lazy))\n\nconst computedActive = computed(() => isActive.value && !props.disabled)\nconst showSlot = computed(\n () =>\n computedActive.value ||\n !computedLazy.value ||\n (computedLazy.value && !props.unmountLazy && lazyRenderCompleted.value)\n)\n\nwatch(showSlot, (shown) => {\n if (shown && !lazyRenderCompleted.value) lazyRenderCompleted.value = true\n})\n\nwatch(isActive, (active) => {\n if (active) {\n activeModel.value = true\n setTimeout(() => {\n show.value = true\n }, 0)\n return\n }\n show.value = false\n activeModel.value = false\n})\n\nwatch(activeModel, (active) => {\n if (props.disabled) {\n activeModel.value = false\n return\n }\n if (!parentData) return\n if (!active) {\n if (isActive.value) {\n parentData.activateTab(undefined)\n }\n return\n }\n if (!isActive.value) {\n parentData.activateTab(internalId.value)\n }\n})\n\nconst computedClasses = computed(() => [\n {\n 'active': isActive.value,\n 'show': show.value,\n 'card-body': parentData?.card.value && props.noBody === false,\n 'fade': !parentData?.noFade.value,\n },\n show.value ? parentData?.activeTabClass.value : parentData?.inactiveTabClass.value,\n parentData?.tabClass.value,\n])\n\ndefineExpose({\n activate: () => {\n activeModel.value = true\n },\n deactivate: () => {\n activeModel.value = false\n },\n})\n</script>\n","<template>\n <component\n :is=\"props.tag\"\n :id=\"computedId\"\n ref=\"_el\"\n class=\"tab-pane\"\n :class=\"computedClasses\"\n role=\"tabpanel\"\n :aria-labelledby=\"computedButtonId\"\n v-bind=\"processedAttrs\"\n >\n <slot v-if=\"showSlot\" />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, inject, onUnmounted, ref, useAttrs, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {TabType} from '../../types/Tab'\nimport type {BTabProps} from '../../types/ComponentProps'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport type {BTabSlots} from '../../types/ComponentSlots'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BTabProps, 'active'>>(), {\n buttonId: undefined,\n disabled: false,\n id: undefined,\n lazy: undefined,\n unmountLazy: undefined,\n noBody: false,\n tag: 'div',\n title: undefined,\n titleItemClass: undefined,\n titleLinkAttrs: undefined,\n titleLinkClass: undefined,\n})\nconst props = useDefaults(_props, 'BTab')\nconst slots = defineSlots<BTabSlots>()\nconst attrs = useAttrs()\n\nconst activeModel = defineModel<Exclude<BTabProps['active'], undefined>>('active', {\n default: false,\n})\n\nconst parentData = inject(tabsInjectionKey, null)\n\nconst localId = ref(props.id)\nconst internalId = useId('', 'tabpane')\nconst computedId = computed(() => props.id ?? localId.value ?? internalId.value)\nconst computedButtonId = useId(() => props.buttonId, 'tab')\n\nconst lazyRenderCompleted = ref(false)\nconst el = useTemplateRef('_el')\n\nconst processedAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {onClick: _, ...tabAttrs} = attrs\n return tabAttrs\n})\n\nfunction updateTab() {\n if (!parentData) return\n const newId = parentData.registerTab(\n computed(\n () =>\n ({\n internalId: internalId.value,\n id: computedId.value,\n active: activeModel.value,\n buttonId: computedButtonId.value,\n disabled: props.disabled,\n title: props.title,\n titleComponent: slots.title,\n titleItemClass: props.titleItemClass,\n titleLinkAttrs: props.titleLinkAttrs,\n titleLinkClass: props.titleLinkClass,\n onClick: attrs.onClick,\n el,\n }) as TabType\n )\n )\n if (newId !== localId.value) {\n localId.value = newId\n }\n}\n\nif (parentData) {\n updateTab()\n if (activeModel.value) {\n parentData.activateTab(internalId.value)\n }\n}\n\nonUnmounted(() => {\n if (!parentData) return\n parentData.unregisterTab(internalId.value)\n})\n\nconst isActive = computed(() => parentData?.activeId.value === computedId.value)\nconst show = ref(isActive.value)\n\nconst computedLazy = computed(() => !!(parentData?.lazy.value || props.lazy))\n\nconst computedActive = computed(() => isActive.value && !props.disabled)\nconst showSlot = computed(\n () =>\n computedActive.value ||\n !computedLazy.value ||\n (computedLazy.value && !props.unmountLazy && lazyRenderCompleted.value)\n)\n\nwatch(showSlot, (shown) => {\n if (shown && !lazyRenderCompleted.value) lazyRenderCompleted.value = true\n})\n\nwatch(isActive, (active) => {\n if (active) {\n activeModel.value = true\n setTimeout(() => {\n show.value = true\n }, 0)\n return\n }\n show.value = false\n activeModel.value = false\n})\n\nwatch(activeModel, (active) => {\n if (props.disabled) {\n activeModel.value = false\n return\n }\n if (!parentData) return\n if (!active) {\n if (isActive.value) {\n parentData.activateTab(undefined)\n }\n return\n }\n if (!isActive.value) {\n parentData.activateTab(internalId.value)\n }\n})\n\nconst computedClasses = computed(() => [\n {\n 'active': isActive.value,\n 'show': show.value,\n 'card-body': parentData?.card.value && props.noBody === false,\n 'fade': !parentData?.noFade.value,\n },\n show.value ? parentData?.activeTabClass.value : parentData?.inactiveTabClass.value,\n parentData?.tabClass.value,\n])\n\ndefineExpose({\n activate: () => {\n activeModel.value = true\n },\n deactivate: () => {\n activeModel.value = false\n },\n})\n</script>\n","<template>\n <div class=\"tab-content\" :class=\"contentClass\">\n <slot />\n <div v-if=\"showEmpty\" key=\"bv-empty-tab\" class=\"tab-pane active\" :class=\"{'card-body': card}\">\n <slot name=\"empty\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\n\ndefineProps<{\n contentClass: ClassValue | undefined\n showEmpty: boolean\n card: boolean\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n default?: (props: Record<string, never>) => any\n empty?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <div class=\"tab-content\" :class=\"contentClass\">\n <slot />\n <div v-if=\"showEmpty\" key=\"bv-empty-tab\" class=\"tab-pane active\" :class=\"{'card-body': card}\">\n <slot name=\"empty\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type {ClassValue} from '../types/AnyValuedAttributes'\n\ndefineProps<{\n contentClass: ClassValue | undefined\n showEmpty: boolean\n card: boolean\n}>()\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ndefineSlots<{\n default?: (props: Record<string, never>) => any\n empty?: (props: Record<string, never>) => any\n}>()\n/* eslint-enable @typescript-eslint/no-explicit-any */\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" class=\"tabs\" :class=\"computedClasses\">\n <BTabsTabContent v-if=\"props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n <div\n :class=\"[\n props.navWrapperClass,\n {'card-header': props.card, 'ms-auto': vertical && props.end},\n ]\"\n >\n <ul\n class=\"nav\"\n :class=\"[navTabsClasses, props.navClass]\"\n role=\"tablist\"\n :aria-orientation=\"props.vertical ? 'vertical' : 'horizontal'\"\n >\n <slot name=\"tabs-start\" />\n <li\n v-for=\"(tab, idx) in tabs\"\n :key=\"tab.id ?? tab.internalId\"\n class=\"nav-item\"\n :class=\"tab.titleItemClass\"\n role=\"presentation\"\n >\n <button\n :id=\"tab.buttonId\"\n class=\"nav-link\"\n :class=\"[tab.navItemClasses, tab.titleLinkClass, tab.active ? props.activeNavLinkClass : props.inactiveNavLinkClass]\"\n role=\"tab\"\n :aria-controls=\"tab.id\"\n :aria-selected=\"tab.active\"\n :disabled=\"tab.disabled\"\n :tabindex=\"props.noKeyNav ? undefined : tab.active ? undefined : -1\"\n type=\"button\"\n v-bind=\"tab.titleLinkAttrs\"\n @keydown.left.exact=\"!props.vertical && keynav($event, -1)\"\n @keydown.left.shift=\"!props.vertical && keynav($event, -999)\"\n @keydown.up.exact=\"props.vertical && keynav($event, -1)\"\n @keydown.up.shift=\"props.vertical && keynav($event, -999)\"\n @keydown.right.exact=\"!props.vertical && keynav($event, 1)\"\n @keydown.right.shift=\"!props.vertical && keynav($event, 999)\"\n @keydown.down.exact=\"props.vertical && keynav($event, 1)\"\n @keydown.down.shift=\"props.vertical && keynav($event, 999)\"\n @keydown.page-up=\"keynav($event, -999)\"\n @keydown.page-down=\"keynav($event, 999)\"\n @keydown.home=\"keynav($event, -999)\"\n @keydown.end=\"keynav($event, 999)\"\n @click.stop=\"(e) => handleClick(e, idx)\"\n >\n <component :is=\"tab.titleComponent\" v-if=\"tab.titleComponent\" />\n <template v-else>\n {{ tab.title }}\n </template>\n </button>\n </li>\n <slot name=\"tabs-end\" />\n </ul>\n </div>\n <BTabsTabContent v-if=\"!props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n type Ref,\n ref,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {BvEvent} from '../../utils/classes'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useId} from '../../composables/useId'\nimport type {TabType, BTabsProps, BTabsEmits, BTabsSlots} from '../../types'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {getSafeDocument, sortSlotElementsByPosition} from '../../utils/dom'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BTab from './BTab.vue'\nimport BTabsTabContent from '../BTabsTabContent.vue'\n\nconst _props = withDefaults(defineProps<Omit<BTabsProps, 'modelValue' | 'activeIndex'>>(), {\n activeNavItemClass: undefined,\n activeNavLinkClass: undefined,\n activeTabClass: undefined,\n align: undefined,\n card: false,\n contentClass: undefined,\n end: false,\n fill: false,\n id: undefined,\n inactiveNavItemClass: undefined,\n inactiveNavLinkClass: undefined,\n inactiveTabClass: undefined,\n justified: false,\n lazy: false,\n navClass: undefined,\n navItemClass: undefined,\n navWrapperClass: undefined,\n noFade: false,\n noKeyNav: false,\n noNavStyle: false,\n pills: false,\n small: false,\n tag: 'div',\n tabClass: undefined,\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BTabs')\nconst emit = defineEmits<BTabsEmits>()\nconst slots = defineSlots<BTabsSlots>()\n\nconst activeIndex = defineModel<Exclude<BTabsProps['index'], undefined>>('index', {\n default: -1,\n})\nconst activeId = defineModel<BTabsProps['modelValue']>({\n default: undefined,\n})\n\nconst tabsInternal = ref<Ref<TabType>[]>([])\n\nconst tabElementsArray = ref<VNode[]>([])\n\nconst isChildActive = ref(false)\nconst initialIds = ref<string[]>([])\nconst hasExplicitIds = ref(false)\n\nconst updateTabElementsArray = () => {\n const tabElements = flattenFragments(slots.default?.({}) ?? [])\n tabElementsArray.value = (Array.isArray(tabElements) ? tabElements : [tabElements]).filter(\n (tab) => tab.type === BTab\n )\n // only get the ids once in setup context\n if (initialIds.value.length === 0) {\n // we need to get the ids of the tabs before they are registered. After that we use the internalId for the tabpane\n initialIds.value = tabElementsArray.value.map((tab) =>\n unref(useId(() => tab.props?.id, 'tabpane'))\n )\n // Check if any tab has an explicit ID\n hasExplicitIds.value = tabElementsArray.value.some((tab) => tab.props?.id !== undefined)\n }\n isChildActive.value = tabElementsArray.value.some(\n (tab) => tab.props?.active !== undefined && tab.props?.active !== false\n )\n}\nupdateTabElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateTabElementsArray()\n nextTick(() => {\n sortTabs()\n })\n }\n)\n\nconst tabs = computed(() => {\n if (tabsInternal.value.length === 0) {\n // fail back on the slot elements, the children haven't been registered yet\n const _activeIndex = tabElementsArray.value.findIndex(\n (tab) =>\n (tab.props?.active !== undefined &&\n (tab.props.disabled === false || tab.props.disabled === undefined)) ||\n (activeId.value && tab.props?.id === activeId.value)\n )\n return tabElementsArray.value.map((tab, index) => {\n const active =\n _activeIndex !== -1\n ? index === _activeIndex\n : activeIndex.value > -1\n ? index === activeIndex.value\n : index === 0\n return {\n id: tab.props?.id ?? initialIds.value[index],\n internalId: `premount-${index}`, // temporary id for the tab\n buttonId: tab.props?.buttonId,\n disabled: tab.props?.disabled,\n title: tab.props?.title,\n titleComponent: (tab.children as {title: unknown})?.title,\n titleItemClass: tab.props?.titleItemClass,\n titleLinkAttrs: tab.props?.titleLinkAttrs,\n titleLinkClass: tab.props?.titleLinkClass,\n onClick: tab.props?.onClick,\n active,\n navItemClasses: [\n {\n active,\n disabled: !(tab.props?.disabled === false || tab.props?.disabled === undefined),\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n }\n return tabsInternal.value.map((_tab) => {\n const tab = unref(_tab)\n const active = tab.id === activeId.value\n\n return {\n ...tab,\n active,\n navItemClasses: [\n {\n active,\n disabled: tab.disabled,\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n})\n\nlet initialized = false\nlet updateInitialActiveIndex = false\nlet updateInitialActiveId = false\nlet delayedTabSelection = false\n\n// Check if we need to delay tab selection:\n// - We have v-model:index (activeIndex) but no v-model (activeId)\n// - AND tabs don't have explicit IDs (will use generated IDs)\n// - AND we have tabs to select from\nconst needsDelayedSelection =\n activeIndex.value > -1 &&\n !activeId.value &&\n !hasExplicitIds.value &&\n tabElementsArray.value.length > 0\n\nif (needsDelayedSelection) {\n // Delay tab selection until children register with their generated IDs\n delayedTabSelection = true\n updateInitialActiveId = true\n} else if (activeIndex.value === -1 && activeId.value) {\n if (tabs.value.findIndex((t) => t.id === activeId.value) !== -1) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n } else {\n updateInitialActiveIndex = true\n }\n} else if (activeIndex.value > -1 && !activeId.value) {\n if (tabs.value[activeIndex.value]?.id) {\n activeId.value = tabs.value[activeIndex.value]?.id\n } else {\n updateInitialActiveId = true\n }\n} else if (activeIndex.value === -1 && !activeId.value && !isChildActive.value) {\n activeIndex.value = tabs.value.findIndex((t) => t.disabled === undefined || t.disabled === false)\n activeId.value = tabs.value[activeIndex.value]?.id\n} else if (activeIndex.value === -1 && !activeId.value && isChildActive.value) {\n activeIndex.value = tabs.value.findIndex(\n (t) =>\n t.active !== undefined &&\n t.active !== false &&\n (t.disabled === undefined || t.disabled === false)\n )\n activeId.value = tabs.value[activeIndex.value]?.id\n}\n\nfunction updateInitialIndexAndId() {\n // we get the computedIds after registering the tabs\n if (updateInitialActiveIndex) {\n const index = tabs.value.findIndex((t) => t.id === activeId.value)\n if (index !== -1) {\n nextTick(() => {\n activeIndex.value = index\n updateInitialActiveIndex = false\n })\n }\n }\n if (updateInitialActiveId) {\n // Wait for tabs to be registered if we're doing delayed selection\n if (delayedTabSelection && tabsInternal.value.length === 0) {\n // Children haven't registered yet, wait\n return\n }\n if (activeIndex.value > -1 && tabs.value[activeIndex.value]?.id) {\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n updateInitialActiveId = false\n delayedTabSelection = false\n })\n }\n }\n}\n\nupdateInitialIndexAndId()\n\nconst showEmpty = computed(() => !(tabs?.value && tabs.value.length > 0))\n\nconst tabContentProps = computed(() => ({\n contentClass: props.contentClass,\n showEmpty: showEmpty.value,\n card: props.card,\n}))\n\nconst computedClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-items-start': props.vertical,\n}))\n\nconst alignment = useAlignment(() => props.align)\n\nconst navTabsClasses = computed(() => ({\n 'nav-pills': props.pills,\n 'nav-underline': props.underline,\n 'flex-column me-3': props.vertical,\n [alignment.value]: props.align !== undefined,\n 'nav-fill': props.fill,\n 'card-header-tabs': props.card && !props.pills && !props.underline,\n 'card-header-pills': props.card && props.pills,\n 'nav-justified': props.justified,\n 'nav-tabs': !props.noNavStyle && !props.pills && !props.underline,\n 'small': props.small,\n}))\n\nconst handleClick = (event: Readonly<MouseEvent>, index: number) => {\n if (\n index >= 0 &&\n !tabs.value[index]?.disabled &&\n tabs.value[index]?.onClick &&\n typeof tabs.value[index].onClick === 'function'\n ) {\n tabs.value[index].onClick?.(event)\n if (event.defaultPrevented) {\n getSafeDocument()?.getElementById(tabs.value[index].buttonId)?.blur()\n return\n }\n }\n activeIndex.value = index\n}\n\nconst keynav = (e: Event, direction: number) => {\n if (tabs.value.length <= 0 || props.noKeyNav) return\n e.preventDefault()\n e.stopPropagation()\n activeIndex.value = nextIndex(activeIndex.value + direction, direction)\n nextTick(() => {\n if (activeIndex.value >= 0) {\n getSafeDocument()?.getElementById(tabs.value[activeIndex.value]?.buttonId)?.focus()\n }\n })\n}\n\nconst nextIndex = (start: number, direction: number) => {\n let index = start\n let minIdx = -1\n let maxIdx = -1\n\n for (let i = 0; i < tabs.value.length; i++) {\n if (!tabs.value[i]?.disabled) {\n if (minIdx === -1) minIdx = i\n maxIdx = i\n }\n }\n\n while (index >= minIdx && index <= maxIdx && tabs.value[index]?.disabled) {\n index += direction\n }\n\n if (index < minIdx) index = minIdx\n if (index > maxIdx) index = maxIdx\n\n return index\n}\n\nlet previousIndex: number | undefined\nlet isReverting = false\nwatch(activeIndex, (newValue, oldValue) => {\n // Early exit if there are no tabs or all tabs are disabled\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n\n // If we're reverting due to a prevented event, don't process further\n if (isReverting) {\n isReverting = false\n return\n }\n // Calculate the next valid index\n const index = nextIndex(newValue, newValue > oldValue ? 1 : -1)\n if (index !== newValue) {\n // If the index is not the same as the new value, set the previous index to the old value\n // this is to prevent the event from being emitted twice\n previousIndex = oldValue\n activeIndex.value = index\n return\n }\n // Emit the activate-tab event\n const tabEvent = new BvEvent('activate-tab', {cancelable: true})\n emit('activate-tab', {\n newTabId: tabs.value[index]?.id,\n prevTabId: tabs.value[previousIndex ?? oldValue]?.id,\n newTabIndex: index,\n prevTabIndex: previousIndex ?? oldValue,\n event: tabEvent,\n })\n // If the event is prevented, revert to the previous index\n if (tabEvent.defaultPrevented) {\n isReverting = true\n const prev = previousIndex ?? oldValue ?? nextIndex(0, 1)\n previousIndex = undefined\n // Update the active id this will also trigger the activeId watch which will update the activeIndex\n // this is to make sure we handle case that starts with id change.\n if (activeId.value !== tabs.value[prev]?.id) {\n activeId.value = tabs.value[prev]?.id\n }\n nextTick(() => {\n if (prev >= 0) {\n getSafeDocument()?.getElementById(tabs.value[prev]?.buttonId)?.focus()\n }\n })\n return\n }\n\n // Update the active id\n if (activeId.value !== tabs.value[index]?.id) {\n activeId.value = tabs.value[index]?.id\n }\n previousIndex = undefined\n})\n\nwatch(activeId, (newValue, oldValue) => {\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n const index = tabs.value.findIndex((t) => t.id === newValue)\n // If the new tab is the same as the current tab, do nothing\n if (index === activeIndex.value) return\n const oldIndex = tabs.value.findIndex((t) => t.id === oldValue)\n // If the new tab is disabled, find the next enabled tab\n if (tabs.value[index]?.disabled) {\n // activeIndex watcher will update the activeId to the next enabled tab\n activeIndex.value = nextIndex(index, index > oldIndex ? 1 : -1)\n return\n }\n // If the new tab is not found, find the first enabled tab\n if (index === -1) {\n // activeIndex watcher will update the activeId to the first enabled tab\n activeIndex.value = nextIndex(0, 1)\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n })\n return\n }\n // change to the next tab\n activeIndex.value = index\n})\n\nconst registerTab = (tab: Ref<TabType>) => {\n const idx = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n if (idx === -1) {\n tabsInternal.value.push(tab)\n if (initialized) {\n nextTick(() => {\n sortTabs()\n })\n } else {\n // If we're doing delayed tab selection, try to update now that a tab has registered\n if (delayedTabSelection) {\n nextTick(() => {\n updateInitialIndexAndId()\n })\n }\n }\n } else {\n tabsInternal.value[idx] = tab\n if (initialized) {\n // sort just in case the tab was moved\n sortTabs()\n }\n }\n const idx2 = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n return tab.value.id ?? (!initialized ? initialIds.value[idx2] : tab.value.internalId)\n}\n\nonMounted(() => {\n updateInitialIndexAndId()\n sortTabs()\n initialized = true\n})\n\nconst sortTabs = () => {\n tabsInternal.value.sort((a, b) => sortSlotElementsByPosition(a.value.el.value, b.value.el.value))\n if (\n activeId.value &&\n activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value)\n ) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n }\n}\n\nconst unregisterTab = (id: string) => {\n tabsInternal.value = tabsInternal.value.filter((t) => t.value.internalId !== id)\n}\n\nprovide(tabsInjectionKey, {\n lazy: toRef(() => props.lazy),\n card: toRef(() => props.card),\n noFade: toRef(() => props.noFade),\n activeTabClass: toRef(() => props.activeTabClass),\n inactiveTabClass: toRef(() => props.inactiveTabClass),\n tabClass: toRef(() => props.tabClass),\n registerTab,\n unregisterTab,\n activeId,\n activateTab: (internalId) => {\n const idx = tabs.value.findIndex((t) => t.internalId === internalId)\n if (internalId === undefined || idx === -1) {\n activeIndex.value = nextIndex(0, 1)\n return\n }\n activeIndex.value = idx\n },\n})\n</script>\n","<template>\n <component :is=\"props.tag\" :id=\"props.id\" class=\"tabs\" :class=\"computedClasses\">\n <BTabsTabContent v-if=\"props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n <div\n :class=\"[\n props.navWrapperClass,\n {'card-header': props.card, 'ms-auto': vertical && props.end},\n ]\"\n >\n <ul\n class=\"nav\"\n :class=\"[navTabsClasses, props.navClass]\"\n role=\"tablist\"\n :aria-orientation=\"props.vertical ? 'vertical' : 'horizontal'\"\n >\n <slot name=\"tabs-start\" />\n <li\n v-for=\"(tab, idx) in tabs\"\n :key=\"tab.id ?? tab.internalId\"\n class=\"nav-item\"\n :class=\"tab.titleItemClass\"\n role=\"presentation\"\n >\n <button\n :id=\"tab.buttonId\"\n class=\"nav-link\"\n :class=\"[tab.navItemClasses, tab.titleLinkClass, tab.active ? props.activeNavLinkClass : props.inactiveNavLinkClass]\"\n role=\"tab\"\n :aria-controls=\"tab.id\"\n :aria-selected=\"tab.active\"\n :disabled=\"tab.disabled\"\n :tabindex=\"props.noKeyNav ? undefined : tab.active ? undefined : -1\"\n type=\"button\"\n v-bind=\"tab.titleLinkAttrs\"\n @keydown.left.exact=\"!props.vertical && keynav($event, -1)\"\n @keydown.left.shift=\"!props.vertical && keynav($event, -999)\"\n @keydown.up.exact=\"props.vertical && keynav($event, -1)\"\n @keydown.up.shift=\"props.vertical && keynav($event, -999)\"\n @keydown.right.exact=\"!props.vertical && keynav($event, 1)\"\n @keydown.right.shift=\"!props.vertical && keynav($event, 999)\"\n @keydown.down.exact=\"props.vertical && keynav($event, 1)\"\n @keydown.down.shift=\"props.vertical && keynav($event, 999)\"\n @keydown.page-up=\"keynav($event, -999)\"\n @keydown.page-down=\"keynav($event, 999)\"\n @keydown.home=\"keynav($event, -999)\"\n @keydown.end=\"keynav($event, 999)\"\n @click.stop=\"(e) => handleClick(e, idx)\"\n >\n <component :is=\"tab.titleComponent\" v-if=\"tab.titleComponent\" />\n <template v-else>\n {{ tab.title }}\n </template>\n </button>\n </li>\n <slot name=\"tabs-end\" />\n </ul>\n </div>\n <BTabsTabContent v-if=\"!props.end\" v-bind=\"tabContentProps\">\n <slot />\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </BTabsTabContent>\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n type Ref,\n ref,\n toRef,\n unref,\n type VNode,\n watch,\n} from 'vue'\nimport {BvEvent} from '../../utils/classes'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useId} from '../../composables/useId'\nimport type {TabType, BTabsProps, BTabsEmits, BTabsSlots} from '../../types'\nimport {tabsInjectionKey} from '../../utils/keys'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {getSafeDocument, sortSlotElementsByPosition} from '../../utils/dom'\nimport {flattenFragments} from '../../utils/flattenFragments'\nimport BTab from './BTab.vue'\nimport BTabsTabContent from '../BTabsTabContent.vue'\n\nconst _props = withDefaults(defineProps<Omit<BTabsProps, 'modelValue' | 'activeIndex'>>(), {\n activeNavItemClass: undefined,\n activeNavLinkClass: undefined,\n activeTabClass: undefined,\n align: undefined,\n card: false,\n contentClass: undefined,\n end: false,\n fill: false,\n id: undefined,\n inactiveNavItemClass: undefined,\n inactiveNavLinkClass: undefined,\n inactiveTabClass: undefined,\n justified: false,\n lazy: false,\n navClass: undefined,\n navItemClass: undefined,\n navWrapperClass: undefined,\n noFade: false,\n noKeyNav: false,\n noNavStyle: false,\n pills: false,\n small: false,\n tag: 'div',\n tabClass: undefined,\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BTabs')\nconst emit = defineEmits<BTabsEmits>()\nconst slots = defineSlots<BTabsSlots>()\n\nconst activeIndex = defineModel<Exclude<BTabsProps['index'], undefined>>('index', {\n default: -1,\n})\nconst activeId = defineModel<BTabsProps['modelValue']>({\n default: undefined,\n})\n\nconst tabsInternal = ref<Ref<TabType>[]>([])\n\nconst tabElementsArray = ref<VNode[]>([])\n\nconst isChildActive = ref(false)\nconst initialIds = ref<string[]>([])\nconst hasExplicitIds = ref(false)\n\nconst updateTabElementsArray = () => {\n const tabElements = flattenFragments(slots.default?.({}) ?? [])\n tabElementsArray.value = (Array.isArray(tabElements) ? tabElements : [tabElements]).filter(\n (tab) => tab.type === BTab\n )\n // only get the ids once in setup context\n if (initialIds.value.length === 0) {\n // we need to get the ids of the tabs before they are registered. After that we use the internalId for the tabpane\n initialIds.value = tabElementsArray.value.map((tab) =>\n unref(useId(() => tab.props?.id, 'tabpane'))\n )\n // Check if any tab has an explicit ID\n hasExplicitIds.value = tabElementsArray.value.some((tab) => tab.props?.id !== undefined)\n }\n isChildActive.value = tabElementsArray.value.some(\n (tab) => tab.props?.active !== undefined && tab.props?.active !== false\n )\n}\nupdateTabElementsArray()\n\nwatch(\n () => slots.default?.({}),\n () => {\n updateTabElementsArray()\n nextTick(() => {\n sortTabs()\n })\n }\n)\n\nconst tabs = computed(() => {\n if (tabsInternal.value.length === 0) {\n // fail back on the slot elements, the children haven't been registered yet\n const _activeIndex = tabElementsArray.value.findIndex(\n (tab) =>\n (tab.props?.active !== undefined &&\n (tab.props.disabled === false || tab.props.disabled === undefined)) ||\n (activeId.value && tab.props?.id === activeId.value)\n )\n return tabElementsArray.value.map((tab, index) => {\n const active =\n _activeIndex !== -1\n ? index === _activeIndex\n : activeIndex.value > -1\n ? index === activeIndex.value\n : index === 0\n return {\n id: tab.props?.id ?? initialIds.value[index],\n internalId: `premount-${index}`, // temporary id for the tab\n buttonId: tab.props?.buttonId,\n disabled: tab.props?.disabled,\n title: tab.props?.title,\n titleComponent: (tab.children as {title: unknown})?.title,\n titleItemClass: tab.props?.titleItemClass,\n titleLinkAttrs: tab.props?.titleLinkAttrs,\n titleLinkClass: tab.props?.titleLinkClass,\n onClick: tab.props?.onClick,\n active,\n navItemClasses: [\n {\n active,\n disabled: !(tab.props?.disabled === false || tab.props?.disabled === undefined),\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n }\n return tabsInternal.value.map((_tab) => {\n const tab = unref(_tab)\n const active = tab.id === activeId.value\n\n return {\n ...tab,\n active,\n navItemClasses: [\n {\n active,\n disabled: tab.disabled,\n },\n active ? props.activeNavItemClass : props.inactiveNavItemClass,\n props.navItemClass,\n ],\n }\n })\n})\n\nlet initialized = false\nlet updateInitialActiveIndex = false\nlet updateInitialActiveId = false\nlet delayedTabSelection = false\n\n// Check if we need to delay tab selection:\n// - We have v-model:index (activeIndex) but no v-model (activeId)\n// - AND tabs don't have explicit IDs (will use generated IDs)\n// - AND we have tabs to select from\nconst needsDelayedSelection =\n activeIndex.value > -1 &&\n !activeId.value &&\n !hasExplicitIds.value &&\n tabElementsArray.value.length > 0\n\nif (needsDelayedSelection) {\n // Delay tab selection until children register with their generated IDs\n delayedTabSelection = true\n updateInitialActiveId = true\n} else if (activeIndex.value === -1 && activeId.value) {\n if (tabs.value.findIndex((t) => t.id === activeId.value) !== -1) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n } else {\n updateInitialActiveIndex = true\n }\n} else if (activeIndex.value > -1 && !activeId.value) {\n if (tabs.value[activeIndex.value]?.id) {\n activeId.value = tabs.value[activeIndex.value]?.id\n } else {\n updateInitialActiveId = true\n }\n} else if (activeIndex.value === -1 && !activeId.value && !isChildActive.value) {\n activeIndex.value = tabs.value.findIndex((t) => t.disabled === undefined || t.disabled === false)\n activeId.value = tabs.value[activeIndex.value]?.id\n} else if (activeIndex.value === -1 && !activeId.value && isChildActive.value) {\n activeIndex.value = tabs.value.findIndex(\n (t) =>\n t.active !== undefined &&\n t.active !== false &&\n (t.disabled === undefined || t.disabled === false)\n )\n activeId.value = tabs.value[activeIndex.value]?.id\n}\n\nfunction updateInitialIndexAndId() {\n // we get the computedIds after registering the tabs\n if (updateInitialActiveIndex) {\n const index = tabs.value.findIndex((t) => t.id === activeId.value)\n if (index !== -1) {\n nextTick(() => {\n activeIndex.value = index\n updateInitialActiveIndex = false\n })\n }\n }\n if (updateInitialActiveId) {\n // Wait for tabs to be registered if we're doing delayed selection\n if (delayedTabSelection && tabsInternal.value.length === 0) {\n // Children haven't registered yet, wait\n return\n }\n if (activeIndex.value > -1 && tabs.value[activeIndex.value]?.id) {\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n updateInitialActiveId = false\n delayedTabSelection = false\n })\n }\n }\n}\n\nupdateInitialIndexAndId()\n\nconst showEmpty = computed(() => !(tabs?.value && tabs.value.length > 0))\n\nconst tabContentProps = computed(() => ({\n contentClass: props.contentClass,\n showEmpty: showEmpty.value,\n card: props.card,\n}))\n\nconst computedClasses = computed(() => ({\n 'd-flex': props.vertical,\n 'align-items-start': props.vertical,\n}))\n\nconst alignment = useAlignment(() => props.align)\n\nconst navTabsClasses = computed(() => ({\n 'nav-pills': props.pills,\n 'nav-underline': props.underline,\n 'flex-column me-3': props.vertical,\n [alignment.value]: props.align !== undefined,\n 'nav-fill': props.fill,\n 'card-header-tabs': props.card && !props.pills && !props.underline,\n 'card-header-pills': props.card && props.pills,\n 'nav-justified': props.justified,\n 'nav-tabs': !props.noNavStyle && !props.pills && !props.underline,\n 'small': props.small,\n}))\n\nconst handleClick = (event: Readonly<MouseEvent>, index: number) => {\n if (\n index >= 0 &&\n !tabs.value[index]?.disabled &&\n tabs.value[index]?.onClick &&\n typeof tabs.value[index].onClick === 'function'\n ) {\n tabs.value[index].onClick?.(event)\n if (event.defaultPrevented) {\n getSafeDocument()?.getElementById(tabs.value[index].buttonId)?.blur()\n return\n }\n }\n activeIndex.value = index\n}\n\nconst keynav = (e: Event, direction: number) => {\n if (tabs.value.length <= 0 || props.noKeyNav) return\n e.preventDefault()\n e.stopPropagation()\n activeIndex.value = nextIndex(activeIndex.value + direction, direction)\n nextTick(() => {\n if (activeIndex.value >= 0) {\n getSafeDocument()?.getElementById(tabs.value[activeIndex.value]?.buttonId)?.focus()\n }\n })\n}\n\nconst nextIndex = (start: number, direction: number) => {\n let index = start\n let minIdx = -1\n let maxIdx = -1\n\n for (let i = 0; i < tabs.value.length; i++) {\n if (!tabs.value[i]?.disabled) {\n if (minIdx === -1) minIdx = i\n maxIdx = i\n }\n }\n\n while (index >= minIdx && index <= maxIdx && tabs.value[index]?.disabled) {\n index += direction\n }\n\n if (index < minIdx) index = minIdx\n if (index > maxIdx) index = maxIdx\n\n return index\n}\n\nlet previousIndex: number | undefined\nlet isReverting = false\nwatch(activeIndex, (newValue, oldValue) => {\n // Early exit if there are no tabs or all tabs are disabled\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n\n // If we're reverting due to a prevented event, don't process further\n if (isReverting) {\n isReverting = false\n return\n }\n // Calculate the next valid index\n const index = nextIndex(newValue, newValue > oldValue ? 1 : -1)\n if (index !== newValue) {\n // If the index is not the same as the new value, set the previous index to the old value\n // this is to prevent the event from being emitted twice\n previousIndex = oldValue\n activeIndex.value = index\n return\n }\n // Emit the activate-tab event\n const tabEvent = new BvEvent('activate-tab', {cancelable: true})\n emit('activate-tab', {\n newTabId: tabs.value[index]?.id,\n prevTabId: tabs.value[previousIndex ?? oldValue]?.id,\n newTabIndex: index,\n prevTabIndex: previousIndex ?? oldValue,\n event: tabEvent,\n })\n // If the event is prevented, revert to the previous index\n if (tabEvent.defaultPrevented) {\n isReverting = true\n const prev = previousIndex ?? oldValue ?? nextIndex(0, 1)\n previousIndex = undefined\n // Update the active id this will also trigger the activeId watch which will update the activeIndex\n // this is to make sure we handle case that starts with id change.\n if (activeId.value !== tabs.value[prev]?.id) {\n activeId.value = tabs.value[prev]?.id\n }\n nextTick(() => {\n if (prev >= 0) {\n getSafeDocument()?.getElementById(tabs.value[prev]?.buttonId)?.focus()\n }\n })\n return\n }\n\n // Update the active id\n if (activeId.value !== tabs.value[index]?.id) {\n activeId.value = tabs.value[index]?.id\n }\n previousIndex = undefined\n})\n\nwatch(activeId, (newValue, oldValue) => {\n if (tabs.value.length <= 0 || tabs.value.filter((t) => !t.disabled).length <= 0) {\n return\n }\n const index = tabs.value.findIndex((t) => t.id === newValue)\n // If the new tab is the same as the current tab, do nothing\n if (index === activeIndex.value) return\n const oldIndex = tabs.value.findIndex((t) => t.id === oldValue)\n // If the new tab is disabled, find the next enabled tab\n if (tabs.value[index]?.disabled) {\n // activeIndex watcher will update the activeId to the next enabled tab\n activeIndex.value = nextIndex(index, index > oldIndex ? 1 : -1)\n return\n }\n // If the new tab is not found, find the first enabled tab\n if (index === -1) {\n // activeIndex watcher will update the activeId to the first enabled tab\n activeIndex.value = nextIndex(0, 1)\n nextTick(() => {\n activeId.value = tabs.value[activeIndex.value]?.id\n })\n return\n }\n // change to the next tab\n activeIndex.value = index\n})\n\nconst registerTab = (tab: Ref<TabType>) => {\n const idx = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n if (idx === -1) {\n tabsInternal.value.push(tab)\n if (initialized) {\n nextTick(() => {\n sortTabs()\n })\n } else {\n // If we're doing delayed tab selection, try to update now that a tab has registered\n if (delayedTabSelection) {\n nextTick(() => {\n updateInitialIndexAndId()\n })\n }\n }\n } else {\n tabsInternal.value[idx] = tab\n if (initialized) {\n // sort just in case the tab was moved\n sortTabs()\n }\n }\n const idx2 = tabsInternal.value.findIndex((t) => t.value.internalId === tab.value.internalId)\n return tab.value.id ?? (!initialized ? initialIds.value[idx2] : tab.value.internalId)\n}\n\nonMounted(() => {\n updateInitialIndexAndId()\n sortTabs()\n initialized = true\n})\n\nconst sortTabs = () => {\n tabsInternal.value.sort((a, b) => sortSlotElementsByPosition(a.value.el.value, b.value.el.value))\n if (\n activeId.value &&\n activeIndex.value !== tabs.value.findIndex((t) => t.id === activeId.value)\n ) {\n activeIndex.value = tabs.value.findIndex((t) => t.id === activeId.value)\n }\n}\n\nconst unregisterTab = (id: string) => {\n tabsInternal.value = tabsInternal.value.filter((t) => t.value.internalId !== id)\n}\n\nprovide(tabsInjectionKey, {\n lazy: toRef(() => props.lazy),\n card: toRef(() => props.card),\n noFade: toRef(() => props.noFade),\n activeTabClass: toRef(() => props.activeTabClass),\n inactiveTabClass: toRef(() => props.inactiveTabClass),\n tabClass: toRef(() => props.tabClass),\n registerTab,\n unregisterTab,\n activeId,\n activateTab: (internalId) => {\n const idx = tabs.value.findIndex((t) => t.internalId === internalId)\n if (internalId === undefined || idx === -1) {\n activeIndex.value = nextIndex(0, 1)\n return\n }\n activeIndex.value = idx\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ,YAAY,SAAQ,MAAM;EACxC,MAAM,QAAQ,SAAA;EACd,MAAM,QAAQ,SAAS;EAEvB,MAAM,cAAc,SAAoD,SAAC,QAExE;EAED,MAAM,aAAa,OAAO,kBAAkB,IAAI;EAEhD,MAAM,UAAU,IAAI,MAAM,EAAE;EAC5B,M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