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

Commit e3c285f

Browse files
authored
Merge pull request bootstrap-vue-next#1445 from VividLemon/main
BToast
2 parents e54e371 + 73211bb commit e3c285f

Some content is hidden

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

50 files changed

+782
-1129
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<BNavbar variant="primary" sticky="top" toggleable="lg" :container="true" v-b-color-mode="'dark'">
3+
<BToaster />
34
<div class="d-flex gap-2 align-items-center">
45
<BNavbarToggle v-b-toggle.sidebar-menu />
56
<BNavbarBrand :to="withBase('/')" class="p-0 me-0 me-lg-2">
@@ -149,6 +150,7 @@ import {
149150
useColorMode,
150151
vBToggle,
151152
vBColorMode,
153+
BToaster,
152154
} from 'bootstrap-vue-next'
153155
import {computed, inject, ref, watch} from 'vue'
154156
import GithubIcon from '~icons/bi/github'

apps/docs/src/components/MigrationWrapper.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<script setup lang="ts">
1515
import {computed} from 'vue'
16-
import {BBadge, BCard, type ColorVariant} from 'bootstrap-vue-next'
16+
import {BBadge, BCard} from 'bootstrap-vue-next'
1717
1818
const props = defineProps<{
1919
difficulty: 'hard' | 'medium' | 'easy'
@@ -26,7 +26,7 @@ const props = defineProps<{
2626
fix: string
2727
}>()
2828
29-
const difficultyVariant = computed<ColorVariant>(() =>
29+
const difficultyVariant = computed(() =>
3030
props.difficulty === 'hard' ? 'danger' : props.difficulty === 'medium' ? 'warning' : 'success'
3131
)
3232
</script>

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

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,97 +6,99 @@ export default {
66
component: 'BToast',
77
props: [
88
{
9-
description: '',
109
prop: 'delay',
11-
type: 'number',
10+
type: 'string | number',
11+
default: 5000,
1212
},
1313
{
14-
prop: 'body',
15-
type: 'BodyProp',
16-
description: 'Content of Body',
14+
prop: 'bodyClass',
15+
type: 'ClassValue',
16+
default: undefined,
1717
},
1818
{
19-
prop: 'bodyClass',
19+
prop: 'body',
2020
type: 'string',
21-
description: 'CSS class (or classes) to add to the toast body element',
21+
default: undefined,
2222
},
2323
{
2424
prop: 'headerClass',
25-
type: 'string',
26-
description: 'CSS class (or classes) to add to the toast header element',
25+
type: 'ClassValue',
26+
default: undefined,
2727
},
2828
{
2929
prop: 'headerTag',
3030
type: 'string',
31-
description: 'Specify the HTML tag to render instead of the default tag for the footer',
31+
default: 'div',
3232
},
3333
{
34-
description: '',
3534
prop: 'animation',
3635
type: 'Booleanish',
36+
default: true,
3737
},
3838
{
39-
description: '',
4039
prop: 'id',
4140
type: 'string',
41+
default: undefined,
4242
},
4343
{
4444
prop: 'isStatus',
4545
type: 'Booleanish',
46-
description:
47-
"When set to 'true', makes the toast have attributes aria-live=polite and role=status. When 'false' aria-live will be 'assertive' and role will be 'alert'",
46+
default: false,
4847
},
4948
{
50-
description: '',
51-
prop: 'autohide',
49+
prop: 'autoHide',
5250
type: 'Booleanish',
51+
default: true,
5352
},
5453
{
5554
prop: 'noCloseButton',
5655
type: 'Booleanish',
57-
description: 'When set, hides the close button in the toast header',
56+
default: false,
5857
},
5958
{
60-
description: '',
6159
prop: 'noFade',
6260
type: 'Booleanish',
61+
default: false,
6362
},
6463
{
6564
prop: 'noHoverPause',
6665
type: 'Booleanish',
67-
description:
68-
'When set, disables the pausing of the auto hide delay when the mouse hovers the toast',
66+
default: false,
6967
},
7068
{
7169
prop: 'solid',
7270
type: 'Booleanish',
73-
description:
74-
'When set, renderes the toast with a solid background rather than translucent',
75-
},
76-
{
77-
description: '',
78-
prop: 'static',
79-
type: 'Booleanish',
71+
default: false,
8072
},
8173
{
8274
prop: 'title',
8375
type: 'string',
84-
description: "The toast's title text",
76+
default: undefined,
8577
},
8678
{
87-
description: '',
8879
prop: 'modelValue',
89-
type: 'Booleanish',
80+
type: 'boolean | number',
81+
default: false,
9082
},
9183
{
9284
prop: 'toastClass',
93-
type: 'string[]',
94-
description: 'CSS class (or classes) to add to the toast wrapper element',
85+
type: 'ClassValue',
86+
default: undefined,
87+
},
88+
{
89+
prop: 'showOnPause',
90+
type: 'Booleanish',
91+
default: true,
92+
},
93+
{
94+
prop: 'interval',
95+
type: 'number | string',
96+
default: '1000',
9597
},
9698
{
97-
prop: 'variant',
98-
type: 'ColorVariant',
99-
description: 'Applies one of the Bootstrap theme color variants to the component',
99+
prop: 'progressProps',
100+
type: "Omit<BProgressBarProps, 'label' | 'labelHtml' | 'max' | 'value'>",
101+
default: undefined,
100102
},
101103
],
102104
slots: [],
@@ -131,14 +133,16 @@ export default {
131133
slots: [],
132134
props: [
133135
{
134-
description: '',
135-
prop: 'position',
136-
type: 'ContainerPosition',
136+
description: 'Overrides the default teleport location',
137+
prop: 'teleportTo',
138+
type: 'string | RendererElement | null | undefined',
139+
default: 'body',
137140
},
138141
{
139-
description: '',
140-
prop: 'instance',
141-
type: 'ToastInstance',
142+
description: 'Renders the Toaster in the exact place it was defined',
143+
prop: 'teleportDisabled',
144+
type: 'Booleanish',
145+
default: false,
142146
},
143147
],
144148
},

apps/docs/src/docs/components/breadcrumb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Indicate the current page's location within a navigational hierarchy. Separators
2727
import type {BreadcrumbItem} from 'bootstrap-vue-next'
2828
2929
const breadcrumbItems = ref<BreadcrumbItem[]>([
30-
{text: 'Admin', href: 'https://google.com'},
30+
{text: 'Admin', href: 'https://getbootstrap.com/'},
3131
{text: 'Manage', href: '#'},
3232
{text: 'Library'},
3333
])
@@ -142,7 +142,7 @@ import HighlightCard from '../../components/HighlightCard.vue'
142142
import type {BreadcrumbItem} from 'bootstrap-vue-next'
143143

144144
const breadcrumbItems = ref<BreadcrumbItem[]>([
145-
{ text: 'Admin', href:'https://google.com'},
145+
{ text: 'Admin', href:'https://getbootstrap.com/'},
146146
{ text: 'Manage', href:'#'},
147147
{ text: 'Library'},
148148
]);

0 commit comments

Comments
 (0)