bootstrap-vue-next 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/{BAccordion-FuQ6sMFy.js → BAccordion-nQptHiXD.js} +2 -2
  2. package/dist/{BAccordion-FuQ6sMFy.js.map → BAccordion-nQptHiXD.js.map} +1 -1
  3. package/dist/{BAlert-C9Mi4RDx.js → BAlert-Bl3TOay3.js} +2 -2
  4. package/dist/{BAlert-C9Mi4RDx.js.map → BAlert-Bl3TOay3.js.map} +1 -1
  5. package/dist/{BCarousel-DQgfW4DN.js → BCarousel-BV2EiQRM.js} +2 -2
  6. package/dist/{BCarousel-DQgfW4DN.js.map → BCarousel-BV2EiQRM.js.map} +1 -1
  7. package/dist/{BCollapse-B9fnWSzA.js → BCollapse-B2q9Ya2S.js} +2 -2
  8. package/dist/{BCollapse-B9fnWSzA.js.map → BCollapse-B2q9Ya2S.js.map} +1 -1
  9. package/dist/{BDropdown-CnxUzs42.js → BDropdown-D4gLdtmX.js} +3 -3
  10. package/dist/{BDropdown-CnxUzs42.js.map → BDropdown-D4gLdtmX.js.map} +1 -1
  11. package/dist/{BModal-NPsCBNo7.js → BModal-BjmeVZen.js} +2 -2
  12. package/dist/{BModal-NPsCBNo7.js.map → BModal-BjmeVZen.js.map} +1 -1
  13. package/dist/{BNav-CjXS9tQ5.js → BNav-B2PlMEMD.js} +2 -2
  14. package/dist/{BNav-CjXS9tQ5.js.map → BNav-B2PlMEMD.js.map} +1 -1
  15. package/dist/{BOffcanvas-BndaBJoP.js → BOffcanvas-DfR32-ZP.js} +2 -2
  16. package/dist/{BOffcanvas-BndaBJoP.js.map → BOffcanvas-DfR32-ZP.js.map} +1 -1
  17. package/dist/{BPagination-D_Hfk6OF.js → BPagination-CfrsVgDp.js} +2 -2
  18. package/dist/{BPagination-D_Hfk6OF.js.map → BPagination-CfrsVgDp.js.map} +1 -1
  19. package/dist/{BTabs-BKmkVWrZ.js → BTabs-Zp8CvCL_.js} +2 -2
  20. package/dist/{BTabs-BKmkVWrZ.js.map → BTabs-Zp8CvCL_.js.map} +1 -1
  21. package/dist/{BToast-Di9HwBOV.js → BToast-CqE2VMW2.js} +2 -2
  22. package/dist/{BToast-Di9HwBOV.js.map → BToast-CqE2VMW2.js.map} +1 -1
  23. package/dist/{BTooltip-BxaUtV4m.js → BTooltip-BHFBLXnr.js} +2 -2
  24. package/dist/{BTooltip-BxaUtV4m.js.map → BTooltip-BHFBLXnr.js.map} +1 -1
  25. package/dist/bootstrap-vue-next.mjs +15 -15
  26. package/dist/{floatingUi-BlKoACvc.js → floatingUi-Stb1SUvw.js} +2 -2
  27. package/dist/{floatingUi-BlKoACvc.js.map → floatingUi-Stb1SUvw.js.map} +1 -1
  28. package/dist/src/components/BAccordion/index.mjs +1 -1
  29. package/dist/src/components/BAlert/index.mjs +1 -1
  30. package/dist/src/components/BCarousel/index.mjs +1 -1
  31. package/dist/src/components/BCollapse/index.mjs +1 -1
  32. package/dist/src/components/BDropdown/index.mjs +1 -1
  33. package/dist/src/components/BModal/index.mjs +1 -1
  34. package/dist/src/components/BNav/index.mjs +1 -1
  35. package/dist/src/components/BOffcanvas/index.mjs +1 -1
  36. package/dist/src/components/BPagination/index.mjs +1 -1
  37. package/dist/src/components/BPopover/index.mjs +1 -1
  38. package/dist/src/components/BTabs/index.mjs +1 -1
  39. package/dist/src/components/BToast/index.mjs +1 -1
  40. package/dist/src/components/BTooltip/index.mjs +1 -1
  41. package/dist/src/components/index.mjs +13 -13
  42. package/dist/src/composables/orchestratorShared/index.mjs +33 -5
  43. package/dist/src/composables/orchestratorShared/index.mjs.map +1 -1
  44. package/dist/src/composables/useModal/index.mjs +1 -1
  45. package/dist/src/composables/usePopover/index.mjs +2 -2
  46. package/dist/src/composables/useToast/index.mjs +1 -1
  47. package/dist/src/directives/BPopover/index.mjs +2 -2
  48. package/dist/src/directives/BScrollspy/index.mjs +1 -1
  49. package/dist/src/directives/BToggle/index.mjs +1 -1
  50. package/dist/src/directives/BTooltip/index.mjs +2 -2
  51. package/dist/{useShowHide-C95Y9EKL.js → useShowHide-B6RQbFDt.js} +2 -2
  52. package/dist/{useShowHide-C95Y9EKL.js.map → useShowHide-B6RQbFDt.js.map} +1 -1
  53. package/dist/{utils-nRGGHA_i.js → utils-CK56zzsO.js} +2 -2
  54. package/dist/{utils-nRGGHA_i.js.map → utils-CK56zzsO.js.map} +1 -1
  55. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BNav-CjXS9tQ5.js","names":[],"sources":["../src/components/BNav/BNav.vue","../src/components/BNav/BNav.vue","../src/components/BNav/BNavForm.vue","../src/components/BNav/BNavForm.vue","../src/components/BNav/BNavItem.vue","../src/components/BNav/BNavItem.vue","../src/components/BNav/BNavItemDropdown.vue","../src/components/BNav/BNavItemDropdown.vue","../src/components/BNav/BNavText.vue","../src/components/BNav/BNavText.vue"],"sourcesContent":["<template>\n <component :is=\"props.tag\" class=\"nav\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\nimport type {BNavProps, BNavSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavProps>(), {\n align: undefined,\n cardHeader: false,\n fill: false,\n justified: false,\n pills: false,\n small: false,\n tabs: false,\n tag: 'ul',\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BNav')\ndefineSlots<BNavSlots>()\n\nconst alignment = useAlignment(() => props.align)\n\nconst computedClasses = computed(() => ({\n 'nav-tabs': props.tabs,\n 'nav-pills': props.pills && !props.tabs,\n 'card-header-tabs': !props.vertical && props.cardHeader && props.tabs,\n 'card-header-pills': !props.vertical && props.cardHeader && props.pills && !props.tabs,\n 'flex-column': props.vertical,\n 'nav-fill': !props.vertical && props.fill,\n 'nav-justified': !props.vertical && props.justified,\n [alignment.value]: !props.vertical && props.align !== undefined,\n 'small': props.small,\n 'nav-underline': props.underline,\n}))\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"nav\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\nimport type {BNavProps, BNavSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavProps>(), {\n align: undefined,\n cardHeader: false,\n fill: false,\n justified: false,\n pills: false,\n small: false,\n tabs: false,\n tag: 'ul',\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BNav')\ndefineSlots<BNavSlots>()\n\nconst alignment = useAlignment(() => props.align)\n\nconst computedClasses = computed(() => ({\n 'nav-tabs': props.tabs,\n 'nav-pills': props.pills && !props.tabs,\n 'card-header-tabs': !props.vertical && props.cardHeader && props.tabs,\n 'card-header-pills': !props.vertical && props.cardHeader && props.pills && !props.tabs,\n 'flex-column': props.vertical,\n 'nav-fill': !props.vertical && props.fill,\n 'nav-justified': !props.vertical && props.justified,\n [alignment.value]: !props.vertical && props.align !== undefined,\n 'small': props.small,\n 'nav-underline': props.underline,\n}))\n</script>\n","<template>\n <li :class=\"liClasses\" v-bind=\"wrapperAttrs\">\n <BForm\n v-bind=\"processedAttrs.formAttrs\"\n :id=\"props.id\"\n :floating=\"props.floating\"\n :role=\"props.role\"\n :novalidate=\"props.novalidate\"\n :validated=\"props.validated\"\n class=\"d-flex\"\n :class=\"props.formClass\"\n @submit.prevent=\"submitted\"\n >\n <slot />\n </BForm>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BForm from '../BForm/BForm.vue'\nimport type {BNavFormEmits, BNavFormProps, BNavFormSlots} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BNavFormProps>(), {\n role: undefined,\n wrapperAttrs: undefined,\n formClass: undefined,\n // BForm props\n floating: undefined,\n id: undefined,\n novalidate: undefined,\n validated: undefined,\n // End BForm props\n})\nconst props = useDefaults(_props, 'BNavForm')\nconst emit = defineEmits<BNavFormEmits>()\ndefineSlots<BNavFormSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...formAttrs} = attrs\n return {wrapperClass, formAttrs}\n})\n\nconst submitted = (e: Readonly<Event>) => {\n emit('submit', e)\n}\n\nconst liClasses = computed(() => [\n 'd-flex',\n 'flex-row',\n 'align-items-center',\n 'flex-wrap',\n processedAttrs.value.wrapperClass,\n])\n</script>\n","<template>\n <li :class=\"liClasses\" v-bind=\"wrapperAttrs\">\n <BForm\n v-bind=\"processedAttrs.formAttrs\"\n :id=\"props.id\"\n :floating=\"props.floating\"\n :role=\"props.role\"\n :novalidate=\"props.novalidate\"\n :validated=\"props.validated\"\n class=\"d-flex\"\n :class=\"props.formClass\"\n @submit.prevent=\"submitted\"\n >\n <slot />\n </BForm>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BForm from '../BForm/BForm.vue'\nimport type {BNavFormEmits, BNavFormProps, BNavFormSlots} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BNavFormProps>(), {\n role: undefined,\n wrapperAttrs: undefined,\n formClass: undefined,\n // BForm props\n floating: undefined,\n id: undefined,\n novalidate: undefined,\n validated: undefined,\n // End BForm props\n})\nconst props = useDefaults(_props, 'BNavForm')\nconst emit = defineEmits<BNavFormEmits>()\ndefineSlots<BNavFormSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...formAttrs} = attrs\n return {wrapperClass, formAttrs}\n})\n\nconst submitted = (e: Readonly<Event>) => {\n emit('submit', e)\n}\n\nconst liClasses = computed(() => [\n 'd-flex',\n 'flex-row',\n 'align-items-center',\n 'flex-wrap',\n processedAttrs.value.wrapperClass,\n])\n</script>\n","<template>\n <li class=\"nav-item\">\n <BLink\n class=\"nav-link\"\n :class=\"linkClass\"\n :tabindex=\"props.disabled ? -1 : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n v-bind=\"{...computedLinkProps, ...linkAttrs}\"\n @click=\"emit('click', $event)\"\n >\n <slot />\n </BLink>\n <slot name=\"after\" />\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport BLink from '../BLink/BLink.vue'\nimport {pick} from '../../utils/object'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BNavItemEmits, BNavItemProps, BNavItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavItemProps>(), {\n // Link props\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: 'router-link-exact-active active',\n href: undefined,\n icon: undefined,\n linkAttrs: undefined,\n linkClass: undefined,\n noPrefetch: undefined,\n noRel: undefined,\n opacity: undefined,\n opacityHover: undefined,\n prefetch: undefined,\n prefetchedClass: undefined,\n prefetchOn: undefined,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n stretched: false,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BNavItem')\nconst emit = defineEmits<BNavItemEmits>()\ndefineSlots<BNavItemSlots>()\n\nconst computedLinkProps = computed(() =>\n pick(props, [\n 'active',\n 'activeClass',\n 'disabled',\n 'exactActiveClass',\n 'href',\n 'icon',\n 'noRel',\n 'noPrefetch',\n 'opacity',\n 'opacityHover',\n 'prefetch',\n 'prefetchedClass',\n 'prefetchOn',\n 'rel',\n 'replace',\n 'routerComponentName',\n 'stretched',\n 'target',\n 'to',\n 'underlineOffset',\n 'underlineOffsetHover',\n 'underlineOpacity',\n 'underlineOpacityHover',\n 'underlineVariant',\n 'variant',\n ])\n)\n</script>\n","<template>\n <li class=\"nav-item\">\n <BLink\n class=\"nav-link\"\n :class=\"linkClass\"\n :tabindex=\"props.disabled ? -1 : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n v-bind=\"{...computedLinkProps, ...linkAttrs}\"\n @click=\"emit('click', $event)\"\n >\n <slot />\n </BLink>\n <slot name=\"after\" />\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport BLink from '../BLink/BLink.vue'\nimport {pick} from '../../utils/object'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BNavItemEmits, BNavItemProps, BNavItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavItemProps>(), {\n // Link props\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: 'router-link-exact-active active',\n href: undefined,\n icon: undefined,\n linkAttrs: undefined,\n linkClass: undefined,\n noPrefetch: undefined,\n noRel: undefined,\n opacity: undefined,\n opacityHover: undefined,\n prefetch: undefined,\n prefetchedClass: undefined,\n prefetchOn: undefined,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n stretched: false,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BNavItem')\nconst emit = defineEmits<BNavItemEmits>()\ndefineSlots<BNavItemSlots>()\n\nconst computedLinkProps = computed(() =>\n pick(props, [\n 'active',\n 'activeClass',\n 'disabled',\n 'exactActiveClass',\n 'href',\n 'icon',\n 'noRel',\n 'noPrefetch',\n 'opacity',\n 'opacityHover',\n 'prefetch',\n 'prefetchedClass',\n 'prefetchOn',\n 'rel',\n 'replace',\n 'routerComponentName',\n 'stretched',\n 'target',\n 'to',\n 'underlineOffset',\n 'underlineOffsetHover',\n 'underlineOpacity',\n 'underlineOpacityHover',\n 'underlineVariant',\n 'variant',\n ])\n)\n</script>\n","<template>\n <li class=\"nav-item dropdown\">\n <BDropdown\n ref=\"_dropdown\"\n v-bind=\"props\"\n v-model=\"modelValue\"\n is-nav\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n @split-click=\"emit('split-click', $event)\"\n >\n <template #button-content>\n <slot name=\"button-content\" />\n </template>\n <template #toggle-text>\n <slot name=\"toggle-text\" />\n </template>\n <template #default>\n <slot :hide=\"hide\" :show=\"show\" />\n </template>\n </BDropdown>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {useTemplateRef} from 'vue'\nimport BDropdown from '../BDropdown/BDropdown.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BDropdownEmits, BDropdownProps, BNavItemDropdownSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n block: false,\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: true,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n role: 'menu',\n size: undefined,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n splitVariant: undefined,\n placement: undefined,\n noWrapper: undefined,\n wrapperClass: undefined,\n strategy: 'absolute',\n text: undefined,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n variant: 'link',\n})\nconst props = useDefaults(_props, 'BNavItemDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BNavItemDropdownSlots>()\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst dropdown = useTemplateRef('_dropdown')\n\nconst hide = () => {\n dropdown.value?.hide()\n}\nconst show = () => {\n dropdown.value?.show()\n}\nconst toggle = () => {\n dropdown.value?.toggle()\n}\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n</script>\n","<template>\n <li class=\"nav-item dropdown\">\n <BDropdown\n ref=\"_dropdown\"\n v-bind=\"props\"\n v-model=\"modelValue\"\n is-nav\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n @split-click=\"emit('split-click', $event)\"\n >\n <template #button-content>\n <slot name=\"button-content\" />\n </template>\n <template #toggle-text>\n <slot name=\"toggle-text\" />\n </template>\n <template #default>\n <slot :hide=\"hide\" :show=\"show\" />\n </template>\n </BDropdown>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {useTemplateRef} from 'vue'\nimport BDropdown from '../BDropdown/BDropdown.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BDropdownEmits, BDropdownProps, BNavItemDropdownSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n block: false,\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: true,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n role: 'menu',\n size: undefined,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n splitVariant: undefined,\n placement: undefined,\n noWrapper: undefined,\n wrapperClass: undefined,\n strategy: 'absolute',\n text: undefined,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n variant: 'link',\n})\nconst props = useDefaults(_props, 'BNavItemDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BNavItemDropdownSlots>()\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst dropdown = useTemplateRef('_dropdown')\n\nconst hide = () => {\n dropdown.value?.hide()\n}\nconst show = () => {\n dropdown.value?.show()\n}\nconst toggle = () => {\n dropdown.value?.toggle()\n}\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n</script>\n","<template>\n <li class=\"navbar-text\">\n <slot>\n {{ props.text }}\n </slot>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BNavTextProps, BNavTextSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BNavTextProps>(), {text: undefined})\nconst props = useDefaults(_props, 'BNavText')\ndefineSlots<BNavTextSlots>()\n</script>\n","<template>\n <li class=\"navbar-text\">\n <slot>\n {{ props.text }}\n </slot>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BNavTextProps, BNavTextSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BNavTextProps>(), {text: undefined})\nconst props = useDefaults(_props, 'BNavText')\ndefineSlots<BNavTextSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ,YAAY,SAAQ,MAAM;EAGxC,MAAM,YAAY,mBAAmB,MAAM,KAAK;EAEhD,MAAM,kBAAkB,gBAAgB;GACtC,YAAY,MAAM;GAClB,aAAa,MAA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CAHH,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,IAAI,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"BNav-B2PlMEMD.js","names":[],"sources":["../src/components/BNav/BNav.vue","../src/components/BNav/BNav.vue","../src/components/BNav/BNavForm.vue","../src/components/BNav/BNavForm.vue","../src/components/BNav/BNavItem.vue","../src/components/BNav/BNavItem.vue","../src/components/BNav/BNavItemDropdown.vue","../src/components/BNav/BNavItemDropdown.vue","../src/components/BNav/BNavText.vue","../src/components/BNav/BNavText.vue"],"sourcesContent":["<template>\n <component :is=\"props.tag\" class=\"nav\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\nimport type {BNavProps, BNavSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavProps>(), {\n align: undefined,\n cardHeader: false,\n fill: false,\n justified: false,\n pills: false,\n small: false,\n tabs: false,\n tag: 'ul',\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BNav')\ndefineSlots<BNavSlots>()\n\nconst alignment = useAlignment(() => props.align)\n\nconst computedClasses = computed(() => ({\n 'nav-tabs': props.tabs,\n 'nav-pills': props.pills && !props.tabs,\n 'card-header-tabs': !props.vertical && props.cardHeader && props.tabs,\n 'card-header-pills': !props.vertical && props.cardHeader && props.pills && !props.tabs,\n 'flex-column': props.vertical,\n 'nav-fill': !props.vertical && props.fill,\n 'nav-justified': !props.vertical && props.justified,\n [alignment.value]: !props.vertical && props.align !== undefined,\n 'small': props.small,\n 'nav-underline': props.underline,\n}))\n</script>\n","<template>\n <component :is=\"props.tag\" class=\"nav\" :class=\"computedClasses\">\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {computed} from 'vue'\nimport type {BNavProps, BNavSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavProps>(), {\n align: undefined,\n cardHeader: false,\n fill: false,\n justified: false,\n pills: false,\n small: false,\n tabs: false,\n tag: 'ul',\n underline: false,\n vertical: false,\n})\nconst props = useDefaults(_props, 'BNav')\ndefineSlots<BNavSlots>()\n\nconst alignment = useAlignment(() => props.align)\n\nconst computedClasses = computed(() => ({\n 'nav-tabs': props.tabs,\n 'nav-pills': props.pills && !props.tabs,\n 'card-header-tabs': !props.vertical && props.cardHeader && props.tabs,\n 'card-header-pills': !props.vertical && props.cardHeader && props.pills && !props.tabs,\n 'flex-column': props.vertical,\n 'nav-fill': !props.vertical && props.fill,\n 'nav-justified': !props.vertical && props.justified,\n [alignment.value]: !props.vertical && props.align !== undefined,\n 'small': props.small,\n 'nav-underline': props.underline,\n}))\n</script>\n","<template>\n <li :class=\"liClasses\" v-bind=\"wrapperAttrs\">\n <BForm\n v-bind=\"processedAttrs.formAttrs\"\n :id=\"props.id\"\n :floating=\"props.floating\"\n :role=\"props.role\"\n :novalidate=\"props.novalidate\"\n :validated=\"props.validated\"\n class=\"d-flex\"\n :class=\"props.formClass\"\n @submit.prevent=\"submitted\"\n >\n <slot />\n </BForm>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BForm from '../BForm/BForm.vue'\nimport type {BNavFormEmits, BNavFormProps, BNavFormSlots} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BNavFormProps>(), {\n role: undefined,\n wrapperAttrs: undefined,\n formClass: undefined,\n // BForm props\n floating: undefined,\n id: undefined,\n novalidate: undefined,\n validated: undefined,\n // End BForm props\n})\nconst props = useDefaults(_props, 'BNavForm')\nconst emit = defineEmits<BNavFormEmits>()\ndefineSlots<BNavFormSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...formAttrs} = attrs\n return {wrapperClass, formAttrs}\n})\n\nconst submitted = (e: Readonly<Event>) => {\n emit('submit', e)\n}\n\nconst liClasses = computed(() => [\n 'd-flex',\n 'flex-row',\n 'align-items-center',\n 'flex-wrap',\n processedAttrs.value.wrapperClass,\n])\n</script>\n","<template>\n <li :class=\"liClasses\" v-bind=\"wrapperAttrs\">\n <BForm\n v-bind=\"processedAttrs.formAttrs\"\n :id=\"props.id\"\n :floating=\"props.floating\"\n :role=\"props.role\"\n :novalidate=\"props.novalidate\"\n :validated=\"props.validated\"\n class=\"d-flex\"\n :class=\"props.formClass\"\n @submit.prevent=\"submitted\"\n >\n <slot />\n </BForm>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed, useAttrs} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport BForm from '../BForm/BForm.vue'\nimport type {BNavFormEmits, BNavFormProps, BNavFormSlots} from '../../types'\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<BNavFormProps>(), {\n role: undefined,\n wrapperAttrs: undefined,\n formClass: undefined,\n // BForm props\n floating: undefined,\n id: undefined,\n novalidate: undefined,\n validated: undefined,\n // End BForm props\n})\nconst props = useDefaults(_props, 'BNavForm')\nconst emit = defineEmits<BNavFormEmits>()\ndefineSlots<BNavFormSlots>()\nconst attrs = useAttrs()\n\nconst processedAttrs = computed(() => {\n const {class: wrapperClass, ...formAttrs} = attrs\n return {wrapperClass, formAttrs}\n})\n\nconst submitted = (e: Readonly<Event>) => {\n emit('submit', e)\n}\n\nconst liClasses = computed(() => [\n 'd-flex',\n 'flex-row',\n 'align-items-center',\n 'flex-wrap',\n processedAttrs.value.wrapperClass,\n])\n</script>\n","<template>\n <li class=\"nav-item\">\n <BLink\n class=\"nav-link\"\n :class=\"linkClass\"\n :tabindex=\"props.disabled ? -1 : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n v-bind=\"{...computedLinkProps, ...linkAttrs}\"\n @click=\"emit('click', $event)\"\n >\n <slot />\n </BLink>\n <slot name=\"after\" />\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport BLink from '../BLink/BLink.vue'\nimport {pick} from '../../utils/object'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BNavItemEmits, BNavItemProps, BNavItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavItemProps>(), {\n // Link props\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: 'router-link-exact-active active',\n href: undefined,\n icon: undefined,\n linkAttrs: undefined,\n linkClass: undefined,\n noPrefetch: undefined,\n noRel: undefined,\n opacity: undefined,\n opacityHover: undefined,\n prefetch: undefined,\n prefetchedClass: undefined,\n prefetchOn: undefined,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n stretched: false,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BNavItem')\nconst emit = defineEmits<BNavItemEmits>()\ndefineSlots<BNavItemSlots>()\n\nconst computedLinkProps = computed(() =>\n pick(props, [\n 'active',\n 'activeClass',\n 'disabled',\n 'exactActiveClass',\n 'href',\n 'icon',\n 'noRel',\n 'noPrefetch',\n 'opacity',\n 'opacityHover',\n 'prefetch',\n 'prefetchedClass',\n 'prefetchOn',\n 'rel',\n 'replace',\n 'routerComponentName',\n 'stretched',\n 'target',\n 'to',\n 'underlineOffset',\n 'underlineOffsetHover',\n 'underlineOpacity',\n 'underlineOpacityHover',\n 'underlineVariant',\n 'variant',\n ])\n)\n</script>\n","<template>\n <li class=\"nav-item\">\n <BLink\n class=\"nav-link\"\n :class=\"linkClass\"\n :tabindex=\"props.disabled ? -1 : undefined\"\n :aria-disabled=\"props.disabled ? true : undefined\"\n v-bind=\"{...computedLinkProps, ...linkAttrs}\"\n @click=\"emit('click', $event)\"\n >\n <slot />\n </BLink>\n <slot name=\"after\" />\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {computed} from 'vue'\nimport BLink from '../BLink/BLink.vue'\nimport {pick} from '../../utils/object'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BNavItemEmits, BNavItemProps, BNavItemSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<BNavItemProps>(), {\n // Link props\n active: undefined,\n activeClass: undefined,\n disabled: undefined,\n exactActiveClass: 'router-link-exact-active active',\n href: undefined,\n icon: undefined,\n linkAttrs: undefined,\n linkClass: undefined,\n noPrefetch: undefined,\n noRel: undefined,\n opacity: undefined,\n opacityHover: undefined,\n prefetch: undefined,\n prefetchedClass: undefined,\n prefetchOn: undefined,\n rel: undefined,\n replace: undefined,\n routerComponentName: undefined,\n stretched: false,\n target: undefined,\n to: undefined,\n underlineOffset: undefined,\n underlineOffsetHover: undefined,\n underlineOpacity: undefined,\n underlineOpacityHover: undefined,\n underlineVariant: undefined,\n variant: undefined,\n // End link props\n})\nconst props = useDefaults(_props, 'BNavItem')\nconst emit = defineEmits<BNavItemEmits>()\ndefineSlots<BNavItemSlots>()\n\nconst computedLinkProps = computed(() =>\n pick(props, [\n 'active',\n 'activeClass',\n 'disabled',\n 'exactActiveClass',\n 'href',\n 'icon',\n 'noRel',\n 'noPrefetch',\n 'opacity',\n 'opacityHover',\n 'prefetch',\n 'prefetchedClass',\n 'prefetchOn',\n 'rel',\n 'replace',\n 'routerComponentName',\n 'stretched',\n 'target',\n 'to',\n 'underlineOffset',\n 'underlineOffsetHover',\n 'underlineOpacity',\n 'underlineOpacityHover',\n 'underlineVariant',\n 'variant',\n ])\n)\n</script>\n","<template>\n <li class=\"nav-item dropdown\">\n <BDropdown\n ref=\"_dropdown\"\n v-bind=\"props\"\n v-model=\"modelValue\"\n is-nav\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n @split-click=\"emit('split-click', $event)\"\n >\n <template #button-content>\n <slot name=\"button-content\" />\n </template>\n <template #toggle-text>\n <slot name=\"toggle-text\" />\n </template>\n <template #default>\n <slot :hide=\"hide\" :show=\"show\" />\n </template>\n </BDropdown>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {useTemplateRef} from 'vue'\nimport BDropdown from '../BDropdown/BDropdown.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BDropdownEmits, BDropdownProps, BNavItemDropdownSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n block: false,\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: true,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n role: 'menu',\n size: undefined,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n splitVariant: undefined,\n placement: undefined,\n noWrapper: undefined,\n wrapperClass: undefined,\n strategy: 'absolute',\n text: undefined,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n variant: 'link',\n})\nconst props = useDefaults(_props, 'BNavItemDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BNavItemDropdownSlots>()\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst dropdown = useTemplateRef('_dropdown')\n\nconst hide = () => {\n dropdown.value?.hide()\n}\nconst show = () => {\n dropdown.value?.show()\n}\nconst toggle = () => {\n dropdown.value?.toggle()\n}\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n</script>\n","<template>\n <li class=\"nav-item dropdown\">\n <BDropdown\n ref=\"_dropdown\"\n v-bind=\"props\"\n v-model=\"modelValue\"\n is-nav\n @show=\"emit('show', $event)\"\n @shown=\"emit('shown', $event)\"\n @hide=\"emit('hide', $event)\"\n @hidden=\"emit('hidden', $event)\"\n @hide-prevented=\"emit('hide-prevented', $event)\"\n @show-prevented=\"emit('show-prevented', $event)\"\n @toggle-prevented=\"emit('toggle-prevented', $event)\"\n @toggle=\"emit('toggle', $event)\"\n @split-click=\"emit('split-click', $event)\"\n >\n <template #button-content>\n <slot name=\"button-content\" />\n </template>\n <template #toggle-text>\n <slot name=\"toggle-text\" />\n </template>\n <template #default>\n <slot :hide=\"hide\" :show=\"show\" />\n </template>\n </BDropdown>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport {useTemplateRef} from 'vue'\nimport BDropdown from '../BDropdown/BDropdown.vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {BDropdownEmits, BDropdownProps, BNavItemDropdownSlots} from '../../types'\n\nconst _props = withDefaults(defineProps<Omit<BDropdownProps, 'modelValue'>>(), {\n ariaLabel: undefined,\n autoClose: true,\n block: false,\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: true,\n lazy: false,\n menuClass: undefined,\n noCaret: false,\n noFlip: false,\n noShift: false,\n noSize: false,\n offset: 0,\n role: 'menu',\n size: undefined,\n split: false,\n splitButtonType: 'button',\n splitClass: undefined,\n splitDisabled: undefined,\n splitHref: undefined,\n splitTo: undefined,\n splitVariant: undefined,\n placement: undefined,\n noWrapper: undefined,\n wrapperClass: undefined,\n strategy: 'absolute',\n text: undefined,\n toggleAttrs: undefined,\n toggleClass: undefined,\n toggleText: 'Toggle dropdown',\n variant: 'link',\n})\nconst props = useDefaults(_props, 'BNavItemDropdown')\nconst emit = defineEmits<BDropdownEmits>()\ndefineSlots<BNavItemDropdownSlots>()\n\nconst modelValue = defineModel<Exclude<BDropdownProps['modelValue'], undefined>>({default: false})\n\nconst dropdown = useTemplateRef('_dropdown')\n\nconst hide = () => {\n dropdown.value?.hide()\n}\nconst show = () => {\n dropdown.value?.show()\n}\nconst toggle = () => {\n dropdown.value?.toggle()\n}\n\ndefineExpose({\n hide,\n show,\n toggle,\n})\n</script>\n","<template>\n <li class=\"navbar-text\">\n <slot>\n {{ props.text }}\n </slot>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BNavTextProps, BNavTextSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BNavTextProps>(), {text: undefined})\nconst props = useDefaults(_props, 'BNavText')\ndefineSlots<BNavTextSlots>()\n</script>\n","<template>\n <li class=\"navbar-text\">\n <slot>\n {{ props.text }}\n </slot>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport type {BNavTextProps, BNavTextSlots} from '../../types'\nimport {useDefaults} from '../../composables/useDefaults'\n\nconst _props = withDefaults(defineProps<BNavTextProps>(), {text: undefined})\nconst props = useDefaults(_props, 'BNavText')\ndefineSlots<BNavTextSlots>()\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBA,MAAM,QAAQ,YAAY,SAAQ,MAAM;EAGxC,MAAM,YAAY,mBAAmB,MAAM,KAAK;EAEhD,MAAM,kBAAkB,gBAAgB;GACtC,YAAY,MAAM;GAClB,aAAa,MAAM,SAAS,CAAC,MAAM;GACnC,oBAAoB,CAAC,MAAM,YAAY,MAAM,cAAc,MAAM;GACjE,qBAAqB,CAAC,MAAM,YAAY,MAAM,cAAc,MAAM,SAAS,CAAC,MAAM;GAClF,eAAe,MAAM;GACrB,YAAY,CAAC,MAAM,YAAY,M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akpoi
2
2
  import { o as isEmptySlot } from "./dom-BdUQrX99.js";
3
3
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
4
4
  import { t as useId$1 } from "./useId-Fh-Arhb7.js";
5
- import { t as useShowHide } from "./useShowHide-C95Y9EKL.js";
5
+ import { t as useShowHide } from "./useShowHide-B6RQbFDt.js";
6
6
  import { t as BCloseButton_default } from "./BCloseButton-B3-IdpNp.js";
7
7
  import { t as BButton_default } from "./BButton-KZu5jczf.js";
8
8
  import { t as ConditionalTeleport_default } from "./ConditionalTeleport-BCKPLEun.js";
@@ -328,4 +328,4 @@ var BOffcanvas_default = /* @__PURE__ */ defineComponent({
328
328
  //#endregion
329
329
  export { BOffcanvas_default as t };
330
330
 
331
- //# sourceMappingURL=BOffcanvas-BndaBJoP.js.map
331
+ //# sourceMappingURL=BOffcanvas-DfR32-ZP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BOffcanvas-BndaBJoP.js","names":["$attrs"],"sources":["../src/components/BOffcanvas/BOffcanvas.vue","../src/components/BOffcanvas/BOffcanvas.vue"],"sourcesContent":["<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n }\n)\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerThanBreakpoint = breakpoints.smaller(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerThanBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerThanBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerThanBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</script>\n","<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n }\n)\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerThanBreakpoint = breakpoints.smaller(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerThanBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerThanBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerThanBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</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KAAA,CAAK,CAAC,kBAA6B,mBAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;IA+DrG,GAAA,IAAA,CAAA,QAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,CAAA,MAAA,KAAA,CAAK,CAAC,aAAnB,WAYO,KAAA,QAAA,YAAA,eAAA,mBAZgD,YAAA,KAAW,CAAA,SAY3D,CAXa,MAAA,iBAAA,KAAlB,UAAA,GAAA,YAUa,YAAA,eAAA,WAAA,EAAA,KAAA,EAAA,GAVgC,MAAA,uBAAA,CAAuB,CAAA,GAAA;KAClE,SAAA,cAQE,CARF,eAAA,mBAQE,OAAA;MANA,OAAK,eAAA,CAAC,sBAAoB;OACG,MAAA,CAAA,MAAA,mBAAA;OAAuC,MAAA,MAAA,eAAA,KAAmB,MAAA,mBAAA;;MAItF,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,IAAA,CAAI,CAAA,UAAA;KANJ,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA,OAAA,aAAA,KAAY,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"BOffcanvas-DfR32-ZP.js","names":["$attrs"],"sources":["../src/components/BOffcanvas/BOffcanvas.vue","../src/components/BOffcanvas/BOffcanvas.vue"],"sourcesContent":["<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n }\n)\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerThanBreakpoint = breakpoints.smaller(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerThanBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerThanBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerThanBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</script>\n","<template>\n <ConditionalTeleport\n :to=\"props.teleportTo\"\n :disabled=\"props.teleportDisabled || isOpenByBreakpoint\"\n >\n <Transition\n v-if=\"renderRef || contentShowing || isOpenByBreakpoint\"\n v-bind=\"transitionProps\"\n :appear=\"modelValue || props.visible\"\n >\n <div\n v-show=\"\n (showRef && ((backdropReady && props.backdropFirst) || !props.backdropFirst)) ||\n isOpenByBreakpoint\n \"\n :id=\"computedId\"\n ref=\"_element\"\n aria-modal=\"true\"\n role=\"dialog\"\n :class=\"computedClasses\"\n :style=\"computedStyles\"\n tabindex=\"-1\"\n :aria-labelledby=\"`${computedId}-offcanvas-label`\"\n data-bs-backdrop=\"false\"\n v-bind=\"$attrs\"\n >\n <template v-if=\"contentShowing || isOpenByBreakpoint\">\n <div\n v-if=\"!props.noHeader\"\n class=\"offcanvas-header\"\n :class=\"props.headerClass\"\n v-bind=\"props.headerAttrs\"\n >\n <slot name=\"header\" v-bind=\"sharedSlots\">\n <h5 :id=\"`${computedId}-offcanvas-label`\" class=\"offcanvas-title\">\n <slot name=\"title\" v-bind=\"sharedSlots\">\n {{ props.title }}\n </slot>\n </h5>\n <template v-if=\"!props.noHeaderClose\">\n <BButton\n v-if=\"hasHeaderCloseSlot\"\n ref=\"_close\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n >\n <slot name=\"header-close\" v-bind=\"sharedSlots\" />\n </BButton>\n <BCloseButton\n v-else\n ref=\"_close\"\n :aria-label=\"props.headerCloseLabel\"\n v-bind=\"headerCloseAttrs\"\n @click=\"hide('close')\"\n />\n </template>\n </slot>\n </div>\n <div class=\"offcanvas-body\" :class=\"props.bodyClass\" v-bind=\"props.bodyAttrs\">\n <slot v-bind=\"sharedSlots\" />\n </div>\n <div v-if=\"hasFooterSlot\" :class=\"props.footerClass\">\n <slot name=\"footer\" v-bind=\"sharedSlots\" />\n </div>\n </template>\n <div\n v-if=\"needsFallback\"\n ref=\"_fallbackFocusElement\"\n :class=\"fallbackClassSelector\"\n tabindex=\"0\"\n style=\"width: 0; height: 0; overflow: hidden\"\n />\n </div>\n </Transition>\n <slot v-if=\"!props.noBackdrop\" name=\"backdrop\" v-bind=\"sharedSlots\">\n <Transition v-if=\"renderBackdropRef\" v-bind=\"backdropTransitionProps\">\n <div\n v-show=\"showBackdrop\"\n class=\"offcanvas-backdrop\"\n :class=\"{\n fade: !computedNoAnimation,\n show: backdropVisible || computedNoAnimation,\n }\"\n @click=\"hide('backdrop')\"\n />\n </Transition>\n </slot>\n </ConditionalTeleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {breakpointsBootstrapV5, onKeyStroke, unrefElement, useBreakpoints} from '@vueuse/core'\nimport {useActivatedFocusTrap} from '../../composables/useActivatedFocusTrap'\nimport {computed, type EmitFn, nextTick, onMounted, ref, useTemplateRef, watch} from 'vue'\nimport {useDefaults} from '../../composables/useDefaults'\nimport {useId} from '../../composables/useId'\nimport type {\n BOffcanvasEmits,\n BOffcanvasProps,\n BOffcanvasSlots,\n BOffcanvasSlotsData,\n} from '../../types'\nimport BButton from '../BButton/BButton.vue'\nimport BCloseButton from '../BButton/BCloseButton.vue'\nimport ConditionalTeleport from '../ConditionalTeleport.vue'\nimport {useSafeScrollLock} from '../../composables/useSafeScrollLock'\nimport {isEmptySlot} from '../../utils/dom'\nimport {useShowHide} from '../../composables/useShowHide'\nimport {getElement} from '../../utils/getElement'\n\n// TODO once the responsive stuff may be implemented correctly,\n// What needs to occur is a fixing of the \"body scrolling\".\n// If the offcanvas is on the screen on a large screen, body scrolling is not disabled\n// Even though the modelValue is true\n// When it's a small screen and close, it works, as normal,\n// But then when it opens up on a small screen, it must disable again\n// This is implemented on Layout.vue, but is not officially supported.\n\ndefineOptions({\n inheritAttrs: false,\n})\n\nconst _props = withDefaults(defineProps<Omit<BOffcanvasProps, 'modelValue'>>(), {\n backdropFirst: false,\n bodyAttrs: undefined,\n bodyClass: undefined,\n bodyScrolling: false,\n focus: undefined,\n footerClass: undefined,\n headerAttrs: undefined,\n headerClass: undefined,\n headerCloseClass: undefined,\n headerCloseLabel: 'Close',\n headerCloseVariant: 'secondary',\n id: undefined,\n initialAnimation: false,\n lazy: false,\n noAnimation: false,\n noBackdrop: false,\n noCloseOnBackdrop: false,\n noCloseOnEsc: false,\n noTrap: false,\n noHeader: false,\n noHeaderClose: false,\n unmountLazy: false,\n placement: 'start',\n shadow: false,\n teleportDisabled: false,\n teleportTo: 'body',\n title: undefined,\n show: false,\n width: undefined,\n visible: false,\n})\nconst props = useDefaults(_props, 'BOffcanvas')\nconst emit = defineEmits<BOffcanvasEmits>()\nconst slots = defineSlots<BOffcanvasSlots>()\n\nconst modelValue = defineModel<Exclude<BOffcanvasProps['modelValue'], undefined>>({\n default: false,\n})\n\nconst computedId = useId(() => props.id, 'offcanvas')\n\nconst element = useTemplateRef<HTMLElement | null>('_element')\nconst fallbackFocusElement = useTemplateRef<HTMLElement | null>('_fallbackFocusElement')\nconst closeButton = useTemplateRef<HTMLElement | null>('_close')\n\nconst pickFocusItem = () => {\n if (props.focus && typeof props.focus !== 'boolean') {\n if (props.focus === 'close') {\n return closeButton\n }\n return getElement(props.focus, element.value ?? undefined)\n }\n return element\n}\n\nconst onAfterEnter = () => {\n nextTick(() => {\n if (props.focus !== false && !isOpenByBreakpoint.value && props.noTrap) {\n const focusElement = unrefElement(pickFocusItem())\n focusElement?.focus()\n }\n })\n}\n\nconst {\n showRef,\n renderRef,\n renderBackdropRef,\n hide,\n show,\n toggle,\n computedNoAnimation,\n contentShowing,\n transitionProps,\n backdropReady,\n backdropTransitionProps,\n backdropVisible,\n isVisible,\n buildTriggerableEvent,\n isLeaving,\n trapActive,\n setLocalNoAnimation,\n} = useShowHide(\n {modelValue, props, emit: emit as EmitFn, element, id: computedId},\n {\n transitionProps: {\n onAfterEnter,\n enterToClass: 'showing',\n leaveToClass: 'hiding',\n enterActiveClass: '',\n leaveActiveClass: '',\n enterFromClass: '',\n leaveFromClass: '',\n },\n }\n)\n\nconst breakpoints = useBreakpoints(breakpointsBootstrapV5)\nconst smallerThanBreakpoint = breakpoints.smaller(() => props.responsive ?? 'xs')\n// Initialize with SSR-safe default value to prevent hydration mismatches\n// The actual breakpoint evaluation is deferred to onMounted (client-side only)\nconst isOpenByBreakpoint = ref(false)\n\nonMounted(() => {\n if (props.responsive !== undefined) {\n // Update the breakpoint state after mounting (client-side only)\n isOpenByBreakpoint.value = !smallerThanBreakpoint.value\n emit('breakpoint', buildTriggerableEvent('breakpoint'), isOpenByBreakpoint.value)\n }\n})\n\nuseSafeScrollLock(showRef, () => props.bodyScrolling || isOpenByBreakpoint.value)\n\nonKeyStroke(\n 'Escape',\n () => {\n hide('esc')\n },\n {target: element, passive: true}\n)\n\nconst fallbackClassSelector = 'offcanvas-fallback-focus'\n\nconst {needsFallback} = useActivatedFocusTrap({\n element,\n isActive: trapActive,\n noTrap: () => props.noTrap || isOpenByBreakpoint.value,\n fallbackFocus: {\n classSelector: fallbackClassSelector,\n ref: fallbackFocusElement,\n },\n focus: () =>\n props.focus === false || isOpenByBreakpoint.value\n ? false\n : (unrefElement(pickFocusItem()) ?? undefined),\n})\n\nconst showBackdrop = computed(\n () =>\n (props.responsive === undefined || !isOpenByBreakpoint.value) &&\n !props.noBackdrop &&\n (showRef.value === true ||\n (isLeaving.value && props.backdropFirst && !computedNoAnimation.value))\n)\n\nconst hasHeaderCloseSlot = computed(() => !isEmptySlot(slots['header-close']))\nconst headerCloseClasses = computed(() => [\n {'text-reset': !hasHeaderCloseSlot.value},\n props.headerCloseClass,\n])\nconst headerCloseAttrs = computed(() => ({\n variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,\n class: headerCloseClasses.value,\n}))\n\nconst hasFooterSlot = computed(() => !isEmptySlot(slots.footer))\nconst computedClasses = computed(() => [\n props.responsive === undefined ? 'offcanvas' : `offcanvas-${props.responsive}`,\n `offcanvas-${props.placement}`,\n {\n 'show': isVisible.value,\n 'hiding': isLeaving.value && !isVisible.value,\n [`shadow-${props.shadow}`]: !!props.shadow,\n 'no-transition': computedNoAnimation.value,\n },\n])\n\nconst computedStyles = computed(() => ({\n width: props.width,\n}))\n\nconst sharedSlots = computed<BOffcanvasSlotsData>(() => ({\n visible: isVisible.value,\n placement: props.placement,\n hide,\n show,\n toggle,\n id: computedId.value,\n active: trapActive.value,\n}))\n\nwatch(smallerThanBreakpoint, (newValue) => {\n if (props.responsive === undefined) return\n if (newValue === true) {\n const opened = false\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('hide', buildTriggerableEvent('hide'))\n } else {\n const opened = true\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n emit('show', buildTriggerableEvent('show'))\n }\n})\n\nwatch(\n () => props.responsive,\n (newValue) => {\n if (newValue === undefined) {\n isOpenByBreakpoint.value = false\n return\n }\n const opened = !smallerThanBreakpoint.value\n if (opened === isOpenByBreakpoint.value) return\n setLocalNoAnimation(true)\n requestAnimationFrame(() => {\n isOpenByBreakpoint.value = opened\n })\n emit('breakpoint', buildTriggerableEvent('breakpoint'), opened)\n if (opened) {\n emit('show', buildTriggerableEvent('show'))\n } else {\n emit('hide', buildTriggerableEvent('hide'))\n }\n }\n)\n\ndefineExpose({\n hide,\n show,\n toggle,\n isOpenByBreakpoint,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;AAoPA,IAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA1F9B,MAAM,QAAQ,YAAY,SAAQ,YAAY;EAC9C,MAAM,OAAO;EACb,MAAM,QAAQ,SAAA;EAEd,MAAM,aAAa,SAA8D,SAAA,YAEhF;EAED,MAAM,aAAa,cAAY,MAAM,IAAI,WAAW;EAEpD,MAAM,UAAU,eAAmC,UAAU;EAC7D,MAAM,uBAAuB,eAAmC,uBAAuB;EACvF,MAAM,cAAc,eAAmC,QAAQ;EAE/D,MAAM,sBAAsB;GAC1B,IAAI,MAAM,SAAS,OAAO,MAAM,UAAU,WAAW;IACnD,IAAI,MAAM,UAAU,SAClB,OAAO;IAET,OAAO,WAAW,MAAM,OAAO,QAAQ,SAAS,KAAA,CAAS;GAC3D;GACA,OAAO;EACT;EAEA,MAAM,qBAAqB;GACzB,eAAe;IACb,IAAI,MAAM,UAAU,SAAS,CAAC,mBAAmB,SAAS,MAAM,QAE9D,aADkC,cAAc,CAChD,CAAA,EAAc,MAAM;GAExB,CAAC;EACH;EAEA,MAAM,EACJ,SACA,WACA,mBACA,MACA,MACA,QACA,qBACA,gBACA,iBACA,eACA,yBACA,iBACA,WACA,uBACA,WACA,YACA,wBACE,YACF;GAAC;GAAY;GAAa;GAAgB;GAAS,IAAI;EAAU,GACjE,EACE,iBAAiB;GACf;GACA,cAAc;GACd,cAAc;GACd,kBAAkB;GAClB,kBAAkB;GAClB,gBAAgB;GAChB,gBAAgB;EAClB,EACF,CACF;EAGA,MAAM,wBADc,eAAe,sBACL,CAAA,CAAY,cAAc,MAA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AA,UAAA,GAAA,CAAA,CAAA,OAAA,MAAA,OAAA,MAAa,MAAA,aAAA,KAAiB,MAAA,KAAA,CAAK,CAAC,iBAAa,CAAM,MAAA,KAAA,CAAK,CAAC,kBAA6B,mBAAA,KAAA,CAAA,CAAA,CAAA,CAAA;;IA+DrG,GAAA,IAAA,CAAA,QAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,CAAA,MAAA,KAAA,CAAK,CAAC,aAAnB,WAYO,KAAA,QAAA,YAAA,eAAA,mBAZgD,YAAA,KAAW,CAAA,SAY3D,CAXa,MAAA,iBAAA,KAAlB,UAAA,GAAA,YAUa,YAAA,eAAA,WAAA,EAAA,KAAA,EAAA,GAVgC,MAAA,uBAAA,CAAuB,CAAA,GAAA;KAClE,SAAA,cAQE,CARF,eAAA,mBAQE,OAAA;MANA,OAAK,eAAA,CAAC,sBAAoB;OACG,MAAA,CAAA,MAAA,mBAAA;OAAuC,MAAA,MAAA,eAAA,KAAmB,MAAA,mBAAA;;MAItF,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,MAAA,IAAA,CAAI,CAAA,UAAA;KANJ,GAAA,MAAA,CAAA,GAAA,CAAA,CAAA,OAAA,aAAA,KAAY,CAAA,CAAA,CAAA,CAAA"}
@@ -1,7 +1,7 @@
1
+ import { n as BvEvent } from "./classes-BEWWGbj5.js";
1
2
  import { S as useToNumber } from "./dist-DKc2ivHS.js";
2
3
  import { n as getActiveElement } from "./dom-BdUQrX99.js";
3
4
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
4
- import { n as BvEvent } from "./classes-BEWWGbj5.js";
5
5
  import "./constants-Cap5sNf8.js";
6
6
  import { t as useAlignment } from "./useAlignment-DaP-psIh.js";
7
7
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, openBlock, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx } from "vue";
@@ -439,4 +439,4 @@ var BPagination_default = /* @__PURE__ */ defineComponent({
439
439
  //#endregion
440
440
  export { BPagination_default as t };
441
441
 
442
- //# sourceMappingURL=BPagination-D_Hfk6OF.js.map
442
+ //# sourceMappingURL=BPagination-CfrsVgDp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BPagination-D_Hfk6OF.js","names":[],"sources":["../src/components/BPagination/BPagination.vue","../src/components/BPagination/BPagination.vue"],"sourcesContent":["<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :[dataDisplayNameCustomAttribute]=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component\n v-bind=\"page.button\"\n :is=\"page.button.is\"\n v-else-if=\"'button' in page\"\n @click=\"page.clickHandler\"\n >\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active ?? false\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {getActiveElement} from '../../utils/dom'\nimport {type BPaginationEmits, type BPaginationProps, type BPaginationSlots} from '../../types'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\nconst dataDisplayNameCustomAttribute = 'data-display-name'\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\nconst emit = defineEmits<BPaginationEmits>()\ndefineSlots<BPaginationSlots>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : String(page),\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = el && el.nodeType === Node.ELEMENT_NODE\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n .sort(\n (a, b) =>\n Number.parseInt(a.getAttribute(dataDisplayNameCustomAttribute) || '0') -\n Number.parseInt(b.getAttribute(dataDisplayNameCustomAttribute) || '0')\n )\n .map((page) => page.children[0])\n .filter((el) => {\n if (el?.getAttribute('display') === 'none' || el?.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el?.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n .map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n const button = buttons[index - 1]\n if (index > 0 && button !== undefined && !isDisabled(button)) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n const button = buttons[index + 1]\n if (index < buttons.length - 1 && button !== undefined && !isDisabled(button)) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n event.preventDefault()\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n event.preventDefault()\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n }\n\n return els\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the beginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to check that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAULT_PER_PAGE = 20\nconst DEFAULT_TOTAL_ROWS = 0\n</script>\n","<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :[dataDisplayNameCustomAttribute]=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component\n v-bind=\"page.button\"\n :is=\"page.button.is\"\n v-else-if=\"'button' in page\"\n @click=\"page.clickHandler\"\n >\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active ?? false\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {getActiveElement} from '../../utils/dom'\nimport {type BPaginationEmits, type BPaginationProps, type BPaginationSlots} from '../../types'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\nconst dataDisplayNameCustomAttribute = 'data-display-name'\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\nconst emit = defineEmits<BPaginationEmits>()\ndefineSlots<BPaginationSlots>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : String(page),\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = el && el.nodeType === Node.ELEMENT_NODE\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n .sort(\n (a, b) =>\n Number.parseInt(a.getAttribute(dataDisplayNameCustomAttribute) || '0') -\n Number.parseInt(b.getAttribute(dataDisplayNameCustomAttribute) || '0')\n )\n .map((page) => page.children[0])\n .filter((el) => {\n if (el?.getAttribute('display') === 'none' || el?.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el?.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n .map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n const button = buttons[index - 1]\n if (index > 0 && button !== undefined && !isDisabled(button)) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n const button = buttons[index + 1]\n if (index < buttons.length - 1 && button !== undefined && !isDisabled(button)) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n event.preventDefault()\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n event.preventDefault()\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n }\n\n return els\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the beginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to check that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAUL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,KAAA,CAAK,CAAC,gBAAY,KAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,KAMA,YAAA,QAHzB,UAAA,GAAA,YAgBY,wBAdL,KAAK,OAAO,EAAE,GAFrB,WAgBY;;;IAfF,GAAA,KAAK,QAAM,EAGlB,SAAO,KAAK,aAAA,CAAA,GAAA;KAEb,SAAA,cASO,CATP,WASO,KAAA,QARE,KAAK,KAAK,MAAI;MACpB,UAAU,KAAK,KAAK;MACpB,MAAM,KAAK,KAAK;MAChB,OAAO,KAAK,KAAK;MACjB,QAAQ,KAAK,KAAK,UAAM;MACxB,SAAS,KAAK,KAAK;KANtB,SASO,CADF,gBAAA,gBAAA,KAAK,KAAK,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"BPagination-CfrsVgDp.js","names":[],"sources":["../src/components/BPagination/BPagination.vue","../src/components/BPagination/BPagination.vue"],"sourcesContent":["<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :[dataDisplayNameCustomAttribute]=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component\n v-bind=\"page.button\"\n :is=\"page.button.is\"\n v-else-if=\"'button' in page\"\n @click=\"page.clickHandler\"\n >\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active ?? false\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {getActiveElement} from '../../utils/dom'\nimport {type BPaginationEmits, type BPaginationProps, type BPaginationSlots} from '../../types'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\nconst dataDisplayNameCustomAttribute = 'data-display-name'\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\nconst emit = defineEmits<BPaginationEmits>()\ndefineSlots<BPaginationSlots>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : String(page),\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = el && el.nodeType === Node.ELEMENT_NODE\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n .sort(\n (a, b) =>\n Number.parseInt(a.getAttribute(dataDisplayNameCustomAttribute) || '0') -\n Number.parseInt(b.getAttribute(dataDisplayNameCustomAttribute) || '0')\n )\n .map((page) => page.children[0])\n .filter((el) => {\n if (el?.getAttribute('display') === 'none' || el?.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el?.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n .map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n const button = buttons[index - 1]\n if (index > 0 && button !== undefined && !isDisabled(button)) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n const button = buttons[index + 1]\n if (index < buttons.length - 1 && button !== undefined && !isDisabled(button)) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n event.preventDefault()\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n event.preventDefault()\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n }\n\n return els\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the beginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to check that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAULT_PER_PAGE = 20\nconst DEFAULT_TOTAL_ROWS = 0\n</script>\n","<template>\n <ul\n class=\"pagination\"\n :class=\"computedWrapperClasses\"\n role=\"menubar\"\n :aria-disabled=\"props.disabled\"\n :aria-label=\"props.ariaLabel || undefined\"\n @keydown=\"handleKeyNav\"\n >\n <li\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page.id}`\"\n v-bind=\"page.li\"\n ref=\"_pageElements\"\n :[dataDisplayNameCustomAttribute]=\"index\"\n >\n <span\n v-if=\"page.id === FIRST_ELLIPSIS || page.id === LAST_ELLIPSIS\"\n v-bind=\"ellipsisProps.span\"\n >\n <slot name=\"ellipsis-text\">\n {{ props.ellipsisText || '...' }}\n </slot>\n </span>\n <component\n v-bind=\"page.button\"\n :is=\"page.button.is\"\n v-else-if=\"'button' in page\"\n @click=\"page.clickHandler\"\n >\n <slot\n :name=\"page.text.name\"\n :disabled=\"page.text.disabled\"\n :page=\"page.text.page\"\n :index=\"page.text.index\"\n :active=\"page.text.active ?? false\"\n :content=\"page.text.value\"\n >\n {{ page.text.value }}\n </slot>\n </component>\n </li>\n </ul>\n</template>\n\n<script setup lang=\"ts\">\nimport {BvEvent} from '../../utils'\nimport {computed, nextTick, useTemplateRef, watch} from 'vue'\nimport {useAlignment} from '../../composables/useAlignment'\nimport {useToNumber} from '@vueuse/core'\nimport {useDefaults} from '../../composables/useDefaults'\nimport type {ClassValue} from '../../types/AnyValuedAttributes'\nimport {CODE_DOWN, CODE_LEFT, CODE_RIGHT, CODE_UP} from '../../utils/constants'\nimport {getActiveElement} from '../../utils/dom'\nimport {type BPaginationEmits, type BPaginationProps, type BPaginationSlots} from '../../types'\n\n// Threshold of limit size when we start/stop showing ellipsis\nconst ELLIPSIS_THRESHOLD = 3\n\nconst FIRST_BUTTON = -1\nconst PREV_BUTTON = -2\nconst NEXT_BUTTON = -3\nconst LAST_BUTTON = -4\nconst FIRST_ELLIPSIS = -5\nconst LAST_ELLIPSIS = -6\n\nconst dataDisplayNameCustomAttribute = 'data-display-name'\n\nconst _props = withDefaults(defineProps<Omit<BPaginationProps, 'modelValue'>>(), {\n align: 'start',\n ariaControls: undefined,\n ariaLabel: 'Pagination',\n disabled: false,\n ellipsisClass: undefined,\n ellipsisText: '\\u2026',\n firstClass: undefined,\n firstNumber: false,\n firstText: '\\u00AB',\n noEllipsis: false,\n noGotoEndButtons: false,\n labelFirstPage: 'Go to first page',\n labelLastPage: 'Go to last page',\n labelNextPage: 'Go to next page',\n labelPage: 'Go to page',\n labelPrevPage: 'Go to previous page',\n lastClass: undefined,\n lastNumber: false,\n lastText: '\\u00BB',\n limit: 5,\n nextClass: undefined,\n nextText: '\\u203A',\n pageClass: undefined,\n perPage: DEFAULT_PER_PAGE,\n pills: false,\n prevClass: undefined,\n prevText: '\\u2039',\n size: undefined,\n totalRows: DEFAULT_TOTAL_ROWS,\n})\nconst props = useDefaults(_props, 'BPagination')\nconst emit = defineEmits<BPaginationEmits>()\ndefineSlots<BPaginationSlots>()\n\nconst modelValue = defineModel<Exclude<BPaginationProps['modelValue'], undefined>>({\n default: 1,\n})\n\nconst pageElements = useTemplateRef('_pageElements')\n\nconst limitNumber = useToNumber(() => props.limit, {nanToZero: true, method: 'parseInt'})\nconst perPageNumber = useToNumber(() => props.perPage, {nanToZero: true, method: 'parseInt'})\nconst totalRowsNumber = useToNumber(() => props.totalRows, {nanToZero: true, method: 'parseInt'})\nconst modelValueNumber = useToNumber(modelValue, {nanToZero: true, method: 'parseInt'})\n\nconst perPageSanitized = computed(() => Math.max(perPageNumber.value || DEFAULT_PER_PAGE, 1))\nconst totalRowsSanitized = computed(() => Math.max(totalRowsNumber.value || DEFAULT_TOTAL_ROWS, 0))\n// Use Active to on page-item to denote active tab\nconst numberOfPages = computed(() => Math.ceil(totalRowsSanitized.value / perPageSanitized.value))\nconst computedFill = computed(() => props.align === 'fill')\n// This doesn't use the computedFill util because TS cannot infer that it would never be 'fill'\nconst justifyAlign = computed(() => (props.align === 'fill' ? 'start' : props.align))\n\nconst alignment = useAlignment(justifyAlign)\n\nconst isActivePage = (pageNumber: number) => pageNumber === computedModelValue.value\nconst getTabIndex = (num: number) => (props.disabled ? null : isActivePage(num) ? '0' : '-1')\n\nconst checkDisabled = (num: number) =>\n props.disabled ||\n isActivePage(num) ||\n computedModelValue.value < 1 ||\n // Check if the number is out of bounds\n num < 1 ||\n num > numberOfPages.value\n\nconst firstDisabled = computed(() => checkDisabled(1))\nconst prevDisabled = computed(() => checkDisabled(computedModelValue.value - 1))\nconst lastDisabled = computed(() => checkDisabled(numberOfPages.value))\nconst nextDisabled = computed(() => checkDisabled(computedModelValue.value + 1))\n\nconst getBaseButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n tabIndex,\n label,\n position,\n isActive,\n hidden,\n isSmHidden,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n tabIndex?: string\n label?: string\n position?: number\n isActive?: boolean\n hidden?: boolean\n isSmHidden?: boolean\n}) => ({\n li: {\n 'class': [\n 'page-item',\n {\n 'active': isActive,\n disabled,\n 'bv-d-sm-down-none': isSmHidden,\n 'flex-fill': computedFill.value,\n 'd-flex': computedFill.value && !disabled,\n },\n classVal,\n ],\n 'role': 'presentation',\n 'aria-hidden': hidden,\n },\n button: {\n 'is': disabled ? 'span' : 'button',\n 'class': ['page-link', 'text-center', {'flex-grow-1': !disabled && computedFill.value}],\n 'aria-label': label,\n 'aria-controls': props.ariaControls || undefined,\n 'aria-disabled': disabled ? true : undefined,\n 'aria-posinset': position,\n 'aria-setsize': position ? numberOfPages.value : undefined,\n 'role': 'menuitem',\n 'type': disabled ? undefined : 'button',\n 'tabindex': disabled ? undefined : tabIndex,\n },\n text: {\n name: slotName,\n active: isActive,\n value: textValue ?? page,\n page,\n disabled,\n index: page - 1,\n content: textValue ? undefined : String(page),\n },\n clickHandler: (e: Readonly<MouseEvent>) => pageClick(e, page),\n})\n\nconst getButtonProps = ({\n page,\n classVal,\n disabled,\n slotName,\n textValue,\n label,\n}: {\n page: number\n disabled: boolean\n classVal: ClassValue\n slotName: 'first-text' | 'prev-text' | 'next-text' | 'last-text' | 'page'\n textValue?: string\n label: string\n}) => getBaseButtonProps({page, classVal, disabled, slotName, textValue, label, tabIndex: '-1'})\n\nconst getPageButtonProps = (page: number, isSmHidden?: boolean) =>\n getBaseButtonProps({\n page,\n disabled: props.disabled,\n classVal: props.pageClass,\n slotName: 'page',\n label: props.labelPage ? `${props.labelPage} ${page}` : undefined,\n tabIndex: getTabIndex(page) ?? undefined,\n position: page,\n isActive: isActivePage(page),\n isSmHidden,\n })\n\nconst firstButtonProps = computed(() =>\n getButtonProps({\n page: 1,\n disabled: firstDisabled.value,\n classVal: props.firstClass,\n slotName: 'first-text',\n textValue: props.firstText,\n label: props.labelFirstPage,\n })\n)\nconst prevButtonProps = computed(() =>\n getButtonProps({\n page: Math.max(computedModelValue.value - 1, 1),\n disabled: prevDisabled.value,\n classVal: props.prevClass,\n slotName: 'prev-text',\n textValue: props.prevText,\n label: props.labelPrevPage,\n })\n)\nconst nextButtonProps = computed(() =>\n getButtonProps({\n page: Math.min(computedModelValue.value + 1, numberOfPages.value),\n disabled: nextDisabled.value,\n classVal: props.nextClass,\n slotName: 'next-text',\n textValue: props.nextText,\n label: props.labelNextPage,\n })\n)\nconst lastButtonProps = computed(() =>\n getButtonProps({\n page: numberOfPages.value,\n disabled: lastDisabled.value,\n classVal: props.lastClass,\n slotName: 'last-text',\n textValue: props.lastText,\n label: props.labelLastPage,\n })\n)\n\nconst ellipsisProps = computed(() => ({\n li: {\n class: [\n 'page-item',\n 'disabled',\n 'text-center',\n 'bv-d-sm-down-none',\n computedFill.value ? 'flex-fill' : '',\n props.ellipsisClass,\n ],\n role: 'separator',\n },\n span: {\n class: ['page-link'],\n },\n}))\n\nconst computedWrapperClasses = computed(() => [\n alignment.value,\n {\n [`pagination-${props.size}`]: props.size !== undefined,\n 'b-pagination-pills': props.pills,\n },\n])\n\nconst pagination = computed(() => ({\n pageSize: perPageSanitized.value,\n totalRows: totalRowsNumber.value,\n numberOfPages: numberOfPages.value,\n}))\n\nconst pageClick = (event: Readonly<MouseEvent>, pageNumber: number) => {\n if (pageNumber === computedModelValue.value) return\n const clickEvent = new BvEvent('page-click', {\n cancelable: true,\n target: event.target,\n })\n emit('page-click', clickEvent, pageNumber)\n\n if (clickEvent.defaultPrevented) return\n\n modelValue.value = pageNumber\n\n nextTick(() => {\n if (pageNumber === 1) {\n focusFirst()\n } else if (pageNumber === pagination.value.numberOfPages) {\n focusLast()\n }\n })\n // nextTick(() => {\n // if (isVisible(target) && un_element.contains(target)) {\n // attemptFocus(target)\n //} else {\n //this.focusCurrent()\n //}\n // })\n}\n\nconst isDisabled = (el: HTMLButtonElement) => {\n const isElement = el && el.nodeType === Node.ELEMENT_NODE\n const hasAttr = isElement ? el.hasAttribute('disabled') : null\n const hasClass = isElement && el.classList ? el.classList.contains('disabled') : false\n\n return !isElement || el.disabled || hasAttr || hasClass\n}\n\nconst getButtons = (): HTMLButtonElement[] =>\n [...(pageElements.value ?? [])]\n .sort(\n (a, b) =>\n Number.parseInt(a.getAttribute(dataDisplayNameCustomAttribute) || '0') -\n Number.parseInt(b.getAttribute(dataDisplayNameCustomAttribute) || '0')\n )\n .map((page) => page.children[0])\n .filter((el) => {\n if (el?.getAttribute('display') === 'none' || el?.tagName.toUpperCase() !== 'BUTTON') {\n return false\n }\n\n const bcr = el?.getBoundingClientRect()\n\n return !!(bcr && bcr.height > 0 && bcr.width > 0)\n })\n .map((el) => el as HTMLButtonElement)\n\nconst focusFirst = () => {\n nextTick(() => {\n const btn = getButtons().find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusPrev = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n\n const button = buttons[index - 1]\n if (index > 0 && button !== undefined && !isDisabled(button)) {\n buttons[index - 1]?.focus()\n }\n })\n}\n\nconst focusLast = () => {\n nextTick(() => {\n const btn = getButtons()\n .reverse()\n .find((el) => !isDisabled(el))\n btn?.focus()\n })\n}\n\nconst focusNext = () => {\n nextTick(() => {\n const buttons = getButtons()\n const index = buttons.indexOf(getActiveElement() as HTMLButtonElement)\n const button = buttons[index + 1]\n if (index < buttons.length - 1 && button !== undefined && !isDisabled(button)) {\n buttons[index + 1]?.focus()\n }\n })\n}\n\nconst handleKeyNav = (event: KeyboardEvent) => {\n const {code, shiftKey} = event\n if (code === CODE_LEFT || code === CODE_UP) {\n event.preventDefault()\n if (shiftKey) {\n focusFirst()\n } else {\n focusPrev()\n }\n } else if (code === CODE_RIGHT || code === CODE_DOWN) {\n event.preventDefault()\n if (shiftKey) {\n focusLast()\n } else {\n focusNext()\n }\n }\n}\n\nconst computedModelValue = computed(() => {\n const page = modelValueNumber.value || 1\n return page > numberOfPages.value ? numberOfPages.value : page < 1 ? 1 : page\n})\n\nwatch(pagination, (oldValue, newValue) => {\n if (newValue.pageSize !== oldValue.pageSize && newValue.totalRows === oldValue.totalRows) {\n // If the page size changes, reset to page 1\n modelValue.value = 1\n }\n})\n\nconst noFirstButton = computed(() => (props.noGotoEndButtons && !props.firstNumber ? 1 : 0))\nconst noLastButton = computed(() => (props.noGotoEndButtons && !props.lastNumber ? 1 : 0))\nconst showFirstButton = computed(() => (noFirstButton.value ? 0 : 1))\nconst showLastButton = computed(() => (noLastButton.value ? 0 : 1))\nconst firstPage = computed(() => (props.firstNumber ? 1 : 0))\nconst lastPage = computed(() => (props.lastNumber ? 1 : 0))\nconst halfLimit = computed(() => Math.floor(limitNumber.value / 2))\n\nconst pages = computed(() => {\n const {value} = computedModelValue\n\n const els = elements.value.map((p) => {\n switch (p) {\n case FIRST_BUTTON:\n return {id: p, ...firstButtonProps.value}\n case PREV_BUTTON:\n return {id: p, ...prevButtonProps.value}\n case NEXT_BUTTON:\n return {id: p, ...nextButtonProps.value}\n case LAST_BUTTON:\n return {id: p, ...lastButtonProps.value}\n case FIRST_ELLIPSIS:\n case LAST_ELLIPSIS:\n return {id: p, ...ellipsisProps.value}\n default:\n return {id: p, ...getPageButtonProps(p)}\n }\n })\n\n if (numberOfPages.value > 3) {\n if (value > numberOfPages.value - halfLimit.value - lastPage.value) {\n const idx = 2 + showFirstButton.value\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n\n if (value <= halfLimit.value + firstPage.value) {\n const idx = els.length - (3 + showLastButton.value)\n const el = els[idx]\n if (el !== undefined) {\n els[idx] = {id: el.id, ...getPageButtonProps(el.id, true)}\n }\n }\n }\n\n return els\n})\n\nconst elements = computed(() => {\n // The idea here is to create an array of all the buttons on the page control.\n // This way we can keep the invariants in one place and the template code just\n // iterates over the array.\n\n const pages = numberOfPages.value\n const {value} = computedModelValue\n const limit = limitNumber.value\n const noEllipsis = props.noEllipsis || limit <= ELLIPSIS_THRESHOLD\n\n // The first case is when all the page buttons fit on the control, this is\n // the simplest case and the only one that will create an array smaller than\n // Limit + 4 - noEndButtons * 2 (the [first, last,] prev, next buttons)\n\n if (pages < limit + firstPage.value + lastPage.value) {\n return [\n !firstPage.value && !noFirstButton.value ? FIRST_BUTTON : null,\n PREV_BUTTON,\n ...Array.from({length: pages}, (_, index) => index + 1),\n NEXT_BUTTON,\n !lastPage.value && !noLastButton.value ? LAST_BUTTON : null,\n ].filter((x) => x !== null) as number[]\n }\n\n // All the remaining cases result in an array that is exactly limit + 4 - noEndButtons * 2 in length, so create\n // the array upfront and set up the beginning and end buttons, then fill the rest for each case\n\n const buttons = Array.from({length: limit + 4 - (noFirstButton.value + noLastButton.value)})\n if (!noFirstButton.value) {\n if (!firstPage.value) {\n buttons[0] = FIRST_BUTTON\n buttons[1] = PREV_BUTTON\n } else {\n buttons[0] = PREV_BUTTON\n buttons[1] = 1\n }\n } else {\n buttons[0] = PREV_BUTTON\n }\n\n if (!noLastButton.value) {\n if (!lastPage.value) {\n buttons[buttons.length - 1] = LAST_BUTTON\n buttons[buttons.length - 2] = NEXT_BUTTON\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n buttons[buttons.length - 2] = pages\n }\n } else {\n buttons[buttons.length - 1] = NEXT_BUTTON\n }\n\n // The next case is where the page buttons start at the beginning, with\n // no ellipsis at the beginning, but one at the end\n\n if (value <= halfLimit.value + firstPage.value) {\n for (let index = 1; index <= limit; index++) {\n buttons[index + 1 - noFirstButton.value] = index + firstPage.value\n }\n\n if (!noEllipsis) {\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n // And then we have the case where the page buttons go up to the end, with no\n // ellipsis at the end, but one at the beginning\n\n if (value > pages - halfLimit.value - lastPage.value) {\n const start = pages - (limit - 1) - lastPage.value\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n }\n }\n\n // Finally we have the case where we have ellipsis at both ends\n if (!buttons[2]) {\n // Is there a more elegant way to check that we're in the final case?\n const start = value - Math.floor(limit / 2)\n for (let index = 0; index < limit; index++) {\n buttons[index + 2 - noFirstButton.value] = start + index\n }\n\n if (!noEllipsis) {\n buttons[1 + showFirstButton.value] = FIRST_ELLIPSIS\n buttons[buttons.length - (2 + showLastButton.value)] = LAST_ELLIPSIS\n }\n }\n\n //Enable sanity check for debugging purposes\n // for (let i = 0; i < buttons.length; i++) {\n // if (!buttons[i]) {\n // // eslint-disable-next-line no-console\n // console.log(\n // `Failed: button == ${i}, limit=${limit}, pages=${pages}, firstPage=${firstPage}, lastPage=${lastPage}, value=${value}`\n // )\n // }\n // }\n\n return buttons.filter((x) => x !== null) as number[]\n})\n</script>\n\n<script lang=\"ts\">\nconst DEFAULT_PER_PAGE = 20\nconst DEFAULT_TOTAL_ROWS = 0\n</script>\n"],"mappings":";;;;;;;;;AA4kBA,IAAM,mBAAmB;AACzB,IAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAphB3B,MAAM,qBAAqB;EAE3B,MAAM,eAAe;EACrB,MAAM,cAAc;EACpB,MAAM,cAAc;EACpB,MAAM,cAAc;EACpB,MAAM,iBAAiB;EACvB,MAAM,gBAAgB;EAEtB,MAAM,iCAAiC;EAiCvC,MAAM,QAAQ,YAAY,SAAQ,aAAa;EAC/C,MAAM,OAAO;EAGb,MAAM,aAAa,SAA+D,SAAA,YAEjF;EAED,MAAM,eAAe,eAAe,eAAe;EAEnD,MAAM,cAAc,kBAAkB,MAAM,OAAO;GAAC,WAAW;GAAM,QAAQ;EAAU,CAAC;EACxF,MAAM,gBAAgB,kBAAkB,MAAM,SAAS;GAAC,WAAW;GAAM,QAAQ;EAAU,CAAC;EAC5F,MAAM,kBAAkB,kBAAkB,MAAM,WAAW;GAAC,WAAW;GAAM,QAAQ;EAAU,CAAC;EAChG,MAAM,mBAAmB,YAAY,YAAY;GAAC,WAAW;GAAM,QAAQ;EAAU,CAAC;EAEtF,MAAM,mBAAmB,eAAe,KAAK,IAAI,cAAc,SAAS,kBAAkB,CAAC,CAAC;EAC5F,MAAM,qBAAqB,eAAe,KAAK,IAAI,gBAAgB,SAAS,oBAAoB,CAAC,CAAC;EAElG,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gCK,EA9BF,KAAG,QAAU,KAAK,KACX,GAAA,EAAA,SAAA,KAAA,GAAA,KAAK,IAAE;;KACf,KAAI;MACH,iCAAkC;IAG3B,CAAA,GAAA,CAAA,KAAK,OAAO,kBAAkB,KAAK,OAAO,iBADlD,UAAA,GAAA,mBAOO,QAPP,WAOO;;;IALG,GAAA,cAAA,MAAc,IAAI,GAAA,CAE1B,WAEO,KAAA,QAAA,iBAAA,CAAA,SAAA,CADF,gBAAA,gBAAA,MAAA,KAAA,CAAK,CAAC,gBAAY,KAAA,GAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,KAMA,YAAA,QAHzB,UAAA,GAAA,YAgBY,wBAdL,KAAK,OAAO,EAAE,GAFrB,WAgBY;;;IAfF,GAAA,KAAK,QAAM,EAGlB,SAAO,KAAK,aAAA,CAAA,GAAA;KAEb,SAAA,cASO,CATP,WASO,KAAA,QARE,KAAK,KAAK,MAAI;MACpB,UAAU,KAAK,KAAK;MACpB,MAAM,KAAK,KAAK;MAChB,OAAO,KAAK,KAAK;MACjB,QAAQ,KAAK,KAAK,UAAM;MACxB,SAAS,KAAK,KAAK;KANtB,SASO,CADF,gBAAA,gBAAA,KAAK,KAAK,KAAK,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1,9 +1,9 @@
1
+ import { n as BvEvent } from "./classes-BEWWGbj5.js";
1
2
  import { C as tabsInjectionKey } from "./keys-BgLwJbLV.js";
2
3
  import { c as sortSlotElementsByPosition, i as getSafeDocument } from "./dom-BdUQrX99.js";
3
4
  import { t as useDefaults } from "./useDefaults-BzP4qZBu.js";
4
5
  import { t as useId$1 } from "./useId-Fh-Arhb7.js";
5
6
  import { t as flattenFragments } from "./flattenFragments-B15oMVs-.js";
6
- import { n as BvEvent } from "./classes-BEWWGbj5.js";
7
7
  import { t as useAlignment } from "./useAlignment-DaP-psIh.js";
8
8
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, onUnmounted, openBlock, provide, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, toRef, unref, useAttrs, useModel, useSlots, useTemplateRef, watch, withCtx, withKeys, withModifiers } from "vue";
9
9
  //#endregion
@@ -594,4 +594,4 @@ var BTabs_default = /* @__PURE__ */ defineComponent({
594
594
  //#endregion
595
595
  export { BTab_default as n, BTabs_default as t };
596
596
 
597
- //# sourceMappingURL=BTabs-BKmkVWrZ.js.map
597
+ //# sourceMappingURL=BTabs-Zp8CvCL_.js.map