bootstrap-vue-next 0.45.4 → 0.45.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BAutocomplete-BCOfyy8g.js → BAutocomplete-D8Qkcqcy.js} +2 -2
- package/dist/{BAutocomplete-BCOfyy8g.js.map → BAutocomplete-D8Qkcqcy.js.map} +1 -1
- package/dist/{BAutocomplete-j3KJbBFs.mjs → BAutocomplete-DRzLhACU.mjs} +2 -2
- package/dist/{BAutocomplete-j3KJbBFs.mjs.map → BAutocomplete-DRzLhACU.mjs.map} +1 -1
- package/dist/{BForm-CriVh5cC.js → BForm-B0bPQ4kx.js} +2 -2
- package/dist/{BForm-CriVh5cC.js.map → BForm-B0bPQ4kx.js.map} +1 -1
- package/dist/{BForm-__5Chigr.mjs → BForm-CoQKIJzv.mjs} +2 -2
- package/dist/{BForm-__5Chigr.mjs.map → BForm-CoQKIJzv.mjs.map} +1 -1
- package/dist/{BFormSelect-CUkyKBNN.js → BFormSelect-CtcsnTlz.js} +2 -2
- package/dist/{BFormSelect-CUkyKBNN.js.map → BFormSelect-CtcsnTlz.js.map} +1 -1
- package/dist/{BFormSelect-Co-ZU8yY.mjs → BFormSelect-eS-C3M0J.mjs} +2 -2
- package/dist/{BFormSelect-Co-ZU8yY.mjs.map → BFormSelect-eS-C3M0J.mjs.map} +1 -1
- package/dist/bootstrap-vue-next.mjs +3 -3
- package/dist/bootstrap-vue-next.umd.js +3 -3
- package/dist/src/components/BAutocomplete/index.mjs +1 -1
- package/dist/src/components/BAutocomplete/index.umd.js +1 -1
- package/dist/src/components/BForm/index.mjs +1 -1
- package/dist/src/components/BForm/index.umd.js +1 -1
- package/dist/src/components/BFormSelect/index.mjs +1 -1
- package/dist/src/components/BFormSelect/index.umd.js +1 -1
- package/dist/src/components/index.mjs +3 -3
- package/dist/src/components/index.umd.js +3 -3
- package/dist/{useFormSelect-C0nvno12.mjs → useFormSelect-BM0rsjni.mjs} +9 -2
- package/dist/useFormSelect-BM0rsjni.mjs.map +1 -0
- package/dist/{useFormSelect-CjAziZpu.js → useFormSelect-ClmzGzOy.js} +9 -2
- package/dist/useFormSelect-ClmzGzOy.js.map +1 -0
- package/package.json +1 -1
- package/dist/useFormSelect-C0nvno12.mjs.map +0 -1
- package/dist/useFormSelect-CjAziZpu.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-CoQrYLCe.js");
|
|
2
2
|
const require_useDefaults = require("./useDefaults-DsLf4iRY.js");
|
|
3
3
|
const require_useId = require("./useId-DHrBgM7P.js");
|
|
4
|
-
const require_useFormSelect = require("./useFormSelect-
|
|
4
|
+
const require_useFormSelect = require("./useFormSelect-ClmzGzOy.js");
|
|
5
5
|
require("./BForm-K67Ciyza.js");
|
|
6
6
|
const require_BFormSelectOption = require("./BFormSelectOption-CQ3j1Q5j.js");
|
|
7
7
|
require("./BFormValidFeedback-BhkEhSa0.js");
|
|
@@ -120,4 +120,4 @@ Object.defineProperty(exports, "BFormFloatingLabel_default", {
|
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
-
//# sourceMappingURL=BForm-
|
|
123
|
+
//# sourceMappingURL=BForm-B0bPQ4kx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BForm-CriVh5cC.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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ,oBAAA,YARC,SAQmB,gBAAe;EAEjD,MAAM,aAAa,cAAA,YAAY,MAAM,IAAI,WAAU;EAEnD,MAAM,EAAC,mBAAmB,cAAa,sBAAA,oBAC/B,MAAM,UAAA,GAAA,IAAA,iBACI;GAAC,GAAG;GAAO,cAAc;GAAW,YAAY;GAAQ,EAAC,CAC3E;EAEA,MAAM,yBAAA,GAAA,IAAA,gBAEJ,kBAAkB,MAAM,QAAQ,QAAQ,CAAC,UAAU,IAAI,CAA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AA,oBAApB,UAAS,CAAA,CAAA,CAAA,CAAA;oCAG/B,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;EESZ,MAAM,QAAQ,oBAAA,YALC,SAKmB,qBAAoB;;4DAZ9C,OAPN,YAOM,EAAA,GAAA,IAAA,YANI,KAAA,QAAA,UAAA,GAAA,GAAA,IAAA,oBAKA,SAAA,EAJA,MAAA,GAAA,IAAA,OAAK,MAAK,CAAC,UAAA,EAAA,EAAA,GAAA,IAAA,YAGV,KAAA,QAAA,SAAA,EAAA,QAAA,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,OADF,MAAK,CAAC,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BForm-B0bPQ4kx.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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ,oBAAA,YARC,SAQmB,gBAAe;EAEjD,MAAM,aAAa,cAAA,YAAY,MAAM,IAAI,WAAU;EAEnD,MAAM,EAAC,mBAAmB,cAAa,sBAAA,oBAC/B,MAAM,UAAA,GAAA,IAAA,iBACI;GAAC,GAAG;GAAO,cAAc;GAAW,YAAY;GAAQ,EAAC,CAC3E;EAEA,MAAM,yBAAA,GAAA,IAAA,gBAEJ,kBAAkB,MAAM,QAAQ,QAAQ,CAAC,UAAU,IAAI,CAAA,CACzD;;4DApCa,YAAA,EAZA,KAAA,GAAA,IAAA,OAAI,WAAU,EAAA,EAAA;wBACF,KAAA,QAAA,QAAA;2DASD,IAAA,UAAA,OAAA,GAAA,IAAA,YAPQ,sBAAA,QAAlB,QAAQ,UAAK;uDAOH,0BAAA,4BAAA,GAAA,IAAA,YAAA,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EACH,OAAM,EAAA;sCAIP,E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MAAA,GAAA,IAAA,OAAK,MAAK,CAAC,UAAA,EAAA,EAAA,GAAA,IAAA,YAGV,KAAA,QAAA,SAAA,EAAA,QAAA,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,OADF,MAAK,CAAC,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as useDefaults } from "./useDefaults-BKgBaqOV.mjs";
|
|
2
2
|
import { t as useId$1 } from "./useId-BKZFSYm8.mjs";
|
|
3
|
-
import { t as useFormSelect } from "./useFormSelect-
|
|
3
|
+
import { t as useFormSelect } from "./useFormSelect-BM0rsjni.mjs";
|
|
4
4
|
import "./BForm-CpNuvbIt.mjs";
|
|
5
5
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-B3BO50XB.mjs";
|
|
6
6
|
import "./BFormValidFeedback-DWkakzVO.mjs";
|
|
@@ -108,4 +108,4 @@ var BFormFloatingLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
108
108
|
//#endregion
|
|
109
109
|
export { BFormDatalist_default as n, BFormFloatingLabel_default as t };
|
|
110
110
|
|
|
111
|
-
//# sourceMappingURL=BForm-
|
|
111
|
+
//# sourceMappingURL=BForm-CoQKIJzv.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BForm-__5Chigr.mjs","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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ,YARC,SAQmB,gBAAe;EAEjD,MAAM,aAAa,cAAY,MAAM,IAAI,WAAU;EAEnD,MAAM,EAAC,mBAAmB,cAAa,oBAC/B,MAAM,SACZ,gBAAgB;GAAC,GAAG;GAAO,cAAc;GAAW,YAAY;GAAQ,EAAC,CAC3E;EAEA,MAAM,wBAAwB,eAE5B,kBAAkB,MAAM,QAAQ,QAAQ,CAAC,UA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mB,qBAAoB;;uBAnBpD,mBAOM,OAPN,YAOM,CANJ,WAAQ,KAAA,QAAA,UAAA,EACR,mBAIQ,SAAA,EAJA,KAAK,MAAA,MAAK,CAAC,UAAA,EAAA,CACjB,WAEO,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBADF,MAAA,MAAK,CAAC,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BForm-CoQKIJzv.mjs","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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\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 {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BFormFloatingLabelProps>(), {\n label: undefined,\n labelFor: undefined,\n text: undefined,\n})\nconst props = useDefaults(_props, 'BFormFloatingLabel')\ndefineSlots<BFormFloatingLabelSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ,YARC,SAQmB,gBAAe;EAEjD,MAAM,aAAa,cAAY,MAAM,IAAI,WAAU;EAEnD,MAAM,EAAC,mBAAmB,cAAa,oBAC/B,MAAM,SACZ,gBAAgB;GAAC,GAAG;GAAO,cAAc;GAAW,YAAY;GAAQ,EAAC,CAC3E;EAEA,MAAM,wBAAwB,eAE5B,kBAAkB,MAAM,QAAQ,QAAQ,CAAC,UAAU,IAAI,CAAA,CACzD;;uBAhDE,mBAYW,YAAA,EAZA,IAAI,MAAA,WAAU,EAAA,EAAA;IACvB,WAAqB,KAAA,QAAA,QAAA;sBACrB,mBAQoB,UAAA,MAAA,WAPQ,sBAAA,QAAlB,QAAQ,UAAK;yBADvB,YAQoB,2BARpB,WAQoB,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EACH,OAAM,EAAA;6BAIP,CAFP,WAEO,KAAA,QAAA,UAFP,WAEO,EAAA,SAAA,MAAA,EAFqB,OAAM,QAE3B,CAAA,gBAAA,gBAAA,UADQ,SAAS,OAAO,OAAI,GAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;IAGrC,WAAQ,KAAA,QAAA,UAAA;;;;;;;;;;;;;;;;;;;;;EEsBZ,MAAM,QAAQ;EAcd,MAAM,oBAAoB,eACxB,MAAM,QAAQ,KAAK,OAAO;AACxB,OAAI,OAAO,OAAO,SAChB,QAAO;AAET,OAAI,OAAO,OAAO,SAChB,QAAO,OAAO,GAAE;AAElB,OAAI,OAAO,OAAO,UAChB,QAAO,OAAO,GAAE;AAElB,UAAO;IACL,OAAQ,GAA+B,MAAM;IAC7C,MACI,GAA+B,MAAM,cAA+C;IACxF,UACI,GAA+B,MAAM,kBACvC;IACH;IACF,CACH;EAGA,MAAM,iBAAiB,gBAAgB;GACrC,UAAU,MAAM;GAChB,IAAI,MAAM;GACX,EAAC;;uBAzEA,YAWoB,2BAXpB,WAA2B,eAWP,OAXqB,EAAG,SAAS,kBAAA,OAAA,CAAA,EAAA;IAExC,OAAK,cACO,CAArB,WAAqB,KAAA,QAAA,QAAA,CAAA,CAAA;IAGZ,QAAM,SAAE,cAAS,CAC1B,WAAgD,KAAA,QAAA,UAAA,eAAA,mBAApB,UAAS,CAAA,CAAA,CAAA,CAAA;2BAG/B,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;EESZ,MAAM,QAAQ,YALC,SAKmB,qBAAoB;;uBAnBpD,mBAOM,OAPN,YAOM,CANJ,WAAQ,KAAA,QAAA,UAAA,EACR,mBAIQ,SAAA,EAJA,KAAK,MAAA,MAAK,CAAC,UAAA,EAAA,CACjB,WAEO,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBADF,MAAA,MAAK,CAAC,MAAK,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,GAAA,WAAA,CAAA,CAAA"}
|
|
@@ -5,7 +5,7 @@ const require_useDefaults = require("./useDefaults-DsLf4iRY.js");
|
|
|
5
5
|
const require_useId = require("./useId-DHrBgM7P.js");
|
|
6
6
|
const require_useAriaInvalid = require("./useAriaInvalid-CHHPHNLU.js");
|
|
7
7
|
const require_useStateClass = require("./useStateClass-CXK3nCg9.js");
|
|
8
|
-
const require_useFormSelect = require("./useFormSelect-
|
|
8
|
+
const require_useFormSelect = require("./useFormSelect-ClmzGzOy.js");
|
|
9
9
|
const require_BFormSelectOption = require("./BFormSelectOption-CQ3j1Q5j.js");
|
|
10
10
|
let vue = require("vue");
|
|
11
11
|
//#region src/components/BFormSelect/BFormSelectOptionGroup.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -306,4 +306,4 @@ Object.defineProperty(exports, "BFormSelect_default", {
|
|
|
306
306
|
}
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
//# sourceMappingURL=BFormSelect-
|
|
309
|
+
//# sourceMappingURL=BFormSelect-CtcsnTlz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSelect-CUkyKBNN.js","names":["$attrs"],"sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,oBAAA,YAPC,SAOmB,yBAAwB;EAU1D,MAAM,EAAC,sBAAqB,sBAAA,oBAAoB,MAAM,SAAS,MAAM;;4DA/BxD,YAAA,EAZA,QAAA,GAAA,IAAA,OAAO,MAAK,CAAC,OAAA,EAAA;wBACD,KAAA,QAAA,QAAA;2DASD,IAAA,UAAA,OAAA,GAAA,IAAA,aAAA,GAAA,IAAA,OAPQ,kBAAiB,GAAnC,QAAQ,UAAK;uDAOH,0BAAA,4BAAA,GAAA,IAAA,YAAA,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAA;MAAA,GAC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OAAO,WAAW,YAClB,OAAO,WAAW,YAClB,OAAO,WAAW,UAElB,QAAO,mBAAmB,OAAM;AAElC,aAAO,sBAAsB,OAAgB;;KAEhD;AAIH,WAAO,sBAAsB,GAAY;KAC1C;AAGH,UAAO,aAAa,KAAK,OAAO;AAC9B,QAAI,OAAO,OAAO,YAAY,OAAO,OAAO,YAAY,OAAO,OAAO,UACpE,QAAO,mBAAmB,GAAE;AAG9B,WAAO,sBAAsB,GAAY;KAC1C;IACF;EAID,MAAM,kBAAA,GAAA,IAAA,iBAAiC;GACrC,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,OAAO,MAAM;GACb,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ,OAAO,MAAM;GACd,EAAC;;qDAtJkB,0BAAA,GAAA,IAAA,YAXO,eAWP,OAXqB;gBAAW,WAAA;4EAAU,QAAA;IAAG,SAAS,kBAAA;;IAE3D,QAAA,GAAA,IAAA,eACY,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,QAAA,CAAA,CAAA;IAGZ,SAAA,GAAA,IAAA,UAAQ,cAAS,EAAA,GAAA,IAAA,YACsB,KAAA,QAAA,WAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAApB,UAAS,CAAA,CAAA,CAAA,CAAA;oCAG/B,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"BFormSelect-CtcsnTlz.js","names":["$attrs"],"sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,oBAAA,YAPC,SAOmB,yBAAwB;EAU1D,MAAM,EAAC,sBAAqB,sBAAA,oBAAoB,MAAM,SAAS,MAAM;;4DA/BxD,YAAA,EAZA,QAAA,GAAA,IAAA,OAAO,MAAK,CAAC,OAAA,EAAA;wBACD,KAAA,QAAA,QAAA;2DASD,IAAA,UAAA,OAAA,GAAA,IAAA,aAAA,GAAA,IAAA,OAPQ,kBAAiB,GAAnC,QAAQ,UAAK;uDAOH,0BAAA,4BAAA,GAAA,IAAA,YAAA,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAA;MAAA,GACCA,KAAAA;MAAM,GAAK;MAAM,CAAA,EAAA;sCAItB,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,WAAA,GAAA,IAAA,YAAA,EAAA,SAAA,MAAA,EAFqB,OAAM,QAE3B,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBADF,OAAO,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;wBAGV,KAAA,QAAA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE6DZ,MAAM,QAAQ,oBAAA,YApBC,SAoBmB,cAAa;EAE/C,MAAM,cAAA,GAAA,IAAA,UAAiC,SAAA,aAEtC;EAED,MAAM,aAAa,cAAA,YAAY,MAAM,IAAI,QAAO;EAEhD,MAAM,iBAAA,GAAA,IAAA,QAAuB,aAAA,cAAc,KAAK,GAAG,WAAU;EAC7D,MAAM,cAAA,GAAA,IAAA,gBAA4B,MAAM,aAAa,eAAe,SAAS,SAAS,OAAM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;IAAG,SAAS,kBAAA;;IAE3D,QAAA,GAAA,IAAA,eACY,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,QAAA,CAAA,CAAA;IAGZ,SAAA,GAAA,IAAA,UAAQ,cAAS,EAAA,GAAA,IAAA,YACsB,KAAA,QAAA,WAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAApB,UAAS,CAAA,CAAA,CAAA,CAAA;oCAG/B,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { t as useDefaults } from "./useDefaults-BKgBaqOV.mjs";
|
|
|
4
4
|
import { t as useId$1 } from "./useId-BKZFSYm8.mjs";
|
|
5
5
|
import { t as useAriaInvalid } from "./useAriaInvalid-apOwgexm.mjs";
|
|
6
6
|
import { t as useStateClass } from "./useStateClass-DxlL_m2E.mjs";
|
|
7
|
-
import { t as useFormSelect } from "./useFormSelect-
|
|
7
|
+
import { t as useFormSelect } from "./useFormSelect-BM0rsjni.mjs";
|
|
8
8
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-B3BO50XB.mjs";
|
|
9
9
|
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, defineComponent, guardReactiveProps, inject, mergeModels, mergeProps, normalizeClass, normalizeProps, openBlock, provide, readonly, renderList, renderSlot, toDisplayString, unref, useModel, useTemplateRef, vModelSelect, withCtx, withDirectives } from "vue";
|
|
10
10
|
//#region src/components/BFormSelect/BFormSelectOptionGroup.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -294,4 +294,4 @@ var BFormSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
294
294
|
//#endregion
|
|
295
295
|
export { BFormSelectOptionGroup_default as n, BFormSelect_default as t };
|
|
296
296
|
|
|
297
|
-
//# sourceMappingURL=BFormSelect-
|
|
297
|
+
//# sourceMappingURL=BFormSelect-eS-C3M0J.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BFormSelect-Co-ZU8yY.mjs","names":["$attrs"],"sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,YAPC,SAOmB,yBAAwB;EAU1D,MAAM,EAAC,sBAAqB,oBAAoB,MAAM,SAAS,MAAM;;uBA3CnE,mBAYW,YAAA,EAZA,OAAO,MAAA,MAAK,CAAC,OAAA,EAAA;IACtB,WAAqB,KAAA,QAAA,QAAA;sBACrB,mBAQoB,UAAA,MAAA,WAPQ,MAAA,kBAAiB,GAAnC,QAAQ,UAAK;yBADvB,YAQoB,2BARpB,WAQoB,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAA;MAAA,GACCA,KAAAA;MAAM,GAAK;MAAM,CAAA,EAAA;6BAItB,CAFP,WAEO,KAAA,QAAA,UAFP,WAEO,EAAA,SAAA,MAAA,EAFqB,OAAM,QAE3B,CAAA,gBAAA,gBADF,OAAO,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;IAGlB,WAAQ,KAAA,QAAA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE6DZ,MAAM,QAAQ,YApBC,SAoBmB,cAAa;EAE/C,MAAM,aAAa,SAAoB,SAAA,aAEtC;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,QAAO;EAEhD,MAAM,gBA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sources":["../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectOptionGroup.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelectBase.vue","../src/components/BFormSelect/BFormSelect.vue","../src/components/BFormSelect/BFormSelect.vue"],"sourcesContent":["<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <optgroup :label=\"props.label\">\n <slot name=\"first\" />\n <BFormSelectOption\n v-for=\"(option, index) in normalizedOptions\"\n :key=\"index\"\n v-bind=\"{...$attrs, ...option}\"\n >\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n <slot />\n </optgroup>\n</template>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ComputedRef} from 'vue'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport type {\n BFormSelectOptionGroupProps,\n BFormSelectOptionGroupSlots,\n SelectOption,\n} from '../../types'\n\nconst _props = withDefaults(defineProps<BFormSelectOptionGroupProps>(), {\n disabledField: 'disabled',\n label: undefined,\n options: () => [],\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelectOptionGroup')\ndefineSlots<BFormSelectOptionGroupSlots<T>>()\n\n// The form select context is injected by BFormSelectOption components automatically\n// We don't need to handle the selected value here since each BFormSelectOption\n// will inject the context directly\n\n// Type assertion is needed because useFormSelect is not generic-aware.\n// This is acceptable in the wrapper/base pattern where the wrapper (BFormSelect)\n// handles type-safe normalization before passing to base components.\nconst {normalizedOptions} = useFormSelect(() => props.options, props) as {\n normalizedOptions: ComputedRef<SelectOption<T>[]>\n}\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <select\n :id=\"computedId\"\n ref=\"_input\"\n v-model=\"localValue\"\n :class=\"computedClasses\"\n :name=\"props.name\"\n :form=\"props.form || undefined\"\n :multiple=\"props.multiple || undefined\"\n :size=\"computedSelectSize\"\n :disabled=\"isDisabled\"\n :required=\"props.required || undefined\"\n :aria-required=\"props.required || undefined\"\n :aria-invalid=\"computedAriaInvalid\"\n >\n <slot name=\"first\" />\n <template v-for=\"(option, index) in normalizedOptsWrapper\" :key=\"index\">\n <BFormSelectOptionGroup\n v-if=\"isComplex(option)\"\n :label=\"option.label\"\n :options=\"option.options\"\n :value-field=\"props.valueField\"\n :text-field=\"props.textField\"\n :disabled-field=\"props.disabledField\"\n />\n <BFormSelectOption v-else v-bind=\"option\">\n <slot name=\"option\" v-bind=\"option\">\n {{ option.text }}\n </slot>\n </BFormSelectOption>\n </template>\n <slot />\n </select>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BFormSelectBaseProps} from '../../types'\nimport {computed, inject, provide, readonly, useTemplateRef} from 'vue'\nimport BFormSelectOption from './BFormSelectOption.vue'\nimport BFormSelectOptionGroup from './BFormSelectOptionGroup.vue'\nimport {useAriaInvalid} from '../../composables/useAriaInvalid'\nimport {useFocus, useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useStateClass} from '../../composables/useStateClass'\nimport {useFormSelect} from '../../composables/useFormSelect'\nimport {formGroupKey, formSelectKey} from '../../utils/keys'\n\n/**\n * Base component for BFormSelect - non-generic implementation using useDefaults.\n * Renders a select element with normalized options and option groups.\n * Supports both simple options and complex grouped options.\n */\nconst _props = withDefaults(defineProps<Omit<BFormSelectBaseProps, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [],\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\nconst props = useDefaults(_props, 'BFormSelect')\n\nconst modelValue = defineModel<unknown>({\n default: '',\n})\n\nconst computedId = useId(() => props.id, 'input')\n\nconst formGroupData = inject(formGroupKey, null)?.(computedId)\nconst isDisabled = computed(() => props.disabled || (formGroupData?.disabled.value ?? false))\n\nconst selectSizeNumber = useToNumber(() => props.selectSize)\n\nconst stateClass = useStateClass(() => props.state)\n\nconst input = useTemplateRef('_input')\n\nconst {focused} = useFocus(input, {\n initialValue: props.autofocus,\n})\n\nconst computedClasses = computed(() => [\n stateClass.value,\n {\n 'form-control': props.plain,\n [`form-control-${props.size}`]: props.size !== undefined && props.plain,\n 'form-select': !props.plain,\n [`form-select-${props.size}`]: props.size !== undefined && !props.plain,\n },\n])\n\nconst computedSelectSize = computed(() =>\n !props.plain && selectSizeNumber.value > 0 ? selectSizeNumber.value : undefined\n)\n\nconst computedAriaInvalid = useAriaInvalid(\n () => props.ariaInvalid,\n () => props.state\n)\n\nconst {normalizedOptions, isComplex} = useFormSelect(() => props.options, props)\n\nconst normalizedOptsWrapper = computed(() => normalizedOptions.value)\n\nconst localValue = computed({\n get: () => modelValue.value,\n set: (newValue) => {\n modelValue.value = newValue\n },\n})\n\n// Provide the current model value for child components to inject\nprovide(formSelectKey, {\n modelValue: readonly(localValue),\n})\n\ndefineExpose({\n blur: () => {\n focused.value = false\n },\n element: input,\n focus: () => {\n focused.value = true\n },\n})\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n","<template>\n <BFormSelectBase v-bind=\"forwardedProps\" v-model=\"modelValue\" :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 </BFormSelectBase>\n</template>\n\n<script\n setup\n lang=\"ts\"\n generic=\"\n Options extends readonly (object | string | number | boolean)[] = readonly (\n | object\n | string\n | number\n | boolean\n )[]\n \"\n>\nimport {computed} from 'vue'\nimport BFormSelectBase from './BFormSelectBase.vue'\nimport type {\n BFormSelectProps,\n BFormSelectSlots,\n ComplexSelectOptionRaw,\n OptionsValues,\n SelectOption,\n} from '../../types'\n\n/**\n * Type-safe wrapper component for BFormSelect.\n * Provides generic type safety for options array and strongly-typed modelValue.\n * Uses Options array generic to extract union of all possible values.\n * Normalizes typed options and forwards to BFormSelectBase for rendering.\n * Supports both complex objects and simple scalar types (string, number).\n *\n * For strongly-typed modelValue:\n * - Primitive arrays: modelValue is union of those values (or array if multiple)\n * - Object arrays with 'value' field: modelValue is union of value field types\n * - Use 'as const' on options for literal type inference\n */\nconst props = withDefaults(defineProps<Omit<BFormSelectProps<Options>, 'modelValue'>>(), {\n ariaInvalid: undefined,\n autofocus: false,\n disabled: false,\n disabledField: 'disabled',\n form: undefined,\n id: undefined,\n labelField: 'label',\n multiple: false,\n name: undefined,\n options: () => [] as unknown as Options,\n optionsField: 'options',\n plain: false,\n required: false,\n selectSize: 0,\n size: undefined,\n state: null,\n textField: 'text',\n valueField: 'value',\n})\ndefineSlots<BFormSelectSlots<OptionsValues<Options>>>()\n\n// Type-safe model value - single value or array depending on multiple prop.\n// NOTE: OptionsValues assumes a static \"value\" key; custom valueField is not\n// reflected in the type — modelValue falls back to unknown in that case.\nconst modelValue = defineModel<OptionsValues<Options> | OptionsValues<Options>[] | null>({\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n default: '' as any,\n})\n\n// Normalize a single simple option using custom field names\nconst normalizeSimpleOption = (el: object): SelectOption =>\n ({\n ...(el as Record<string, unknown>),\n value: (el as Record<string, unknown>)[props.valueField as string],\n text: ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ?? '',\n disabled:\n ((el as Record<string, unknown>)[props.disabledField as string] as boolean | undefined) ??\n false,\n }) as SelectOption\n\nconst normalizePrimitive = (el: string | number | boolean): SelectOption =>\n ({value: el, text: String(el), disabled: false}) as SelectOption\n\n// Type-safe normalization of options (supports both simple and complex/grouped)\nconst normalizedOptions = computed(() => {\n const optionsArray = props.options ?? []\n const hasComplexOptions = optionsArray.some(\n (el) =>\n typeof el !== 'string' &&\n typeof el !== 'number' &&\n typeof el !== 'boolean' &&\n (el as Record<string, unknown>)[props.optionsField as string] !== undefined\n )\n\n if (hasComplexOptions) {\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n\n // Check if this is a complex (grouped) option\n const optionsField = (el as Record<string, unknown>)[props.optionsField as string]\n if (optionsField !== undefined && Array.isArray(optionsField)) {\n // Complex option with nested options\n const label =\n ((el as Record<string, unknown>)[props.labelField as string] as string | undefined) ??\n ((el as Record<string, unknown>)[props.textField as string] as string | undefined) ??\n ''\n return {\n label,\n options: optionsField.map((subOpt: unknown) => {\n if (\n typeof subOpt === 'string' ||\n typeof subOpt === 'number' ||\n typeof subOpt === 'boolean'\n ) {\n return normalizePrimitive(subOpt)\n }\n return normalizeSimpleOption(subOpt as object)\n }),\n } as ComplexSelectOptionRaw\n }\n\n // Simple option - spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n }\n\n return optionsArray.map((el) => {\n if (typeof el === 'string' || typeof el === 'number' || typeof el === 'boolean') {\n return normalizePrimitive(el)\n }\n // Spread all properties from the original object to preserve class, data-*, etc.\n return normalizeSimpleOption(el as object)\n })\n})\n\n// Forward all props except options (which we normalize), modelValue (handled separately),\n// and field mappings (already used for normalization)\nconst forwardedProps = computed(() => ({\n ariaInvalid: props.ariaInvalid,\n autofocus: props.autofocus,\n disabled: props.disabled,\n form: props.form,\n id: props.id,\n multiple: props.multiple,\n name: props.name,\n plain: props.plain,\n required: props.required,\n selectSize: props.selectSize,\n size: props.size,\n state: props.state,\n}))\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;EAkCA,MAAM,QAAQ,YAPC,SAOmB,yBAAwB;EAU1D,MAAM,EAAC,sBAAqB,oBAAoB,MAAM,SAAS,MAAM;;uBA3CnE,mBAYW,YAAA,EAZA,OAAO,MAAA,MAAK,CAAC,OAAA,EAAA;IACtB,WAAqB,KAAA,QAAA,QAAA;sBACrB,mBAQoB,UAAA,MAAA,WAPQ,MAAA,kBAAiB,GAAnC,QAAQ,UAAK;yBADvB,YAQoB,2BARpB,WAQoB,EANjB,KAAK,OAAK,EAAA,EAAA,SAAA,MAAA,EAAA;MAAA,GACCA,KAAAA;MAAM,GAAK;MAAM,CAAA,EAAA;6BAItB,CAFP,WAEO,KAAA,QAAA,UAFP,WAEO,EAAA,SAAA,MAAA,EAFqB,OAAM,QAE3B,CAAA,gBAAA,gBADF,OAAO,KAAI,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;;;;IAGlB,WAAQ,KAAA,QAAA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EE6DZ,MAAM,QAAQ,YApBC,SAoBmB,cAAa;EAE/C,MAAM,aAAa,SAAoB,SAAA,aAEtC;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,QAAO;EAEhD,MAAM,gBAAgB,OAAO,cAAc,KAAK,G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rchestrator_default, t as BApp_default } from "./BApp-CIu-zI8K.mjs";
|
|
17
17
|
import { useProvideDefaults } from "./src/composables/useProvideDefaults/index.mjs";
|
|
18
18
|
import { useRegistry } from "./src/composables/useRegistry/index.mjs";
|
|
19
|
-
import { t as BAutocomplete_default } from "./BAutocomplete-
|
|
19
|
+
import { t as BAutocomplete_default } from "./BAutocomplete-DRzLhACU.mjs";
|
|
20
20
|
import { t as BFormOtp_default } from "./BFormOtp-B4al7MJf.mjs";
|
|
21
21
|
import { n as BDatePicker_default, t as BDateRangePicker_default } from "./BDatePicker-ZuMpgD91.mjs";
|
|
22
22
|
import { t as BTimeField_default } from "./BTimeField-DSf4cMpN.mjs";
|
|
@@ -40,14 +40,14 @@ import { t as BDropdown_default } from "./BDropdown-B2vWJ-u0.mjs";
|
|
|
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-D2ep4wKG.mjs";
|
|
41
41
|
import { t as BForm_default } from "./BForm-CpNuvbIt.mjs";
|
|
42
42
|
import { t as BFormSelectOption_default } from "./BFormSelectOption-B3BO50XB.mjs";
|
|
43
|
-
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "./BForm-
|
|
43
|
+
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "./BForm-CoQKIJzv.mjs";
|
|
44
44
|
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "./BFormValidFeedback-DWkakzVO.mjs";
|
|
45
45
|
import { n as BFormCheckbox_default, t as BFormCheckboxGroup_default } from "./BFormCheckbox-xN7AQw4O.mjs";
|
|
46
46
|
import { t as BFormFile_default } from "./BFormFile-DXdAyYmv.mjs";
|
|
47
47
|
import { t as BFormGroup_default } from "./BFormGroup-ayltvQts.mjs";
|
|
48
48
|
import { n as BFormRadio_default, t as BFormRadioGroup_default } from "./BFormRadio-DHx68AdL.mjs";
|
|
49
49
|
import { t as BFormRating_default } from "./BFormRating-BR7RMvZG.mjs";
|
|
50
|
-
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "./BFormSelect-
|
|
50
|
+
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "./BFormSelect-eS-C3M0J.mjs";
|
|
51
51
|
import { t as BFormSpinbutton_default } from "./BFormSpinbutton-CPsVUIh9.mjs";
|
|
52
52
|
import { t as BFormTags_default } from "./BFormTags-D2Dk598Q.mjs";
|
|
53
53
|
import { t as BFormTextarea_default } from "./BFormTextarea-M21mholw.mjs";
|
|
@@ -17,7 +17,7 @@ const require_BAlert = require("./BAlert-Dk3rgEOI.js");
|
|
|
17
17
|
const require_BApp = require("./BApp-cBKQc5Dd.js");
|
|
18
18
|
const require_src_composables_useProvideDefaults_index = require("./src/composables/useProvideDefaults/index.umd.js");
|
|
19
19
|
const require_src_composables_useRegistry_index = require("./src/composables/useRegistry/index.umd.js");
|
|
20
|
-
const require_BAutocomplete = require("./BAutocomplete-
|
|
20
|
+
const require_BAutocomplete = require("./BAutocomplete-D8Qkcqcy.js");
|
|
21
21
|
const require_BFormOtp = require("./BFormOtp-UcLR9oFd.js");
|
|
22
22
|
const require_BDatePicker = require("./BDatePicker-m2drV1fl.js");
|
|
23
23
|
const require_BTimeField = require("./BTimeField-W2LqGCjB.js");
|
|
@@ -41,14 +41,14 @@ const require_BDropdown = require("./BDropdown-BSCasYDc.js");
|
|
|
41
41
|
const require_BDropdown$1 = require("./BDropdown-CL-erjq8.js");
|
|
42
42
|
const require_BForm = require("./BForm-K67Ciyza.js");
|
|
43
43
|
const require_BFormSelectOption = require("./BFormSelectOption-CQ3j1Q5j.js");
|
|
44
|
-
const require_BForm$1 = require("./BForm-
|
|
44
|
+
const require_BForm$1 = require("./BForm-B0bPQ4kx.js");
|
|
45
45
|
const require_BFormValidFeedback = require("./BFormValidFeedback-BhkEhSa0.js");
|
|
46
46
|
const require_BFormCheckbox = require("./BFormCheckbox-g7gtIrhy.js");
|
|
47
47
|
const require_BFormFile = require("./BFormFile-DC-x9wQo.js");
|
|
48
48
|
const require_BFormGroup = require("./BFormGroup-DZTiChgT.js");
|
|
49
49
|
const require_BFormRadio = require("./BFormRadio-DX-gM5Rc.js");
|
|
50
50
|
const require_BFormRating = require("./BFormRating-CF-x5qkB.js");
|
|
51
|
-
const require_BFormSelect = require("./BFormSelect-
|
|
51
|
+
const require_BFormSelect = require("./BFormSelect-CtcsnTlz.js");
|
|
52
52
|
const require_BFormSpinbutton = require("./BFormSpinbutton-DPCXum9q.js");
|
|
53
53
|
const require_BFormTags = require("./BFormTags-BIZyBseI.js");
|
|
54
54
|
const require_BFormTextarea = require("./BFormTextarea-CYh47SxL.js");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as BAutocomplete_default } from "../../../BAutocomplete-
|
|
1
|
+
import { t as BAutocomplete_default } from "../../../BAutocomplete-DRzLhACU.mjs";
|
|
2
2
|
export { BAutocomplete_default as BAutocomplete };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_BAutocomplete = require("../../../BAutocomplete-
|
|
2
|
+
const require_BAutocomplete = require("../../../BAutocomplete-D8Qkcqcy.js");
|
|
3
3
|
exports.BAutocomplete = require_BAutocomplete.BAutocomplete_default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { t as BForm_default } from "../../../BForm-CpNuvbIt.mjs";
|
|
2
|
-
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../../BForm-
|
|
2
|
+
import { n as BFormDatalist_default, t as BFormFloatingLabel_default } from "../../../BForm-CoQKIJzv.mjs";
|
|
3
3
|
import { i as BFormInvalidFeedback_default, n as BFormText_default, r as BFormRow_default, t as BFormValidFeedback_default } from "../../../BFormValidFeedback-DWkakzVO.mjs";
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_BForm = require("../../../BForm-K67Ciyza.js");
|
|
3
|
-
const require_BForm$1 = require("../../../BForm-
|
|
3
|
+
const require_BForm$1 = require("../../../BForm-B0bPQ4kx.js");
|
|
4
4
|
const require_BFormValidFeedback = require("../../../BFormValidFeedback-BhkEhSa0.js");
|
|
5
5
|
exports.BForm = require_BForm.BForm_default;
|
|
6
6
|
exports.BFormDatalist = require_BForm$1.BFormDatalist_default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as BFormSelectOption_default } from "../../../BFormSelectOption-B3BO50XB.mjs";
|
|
2
|
-
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../../BFormSelect-
|
|
2
|
+
import { n as BFormSelectOptionGroup_default, t as BFormSelect_default } from "../../../BFormSelect-eS-C3M0J.mjs";
|
|
3
3
|
export { BFormSelect_default as BFormSelect, BFormSelectOption_default as BFormSelectOption, BFormSelectOptionGroup_default as BFormSelectOptionGroup };
|