Skip to content

Commit ac66fe4

Browse files
committed
fix!: remove last remants of SubTitle to Subtitle
1 parent fa63831 commit ac66fe4

File tree

8 files changed

+57
-57
lines changed

8 files changed

+57
-57
lines changed

apps/docs/docs/component-references/Card.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
"slots": []
403403
},
404404
{
405-
"component": "BCardSubTitle",
405+
"component": "BCardSubtitle",
406406
"emits": [],
407407
"props": [
408408
{

packages/bootstrap-vue-3/src/BootstrapVue.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import BCardFooter from './components/BCard/BCardFooter.vue'
2424
import BCardGroup from './components/BCard/BCardGroup.vue'
2525
import BCardHeader from './components/BCard/BCardHeader.vue'
2626
import BCardImg from './components/BCard/BCardImg.vue'
27-
import BCardSubTitle from './components/BCard/BCardSubTitle.vue'
27+
import BCardSubtitle from './components/BCard/BCardSubtitle.vue'
2828
import BCardText from './components/BCard/BCardText.vue'
2929
import BCardTitle from './components/BCard/BCardTitle.vue'
3030
import BCarousel from './components/BCarousel/BCarousel.vue'
@@ -141,7 +141,7 @@ export {
141141
BCardGroup,
142142
BCardHeader,
143143
BCardImg,
144-
BCardSubTitle,
144+
BCardSubtitle,
145145
BCardText,
146146
BCardTitle,
147147
BNavForm,
@@ -270,7 +270,7 @@ declare module '@vue/runtime-core' {
270270
BCardGroup: typeof BCardGroup
271271
BCardHeader: typeof BCardHeader
272272
BCardImg: typeof BCardImg
273-
BCardSubTitle: typeof BCardSubTitle
273+
BCardSubtitle: typeof BCardSubtitle
274274
BCardText: typeof BCardText
275275
BCardTitle: typeof BCardTitle
276276
BCarousel: typeof BCarousel

packages/bootstrap-vue-3/src/components/BCard/BCardBody.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
</slot>
77
</b-card-title>
88

9-
<b-card-sub-title
9+
<b-card-subtitle
1010
v-if="!!subtitle || !!$slots.subtitle"
1111
:tag="subtitleTag"
1212
:text-variant="subtitleTextVariant"
1313
>
1414
<slot name="subtitle">
1515
{{ subtitle }}
1616
</slot>
17-
</b-card-sub-title>
17+
</b-card-subtitle>
1818

1919
<slot>
2020
{{ text }}
@@ -26,7 +26,7 @@
2626
// import type {BCardBodyProps} from '../../types/components'
2727
import {computed, toRef} from 'vue'
2828
import BCardTitle from './BCardTitle.vue'
29-
import BCardSubTitle from './BCardSubTitle.vue'
29+
import BCardSubtitle from './BCardSubtitle.vue'
3030
import type {Booleanish, ColorVariant, TextColorVariant} from '../../types'
3131
import {useBooleanish} from '../../composables'
3232

packages/bootstrap-vue-3/src/components/BCard/card-body.spec.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {enableAutoUnmount, mount} from '@vue/test-utils'
22
import {afterEach, describe, expect, it} from 'vitest'
33
import BCardBody from './BCardBody.vue'
44
import BCardTitle from './BCardTitle.vue'
5-
import BCardSubTitle from './BCardSubTitle.vue'
5+
import BCardSubtitle from './BCardSubtitle.vue'
66

77
describe('card-body', () => {
88
enableAutoUnmount(afterEach)
@@ -48,10 +48,10 @@ describe('card-body', () => {
4848
expect($bcardtitle.exists()).toBe(false)
4949
})
5050

51-
it('does not have BCardSubTitle by default', () => {
51+
it('does not have BCardSubtitle by default', () => {
5252
const wrapper = mount(BCardBody)
53-
const $bcardsubtitle = wrapper.findComponent(BCardSubTitle)
54-
expect($bcardsubtitle.exists()).toBe(false)
53+
const $BCardSubtitle = wrapper.findComponent(BCardSubtitle)
54+
expect($BCardSubtitle.exists()).toBe(false)
5555
})
5656

5757
it('has BCardTitle when prop title', () => {
@@ -62,12 +62,12 @@ describe('card-body', () => {
6262
expect($bcardtitle.exists()).toBe(true)
6363
})
6464

65-
it('has BCardSubTitle when prop subtitle', () => {
65+
it('has BCardSubtitle when prop subtitle', () => {
6666
const wrapper = mount(BCardBody, {
6767
props: {subtitle: 'foobar'},
6868
})
69-
const $bcardsubtitle = wrapper.findComponent(BCardSubTitle)
70-
expect($bcardsubtitle.exists()).toBe(true)
69+
const $BCardSubtitle = wrapper.findComponent(BCardSubtitle)
70+
expect($BCardSubtitle.exists()).toBe(true)
7171
})
7272

7373
it('has BCardTitle when slot title', () => {
@@ -78,12 +78,12 @@ describe('card-body', () => {
7878
expect($bcardtitle.exists()).toBe(true)
7979
})
8080

81-
it('has BCardSubTitle when slot subtitle', () => {
81+
it('has BCardSubtitle when slot subtitle', () => {
8282
const wrapper = mount(BCardBody, {
8383
slots: {subtitle: 'foobar'},
8484
})
85-
const $bcardsubtitle = wrapper.findComponent(BCardSubTitle)
86-
expect($bcardsubtitle.exists()).toBe(true)
85+
const $BCardSubtitle = wrapper.findComponent(BCardSubtitle)
86+
expect($BCardSubtitle.exists()).toBe(true)
8787
})
8888

8989
it('BCardTitle child has text slot title', () => {
@@ -94,12 +94,12 @@ describe('card-body', () => {
9494
expect($bcardtitle.text()).toBe('foobar')
9595
})
9696

97-
it('BCardSubTitle child has text slot subtitle', () => {
97+
it('BCardSubtitle child has text slot subtitle', () => {
9898
const wrapper = mount(BCardBody, {
9999
slots: {subtitle: 'foobar'},
100100
})
101-
const $bcardsubtitle = wrapper.getComponent(BCardSubTitle)
102-
expect($bcardsubtitle.text()).toBe('foobar')
101+
const $BCardSubtitle = wrapper.getComponent(BCardSubtitle)
102+
expect($BCardSubtitle.text()).toBe('foobar')
103103
})
104104

105105
it('BCardTitle child has text prop title', () => {
@@ -110,12 +110,12 @@ describe('card-body', () => {
110110
expect($bcardtitle.text()).toBe('foobar')
111111
})
112112

113-
it('BCardSubTitle child has text prop subtitle', () => {
113+
it('BCardSubtitle child has text prop subtitle', () => {
114114
const wrapper = mount(BCardBody, {
115115
props: {subtitle: 'foobar'},
116116
})
117-
const $bcardsubtitle = wrapper.getComponent(BCardSubTitle)
118-
expect($bcardsubtitle.text()).toBe('foobar')
117+
const $BCardSubtitle = wrapper.getComponent(BCardSubtitle)
118+
expect($BCardSubtitle.text()).toBe('foobar')
119119
})
120120

121121
it('BCardTitle has internal prop tag as prop titleTag', () => {
@@ -126,20 +126,20 @@ describe('card-body', () => {
126126
expect($bcardtitle.props('tag')).toBe('span')
127127
})
128128

129-
it('BCardSubTitle child has internal prop tag as prop subtitle', () => {
129+
it('BCardSubtitle child has internal prop tag as prop subtitle', () => {
130130
const wrapper = mount(BCardBody, {
131131
props: {subtitle: 'foobar', subtitleTag: 'span'},
132132
})
133-
const $bcardsubtitle = wrapper.getComponent(BCardSubTitle)
134-
expect($bcardsubtitle.props('tag')).toBe('span')
133+
const $BCardSubtitle = wrapper.getComponent(BCardSubtitle)
134+
expect($BCardSubtitle.props('tag')).toBe('span')
135135
})
136136

137-
it('BCardSubTitle child has internal prop textVariant as prop subtitleTextVariant', () => {
137+
it('BCardSubtitle child has internal prop textVariant as prop subtitleTextVariant', () => {
138138
const wrapper = mount(BCardBody, {
139139
props: {subtitle: 'foobar', subtitleTextVariant: 'primary'},
140140
})
141-
const $bcardsubtitle = wrapper.getComponent(BCardSubTitle)
142-
expect($bcardsubtitle.props('textVariant')).toBe('primary')
141+
const $BCardSubtitle = wrapper.getComponent(BCardSubtitle)
142+
expect($BCardSubtitle.props('textVariant')).toBe('primary')
143143
})
144144

145145
it('renders default slot', () => {

packages/bootstrap-vue-3/src/components/BCard/card-sub-title.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
import {enableAutoUnmount, mount} from '@vue/test-utils'
22
import {afterEach, describe, expect, it} from 'vitest'
3-
import BCardSubTitle from './BCardSubTitle.vue'
3+
import BCardSubtitle from './BCardSubtitle.vue'
44

55
describe('card-sub-title', () => {
66
enableAutoUnmount(afterEach)
77

88
it('tag is h4 by default', () => {
9-
const wrapper = mount(BCardSubTitle)
9+
const wrapper = mount(BCardSubtitle)
1010
expect(wrapper.element.tagName).toBe('H6')
1111
})
1212

1313
it('has static class card-text', () => {
14-
const wrapper = mount(BCardSubTitle)
14+
const wrapper = mount(BCardSubtitle)
1515
expect(wrapper.classes()).toContain('card-subtitle')
1616
})
1717

1818
it('has static class mb-2', () => {
19-
const wrapper = mount(BCardSubTitle)
19+
const wrapper = mount(BCardSubtitle)
2020
expect(wrapper.classes()).toContain('mb-2')
2121
})
2222

2323
it('tag is prop tag', () => {
24-
const wrapper = mount(BCardSubTitle, {
24+
const wrapper = mount(BCardSubtitle, {
2525
props: {tag: 'div'},
2626
})
2727
expect(wrapper.element.tagName).toBe('DIV')
2828
})
2929

3030
it('renders default slot', () => {
31-
const wrapper = mount(BCardSubTitle, {
31+
const wrapper = mount(BCardSubtitle, {
3232
slots: {default: 'foobar'},
3333
})
3434
expect(wrapper.text()).toBe('foobar')
3535
})
3636

3737
it('renders prop text', () => {
38-
const wrapper = mount(BCardSubTitle, {
38+
const wrapper = mount(BCardSubtitle, {
3939
props: {text: 'foobar'},
4040
})
4141
expect(wrapper.text()).toBe('foobar')
4242
})
4343

4444
it('renders default slot over prop text', () => {
45-
const wrapper = mount(BCardSubTitle, {
45+
const wrapper = mount(BCardSubtitle, {
4646
props: {text: 'props'},
4747
slots: {default: 'slots'},
4848
})
4949
expect(wrapper.text()).toBe('slots')
5050
})
5151

5252
it('has class text-{type} when prop textVariant', async () => {
53-
const wrapper = mount(BCardSubTitle, {
53+
const wrapper = mount(BCardSubtitle, {
5454
props: {textVariant: 'primary'},
5555
})
5656
expect(wrapper.classes()).toContain('text-primary')

packages/bootstrap-vue-3/src/components/alert.spec.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ describe('alert', () => {
137137
expect(wrapper.emitted()).toHaveProperty('update:modelValue')
138138
})
139139

140-
it('button child on click emits dismissed', async () => {
140+
it('button child on click emits closed', async () => {
141141
const wrapper = mount(BAlert, {
142142
props: {modelValue: true, dismissible: true},
143143
})
144144
const $button = wrapper.get('button')
145145
await $button.trigger('click')
146-
expect(wrapper.emitted()).toHaveProperty('dismissed')
146+
expect(wrapper.emitted()).toHaveProperty('closed')
147147
})
148148

149149
it('button child on click emits update:modelValue and gives value false if prop modelValue boolean', async () => {
@@ -168,28 +168,28 @@ describe('alert', () => {
168168
expect(event).toEqual([0])
169169
})
170170

171-
it('does not have BCloseButton when slot dismissible', () => {
171+
it('does not have BCloseButton when slot close', () => {
172172
const wrapper = mount(BAlert, {
173173
props: {dismissible: true, modelValue: true},
174-
slots: {dismissible: 'foobar'},
174+
slots: {close: 'foobar'},
175175
})
176176
const $closebutton = wrapper.findComponent(BCloseButton)
177177
expect($closebutton.exists()).toBe(false)
178178
})
179179

180-
it('has button child if prop dismissible and slot dismissible', () => {
180+
it('has button child if prop dismissible and slot close', () => {
181181
const wrapper = mount(BAlert, {
182182
props: {modelValue: true, dismissible: true},
183-
slots: {dismissible: 'foobar'},
183+
slots: {close: 'foobar'},
184184
})
185185
const $button = wrapper.find('button')
186186
expect($button.exists()).toBe(true)
187187
})
188188

189-
it('does not have button child if prop dismissible false', () => {
189+
it('does not have button child if prop close false', () => {
190190
const wrapper = mount(BAlert, {
191191
props: {modelValue: true, dismissible: false},
192-
slots: {dismissible: 'foobar'},
192+
slots: {close: 'foobar'},
193193
})
194194
const $button = wrapper.find('button')
195195
expect($button.exists()).toBe(false)
@@ -198,7 +198,7 @@ describe('alert', () => {
198198
it('button child has static attribute type button', () => {
199199
const wrapper = mount(BAlert, {
200200
props: {modelValue: true, dismissible: true},
201-
slots: {dismissible: 'foobar'},
201+
slots: {close: 'foobar'},
202202
})
203203
const $button = wrapper.get('button')
204204
expect($button.attributes('type')).toBe('button')
@@ -207,7 +207,7 @@ describe('alert', () => {
207207
it('button child has static attribute data-bs-dismiss alert', () => {
208208
const wrapper = mount(BAlert, {
209209
props: {modelValue: true, dismissible: true},
210-
slots: {dismissible: 'foobar'},
210+
slots: {close: 'foobar'},
211211
})
212212
const $button = wrapper.get('button')
213213
expect($button.attributes('data-bs-dismiss')).toBe('alert')
@@ -216,27 +216,27 @@ describe('alert', () => {
216216
it('button child on click emits update:modelValue', async () => {
217217
const wrapper = mount(BAlert, {
218218
props: {modelValue: true, dismissible: true},
219-
slots: {dismissible: 'foobar'},
219+
slots: {close: 'foobar'},
220220
})
221221
const $button = wrapper.get('button')
222222
await $button.trigger('click')
223223
expect(wrapper.emitted()).toHaveProperty('update:modelValue')
224224
})
225225

226-
it('button child on click emits dismissed', async () => {
226+
it('button child on click emits closed', async () => {
227227
const wrapper = mount(BAlert, {
228228
props: {modelValue: true, dismissible: true},
229-
slots: {dismissible: 'foobar'},
229+
slots: {close: 'foobar'},
230230
})
231231
const $button = wrapper.get('button')
232232
await $button.trigger('click')
233-
expect(wrapper.emitted()).toHaveProperty('dismissed')
233+
expect(wrapper.emitted()).toHaveProperty('closed')
234234
})
235235

236236
it('button child on click emits update:modelValue and gives value false if prop modelValue boolean', async () => {
237237
const wrapper = mount(BAlert, {
238238
props: {modelValue: true, dismissible: true},
239-
slots: {dismissible: 'foobar'},
239+
slots: {close: 'foobar'},
240240
})
241241
const $button = wrapper.get('button')
242242
await $button.trigger('click')
@@ -248,7 +248,7 @@ describe('alert', () => {
248248
it('button child on click emits update:modelValue and gives value 0 if prop modelValue number', async () => {
249249
const wrapper = mount(BAlert, {
250250
props: {modelValue: 1000, dismissible: true},
251-
slots: {dismissible: 'foobar'},
251+
slots: {close: 'foobar'},
252252
})
253253
const $button = wrapper.get('button')
254254
await $button.trigger('click')

packages/bootstrap-vue-3/src/components/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import BCardFooter from './BCard/BCardFooter.vue'
1616
import BCardGroup from './BCard/BCardGroup.vue'
1717
import BCardHeader from './BCard/BCardHeader.vue'
1818
import BCardImg from './BCard/BCardImg.vue'
19-
import BCardSubTitle from './BCard/BCardSubTitle.vue'
19+
import BCardSubtitle from './BCard/BCardSubtitle.vue'
2020
import BCardText from './BCard/BCardText.vue'
2121
import BCardTitle from './BCard/BCardTitle.vue'
2222
import BCarousel from './BCarousel/BCarousel.vue'
@@ -115,7 +115,7 @@ export default {
115115
BCardGroup,
116116
BCardHeader,
117117
BCardImg,
118-
BCardSubTitle,
118+
BCardSubtitle,
119119
BCardText,
120120
BCardTitle,
121121
BCarousel,

packages/bootstrap-vue-3/src/types/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type {Props as BCardFooterProps} from './BCard/BCardFooter'
2929
export type {Props as BCardGroupProps} from './BCard/BCardGroup'
3030
export type {Props as BCardHeaderProps} from './BCard/BCardHeader'
3131
export type {Props as BCardImgProps} from './BCard/BCardImg'
32-
export type {Props as BCardSubtitleProps} from './BCard/BCardSubTitle'
32+
export type {Props as BCardSubtitleProps} from './BCard/BCardSubtitle'
3333
export type {Props as BCardTitleProps} from './BCard/BCardTitle'
3434
// BCarousel
3535
export type {

0 commit comments

Comments
 (0)