8000 Merge remote-tracking branch 'upstream/main' · xvaara/bootstrap-vue-next@bcb61d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit bcb61d3

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: doc(variant): interaction between variant, bg-variant & text-variant (bootstrap-vue-next#2200) chore: release main (bootstrap-vue-next#2206) fix(ConditionalWrapper): don't inherit attrs (bootstrap-vue-next#2205) docs: fix paths (bootstrap-vue-next#2204) chore: release main (bootstrap-vue-next#2196) fix: change renderorskip to wrapper, add our own teleport logic. (bootstrap-vue-next#2162) fix(BTable): Type check failed for prop tbodyTrClass fixes bootstrap-vue-next#2197 (bootstrap-vue-next#2198) fix(resolver): resolver path for BCloseButton feat(BCarousel): add noAnimation prop (bootstrap-vue-next#2194) docs: Migration Guide refactor (bootstrap-vue-next#2186) chore: release main (bootstrap-vue-next#2191) fix(BNavItem): pass prop exactActiveClass to router component (bootstrap-vue-next#2188) chore: release main (bootstrap-vue-next#2190) fix: improper import path (bootstrap-vue-next#2189)
2 parents 7103afc + bb979ec commit bcb61d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+435
-294
lines changed

.release-please-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"packages/bootstrap-vue-next": "0.24.13",
3-
"packages/nuxt": "0.24.13"
2+
"packages/bootstrap-vue-next": "0.24.17",
3+
"packages/nuxt": "0.24.17"
44
}

