bootstrap-vue-next 1.2.2 → 1.2.4

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 (73) hide show
  1. package/dist/{BAccordion-FuQ6sMFy.js → BAccordion-ByAMZCS9.js} +2 -2
  2. package/dist/{BAccordion-FuQ6sMFy.js.map → BAccordion-ByAMZCS9.js.map} +1 -1
  3. package/dist/{BAlert-C9Mi4RDx.js → BAlert-DdfFcjWF.js} +2 -2
  4. package/dist/{BAlert-C9Mi4RDx.js.map → BAlert-DdfFcjWF.js.map} +1 -1
  5. package/dist/{BApp-Bg5xEz8H.js → BApp-DZ9AITOm.js} +22 -3
  6. package/dist/BApp-DZ9AITOm.js.map +1 -0
  7. package/dist/{BCarousel-DQgfW4DN.js → BCarousel-qHGRSVFe.js} +2 -2
  8. package/dist/{BCarousel-DQgfW4DN.js.map → BCarousel-qHGRSVFe.js.map} +1 -1
  9. package/dist/{BCollapse-B9fnWSzA.js → BCollapse-DtuJwN7B.js} +2 -2
  10. package/dist/{BCollapse-B9fnWSzA.js.map → BCollapse-DtuJwN7B.js.map} +1 -1
  11. package/dist/{BDropdown-CnxUzs42.js → BDropdown-BY-E0SHv.js} +3 -3
  12. package/dist/{BDropdown-CnxUzs42.js.map → BDropdown-BY-E0SHv.js.map} +1 -1
  13. package/dist/{BModal-NPsCBNo7.js → BModal-DtQlIFNn.js} +2 -2
  14. package/dist/{BModal-NPsCBNo7.js.map → BModal-DtQlIFNn.js.map} +1 -1
  15. package/dist/{BNav-CjXS9tQ5.js → BNav-BMWNXoNo.js} +2 -2
  16. package/dist/{BNav-CjXS9tQ5.js.map → BNav-BMWNXoNo.js.map} +1 -1
  17. package/dist/{BOffcanvas-BndaBJoP.js → BOffcanvas-BtvIDgH7.js} +2 -2
  18. package/dist/{BOffcanvas-BndaBJoP.js.map → BOffcanvas-BtvIDgH7.js.map} +1 -1
  19. package/dist/{BPagination-D_Hfk6OF.js → BPagination-C85wHRgS.js} +2 -2
  20. package/dist/{BPagination-D_Hfk6OF.js.map → BPagination-C85wHRgS.js.map} +1 -1
  21. package/dist/{BTabs-BKmkVWrZ.js → BTabs-Cfe8HOGE.js} +2 -2
  22. package/dist/{BTabs-BKmkVWrZ.js.map → BTabs-Cfe8HOGE.js.map} +1 -1
  23. package/dist/{BToast-Di9HwBOV.js → BToast-Cm7TZlZq.js} +2 -2
  24. package/dist/{BToast-Di9HwBOV.js.map → BToast-Cm7TZlZq.js.map} +1 -1
  25. package/dist/{BTooltip-BxaUtV4m.js → BTooltip-CAgQ77tS.js} +5 -11
  26. package/dist/BTooltip-CAgQ77tS.js.map +1 -0
  27. package/dist/bootstrap-vue-next.mjs +16 -16
  28. package/dist/{classes-BEWWGbj5.js → classes-DCjKFM2E.js} +12 -2
  29. package/dist/classes-DCjKFM2E.js.map +1 -0
  30. package/dist/components/BTooltip/BTooltip.vue.d.mts +3 -3
  31. package/dist/components/BTooltip/BTooltip.vue.d.ts +3 -3
  32. package/dist/composables/usePopover/index.d.mts +9 -9
  33. package/dist/composables/usePopover/index.d.ts +9 -9
  34. package/dist/{floatingUi-BlKoACvc.js → floatingUi-CSJCHfOw.js} +2 -2
  35. package/dist/{floatingUi-BlKoACvc.js.map → floatingUi-CSJCHfOw.js.map} +1 -1
  36. package/dist/src/components/BAccordion/index.mjs +1 -1
  37. package/dist/src/components/BAlert/index.mjs +1 -1
  38. package/dist/src/components/BApp/index.mjs +1 -1
  39. package/dist/src/components/BCarousel/index.mjs +1 -1
  40. package/dist/src/components/BCollapse/index.mjs +1 -1
  41. package/dist/src/components/BDropdown/index.mjs +1 -1
  42. package/dist/src/components/BModal/index.mjs +1 -1
  43. package/dist/src/components/BNav/index.mjs +1 -1
  44. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  45. package/dist/src/components/BPagination/index.mjs +1 -1
  46. package/dist/src/components/BPopover/index.mjs +1 -1
  47. package/dist/src/components/BTabs/index.mjs +1 -1
  48. package/dist/src/components/BToast/index.mjs +1 -1
  49. package/dist/src/components/BTooltip/index.mjs +1 -1
  50. package/dist/src/components/index.mjs +14 -14
  51. package/dist/src/composables/orchestratorShared/index.mjs +169 -23
  52. package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
  53. package/dist/src/composables/useModal/index.mjs +1 -1
  54. package/dist/src/composables/usePopover/index.mjs +2 -2
  55. package/dist/src/composables/useToast/index.mjs +1 -1
  56. package/dist/src/directives/BPopover/index.mjs +2 -2
  57. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  58. package/dist/src/directives/BToggle/index.mjs +1 -1
  59. package/dist/src/directives/BTooltip/index.mjs +2 -2
  60. package/dist/src/utils/index.mjs +1 -1
  61. package/dist/types/ComponentOrchestratorTypes.d.mts +8 -1
  62. package/dist/types/ComponentOrchestratorTypes.d.ts +8 -1
  63. package/dist/{useShowHide-C95Y9EKL.js → useShowHide-Dpld86ys.js} +124 -54
  64. package/dist/useShowHide-Dpld86ys.js.map +1 -0
  65. package/dist/utils/classes.d.mts +10 -0
  66. package/dist/utils/classes.d.ts +10 -0
  67. package/dist/{utils-nRGGHA_i.js → utils-DYdkCKBf.js} +2 -2
  68. package/dist/{utils-nRGGHA_i.js.map → utils-DYdkCKBf.js.map} +1 -1
  69. package/package.json +1 -1
  70. package/dist/BApp-Bg5xEz8H.js.map +0 -1
  71. package/dist/BTooltip-BxaUtV4m.js.map +0 -1
  72. package/dist/classes-BEWWGbj5.js.map +0 -1
  73. package/dist/useShowHide-C95Y9EKL.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BCarousel-DQgfW4DN.js","names":[],"sources":["../src/utils/getSlotElements.ts","../src/components/BCarousel/BCarousel.vue","../src/components/BCarousel/BCarousel.vue","../src/components/BCarousel/BCarouselSlide.vue","../src/components/BCarousel/BCarouselSlide.vue"],"sourcesContent":["import type {Slot, VNode} from 'vue'\n\nexport const getSlotElements = (slot: Slot | undefined, filterBy: string): VNode[] =>\n (slot?.() ?? [])\n .reduce((arr: VNode[], slot: VNode) => {\n if (typeof slot.type === 'symbol') {\n arr = arr.concat(slot.children as unknown as VNode)\n } else {\n arr.push(slot)\n }\n return arr\n }, [])\n .filter((child) => (child.type as {__name: string} | undefined)?.__name === filterBy)\n","<template>\n <div\n :id=\"computedId\"\n ref=\"_element\"\n class=\"carousel slide pointer-event\"\n :class=\"computedClasses\"\n >\n <div\n v-if=\"props.indicators\"\n class=\"carousel-indicators\"\n :aria-label=\"props.labelIndicators\"\n :aria-owns=\"buttonOwnership\"\n >\n <!-- :data-bs-target=\"`#${computedId}`\" is required since the classes target elems with that attr -->\n <button\n v-for=\"(_, i) in slides.length\"\n :key=\"i\"\n type=\"button\"\n data-bs-target=\"\"\n :class=\"i === modelValue ? 'active' : ''\"\n :aria-current=\"i === modelValue ? true : undefined\"\n :aria-label=\"`${props.indicatorsButtonLabel} ${i}`\"\n :aria-controls=\"buttonOwnership\"\n :aria-describedby=\"slideValues?.[i]?._id\"\n @click=\"slideTo(i)\"\n />\n </div>\n\n <div ref=\"_relatedTarget\" class=\"carousel-inner\">\n <TransitionGroup v-bind=\"transitionGroupProps\">\n <component\n :is=\"slide\"\n v-for=\"(slide, i) in slides\"\n v-show=\"i === modelValue\"\n :key=\"i\"\n ref=\"_slideValues\"\n :class=\"{active: i === modelValue && isTransitioning === false}\"\n :style=\"props.noAnimation && {transition: 'none'}\"\n />\n </TransitionGroup>\n </div>\n\n <template v-if=\"props.controls\">\n <button class=\"carousel-control-prev\" type=\"button\" @click=\"onClickPrev\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsPrevText }}</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" @click=\"onClickNext\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsNextText }}</span>\n </button>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvCarouselEvent} from '../../utils'\nimport {computed, onMounted, provide, ref, toRef, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {onKeyStroke, useElementHover, useIntervalFn, useSwipe, useToNumber} from '@vueuse/core'\nimport type BCarouselSlide from './BCarouselSlide.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {Numberish} from '../../types/CommonTypes'\nimport {getSlotElements} from '../../utils/getSlotElements'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport type {BCarouselEmits, BCarouselProps, BCarouselSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BCarouselProps, 'modelValue'>>(), {\n background: undefined,\n controls: false,\n controlsNextText: 'Next',\n controlsPrevText: 'Previous',\n fade: false,\n id: undefined,\n imgHeight: undefined,\n imgWidth: undefined,\n indicators: false,\n indicatorsButtonLabel: 'Slide',\n interval: 5000,\n labelIndicators: 'Select a slide to display',\n keyboard: true,\n noAnimation: false,\n noHoverPause: false,\n noTouch: false,\n noWrap: false,\n ride: false,\n rideReverse: false,\n touchThreshold: 50,\n})\nconst props = useDefaults(_props, 'BCarousel')\nconst emit = defineEmits<BCarouselEmits>()\nconst slots = defineSlots<BCarouselSlots>()\n\nconst computedId = useId(() => props.id, 'carousel')\nconst buttonOwnership = useId(undefined, 'carousel-button-ownership')\n\nconst modelValue = defineModel<Exclude<BCarouselProps['modelValue'], undefined>>({default: 0})\n\nconst slideValues = useTemplateRef<InstanceType<typeof BCarouselSlide>[]>('_slideValues')\n\nconst touchThresholdNumber = useToNumber(() => props.touchThreshold)\nconst slideInterval = ref<Numberish | null>(null)\nonMounted(() => {\n slideInterval.value =\n slideValues.value?.find((slid) => slid.$el.style.display !== 'none')?._interval ?? null\n})\nconst intervalNumber = useToNumber(() => slideInterval.value ?? props.interval)\n\nconst isTransitioning = ref(false)\nconst rideStarted = ref(false)\nconst direction = ref<'start' | 'end'>('start')\nconst relatedTarget = useTemplateRef('_relatedTarget')\nconst element = useTemplateRef('_element')\n\nlet previousModelValue = modelValue.value\nlet isInternalChange = false\n\nconst isHovering = useElementHover(element)\n\nconst {pause, resume} = useIntervalFn(\n () => {\n if (props.rideReverse) {\n prev()\n return\n }\n next()\n },\n intervalNumber,\n {immediate: props.ride === 'carousel'}\n)\n\nconst isRiding = computed(\n () => (props.ride === true && rideStarted.value === true) || props.ride === 'carousel'\n)\nconst slides = computed(() => getSlotElements(slots.default, 'BCarouselSlide'))\nconst computedClasses = computed(() => ({'carousel-fade': props.fade}))\n\nconst buildBvCarouselEvent = (event: 'slid' | 'slide') =>\n new BvCarouselEvent(event, {\n componentId: computedId.value,\n cancelable: false,\n target: element.value,\n direction: direction.value === 'start' ? 'right' : 'left',\n from: previousModelValue,\n to: modelValue.value,\n relatedTarget: relatedTarget.value?.children[modelValue.value] ?? null,\n })\n\nwatch(modelValue, (newValue, oldValue) => {\n if (!isInternalChange) {\n // External v-model change: determine direction from the new/old values\n const lastIndex = slides.value.length - 1\n const wrappedForward = oldValue === lastIndex && newValue === 0\n const wrappedBackward = oldValue === 0 && newValue === lastIndex\n if (wrappedForward) {\n direction.value = 'start'\n } else if (wrappedBackward) {\n direction.value = 'end'\n } else {\n direction.value = newValue > oldValue ? 'start' : 'end'\n }\n }\n isInternalChange = false\n // If one ever thinks to change the transitions dependence on modelValue and thinks it is appropriate to remove this isTransitioning line, be careful\n // This directly effects how transitions are applied. The watch is for if you have an external change to modelValue, and doesn't directly call slideTo\n isTransitioning.value = true\n})\nconst slideTo = (value: number): void => {\n if (isTransitioning.value === true) return\n\n if (props.ride === true) {\n rideStarted.value = true\n }\n if (isRiding.value === true) {\n resume()\n }\n let nextValue = value\n if (nextValue >= slides.value.length) {\n if (props.noWrap) return\n nextValue = 0\n }\n if (nextValue < 0) {\n if (props.noWrap) return\n nextValue = slides.value.length - 1\n }\n if (nextValue === modelValue.value) return\n // Set direction based on the original requested value (before wrapping) so that\n // next() always animates forward and prev() always animates backward, regardless\n // of how many slides there are. This fixes the 2-slide case where wrap-detection\n // heuristics in the watcher would otherwise produce the wrong direction.\n // Note: `value` is the raw index passed by the caller (e.g. modelValue+1 for next()),\n // while `nextValue` is the resolved/wrapped index that becomes the new modelValue.\n direction.value = value > modelValue.value ? 'start' : 'end'\n // Mark as internal so the modelValue watcher skips its direction heuristics.\n // A race condition here is not possible because the isTransitioning guard above\n // ensures slideTo cannot be called again until the current transition completes.\n isInternalChange = true\n isTransitioning.value = true\n previousModelValue = modelValue.value\n modelValue.value = nextValue\n}\n\nconst prev = (): void => {\n slideTo(modelValue.value - 1)\n}\nconst next = (): void => {\n slideTo(modelValue.value + 1)\n}\n\nconst {lengthX} = useSwipe(element, {\n passive: true,\n onSwipeStart() {\n if (props.noTouch) return\n pause()\n },\n onSwipeEnd() {\n if (props.noTouch) return\n const resumeRiding = () => {\n if (isRiding.value === false) return\n resume()\n }\n if (lengthX.value >= touchThresholdNumber.value) {\n next()\n resumeRiding()\n return\n }\n if (lengthX.value <= -touchThresholdNumber.value) {\n prev()\n resumeRiding()\n }\n },\n})\n\nconst onClickPrev = (event: MouseEvent) => {\n emit('prev-click', event)\n if (event.defaultPrevented) return\n prev()\n}\nconst onClickNext = (event: MouseEvent) => {\n emit('next-click', event)\n if (event.defaultPrevented) return\n next()\n}\n\nconst onMouseEnter = () => {\n if (props.noHoverPause) return\n pause()\n}\nconst onMouseLeave = () => {\n if (!isRiding.value) return\n resume()\n}\nwatch(isHovering, (newValue) => {\n if (newValue) {\n onMouseEnter()\n return\n }\n onMouseLeave()\n})\nonKeyStroke(\n ['ArrowLeft', 'ArrowRight'],\n (event) => {\n if (!props.keyboard) return\n if (event.key === 'ArrowLeft') {\n prev()\n } else {\n next()\n }\n },\n {target: element, passive: true}\n)\n\nwatch(\n () => props.ride,\n () => {\n rideStarted.value = false\n }\n)\n\nconst enterDirectionClass = computed(\n () => `carousel-item-${direction.value === 'start' ? 'next' : 'prev'}`\n)\nconst orderDirectionClass = computed(() => `carousel-item-${direction.value}`)\nconst transitionGroupProps = computed(() => ({\n enterFromClass: `carousel-item ${enterDirectionClass.value}`,\n enterActiveClass: `carousel-item ${enterDirectionClass.value}`,\n enterToClass: `carousel-item ${enterDirectionClass.value} ${orderDirectionClass.value}`,\n leaveFromClass: 'carousel-item active',\n leaveActiveClass: 'carousel-item active',\n leaveToClass: `carousel-item active ${orderDirectionClass.value}`,\n onBeforeLeave: () => {\n emit('slide', buildBvCarouselEvent('slide'))\n },\n onAfterLeave: () => {\n emit('slid', buildBvCarouselEvent('slid'))\n isTransitioning.value = false\n },\n // carousel-item class is removed from the slide during the transition,\n // as is included within enter classes.\n // The first slide recovers carousel-item class,\n onAfterEnter: (el: Readonly<Element>) => {\n if (modelValue.value !== 0) {\n el.classList.add('carousel-item')\n }\n },\n onEnter: (el: Readonly<Element>) => {\n slideInterval.value = slideValues.value?.find((slid) => slid.$el === el)?._interval ?? null\n },\n}))\n\ndefineExpose({\n resume,\n pause,\n next,\n prev,\n slideTo,\n})\n\nprovide(carouselInjectionKey, {\n background: toRef(() => props.background),\n width: toRef(() => props.imgWidth),\n height: toRef(() => props.imgHeight),\n})\n</script>\n","<template>\n <div\n :id=\"computedId\"\n ref=\"_element\"\n class=\"carousel slide pointer-event\"\n :class=\"computedClasses\"\n >\n <div\n v-if=\"props.indicators\"\n class=\"carousel-indicators\"\n :aria-label=\"props.labelIndicators\"\n :aria-owns=\"buttonOwnership\"\n >\n <!-- :data-bs-target=\"`#${computedId}`\" is required since the classes target elems with that attr -->\n <button\n v-for=\"(_, i) in slides.length\"\n :key=\"i\"\n type=\"button\"\n data-bs-target=\"\"\n :class=\"i === modelValue ? 'active' : ''\"\n :aria-current=\"i === modelValue ? true : undefined\"\n :aria-label=\"`${props.indicatorsButtonLabel} ${i}`\"\n :aria-controls=\"buttonOwnership\"\n :aria-describedby=\"slideValues?.[i]?._id\"\n @click=\"slideTo(i)\"\n />\n </div>\n\n <div ref=\"_relatedTarget\" class=\"carousel-inner\">\n <TransitionGroup v-bind=\"transitionGroupProps\">\n <component\n :is=\"slide\"\n v-for=\"(slide, i) in slides\"\n v-show=\"i === modelValue\"\n :key=\"i\"\n ref=\"_slideValues\"\n :class=\"{active: i === modelValue && isTransitioning === false}\"\n :style=\"props.noAnimation && {transition: 'none'}\"\n />\n </TransitionGroup>\n </div>\n\n <template v-if=\"props.controls\">\n <button class=\"carousel-control-prev\" type=\"button\" @click=\"onClickPrev\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsPrevText }}</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" @click=\"onClickNext\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsNextText }}</span>\n </button>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvCarouselEvent} from '../../utils'\nimport {computed, onMounted, provide, ref, toRef, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {onKeyStroke, useElementHover, useIntervalFn, useSwipe, useToNumber} from '@vueuse/core'\nimport type BCarouselSlide from './BCarouselSlide.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {Numberish} from '../../types/CommonTypes'\nimport {getSlotElements} from '../../utils/getSlotElements'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport type {BCarouselEmits, BCarouselProps, BCarouselSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BCarouselProps, 'modelValue'>>(), {\n background: undefined,\n controls: false,\n controlsNextText: 'Next',\n controlsPrevText: 'Previous',\n fade: false,\n id: undefined,\n imgHeight: undefined,\n imgWidth: undefined,\n indicators: false,\n indicatorsButtonLabel: 'Slide',\n interval: 5000,\n labelIndicators: 'Select a slide to display',\n keyboard: true,\n noAnimation: false,\n noHoverPause: false,\n noTouch: false,\n noWrap: false,\n ride: false,\n rideReverse: false,\n touchThreshold: 50,\n})\nconst props = useDefaults(_props, 'BCarousel')\nconst emit = defineEmits<BCarouselEmits>()\nconst slots = defineSlots<BCarouselSlots>()\n\nconst computedId = useId(() => props.id, 'carousel')\nconst buttonOwnership = useId(undefined, 'carousel-button-ownership')\n\nconst modelValue = defineModel<Exclude<BCarouselProps['modelValue'], undefined>>({default: 0})\n\nconst slideValues = useTemplateRef<InstanceType<typeof BCarouselSlide>[]>('_slideValues')\n\nconst touchThresholdNumber = useToNumber(() => props.touchThreshold)\nconst slideInterval = ref<Numberish | null>(null)\nonMounted(() => {\n slideInterval.value =\n slideValues.value?.find((slid) => slid.$el.style.display !== 'none')?._interval ?? null\n})\nconst intervalNumber = useToNumber(() => slideInterval.value ?? props.interval)\n\nconst isTransitioning = ref(false)\nconst rideStarted = ref(false)\nconst direction = ref<'start' | 'end'>('start')\nconst relatedTarget = useTemplateRef('_relatedTarget')\nconst element = useTemplateRef('_element')\n\nlet previousModelValue = modelValue.value\nlet isInternalChange = false\n\nconst isHovering = useElementHover(element)\n\nconst {pause, resume} = useIntervalFn(\n () => {\n if (props.rideReverse) {\n prev()\n return\n }\n next()\n },\n intervalNumber,\n {immediate: props.ride === 'carousel'}\n)\n\nconst isRiding = computed(\n () => (props.ride === true && rideStarted.value === true) || props.ride === 'carousel'\n)\nconst slides = computed(() => getSlotElements(slots.default, 'BCarouselSlide'))\nconst computedClasses = computed(() => ({'carousel-fade': props.fade}))\n\nconst buildBvCarouselEvent = (event: 'slid' | 'slide') =>\n new BvCarouselEvent(event, {\n componentId: computedId.value,\n cancelable: false,\n target: element.value,\n direction: direction.value === 'start' ? 'right' : 'left',\n from: previousModelValue,\n to: modelValue.value,\n relatedTarget: relatedTarget.value?.children[modelValue.value] ?? null,\n })\n\nwatch(modelValue, (newValue, oldValue) => {\n if (!isInternalChange) {\n // External v-model change: determine direction from the new/old values\n const lastIndex = slides.value.length - 1\n const wrappedForward = oldValue === lastIndex && newValue === 0\n const wrappedBackward = oldValue === 0 && newValue === lastIndex\n if (wrappedForward) {\n direction.value = 'start'\n } else if (wrappedBackward) {\n direction.value = 'end'\n } else {\n direction.value = newValue > oldValue ? 'start' : 'end'\n }\n }\n isInternalChange = false\n // If one ever thinks to change the transitions dependence on modelValue and thinks it is appropriate to remove this isTransitioning line, be careful\n // This directly effects how transitions are applied. The watch is for if you have an external change to modelValue, and doesn't directly call slideTo\n isTransitioning.value = true\n})\nconst slideTo = (value: number): void => {\n if (isTransitioning.value === true) return\n\n if (props.ride === true) {\n rideStarted.value = true\n }\n if (isRiding.value === true) {\n resume()\n }\n let nextValue = value\n if (nextValue >= slides.value.length) {\n if (props.noWrap) return\n nextValue = 0\n }\n if (nextValue < 0) {\n if (props.noWrap) return\n nextValue = slides.value.length - 1\n }\n if (nextValue === modelValue.value) return\n // Set direction based on the original requested value (before wrapping) so that\n // next() always animates forward and prev() always animates backward, regardless\n // of how many slides there are. This fixes the 2-slide case where wrap-detection\n // heuristics in the watcher would otherwise produce the wrong direction.\n // Note: `value` is the raw index passed by the caller (e.g. modelValue+1 for next()),\n // while `nextValue` is the resolved/wrapped index that becomes the new modelValue.\n direction.value = value > modelValue.value ? 'start' : 'end'\n // Mark as internal so the modelValue watcher skips its direction heuristics.\n // A race condition here is not possible because the isTransitioning guard above\n // ensures slideTo cannot be called again until the current transition completes.\n isInternalChange = true\n isTransitioning.value = true\n previousModelValue = modelValue.value\n modelValue.value = nextValue\n}\n\nconst prev = (): void => {\n slideTo(modelValue.value - 1)\n}\nconst next = (): void => {\n slideTo(modelValue.value + 1)\n}\n\nconst {lengthX} = useSwipe(element, {\n passive: true,\n onSwipeStart() {\n if (props.noTouch) return\n pause()\n },\n onSwipeEnd() {\n if (props.noTouch) return\n const resumeRiding = () => {\n if (isRiding.value === false) return\n resume()\n }\n if (lengthX.value >= touchThresholdNumber.value) {\n next()\n resumeRiding()\n return\n }\n if (lengthX.value <= -touchThresholdNumber.value) {\n prev()\n resumeRiding()\n }\n },\n})\n\nconst onClickPrev = (event: MouseEvent) => {\n emit('prev-click', event)\n if (event.defaultPrevented) return\n prev()\n}\nconst onClickNext = (event: MouseEvent) => {\n emit('next-click', event)\n if (event.defaultPrevented) return\n next()\n}\n\nconst onMouseEnter = () => {\n if (props.noHoverPause) return\n pause()\n}\nconst onMouseLeave = () => {\n if (!isRiding.value) return\n resume()\n}\nwatch(isHovering, (newValue) => {\n if (newValue) {\n onMouseEnter()\n return\n }\n onMouseLeave()\n})\nonKeyStroke(\n ['ArrowLeft', 'ArrowRight'],\n (event) => {\n if (!props.keyboard) return\n if (event.key === 'ArrowLeft') {\n prev()\n } else {\n next()\n }\n },\n {target: element, passive: true}\n)\n\nwatch(\n () => props.ride,\n () => {\n rideStarted.value = false\n }\n)\n\nconst enterDirectionClass = computed(\n () => `carousel-item-${direction.value === 'start' ? 'next' : 'prev'}`\n)\nconst orderDirectionClass = computed(() => `carousel-item-${direction.value}`)\nconst transitionGroupProps = computed(() => ({\n enterFromClass: `carousel-item ${enterDirectionClass.value}`,\n enterActiveClass: `carousel-item ${enterDirectionClass.value}`,\n enterToClass: `carousel-item ${enterDirectionClass.value} ${orderDirectionClass.value}`,\n leaveFromClass: 'carousel-item active',\n leaveActiveClass: 'carousel-item active',\n leaveToClass: `carousel-item active ${orderDirectionClass.value}`,\n onBeforeLeave: () => {\n emit('slide', buildBvCarouselEvent('slide'))\n },\n onAfterLeave: () => {\n emit('slid', buildBvCarouselEvent('slid'))\n isTransitioning.value = false\n },\n // carousel-item class is removed from the slide during the transition,\n // as is included within enter classes.\n // The first slide recovers carousel-item class,\n onAfterEnter: (el: Readonly<Element>) => {\n if (modelValue.value !== 0) {\n el.classList.add('carousel-item')\n }\n },\n onEnter: (el: Readonly<Element>) => {\n slideInterval.value = slideValues.value?.find((slid) => slid.$el === el)?._interval ?? null\n },\n}))\n\ndefineExpose({\n resume,\n pause,\n next,\n prev,\n slideTo,\n})\n\nprovide(carouselInjectionKey, {\n background: toRef(() => props.background),\n width: toRef(() => props.imgWidth),\n height: toRef(() => props.imgHeight),\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"carousel-item\" :style=\"computedStyle\">\n <slot name=\"img\">\n <BImg\n class=\"d-block w-100\"\n :alt=\"props.imgAlt\"\n :srcset=\"props.imgSrcset\"\n :src=\"props.imgSrc\"\n :width=\"props.imgWidth || parentData?.width.value\"\n :height=\"props.imgHeight || parentData?.height.value\"\n :blank=\"props.imgBlank\"\n :blank-color=\"props.imgBlankColor\"\n />\n </slot>\n <component\n :is=\"props.contentTag\"\n v-if=\"hasContent\"\n class=\"carousel-caption\"\n :class=\"computedContentClasses\"\n >\n <component :is=\"props.captionTag\" v-if=\"hasCaption\">\n <slot name=\"caption\">\n <span>{{ props.caption }}</span>\n </slot>\n </component>\n <component :is=\"props.textTag\" v-if=\"hasText\">\n <slot name=\"text\">\n <span>{{ props.text }}</span>\n </slot>\n </component>\n <slot />\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties, inject, toRef} from 'vue'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport BImg from '../BImg/BImg.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useId} from '../../composables/useId'\nimport type {BCarouselSlideProps, BCarouselSlideSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BCarouselSlideProps>(), {\n background: undefined,\n caption: undefined,\n captionTag: 'h3',\n contentTag: 'div',\n contentVisibleUp: undefined,\n id: undefined,\n imgAlt: undefined,\n imgBlank: false,\n imgBlankColor: 'transparent',\n imgHeight: undefined,\n imgSrc: undefined,\n imgSrcset: undefined,\n imgWidth: undefined,\n interval: undefined,\n text: undefined,\n textTag: 'p',\n})\nconst props = useDefaults(_props, 'BCarouselSlide')\nconst slots = defineSlots<BCarouselSlideSlots>()\n\nconst computedId = useId(() => props.id, 'carousel-slide')\nconst parentData = inject(carouselInjectionKey, null)\n\nconst hasText = computed(() => props.text || !isEmptySlot(slots.text))\nconst hasCaption = computed(() => props.caption || !isEmptySlot(slots.caption))\nconst hasContent = computed(() => hasText.value || hasCaption.value || !isEmptySlot(slots.default))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n background: `${\n props.background || parentData?.background.value || 'rgb(171, 171, 171)'\n } none repeat scroll 0% 0%`,\n}))\n\nconst computedContentClasses = computed(() => ({\n 'd-none': props.contentVisibleUp !== undefined,\n [`d-${props.contentVisibleUp}-block`]: props.contentVisibleUp !== undefined,\n}))\n\ndefineExpose({\n _interval: toRef(() => props.interval),\n _id: computedId,\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"carousel-item\" :style=\"computedStyle\">\n <slot name=\"img\">\n <BImg\n class=\"d-block w-100\"\n :alt=\"props.imgAlt\"\n :srcset=\"props.imgSrcset\"\n :src=\"props.imgSrc\"\n :width=\"props.imgWidth || parentData?.width.value\"\n :height=\"props.imgHeight || parentData?.height.value\"\n :blank=\"props.imgBlank\"\n :blank-color=\"props.imgBlankColor\"\n />\n </slot>\n <component\n :is=\"props.contentTag\"\n v-if=\"hasContent\"\n class=\"carousel-caption\"\n :class=\"computedContentClasses\"\n >\n <component :is=\"props.captionTag\" v-if=\"hasCaption\">\n <slot name=\"caption\">\n <span>{{ props.caption }}</span>\n </slot>\n </component>\n <component :is=\"props.textTag\" v-if=\"hasText\">\n <slot name=\"text\">\n <span>{{ props.text }}</span>\n </slot>\n </component>\n <slot />\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties, inject, toRef} from 'vue'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport BImg from '../BImg/BImg.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useId} from '../../composables/useId'\nimport type {BCarouselSlideProps, BCarouselSlideSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BCarouselSlideProps>(), {\n background: undefined,\n caption: undefined,\n captionTag: 'h3',\n contentTag: 'div',\n contentVisibleUp: undefined,\n id: undefined,\n imgAlt: undefined,\n imgBlank: false,\n imgBlankColor: 'transparent',\n imgHeight: undefined,\n imgSrc: undefined,\n imgSrcset: undefined,\n imgWidth: undefined,\n interval: undefined,\n text: undefined,\n textTag: 'p',\n})\nconst props = useDefaults(_props, 'BCarouselSlide')\nconst slots = defineSlots<BCarouselSlideSlots>()\n\nconst computedId = useId(() => props.id, 'carousel-slide')\nconst parentData = inject(carouselInjectionKey, null)\n\nconst hasText = computed(() => props.text || !isEmptySlot(slots.text))\nconst hasCaption = computed(() => props.caption || !isEmptySlot(slots.caption))\nconst hasContent = computed(() => hasText.value || hasCaption.value || !isEmptySlot(slots.default))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n background: `${\n props.background || parentData?.background.value || 'rgb(171, 171, 171)'\n } none repeat scroll 0% 0%`,\n}))\n\nconst computedContentClasses = computed(() => ({\n 'd-none': props.contentVisibleUp !== undefined,\n [`d-${props.contentVisibleUp}-block`]: props.contentVisibleUp !== undefined,\n}))\n\ndefineExpose({\n _interval: toRef(() => props.interval),\n _id: computedId,\n})\n</script>\n"],"mappings":";;;;;;;;;;AAEA,IAAa,mBAAmB,MAAwB,cACrD,OAAO,KAAK,CAAC,EAAA,CACX,QAAQ,KAAc,SAAgB;CACrC,IAAI,OAAO,KAAK,SAAS,UACvB,MAAM,IAAI,OAAO,KAAK,QAA4B;MAElD,IAAI,KAAK,IAAI;CAEf,OAAO;AACT,GAAG,CAAC,CAAC,CAAC,CACL,QAAQ,UAAW,MAAM,MAAuC,WAAW,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EC6ExF,MAAM,QAAQ,YAAY,SAAQ,WAAW;EAC7C,MAAM,OAAO;EACb,MAAM,QAAQ,SAAA;EAEd,MAAM,aAAa,cAAY,MAAM,IAAI,UAAU;EACnD,MAAM,kBAAkB,QAAM,KAAA,GAAW,2BAA2B;EAEpE,MAAM,aAAa,SAA6D,SAAA,YAAa;EAE7F,MAAM,cAAc,eAAsD,cAAc;EAExF,MAAM,uBAAuB,kBAAkB,MAAM,cAAc;EACnE,MAAM,gBAAgB,IAAsB,IAAI;EAChD,gBAA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AA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;KAGvB,WAAQ,KAAA,QAAA,SAAA"}
