Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit a57d196

Browse files
committed
2 parents 60fe9c2 + 648ca26 commit a57d196

File tree

13 files changed

+81
-33
lines changed

13 files changed

+81
-33
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/bootstrap-vue-next": "0.9.22",
2+
"packages/bootstrap-vue-next": "0.9.23",
33
"packages/nuxt": "0.1.3"
44
}

apps/docs/.vitepress/config.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
import {defineConfig} from 'vitepress'
22
import Icons from 'unplugin-icons/vite'
33

4+
const title = 'BootstrapVueNext'
5+
const description = 'Quickly and Easily Integrate Bootstrap V5 Components With Vue 3'
6+
47
// https://vitepress.dev/reference/site-config
58
export default defineConfig({
6-
title: 'BootstrapVueNext',
7-
description: 'BootstrapVueNext Documentation',
9+
title,
10+
description,
811
base: '/bootstrap-vue-next/',
912
srcDir: 'src',
1013
// TODO fix & remove this
1114
ignoreDeadLinks: true,
12-
head: [['link', {rel: 'icon', type: 'image/x-icon', href: '/bootstrap-vue-next/favicon.ico'}]],
15+
head: [
16+
['link', {rel: 'icon', type: 'image/x-icon', href: '/bootstrap-vue-next/favicon.ico'}],
17+
['meta', {property: 'og:title', name: 'og:title', content: title}],
18+
['meta', {property: 'og:description', name: 'og:description', content: description}],
19+
['meta', {property: 'twitter:card', name: 'twitter:card', content: 'summary'}],
20+
['meta', {property: 'twitter:title', name: 'twitter:title', content: title}],
21+
['meta', {property: 'twitter:description', name: 'twitter:description', content: description}],
22+
],
1323
vite: {
1424
plugins: [Icons()],
1525
},

apps/docs/.vitepress/theme/Layout.vue

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,43 +34,41 @@
3434
</BNavbarNav>
3535
</BCollapse>
3636
<BNav>
37-
<BButton
38-
:variant="null"
37+
<BNavItem
3938
:href="globalData.githubUrl"
40-
aria-label="Open Github"
39+
:link-attrs="{'aria-label': 'Open Our Github'}"
4140
target="_blank"
4241
rel="noopener"
4342
>
4443
<GithubIcon aria-hidden />
45-
</BButton>
46-
<BButton
47-
:variant="null"
44+
</BNavItem>
45+
<BNavItem
4846
:href="globalData.opencollectiveUrl"
49-
aria-label="Open Github"
47+
:link-attrs="{'aria-label': 'Open Our Opencollective'}"
5048
target="_blank"
5149
rel="noopener"
5250
>
5351
<OpencollectiveIcon />
54-
</BButton>
55-
<BButton
56-
:variant="null"
52+
</BNavItem>
53+
<BNavItem
5754
:href="globalData.discordUrl"
58-
aria-label="Open Discord Server"
55+
:link-attrs="{'aria-label': 'Open Our Discord Server'}"
56+
aria-label=""
5957
target="_blank"
6058
rel="noopener"
6159
>
6260
<DiscordIcon aria-hidden />
63-
</BButton>
61+
</BNavItem>
6462
<ClientOnly>
65-
<BDropdown :variant="null">
63+
<BNavItemDropdown>
6664
<!-- TODO there's no way to adjust these options, say if you wanted to remove the padding -->
6765
<template #button-content>
6866
<component :is="currentIcon" :aria-label="`Toggle theme (${dark})`" />
6967
</template>
7068
<BDropdownItem v-for="el in options" :key="el" :active="dark === el" @click="set(el)">
7169
<component :is="map[el]" /> {{ el }}
7270
</BDropdownItem>
73-
</BDropdown>
71+
</BNavItemDropdown>
7472
</ClientOnly>
7573
</BNav>
7674
<BNavbarToggle v-b-toggle.otp-menu class="otp-menu-toggle">
@@ -137,11 +135,10 @@
137135

138136
<script setup lang="ts">
139137
import {
140-
BButton,
141138
BCol,
142139
BCollapse,
143140
BContainer,
144-
BDropdown,
141+
BNavItemDropdown,
145142
BDropdownItem,
146143
BNav,
147144
BNavbar,
@@ -162,7 +159,7 @@ import MoonStarsFill from '~icons/bi/moon-stars-fill'
162159
import SunFill from '~icons/bi/sun-fill'
163160
import ChevronRight from '~icons/bi/chevron-right'
164161
import CircleHalf from '~icons/bi/circle-half'
165-
import {useData, withBase, useRoute} from 'vitepress'
162+
import {useData, useRoute, withBase} from 'vitepress'
166163
import {appInfoKey} from './keys'
167164
import {useMediaQuery} from '@vueuse/core'
168165
import TableOfContentsNav from '../../src/components/TableOfContentsNav.vue'

apps/docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ With more than 35 components, several directives and composibles (and growing),
4848

4949
<div class="d-flex gap-2 mt-4">
5050
<BButton :to="withBase('/docs')" variant="primary">Get Started</BButton>
51-
<BButton :href="globalData.githubUrl" target="_blank" aria-label="Open Github" rel="noopener" variant="outline-secondary">GitHub</BButton>
51+
<BButton :href="globalData.githubUrl" target="_blank" rel="noopener" variant="outline-secondary">GitHub</BButton>
5252
</div>
5353

5454
## Integrate with Nuxt.js

packages/bootstrap-vue-next/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22

33

4+
## [0.9.23](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/bootstrap-vue-next-v0.9.22...bootstrap-vue-next-v0.9.23) (2023-07-08)
5+
6+
7+
### Features
8+
9+
* **BNavItem:** add prop linkAttrs so you can add specific attributes to the link that aren't included as props ([14d1ebf](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/14d1ebfbc533e8a9217465d117e0a50978987b77))
10+
11+
12+
### Bug Fixes
13+
14+
* **BOffcanvas:** Aria enhancements -- multiple Offcanvas causes duplicate id ([e8bcda5](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/e8bcda5260d62c87b03f44e6e03fb9ce991cdb6d))
15+
* replace some instances of TS 'as' with 'satisfies' ([14d1ebf](https://github.com/bootstrap-vue-next/bootstrap-vue-next/commit/14d1ebfbc533e8a9217465d117e0a50978987b77))
16+
417
## [0.9.22](https://github.com/bootstrap-vue-next/bootstrap-vue-next/compare/bootstrap-vue-next-v0.9.21...bootstrap-vue-next-v0.9.22) (2023-07-07)
518

619

packages/bootstrap-vue-next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "bootstrap-vue-next",
33
"displayName": "BootstrapVueNext",
44
"description": "Bootstrap Vue 3 is an early and lovely component library for Vue 3 & Nuxt 3 based on Bootstrap 5 and Typescript.",
5-
"version": "0.9.22",
5+
"version": "0.9.23",
66
"license": "MIT",
77
"main": "./dist/bootstrap-vue-next.umd.js",
88
"module": "./dist/bootstrap-vue-next.mjs",

packages/bootstrap-vue-next/src/components/BAccordion/BAccordionItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-model="modelValue"
66
class="accordion-collapse"
77
v-bind="$attrs"
8-
:aria-labelledby="`heading${computedId}`"
8+
:aria-labelledby="`${computedId}-heading`"
99
:tag="tag"
1010
:toggle="toggle"
1111
:horizontal="horizontal"
@@ -14,7 +14,7 @@
1414
v-on="events"
1515
>
1616
<template #header="{visible: toggleVisible, toggle: slotToggle}">
17-
<component :is="headerTag" :id="`heading${computedId}`" class="accordion-header">
17+
<component :is="headerTag" :id="`${computedId}-heading`" class="accordion-header">
1818
<button
1919
class="accordion-button"
2020
:class="{collapsed: !toggleVisible}"

packages/bootstrap-vue-next/src/components/BAccordion/accordion-item.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('accordion-item', () => {
8080
props: {id: 'foobar'},
8181
})
8282
const [, $bcollapse] = wrapper.findComponent(BCollapse).findAll('*')
83-
expect($bcollapse.attributes('aria-labelledby')).toBe('headingfoobar')
83+
expect($bcollapse.attributes('aria-labelledby')).toBe('foobar-heading')
8484
})
8585

8686
it('headerTag is h2 by default', () => {
@@ -114,7 +114,7 @@ describe('accordion-item', () => {
114114
props: {id: 'foobar'},
115115
})
116116
const $h2 = wrapper.get('h2')
117-
expect($h2.attributes('id')).toBe('headingfoobar')
117+
expect($h2.attributes('id')).toBe('foobar-heading')
118118
})
119119

120120
it('h2 child has button child', () => {

packages/bootstrap-vue-next/src/components/BBadge/BBadge.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const computedLinkProps = computed(() =>
101101
underlineOpacity: true,
102102
underlineOpacityHover: true,
103103
icon: true,
104-
} as Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
104+
} satisfies Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
105105
: {}
106106
)
107107
</script>

packages/bootstrap-vue-next/src/components/BBreadcrumb/BBreadcrumbItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const computedLinkProps = computed(() =>
100100
underlineOpacity: true,
101101
underlineOpacityHover: true,
102102
icon: true,
103-
} as Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
103+
} satisfies Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
104104
: {}
105105
)
106106

packages/bootstrap-vue-next/src/components/BNav/BNavItem.vue

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<BLink
44
class="nav-link"
55
:class="linkClasses"
6-
v-bind="$props"
6+
v-bind="{...linkProps, ...linkAttrs}"
77
active-class="active"
88
:tabindex="disabledBoolean ? -1 : undefined"
99
:aria-disabled="disabledBoolean ? true : undefined"
@@ -14,9 +14,11 @@
1414
</template>
1515

1616
<script setup lang="ts">
17+
import {computed} from 'vue'
1718
import BLink from '../BLink/BLink.vue'
1819
import {useBooleanish} from '../../composables'
1920
import type {BLinkProps} from '../../types/BLinkProps'
21+
import {pluckProps} from '../../utils'
2022
2123
defineSlots<{
2224
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -27,6 +29,7 @@ const props = withDefaults(
2729
defineProps<
2830
{
2931
linkClasses?: string
32+
linkAttrs?: Record<string, unknown>
3033
} & Omit<BLinkProps, 'event' | 'routerTag'>
3134
>(),
3235
{
@@ -35,6 +38,7 @@ const props = withDefaults(
3538
active: undefined,
3639
activeClass: 'router-link-active',
3740
append: false,
41+
linkAttrs: undefined,
3842
disabled: false,
3943
href: undefined,
4044
// noPrefetch: {type: [Boolean, String] as PropType<Booleanish>, default: false},
@@ -58,4 +62,28 @@ const props = withDefaults(
5862
)
5963
6064
const disabledBoolean = useBooleanish(() => props.disabled)
65+
66+
const linkProps = computed(() =>
67+
pluckProps(props, {
68+
active: true,
69+
activeClass: true,
70+
append: true,
71+
disabled: true,
72+
href: true,
73+
icon: true,
74+
opacity: true,
75+
opacityHover: true,
76+
rel: true,
77+
replace: true,
78+
routerComponentName: true,
79+
target: true,
80+
to: true,
81+
underlineOffset: true,
82+
underlineOffsetHover: true,
83+
underlineOpacity: true,
84+
underlineOpacityHover: true,
85+
underlineVariant: true,
86+
variant: true,
87+
} satisfies Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
88+
)
6189
</script>

packages/bootstrap-vue-next/src/components/BNavbar/BNavbarBrand.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const computedLinkProps = computed(() =>
7474
underlineOpacity: true,
7575
underlineOpacityHover: true,
7676
icon: true,
77-
} as Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
77+
} satisfies Record<keyof Omit<BLinkProps, 'event' | 'routerTag'>, true>)
7878
: {}
7979
)
8080
</script>

packages/bootstrap-vue-next/src/components/BOffcanvas/BOffcanvas.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
role="dialog"
2222
:class="computedClasses"
2323
tabindex="-1"
24-
aria-labelledby="offcanvasLabel"
24+
:aria-labelledby="`${computedId}-offcanvas-label`"
2525
data-bs-backdrop="false"
2626
v-bind="$attrs"
2727
@keyup.esc="hide('esc')"
2828
>
2929
<template v-if="lazyShowing">
3030
<div v-if="!noHeaderBoolean" class="offcanvas-header" :class="headerClass">
3131
<slot name="header" v-bind="{visible: modelValueBoolean, placement, hide}">
32-
<h5 id="offcanvasLabel" class="offcanvas-title">
32+
<h5 :id="`${computedId}-offcanvas-label`" class="offcanvas-title">
3333
<slot name="title">
3434
{{ title }}
3535
</slot>

0 commit comments

Comments
 (0)