apps/docs/.vitepress/config.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export default defineConfig({
2929
plugins: [
3030
Icons(),
3131
Components({
32-
dirs: ['components', 'docs/components/demo'],
33-
extensions: ['vue'],
32+
globs: ['components/*.vue', 'docs/**/demo/*.vue'],
3433
dts: true,
3534
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
3635
resolvers: [BootstrapVueNextResolver()],

apps/docs/.vitepress/plugins/demo-container.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import type {RuleBlock} from 'markdown-it/lib/parser_block.mjs'
33
import path from 'path'
44

55
// This plugin is inspired by vitepress' snippet plugin and must run before it to work
6+
// https://vitepress.dev/guide/markdown.html#import-code-snippets
67
// It accepts all of the same syntax as the snippet plugin, but will render the demo
78
// _and_ display the example code inside of a HighlightCard component
9+
// To invoke this plugin use <<< DEMO /path/to/file.extension#region{meta} for a running demo
10+
// and example code or <<< FRAGMENT /path/to/file.extension#region{meta} for just the example code
811

912
export const demoContainer = (md: MarkdownRenderer, srcDir: string) => {
1013
const blockParser: RuleBlock = (state, startLine, endLine, silent) => {
11-
const sentinal = '<<< DEMO '
14+
const demoSentinal = '<<< DEMO '
15+
const fragmentSentinal = '<<< FRAGMENT '
1216
const pos = state.bMarks[startLine] + state.tShift[startLine]
1317
const max = state.eMarks[startLine]
1418

@@ -17,26 +21,30 @@ export const demoContainer = (md: MarkdownRenderer, srcDir: string) => {
1721
return false
1822
}
1923

20-
if (state.src.slice(pos, pos + sentinal.length) !== sentinal) {
24+
const isDemo = state.src.slice(pos, pos + demoSentinal.length) === demoSentinal
25+
const isFragment = state.src.slice(pos, pos + fragmentSentinal.length) === fragmentSentinal
26+
27+
if (!isDemo && !isFragment) {
2128
return false
2229
}
30+
const sentinalLength = isDemo ? demoSentinal.length : fragmentSentinal.length
2331

2432
if (silent) {
2533
return true
2634
}
2735

28-
const start = pos + sentinal.length
36+
const start = pos + sentinalLength
2937
const end = state.skipSpacesBack(max, pos)
3038

3139
const rawPath = state.src.slice(start, end).trim().replace(/^@/, srcDir).trim()
3240

3341
const {filepath, extension, region, lines, lang, title} = rawPathToToken(rawPath)
34-
const component = title.substring(0, title.indexOf('.'))
42+
const component = isDemo ? `<${title.substring(0, title.indexOf('.'))}/>` : ''
3543

3644
state.line += 1
3745

3846
const prefixToken = state.push('html_block', '', 0)
39-
prefixToken.content = `<HighlightCard><${component}/><template #html>`
47+
prefixToken.content = `<HighlightCard>${component}<template #html>`
4048

4149
const codeToken = state.push('fence', 'code', 0)
4250
codeToken.info = `${lang || extension}${lines ? `{${lines}}` : ''}${title ? `[${title}]` : ''}`

apps/docs/src/components/HighlightCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<BCard no-body class="mb-5">
3-
<BCardBody>
3+
<BCardBody v-if="$slots.default">
44
<slot />
55
</BCardBody>
66
<template v-if="$slots.html">

apps/docs/src/data/components/accordion.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default {
5959
},
6060
{
6161
component: 'BAccordionItem',
62-
sourcePath: '/BAccordionItem/BAccordionItem.vue',
62+
sourcePath: '/BAccordion/BAccordionItem.vue',
6363
props: {
6464
'': {
6565
bodyAttrs: {

apps/docs/src/data/components/button.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default {
114114
},
115115
{
116116
component: 'BCloseButton',
117-
sourcePath: '/BCloseButton/BCloseButton.vue',
117+
sourcePath: '/BButton/BCloseButton.vue',
118118
props: {
119119
'': {
120120
type: {

apps/docs/src/data/components/card.data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ export default {
251251
},
252252
{
253253
component: 'BCardImg',
254+
sourcePath: '/BCard/BCardImg.vue',
254255
props: {
255256
'': {
256257
placement: {

apps/docs/src/docs/components/avatar.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,26 +232,28 @@ Use the `variant` prop to specify one of Bootstrap theme variant colors. The def
232232
</template>
233233
</HighlightCard>
234234

235-
When displaying text inside the avatar, text colors are calculated based on the `variant` property. The result is either `light` or `dark`. You can override the calculated text color by specifying the `text-variant` property.
235+
When displaying text inside the avatar, text colors are calculated based on the `variant` prop. The result is either `light` or `dark`. You can override the calculated text color by manually specifying the `bg-variant` and `text-variant` props. Note that
236+
`bg-variant` and `text-variant` take precedence over `variant`. See the
237+
[Color Variant Reference](/docs/reference/color-variants#variant-interactions) for details.
236238

237239
<HighlightCard>
238240
<div class="d-flex" style="column-gap: 1%;">
239-
<BAvatar variant="primary" text="P" />
240-
<BAvatar variant="primary" text-variant="dark" text="P" />
241-
<BAvatar variant="secondary" text="A" />
242-
<BAvatar variant="secondary" text-variant="info" text="A" />
243-
<BAvatar variant="warning" text="A" />
244-
<BAvatar variant="warning" text-variant="primary" text="A" />
241+
<BAvatar bg-variant="primary" text="P" />
242+
<BAvatar bg-variant="primary" text-variant="info" text="P" />
243+
<BAvatar bg-variant="secondary" text="A" /& 10000 gt;
244+
<BAvatar bg-variant="secondary" text-variant="info" text="A" />
245+
<BAvatar bg-variant="warning" text="A" />
246+
<BAvatar bg-variant="warning" text-variant="light" text="A" />
245247
</div>
246248
<template #html>
247249

248250
```vue-html
249-
<BAvatar variant="primary" text="P" />
250-
<BAvatar variant="primary" text-variant="dark" text="P" />
251-
<BAvatar variant="secondary" text="A" />
252-
<BAvatar variant="secondary" text-variant="info" text="A" />
253-
<BAvatar variant="warning" text="A" />
254-
<BAvatar variant="warning" text-variant="primary" text="A" />
251+
<BAvatar bg-variant="primary" text="P" />
252+
<BAvatar bg-variant="primary" text-variant="info" text="P" />
253+
<BAvatar bg-variant="secondary" text="A" />
254+
<BAvatar bg-variant="secondary" text-variant="info" text="A" />
255+
<BAvatar bg-variant="warning" text="A" />
256+
<BAvatar bg-variant="warning" text-variant="light" text="A" />
255257
```
256258

257259
</template>

apps/docs/src/docs/components/badge.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ Add any of the following variants via the `variant` prop to change the appearanc
149149
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the `.visually-hidden` class.
150150
:::
151151

152+
<div class="mt-2"></div>
153+
154+
::: warning Interactions between Variant props
155+
`BBadge` implements `bg-variant` and `text-variant` to provide finer control of colors, they take
156+
precedence over the `variant` prop. See the
157+
[Color Variant Reference](/docs/reference/color-variants#variant-interactions) for details.
158+
:::
159+
152160
## Pill badges
153161

154162
Use the `pill` prop to make badges more rounded with a larger border-radius.

apps/docs/src/docs/components/button.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ padding and size of a button.
177177

178178
**Tip:** remove the hover underline from a link variant button by setting `underline-opacity="0"`.
179179

180+
::: warning Interactions between Variant props
181+
`BButton` implements `bg-variant` and `text-variant` to provide finer control of colors, they take
182+
precedence over the `variant` prop. See the
183+
[Color Variant Reference](/docs/reference/color-variants#variant-interactions) for details.
184+
:::
185+
180186
## Block level buttons
181187

182188
Create responsive stacks of full-width, “block buttons” by wrapping the button(s) in a div and specifying

0 commit comments

Comments
 (0)
0