1
+ {"version":3,"file":"BCarousel-qHGRSVFe.js","names":[],"sources":["../src/utils/getSlotElements.ts","../src/components/BCarousel/BCarousel.vue","../src/components/BCarousel/BCarousel.vue","../src/components/BCarousel/BCarouselSlide.vue","../src/components/BCarousel/BCarouselSlide.vue"],"sourcesContent":["import type {Slot, VNode} from 'vue'\n\nexport const getSlotElements = (slot: Slot | undefined, filterBy: string): VNode[] =>\n (slot?.() ?? [])\n .reduce((arr: VNode[], slot: VNode) => {\n if (typeof slot.type === 'symbol') {\n arr = arr.concat(slot.children as unknown as VNode)\n } else {\n arr.push(slot)\n }\n return arr\n }, [])\n .filter((child) => (child.type as {__name: string} | undefined)?.__name === filterBy)\n","<template>\n <div\n :id=\"computedId\"\n ref=\"_element\"\n class=\"carousel slide pointer-event\"\n :class=\"computedClasses\"\n >\n <div\n v-if=\"props.indicators\"\n class=\"carousel-indicators\"\n :aria-label=\"props.labelIndicators\"\n :aria-owns=\"buttonOwnership\"\n >\n <!-- :data-bs-target=\"`#${computedId}`\" is required since the classes target elems with that attr -->\n <button\n v-for=\"(_, i) in slides.length\"\n :key=\"i\"\n type=\"button\"\n data-bs-target=\"\"\n :class=\"i === modelValue ? 'active' : ''\"\n :aria-current=\"i === modelValue ? true : undefined\"\n :aria-label=\"`${props.indicatorsButtonLabel} ${i}`\"\n :aria-controls=\"buttonOwnership\"\n :aria-describedby=\"slideValues?.[i]?._id\"\n @click=\"slideTo(i)\"\n />\n </div>\n\n <div ref=\"_relatedTarget\" class=\"carousel-inner\">\n <TransitionGroup v-bind=\"transitionGroupProps\">\n <component\n :is=\"slide\"\n v-for=\"(slide, i) in slides\"\n v-show=\"i === modelValue\"\n :key=\"i\"\n ref=\"_slideValues\"\n :class=\"{active: i === modelValue && isTransitioning === false}\"\n :style=\"props.noAnimation && {transition: 'none'}\"\n />\n </TransitionGroup>\n </div>\n\n <template v-if=\"props.controls\">\n <button class=\"carousel-control-prev\" type=\"button\" @click=\"onClickPrev\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsPrevText }}</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" @click=\"onClickNext\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsNextText }}</span>\n </button>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvCarouselEvent} from '../../utils'\nimport {computed, onMounted, provide, ref, toRef, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {onKeyStroke, useElementHover, useIntervalFn, useSwipe, useToNumber} from '@vueuse/core'\nimport type BCarouselSlide from './BCarouselSlide.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {Numberish} from '../../types/CommonTypes'\nimport {getSlotElements} from '../../utils/getSlotElements'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport type {BCarouselEmits, BCarouselProps, BCarouselSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BCarouselProps, 'modelValue'>>(), {\n background: undefined,\n controls: false,\n controlsNextText: 'Next',\n controlsPrevText: 'Previous',\n fade: false,\n id: undefined,\n imgHeight: undefined,\n imgWidth: undefined,\n indicators: false,\n indicatorsButtonLabel: 'Slide',\n interval: 5000,\n labelIndicators: 'Select a slide to display',\n keyboard: true,\n noAnimation: false,\n noHoverPause: false,\n noTouch: false,\n noWrap: false,\n ride: false,\n rideReverse: false,\n touchThreshold: 50,\n})\nconst props = useDefaults(_props, 'BCarousel')\nconst emit = defineEmits<BCarouselEmits>()\nconst slots = defineSlots<BCarouselSlots>()\n\nconst computedId = useId(() => props.id, 'carousel')\nconst buttonOwnership = useId(undefined, 'carousel-button-ownership')\n\nconst modelValue = defineModel<Exclude<BCarouselProps['modelValue'], undefined>>({default: 0})\n\nconst slideValues = useTemplateRef<InstanceType<typeof BCarouselSlide>[]>('_slideValues')\n\nconst touchThresholdNumber = useToNumber(() => props.touchThreshold)\nconst slideInterval = ref<Numberish | null>(null)\nonMounted(() => {\n slideInterval.value =\n slideValues.value?.find((slid) => slid.$el.style.display !== 'none')?._interval ?? null\n})\nconst intervalNumber = useToNumber(() => slideInterval.value ?? props.interval)\n\nconst isTransitioning = ref(false)\nconst rideStarted = ref(false)\nconst direction = ref<'start' | 'end'>('start')\nconst relatedTarget = useTemplateRef('_relatedTarget')\nconst element = useTemplateRef('_element')\n\nlet previousModelValue = modelValue.value\nlet isInternalChange = false\n\nconst isHovering = useElementHover(element)\n\nconst {pause, resume} = useIntervalFn(\n () => {\n if (props.rideReverse) {\n prev()\n return\n }\n next()\n },\n intervalNumber,\n {immediate: props.ride === 'carousel'}\n)\n\nconst isRiding = computed(\n () => (props.ride === true && rideStarted.value === true) || props.ride === 'carousel'\n)\nconst slides = computed(() => getSlotElements(slots.default, 'BCarouselSlide'))\nconst computedClasses = computed(() => ({'carousel-fade': props.fade}))\n\nconst buildBvCarouselEvent = (event: 'slid' | 'slide') =>\n new BvCarouselEvent(event, {\n componentId: computedId.value,\n cancelable: false,\n target: element.value,\n direction: direction.value === 'start' ? 'right' : 'left',\n from: previousModelValue,\n to: modelValue.value,\n relatedTarget: relatedTarget.value?.children[modelValue.value] ?? null,\n })\n\nwatch(modelValue, (newValue, oldValue) => {\n if (!isInternalChange) {\n // External v-model change: determine direction from the new/old values\n const lastIndex = slides.value.length - 1\n const wrappedForward = oldValue === lastIndex && newValue === 0\n const wrappedBackward = oldValue === 0 && newValue === lastIndex\n if (wrappedForward) {\n direction.value = 'start'\n } else if (wrappedBackward) {\n direction.value = 'end'\n } else {\n direction.value = newValue > oldValue ? 'start' : 'end'\n }\n }\n isInternalChange = false\n // If one ever thinks to change the transitions dependence on modelValue and thinks it is appropriate to remove this isTransitioning line, be careful\n // This directly effects how transitions are applied. The watch is for if you have an external change to modelValue, and doesn't directly call slideTo\n isTransitioning.value = true\n})\nconst slideTo = (value: number): void => {\n if (isTransitioning.value === true) return\n\n if (props.ride === true) {\n rideStarted.value = true\n }\n if (isRiding.value === true) {\n resume()\n }\n let nextValue = value\n if (nextValue >= slides.value.length) {\n if (props.noWrap) return\n nextValue = 0\n }\n if (nextValue < 0) {\n if (props.noWrap) return\n nextValue = slides.value.length - 1\n }\n if (nextValue === modelValue.value) return\n // Set direction based on the original requested value (before wrapping) so that\n // next() always animates forward and prev() always animates backward, regardless\n // of how many slides there are. This fixes the 2-slide case where wrap-detection\n // heuristics in the watcher would otherwise produce the wrong direction.\n // Note: `value` is the raw index passed by the caller (e.g. modelValue+1 for next()),\n // while `nextValue` is the resolved/wrapped index that becomes the new modelValue.\n direction.value = value > modelValue.value ? 'start' : 'end'\n // Mark as internal so the modelValue watcher skips its direction heuristics.\n // A race condition here is not possible because the isTransitioning guard above\n // ensures slideTo cannot be called again until the current transition completes.\n isInternalChange = true\n isTransitioning.value = true\n previousModelValue = modelValue.value\n modelValue.value = nextValue\n}\n\nconst prev = (): void => {\n slideTo(modelValue.value - 1)\n}\nconst next = (): void => {\n slideTo(modelValue.value + 1)\n}\n\nconst {lengthX} = useSwipe(element, {\n passive: true,\n onSwipeStart() {\n if (props.noTouch) return\n pause()\n },\n onSwipeEnd() {\n if (props.noTouch) return\n const resumeRiding = () => {\n if (isRiding.value === false) return\n resume()\n }\n if (lengthX.value >= touchThresholdNumber.value) {\n next()\n resumeRiding()\n return\n }\n if (lengthX.value <= -touchThresholdNumber.value) {\n prev()\n resumeRiding()\n }\n },\n})\n\nconst onClickPrev = (event: MouseEvent) => {\n emit('prev-click', event)\n if (event.defaultPrevented) return\n prev()\n}\nconst onClickNext = (event: MouseEvent) => {\n emit('next-click', event)\n if (event.defaultPrevented) return\n next()\n}\n\nconst onMouseEnter = () => {\n if (props.noHoverPause) return\n pause()\n}\nconst onMouseLeave = () => {\n if (!isRiding.value) return\n resume()\n}\nwatch(isHovering, (newValue) => {\n if (newValue) {\n onMouseEnter()\n return\n }\n onMouseLeave()\n})\nonKeyStroke(\n ['ArrowLeft', 'ArrowRight'],\n (event) => {\n if (!props.keyboard) return\n if (event.key === 'ArrowLeft') {\n prev()\n } else {\n next()\n }\n },\n {target: element, passive: true}\n)\n\nwatch(\n () => props.ride,\n () => {\n rideStarted.value = false\n }\n)\n\nconst enterDirectionClass = computed(\n () => `carousel-item-${direction.value === 'start' ? 'next' : 'prev'}`\n)\nconst orderDirectionClass = computed(() => `carousel-item-${direction.value}`)\nconst transitionGroupProps = computed(() => ({\n enterFromClass: `carousel-item ${enterDirectionClass.value}`,\n enterActiveClass: `carousel-item ${enterDirectionClass.value}`,\n enterToClass: `carousel-item ${enterDirectionClass.value} ${orderDirectionClass.value}`,\n leaveFromClass: 'carousel-item active',\n leaveActiveClass: 'carousel-item active',\n leaveToClass: `carousel-item active ${orderDirectionClass.value}`,\n onBeforeLeave: () => {\n emit('slide', buildBvCarouselEvent('slide'))\n },\n onAfterLeave: () => {\n emit('slid', buildBvCarouselEvent('slid'))\n isTransitioning.value = false\n },\n // carousel-item class is removed from the slide during the transition,\n // as is included within enter classes.\n // The first slide recovers carousel-item class,\n onAfterEnter: (el: Readonly<Element>) => {\n if (modelValue.value !== 0) {\n el.classList.add('carousel-item')\n }\n },\n onEnter: (el: Readonly<Element>) => {\n slideInterval.value = slideValues.value?.find((slid) => slid.$el === el)?._interval ?? null\n },\n}))\n\ndefineExpose({\n resume,\n pause,\n next,\n prev,\n slideTo,\n})\n\nprovide(carouselInjectionKey, {\n background: toRef(() => props.background),\n width: toRef(() => props.imgWidth),\n height: toRef(() => props.imgHeight),\n})\n</script>\n","<template>\n <div\n :id=\"computedId\"\n ref=\"_element\"\n class=\"carousel slide pointer-event\"\n :class=\"computedClasses\"\n >\n <div\n v-if=\"props.indicators\"\n class=\"carousel-indicators\"\n :aria-label=\"props.labelIndicators\"\n :aria-owns=\"buttonOwnership\"\n >\n <!-- :data-bs-target=\"`#${computedId}`\" is required since the classes target elems with that attr -->\n <button\n v-for=\"(_, i) in slides.length\"\n :key=\"i\"\n type=\"button\"\n data-bs-target=\"\"\n :class=\"i === modelValue ? 'active' : ''\"\n :aria-current=\"i === modelValue ? true : undefined\"\n :aria-label=\"`${props.indicatorsButtonLabel} ${i}`\"\n :aria-controls=\"buttonOwnership\"\n :aria-describedby=\"slideValues?.[i]?._id\"\n @click=\"slideTo(i)\"\n />\n </div>\n\n <div ref=\"_relatedTarget\" class=\"carousel-inner\">\n <TransitionGroup v-bind=\"transitionGroupProps\">\n <component\n :is=\"slide\"\n v-for=\"(slide, i) in slides\"\n v-show=\"i === modelValue\"\n :key=\"i\"\n ref=\"_slideValues\"\n :class=\"{active: i === modelValue && isTransitioning === false}\"\n :style=\"props.noAnimation && {transition: 'none'}\"\n />\n </TransitionGroup>\n </div>\n\n <template v-if=\"props.controls\">\n <button class=\"carousel-control-prev\" type=\"button\" @click=\"onClickPrev\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsPrevText }}</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" @click=\"onClickNext\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\" />\n <span class=\"visually-hidden\">{{ props.controlsNextText }}</span>\n </button>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvCarouselEvent} from '../../utils'\nimport {computed, onMounted, provide, ref, toRef, useTemplateRef, watch} from 'vue'\nimport {useId} from '../../composables/useId'\nimport {onKeyStroke, useElementHover, useIntervalFn, useSwipe, useToNumber} from '@vueuse/core'\nimport type BCarouselSlide from './BCarouselSlide.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {Numberish} from '../../types/CommonTypes'\nimport {getSlotElements} from '../../utils/getSlotElements'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport type {BCarouselEmits, BCarouselProps, BCarouselSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BCarouselProps, 'modelValue'>>(), {\n background: undefined,\n controls: false,\n controlsNextText: 'Next',\n controlsPrevText: 'Previous',\n fade: false,\n id: undefined,\n imgHeight: undefined,\n imgWidth: undefined,\n indicators: false,\n indicatorsButtonLabel: 'Slide',\n interval: 5000,\n labelIndicators: 'Select a slide to display',\n keyboard: true,\n noAnimation: false,\n noHoverPause: false,\n noTouch: false,\n noWrap: false,\n ride: false,\n rideReverse: false,\n touchThreshold: 50,\n})\nconst props = useDefaults(_props, 'BCarousel')\nconst emit = defineEmits<BCarouselEmits>()\nconst slots = defineSlots<BCarouselSlots>()\n\nconst computedId = useId(() => props.id, 'carousel')\nconst buttonOwnership = useId(undefined, 'carousel-button-ownership')\n\nconst modelValue = defineModel<Exclude<BCarouselProps['modelValue'], undefined>>({default: 0})\n\nconst slideValues = useTemplateRef<InstanceType<typeof BCarouselSlide>[]>('_slideValues')\n\nconst touchThresholdNumber = useToNumber(() => props.touchThreshold)\nconst slideInterval = ref<Numberish | null>(null)\nonMounted(() => {\n slideInterval.value =\n slideValues.value?.find((slid) => slid.$el.style.display !== 'none')?._interval ?? null\n})\nconst intervalNumber = useToNumber(() => slideInterval.value ?? props.interval)\n\nconst isTransitioning = ref(false)\nconst rideStarted = ref(false)\nconst direction = ref<'start' | 'end'>('start')\nconst relatedTarget = useTemplateRef('_relatedTarget')\nconst element = useTemplateRef('_element')\n\nlet previousModelValue = modelValue.value\nlet isInternalChange = false\n\nconst isHovering = useElementHover(element)\n\nconst {pause, resume} = useIntervalFn(\n () => {\n if (props.rideReverse) {\n prev()\n return\n }\n next()\n },\n intervalNumber,\n {immediate: props.ride === 'carousel'}\n)\n\nconst isRiding = computed(\n () => (props.ride === true && rideStarted.value === true) || props.ride === 'carousel'\n)\nconst slides = computed(() => getSlotElements(slots.default, 'BCarouselSlide'))\nconst computedClasses = computed(() => ({'carousel-fade': props.fade}))\n\nconst buildBvCarouselEvent = (event: 'slid' | 'slide') =>\n new BvCarouselEvent(event, {\n componentId: computedId.value,\n cancelable: false,\n target: element.value,\n direction: direction.value === 'start' ? 'right' : 'left',\n from: previousModelValue,\n to: modelValue.value,\n relatedTarget: relatedTarget.value?.children[modelValue.value] ?? null,\n })\n\nwatch(modelValue, (newValue, oldValue) => {\n if (!isInternalChange) {\n // External v-model change: determine direction from the new/old values\n const lastIndex = slides.value.length - 1\n const wrappedForward = oldValue === lastIndex && newValue === 0\n const wrappedBackward = oldValue === 0 && newValue === lastIndex\n if (wrappedForward) {\n direction.value = 'start'\n } else if (wrappedBackward) {\n direction.value = 'end'\n } else {\n direction.value = newValue > oldValue ? 'start' : 'end'\n }\n }\n isInternalChange = false\n // If one ever thinks to change the transitions dependence on modelValue and thinks it is appropriate to remove this isTransitioning line, be careful\n // This directly effects how transitions are applied. The watch is for if you have an external change to modelValue, and doesn't directly call slideTo\n isTransitioning.value = true\n})\nconst slideTo = (value: number): void => {\n if (isTransitioning.value === true) return\n\n if (props.ride === true) {\n rideStarted.value = true\n }\n if (isRiding.value === true) {\n resume()\n }\n let nextValue = value\n if (nextValue >= slides.value.length) {\n if (props.noWrap) return\n nextValue = 0\n }\n if (nextValue < 0) {\n if (props.noWrap) return\n nextValue = slides.value.length - 1\n }\n if (nextValue === modelValue.value) return\n // Set direction based on the original requested value (before wrapping) so that\n // next() always animates forward and prev() always animates backward, regardless\n // of how many slides there are. This fixes the 2-slide case where wrap-detection\n // heuristics in the watcher would otherwise produce the wrong direction.\n // Note: `value` is the raw index passed by the caller (e.g. modelValue+1 for next()),\n // while `nextValue` is the resolved/wrapped index that becomes the new modelValue.\n direction.value = value > modelValue.value ? 'start' : 'end'\n // Mark as internal so the modelValue watcher skips its direction heuristics.\n // A race condition here is not possible because the isTransitioning guard above\n // ensures slideTo cannot be called again until the current transition completes.\n isInternalChange = true\n isTransitioning.value = true\n previousModelValue = modelValue.value\n modelValue.value = nextValue\n}\n\nconst prev = (): void => {\n slideTo(modelValue.value - 1)\n}\nconst next = (): void => {\n slideTo(modelValue.value + 1)\n}\n\nconst {lengthX} = useSwipe(element, {\n passive: true,\n onSwipeStart() {\n if (props.noTouch) return\n pause()\n },\n onSwipeEnd() {\n if (props.noTouch) return\n const resumeRiding = () => {\n if (isRiding.value === false) return\n resume()\n }\n if (lengthX.value >= touchThresholdNumber.value) {\n next()\n resumeRiding()\n return\n }\n if (lengthX.value <= -touchThresholdNumber.value) {\n prev()\n resumeRiding()\n }\n },\n})\n\nconst onClickPrev = (event: MouseEvent) => {\n emit('prev-click', event)\n if (event.defaultPrevented) return\n prev()\n}\nconst onClickNext = (event: MouseEvent) => {\n emit('next-click', event)\n if (event.defaultPrevented) return\n next()\n}\n\nconst onMouseEnter = () => {\n if (props.noHoverPause) return\n pause()\n}\nconst onMouseLeave = () => {\n if (!isRiding.value) return\n resume()\n}\nwatch(isHovering, (newValue) => {\n if (newValue) {\n onMouseEnter()\n return\n }\n onMouseLeave()\n})\nonKeyStroke(\n ['ArrowLeft', 'ArrowRight'],\n (event) => {\n if (!props.keyboard) return\n if (event.key === 'ArrowLeft') {\n prev()\n } else {\n next()\n }\n },\n {target: element, passive: true}\n)\n\nwatch(\n () => props.ride,\n () => {\n rideStarted.value = false\n }\n)\n\nconst enterDirectionClass = computed(\n () => `carousel-item-${direction.value === 'start' ? 'next' : 'prev'}`\n)\nconst orderDirectionClass = computed(() => `carousel-item-${direction.value}`)\nconst transitionGroupProps = computed(() => ({\n enterFromClass: `carousel-item ${enterDirectionClass.value}`,\n enterActiveClass: `carousel-item ${enterDirectionClass.value}`,\n enterToClass: `carousel-item ${enterDirectionClass.value} ${orderDirectionClass.value}`,\n leaveFromClass: 'carousel-item active',\n leaveActiveClass: 'carousel-item active',\n leaveToClass: `carousel-item active ${orderDirectionClass.value}`,\n onBeforeLeave: () => {\n emit('slide', buildBvCarouselEvent('slide'))\n },\n onAfterLeave: () => {\n emit('slid', buildBvCarouselEvent('slid'))\n isTransitioning.value = false\n },\n // carousel-item class is removed from the slide during the transition,\n // as is included within enter classes.\n // The first slide recovers carousel-item class,\n onAfterEnter: (el: Readonly<Element>) => {\n if (modelValue.value !== 0) {\n el.classList.add('carousel-item')\n }\n },\n onEnter: (el: Readonly<Element>) => {\n slideInterval.value = slideValues.value?.find((slid) => slid.$el === el)?._interval ?? null\n },\n}))\n\ndefineExpose({\n resume,\n pause,\n next,\n prev,\n slideTo,\n})\n\nprovide(carouselInjectionKey, {\n background: toRef(() => props.background),\n width: toRef(() => props.imgWidth),\n height: toRef(() => props.imgHeight),\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"carousel-item\" :style=\"computedStyle\">\n <slot name=\"img\">\n <BImg\n class=\"d-block w-100\"\n :alt=\"props.imgAlt\"\n :srcset=\"props.imgSrcset\"\n :src=\"props.imgSrc\"\n :width=\"props.imgWidth || parentData?.width.value\"\n :height=\"props.imgHeight || parentData?.height.value\"\n :blank=\"props.imgBlank\"\n :blank-color=\"props.imgBlankColor\"\n />\n </slot>\n <component\n :is=\"props.contentTag\"\n v-if=\"hasContent\"\n class=\"carousel-caption\"\n :class=\"computedContentClasses\"\n >\n <component :is=\"props.captionTag\" v-if=\"hasCaption\">\n <slot name=\"caption\">\n <span>{{ props.caption }}</span>\n </slot>\n </component>\n <component :is=\"props.textTag\" v-if=\"hasText\">\n <slot name=\"text\">\n <span>{{ props.text }}</span>\n </slot>\n </component>\n <slot />\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties, inject, toRef} from 'vue'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport BImg from '../BImg/BImg.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useId} from '../../composables/useId'\nimport type {BCarouselSlideProps, BCarouselSlideSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BCarouselSlideProps>(), {\n background: undefined,\n caption: undefined,\n captionTag: 'h3',\n contentTag: 'div',\n contentVisibleUp: undefined,\n id: undefined,\n imgAlt: undefined,\n imgBlank: false,\n imgBlankColor: 'transparent',\n imgHeight: undefined,\n imgSrc: undefined,\n imgSrcset: undefined,\n imgWidth: undefined,\n interval: undefined,\n text: undefined,\n textTag: 'p',\n})\nconst props = useDefaults(_props, 'BCarouselSlide')\nconst slots = defineSlots<BCarouselSlideSlots>()\n\nconst computedId = useId(() => props.id, 'carousel-slide')\nconst parentData = inject(carouselInjectionKey, null)\n\nconst hasText = computed(() => props.text || !isEmptySlot(slots.text))\nconst hasCaption = computed(() => props.caption || !isEmptySlot(slots.caption))\nconst hasContent = computed(() => hasText.value || hasCaption.value || !isEmptySlot(slots.default))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n background: `${\n props.background || parentData?.background.value || 'rgb(171, 171, 171)'\n } none repeat scroll 0% 0%`,\n}))\n\nconst computedContentClasses = computed(() => ({\n 'd-none': props.contentVisibleUp !== undefined,\n [`d-${props.contentVisibleUp}-block`]: props.contentVisibleUp !== undefined,\n}))\n\ndefineExpose({\n _interval: toRef(() => props.interval),\n _id: computedId,\n})\n</script>\n","<template>\n <div :id=\"computedId\" class=\"carousel-item\" :style=\"computedStyle\">\n <slot name=\"img\">\n <BImg\n class=\"d-block w-100\"\n :alt=\"props.imgAlt\"\n :srcset=\"props.imgSrcset\"\n :src=\"props.imgSrc\"\n :width=\"props.imgWidth || parentData?.width.value\"\n :height=\"props.imgHeight || parentData?.height.value\"\n :blank=\"props.imgBlank\"\n :blank-color=\"props.imgBlankColor\"\n />\n </slot>\n <component\n :is=\"props.contentTag\"\n v-if=\"hasContent\"\n class=\"carousel-caption\"\n :class=\"computedContentClasses\"\n >\n <component :is=\"props.captionTag\" v-if=\"hasCaption\">\n <slot name=\"caption\">\n <span>{{ props.caption }}</span>\n </slot>\n </component>\n <component :is=\"props.textTag\" v-if=\"hasText\">\n <slot name=\"text\">\n <span>{{ props.text }}</span>\n </slot>\n </component>\n <slot />\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, type CSSProperties, inject, toRef} from 'vue'\nimport {carouselInjectionKey} from '../../utils/keys'\nimport BImg from '../BImg/BImg.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useId} from '../../composables/useId'\nimport type {BCarouselSlideProps, BCarouselSlideSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BCarouselSlideProps>(), {\n background: undefined,\n caption: undefined,\n captionTag: 'h3',\n contentTag: 'div',\n contentVisibleUp: undefined,\n id: undefined,\n imgAlt: undefined,\n imgBlank: false,\n imgBlankColor: 'transparent',\n imgHeight: undefined,\n imgSrc: undefined,\n imgSrcset: undefined,\n imgWidth: undefined,\n interval: undefined,\n text: undefined,\n textTag: 'p',\n})\nconst props = useDefaults(_props, 'BCarouselSlide')\nconst slots = defineSlots<BCarouselSlideSlots>()\n\nconst computedId = useId(() => props.id, 'carousel-slide')\nconst parentData = inject(carouselInjectionKey, null)\n\nconst hasText = computed(() => props.text || !isEmptySlot(slots.text))\nconst hasCaption = computed(() => props.caption || !isEmptySlot(slots.caption))\nconst hasContent = computed(() => hasText.value || hasCaption.value || !isEmptySlot(slots.default))\n\nconst computedStyle = computed<CSSProperties>(() => ({\n background: `${\n props.background || parentData?.background.value || 'rgb(171, 171, 171)'\n } none repeat scroll 0% 0%`,\n}))\n\nconst computedContentClasses = computed(() => ({\n 'd-none': props.contentVisibleUp !== undefined,\n [`d-${props.contentVisibleUp}-block`]: props.contentVisibleUp !== undefined,\n}))\n\ndefineExpose({\n _interval: toRef(() => props.interval),\n _id: computedId,\n})\n</script>\n"],"mappings":";;;;;;;;;;AAEA,IAAa,mBAAmB,MAAwB,cACrD,OAAO,KAAK,CAAC,EAAA,CACX,QAAQ,KAAc,SAAgB;CACrC,IAAI,OAAO,KAAK,SAAS,UACvB,MAAM,IAAI,OAAO,KAAK,QAA4B;MAElD,IAAI,KAAK,IAAI;CAEf,OAAO;AACT,GAAG,CAAC,CAAC,CAAC,CACL,QAAQ,UAAW,MAAM,MAAuC,WAAW,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,GAAA;MAC9B,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADL,mBAAgC,QAAA,MAAA,gBAAvB,MAAA,KAAA,CAAK,CAAC,OAAO,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;KAGW,QAAA,SAArC,UAAA,GAAA,YAIY,wBAJI,MAAA,KAAA,CAAK,CAAC,OAAO,GAAA,EAAA,KAAA,EAAA,GAAA;MAC3B,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,QAAA,CAAA,SAAA,CADL,mBAA6B,QAAA,MAAA,gBAApB,MAAA,KAAA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;KAGvB,WAAQ,KAAA,QAAA,SAAA"}
@@ -1,7 +1,7 @@
1
1
  import { c as collapseInjectionKey } from "./keys-BgLwJbLV.js";
2
2
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
3
3
  import { t as useId$1 } from "./useId-Fh-Arhb7.js";
4
- import { t as useShowHide } from "./useShowHide-C95Y9EKL.js";
4
+ import { t as useShowHide } from "./useShowHide-Dpld86ys.js";
5
5
  import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeProps, openBlock, provide, readonly, renderSlot, resolveDynamicComponent, toRef, unref, useModel, useTemplateRef, vShow, withCtx, withDirectives } from "vue";
6
6
  //#endregion
7
7
  //#region src/components/BCollapse/BCollapse.vue
@@ -180,4 +180,4 @@ var BCollapse_default = /* @__PURE__ */ defineComponent({
180
180
  //#endregion
181
181
  export { BCollapse_default as t };
182
182
 
183
- //# sourceMappingURL=BCollapse-B9fnWSzA.js.map
183
+ //# sourceMappingURL=BCollapse-DtuJwN7B.js.map
@@ -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,SA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","../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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Stroke, 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-Dpld86ys.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-CSJCHfOw.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-BY-E0SHv.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,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,O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A,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-BY-E0SHv.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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-Dpld86ys.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-DtQlIFNn.js.map