bootstrap-vue-next 0.45.3 → 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.
Files changed (55) hide show
  1. package/dist/{BAutocomplete-BCOfyy8g.js → BAutocomplete-D8Qkcqcy.js} +2 -2
  2. package/dist/{BAutocomplete-BCOfyy8g.js.map → BAutocomplete-D8Qkcqcy.js.map} +1 -1
  3. package/dist/{BAutocomplete-j3KJbBFs.mjs → BAutocomplete-DRzLhACU.mjs} +2 -2
  4. package/dist/{BAutocomplete-j3KJbBFs.mjs.map → BAutocomplete-DRzLhACU.mjs.map} +1 -1
  5. package/dist/{BForm-CriVh5cC.js → BForm-B0bPQ4kx.js} +2 -2
  6. package/dist/{BForm-CriVh5cC.js.map → BForm-B0bPQ4kx.js.map} +1 -1
  7. package/dist/{BForm-__5Chigr.mjs → BForm-CoQKIJzv.mjs} +2 -2
  8. package/dist/{BForm-__5Chigr.mjs.map → BForm-CoQKIJzv.mjs.map} +1 -1
  9. package/dist/{BFormSelect-CUkyKBNN.js → BFormSelect-CtcsnTlz.js} +2 -2
  10. package/dist/{BFormSelect-CUkyKBNN.js.map → BFormSelect-CtcsnTlz.js.map} +1 -1
  11. package/dist/{BFormSelect-Co-ZU8yY.mjs → BFormSelect-eS-C3M0J.mjs} +2 -2
  12. package/dist/{BFormSelect-Co-ZU8yY.mjs.map → BFormSelect-eS-C3M0J.mjs.map} +1 -1
  13. package/dist/{BOffcanvas-Dw-tsRFl.mjs → BOffcanvas-CwH0DqSG.mjs} +2 -1
  14. package/dist/BOffcanvas-CwH0DqSG.mjs.map +1 -0
  15. package/dist/{BOffcanvas-Dg2rwKlf.js → BOffcanvas-DdiP19Xz.js} +2 -1
  16. package/dist/BOffcanvas-DdiP19Xz.js.map +1 -0
  17. package/dist/bootstrap-vue-next.mjs +4 -4
  18. package/dist/bootstrap-vue-next.umd.js +4 -4
  19. package/dist/directives/utils.d.mts +2 -2
  20. package/dist/directives/utils.d.ts +2 -2
  21. package/dist/src/components/BAutocomplete/index.mjs +1 -1
  22. package/dist/src/components/BAutocomplete/index.umd.js +1 -1
  23. package/dist/src/components/BForm/index.mjs +1 -1
  24. package/dist/src/components/BForm/index.umd.js +1 -1
  25. package/dist/src/components/BFormSelect/index.mjs +1 -1
  26. package/dist/src/components/BFormSelect/index.umd.js +1 -1
  27. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  28. package/dist/src/components/BOffcanvas/index.umd.js +1 -1
  29. package/dist/src/components/index.mjs +4 -4
  30. package/dist/src/components/index.umd.js +4 -4
  31. package/dist/src/directives/BPopover/index.mjs +1 -1
  32. package/dist/src/directives/BPopover/index.umd.js +1 -1
  33. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  34. package/dist/src/directives/BScrollspy/index.umd.js +1 -1
  35. package/dist/src/directives/BToggle/index.mjs +2 -2
  36. package/dist/src/directives/BToggle/index.mjs.map +1 -1
  37. package/dist/src/directives/BToggle/index.umd.js +2 -2
  38. package/dist/src/directives/BToggle/index.umd.js.map +1 -1
  39. package/dist/src/directives/BTooltip/index.mjs +1 -1
  40. package/dist/src/directives/BTooltip/index.umd.js +1 -1
  41. package/dist/{useFormSelect-C0nvno12.mjs → useFormSelect-BM0rsjni.mjs} +9 -2
  42. package/dist/useFormSelect-BM0rsjni.mjs.map +1 -0
  43. package/dist/{useFormSelect-CjAziZpu.js → useFormSelect-ClmzGzOy.js} +9 -2
  44. package/dist/useFormSelect-ClmzGzOy.js.map +1 -0
  45. package/dist/{utils-Dgz9Trtl.mjs → utils-BbYwYPyP.mjs} +5 -5
  46. package/dist/utils-BbYwYPyP.mjs.map +1 -0
  47. package/dist/{utils-BTPjS0XS.js → utils-ePxMJ7rd.js} +5 -5
  48. package/dist/utils-ePxMJ7rd.js.map +1 -0
  49. package/package.json +1 -1
  50. package/dist/BOffcanvas-Dg2rwKlf.js.map +0 -1
  51. package/dist/BOffcanvas-Dw-tsRFl.mjs.map +0 -1
  52. package/dist/useFormSelect-C0nvno12.mjs.map +0 -1
  53. package/dist/useFormSelect-CjAziZpu.js.map +0 -1
  54. package/dist/utils-BTPjS0XS.js.map +0 -1
  55. package/dist/utils-Dgz9Trtl.mjs.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-CjAziZpu.js");
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-CriVh5cC.js.map
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,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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;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,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,WAAA,GAAA,IAAA,YAAA,EAAA,SAAA,MAAA,EAFqB,OAAM,QAE3B,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAAA,UADQ,SAAS,OAAO,OAAI,GAAA,EAAA,E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K,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-C0nvno12.mjs";
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-__5Chigr.mjs.map
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,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,EAA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A,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,\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,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-CjAziZpu.js");
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-CUkyKBNN.js.map
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,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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AM;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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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-C0nvno12.mjs";
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-Co-ZU8yY.mjs.map
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,M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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,iBAAiB,gBAAgB;GACrC,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,OAAO,MAAM;GACb,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ,OAAO,MAAM;GACd,EAAC;;uBAjKA,YAWkB,yBAXlB,WAAyB,eAWP,OAXqB;gBAAW,WAAA;4EAAU,QAAA;IAAG,SAAS,kBAAA;;IAE3D,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"}
1
+ {"version":3,"file":"BFormSelect-eS-C3M0J.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,yBAAw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OAAO;AAC9B,QAAI,OAAO,OAAO,YAAY,OAAO,OAAO,YAAY,OAAO,OAAO,UACpE,QAAO,mBAAmB,GAAE;AAG9B,WAAO,sBAAsB,GAAY;KAC1C;IACF;EAID,MAAM,iBAAiB,gBAAgB;GACrC,aAAa,MAAM;GACnB,WAAW,MAAM;GACjB,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,MAAM,MAAM;GACZ,OAAO,MAAM;GACb,UAAU,MAAM;GAChB,YAAY,MAAM;GAClB,MAAM,MAAM;GACZ,OAAO,MAAM;GACd,EAAC;;uBAjKA,YAWkB,yBAXlB,WAAyB,eAWP,OAXqB;gBAAW,WAAA;4EAAU,QAAA;IAAG,SAAS,kBAAA;;IAE3D,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"}
@@ -197,6 +197,7 @@ var BOffcanvas_default = /* @__PURE__ */ defineComponent({
197
197
  `offcanvas-${props.placement}`,
198
198
  {
199
199
  "show": isVisible.value,
200
+ "hiding": isLeaving.value && !isVisible.value,
200
201
  [`shadow-${props.shadow}`]: !!props.shadow,
201
202
  "no-transition": computedNoAnimation.value
202
203
  }
@@ -321,4 +322,4 @@ var BOffcanvas_default = /* @__PURE__ */ defineComponent({
321
322
  //#endregion
322
323
  export { BOffcanvas_default as t };
323
324
 
324
- //# sourceMappingURL=BOffcanvas-Dw-tsRFl.mjs.map
325
+ //# sourceMappingURL=BOffcanvas-CwH0DqSG.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BOffcanvas-CwH0DqSG.mjs","names":["$attrs"],"sources":["../src/components/BOffcanvas/BOffcanvas.vue","../src/components/BOffcanvas/BOffcanvas.vue"],"sourcesContent":["<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(modelValue, props, emit as EmitFn, element, computedId, {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n})\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerOrEqualToBreakpoint = breakpoints.smallerOrEqual(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerOrEqualToBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerOrEqualToBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerOrEqualToBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</script>\n","<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(modelValue, props, emit as EmitFn, element, computedId, {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n})\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerOrEqualToBreakpoint = breakpoints.smallerOrEqual(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerOrEqualToBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerOrEqualToBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerOrEqualToBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;AAiPA,IAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAvF9B,MAAM,QAAQ,YAhCC,SAgCmB,aAAY;EAC9C,MAAM,OAAO;EACb,MAAM,QAAQ,UAAA;EAEd,MAAM,aAAa,SAA8D,SAAA,aAEhF;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,YAAW;EAEpD,MAAM,UAAU,eAAmC,WAAU;EAC7D,MAAM,uBAAuB,eAAmC,wBAAuB;EACvF,MAAM,cAAc,eAAmC,SAAQ;EAE/D,MAAM,sBAAsB;AAC1B,OAAI,MAAM,SAAS,OAAO,MAAM,UAAU,WAAW;AACnD,QAAI,MAAM,UAAU,QAClB,QAAO;AAET,WAAO,WAAW,MAAM,OAAO,QAAQ,SAAS,KAAA,EAAS;;AAE3D,UAAO;;EAGT,MAAM,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