8000 Merge remote-tracking branch 'upstream/main' into fix-show-hide-events · xvaara/bootstrap-vue-next@653829b · GitHub
[go: up one dir, main page]

Skip to content

Commit 653829b

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix-show-hide-events
* upstream/main: test: form checkbox indeterminate behavior (bootstrap-vue-next#2279) chore: release main (bootstrap-vue-next#2278) fix(BModal): remove scrolllock on unmount (bootstrap-vue-next#2277) chore: release main (bootstrap-vue-next#2275) fix(BFormCheckbox): indeterminate state not working properly fixes bootstrap-vue-next#2271 (bootstrap-vue-next#2274) chore: release main (bootstrap-vue-next#2270) fix(BModal): fix backdrop when modal is shown using v-if (bootstrap-vue-next#2269) chore: release main (bootstrap-vue-next#2259) fix(BFormInput): bad model modifier trim behavior fixes bootstrap-vue-next#2253 (bootstrap-vue-next#2267) fix(BModal): multiple modals backdrop fix (bootstrap-vue-next#2263) feat: clean deprecated classes and props from bootstrap (sr-only => visually-hidden) docs(BDropdown): Fill out component references for subcomponents (bootstrap-vue-next#2265) feat(BDropdown): add variant, classes and correct attrs to text sub components (bootstrap-vue-next#2258) fix(BModal): fix backdrop click prevention, fix flickering when no-fade (bootstrap-vue-next#2262)
2 parents ac1715f + eedba4d commit 653829b

35 files changed

+609
-359
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.25.0",
3-
"packages/nuxt": "0.25.0"
2+
"packages/bootstrap-vue-next": "0.25.4",
3+
"packages/nuxt": "0.25.4"
44
}

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

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export default {
142142
type: 'string',
143143
default: 'Toggle dropdown',
144144
description:
145-
'ARIA label (sr-only) to set on the toggle when in split mode. Overriden by the slot of the same name',
145+
'ARIA label (visually-hidden) to set on the toggle when in split mode. Overriden by the slot of the same name',
146146
},
147147
wrapperClass: {
148148
type: 'ClassValue',
@@ -261,7 +261,7 @@ export default {
261261
{
262262
name: 'toggle-text',
263263
description:
264-
'ARIA label (sr-only) to set on the toggle when in split mode. Overrides the toggle-text prop',
264+
'ARIA label (visually-hidden) to set on the toggle when in split mode. Overrides the toggle-text prop',
265265
},
266266
],
267267
},
@@ -270,13 +270,18 @@ export default {
270270
sourcePath: '/BDropdown/BDropdownDivider.vue',
271271
props: {
272272
'': {
273+
dividerClass: {
274+
default: undefined,
275+
type: 'ClassValue',
276+
description: 'CSS class (or classes) to add to the divider component',
277+
},
273278
...pick(
274279
buildCommonProps({
275280
tag: {
276281
default: 'hr',
277282
},
278283
}),
279-
['tag']
284+
['tag', 'variant', 'wrapperAttrs']
280285
),
281286
} satisfies Record<keyof BvnComponentProps['BDropdownDivider'], PropertyReference>,
282287
},
@@ -286,14 +291,16 @@ export default {
286291
sourcePath: '/BDropdown/BDropdownForm.vue',
287292
props: {
288293
'': {
289-
formClass: {notYetImplemented: true},
290-
inline: {notYetImplemented: true},
294+
formClass: {
295+
default: undefined,
296+
type: 'ClassValue',
297+
description: 'CSS class (or classes) to add to the form component',
298+
},
291299
novalidate: {notYetImplemented: true},
292300
validated: {notYetImplemented: true},
293-
},
301+
...pick(buildCommonProps({}), ['wrapperAttrs']),
302+
} satisfies Record<keyof BvnComponentProps['BDropdownForm'], PropertyReference>,
294303
},
295-
// Add the typing back in when props are implemented
296-
// satisfies Record<keyof BvnComponentProps['BDropdownForm'], PropertyReference>,
297304
slots: [
298305
{
299306
name: 'default',
@@ -336,7 +343,16 @@ export default {
336343
component: 'BDropdownHeader',
337344
sourcePath: '/BDropdown/BDropdownHeader.vue',
338345
emits: [],
339-
props: {} satisfies Record<keyof BvnComponentProps['BDropdownHeader'], PropertyReference>,
346+
props: {
347+
'': {
348+
text: {
349+
default: undefined,
350+
description: 'Content to place in the dropdown text. Default slot takes precedence',
351+
type: 'string',
352+
},
353+
...pick(buildCommonProps({}), ['headerClass', 'tag', 'variant', 'wrapperAttrs']),
354+
} satisfies Record<keyof BvnComponentProps['BDropdownHeader'], PropertyReference>,
355+
},
340356
slots: [
341357
{
342358
name: 'default',
@@ -431,6 +447,19 @@ export default {
431447
description: 'Content to place in the dropdown text. Default slot takes precedence',
432448
type: 'string',
433449
},
450+
textClass: {
451+
default: undefined,
452+
type: 'ClassValue',
453+
description: 'CSS class (or classes) to add to the text component',
454+
},
455+
...pick(
456+
buildCommonProps({
457+
tag: {
458+
default: 'span',
459+
},
460+
}),
461+
['tag', 'variant', 'wrapperAttrs']
462+
),
434463
} satisfies Record<keyof BvnComponentProps['BDropdownText'], PropertyReference>,
435464
},
436465
slots: [

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ export default {
319319
default: undefined,
320320
description: 'CSS class (or classes) to apply to the title',
321321
},
322-
titleSrOnly: {
322+
titleVisuallyHidden: {
323323
type: 'boolean',
324324
default: false,
325-
description: "Wraps the title in an '.sr-only' wrapper",
325+
description: "Wraps the title in an '.visually-hidden' wrapper",
326326
},
327327
titleTag: {
328328
type: 'string',

apps/docs/src/docs/components/demo/DropdownForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<BFormInput id="email" type="email" placeholder="Enter email" required />
1111
</BFormGroup>
1212
<BFormGroup
13-
label="Passoword:"
13+
label="Password:"
1414
label-for="password"
1515
description="We'll never share your email with anyone else."
1616
>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<!-- #region template -->
3+
<BDropdown text="Dropdown with inline form" auto-close="outside">
4+
<BDropdownForm form-class="d-flex flex-row align-items-center flex-wrap">
5+
<BFormGroup label="Email:" label-for="email-inline" label-cols="3" label-align="end">
6+
<BFormInput id="email-inline" type="email" placeholder="Enter email" required />
7+
</BFormGroup>
8+
<BFormGroup label="Password:" label-for="password-inline" label-cols="4" label-align="end">
9+
<BFormInput id="password-inline" type="password" required />
10+
</BFormGroup>
11+
</BDropdownForm>
12+
<BDropdownDivider />
13+
<BDropdownItemButton>New around here? Sign up</BDropdownItemButton>
14+
<BDropdownItemButton>Forget Password</BDropdownItemButton>
15+
</BDropdown>
16+
<!-- #endregion template -->
17+
</template>

apps/docs/src/docs/components/dropdown.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,16 @@ may break layout and/or keyboard navigation.
200200
| `BDropdownText` | Free flowing text content in a menu |
201201
| `BDropdownGroup` | For grouping dropdown sub-components with an optional header |
202202
| `BDropdownHeader` | A header item, used to help identify a group of dropdown items |
203+
| `BDropdownForm` | For placing form controls within a dropdown menu. |
203204

204-
**Note:** _Nested sub-menus are **not** supported._
205+
::: warning
206+
_Nested sub-menus are **not** supported._
207+
:::
208+
209+
::: tip
210+
There are small differences in how the sub-components behave, please read our [migration guide](/docs/migration-guide#dropdown-sub-components)
211+
if you are converting from `bootstrap-vue`.
212+
:::
205213

206214
### BDropdownItem
207215

@@ -241,7 +249,7 @@ constrain/set the menu width.
241249

242250
`BDropdownText` has the BootstrapVueNext custom class `.b-dropdown-text` applied to it which sets some basic styles which are suitable in most situations. By default, its width will be the same as the widest `BDropdownItem` content. You may need to place additional styles or helper classes on the component.
243251

244-
<NotYetImplemented/>: While the basic `BDropdownText` works, none of the props are implemented to customize the text (`tag`, `text-class`, and `variant`)
252+
`variant`)
245253

246254
### BDropdownGroup
247255

@@ -259,15 +267,15 @@ See Section [Headers and accessibility](#headers-and-accessibility) for details
259267

260268
Using the `BDropdownGroup` sub-component simplifies creating accessible grouped dropdown items with an associated header.
261269

262-
<NotYetImplemented/>: While the basic `BDropdownHeader` works, none of the props are implemented to customize the header (`id`, `tag`, and `variant`)
263-
264270
### BDropdownForm
265271

266272
Add a form into your dropdown with `BDropdownForm`.
267273

268274
<<< DEMO ./demo/DropdownForm.vue#template{vue-html}
269275

270-
<NotYetImplemented/>: While the basic `BDropdownForm` works, none of the props are implemented to customize the form (`formClass`, `inline`, `novalidate` and `validated`)
276+
Or make it inline.
277+
278+
<<< DEMO ./demo/DropdownInlineForm.vue#template{vue-html}
271279

272280
## Accessibility
273281

apps/docs/src/docs/components/form-group.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ value via the prop `label-text-align` and/or `label-align-{breakpoint}`.
193193
| `label-align-lg` | Applies to breakpoint `lg` and up |
194194
| `label-align-xl` | Applies to breakpoint `xl` and up |
195195

196-
Alignment has no effect if the `label-sr-only` prop is set.
196+
Alignment has no effect if the `label-visually-hidden` prop is set.
197197

198198
## Nested form groups
199199

apps/docs/src/docs/components/navbar.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Note that the expanded scope property only works when supplying the target prop
395395
</template>
396396
</BNavbarToggle>
397397
<BCollapse id="navbar-toggle-collapse" is-nav>
398-
<BNavbarNav class="ml-auto">
398+
<BNavbarNav class="ms-auto">
399399
<BNavItem href="#">Link 1</BNavItem>
400400
<BNavItem href="#">Link 2</BNavItem>
401401
<BNavItem href="#" disabled>Disabled</BNavItem>
@@ -416,7 +416,7 @@ Note that the expanded scope property only works when supplying the target prop
416416
</BNavbarToggle>
417417
418418
<BCollapse id="navbar-toggle-collapse" is-nav>
419-
<BNavbarNav class="ml-auto">
419+
<BNavbarNav class="ms-auto">
420420
<BNavItem href="#">Link 1</BNavItem>
421421
<BNavItem href="#">Link 2</BNavItem>
422422
<BNavItem href="#" disabled>Disabled</BNavItem>

apps/docs/src/docs/components/table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ const sortFields: Exclude<TableFieldRaw<SortPerson>, string>[] = [
765765
{{ (row.value as PersonName).last }}
766766
</template>
767767
<template #cell(actions)="row">
768-
<BButton size="sm" class="mr-1" @click="info(row.item, row.index)"> Info modal </BButton>
768+
<BButton size="sm" class="me-1" @click="info(row.item, row.index)"> Info modal </BButton>
769769
<BButton size="sm" @click="row.toggleDetails">
770770
{{ row.detailsShowing ? 'Hide' : 'Show' }} Details
771771
</BButton>
@@ -924,7 +924,7 @@ const sortFields: Exclude<TableFieldRaw<SortPerson>, string>[] = [
924924
{{ (row.value as PersonName).last }}
925925
</template>
926926
<template #cell(actions)="row">
927-
<BButton size="sm" class="mr-1" @click="info(row.item, row.index)"> Info modal </BButton>
927+
<BButton size="sm" class="me-1" @click="info(row.item, row.index)"> Info modal </BButton>
928928
<BButton size="sm" @click="row.toggleDetails">
929929
{{ row.detailsShowing ? 'Hide' : 'Show' }} Details
930930
</BButton>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<html>
2+
<ul>
3+
<!-- #region template -->
4+
<li role="presentation">
5+
<h6 class="dropdown-header" id="header-label">A nice description</h6>
6+
</li>
7+
<!-- #endregion template -->
8+
</ul>
9+
</html>

0 commit comments

Comments
 (0)
0