bootstrap-vue-next 1.2.2 → 1.2.3

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/{BAccordion-FuQ6sMFy.js → BAccordion-nQptHiXD.js} +2 -2
  2. package/dist/{BAccordion-FuQ6sMFy.js.map → BAccordion-nQptHiXD.js.map} +1 -1
  3. package/dist/{BAlert-C9Mi4RDx.js → BAlert-Bl3TOay3.js} +2 -2
  4. package/dist/{BAlert-C9Mi4RDx.js.map → BAlert-Bl3TOay3.js.map} +1 -1
  5. package/dist/{BCarousel-DQgfW4DN.js → BCarousel-BV2EiQRM.js} +2 -2
  6. package/dist/{BCarousel-DQgfW4DN.js.map → BCarousel-BV2EiQRM.js.map} +1 -1
  7. package/dist/{BCollapse-B9fnWSzA.js → BCollapse-B2q9Ya2S.js} +2 -2
  8. package/dist/{BCollapse-B9fnWSzA.js.map → BCollapse-B2q9Ya2S.js.map} +1 -1
  9. package/dist/{BDropdown-CnxUzs42.js → BDropdown-D4gLdtmX.js} +3 -3
  10. package/dist/{BDropdown-CnxUzs42.js.map → BDropdown-D4gLdtmX.js.map} +1 -1
  11. package/dist/{BModal-NPsCBNo7.js → BModal-BjmeVZen.js} +2 -2
  12. package/dist/{BModal-NPsCBNo7.js.map → BModal-BjmeVZen.js.map} +1 -1
  13. package/dist/{BNav-CjXS9tQ5.js → BNav-B2PlMEMD.js} +2 -2
  14. package/dist/{BNav-CjXS9tQ5.js.map → BNav-B2PlMEMD.js.map} +1 -1
  15. package/dist/{BOffcanvas-BndaBJoP.js → BOffcanvas-DfR32-ZP.js} +2 -2
  16. package/dist/{BOffcanvas-BndaBJoP.js.map → BOffcanvas-DfR32-ZP.js.map} +1 -1
  17. package/dist/{BPagination-D_Hfk6OF.js → BPagination-CfrsVgDp.js} +2 -2
  18. package/dist/{BPagination-D_Hfk6OF.js.map → BPagination-CfrsVgDp.js.map} +1 -1
  19. package/dist/{BTabs-BKmkVWrZ.js → BTabs-Zp8CvCL_.js} +2 -2
  20. package/dist/{BTabs-BKmkVWrZ.js.map → BTabs-Zp8CvCL_.js.map} +1 -1
  21. package/dist/{BToast-Di9HwBOV.js → BToast-CqE2VMW2.js} +2 -2
  22. package/dist/{BToast-Di9HwBOV.js.map → BToast-CqE2VMW2.js.map} +1 -1
  23. package/dist/{BTooltip-BxaUtV4m.js → BTooltip-BHFBLXnr.js} +2 -2
  24. package/dist/{BTooltip-BxaUtV4m.js.map → BTooltip-BHFBLXnr.js.map} +1 -1
  25. package/dist/bootstrap-vue-next.mjs +15 -15
  26. package/dist/{floatingUi-BlKoACvc.js → floatingUi-Stb1SUvw.js} +2 -2
  27. package/dist/{floatingUi-BlKoACvc.js.map → floatingUi-Stb1SUvw.js.map} +1 -1
  28. package/dist/src/components/BAccordion/index.mjs +1 -1
  29. package/dist/src/components/BAlert/index.mjs +1 -1
  30. package/dist/src/components/BCarousel/index.mjs +1 -1
  31. package/dist/src/components/BCollapse/index.mjs +1 -1
  32. package/dist/src/components/BDropdown/index.mjs +1 -1
  33. package/dist/src/components/BModal/index.mjs +1 -1
  34. package/dist/src/components/BNav/index.mjs +1 -1
  35. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  36. package/dist/src/components/BPagination/index.mjs +1 -1
  37. package/dist/src/components/BPopover/index.mjs +1 -1
  38. package/dist/src/components/BTabs/index.mjs +1 -1
  39. package/dist/src/components/BToast/index.mjs +1 -1
  40. package/dist/src/components/BTooltip/index.mjs +1 -1
  41. package/dist/src/components/index.mjs +13 -13
  42. package/dist/src/composables/orchestratorShared/index.mjs +33 -5
  43. package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
  44. package/dist/src/composables/useModal/index.mjs +1 -1
  45. package/dist/src/composables/usePopover/index.mjs +2 -2
  46. package/dist/src/composables/useToast/index.mjs +1 -1
  47. package/dist/src/directives/BPopover/index.mjs +2 -2
  48. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  49. package/dist/src/directives/BToggle/index.mjs +1 -1
  50. package/dist/src/directives/BTooltip/index.mjs +2 -2
  51. package/dist/{useShowHide-C95Y9EKL.js → useShowHide-B6RQbFDt.js} +2 -2
  52. package/dist/{useShowHide-C95Y9EKL.js.map → useShowHide-B6RQbFDt.js.map} +1 -1
  53. package/dist/{utils-nRGGHA_i.js → utils-CK56zzsO.js} +2 -2
  54. package/dist/{utils-nRGGHA_i.js.map → utils-CK56zzsO.js.map} +1 -1
  55. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BCollapse-B9fnWSzA.js","names":["$attrs"],"sources":["../src/components/BCollapse/BCollapse.vue","../src/components/BCollapse/BCollapse.vue"],"sourcesContent":["<template>\n <slot name=\"header\" v-bind=\"sharedSlots\" />\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :enter-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :leave-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :appear=\"modelValue || props.visible\"\n >\n <component\n :is=\"props.tag\"\n v-show=\"showRef\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"collapse\"\n :class=\"computedClasses\"\n :is-nav=\"props.isNav\"\n v-bind=\"$attrs\"\n >\n <slot v-if=\"contentShowing\" v-bind=\"sharedSlots\" />\n </component>\n </Transition>\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, provide, readonly, toRef, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {collapseInjectionKey} from '../../utils/keys'\nimport type {BCollapseEmits, BCollapseProps, BCollapseSlots, ShowHideSlotsData} from '../../types'\nimport {useShowHide} from '../../composables/useShowHide'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BCollapseProps, 'modelValue'>>(), {\n horizontal: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n noAnimation: false,\n unmountLazy: false,\n tag: 'div',\n show: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BCollapse')\nconst emit = defineEmits<BCollapseEmits>()\ndefineSlots<BCollapseSlots>()\n\nconst modelValue = defineModel<Exclude<BCollapseProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'collapse')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\n\nlet inCollapse = false\nconst onEnter = (el: Element) => {\n inCollapse = true\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${(el as HTMLElement).scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${(el as HTMLElement).scrollHeight}px`\n }\n })\n}\nconst onBeforeLeave = (el: Element) => {\n if (inCollapse) {\n return\n }\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${el.scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${el.scrollHeight}px`\n }\n\n // oxlint-disable-next-line no-unused-expressions\n ;(el as HTMLElement).offsetHeight // force reflow\n}\nconst onLeave = (el: Element) => {\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = ``\n } else {\n ;(el as HTMLElement).style.height = ``\n }\n })\n}\n\nconst onAfterEnter = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst onAfterLeave = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n isActive,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onBeforeLeave,\n onEnter,\n onLeave,\n onAfterEnter,\n onAfterLeave,\n enterToClass: '',\n leaveToClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n enterActiveClass: '',\n leaveActiveClass: '',\n },\n }\n)\n\nconst computedClasses = computed(() => ({\n 'show': isActive.value,\n 'navbar-collapse': props.isNav,\n 'collapse-horizontal': props.horizontal,\n}))\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n hide,\n isNav: props.isNav,\n show,\n toggle,\n visible: readonly(showRef),\n})\n\nprovide(collapseInjectionKey, {\n id: computedId,\n hide,\n show,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n","<template>\n <slot name=\"header\" v-bind=\"sharedSlots\" />\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :enter-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :leave-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :appear=\"modelValue || props.visible\"\n >\n <component\n :is=\"props.tag\"\n v-show=\"showRef\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"collapse\"\n :class=\"computedClasses\"\n :is-nav=\"props.isNav\"\n v-bind=\"$attrs\"\n >\n <slot v-if=\"contentShowing\" v-bind=\"sharedSlots\" />\n </component>\n </Transition>\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, provide, readonly, toRef, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {collapseInjectionKey} from '../../utils/keys'\nimport type {BCollapseEmits, BCollapseProps, BCollapseSlots, ShowHideSlotsData} from '../../types'\nimport {useShowHide} from '../../composables/useShowHide'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BCollapseProps, 'modelValue'>>(), {\n horizontal: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n noAnimation: false,\n unmountLazy: false,\n tag: 'div',\n show: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BCollapse')\nconst emit = defineEmits<BCollapseEmits>()\ndefineSlots<BCollapseSlots>()\n\nconst modelValue = defineModel<Exclude<BCollapseProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'collapse')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\n\nlet inCollapse = false\nconst onEnter = (el: Element) => {\n inCollapse = true\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${(el as HTMLElement).scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${(el as HTMLElement).scrollHeight}px`\n }\n })\n}\nconst onBeforeLeave = (el: Element) => {\n if (inCollapse) {\n return\n }\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${el.scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${el.scrollHeight}px`\n }\n\n // oxlint-disable-next-line no-unused-expressions\n ;(el as HTMLElement).offsetHeight // force reflow\n}\nconst onLeave = (el: Element) => {\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = ``\n } else {\n ;(el as HTMLElement).style.height = ``\n }\n })\n}\n\nconst onAfterEnter = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst onAfterLeave = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n isActive,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onBeforeLeave,\n onEnter,\n onLeave,\n onAfterEnter,\n onAfterLeave,\n enterToClass: '',\n leaveToClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n enterActiveClass: '',\n leaveActiveClass: '',\n },\n }\n)\n\nconst computedClasses = computed(() => ({\n 'show': isActive.value,\n 'navbar-collapse': props.isNav,\n 'collapse-horizontal': props.horizontal,\n}))\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n hide,\n isNav: props.isNav,\n show,\n toggle,\n visible: readonly(showRef),\n})\n\nprovide(collapseInjectionKey, {\n id: computedId,\n hide,\n show,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA,MAAM,QAAQ,YAAY,SAAQ,WAAW;EAC7C,MAAM,OAAO;EAGb,MAAM,aAAa,SAA6D,SAAA,YAE/E;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EAEnD,MAAM,UAAU,eAAmC,UAAU;EAE7D,IAAI,aAAa;EACjB,MAAM,WAAW,OAAgB;GAC/B,aAAa;GACb,4BAA4B;IAC1B,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ,GAAI,GAAmB,YAAY;SAErE,GAAoB,MAAM,SAAS,GAAI,GAAmB,aAAa;GAE5E,CAAC;EACH;EACA,MAAM,iBAAiB,OAAgB;GACrC,IAAI,YACF;GAEF,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ,GAAG,GAAG,YAAY;QAEpD,GAAoB,MAAM,SAAS,GAAG,GAAG,aAAa;GAIxD,GAAoB;EACvB;EACA,MAAM,WAAW,OAAgB;GAC/B,4BAA4B;IAC1B,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ;SAElC,GAAoB,MAAM,SAAS;GAExC,CAAC;EACH;EAEA,MAAM,gBAAgB,OAAgB;GACnC,GAAoB,MAAM,SAAS;GACnC,GAAoB,MAAM,QAAQ;GACnC,aAAa;EACf;EAEA,MAAM,gBAAgB,OAAgB;GACnC,GAAoB,MAAM,SAAS;GACnC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GAAAA,KAAAA,MAAM,GAAA;MAEd,SAAA,cAAmD,CAAvC,MAAA,cAAA,IAAZ,WAAmD,KAAA,QAAA,WAAA,eAAA,mBAAf,YAAA,KAAW,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;;;;;;KARvC,CAAA,IAAA,CAAA,CAAA,OAAA,MAAA,OAAA,CAAO,CAAA,CAAA,CAAA,CAAA;;;;;;;IAWnB,WAA2C,KAAA,QAAA,UAAA,eAAA,mBAAf,YAAA,KAAW,CAAA,CAAA"}
