Skip to content

Commit fa63831

Browse files
committed
docs: add more to parityList
feat(BAlert)!: rename slot dismissible to close feat(ButtonToolbar): make prop role feat(CloseButton): emit click event up
1 parent 534bfa5 commit fa63831

File tree

8 files changed

+1008
-769
lines changed

8 files changed

+1008
-769
lines changed

apps/docs/docs/reference/parityList.md

Lines changed: 987 additions & 757 deletions
Large diffs are not rendered by default.

packages/bootstrap-vue-3/src/components/BAccordion/BAccordion.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ interface BAccordionProps {
2020
const props = withDefaults(defineProps<BAccordionProps>(), {
2121
flush: false,
2222
free: false,
23-
id: undefined,
2423
})
2524
2625
const computedId = useId(toRef(props, 'id'), 'accordion')

packages/bootstrap-vue-3/src/components/BAlert.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<div v-if="isAlertVisible" ref="element" class="alert" role="alert" :class="classes">
33
<slot />
44
<template v-if="dismissibleBoolean">
5-
<button v-if="$slots.dismissible" type="button" data-bs-dismiss="alert" @click="closeClicked">
6-
<slot name="dismiss" />
5+
<button v-if="$slots.close" type="button" data-bs-dismiss="alert" @click="closeClicked">
6+
<slot name="close" />
77
</button>
88
<b-close-button
99
v-else

packages/bootstrap-vue-3/src/components/BAvatar/BAvatar.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
import {isEmptySlot, isNumeric, toFloat} from '../../utils'
3030
import type {BAvatarGroupParentData} from '../../types/components'
3131
import {computed, inject, StyleValue, toRef, useSlots} from 'vue'
32-
import type {Booleanish, ColorVariant} from '../../types'
32+
import type {Booleanish, ColorVariant, TextColorVariant} from '../../types'
3333
import {injectionKey} from './BAvatarGroup.vue'
3434
import {useBooleanish} from '../../composables'
3535
3636
interface BAvatarProps {
37-
alt?: string // TODO each complex variant should contain a note about it's type
37+
alt?: string
3838
ariaLabel?: string
3939
badge?: boolean | string
4040
badgeLeft?: Booleanish
@@ -46,12 +46,11 @@ interface BAvatarProps {
4646
disabled?: Booleanish
4747
icon?: string
4848
rounded?: boolean | string
49-
size?: 'sm' | 'md' | 'lg' | string
50-
// size?: InputSize | string
49+
size?: 'sm' | 'md' | 'lg' | string // InputSize | string
5150
square?: Booleanish
5251
src?: string
5352
text?: string
54-
textVariant?: ColorVariant
53+
textVariant?: TextColorVariant
5554
variant?: ColorVariant
5655
}
5756
@@ -185,6 +184,7 @@ const marginStyle = computed(() => {
185184
return value ? {marginLeft: value, marginRight: value} : {}
186185
})
187186
187+
// TODO this is incorrect. If buttonType is 'submit' and prop button is true, it will break the component
188188
const tag = computed<string>(() => (buttonBoolean.value ? props.buttonType : 'span'))
189189
const tagStyle = computed(() => ({
190190
...marginStyle.value,

packages/bootstrap-vue-3/src/components/BAvatar/BAvatarGroup.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {computeSize} from './BAvatar.vue'
1818
interface BAvatarGroupProps {
1919
overlap?: number | string
2020
rounded?: boolean | string
21-
size?: 'sm' | 'md' | 'lg' | string
22-
// size?: InputSize | string
21+
size?: 'sm' | 'md' | 'lg' | string // size?: InputSize | string
2322
square?: Booleanish
2423
tag?: string
2524
variant?: ColorVariant

packages/bootstrap-vue-3/src/components/BButton/BButtonToolbar.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :class="classes" class="btn-toolbar" role="toolbar" :aria-label="ariaLabel">
2+
<div :class="classes" class="btn-toolbar" :role="role" :aria-label="ariaLabel">
33
<slot />
44
</div>
55
</template>
@@ -13,10 +13,12 @@ import {useBooleanish} from '../../composables'
1313
interface BButtonToolbarProps {
1414
ariaLabel?: string
1515
justify?: Booleanish
16+
role?: string
1617
// keyNav?: Booleanish
1718
}
1819
1920
const props = withDefaults(defineProps<BButtonToolbarProps>(), {
21+
role: 'toolbar',
2022
ariaLabel: 'Group',
2123
justify: false,
2224
})

packages/bootstrap-vue-3/src/components/BButton/BCloseButton.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:disabled="disabledBoolean"
66
:class="classes"
77
:aria-label="ariaLabel"
8+
@click="emit('click', $event)"
89
/>
910
</template>
1011

@@ -15,9 +16,9 @@ import type {Booleanish, ButtonType} from '../../types'
1516
import {useBooleanish} from '../../composables'
1617
1718
interface BCloseButtonProps {
19+
ariaLabel?: string
1820
disabled?: Booleanish
1921
white?: Booleanish
20-
ariaLabel?: string
2122
type?: ButtonType
2223
}
2324
@@ -28,6 +29,12 @@ const props = withDefaults(defineProps<BCloseButtonProps>(), {
2829
type: 'button',
2930
})
3031
32+
interface BCloseButtonEmits {
33+
(e: 'click', value: MouseEvent): void
34+
}
35+
36+
const emit = defineEmits<BCloseButtonEmits>()
37+
3138
const disabledBoolean = useBooleanish(toRef(props, 'disabled'))
3239
const whiteBoolean = useBooleanish(toRef(props, 'white'))
3340

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import type {Booleanish} from '../../types'
88
import {useBooleanish} from '../../composables'
99
import {computed, toRef} from 'vue'
1010
11+
// TODO how does this separate from a simple b-img?
12+
1113
interface BCardImgProps {
1214
alt?: string
1315
bottom?: Booleanish

0 commit comments

Comments
 (0)