Skip to content

Commit 3d0ca4a

Browse files
author
issayah
committed
Added in edge cases where they extend another Prop
1 parent 15d5a34 commit 3d0ca4a

File tree

12 files changed

+142
-16
lines changed

12 files changed

+142
-16
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
import type {ColorVariant} from 'src/types'
2+
import type {BLinkProps} from '..'
13
// Props
2-
export type LinkProps = Omit<Props, 'event'>
4+
export interface Props extends Omit<BLinkProps, 'event' | 'routerTag'> {
5+
pill?: boolean
6+
tag?: string
7+
variant?: ColorVariant
8+
textIndicator?: boolean
9+
dotIndicator?: boolean
10+
}
311
// Emits
412

513
// Other

src/types/components/BBreadcrumb/BBreadcrumb.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import {BreadcrumbItem} from 'src/types'
12
// Props
23
export interface Props {
3-
items: Array<BreadcrumbItem> // TODO whatever this is
4+
items: Array<BreadcrumbItem>
45
}
56
// Emits
67

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
import {BLinkProps} from '..'
12
// Props
2-
3+
export interface Props extends Omit<BLinkProps, 'event' | 'routerTag'> {
4+
active?: boolean
5+
ariaCurrent?: string
6+
disabled?: boolean
7+
text?: string
8+
}
39
// Emits
410

511
// Other
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
import type {ButtonVariant, InputSize, LinkTarget} from 'src/types'
2+
import type {BLinkProps} from '..'
13
// Props
2-
4+
export interface Props extends BLinkProps {
5+
active?: boolean
6+
disabled?: boolean
7+
href?: string
8+
pill?: boolean
9+
pressed?: boolean
10+
rel?: string
11+
size?: InputSize
12+
squared?: boolean
13+
tag?: string
14+
target?: LinkTarget
15+
type?: string
16+
variant?: ButtonVariant
17+
}
318
// Emits
4-
19+
export interface Emits {
20+
(e: 'clicked', value: PointerEvent): void
21+
(e: 'update:pressed', value: boolean): void
22+
}
523
// Other
Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1+
import type {InputType} from 'src/types'
2+
import type {FormCommonInputProps} from 'src/types/composables'
3+
14
// Props
2-
export interface Props {
3-
5+
export interface Props extends FormCommonInputProps {
6+
// debounce?: string | number
7+
max?: string | number
8+
min?: string | number
9+
// noWheel?: boolean
10+
step?: string | number
11+
type?: InputType
412
}
513
// Emits
6-
14+
export interface Emits {
15+
(e: 'update:modelValue', value: unknown): void
16+
(e: 'change', value: unknown): void
17+
(e: 'blur', value: unknown): void
18+
(e: 'input', value: unknown): void
19+
}
720
// Other
21+
type AllowedTypes =
22+
| 'text'
23+
| 'number'
24+
| 'email'
25+
| 'password'
26+
| 'search'
27+
| 'url'
28+
| 'tel'
29+
| 'date'
30+
| 'time'
31+
| 'range'
32+
| 'color'
Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
// Props
1+
import type {FormCommonInputProps} from 'src/types/composables'
22

3+
// Props
4+
export interface Props extends FormCommonInputProps {
5+
noResize?: boolean
6+
rows?: string | number
7+
wrap?: string
8+
}
39
// Emits
4-
10+
export interface Emits {
11+
(e: 'update:modelValue', value: unknown): void
12+
(e: 'change', value: unknown): void
13+
(e: 'blur', value: unknown): void
14+
(e: 'input', value: unknown): void
15+
}
516
// Other

src/types/components/BLink/BLink.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface Props {
1818
routerTag?: string
1919
target?: LinkTarget
2020
to?: RouteLocationRaw
21-
} // TODO look at this
21+
}
2222
// Emits
2323
export interface Emits {
2424
(e: 'click', value: PointerEvent): void

src/types/components/BOverlay/BOverlay.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface Emits {
3535
(e: 'shown'): void
3636
}
3737
// Other
38-
export interface ISlotScope {
38+
export interface SlotScope {
3939
spinnerType: string | null
4040
spinnerVariant: string | null
4141
spinnerSmall: boolean
Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,32 @@
1+
import {BodyProp} from 'src/components/BToast/plugin'
2+
import {ColorVariant} from 'src/types'
3+
import type {BLinkProps} from '..'
14
// Props
2-
export interface Props {
3-
5+
export interface Props extends BLinkProps {
6+
title: string
7+
bodyClass: string
8+
headerClass: string
9+
id: string
10+
delay?: number
11+
body?: BodyProp
12+
headerTag?: string
13+
animation?: boolean
14+
// Switches role to 'status' and aria-live to 'polite'
15+
isStatus?: boolean
16+
autoHide?: boolean
17+
noCloseButton?: boolean
18+
noFade?: boolean
19+
noHoverPause?: boolean
20+
solid?: boolean
21+
// Render the toast in place, rather than in a portal-target
22+
static?: boolean
23+
modelValue?: boolean
24+
toastClass?: Array<string>
25+
variant?: ColorVariant
426
}
527
// Emits
6-
28+
export interface Emits {
29+
(e: 'destroyed', value: Props['id']): void
30+
(e: 'update:modelValue', value: Props['modelValue']): void // TODO replace all self referencing syntax to this style
31+
}
732
// Other

src/types/components/BTransition/BTransition.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
import {TransitionMode} from 'src/types'
2+
13
// Props
24
export interface Props {
3-
5+
appear?: boolean
6+
mode?: TransitionMode
7+
noFade?: boolean
8+
transProps?: Record<string, unknown>
49
}
510
// Emits
611

0 commit comments

Comments
 (0)