1
+ {"version":3,"file":"BCollapse-B2q9Ya2S.js","names":["$attrs"],"sources":["../src/components/BCollapse/BCollapse.vue","../src/components/BCollapse/BCollapse.vue"],"sourcesContent":["<template>\n <slot name=\"header\" v-bind=\"sharedSlots\" />\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :enter-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :leave-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :appear=\"modelValue || props.visible\"\n >\n <component\n :is=\"props.tag\"\n v-show=\"showRef\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"collapse\"\n :class=\"computedClasses\"\n :is-nav=\"props.isNav\"\n v-bind=\"$attrs\"\n >\n <slot v-if=\"contentShowing\" v-bind=\"sharedSlots\" />\n </component>\n </Transition>\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, provide, readonly, toRef, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {collapseInjectionKey} from '../../utils/keys'\nimport type {BCollapseEmits, BCollapseProps, BCollapseSlots, ShowHideSlotsData} from '../../types'\nimport {useShowHide} from '../../composables/useShowHide'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BCollapseProps, 'modelValue'>>(), {\n horizontal: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n noAnimation: false,\n unmountLazy: false,\n tag: 'div',\n show: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BCollapse')\nconst emit = defineEmits<BCollapseEmits>()\ndefineSlots<BCollapseSlots>()\n\nconst modelValue = defineModel<Exclude<BCollapseProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'collapse')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\n\nlet inCollapse = false\nconst onEnter = (el: Element) => {\n inCollapse = true\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${(el as HTMLElement).scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${(el as HTMLElement).scrollHeight}px`\n }\n })\n}\nconst onBeforeLeave = (el: Element) => {\n if (inCollapse) {\n return\n }\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${el.scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${el.scrollHeight}px`\n }\n\n // oxlint-disable-next-line no-unused-expressions\n ;(el as HTMLElement).offsetHeight // force reflow\n}\nconst onLeave = (el: Element) => {\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = ``\n } else {\n ;(el as HTMLElement).style.height = ``\n }\n })\n}\n\nconst onAfterEnter = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst onAfterLeave = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n isActive,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onBeforeLeave,\n onEnter,\n onLeave,\n onAfterEnter,\n onAfterLeave,\n enterToClass: '',\n leaveToClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n enterActiveClass: '',\n leaveActiveClass: '',\n },\n }\n)\n\nconst computedClasses = computed(() => ({\n 'show': isActive.value,\n 'navbar-collapse': props.isNav,\n 'collapse-horizontal': props.horizontal,\n}))\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n hide,\n isNav: props.isNav,\n show,\n toggle,\n visible: readonly(showRef),\n})\n\nprovide(collapseInjectionKey, {\n id: computedId,\n hide,\n show,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n","<template>\n <slot name=\"header\" v-bind=\"sharedSlots\" />\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :enter-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :leave-active-class=\"computedNoAnimation ? '' : 'collapsing'\"\n :appear=\"modelValue || props.visible\"\n >\n <component\n :is=\"props.tag\"\n v-show=\"showRef\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"collapse\"\n :class=\"computedClasses\"\n :is-nav=\"props.isNav\"\n v-bind=\"$attrs\"\n >\n <slot v-if=\"contentShowing\" v-bind=\"sharedSlots\" />\n </component>\n </Transition>\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type EmitFn, provide, readonly, toRef, useTemplateRef} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {collapseInjectionKey} from '../../utils/keys'\nimport type {BCollapseEmits, BCollapseProps, BCollapseSlots, ShowHideSlotsData} from '../../types'\nimport {useShowHide} from '../../composables/useShowHide'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BCollapseProps, 'modelValue'>>(), {\n horizontal: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n noAnimation: false,\n unmountLazy: false,\n tag: 'div',\n show: false,\n visible: false,\n})\nconst props = useDefaults(_props, 'BCollapse')\nconst emit = defineEmits<BCollapseEmits>()\ndefineSlots<BCollapseSlots>()\n\nconst modelValue = defineModel<Exclude<BCollapseProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'collapse')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\n\nlet inCollapse = false\nconst onEnter = (el: Element) => {\n inCollapse = true\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${(el as HTMLElement).scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${(el as HTMLElement).scrollHeight}px`\n }\n })\n}\nconst onBeforeLeave = (el: Element) => {\n if (inCollapse) {\n return\n }\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = `${el.scrollWidth}px`\n } else {\n ;(el as HTMLElement).style.height = `${el.scrollHeight}px`\n }\n\n // oxlint-disable-next-line no-unused-expressions\n ;(el as HTMLElement).offsetHeight // force reflow\n}\nconst onLeave = (el: Element) => {\n requestAnimationFrame(() => {\n if (props.horizontal) {\n ;(el as HTMLElement).style.width = ``\n } else {\n ;(el as HTMLElement).style.height = ``\n }\n })\n}\n\nconst onAfterEnter = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst onAfterLeave = (el: Element) => {\n ;(el as HTMLElement).style.height = ``\n ;(el as HTMLElement).style.width = ``\n inCollapse = false\n}\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n isActive,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onBeforeLeave,\n onEnter,\n onLeave,\n onAfterEnter,\n onAfterLeave,\n enterToClass: '',\n leaveToClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n enterActiveClass: '',\n leaveActiveClass: '',\n },\n }\n)\n\nconst computedClasses = computed(() => ({\n 'show': isActive.value,\n 'navbar-collapse': props.isNav,\n 'collapse-horizontal': props.horizontal,\n}))\n\nconst sharedSlots = computed<ShowHideSlotsData>(() => ({\n toggle,\n show,\n hide,\n id: computedId.value,\n visible: showRef.value,\n active: isActive.value,\n}))\n\ndefineExpose({\n hide,\n isNav: props.isNav,\n show,\n toggle,\n visible: readonly(showRef),\n})\n\nprovide(collapseInjectionKey, {\n id: computedId,\n hide,\n show,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiDA,MAAM,QAAQ,YAAY,SAAQ,WAAW;EAC7C,MAAM,OAAO;EAGb,MAAM,aAAa,SAA6D,SAAA,YAE/E;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EAEnD,MAAM,UAAU,eAAmC,UAAU;EAE7D,IAAI,aAAa;EACjB,MAAM,WAAW,OAAgB;GAC/B,aAAa;GACb,4BAA4B;IAC1B,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ,GAAI,GAAmB,YAAY;SAErE,GAAoB,MAAM,SAAS,GAAI,GAAmB,aAAa;GAE5E,CAAC;EACH;EACA,MAAM,iBAAiB,OAAgB;GACrC,IAAI,YACF;GAEF,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ,GAAG,GAAG,YAAY;QAEpD,GAAoB,MAAM,SAAS,GAAG,GAAG,aAAa;GAIxD,GAAoB;EACvB;EACA,MAAM,WAAW,OAAgB;GAC/B,4BAA4B;IAC1B,IAAI,MAAM,YACP,GAAoB,MAAM,QAAQ;SAElC,GAAoB,MAAM,SAAS;GAExC,CAAC;EACH;EAEA,MAAM,gBAAgB,OAAgB;GACnC,GAAoB,MAAM,SAAS;GACnC,GAAoB,MAAM,QAAQ;GACnC,aAAa;EACf;EAEA,MA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KAAe;MACtB,UAAQ,MAAA,KAAA,CAAK,CAAC;KACPA,GAAAA,KAAAA,MAAM,GAAA;MAEd,SAAA,cAAmD,CAAvC,MAAA,cAAA,IAAZ,WAAmD,KAAA,QAAA,WAAA,eAAA,mBAAf,YAAA,KAAW,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;;;;;;KARvC,CAAA,IAAA,CAAA,CAAA,OAAA,MAAA,OAAA,CAAO,CAAA,CAAA,CAAA,CAAA;;;;;;;IAWnB,WAA2C,KAAA,QAAA,UAAA,eAAA,mBAAf,YAAA,KAAW,CAAA,CAAA"}
@@ -4,12 +4,12 @@ import { a as onKeyStroke, i as onClickOutside } from "./dist-9-XTMhb-.js";
4
4
  import { i as getSafeDocument } from "./dom-BdUQrX99.js";
5
5
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
6
6
  import { t as useId$1 } from "./useId-Fh-Arhb7.js";
7
- import { t as useShowHide } from "./useShowHide-C95Y9EKL.js";
7
+ import { t as useShowHide } from "./useShowHide-B6RQbFDt.js";
8
8
  import { t as BButton_default } from "./BButton-KZu5jczf.js";
9
9
  import { t as ConditionalTeleport_default } from "./ConditionalTeleport-BCKPLEun.js";
10
10
  import { a as flip, d as size, l as offset, r as autoUpdate, u as shift } from "./floating-ui.dom-C7UZexJK.js";
11
11
  import { t as ConditionalWrapper_default } from "./ConditionalWrapper-CCIk52zt.js";
12
- import { a as resolveBootstrapCaret, d as useFloating, n as isBoundary, r as isRootBoundary } from "./floatingUi-BlKoACvc.js";
12
+ import { a as resolveBootstrapCaret, d as useFloating, n as isBoundary, r as isRootBoundary } from "./floatingUi-Stb1SUvw.js";
13
13
  import { t as getElement } from "./getElement-uvhh1lgL.js";
14
14
  import { Transition, computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, openBlock, provide, readonly, ref, renderSlot, toDisplayString, toRef, unref, useModel, useTemplateRef, vShow, watch, withCtx, withDirectives } from "vue";
15
15
  //#region src/components/BDropdown/BDropdown.vue?vue&type=script&setup=true&lang.ts
@@ -403,4 +403,4 @@ var BDropdown_default = /* @__PURE__ */ defineComponent({
403
403
  //#endregion
404
404
  export { BDropdown_default as t };
405
405
 
406
- //# sourceMappingURL=BDropdown-CnxUzs42.js.map
406
+ //# sourceMappingURL=BDropdown-D4gLdtmX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BDropdown-CnxUzs42.js","names":[],"sources":["../src/components/BDropdown/BDropdown.vue","../src/components/BDropdown/BDropdown.vue"],"sourcesContent":["<template>\n <ConditionalWrapper\n :skip=\"inInputGroup || props.noWrapper\"\n :class=\"computedClasses\"\n :role=\"inButtonGroupAttributes?.role\"\n >\n <BButton\n :id=\"computedId\"\n ref=\"_splitButton\"\n :variant=\"props.splitVariant || props.variant\"\n :size=\"props.size\"\n :class=\"buttonClasses\"\n :disabled=\"props.splitDisabled || props.disabled\"\n :type=\"props.splitButtonType\"\n :aria-label=\"props.ariaLabel\"\n :aria-expanded=\"props.split ? undefined : showRef\"\n :aria-haspopup=\"props.split ? undefined : 'menu'\"\n :href=\"props.split ? props.splitHref : undefined\"\n :icon=\"props.icon\"\n :to=\"props.split && props.splitTo ? props.splitTo : undefined\"\n v-bind=\"!props.split ? props.toggleAttrs : undefined\"\n @click=\"onSplitClick\"\n >\n <slot name=\"button-content\"> {{ props.text }} </slot>\n </BButton>\n <BButton\n v-if=\"props.split\"\n :id=\"computedId + '-split'\"\n ref=\"_button\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :class=\"[props.toggleClass, {show: showRef}]\"\n class=\"dropdown-toggle-split dropdown-toggle\"\n :aria-expanded=\"showRef\"\n aria-haspopup=\"menu\"\n v-bind=\"props.toggleAttrs\"\n @click=\"onButtonClick\"\n >\n <span class=\"visually-hidden\">\n <slot name=\"toggle-text\">\n {{ props.toggleText }}\n </slot>\n </span>\n </BButton>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <ul\n v-show=\"showRef\"\n :id=\"computedId + '-menu'\"\n ref=\"_floating\"\n :style=\"[floatingStyles, sizeStyles, {display: showRef || isActive ? 'block' : 'none'}]\"\n class=\"dropdown-menu overflow-auto b-floating-size\"\n :class=\"[props.menuClass, computedMenuClasses]\"\n :aria-labelledby=\"computedId\"\n :role=\"props.role\"\n @click=\"onClickInside\"\n >\n <slot\n v-if=\"contentShowing\"\n :id=\"computedId\"\n :hide=\"hide\"\n :show=\"show\"\n :visible=\"showRef\"\n :click=\"onClickInside\"\n :toggle=\"onButtonClick\"\n :active=\"showRef\"\n />\n </ul>\n </Transition>\n </ConditionalTeleport>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n autoUpdate,\n type Boundary,\n flip,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, onKeyStroke, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n inject,\n nextTick,\n provide,\n readonly,\n ref,\n toRef,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BButton from '../BButton/BButton.vue'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {isBoundary, isRootBoundary, resolveBootstrapCaret} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport {buttonGroupKey, dropdownInjectionKey, inputGroupKey} from '../../utils/keys'\nimport {useShowHide} from '../../composables/useShowHide'\nimport type {BDropdownEmits, BDropdownProps, BDropdownSlots} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n disabled: false,\n floatingMiddleware: undefined,\n icon: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFade: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n unmountLazy: false,\n role: 'menu',\n size: undefined,\n noWrapper: false,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n placement: 'bottom-start',\n splitVariant: undefined,\n strategy: 'absolute',\n text: undefined,\n show: false,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n transProps: undefined,\n variant: 'secondary',\n visible: false,\n wrapperClass: undefined,\n})\nconst props = useDefaults(_props, 'BDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BDropdownSlots>()\n\nconst computedId = useId(() => props.id, 'dropdown')\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst inInputGroup = inject(inputGroupKey, false)\nconst inButtonGroup = inject(buttonGroupKey, false)\n\nconst computedOffset = computed(() =>\n typeof props.offset === 'string' || typeof props.offset === 'number' ? props.offset : Number.NaN\n)\nconst offsetToNumber = useToNumber(computedOffset)\n\nconst floatingElement = useTemplateRef<HTMLUListElement | null>('_floating')\nconst button = useTemplateRef<HTMLElement | null>('_button')\nconst splitButton = useTemplateRef<HTMLElement | null>('_splitButton')\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst referenceElement = computed(() => (!props.split ? splitButton.value : button.value))\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element: referenceElement, id: computedId},\n {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {\n animationFrame: false,\n }\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n }\n)\n\nconst computedMenuClasses = computed(() => [\n {\n show: isVisible.value,\n fade: !computedNoAnimation.value,\n },\n])\n\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: referenceElement}\n)\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: floatingElement, passive: true}\n)\n\nconst keynav = (e: Readonly<Event>, v: number) => {\n if (floatingElement.value?.contains((e.target as HTMLElement)?.closest('form'))) return\n if (/input|select|option|textarea|form/i.test((e.target as HTMLElement)?.tagName)) return\n e.preventDefault()\n if (!showRef.value) {\n show()\n const loop = setInterval(() => {\n if (isVisible.value) {\n clearInterval(loop)\n nextTick(() => keynav(e, v))\n }\n }, 16)\n return\n }\n const list = floatingElement.value?.querySelectorAll(\n '.dropdown-item:not(.disabled):not(:disabled)'\n )\n const doc = getSafeDocument()\n if (!list || !doc) return\n if (floatingElement.value?.contains(doc.activeElement)) {\n const active = floatingElement.value.querySelector('.dropdown-item:focus')\n const index = Array.prototype.indexOf.call(list, active) + v\n if (index >= 0 && index < list?.length) (list[index] as HTMLElement)?.focus()\n } else {\n ;(list[v === -1 ? list.length - 1 : 0] as HTMLElement)?.focus()\n }\n}\n\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: referenceElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: referenceElement})\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: floatingElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: floatingElement})\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const localOffset =\n typeof props.offset === 'string' || typeof props.offset === 'number'\n ? offsetToNumber.value\n : props.offset\n const arr: Middleware[] = [offsetMiddleware(localOffset)]\n if (!props.noFlip) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noShift) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noSize) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (floatingElement.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (floatingElement.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\nconst {update, floatingStyles} = useFloating(referenceElement, floatingElement, {\n placement: () => props.placement,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: () => props.strategy,\n})\n\nconst inButtonGroupAttributes = inButtonGroup\n ? {\n class: 'btn-group',\n role: 'group',\n }\n : undefined\n\nconst computedClasses = computed(() => [\n inButtonGroupAttributes?.class,\n props.wrapperClass,\n {\n 'btn-group': !props.wrapperClass && props.split,\n [`drop${resolveBootstrapCaret(props.placement)}`]: !props.wrapperClass,\n 'position-static': props.boundary !== 'clippingAncestors' && !props.isNav,\n },\n])\n\nconst buttonClasses = computed(() => [\n props.split ? props.splitClass : props.toggleClass,\n {\n 'nav-link': props.isNav,\n 'dropdown-toggle': !props.split,\n 'dropdown-toggle-no-caret': props.noCaret && !props.split,\n 'show': props.split ? undefined : showRef.value,\n },\n])\n\nconst onButtonClick = () => {\n toggle()\n}\n\nconst onSplitClick = (event: Readonly<MouseEvent>) => {\n if (props.split) {\n emit('split-click', event)\n return\n }\n onButtonClick()\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'outside')) {\n hide()\n }\n },\n {ignore: [button, splitButton]}\n)\nconst onClickInside = () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'inside')) {\n hide()\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nprovide(dropdownInjectionKey, {\n id: computedId,\n show,\n hide,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n","<template>\n <ConditionalWrapper\n :skip=\"inInputGroup || props.noWrapper\"\n :class=\"computedClasses\"\n :role=\"inButtonGroupAttributes?.role\"\n >\n <BButton\n :id=\"computedId\"\n ref=\"_splitButton\"\n :variant=\"props.splitVariant || props.variant\"\n :size=\"props.size\"\n :class=\"buttonClasses\"\n :disabled=\"props.splitDisabled || props.disabled\"\n :type=\"props.splitButtonType\"\n :aria-label=\"props.ariaLabel\"\n :aria-expanded=\"props.split ? undefined : showRef\"\n :aria-haspopup=\"props.split ? undefined : 'menu'\"\n :href=\"props.split ? props.splitHref : undefined\"\n :icon=\"props.icon\"\n :to=\"props.split && props.splitTo ? props.splitTo : undefined\"\n v-bind=\"!props.split ? props.toggleAttrs : undefined\"\n @click=\"onSplitClick\"\n >\n <slot name=\"button-content\"> {{ props.text }} </slot>\n </BButton>\n <BButton\n v-if=\"props.split\"\n :id=\"computedId + '-split'\"\n ref=\"_button\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :class=\"[props.toggleClass, {show: showRef}]\"\n class=\"dropdown-toggle-split dropdown-toggle\"\n :aria-expanded=\"showRef\"\n aria-haspopup=\"menu\"\n v-bind=\"props.toggleAttrs\"\n @click=\"onButtonClick\"\n >\n <span class=\"visually-hidden\">\n <slot name=\"toggle-text\">\n {{ props.toggleText }}\n </slot>\n </span>\n </BButton>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <ul\n v-show=\"showRef\"\n :id=\"computedId + '-menu'\"\n ref=\"_floating\"\n :style=\"[floatingStyles, sizeStyles, {display: showRef || isActive ? 'block' : 'none'}]\"\n class=\"dropdown-menu overflow-auto b-floating-size\"\n :class=\"[props.menuClass, computedMenuClasses]\"\n :aria-labelledby=\"computedId\"\n :role=\"props.role\"\n @click=\"onClickInside\"\n >\n <slot\n v-if=\"contentShowing\"\n :id=\"computedId\"\n :hide=\"hide\"\n :show=\"show\"\n :visible=\"showRef\"\n :click=\"onClickInside\"\n :toggle=\"onButtonClick\"\n :active=\"showRef\"\n />\n </ul>\n </Transition>\n </ConditionalTeleport>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n autoUpdate,\n type Boundary,\n flip,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, onKeyStroke, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n inject,\n nextTick,\n provide,\n readonly,\n ref,\n toRef,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BButton from '../BButton/BButton.vue'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {isBoundary, isRootBoundary, resolveBootstrapCaret} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport {buttonGroupKey, dropdownInjectionKey, inputGroupKey} from '../../utils/keys'\nimport {useShowHide} from '../../composables/useShowHide'\nimport type {BDropdownEmits, BDropdownProps, BDropdownSlots} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n disabled: false,\n floatingMiddleware: undefined,\n icon: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFade: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n unmountLazy: false,\n role: 'menu',\n size: undefined,\n noWrapper: false,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n placement: 'bottom-start',\n splitVariant: undefined,\n strategy: 'absolute',\n text: undefined,\n show: false,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n transProps: undefined,\n variant: 'secondary',\n visible: false,\n wrapperClass: undefined,\n})\nconst props = useDefaults(_props, 'BDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BDropdownSlots>()\n\nconst computedId = useId(() => props.id, 'dropdown')\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst inInputGroup = inject(inputGroupKey, false)\nconst inButtonGroup = inject(buttonGroupKey, false)\n\nconst computedOffset = computed(() =>\n typeof props.offset === 'string' || typeof props.offset === 'number' ? props.offset : Number.NaN\n)\nconst offsetToNumber = useToNumber(computedOffset)\n\nconst floatingElement = useTemplateRef<HTMLUListElement | null>('_floating')\nconst button = useTemplateRef<HTMLElement | null>('_button')\nconst splitButton = useTemplateRef<HTMLElement | null>('_splitButton')\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst referenceElement = computed(() => (!props.split ? splitButton.value : button.value))\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element: referenceElement, id: computedId},\n {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {\n animationFrame: false,\n }\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n }\n)\n\nconst computedMenuClasses = computed(() => [\n {\n show: isVisible.value,\n fade: !computedNoAnimation.value,\n },\n])\n\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: referenceElement}\n)\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: floatingElement, passive: true}\n)\n\nconst keynav = (e: Readonly<Event>, v: number) => {\n if (floatingElement.value?.contains((e.target as HTMLElement)?.closest('form'))) return\n if (/input|select|option|textarea|form/i.test((e.target as HTMLElement)?.tagName)) return\n e.preventDefault()\n if (!showRef.value) {\n show()\n const loop = setInterval(() => {\n if (isVisible.value) {\n clearInterval(loop)\n nextTick(() => keynav(e, v))\n }\n }, 16)\n return\n }\n const list = floatingElement.value?.querySelectorAll(\n '.dropdown-item:not(.disabled):not(:disabled)'\n )\n const doc = getSafeDocument()\n if (!list || !doc) return\n if (floatingElement.value?.contains(doc.activeElement)) {\n const active = floatingElement.value.querySelector('.dropdown-item:focus')\n const index = Array.prototype.indexOf.call(list, active) + v\n if (index >= 0 && index < list?.length) (list[index] as HTMLElement)?.focus()\n } else {\n ;(list[v === -1 ? list.length - 1 : 0] as HTMLElement)?.focus()\n }\n}\n\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: referenceElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: referenceElement})\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: floatingElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: floatingElement})\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const localOffset =\n typeof props.offset === 'string' || typeof props.offset === 'number'\n ? offsetToNumber.value\n : props.offset\n const arr: Middleware[] = [offsetMiddleware(localOffset)]\n if (!props.noFlip) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noShift) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noSize) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (floatingElement.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (floatingElement.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\nconst {update, floatingStyles} = useFloating(referenceElement, floatingElement, {\n placement: () => props.placement,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: () => props.strategy,\n})\n\nconst inButtonGroupAttributes = inButtonGroup\n ? {\n class: 'btn-group',\n role: 'group',\n }\n : undefined\n\nconst computedClasses = computed(() => [\n inButtonGroupAttributes?.class,\n props.wrapperClass,\n {\n 'btn-group': !props.wrapperClass && props.split,\n [`drop${resolveBootstrapCaret(props.placement)}`]: !props.wrapperClass,\n 'position-static': props.boundary !== 'clippingAncestors' && !props.isNav,\n },\n])\n\nconst buttonClasses = computed(() => [\n props.split ? props.splitClass : props.toggleClass,\n {\n 'nav-link': props.isNav,\n 'dropdown-toggle': !props.split,\n 'dropdown-toggle-no-caret': props.noCaret && !props.split,\n 'show': props.split ? undefined : showRef.value,\n },\n])\n\nconst onButtonClick = () => {\n toggle()\n}\n\nconst onSplitClick = (event: Readonly<MouseEvent>) => {\n if (props.split) {\n emit('split-click', event)\n return\n }\n onButtonClick()\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'outside')) {\n hide()\n }\n },\n {ignore: [button, splitButton]}\n)\nconst onClickInside = () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'inside')) {\n hide()\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nprovide(dropdownInjectionKey, {\n id: computedId,\n show,\n hide,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKA,MAAM,QAAQ,YAAY,SAAQ,WAAW;EAC7C,MAAM,OAAO;EAGb,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EAEnD,MAAM,aAAa,SAA6D,SAAA,YAAiB;EAEjG,MAAM,eAAe,OAAO,eAAe,KAAK;EAChD,MAAM,gBAAgB,OAAO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KAAA,CAAK,CAAC,cAAc,MAAA,KAAA,CAAK,CAAC;;MAEtC,SAAA,cA2Ba,CA1BL,MAAA,SAAA,KAAa,MAAA,cAAA,KADrB,UAAA,GAAA,YA2Ba,YA3Bb,WA2Ba,EAAA,KAAA,EAAA,GAzBH,MAAA,eAAA,GAAe,EACtB,QAAQ,WAAA,SAAc,MAAA,KAAA,CAAK,CAAC,QAAA,CAAA,GAAA;OAE7B,SAAA,cAqBK,CArBL,eAAA,mBAqBK,MAAA;QAnBF,IAAI,MAAA,UAAA,IAAU;QACf,KAAI;QACH,OAAK,eAAA;SAAG,MAAA,cAAA;SAAgB,WAAA;SAAU,EAAA,SAAY,MAAA,OAAA,KAAW,MAAA,QAAA,IAAQ,UAAA,OAAA;QAAA,CAAA;QAClE,OAAK,eAAA,CAAC,+CAA6C,CAC1C,MAAA,KAAA,CAAK,CAAC,WAAW,oBAAA,KAAmB,CAAA,CAAA;QAC5C,mBAAiB,MAAA,UAAA;QACjB,MAAM,MAAA,KAAA,CAAK,CAAC;QACZ,SAAO;OAGA,GAAA,CAAA,MAAA,cAAA,IADR,WASE,KAAA,QAAA,WAAA;QAPC,IAAI,MAAA,UAAA;QACJ,MAAM,MAAA,IAAA;QACN,MAAM,MAAA,IAAA;QACN,SAAS,MAAA,OAAA;QACT,OAAO;QACP,QAAQ;QACR,QAAQ,MAAA,OAAA;OAlBH,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,GAAA,CAAA,CAAA,OAAA,MAAA,OAAA,CAAO,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"BDropdown-D4gLdtmX.js","names":[],"sources":["../src/components/BDropdown/BDropdown.vue","../src/components/BDropdown/BDropdown.vue"],"sourcesContent":["<template>\n <ConditionalWrapper\n :skip=\"inInputGroup || props.noWrapper\"\n :class=\"computedClasses\"\n :role=\"inButtonGroupAttributes?.role\"\n >\n <BButton\n :id=\"computedId\"\n ref=\"_splitButton\"\n :variant=\"props.splitVariant || props.variant\"\n :size=\"props.size\"\n :class=\"buttonClasses\"\n :disabled=\"props.splitDisabled || props.disabled\"\n :type=\"props.splitButtonType\"\n :aria-label=\"props.ariaLabel\"\n :aria-expanded=\"props.split ? undefined : showRef\"\n :aria-haspopup=\"props.split ? undefined : 'menu'\"\n :href=\"props.split ? props.splitHref : undefined\"\n :icon=\"props.icon\"\n :to=\"props.split && props.splitTo ? props.splitTo : undefined\"\n v-bind=\"!props.split ? props.toggleAttrs : undefined\"\n @click=\"onSplitClick\"\n >\n <slot name=\"button-content\"> {{ props.text }} </slot>\n </BButton>\n <BButton\n v-if=\"props.split\"\n :id=\"computedId + '-split'\"\n ref=\"_button\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :class=\"[props.toggleClass, {show: showRef}]\"\n class=\"dropdown-toggle-split dropdown-toggle\"\n :aria-expanded=\"showRef\"\n aria-haspopup=\"menu\"\n v-bind=\"props.toggleAttrs\"\n @click=\"onButtonClick\"\n >\n <span class=\"visually-hidden\">\n <slot name=\"toggle-text\">\n {{ props.toggleText }}\n </slot>\n </span>\n </BButton>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <ul\n v-show=\"showRef\"\n :id=\"computedId + '-menu'\"\n ref=\"_floating\"\n :style=\"[floatingStyles, sizeStyles, {display: showRef || isActive ? 'block' : 'none'}]\"\n class=\"dropdown-menu overflow-auto b-floating-size\"\n :class=\"[props.menuClass, computedMenuClasses]\"\n :aria-labelledby=\"computedId\"\n :role=\"props.role\"\n @click=\"onClickInside\"\n >\n <slot\n v-if=\"contentShowing\"\n :id=\"computedId\"\n :hide=\"hide\"\n :show=\"show\"\n :visible=\"showRef\"\n :click=\"onClickInside\"\n :toggle=\"onButtonClick\"\n :active=\"showRef\"\n />\n </ul>\n </Transition>\n </ConditionalTeleport>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n autoUpdate,\n type Boundary,\n flip,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, onKeyStroke, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n inject,\n nextTick,\n provide,\n readonly,\n ref,\n toRef,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BButton from '../BButton/BButton.vue'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {isBoundary, isRootBoundary, resolveBootstrapCaret} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport {buttonGroupKey, dropdownInjectionKey, inputGroupKey} from '../../utils/keys'\nimport {useShowHide} from '../../composables/useShowHide'\nimport type {BDropdownEmits, BDropdownProps, BDropdownSlots} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n disabled: false,\n floatingMiddleware: undefined,\n icon: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFade: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n unmountLazy: false,\n role: 'menu',\n size: undefined,\n noWrapper: false,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n placement: 'bottom-start',\n splitVariant: undefined,\n strategy: 'absolute',\n text: undefined,\n show: false,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n transProps: undefined,\n variant: 'secondary',\n visible: false,\n wrapperClass: undefined,\n})\nconst props = useDefaults(_props, 'BDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BDropdownSlots>()\n\nconst computedId = useId(() => props.id, 'dropdown')\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst inInputGroup = inject(inputGroupKey, false)\nconst inButtonGroup = inject(buttonGroupKey, false)\n\nconst computedOffset = computed(() =>\n typeof props.offset === 'string' || typeof props.offset === 'number' ? props.offset : Number.NaN\n)\nconst offsetToNumber = useToNumber(computedOffset)\n\nconst floatingElement = useTemplateRef<HTMLUListElement | null>('_floating')\nconst button = useTemplateRef<HTMLElement | null>('_button')\nconst splitButton = useTemplateRef<HTMLElement | null>('_splitButton')\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst referenceElement = computed(() => (!props.split ? splitButton.value : button.value))\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element: referenceElement, id: computedId},\n {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {\n animationFrame: false,\n }\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n }\n)\n\nconst computedMenuClasses = computed(() => [\n {\n show: isVisible.value,\n fade: !computedNoAnimation.value,\n },\n])\n\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: referenceElement}\n)\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: floatingElement, passive: true}\n)\n\nconst keynav = (e: Readonly<Event>, v: number) => {\n if (floatingElement.value?.contains((e.target as HTMLElement)?.closest('form'))) return\n if (/input|select|option|textarea|form/i.test((e.target as HTMLElement)?.tagName)) return\n e.preventDefault()\n if (!showRef.value) {\n show()\n const loop = setInterval(() => {\n if (isVisible.value) {\n clearInterval(loop)\n nextTick(() => keynav(e, v))\n }\n }, 16)\n return\n }\n const list = floatingElement.value?.querySelectorAll(\n '.dropdown-item:not(.disabled):not(:disabled)'\n )\n const doc = getSafeDocument()\n if (!list || !doc) return\n if (floatingElement.value?.contains(doc.activeElement)) {\n const active = floatingElement.value.querySelector('.dropdown-item:focus')\n const index = Array.prototype.indexOf.call(list, active) + v\n if (index >= 0 && index < list?.length) (list[index] as HTMLElement)?.focus()\n } else {\n ;(list[v === -1 ? list.length - 1 : 0] as HTMLElement)?.focus()\n }\n}\n\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: referenceElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: referenceElement})\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: floatingElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: floatingElement})\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const localOffset =\n typeof props.offset === 'string' || typeof props.offset === 'number'\n ? offsetToNumber.value\n : props.offset\n const arr: Middleware[] = [offsetMiddleware(localOffset)]\n if (!props.noFlip) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noShift) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noSize) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (floatingElement.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (floatingElement.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\nconst {update, floatingStyles} = useFloating(referenceElement, floatingElement, {\n placement: () => props.placement,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: () => props.strategy,\n})\n\nconst inButtonGroupAttributes = inButtonGroup\n ? {\n class: 'btn-group',\n role: 'group',\n }\n : undefined\n\nconst computedClasses = computed(() => [\n inButtonGroupAttributes?.class,\n props.wrapperClass,\n {\n 'btn-group': !props.wrapperClass && props.split,\n [`drop${resolveBootstrapCaret(props.placement)}`]: !props.wrapperClass,\n 'position-static': props.boundary !== 'clippingAncestors' && !props.isNav,\n },\n])\n\nconst buttonClasses = computed(() => [\n props.split ? props.splitClass : props.toggleClass,\n {\n 'nav-link': props.isNav,\n 'dropdown-toggle': !props.split,\n 'dropdown-toggle-no-caret': props.noCaret && !props.split,\n 'show': props.split ? undefined : showRef.value,\n },\n])\n\nconst onButtonClick = () => {\n toggle()\n}\n\nconst onSplitClick = (event: Readonly<MouseEvent>) => {\n if (props.split) {\n emit('split-click', event)\n return\n }\n onButtonClick()\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'outside')) {\n hide()\n }\n },\n {ignore: [button, splitButton]}\n)\nconst onClickInside = () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'inside')) {\n hide()\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nprovide(dropdownInjectionKey, {\n id: computedId,\n show,\n hide,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n","<template>\n <ConditionalWrapper\n :skip=\"inInputGroup || props.noWrapper\"\n :class=\"computedClasses\"\n :role=\"inButtonGroupAttributes?.role\"\n >\n <BButton\n :id=\"computedId\"\n ref=\"_splitButton\"\n :variant=\"props.splitVariant || props.variant\"\n :size=\"props.size\"\n :class=\"buttonClasses\"\n :disabled=\"props.splitDisabled || props.disabled\"\n :type=\"props.splitButtonType\"\n :aria-label=\"props.ariaLabel\"\n :aria-expanded=\"props.split ? undefined : showRef\"\n :aria-haspopup=\"props.split ? undefined : 'menu'\"\n :href=\"props.split ? props.splitHref : undefined\"\n :icon=\"props.icon\"\n :to=\"props.split && props.splitTo ? props.splitTo : undefined\"\n v-bind=\"!props.split ? props.toggleAttrs : undefined\"\n @click=\"onSplitClick\"\n >\n <slot name=\"button-content\"> {{ props.text }} </slot>\n </BButton>\n <BButton\n v-if=\"props.split\"\n :id=\"computedId + '-split'\"\n ref=\"_button\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :disabled=\"props.disabled\"\n :class=\"[props.toggleClass, {show: showRef}]\"\n class=\"dropdown-toggle-split dropdown-toggle\"\n :aria-expanded=\"showRef\"\n aria-haspopup=\"menu\"\n v-bind=\"props.toggleAttrs\"\n @click=\"onButtonClick\"\n >\n <span class=\"visually-hidden\">\n <slot name=\"toggle-text\">\n {{ props.toggleText }}\n </slot>\n </span>\n </BButton>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"!props.teleportTo || props.teleportDisabled\"\n >\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <ul\n v-show=\"showRef\"\n :id=\"computedId + '-menu'\"\n ref=\"_floating\"\n :style=\"[floatingStyles, sizeStyles, {display: showRef || isActive ? 'block' : 'none'}]\"\n class=\"dropdown-menu overflow-auto b-floating-size\"\n :class=\"[props.menuClass, computedMenuClasses]\"\n :aria-labelledby=\"computedId\"\n :role=\"props.role\"\n @click=\"onClickInside\"\n >\n <slot\n v-if=\"contentShowing\"\n :id=\"computedId\"\n :hide=\"hide\"\n :show=\"show\"\n :visible=\"showRef\"\n :click=\"onClickInside\"\n :toggle=\"onButtonClick\"\n :active=\"showRef\"\n />\n </ul>\n </Transition>\n </ConditionalTeleport>\n </ConditionalWrapper>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n autoUpdate,\n type Boundary,\n flip,\n type Middleware,\n offset as offsetMiddleware,\n type ReferenceElement,\n type RootBoundary,\n shift,\n size as sizeMiddleware,\n useFloating,\n} from '@floating-ui/vue'\nimport {onClickOutside, onKeyStroke, useToNumber} from '@vueuse/core'\nimport {\n computed,\n type ComputedRef,\n type CSSProperties,\n type EmitFn,\n inject,\n nextTick,\n provide,\n readonly,\n ref,\n toRef,\n useTemplateRef,\n watch,\n} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport BButton from '../BButton/BButton.vue'\nimport ConditionalWrapper from '../ConditionalWrapper.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {isBoundary, isRootBoundary, resolveBootstrapCaret} from '../../utils/floatingUi'\nimport {getElement} from '../../utils/getElement'\nimport {buttonGroupKey, dropdownInjectionKey, inputGroupKey} from '../../utils/keys'\nimport {useShowHide} from '../../composables/useShowHide'\nimport type {BDropdownEmits, BDropdownProps, BDropdownSlots} from '../../types'\nimport {getSafeDocument} from '../../utils/dom'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n boundary: 'clippingAncestors',\n boundaryPadding: undefined,\n teleportTo: undefined,\n teleportDisabled: false,\n disabled: false,\n floatingMiddleware: undefined,\n icon: false,\n id: undefined,\n initialAnimation: false,\n isNav: false,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFade: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n unmountLazy: false,\n role: 'menu',\n size: undefined,\n noWrapper: false,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n placement: 'bottom-start',\n splitVariant: undefined,\n strategy: 'absolute',\n text: undefined,\n show: false,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n transProps: undefined,\n variant: 'secondary',\n visible: false,\n wrapperClass: undefined,\n})\nconst props = useDefaults(_props, 'BDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BDropdownSlots>()\n\nconst computedId = useId(() => props.id, 'dropdown')\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst inInputGroup = inject(inputGroupKey, false)\nconst inButtonGroup = inject(buttonGroupKey, false)\n\nconst computedOffset = computed(() =>\n typeof props.offset === 'string' || typeof props.offset === 'number' ? props.offset : Number.NaN\n)\nconst offsetToNumber = useToNumber(computedOffset)\n\nconst floatingElement = useTemplateRef<HTMLUListElement | null>('_floating')\nconst button = useTemplateRef<HTMLElement | null>('_button')\nconst splitButton = useTemplateRef<HTMLElement | null>('_splitButton')\n\nconst boundary = computed<Boundary | undefined>(() =>\n isBoundary(props.boundary) ? props.boundary : undefined\n)\nconst rootBoundary = computed<RootBoundary | undefined>(() =>\n isRootBoundary(props.boundary) ? props.boundary : undefined\n)\n\nconst referenceElement = computed(() => (!props.split ? splitButton.value : button.value))\nlet cleanup: ReturnType<typeof autoUpdate> | undefined\n\nconst {\n showRef,\n renderRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n contentShowing,\n isVisible,\n isActive,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element: referenceElement, id: computedId},\n {\n showFn: () => {\n update()\n nextTick(() => {\n cleanup = autoUpdate(\n referenceElement.value as ReferenceElement,\n floatingElement.value as HTMLElement,\n update,\n {\n animationFrame: false,\n }\n )\n })\n },\n hideFn: () => {\n if (cleanup) {\n cleanup()\n cleanup = undefined\n }\n },\n }\n)\n\nconst computedMenuClasses = computed(() => [\n {\n show: isVisible.value,\n fade: !computedNoAnimation.value,\n },\n])\n\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: referenceElement}\n)\nonKeyStroke(\n 'Escape',\n () => {\n hide()\n getElement(referenceElement.value)?.focus()\n },\n {target: floatingElement, passive: true}\n)\n\nconst keynav = (e: Readonly<Event>, v: number) => {\n if (floatingElement.value?.contains((e.target as HTMLElement)?.closest('form'))) return\n if (/input|select|option|textarea|form/i.test((e.target as HTMLElement)?.tagName)) return\n e.preventDefault()\n if (!showRef.value) {\n show()\n const loop = setInterval(() => {\n if (isVisible.value) {\n clearInterval(loop)\n nextTick(() => keynav(e, v))\n }\n }, 16)\n return\n }\n const list = floatingElement.value?.querySelectorAll(\n '.dropdown-item:not(.disabled):not(:disabled)'\n )\n const doc = getSafeDocument()\n if (!list || !doc) return\n if (floatingElement.value?.contains(doc.activeElement)) {\n const active = floatingElement.value.querySelector('.dropdown-item:focus')\n const index = Array.prototype.indexOf.call(list, active) + v\n if (index >= 0 && index < list?.length) (list[index] as HTMLElement)?.focus()\n } else {\n ;(list[v === -1 ? list.length - 1 : 0] as HTMLElement)?.focus()\n }\n}\n\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: referenceElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: referenceElement})\nonKeyStroke('ArrowUp', (e) => keynav(e, -1), {target: floatingElement})\nonKeyStroke('ArrowDown', (e) => keynav(e, 1), {target: floatingElement})\n\nconst sizeStyles = ref<CSSProperties>({})\nconst floatingMiddleware = computed<readonly Middleware[]>(() => {\n if (props.floatingMiddleware !== undefined) {\n return props.floatingMiddleware\n }\n const localOffset =\n typeof props.offset === 'string' || typeof props.offset === 'number'\n ? offsetToNumber.value\n : props.offset\n const arr: Middleware[] = [offsetMiddleware(localOffset)]\n if (!props.noFlip) {\n arr.push(\n flip({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noShift) {\n arr.push(\n shift({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n })\n )\n }\n if (!props.noSize) {\n arr.push(\n sizeMiddleware({\n boundary: boundary.value,\n rootBoundary: rootBoundary.value,\n padding: props.boundaryPadding,\n apply({availableWidth, availableHeight}) {\n sizeStyles.value = {\n '--bv-floating-max-height':\n availableHeight >= (floatingElement.value?.scrollHeight ?? 0)\n ? undefined\n : availableHeight\n ? `${Math.max(0, availableHeight)}px`\n : undefined,\n '--bv-floating-max-width':\n availableWidth >= (floatingElement.value?.scrollWidth ?? 0)\n ? undefined\n : availableWidth\n ? `${Math.max(0, availableWidth)}px`\n : undefined,\n }\n },\n })\n )\n }\n return arr\n})\nconst {update, floatingStyles} = useFloating(referenceElement, floatingElement, {\n placement: () => props.placement,\n middleware: floatingMiddleware as ComputedRef<Middleware[]>,\n strategy: () => props.strategy,\n})\n\nconst inButtonGroupAttributes = inButtonGroup\n ? {\n class: 'btn-group',\n role: 'group',\n }\n : undefined\n\nconst computedClasses = computed(() => [\n inButtonGroupAttributes?.class,\n props.wrapperClass,\n {\n 'btn-group': !props.wrapperClass && props.split,\n [`drop${resolveBootstrapCaret(props.placement)}`]: !props.wrapperClass,\n 'position-static': props.boundary !== 'clippingAncestors' && !props.isNav,\n },\n])\n\nconst buttonClasses = computed(() => [\n props.split ? props.splitClass : props.toggleClass,\n {\n 'nav-link': props.isNav,\n 'dropdown-toggle': !props.split,\n 'dropdown-toggle-no-caret': props.noCaret && !props.split,\n 'show': props.split ? undefined : showRef.value,\n },\n])\n\nconst onButtonClick = () => {\n toggle()\n}\n\nconst onSplitClick = (event: Readonly<MouseEvent>) => {\n if (props.split) {\n emit('split-click', event)\n return\n }\n onButtonClick()\n}\n\nonClickOutside(\n floatingElement,\n () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'outside')) {\n hide()\n }\n },\n {ignore: [button, splitButton]}\n)\nconst onClickInside = () => {\n if (showRef.value && (props.autoClose === true || props.autoClose === 'inside')) {\n hide()\n }\n}\n\nwatch(isVisible, () => {\n update()\n})\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n\nprovide(dropdownInjectionKey, {\n id: computedId,\n show,\n hide,\n toggle,\n visible: readonly(showRef),\n isNav: toRef(() => props.isNav),\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKA,MAAM,QAAQ,YAAY,SAAQ,WAAW;EAC7C,MAAM,OAAO;EAGb,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EAEnD,MAAM,aAAa,SAA6D,SAAA,YAAiB;EAEjG,MAAM,eAAe,OAAO,eAAe,KAAK;EAChD,MAAM,gBAAgB,OAAO,gBAAgB,KAAK;EAElD,MAAM,iBAAiB,eACrB,OAAO,MAAM,WAAW,YAAY,OAAO,MAAM,WAAW,WAAW,MAAM,SAAS,GACxF;EACA,MAAM,iBAAiB,YAAY,cAAc;EAEjD,MAAM,kBAAkB,eAAwC,WAAW;EAC3E,MAAM,SAAS,eAAmC,SAAS;EAC3D,MAAM,cAAc,eAAmC,cAAc;EAErE,MAAM,WAAW,eACf,WAAW,MAAM,QAAQ,IAAI,MAAM,WAAW,KAAA,CAChD;EACA,MAAM,eAAe,eACnB,eAAe,MAAM,QAAQ,IAAI,MAAM,WAAW,KAAA,CACpD;EAEA,MAAM,mBAAmB,eAAgB,CAAC,MAAM,QAAQ,YAAY,QAAQ,OAAO,KAAM;EACzF,IAAI;EAEJ,MAAM,EACJ,SACA,WACA,MACA,MACA,QACA,qBACA,iBAC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AA,KAAA,CAAK,CAAC,WAAW,oBAAA,KAAmB,CAAA,CAAA;QAC5C,mBAAiB,MAAA,UAAA;QACjB,MAAM,MAAA,KAAA,CAAK,CAAC;QACZ,SAAO;OAGA,GAAA,CAAA,MAAA,cAAA,IADR,WASE,KAAA,QAAA,WAAA;QAPC,IAAI,MAAA,UAAA;QACJ,MAAM,MAAA,IAAA;QACN,MAAM,MAAA,IAAA;QACN,SAAS,MAAA,OAAA;QACT,OAAO;QACP,QAAQ;QACR,QAAQ,MAAA,OAAA;OAlBH,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,IAAA,IAAA,CAAA,GAAA,IAAA,UAAA,GAAA,CAAA,CAAA,OAAA,MAAA,OAAA,CAAO,CAAA,CAAA,CAAA,CAAA"}
@@ -4,7 +4,7 @@ import { a as onKeyStroke, o as unrefElement, r as getSSRHandler } from "./dist-
4
4
  import { i as getSafeDocument, o as isEmptySlot, r as getModalZIndex } from "./dom-BdUQrX99.js";
5
5
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
6
6
  import { t as useId$1 } from "./useId-Fh-Arhb7.js";
7
- import { t as useShowHide } from "./useShowHide-C95Y9EKL.js";
7
+ import { t as useShowHide } from "./useShowHide-B6RQbFDt.js";
8
8
  import { t as BCloseButton_default } from "./BCloseButton-B3-IdpNp.js";
9
9
  import { t as useColorVariantClasses } from "./useColorVariantClasses-DHQvLjek.js";
10
10
  import { t as BButton_default } from "./BButton-KZu5jczf.js";
@@ -513,4 +513,4 @@ var BModal_default = /* @__PURE__ */ defineComponent({
513
513
  //#endregion
514
514
  export { useSharedModalStack as n, BModal_default as t };
515
515
 
516
- //# sourceMappingURL=BModal-NPsCBNo7.js.map
516
+ //# sourceMappingURL=BModal-BjmeVZen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BModal-NPsCBNo7.js","names":["$attrs"],"sources":["../src/composables/useModalManager.ts","../src/components/BModal/BModal.vue","../src/components/BModal/BModal.vue"],"sourcesContent":["import {getSSRHandler, tryOnScopeDispose, unrefElement} from '@vueuse/core'\nimport {\n type ComponentInternalInstance,\n computed,\n getCurrentInstance,\n inject,\n type Ref,\n toValue,\n watch,\n} from 'vue'\nimport {modalManagerKey} from '../utils/keys'\nimport {getSafeDocument} from '../utils/dom'\n\nconst modalOpenClassName = 'modal-open'\n\nexport const useSharedModalStack = () => {\n const modalManagerPlugin = inject(modalManagerKey, null)\n\n /**\n * Removes an item from both the stack and registry\n */\n const dispose = (modal: Readonly<ComponentInternalInstance>): void => {\n modalManagerPlugin?.removeStack(modal)\n modalManagerPlugin?.removeRegistry(modal)\n }\n\n const updateHTMLAttrs = getSSRHandler('updateHTMLAttrs', (selector, attribute, value) => {\n const el =\n typeof selector !== 'string'\n ? unrefElement(selector)\n : selector\n ? getSafeDocument()?.querySelector(selector)\n : undefined\n if (!el) return\n\n if (attribute === 'class') {\n el.classList.toggle(modalOpenClassName, value === modalOpenClassName)\n } else {\n el.setAttribute(attribute, value)\n }\n })\n\n tryOnScopeDispose(() => {\n if (modalManagerPlugin?.countStack.value === 0) {\n updateHTMLAttrs('body', 'class', '')\n }\n })\n\n watch(\n () => modalManagerPlugin?.countStack.value,\n (newValue) => {\n if (newValue === undefined) return\n updateHTMLAttrs('body', 'class', newValue > 0 ? modalOpenClassName : '')\n }\n )\n\n return {\n ...modalManagerPlugin,\n dispose,\n }\n}\n\nexport const useModalManager = (modalOpen: Readonly<Ref<boolean>>, initialValue: boolean) => {\n const {pushRegistry, pushStack, removeStack, stack, dispose, countStack} = useSharedModalStack()\n\n const currentModal = getCurrentInstance()\n\n if (!currentModal || currentModal.type.__name !== 'BModal') {\n throw new Error('useModalManager must only use in BModal component')\n }\n\n pushRegistry?.(currentModal)\n\n tryOnScopeDispose(() => {\n dispose(currentModal)\n })\n\n const setInStack = (newValue: boolean, oldValue: boolean) => {\n if (newValue) {\n pushStack?.(currentModal)\n } else if (oldValue && !newValue) {\n removeStack?.(currentModal)\n }\n }\n\n // (initialValue, initialValue) is meant to always only ever trigger the first `if (newValue) {` block. The other block is skipped _always_\n setInStack(initialValue, initialValue)\n\n watch(modalOpen, setInStack)\n\n return {\n activePosition: computed(() =>\n stack?.value.findIndex((el) => toValue(el.exposed?.id) === toValue(currentModal.exposed?.id))\n ),\n activeModalCount: countStack,\n stackWithoutSelf: computed(\n () =>\n stack?.value.filter(\n (el) => toValue(el.exposed?.id) !== toValue(currentModal.exposed?.id)\n ) ?? []\n ),\n }\n}\n","<template>\n <ConditionalTeleport :to=\"props.teleportTo\" :disabled=\"props.teleportDisabled\">\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"modal\"\n :class=\"[\n props.modalClass,\n {\n fade: !computedNoAnimation,\n show: isVisible,\n ...sharedClasses,\n },\n ]\"\n role=\"dialog\"\n :aria-labelledby=\"!props.noHeader ? `${computedId}-label` : undefined\"\n :aria-describedby=\"`${computedId}-body`\"\n tabindex=\"-1\"\n v-bind=\"$attrs\"\n :style=\"computedZIndex\"\n style=\"display: block\"\n @mousedown.left.self=\"hide('backdrop')\"\n >\n <div class=\"modal-dialog\" :class=\"modalDialogClasses\">\n <div v-if=\"contentShowing\" class=\"modal-content\" :class=\"props.contentClass\">\n <div\n v-if=\"!props.noHeader\"\n class=\"modal-header\"\n :class=\"headerClasses\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <component\n :is=\"props.titleTag\"\n :id=\"`${computedId}-label`\"\n class=\"modal-title\"\n :class=\"titleClasses\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </component>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_closeButton\"\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=\"_closeButton\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div\n :id=\"`${computedId}-body`\"\n class=\"modal-body\"\n :class=\"bodyClasses\"\n v-bind=\"props.bodyAttrs\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </div>\n <div v-if=\"!props.noFooter\" class=\"modal-footer\" :class=\"footerClasses\">\n <slot name=\"footer\" v-bind=\"sharedSlots\">\n <slot name=\"cancel\" v-bind=\"sharedSlots\">\n <BButton\n v-if=\"!props.okOnly\"\n ref=\"_cancelButton\"\n :disabled=\"disableCancel\"\n :size=\"props.buttonSize\"\n :variant=\"props.cancelVariant\"\n :class=\"props.cancelClass\"\n @click=\"hide('cancel')\"\n >\n {{ props.cancelTitle }}\n </BButton>\n </slot>\n <slot name=\"ok\" v-bind=\"sharedSlots\">\n <BButton\n ref=\"_okButton\"\n :disabled=\"disableOk\"\n :size=\"props.buttonSize\"\n :variant=\"props.okVariant\"\n :class=\"props.okClass\"\n @click=\"hide('ok')\"\n >\n {{ props.okTitle }}\n </BButton>\n </slot>\n </slot>\n </div>\n </div>\n </div>\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=\"showRef || (isLeaving && props.backdropFirst && !computedNoAnimation)\"\n class=\"modal-backdrop\"\n :style=\"computedZIndexBackdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n ...sharedClasses,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {onKeyStroke, unrefElement} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {\n computed,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onMounted,\n ref,\n useTemplateRef,\n watch,\n} from 'vue'\nimport type {BModalEmits, BModalProps, BModalSlots, BModalSlotsData} from '../../types'\n\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {getModalZIndex, getSafeDocument, isEmptySlot} from '../../utils/dom'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport {useModalManager} from '../../composables/useModalManager'\nimport {useShowHide} from '../../composables/useShowHide'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {getElement} from '../../utils/getElement'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BModalProps, 'modelValue'>>(), {\n focus: undefined,\n backdropFirst: false,\n body: undefined,\n bodyBgVariant: null,\n bodyAttrs: undefined,\n bodyClass: null,\n bodyScrolling: false,\n bodyTextVariant: null,\n bodyVariant: null,\n busy: false,\n buttonSize: undefined,\n cancelClass: undefined,\n cancelDisabled: false,\n cancelTitle: 'Cancel',\n cancelVariant: 'secondary',\n centered: false,\n contentClass: undefined,\n dialogClass: undefined,\n footerBgVariant: null,\n footerBorderVariant: null,\n footerClass: undefined,\n footerTextVariant: null,\n footerVariant: null,\n fullscreen: false,\n headerAttrs: undefined,\n headerBgVariant: null,\n headerBorderVariant: null,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n headerTextVariant: null,\n headerVariant: null,\n noFooter: false,\n noHeader: false,\n noHeaderClose: false,\n id: undefined,\n initialAnimation: false,\n lazy: false,\n modalClass: undefined,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noFade: false,\n noTrap: false,\n okClass: undefined,\n okDisabled: false,\n okOnly: false,\n okTitle: 'OK',\n okVariant: 'primary',\n unmountLazy: false,\n scrollable: false,\n size: undefined,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n titleClass: undefined,\n titleVisuallyHidden: false,\n titleTag: 'h5',\n show: false,\n transProps: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BModal')\nconst emit = defineEmits<BModalEmits>()\nconst slots = defineSlots<BModalSlots>()\n\nconst computedId = useId(() => props.id, 'modal')\nconst modelValue = defineModel<Exclude<BModalProps['modelValue'], undefined>>({default: false})\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst okButton = useTemplateRef<HTMLElement | null>('_okButton')\nconst cancelButton = useTemplateRef<HTMLElement | null>('_cancelButton')\nconst closeButton = useTemplateRef<HTMLElement | null>('_closeButton')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'ok') {\n return okButton\n } else if (props.focus === 'close') {\n return closeButton\n } else if (props.focus === 'cancel') {\n return cancelButton\n }\n return getElement(props.focus, element.value ?? undefined) ?? element.value\n }\n return element\n}\n\nlet activeElement: HTMLElement | null = null\nconst onAfterEnter = () => {\n const doc = getSafeDocument()\n if (props.noTrap && props.focus !== false && doc) {\n // Hypothetically this could be an issue\n activeElement = doc.activeElement as HTMLElement\n if (activeElement === element.value) {\n activeElement = null\n }\n const el = unrefElement(pickFocusItem())\n if (!el) return\n el?.focus()\n if (\n el.tagName &&\n el.tagName.toLowerCase() === 'input' &&\n typeof (el as HTMLInputElement).select === 'function'\n ) {\n ;(el as HTMLInputElement).select()\n }\n }\n}\n\nconst onAfterLeave = () => {\n if (props.noTrap && props.focus !== false && activeElement) {\n activeElement?.focus()\n activeElement = null\n }\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n backdropTransitionProps,\n isLeaving,\n isVisible,\n trapActive,\n contentShowing,\n backdropReady,\n backdropVisible,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onAfterEnter,\n onAfterLeave,\n },\n }\n)\n\nconst fallbackClassSelector = 'modal-fallback-focus'\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap,\n fallbackFocus: {\n ref: fallbackFocusElement,\n classSelector: fallbackClassSelector,\n },\n focus: () => (props.focus === false ? false : (unrefElement(pickFocusItem()) ?? undefined)),\n // () => (typeof focus === 'boolean' ? focus : (unrefElement(focus) ?? undefined)),\n})\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\nuseSafeScrollLock(showRef, () => props.bodyScrolling)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\n\nconst modalDialogClasses = computed(() => [\n props.dialogClass,\n {\n 'modal-fullscreen': props.fullscreen === true,\n [`modal-fullscreen-${props.fullscreen}-down`]: typeof props.fullscreen === 'string',\n [`modal-${props.size}`]: props.size !== undefined,\n 'modal-dialog-centered': props.centered,\n 'modal-dialog-scrollable': props.scrollable,\n },\n])\n\nconst bodyColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.bodyBgVariant,\n textVariant: props.bodyTextVariant,\n variant: props.bodyVariant,\n}))\nconst bodyClasses = computed(() => [props.bodyClass, bodyColorClasses.value])\n\nconst headerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.headerBgVariant,\n textVariant: props.headerTextVariant,\n variant: props.headerVariant,\n borderVariant: props.headerBorderVariant,\n}))\nconst headerClasses = computed(() => [props.headerClass, headerColorClasses.value])\n\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: props.headerCloseClass,\n}))\n\nconst footerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.footerBgVariant,\n textVariant: props.footerTextVariant,\n variant: props.footerVariant,\n borderVariant: props.footerBorderVariant,\n}))\nconst footerClasses = computed(() => [props.footerClass, footerColorClasses.value])\n\nconst titleClasses = computed(() => [\n props.titleClass,\n {\n ['visually-hidden']: props.titleVisuallyHidden,\n },\n])\n\nconst disableCancel = computed(() => props.cancelDisabled || props.busy)\nconst disableOk = computed(() => props.okDisabled || props.busy)\n\nconst {activePosition, activeModalCount, stackWithoutSelf} = useModalManager(\n showRef,\n modelValue.value\n)\n\nconst sharedClasses = computed(() => ({\n [`stack-position-${activePosition?.value ?? 0}`]: true,\n [`stack-inverse-position-${(activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0)}`]: true,\n}))\n\nwatch(stackWithoutSelf, (newValue, oldValue) => {\n if (newValue.length > oldValue.length && showRef.value === true && props.noStacking) hide()\n})\n\nconst defaultModalDialogZIndex = ref(getModalZIndex(element.value ?? getSafeDocument()?.body))\n\nonMounted(() => {\n watch(\n renderRef,\n (v) => {\n if (!v) return\n nextTick(() => {\n if (!element.value) return\n defaultModalDialogZIndex.value = getModalZIndex(element.value)\n })\n },\n {immediate: true}\n )\n})\n\nconst computedZIndexNumber = computed<number>(() =>\n // Make sure that newly opened modals have a higher z-index than currently active ones.\n // All active modals have a z-index of ('defaultZIndex' - 'stackSize' - 'positionInStack').\n //\n // This means inactive modals will already be higher than active ones when opened.\n\n showRef.value || isLeaving.value\n ? // Just for reference there is a single frame in which the modal is not active but still has a higher z-index than the active ones due to _when_ it calculates its position. It's a small visual effect\n defaultModalDialogZIndex.value -\n ((activeModalCount?.value ?? 0) * 2 - (activePosition?.value ?? 0) * 2)\n : defaultModalDialogZIndex.value\n)\nconst computedZIndex = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\nconst computedZIndexBackdrop = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value - 1,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\n\nconst sharedSlots = computed<BModalSlotsData>(() => ({\n id: computedId.value,\n cancel: () => {\n hide('cancel')\n },\n close: () => {\n hide('close')\n },\n hide,\n show,\n toggle,\n ok: () => {\n hide('ok')\n },\n active: showRef.value,\n visible: showRef.value,\n}))\n\ndefineExpose({\n hide,\n id: computedId,\n show,\n toggle,\n visible: showRef,\n})\n</script>\n","<template>\n <ConditionalTeleport :to=\"props.teleportTo\" :disabled=\"props.teleportDisabled\">\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"modal\"\n :class=\"[\n props.modalClass,\n {\n fade: !computedNoAnimation,\n show: isVisible,\n ...sharedClasses,\n },\n ]\"\n role=\"dialog\"\n :aria-labelledby=\"!props.noHeader ? `${computedId}-label` : undefined\"\n :aria-describedby=\"`${computedId}-body`\"\n tabindex=\"-1\"\n v-bind=\"$attrs\"\n :style=\"computedZIndex\"\n style=\"display: block\"\n @mousedown.left.self=\"hide('backdrop')\"\n >\n <div class=\"modal-dialog\" :class=\"modalDialogClasses\">\n <div v-if=\"contentShowing\" class=\"modal-content\" :class=\"props.contentClass\">\n <div\n v-if=\"!props.noHeader\"\n class=\"modal-header\"\n :class=\"headerClasses\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <component\n :is=\"props.titleTag\"\n :id=\"`${computedId}-label`\"\n class=\"modal-title\"\n :class=\"titleClasses\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </component>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_closeButton\"\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=\"_closeButton\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div\n :id=\"`${computedId}-body`\"\n class=\"modal-body\"\n :class=\"bodyClasses\"\n v-bind=\"props.bodyAttrs\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </div>\n <div v-if=\"!props.noFooter\" class=\"modal-footer\" :class=\"footerClasses\">\n <slot name=\"footer\" v-bind=\"sharedSlots\">\n <slot name=\"cancel\" v-bind=\"sharedSlots\">\n <BButton\n v-if=\"!props.okOnly\"\n ref=\"_cancelButton\"\n :disabled=\"disableCancel\"\n :size=\"props.buttonSize\"\n :variant=\"props.cancelVariant\"\n :class=\"props.cancelClass\"\n @click=\"hide('cancel')\"\n >\n {{ props.cancelTitle }}\n </BButton>\n </slot>\n <slot name=\"ok\" v-bind=\"sharedSlots\">\n <BButton\n ref=\"_okButton\"\n :disabled=\"disableOk\"\n :size=\"props.buttonSize\"\n :variant=\"props.okVariant\"\n :class=\"props.okClass\"\n @click=\"hide('ok')\"\n >\n {{ props.okTitle }}\n </BButton>\n </slot>\n </slot>\n </div>\n </div>\n </div>\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=\"showRef || (isLeaving && props.backdropFirst && !computedNoAnimation)\"\n class=\"modal-backdrop\"\n :style=\"computedZIndexBackdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n ...sharedClasses,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {onKeyStroke, unrefElement} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {\n computed,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onMounted,\n ref,\n useTemplateRef,\n watch,\n} from 'vue'\nimport type {BModalEmits, BModalProps, BModalSlots, BModalSlotsData} from '../../types'\n\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {getModalZIndex, getSafeDocument, isEmptySlot} from '../../utils/dom'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport {useModalManager} from '../../composables/useModalManager'\nimport {useShowHide} from '../../composables/useShowHide'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {getElement} from '../../utils/getElement'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BModalProps, 'modelValue'>>(), {\n focus: undefined,\n backdropFirst: false,\n body: undefined,\n bodyBgVariant: null,\n bodyAttrs: undefined,\n bodyClass: null,\n bodyScrolling: false,\n bodyTextVariant: null,\n bodyVariant: null,\n busy: false,\n buttonSize: undefined,\n cancelClass: undefined,\n cancelDisabled: false,\n cancelTitle: 'Cancel',\n cancelVariant: 'secondary',\n centered: false,\n contentClass: undefined,\n dialogClass: undefined,\n footerBgVariant: null,\n footerBorderVariant: null,\n footerClass: undefined,\n footerTextVariant: null,\n footerVariant: null,\n fullscreen: false,\n headerAttrs: undefined,\n headerBgVariant: null,\n headerBorderVariant: null,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n headerTextVariant: null,\n headerVariant: null,\n noFooter: false,\n noHeader: false,\n noHeaderClose: false,\n id: undefined,\n initialAnimation: false,\n lazy: false,\n modalClass: undefined,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noFade: false,\n noTrap: false,\n okClass: undefined,\n okDisabled: false,\n okOnly: false,\n okTitle: 'OK',\n okVariant: 'primary',\n unmountLazy: false,\n scrollable: false,\n size: undefined,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n titleClass: undefined,\n titleVisuallyHidden: false,\n titleTag: 'h5',\n show: false,\n transProps: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BModal')\nconst emit = defineEmits<BModalEmits>()\nconst slots = defineSlots<BModalSlots>()\n\nconst computedId = useId(() => props.id, 'modal')\nconst modelValue = defineModel<Exclude<BModalProps['modelValue'], undefined>>({default: false})\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst okButton = useTemplateRef<HTMLElement | null>('_okButton')\nconst cancelButton = useTemplateRef<HTMLElement | null>('_cancelButton')\nconst closeButton = useTemplateRef<HTMLElement | null>('_closeButton')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'ok') {\n return okButton\n } else if (props.focus === 'close') {\n return closeButton\n } else if (props.focus === 'cancel') {\n return cancelButton\n }\n return getElement(props.focus, element.value ?? undefined) ?? element.value\n }\n return element\n}\n\nlet activeElement: HTMLElement | null = null\nconst onAfterEnter = () => {\n const doc = getSafeDocument()\n if (props.noTrap && props.focus !== false && doc) {\n // Hypothetically this could be an issue\n activeElement = doc.activeElement as HTMLElement\n if (activeElement === element.value) {\n activeElement = null\n }\n const el = unrefElement(pickFocusItem())\n if (!el) return\n el?.focus()\n if (\n el.tagName &&\n el.tagName.toLowerCase() === 'input' &&\n typeof (el as HTMLInputElement).select === 'function'\n ) {\n ;(el as HTMLInputElement).select()\n }\n }\n}\n\nconst onAfterLeave = () => {\n if (props.noTrap && props.focus !== false && activeElement) {\n activeElement?.focus()\n activeElement = null\n }\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n backdropTransitionProps,\n isLeaving,\n isVisible,\n trapActive,\n contentShowing,\n backdropReady,\n backdropVisible,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onAfterEnter,\n onAfterLeave,\n },\n }\n)\n\nconst fallbackClassSelector = 'modal-fallback-focus'\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap,\n fallbackFocus: {\n ref: fallbackFocusElement,\n classSelector: fallbackClassSelector,\n },\n focus: () => (props.focus === false ? false : (unrefElement(pickFocusItem()) ?? undefined)),\n // () => (typeof focus === 'boolean' ? focus : (unrefElement(focus) ?? undefined)),\n})\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\nuseSafeScrollLock(showRef, () => props.bodyScrolling)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\n\nconst modalDialogClasses = computed(() => [\n props.dialogClass,\n {\n 'modal-fullscreen': props.fullscreen === true,\n [`modal-fullscreen-${props.fullscreen}-down`]: typeof props.fullscreen === 'string',\n [`modal-${props.size}`]: props.size !== undefined,\n 'modal-dialog-centered': props.centered,\n 'modal-dialog-scrollable': props.scrollable,\n },\n])\n\nconst bodyColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.bodyBgVariant,\n textVariant: props.bodyTextVariant,\n variant: props.bodyVariant,\n}))\nconst bodyClasses = computed(() => [props.bodyClass, bodyColorClasses.value])\n\nconst headerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.headerBgVariant,\n textVariant: props.headerTextVariant,\n variant: props.headerVariant,\n borderVariant: props.headerBorderVariant,\n}))\nconst headerClasses = computed(() => [props.headerClass, headerColorClasses.value])\n\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: props.headerCloseClass,\n}))\n\nconst footerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.footerBgVariant,\n textVariant: props.footerTextVariant,\n variant: props.footerVariant,\n borderVariant: props.footerBorderVariant,\n}))\nconst footerClasses = computed(() => [props.footerClass, footerColorClasses.value])\n\nconst titleClasses = computed(() => [\n props.titleClass,\n {\n ['visually-hidden']: props.titleVisuallyHidden,\n },\n])\n\nconst disableCancel = computed(() => props.cancelDisabled || props.busy)\nconst disableOk = computed(() => props.okDisabled || props.busy)\n\nconst {activePosition, activeModalCount, stackWithoutSelf} = useModalManager(\n showRef,\n modelValue.value\n)\n\nconst sharedClasses = computed(() => ({\n [`stack-position-${activePosition?.value ?? 0}`]: true,\n [`stack-inverse-position-${(activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0)}`]: true,\n}))\n\nwatch(stackWithoutSelf, (newValue, oldValue) => {\n if (newValue.length > oldValue.length && showRef.value === true && props.noStacking) hide()\n})\n\nconst defaultModalDialogZIndex = ref(getModalZIndex(element.value ?? getSafeDocument()?.body))\n\nonMounted(() => {\n watch(\n renderRef,\n (v) => {\n if (!v) return\n nextTick(() => {\n if (!element.value) return\n defaultModalDialogZIndex.value = getModalZIndex(element.value)\n })\n },\n {immediate: true}\n )\n})\n\nconst computedZIndexNumber = computed<number>(() =>\n // Make sure that newly opened modals have a higher z-index than currently active ones.\n // All active modals have a z-index of ('defaultZIndex' - 'stackSize' - 'positionInStack').\n //\n // This means inactive modals will already be higher than active ones when opened.\n\n showRef.value || isLeaving.value\n ? // Just for reference there is a single frame in which the modal is not active but still has a higher z-index than the active ones due to _when_ it calculates its position. It's a small visual effect\n defaultModalDialogZIndex.value -\n ((activeModalCount?.value ?? 0) * 2 - (activePosition?.value ?? 0) * 2)\n : defaultModalDialogZIndex.value\n)\nconst computedZIndex = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\nconst computedZIndexBackdrop = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value - 1,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\n\nconst sharedSlots = computed<BModalSlotsData>(() => ({\n id: computedId.value,\n cancel: () => {\n hide('cancel')\n },\n close: () => {\n hide('close')\n },\n hide,\n show,\n toggle,\n ok: () => {\n hide('ok')\n },\n active: showRef.value,\n visible: showRef.value,\n}))\n\ndefineExpose({\n hide,\n id: computedId,\n show,\n toggle,\n visible: showRef,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;AAaA,IAAM,qBAAqB;AAE3B,IAAa,4BAA4B;CACvC,MAAM,qBAAqB,OAAO,iBAAiB,IAAI;;;;CAKvD,MAAM,WAAW,UAAqD;EACpE,oBAAoB,YAAY,KAAK;EACrC,oBAAoB,eAAe,KAAK;CAC1C;CAEA,MAAM,kBAAkB,cAAc,oBAAoB,UAAU,WAAW,UAAU;EACvF,MAAM,KACJ,OAAO,aAAa,WAChB,aAAa,QAAQ,IACrB,WACE,gBAAgB,CAAC,EAAE,cAAc,QAAQ,IACzC,KAAA;EACR,IAAI,CAAC,IAAI;EAET,IAAI,cAAc,SAChB,GAAG,UAAU,OAAO,oBAAoB,UAAU,kBAAkB;OAEpE,GAAG,aAAa,WAAW,KAAK;CAEpC,CAAC;CAED,wBAAwB;EACtB,IAAI,oBA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CAAC,kBAAgB;OAEO,MAAA,CAAA,MAAA,mBAAA;OAAuC,MAAA,MAAA,eAAA,KAAmB,MAAA,mBAAA;OAAoC,GAAA,cAAA;;MAD1H,OAAK,eAAE,uBAAA,KAAsB;MAM7B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,IAAA,CAAI,CAAA,UAAA;KARJ,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA,OAAA,MAAA,OAAA,KAAY,MAAA,SAAA,KAAa,MAAA,KAAA,CAAK,CAAC,iBAAa,CAAK,MAAA,mBAAA,CAAmB,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"BModal-BjmeVZen.js","names":["$attrs"],"sources":["../src/composables/useModalManager.ts","../src/components/BModal/BModal.vue","../src/components/BModal/BModal.vue"],"sourcesContent":["import {getSSRHandler, tryOnScopeDispose, unrefElement} from '@vueuse/core'\nimport {\n type ComponentInternalInstance,\n computed,\n getCurrentInstance,\n inject,\n type Ref,\n toValue,\n watch,\n} from 'vue'\nimport {modalManagerKey} from '../utils/keys'\nimport {getSafeDocument} from '../utils/dom'\n\nconst modalOpenClassName = 'modal-open'\n\nexport const useSharedModalStack = () => {\n const modalManagerPlugin = inject(modalManagerKey, null)\n\n /**\n * Removes an item from both the stack and registry\n */\n const dispose = (modal: Readonly<ComponentInternalInstance>): void => {\n modalManagerPlugin?.removeStack(modal)\n modalManagerPlugin?.removeRegistry(modal)\n }\n\n const updateHTMLAttrs = getSSRHandler('updateHTMLAttrs', (selector, attribute, value) => {\n const el =\n typeof selector !== 'string'\n ? unrefElement(selector)\n : selector\n ? getSafeDocument()?.querySelector(selector)\n : undefined\n if (!el) return\n\n if (attribute === 'class') {\n el.classList.toggle(modalOpenClassName, value === modalOpenClassName)\n } else {\n el.setAttribute(attribute, value)\n }\n })\n\n tryOnScopeDispose(() => {\n if (modalManagerPlugin?.countStack.value === 0) {\n updateHTMLAttrs('body', 'class', '')\n }\n })\n\n watch(\n () => modalManagerPlugin?.countStack.value,\n (newValue) => {\n if (newValue === undefined) return\n updateHTMLAttrs('body', 'class', newValue > 0 ? modalOpenClassName : '')\n }\n )\n\n return {\n ...modalManagerPlugin,\n dispose,\n }\n}\n\nexport const useModalManager = (modalOpen: Readonly<Ref<boolean>>, initialValue: boolean) => {\n const {pushRegistry, pushStack, removeStack, stack, dispose, countStack} = useSharedModalStack()\n\n const currentModal = getCurrentInstance()\n\n if (!currentModal || currentModal.type.__name !== 'BModal') {\n throw new Error('useModalManager must only use in BModal component')\n }\n\n pushRegistry?.(currentModal)\n\n tryOnScopeDispose(() => {\n dispose(currentModal)\n })\n\n const setInStack = (newValue: boolean, oldValue: boolean) => {\n if (newValue) {\n pushStack?.(currentModal)\n } else if (oldValue && !newValue) {\n removeStack?.(currentModal)\n }\n }\n\n // (initialValue, initialValue) is meant to always only ever trigger the first `if (newValue) {` block. The other block is skipped _always_\n setInStack(initialValue, initialValue)\n\n watch(modalOpen, setInStack)\n\n return {\n activePosition: computed(() =>\n stack?.value.findIndex((el) => toValue(el.exposed?.id) === toValue(currentModal.exposed?.id))\n ),\n activeModalCount: countStack,\n stackWithoutSelf: computed(\n () =>\n stack?.value.filter(\n (el) => toValue(el.exposed?.id) !== toValue(currentModal.exposed?.id)\n ) ?? []\n ),\n }\n}\n","<template>\n <ConditionalTeleport :to=\"props.teleportTo\" :disabled=\"props.teleportDisabled\">\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"modal\"\n :class=\"[\n props.modalClass,\n {\n fade: !computedNoAnimation,\n show: isVisible,\n ...sharedClasses,\n },\n ]\"\n role=\"dialog\"\n :aria-labelledby=\"!props.noHeader ? `${computedId}-label` : undefined\"\n :aria-describedby=\"`${computedId}-body`\"\n tabindex=\"-1\"\n v-bind=\"$attrs\"\n :style=\"computedZIndex\"\n style=\"display: block\"\n @mousedown.left.self=\"hide('backdrop')\"\n >\n <div class=\"modal-dialog\" :class=\"modalDialogClasses\">\n <div v-if=\"contentShowing\" class=\"modal-content\" :class=\"props.contentClass\">\n <div\n v-if=\"!props.noHeader\"\n class=\"modal-header\"\n :class=\"headerClasses\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <component\n :is=\"props.titleTag\"\n :id=\"`${computedId}-label`\"\n class=\"modal-title\"\n :class=\"titleClasses\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </component>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_closeButton\"\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=\"_closeButton\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div\n :id=\"`${computedId}-body`\"\n class=\"modal-body\"\n :class=\"bodyClasses\"\n v-bind=\"props.bodyAttrs\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </div>\n <div v-if=\"!props.noFooter\" class=\"modal-footer\" :class=\"footerClasses\">\n <slot name=\"footer\" v-bind=\"sharedSlots\">\n <slot name=\"cancel\" v-bind=\"sharedSlots\">\n <BButton\n v-if=\"!props.okOnly\"\n ref=\"_cancelButton\"\n :disabled=\"disableCancel\"\n :size=\"props.buttonSize\"\n :variant=\"props.cancelVariant\"\n :class=\"props.cancelClass\"\n @click=\"hide('cancel')\"\n >\n {{ props.cancelTitle }}\n </BButton>\n </slot>\n <slot name=\"ok\" v-bind=\"sharedSlots\">\n <BButton\n ref=\"_okButton\"\n :disabled=\"disableOk\"\n :size=\"props.buttonSize\"\n :variant=\"props.okVariant\"\n :class=\"props.okClass\"\n @click=\"hide('ok')\"\n >\n {{ props.okTitle }}\n </BButton>\n </slot>\n </slot>\n </div>\n </div>\n </div>\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=\"showRef || (isLeaving && props.backdropFirst && !computedNoAnimation)\"\n class=\"modal-backdrop\"\n :style=\"computedZIndexBackdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n ...sharedClasses,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {onKeyStroke, unrefElement} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {\n computed,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onMounted,\n ref,\n useTemplateRef,\n watch,\n} from 'vue'\nimport type {BModalEmits, BModalProps, BModalSlots, BModalSlotsData} from '../../types'\n\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {getModalZIndex, getSafeDocument, isEmptySlot} from '../../utils/dom'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport {useModalManager} from '../../composables/useModalManager'\nimport {useShowHide} from '../../composables/useShowHide'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {getElement} from '../../utils/getElement'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BModalProps, 'modelValue'>>(), {\n focus: undefined,\n backdropFirst: false,\n body: undefined,\n bodyBgVariant: null,\n bodyAttrs: undefined,\n bodyClass: null,\n bodyScrolling: false,\n bodyTextVariant: null,\n bodyVariant: null,\n busy: false,\n buttonSize: undefined,\n cancelClass: undefined,\n cancelDisabled: false,\n cancelTitle: 'Cancel',\n cancelVariant: 'secondary',\n centered: false,\n contentClass: undefined,\n dialogClass: undefined,\n footerBgVariant: null,\n footerBorderVariant: null,\n footerClass: undefined,\n footerTextVariant: null,\n footerVariant: null,\n fullscreen: false,\n headerAttrs: undefined,\n headerBgVariant: null,\n headerBorderVariant: null,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n headerTextVariant: null,\n headerVariant: null,\n noFooter: false,\n noHeader: false,\n noHeaderClose: false,\n id: undefined,\n initialAnimation: false,\n lazy: false,\n modalClass: undefined,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noFade: false,\n noTrap: false,\n okClass: undefined,\n okDisabled: false,\n okOnly: false,\n okTitle: 'OK',\n okVariant: 'primary',\n unmountLazy: false,\n scrollable: false,\n size: undefined,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n titleClass: undefined,\n titleVisuallyHidden: false,\n titleTag: 'h5',\n show: false,\n transProps: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BModal')\nconst emit = defineEmits<BModalEmits>()\nconst slots = defineSlots<BModalSlots>()\n\nconst computedId = useId(() => props.id, 'modal')\nconst modelValue = defineModel<Exclude<BModalProps['modelValue'], undefined>>({default: false})\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst okButton = useTemplateRef<HTMLElement | null>('_okButton')\nconst cancelButton = useTemplateRef<HTMLElement | null>('_cancelButton')\nconst closeButton = useTemplateRef<HTMLElement | null>('_closeButton')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'ok') {\n return okButton\n } else if (props.focus === 'close') {\n return closeButton\n } else if (props.focus === 'cancel') {\n return cancelButton\n }\n return getElement(props.focus, element.value ?? undefined) ?? element.value\n }\n return element\n}\n\nlet activeElement: HTMLElement | null = null\nconst onAfterEnter = () => {\n const doc = getSafeDocument()\n if (props.noTrap && props.focus !== false && doc) {\n // Hypothetically this could be an issue\n activeElement = doc.activeElement as HTMLElement\n if (activeElement === element.value) {\n activeElement = null\n }\n const el = unrefElement(pickFocusItem())\n if (!el) return\n el?.focus()\n if (\n el.tagName &&\n el.tagName.toLowerCase() === 'input' &&\n typeof (el as HTMLInputElement).select === 'function'\n ) {\n ;(el as HTMLInputElement).select()\n }\n }\n}\n\nconst onAfterLeave = () => {\n if (props.noTrap && props.focus !== false && activeElement) {\n activeElement?.focus()\n activeElement = null\n }\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n backdropTransitionProps,\n isLeaving,\n isVisible,\n trapActive,\n contentShowing,\n backdropReady,\n backdropVisible,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onAfterEnter,\n onAfterLeave,\n },\n }\n)\n\nconst fallbackClassSelector = 'modal-fallback-focus'\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap,\n fallbackFocus: {\n ref: fallbackFocusElement,\n classSelector: fallbackClassSelector,\n },\n focus: () => (props.focus === false ? false : (unrefElement(pickFocusItem()) ?? undefined)),\n // () => (typeof focus === 'boolean' ? focus : (unrefElement(focus) ?? undefined)),\n})\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\nuseSafeScrollLock(showRef, () => props.bodyScrolling)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\n\nconst modalDialogClasses = computed(() => [\n props.dialogClass,\n {\n 'modal-fullscreen': props.fullscreen === true,\n [`modal-fullscreen-${props.fullscreen}-down`]: typeof props.fullscreen === 'string',\n [`modal-${props.size}`]: props.size !== undefined,\n 'modal-dialog-centered': props.centered,\n 'modal-dialog-scrollable': props.scrollable,\n },\n])\n\nconst bodyColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.bodyBgVariant,\n textVariant: props.bodyTextVariant,\n variant: props.bodyVariant,\n}))\nconst bodyClasses = computed(() => [props.bodyClass, bodyColorClasses.value])\n\nconst headerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.headerBgVariant,\n textVariant: props.headerTextVariant,\n variant: props.headerVariant,\n borderVariant: props.headerBorderVariant,\n}))\nconst headerClasses = computed(() => [props.headerClass, headerColorClasses.value])\n\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: props.headerCloseClass,\n}))\n\nconst footerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.footerBgVariant,\n textVariant: props.footerTextVariant,\n variant: props.footerVariant,\n borderVariant: props.footerBorderVariant,\n}))\nconst footerClasses = computed(() => [props.footerClass, footerColorClasses.value])\n\nconst titleClasses = computed(() => [\n props.titleClass,\n {\n ['visually-hidden']: props.titleVisuallyHidden,\n },\n])\n\nconst disableCancel = computed(() => props.cancelDisabled || props.busy)\nconst disableOk = computed(() => props.okDisabled || props.busy)\n\nconst {activePosition, activeModalCount, stackWithoutSelf} = useModalManager(\n showRef,\n modelValue.value\n)\n\nconst sharedClasses = computed(() => ({\n [`stack-position-${activePosition?.value ?? 0}`]: true,\n [`stack-inverse-position-${(activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0)}`]: true,\n}))\n\nwatch(stackWithoutSelf, (newValue, oldValue) => {\n if (newValue.length > oldValue.length && showRef.value === true && props.noStacking) hide()\n})\n\nconst defaultModalDialogZIndex = ref(getModalZIndex(element.value ?? getSafeDocument()?.body))\n\nonMounted(() => {\n watch(\n renderRef,\n (v) => {\n if (!v) return\n nextTick(() => {\n if (!element.value) return\n defaultModalDialogZIndex.value = getModalZIndex(element.value)\n })\n },\n {immediate: true}\n )\n})\n\nconst computedZIndexNumber = computed<number>(() =>\n // Make sure that newly opened modals have a higher z-index than currently active ones.\n // All active modals have a z-index of ('defaultZIndex' - 'stackSize' - 'positionInStack').\n //\n // This means inactive modals will already be higher than active ones when opened.\n\n showRef.value || isLeaving.value\n ? // Just for reference there is a single frame in which the modal is not active but still has a higher z-index than the active ones due to _when_ it calculates its position. It's a small visual effect\n defaultModalDialogZIndex.value -\n ((activeModalCount?.value ?? 0) * 2 - (activePosition?.value ?? 0) * 2)\n : defaultModalDialogZIndex.value\n)\nconst computedZIndex = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\nconst computedZIndexBackdrop = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value - 1,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\n\nconst sharedSlots = computed<BModalSlotsData>(() => ({\n id: computedId.value,\n cancel: () => {\n hide('cancel')\n },\n close: () => {\n hide('close')\n },\n hide,\n show,\n toggle,\n ok: () => {\n hide('ok')\n },\n active: showRef.value,\n visible: showRef.value,\n}))\n\ndefineExpose({\n hide,\n id: computedId,\n show,\n toggle,\n visible: showRef,\n})\n</script>\n","<template>\n <ConditionalTeleport :to=\"props.teleportTo\" :disabled=\"props.teleportDisabled\">\n <Transition\n v-if=\"renderRef || contentShowing\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)\"\n :id=\"computedId\"\n ref=\"_element\"\n class=\"modal\"\n :class=\"[\n props.modalClass,\n {\n fade: !computedNoAnimation,\n show: isVisible,\n ...sharedClasses,\n },\n ]\"\n role=\"dialog\"\n :aria-labelledby=\"!props.noHeader ? `${computedId}-label` : undefined\"\n :aria-describedby=\"`${computedId}-body`\"\n tabindex=\"-1\"\n v-bind=\"$attrs\"\n :style=\"computedZIndex\"\n style=\"display: block\"\n @mousedown.left.self=\"hide('backdrop')\"\n >\n <div class=\"modal-dialog\" :class=\"modalDialogClasses\">\n <div v-if=\"contentShowing\" class=\"modal-content\" :class=\"props.contentClass\">\n <div\n v-if=\"!props.noHeader\"\n class=\"modal-header\"\n :class=\"headerClasses\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <component\n :is=\"props.titleTag\"\n :id=\"`${computedId}-label`\"\n class=\"modal-title\"\n :class=\"titleClasses\"\n >\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </component>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_closeButton\"\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=\"_closeButton\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div\n :id=\"`${computedId}-body`\"\n class=\"modal-body\"\n :class=\"bodyClasses\"\n v-bind=\"props.bodyAttrs\"\n >\n <slot v-bind=\"sharedSlots\">\n {{ props.body }}\n </slot>\n </div>\n <div v-if=\"!props.noFooter\" class=\"modal-footer\" :class=\"footerClasses\">\n <slot name=\"footer\" v-bind=\"sharedSlots\">\n <slot name=\"cancel\" v-bind=\"sharedSlots\">\n <BButton\n v-if=\"!props.okOnly\"\n ref=\"_cancelButton\"\n :disabled=\"disableCancel\"\n :size=\"props.buttonSize\"\n :variant=\"props.cancelVariant\"\n :class=\"props.cancelClass\"\n @click=\"hide('cancel')\"\n >\n {{ props.cancelTitle }}\n </BButton>\n </slot>\n <slot name=\"ok\" v-bind=\"sharedSlots\">\n <BButton\n ref=\"_okButton\"\n :disabled=\"disableOk\"\n :size=\"props.buttonSize\"\n :variant=\"props.okVariant\"\n :class=\"props.okClass\"\n @click=\"hide('ok')\"\n >\n {{ props.okTitle }}\n </BButton>\n </slot>\n </slot>\n </div>\n </div>\n </div>\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=\"showRef || (isLeaving && props.backdropFirst && !computedNoAnimation)\"\n class=\"modal-backdrop\"\n :style=\"computedZIndexBackdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n ...sharedClasses,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {onKeyStroke, unrefElement} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {\n computed,\n type CSSProperties,\n type EmitFn,\n nextTick,\n onMounted,\n ref,\n useTemplateRef,\n watch,\n} from 'vue'\nimport type {BModalEmits, BModalProps, BModalSlots, BModalSlotsData} from '../../types'\n\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {getModalZIndex, getSafeDocument, isEmptySlot} from '../../utils/dom'\nimport {useColorVariantClasses} from '../../composables/useColorVariantClasses'\nimport {useModalManager} from '../../composables/useModalManager'\nimport {useShowHide} from '../../composables/useShowHide'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {getElement} from '../../utils/getElement'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BModalProps, 'modelValue'>>(), {\n focus: undefined,\n backdropFirst: false,\n body: undefined,\n bodyBgVariant: null,\n bodyAttrs: undefined,\n bodyClass: null,\n bodyScrolling: false,\n bodyTextVariant: null,\n bodyVariant: null,\n busy: false,\n buttonSize: undefined,\n cancelClass: undefined,\n cancelDisabled: false,\n cancelTitle: 'Cancel',\n cancelVariant: 'secondary',\n centered: false,\n contentClass: undefined,\n dialogClass: undefined,\n footerBgVariant: null,\n footerBorderVariant: null,\n footerClass: undefined,\n footerTextVariant: null,\n footerVariant: null,\n fullscreen: false,\n headerAttrs: undefined,\n headerBgVariant: null,\n headerBorderVariant: null,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n headerTextVariant: null,\n headerVariant: null,\n noFooter: false,\n noHeader: false,\n noHeaderClose: false,\n id: undefined,\n initialAnimation: false,\n lazy: false,\n modalClass: undefined,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noFade: false,\n noTrap: false,\n okClass: undefined,\n okDisabled: false,\n okOnly: false,\n okTitle: 'OK',\n okVariant: 'primary',\n unmountLazy: false,\n scrollable: false,\n size: undefined,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n titleClass: undefined,\n titleVisuallyHidden: false,\n titleTag: 'h5',\n show: false,\n transProps: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BModal')\nconst emit = defineEmits<BModalEmits>()\nconst slots = defineSlots<BModalSlots>()\n\nconst computedId = useId(() => props.id, 'modal')\nconst modelValue = defineModel<Exclude<BModalProps['modelValue'], undefined>>({default: false})\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst okButton = useTemplateRef<HTMLElement | null>('_okButton')\nconst cancelButton = useTemplateRef<HTMLElement | null>('_cancelButton')\nconst closeButton = useTemplateRef<HTMLElement | null>('_closeButton')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'ok') {\n return okButton\n } else if (props.focus === 'close') {\n return closeButton\n } else if (props.focus === 'cancel') {\n return cancelButton\n }\n return getElement(props.focus, element.value ?? undefined) ?? element.value\n }\n return element\n}\n\nlet activeElement: HTMLElement | null = null\nconst onAfterEnter = () => {\n const doc = getSafeDocument()\n if (props.noTrap && props.focus !== false && doc) {\n // Hypothetically this could be an issue\n activeElement = doc.activeElement as HTMLElement\n if (activeElement === element.value) {\n activeElement = null\n }\n const el = unrefElement(pickFocusItem())\n if (!el) return\n el?.focus()\n if (\n el.tagName &&\n el.tagName.toLowerCase() === 'input' &&\n typeof (el as HTMLInputElement).select === 'function'\n ) {\n ;(el as HTMLInputElement).select()\n }\n }\n}\n\nconst onAfterLeave = () => {\n if (props.noTrap && props.focus !== false && activeElement) {\n activeElement?.focus()\n activeElement = null\n }\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n transitionProps,\n backdropTransitionProps,\n isLeaving,\n isVisible,\n trapActive,\n contentShowing,\n backdropReady,\n backdropVisible,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n // addShowClass: false,\n transitionProps: {\n onAfterEnter,\n onAfterLeave,\n },\n }\n)\n\nconst fallbackClassSelector = 'modal-fallback-focus'\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap,\n fallbackFocus: {\n ref: fallbackFocusElement,\n classSelector: fallbackClassSelector,\n },\n focus: () => (props.focus === false ? false : (unrefElement(pickFocusItem()) ?? undefined)),\n // () => (typeof focus === 'boolean' ? focus : (unrefElement(focus) ?? undefined)),\n})\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\nuseSafeScrollLock(showRef, () => props.bodyScrolling)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\n\nconst modalDialogClasses = computed(() => [\n props.dialogClass,\n {\n 'modal-fullscreen': props.fullscreen === true,\n [`modal-fullscreen-${props.fullscreen}-down`]: typeof props.fullscreen === 'string',\n [`modal-${props.size}`]: props.size !== undefined,\n 'modal-dialog-centered': props.centered,\n 'modal-dialog-scrollable': props.scrollable,\n },\n])\n\nconst bodyColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.bodyBgVariant,\n textVariant: props.bodyTextVariant,\n variant: props.bodyVariant,\n}))\nconst bodyClasses = computed(() => [props.bodyClass, bodyColorClasses.value])\n\nconst headerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.headerBgVariant,\n textVariant: props.headerTextVariant,\n variant: props.headerVariant,\n borderVariant: props.headerBorderVariant,\n}))\nconst headerClasses = computed(() => [props.headerClass, headerColorClasses.value])\n\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: props.headerCloseClass,\n}))\n\nconst footerColorClasses = useColorVariantClasses(() => ({\n bgVariant: props.footerBgVariant,\n textVariant: props.footerTextVariant,\n variant: props.footerVariant,\n borderVariant: props.footerBorderVariant,\n}))\nconst footerClasses = computed(() => [props.footerClass, footerColorClasses.value])\n\nconst titleClasses = computed(() => [\n props.titleClass,\n {\n ['visually-hidden']: props.titleVisuallyHidden,\n },\n])\n\nconst disableCancel = computed(() => props.cancelDisabled || props.busy)\nconst disableOk = computed(() => props.okDisabled || props.busy)\n\nconst {activePosition, activeModalCount, stackWithoutSelf} = useModalManager(\n showRef,\n modelValue.value\n)\n\nconst sharedClasses = computed(() => ({\n [`stack-position-${activePosition?.value ?? 0}`]: true,\n [`stack-inverse-position-${(activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0)}`]: true,\n}))\n\nwatch(stackWithoutSelf, (newValue, oldValue) => {\n if (newValue.length > oldValue.length && showRef.value === true && props.noStacking) hide()\n})\n\nconst defaultModalDialogZIndex = ref(getModalZIndex(element.value ?? getSafeDocument()?.body))\n\nonMounted(() => {\n watch(\n renderRef,\n (v) => {\n if (!v) return\n nextTick(() => {\n if (!element.value) return\n defaultModalDialogZIndex.value = getModalZIndex(element.value)\n })\n },\n {immediate: true}\n )\n})\n\nconst computedZIndexNumber = computed<number>(() =>\n // Make sure that newly opened modals have a higher z-index than currently active ones.\n // All active modals have a z-index of ('defaultZIndex' - 'stackSize' - 'positionInStack').\n //\n // This means inactive modals will already be higher than active ones when opened.\n\n showRef.value || isLeaving.value\n ? // Just for reference there is a single frame in which the modal is not active but still has a higher z-index than the active ones due to _when_ it calculates its position. It's a small visual effect\n defaultModalDialogZIndex.value -\n ((activeModalCount?.value ?? 0) * 2 - (activePosition?.value ?? 0) * 2)\n : defaultModalDialogZIndex.value\n)\nconst computedZIndex = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\nconst computedZIndexBackdrop = computed<CSSProperties>(() => ({\n 'z-index': computedZIndexNumber.value - 1,\n '--b-position': activePosition?.value ?? 0,\n '--b-inverse-position': (activeModalCount?.value ?? 1) - 1 - (activePosition?.value ?? 0),\n '--b-count': activeModalCount?.value ?? 0,\n}))\n\nconst sharedSlots = computed<BModalSlotsData>(() => ({\n id: computedId.value,\n cancel: () => {\n hide('cancel')\n },\n close: () => {\n hide('close')\n },\n hide,\n show,\n toggle,\n ok: () => {\n hide('ok')\n },\n active: showRef.value,\n visible: showRef.value,\n}))\n\ndefineExpose({\n hide,\n id: computedId,\n show,\n toggle,\n visible: showRef,\n})\n</script>\n"],"mappings":";;;;;;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AAA,CAAA,CAAA,OAAA,MAAA,OAAA,MAAa,MAAA,aAAA,KAAiB,MAAA,KAAA,CAAK,CAAC,iBAAa,CAAM,MAAA,KAAA,CAAK,CAAC,cAAa,CAAA,CAAA,CAAA,CAAA;;IA6GzE,GAAA,IAAA,CAAA,QAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,CAAA,MAAA,KAAA,CAAK,CAAC,aAAnB,WAcO,KAAA,QAAA,YAAA,eAAA,mBAdgD,YAAA,KAAW,CAAA,SAc3D,CAba,MAAA,iBAAA,KAAlB,UAAA,GAAA,YAYa,YAAA,eAAA,WAAA,EAAA,KAAA,EAAA,GAZgC,MAAA,uBAAA,CAAuB,CAAA,GAAA;KAClE,SAAA,cAUE,CAVF,eAAA,mBAUE,OAAA;MARA,OAAK,eAAA,CAAC,kBAAgB;OAEO,MAAA,CAAA,MAAA,mBAAA;OAAuC,MAAA,MAAA,eAAA,KAAmB,MAAA,mBAAA;OAAoC,GAAA,cAAA;;MAD1H,OAAK,eAAE,uBAAA,KAAsB;MAM7B,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,IAAA,CAAI,CAAA,UAAA;KARJ,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA,OAAA,MAAA,OAAA,KAAY,MAAA,SAAA,KAAa,MAAA,KAAA,CAAK,CAAC,iBAAa,CAAK,MAAA,mBAAA,CAAmB,CAAA,CAAA,CAAA,CAAA"}
@@ -2,7 +2,7 @@ import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
2
2
  import { a as pick } from "./object-C7YmCGEm.js";
3
3
  import { t as BLink_default } from "./BLink-mdwZsC7b.js";
4
4
  import { t as useAlignment } from "./useAlignment-DaP-psIh.js";
5
- import { t as BDropdown_default } from "./BDropdown-CnxUzs42.js";
5
+ import { t as BDropdown_default } from "./BDropdown-D4gLdtmX.js";
6
6
  import { t as BForm_default } from "./BForm-BOoX6AAr.js";
7
7
  import { computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useModel, useTemplateRef, withCtx, withModifiers } from "vue";
8
8
  //#endregion
@@ -420,4 +420,4 @@ var BNavText_default = /* @__PURE__ */ defineComponent({
420
420
  //#endregion
421
421
  export { BNav_default as a, BNavForm_default as i, BNavItemDropdown_default as n, BNavItem_default as r, BNavText_default as t };
422
422
 
423
- //# sourceMappingURL=BNav-CjXS9tQ5.js.map
423
+ //# sourceMappingURL=BNav-B2PlMEMD.js.map