Skip to content

Commit 7f804d3

Browse files
authored
Merge pull request #429 from VividLemon/main
All props are considered optional. types/components adjusted to be in…
2 parents 32c43a5 + 13a5efc commit 7f804d3

File tree

84 files changed

+257
-260
lines changed

Some content is hidden

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

84 files changed

+257
-260
lines changed

src/components/BAccordion/BAccordionItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import {injectionKey} from './BAccordion.vue'
3737
// import type {BAccordionItemProps} from '@/types/components'
3838
3939
interface BAccordionItemProps {
40-
id: string
41-
title: string
40+
id?: string
41+
title?: string
4242
visible?: boolean
4343
}
4444

src/components/BAvatar/BAvatar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ import {toFloat} from '@/utils/number'
3535
import {injectionKey} from './BAvatarGroup.vue'
3636
3737
interface BAvatarProps {
38-
alt: string
39-
ariaLabel: string
38+
alt?: string
39+
ariaLabel?: string
4040
badge?: boolean | string
4141
badgeLeft?: boolean
4242
badgeOffset?: string

src/components/BBreadcrumb/BBreadcrumb.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import BBreadcrumbItem from './BBreadcrumbItem.vue'
1919
// import type {BBreadcrumbProps} from '@/types/components'
2020
2121
interface BBreadcrumbProps {
22-
items: Array<BreadcrumbItem>
22+
items?: Array<BreadcrumbItem>
2323
}
2424
2525
const props = defineProps<BBreadcrumbProps>()

src/components/BCard/BCardFooter.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type {ColorVariant, TextColorVariant} from '@/types'
1414
import {computed} from 'vue'
1515
1616
interface BCardFooterProps {
17-
footer: string
17+
footer?: string
1818
footerBgVariant?: ColorVariant
1919
footerBorderVariant?: ColorVariant
2020
footerClass?: Array<unknown> | Record<string, unknown> | string

src/components/BCard/BCardSubTitle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {TextColorVariant} from '@/types'
1212
import {computed} from 'vue'
1313
1414
interface BCardSubtitleProps {
15-
subTitle: string
15+
subTitle?: string
1616
subTitleTag?: string
1717
subTitleTextVariant?: TextColorVariant
1818
}

src/components/BCard/BCardTitle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// import type {BCardTitleProps} from '@/types/components'
1111
1212
interface BCardTitleProps {
13-
title: string
13+
title?: string
1414
titleTag?: string
1515
}
1616

src/components/BCarousel/BCarousel.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
import type {BCarouselParentData} from '@/types/components'
4646
import {InjectionKey, onMounted, provide, ref, useSlots, VNode} from 'vue'
4747
import Carousel from 'bootstrap/js/dist/carousel'
48-
import useEventListener from '../../composables/useEventListener'
49-
import useId from '../../composables/useId'
48+
import useEventListener from '@/composables/useEventListener'
49+
import useId from '@/composables/useId'
5050
5151
interface BCarouselProps {
52-
id: string
53-
imgHeight: string
54-
imgWidth: string
52+
id?: string
53+
imgHeight?: string
54+
imgWidth?: string
5555
background?: string
5656
modelValue?: number
5757
controls?: boolean

src/components/BCarousel/BCarouselSlide.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ import type {BCarouselParentData} from '@/types/components'
4545
import {injectionKey} from './BCarousel.vue'
4646
4747
interface BCarouselSlideProps {
48-
imgSrc: string
49-
imgHeight: string
50-
imgWidth: string
51-
interval: string | number
48+
imgSrc?: string
49+
imgHeight?: string
50+
imgWidth?: string
51+
interval?: string | number
5252
active?: boolean
5353
background?: string
5454
caption?: string
@@ -77,7 +77,9 @@ const props = withDefaults(defineProps<BCarouselSlideProps>(), {
7777
const parentData = inject<BCarouselParentData>(injectionKey, {})
7878
const computedId = useId(props.id, 'accordion')
7979
// eslint-disable-next-line @typescript-eslint/no-unused-vars
80-
const img = computed<string | true>(() => (props.imgBlank ? props.imgBlank : props.imgSrc))
80+
const img = computed<string | true | undefined>(() =>
81+
props.imgBlank ? props.imgBlank : props.imgSrc
82+
)
8183
8284
const computedAttr = computed(() => ({
8385
background: `${

src/components/BDropdown/BDropdown.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ import useEventListener from '@/composables/useEventListener'
5252
// TODO it seems that some of these props are actually just Popper options
5353
// So some of them could be converted to their pure types similar to Popper.Boundary
5454
interface BDropdownProps {
55-
id: string
56-
menuClass: Array<unknown> | Record<string, unknown> | string
57-
size: Size
58-
splitClass: Array<unknown> | Record<string, unknown> | string
59-
splitVariant: ButtonVariant
60-
text: string
61-
toggleClass: Array<unknown> | Record<string, unknown> | string
55+
id?: string
56+
menuClass?: Array<unknown> | Record<string, unknown> | string
57+
size?: Size
58+
splitClass?: Array<unknown> | Record<string, unknown> | string
59+
splitVariant?: ButtonVariant
60+
text?: string
61+
toggleClass?: Array<unknown> | Record<string, unknown> | string
6262
autoClose?: boolean | 'inside' | 'outside'
6363
block?: boolean
6464
boundary?: Popper.Boundary

src/components/BDropdown/BDropdownGroup.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
import type {ColorVariant} from '@/types'
2929
3030
interface BDropdownGroupProps {
31-
id: string
32-
ariaDescribedby: string
33-
header: string
31+
id?: string
32+
ariaDescribedby?: string
33+
header?: string
3434
headerClasses?: string | Array<unknown> | Record<string, unknown>
3535
headerTag?: string
3636
headerVariant?: ColorVariant

0 commit comments

Comments
 (0)