@telus-uds/components-base 4.0.0-alpha.2 → 4.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -1
- package/lib/cjs/Autocomplete/Autocomplete.js +13 -1
- package/lib/cjs/Autocomplete/constants.js +1 -1
- package/lib/cjs/Listbox/ListboxOverlay.js +7 -1
- package/lib/cjs/MultiSelectFilter/ModalOverlay.js +7 -1
- package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +2 -28
- package/lib/cjs/TextInput/TextInputBase.js +2 -1
- package/lib/cjs/utils/useOverlaidPosition.js +83 -42
- package/lib/esm/Autocomplete/Autocomplete.js +13 -1
- package/lib/esm/Autocomplete/constants.js +1 -1
- package/lib/esm/Listbox/ListboxOverlay.js +7 -1
- package/lib/esm/MultiSelectFilter/ModalOverlay.js +8 -2
- package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +2 -28
- package/lib/esm/TextInput/TextInputBase.js +2 -1
- package/lib/esm/utils/useOverlaidPosition.js +83 -42
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/Autocomplete/Autocomplete.jsx +11 -2
- package/src/Autocomplete/constants.js +1 -1
- package/src/Listbox/ListboxOverlay.jsx +6 -2
- package/src/MultiSelectFilter/ModalOverlay.jsx +9 -3
- package/src/MultiSelectFilter/MultiSelectFilter.jsx +1 -31
- package/src/TextInput/TextInputBase.jsx +2 -1
- package/src/utils/useOverlaidPosition.js +84 -34
- package/types/A11yInfoProvider.d.ts +9 -0
- package/types/A11yText.d.ts +13 -0
- package/types/ActionCard.d.ts +19 -0
- package/types/ActivityIndicator.d.ts +13 -0
- package/types/Autocomplete.d.ts +27 -0
- package/types/Badge.d.ts +15 -4
- package/types/BaseProvider.d.ts +26 -0
- package/types/Box.d.ts +13 -3
- package/types/Button.d.ts +35 -0
- package/types/Card.d.ts +19 -0
- package/types/CardGroup.d.ts +23 -0
- package/types/Carousel.d.ts +25 -0
- package/types/Checkbox.d.ts +15 -2
- package/types/CheckboxCard.d.ts +20 -0
- package/types/CheckboxCardGroup.d.ts +10 -4
- package/types/ChevronLink.d.ts +9 -2
- package/types/ColourToggle.d.ts +16 -0
- package/types/Common.d.ts +7 -3
- package/types/Divider.d.ts +13 -1
- package/types/DownloadApp.d.ts +19 -0
- package/types/ExpandCollapse.d.ts +16 -9
- package/types/ExpandCollapseMini.d.ts +16 -0
- package/types/Feedback.d.ts +16 -0
- package/types/Fieldset.d.ts +17 -0
- package/types/FileUpload.d.ts +6 -0
- package/types/FlexGrid.d.ts +57 -0
- package/types/Footnote.d.ts +18 -0
- package/types/HorizontalScroll.d.ts +15 -0
- package/types/HorizontalScrollButton.d.ts +17 -1
- package/types/Icon.d.ts +13 -2
- package/types/IconButton.d.ts +19 -0
- package/types/InputLabel.d.ts +12 -0
- package/types/InputSupports.d.ts +19 -0
- package/types/Link.d.ts +20 -4
- package/types/List.d.ts +11 -4
- package/types/Listbox.d.ts +13 -3
- package/types/Modal.d.ts +25 -0
- package/types/MultiSelectFilter.d.ts +24 -0
- package/types/Notification.d.ts +19 -0
- package/types/OrderedList.d.ts +17 -0
- package/types/Pagination.d.ts +25 -0
- package/types/Portal.d.ts +5 -1
- package/types/PriceLockup.d.ts +28 -0
- package/types/ProductCard.d.ts +20 -0
- package/types/ProductCardGroup.d.ts +21 -0
- package/types/Progress.d.ts +22 -0
- package/types/QuickLinks.d.ts +27 -0
- package/types/QuickLinksFeature.d.ts +27 -0
- package/types/Radio.d.ts +22 -0
- package/types/RadioCard.d.ts +21 -0
- package/types/Responsive.d.ts +14 -0
- package/types/Scroll.d.ts +2 -2
- package/types/Search.d.ts +15 -2
- package/types/Select.d.ts +12 -4
- package/types/SideNav.d.ts +38 -0
- package/types/Skeleton.d.ts +17 -0
- package/types/SkipLink.d.ts +14 -0
- package/types/Spacer.d.ts +8 -1
- package/types/StackView.d.ts +8 -2
- package/types/Status.d.ts +2 -3
- package/types/StepTracker.d.ts +16 -0
- package/types/TabBar.d.ts +25 -0
- package/types/Tabs.d.ts +12 -3
- package/types/Tags.d.ts +24 -0
- package/types/TextButton.d.ts +11 -4
- package/types/TextInput.d.ts +38 -0
- package/types/ThemeProvider.d.ts +29 -0
- package/types/Timeline.d.ts +16 -0
- package/types/ToggleSwitch.d.ts +11 -2
- package/types/ToolTip.d.ts +7 -3
- package/types/TooltipButton.d.ts +20 -0
- package/types/Typography.d.ts +8 -2
- package/types/Validator.d.ts +16 -0
- package/types/ViewportProvider.d.ts +12 -0
- package/types/index.d.ts +197 -50
package/types/Badge.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
1
3
|
export interface BadgeProps {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
variant?: BadgeVariants
|
|
6
|
+
tokens?: BadgeTokens
|
|
7
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
8
|
+
onLayout?: (event: any) => void
|
|
9
|
+
nativeID?: string
|
|
10
|
+
testID?: string
|
|
11
|
+
dataSet?: Record<string, any>
|
|
5
12
|
}
|
|
6
13
|
|
|
7
|
-
type BadgeVariants = {
|
|
14
|
+
export type BadgeVariants = {
|
|
8
15
|
alternative?: boolean
|
|
9
16
|
inverse?: boolean
|
|
10
17
|
outline?: boolean
|
|
@@ -26,3 +33,7 @@ export type BadgeTokens = {
|
|
|
26
33
|
paddingRight?: number
|
|
27
34
|
paddingTop?: number
|
|
28
35
|
}
|
|
36
|
+
|
|
37
|
+
declare const Badge: ComponentType<BadgeProps>
|
|
38
|
+
|
|
39
|
+
export { Badge }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ThemeMetadata {
|
|
4
|
+
themeTokensVersion: string
|
|
5
|
+
name: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface Theme {
|
|
9
|
+
metadata: ThemeMetadata
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ThemeOptions {
|
|
13
|
+
forceAbsoluteFontSizing?: boolean
|
|
14
|
+
forceZIndex?: boolean
|
|
15
|
+
defaultViewport?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BaseProviderProps {
|
|
19
|
+
children: ReactNode
|
|
20
|
+
defaultTheme: Theme
|
|
21
|
+
themeOptions?: ThemeOptions
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const BaseProvider: ComponentType<BaseProviderProps>
|
|
25
|
+
|
|
26
|
+
export { BaseProvider }
|
package/types/Box.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode, ReactElement } from 'react'
|
|
1
|
+
import type { ComponentType, ReactNode, ReactElement } from 'react'
|
|
2
2
|
import { ScrollViewProps } from 'react-native'
|
|
3
3
|
import { ResponsiveSpacing, SemanticTag } from './Common'
|
|
4
4
|
|
|
5
|
-
type BoxVariants = {
|
|
5
|
+
export type BoxVariants = {
|
|
6
6
|
background?:
|
|
7
7
|
| 'lightest'
|
|
8
8
|
| 'lighter'
|
|
@@ -21,7 +21,7 @@ type BoxVariants = {
|
|
|
21
21
|
| 'featureBrand'
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
type BoxTokens = {
|
|
24
|
+
export type BoxTokens = {
|
|
25
25
|
backgroundColor?: string
|
|
26
26
|
gradient?: string
|
|
27
27
|
borderWidth?: number
|
|
@@ -49,4 +49,14 @@ export interface BoxProps {
|
|
|
49
49
|
testID?: string
|
|
50
50
|
accessibilityLabel?: string
|
|
51
51
|
accessible?: boolean
|
|
52
|
+
customGradient?: (...args: any[]) => ReactNode
|
|
53
|
+
backgroundImage?: any
|
|
54
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
55
|
+
onLayout?: (event: any) => void
|
|
56
|
+
nativeID?: string
|
|
57
|
+
dataSet?: Record<string, any>
|
|
52
58
|
}
|
|
59
|
+
|
|
60
|
+
declare const Box: ComponentType<BoxProps>
|
|
61
|
+
|
|
62
|
+
export { Box }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
import { IconProps } from './Icon'
|
|
3
|
+
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
children: ReactNode | ((state: ButtonPressableState) => ReactNode)
|
|
6
|
+
onPress?: () => void
|
|
7
|
+
inactive?: boolean
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
heightFull?: boolean
|
|
10
|
+
iconPosition?: 'left' | 'right'
|
|
11
|
+
icon?: ComponentType<any>
|
|
12
|
+
iconProps?: IconProps
|
|
13
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
14
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
15
|
+
accessibilityLabel?: string
|
|
16
|
+
accessibilityRole?: string
|
|
17
|
+
accessible?: boolean
|
|
18
|
+
testID?: string
|
|
19
|
+
dataSet?: Record<string, any>
|
|
20
|
+
href?: string
|
|
21
|
+
hrefAttrs?: Record<string, string>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type ButtonPressableState = {
|
|
25
|
+
hovered: boolean
|
|
26
|
+
focused: boolean
|
|
27
|
+
pressed: boolean
|
|
28
|
+
inactive: boolean
|
|
29
|
+
selected: boolean
|
|
30
|
+
textStyles: Record<string, any>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const Button: ComponentType<ButtonProps>
|
|
34
|
+
|
|
35
|
+
export { Button }
|
package/types/Card.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CardProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
6
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
7
|
+
onPress?: () => void
|
|
8
|
+
id?: string
|
|
9
|
+
interactiveCard?: Record<string, any>
|
|
10
|
+
backgroundImage?: any
|
|
11
|
+
testID?: string
|
|
12
|
+
dataSet?: Record<string, any>
|
|
13
|
+
accessibilityLabel?: string
|
|
14
|
+
accessibilityRole?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const Card: ComponentType<CardProps>
|
|
18
|
+
|
|
19
|
+
export { Card }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CardGroupItem {
|
|
4
|
+
id: string
|
|
5
|
+
image?: Record<string, any>
|
|
6
|
+
dictionary?: Record<string, any>
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface CardGroupProps {
|
|
11
|
+
copy?: 'en' | 'fr'
|
|
12
|
+
dictionary?: Record<string, any>
|
|
13
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
14
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
15
|
+
items?: CardGroupItem[]
|
|
16
|
+
children?: ReactNode
|
|
17
|
+
testID?: string
|
|
18
|
+
dataSet?: Record<string, any>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const CardGroup: ComponentType<CardGroupProps>
|
|
22
|
+
|
|
23
|
+
export { CardGroup }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CarouselProps {
|
|
4
|
+
children: ReactNode
|
|
5
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
6
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
7
|
+
stepTrackerVariant?: Record<string, string | number | boolean | undefined>
|
|
8
|
+
progressBarVariant?: Record<string, string | number | boolean | undefined>
|
|
9
|
+
itemLabel?: string
|
|
10
|
+
previousNextNavigationPosition?: 'inside' | 'outside' | 'edge'
|
|
11
|
+
copy?: 'en' | 'fr'
|
|
12
|
+
testID?: string
|
|
13
|
+
dataSet?: Record<string, any>
|
|
14
|
+
accessibilityLabel?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CarouselItemProps {
|
|
18
|
+
children: ReactNode
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const Carousel: ComponentType<CarouselProps> & {
|
|
22
|
+
Item: ComponentType<CarouselItemProps>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { Carousel }
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
1
2
|
import { StyleProp, ViewStyle, TextStyle } from 'react-native'
|
|
2
3
|
|
|
3
|
-
type CheckboxTokens = {
|
|
4
|
+
export type CheckboxTokens = {
|
|
4
5
|
containerBackgroundColor?: string
|
|
5
6
|
feedbackMarginBottom?: number
|
|
6
7
|
feedbackMarginTop?: number
|
|
@@ -33,7 +34,7 @@ type CheckboxTokens = {
|
|
|
33
34
|
descriptionFontColor?: string
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
type CheckboxProps = {
|
|
37
|
+
export type CheckboxProps = {
|
|
37
38
|
checked?: boolean
|
|
38
39
|
defaultChecked?: boolean
|
|
39
40
|
error?: boolean
|
|
@@ -50,4 +51,16 @@ type CheckboxProps = {
|
|
|
50
51
|
style?: StyleProp<ViewStyle>
|
|
51
52
|
labelStyle?: StyleProp<TextStyle>
|
|
52
53
|
containerStyle?: StyleProp<ViewStyle>
|
|
54
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
55
|
+
onLayout?: (event: any) => void
|
|
56
|
+
nativeID?: string
|
|
57
|
+
testID?: string
|
|
58
|
+
dataSet?: Record<string, any>
|
|
59
|
+
accessibilityLabel?: string
|
|
60
|
+
accessibilityRole?: string
|
|
61
|
+
accessible?: boolean
|
|
53
62
|
}
|
|
63
|
+
|
|
64
|
+
declare const Checkbox: ComponentType<CheckboxProps>
|
|
65
|
+
|
|
66
|
+
export { Checkbox }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface CheckboxCardProps {
|
|
4
|
+
title?: string
|
|
5
|
+
children?: ReactNode | ((state: Record<string, any>) => ReactNode)
|
|
6
|
+
checked?: boolean
|
|
7
|
+
defaultChecked?: boolean
|
|
8
|
+
inactive?: boolean
|
|
9
|
+
id?: string
|
|
10
|
+
onChange?: (checked: boolean) => void
|
|
11
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
12
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
13
|
+
testID?: string
|
|
14
|
+
dataSet?: Record<string, any>
|
|
15
|
+
accessibilityLabel?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const CheckboxCard: ComponentType<CheckboxCardProps>
|
|
19
|
+
|
|
20
|
+
export { CheckboxCard }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
2
|
import { Direction, ResponsiveDirection } from './Common'
|
|
3
3
|
|
|
4
|
-
type CheckboxCardGroupProps = {
|
|
4
|
+
export type CheckboxCardGroupProps = {
|
|
5
5
|
copy?: 'en' | 'fr'
|
|
6
6
|
variant?: 'fullWidth'
|
|
7
7
|
legend?: string
|
|
@@ -15,9 +15,11 @@ type CheckboxCardGroupProps = {
|
|
|
15
15
|
onChange?: (checkedIds: string[]) => void
|
|
16
16
|
readOnly?: boolean
|
|
17
17
|
inactive?: boolean
|
|
18
|
+
items?: any[]
|
|
19
|
+
name?: string
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
type CheckboxCardGroupTokens = {
|
|
22
|
+
export type CheckboxCardGroupTokens = {
|
|
21
23
|
borderBottomLeftRadius?: number
|
|
22
24
|
borderBottomRightRadius?: number
|
|
23
25
|
borderTopLeftRadius?: number
|
|
@@ -30,7 +32,7 @@ type CheckboxCardGroupTokens = {
|
|
|
30
32
|
space?: number
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
type
|
|
35
|
+
export type CheckboxCardTokens = {
|
|
34
36
|
outerBorderColer?: string
|
|
35
37
|
outerBorderWidth?: number
|
|
36
38
|
outerBorderGap?: number
|
|
@@ -70,3 +72,7 @@ type checkboxCardTokens = {
|
|
|
70
72
|
checkboxSpace?: number
|
|
71
73
|
contentSpace?: number
|
|
72
74
|
}
|
|
75
|
+
|
|
76
|
+
declare const CheckboxCardGroup: ComponentType<CheckboxCardGroupProps>
|
|
77
|
+
|
|
78
|
+
export { CheckboxCardGroup }
|
package/types/ChevronLink.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
1
2
|
import { IconProps, IconPositionLeftRight } from './Icon'
|
|
2
3
|
import { LinkAndTextButtonVariants } from './Link'
|
|
3
4
|
|
|
4
|
-
type ChevronLinkTokens = {
|
|
5
|
+
export type ChevronLinkTokens = {
|
|
5
6
|
fontSize?: number
|
|
6
7
|
color?: string
|
|
7
8
|
outerBorderColor?: string
|
|
@@ -24,9 +25,10 @@ type ChevronLinkTokens = {
|
|
|
24
25
|
iconTranslateY?: number
|
|
25
26
|
alignSelf?: 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
|
|
26
27
|
}
|
|
28
|
+
|
|
27
29
|
export interface ChevronLinkProps {
|
|
28
30
|
testID?: string
|
|
29
|
-
children?:
|
|
31
|
+
children?: ReactNode
|
|
30
32
|
onPress?: () => void
|
|
31
33
|
onPressIn?: () => void
|
|
32
34
|
onPressOut?: () => void
|
|
@@ -38,6 +40,7 @@ export interface ChevronLinkProps {
|
|
|
38
40
|
tokens?: ChevronLinkTokens
|
|
39
41
|
direction?: IconPositionLeftRight
|
|
40
42
|
variant?: LinkAndTextButtonVariants
|
|
43
|
+
dataSet?: Record<string, any>
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
export interface HrefProps {
|
|
@@ -45,3 +48,7 @@ export interface HrefProps {
|
|
|
45
48
|
rel: string
|
|
46
49
|
target: string
|
|
47
50
|
}
|
|
51
|
+
|
|
52
|
+
declare const ChevronLink: ComponentType<ChevronLinkProps>
|
|
53
|
+
|
|
54
|
+
export { ChevronLink }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ColourToggleProps {
|
|
4
|
+
id?: string
|
|
5
|
+
colourHexCode?: string
|
|
6
|
+
colourName?: string
|
|
7
|
+
isSelected?: boolean
|
|
8
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
9
|
+
onPress?: () => void
|
|
10
|
+
testID?: string
|
|
11
|
+
dataSet?: Record<string, any>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const ColourToggle: ComponentType<ColourToggleProps>
|
|
15
|
+
|
|
16
|
+
export { ColourToggle }
|
package/types/Common.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export type SemanticTag =
|
|
|
72
72
|
| 'section'
|
|
73
73
|
| 'label'
|
|
74
74
|
|
|
75
|
-
type headingType = {
|
|
75
|
+
export type headingType = {
|
|
76
76
|
H1: 'h1'
|
|
77
77
|
H2: 'h2'
|
|
78
78
|
H3: 'h1'
|
|
@@ -81,7 +81,7 @@ type headingType = {
|
|
|
81
81
|
H6: 'h2'
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
type tagType = {
|
|
84
|
+
export type tagType = {
|
|
85
85
|
HEADING: headingType
|
|
86
86
|
BLOCKQUOTE: 'blockquote'
|
|
87
87
|
CODE: 'code'
|
|
@@ -93,7 +93,7 @@ type tagType = {
|
|
|
93
93
|
LABEL: 'label'
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
type alignType = {
|
|
96
|
+
export type alignType = {
|
|
97
97
|
AUTO: 'auto'
|
|
98
98
|
LEFT: 'left'
|
|
99
99
|
RIGHT: 'right'
|
|
@@ -104,3 +104,7 @@ type alignType = {
|
|
|
104
104
|
export type FlexAlign = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline'
|
|
105
105
|
|
|
106
106
|
export type FlexJustify = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around'
|
|
107
|
+
|
|
108
|
+
export type TextAlign = 'auto' | 'left' | 'right' | 'center' | 'justify'
|
|
109
|
+
|
|
110
|
+
export type Variant = Record<string, string | number | boolean | undefined>
|
package/types/Divider.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
1
2
|
import { ResponsiveSpacing, Size } from './Common'
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
export type DividerVariants = {
|
|
3
5
|
weight?: 'regular' | 'thick'
|
|
4
6
|
decorative?: boolean
|
|
5
7
|
inverse?: boolean
|
|
@@ -11,9 +13,19 @@ export interface DividerProps {
|
|
|
11
13
|
space?: number | ResponsiveSpacing
|
|
12
14
|
tokens?: DividerTokens
|
|
13
15
|
variant?: DividerVariants
|
|
16
|
+
accessibilityLabel?: string
|
|
17
|
+
accessibilityRole?: string
|
|
18
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
19
|
+
onLayout?: (event: any) => void
|
|
20
|
+
nativeID?: string
|
|
21
|
+
dataSet?: Record<string, any>
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
export interface DividerTokens {
|
|
17
25
|
width?: Size
|
|
18
26
|
color?: string
|
|
19
27
|
}
|
|
28
|
+
|
|
29
|
+
declare const Divider: ComponentType<DividerProps>
|
|
30
|
+
|
|
31
|
+
export { Divider }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType, ElementType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface DownloadAppProps {
|
|
4
|
+
copy?: 'en' | 'fr'
|
|
5
|
+
dictionary?: Record<string, any>
|
|
6
|
+
type?: 'android' | 'ios'
|
|
7
|
+
href?: string
|
|
8
|
+
onPress?: () => void
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
11
|
+
LinkRouter?: ElementType
|
|
12
|
+
linkRouterProps?: Record<string, any>
|
|
13
|
+
testID?: string
|
|
14
|
+
dataSet?: Record<string, any>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const DownloadApp: ComponentType<DownloadAppProps>
|
|
18
|
+
|
|
19
|
+
export { DownloadApp }
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType, ReactNode, Ref } from 'react'
|
|
2
2
|
|
|
3
|
-
type ExpandCollapseVariants = {
|
|
3
|
+
export type ExpandCollapseVariants = {
|
|
4
4
|
compact: boolean
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
type ExpandCollapseTokens = {
|
|
7
|
+
export type ExpandCollapseTokens = {
|
|
8
8
|
borderColor?: string
|
|
9
9
|
borderWidth?: number
|
|
10
10
|
borderStyle?: string
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type ExpandCollapseControlTokens = {
|
|
13
|
+
export type ExpandCollapseControlTokens = {
|
|
14
14
|
backgroundColor?: string
|
|
15
15
|
borderBottomLeftRadius?: number | string
|
|
16
16
|
borderBottomRightRadius?: number | string
|
|
@@ -33,7 +33,7 @@ type ExpandCollapseControlTokens = {
|
|
|
33
33
|
verticalAlign?: string
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
type ExpandFnProps = {
|
|
36
|
+
export type ExpandFnProps = {
|
|
37
37
|
openIds: string[]
|
|
38
38
|
onToggle: (panelId: string) => void
|
|
39
39
|
resetValues: () => void
|
|
@@ -43,11 +43,12 @@ type ExpandFnProps = {
|
|
|
43
43
|
|
|
44
44
|
export type ExpandCollapseProps = {
|
|
45
45
|
tokens?: ExpandCollapseTokens
|
|
46
|
-
children: (expandProps: ExpandFnProps) =>
|
|
46
|
+
children: (expandProps: ExpandFnProps) => ReactNode
|
|
47
47
|
maxOpen?: number
|
|
48
48
|
open?: string[]
|
|
49
49
|
onChange?: (open: string[]) => void
|
|
50
50
|
initialOpen?: string[]
|
|
51
|
+
dataSet?: Record<string, any>
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export type ExpandCollapsePanelProps = {
|
|
@@ -57,9 +58,15 @@ export type ExpandCollapsePanelProps = {
|
|
|
57
58
|
panelId: string
|
|
58
59
|
onToggle?: (panelId: string) => void
|
|
59
60
|
onPress?: (panelId: string) => void
|
|
60
|
-
children:
|
|
61
|
-
control?:
|
|
61
|
+
children: ReactNode | ((expandProps: ExpandFnProps) => ReactNode)
|
|
62
|
+
control?: ReactNode
|
|
62
63
|
controlTokens?: ExpandCollapseControlTokens
|
|
63
|
-
controlRef?:
|
|
64
|
+
controlRef?: Ref<any>
|
|
64
65
|
content?: boolean
|
|
65
66
|
}
|
|
67
|
+
|
|
68
|
+
declare const ExpandCollapse: ComponentType<ExpandCollapseProps> & {
|
|
69
|
+
Panel: ComponentType<ExpandCollapsePanelProps>
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { ExpandCollapse }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ExpandCollapseMiniProps {
|
|
4
|
+
expandTitle: string
|
|
5
|
+
collapseTitle: string
|
|
6
|
+
onPress?: () => void
|
|
7
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
8
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
9
|
+
children?: ReactNode
|
|
10
|
+
testID?: string
|
|
11
|
+
dataSet?: Record<string, any>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const ExpandCollapseMini: ComponentType<ExpandCollapseMiniProps>
|
|
15
|
+
|
|
16
|
+
export { ExpandCollapseMini }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface FeedbackProps {
|
|
4
|
+
title?: string
|
|
5
|
+
children?: string | ReactNode | ((props: Record<string, any>) => ReactNode)
|
|
6
|
+
validation?: 'error' | 'success'
|
|
7
|
+
id?: string
|
|
8
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
9
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
10
|
+
testID?: string
|
|
11
|
+
dataSet?: Record<string, any>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const Feedback: ComponentType<FeedbackProps>
|
|
15
|
+
|
|
16
|
+
export { Feedback }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface FieldsetProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
accessibilityRole?: string
|
|
6
|
+
inactive?: boolean
|
|
7
|
+
name?: string
|
|
8
|
+
showBorderStyle?: boolean
|
|
9
|
+
borderStyle?: Record<string, any>
|
|
10
|
+
style?: Record<string, any>
|
|
11
|
+
testID?: string
|
|
12
|
+
dataSet?: Record<string, any>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const Fieldset: ComponentType<FieldsetProps>
|
|
16
|
+
|
|
17
|
+
export { Fieldset }
|
package/types/FileUpload.d.ts
CHANGED
|
@@ -29,10 +29,16 @@ export interface FileUploadProps {
|
|
|
29
29
|
fileTypes?: string[]
|
|
30
30
|
allowMultipleFiles?: boolean
|
|
31
31
|
maxFileSize?: number
|
|
32
|
+
minFileSize?: number
|
|
32
33
|
maxFilesCount?: number
|
|
33
34
|
onUpload?: (files: any) => void
|
|
34
35
|
onDelete?: (file: any) => void
|
|
35
36
|
documentPicker?: Record<string, any>
|
|
37
|
+
dictionary?: Record<string, any>
|
|
38
|
+
accessibilityLabel?: string
|
|
39
|
+
accessibilityRole?: string
|
|
40
|
+
testID?: string
|
|
41
|
+
dataSet?: Record<string, any>
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
declare const FileUpload: ComponentType<FileUploadProps>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface FlexGridRowProps {
|
|
4
|
+
children: ReactNode
|
|
5
|
+
verticalAlign?: 'top' | 'middle' | 'bottom'
|
|
6
|
+
horizontalAlign?: 'left' | 'center' | 'right' | 'around' | 'between'
|
|
7
|
+
xsReverse?: boolean
|
|
8
|
+
smReverse?: boolean
|
|
9
|
+
mdReverse?: boolean
|
|
10
|
+
lgReverse?: boolean
|
|
11
|
+
xlReverse?: boolean
|
|
12
|
+
testID?: string
|
|
13
|
+
dataSet?: Record<string, any>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface FlexGridColProps {
|
|
17
|
+
children?: ReactNode
|
|
18
|
+
xs?: number
|
|
19
|
+
sm?: number
|
|
20
|
+
md?: number
|
|
21
|
+
lg?: number
|
|
22
|
+
xl?: number
|
|
23
|
+
xsOffset?: number
|
|
24
|
+
smOffset?: number
|
|
25
|
+
mdOffset?: number
|
|
26
|
+
lgOffset?: number
|
|
27
|
+
xlOffset?: number
|
|
28
|
+
xsHidden?: boolean
|
|
29
|
+
smHidden?: boolean
|
|
30
|
+
mdHidden?: boolean
|
|
31
|
+
lgHidden?: boolean
|
|
32
|
+
xlHidden?: boolean
|
|
33
|
+
testID?: string
|
|
34
|
+
dataSet?: Record<string, any>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface FlexGridProps {
|
|
38
|
+
children?: ReactNode
|
|
39
|
+
limitWidth?: boolean
|
|
40
|
+
gutter?: boolean
|
|
41
|
+
outsideGutter?: boolean
|
|
42
|
+
xsReverse?: boolean
|
|
43
|
+
smReverse?: boolean
|
|
44
|
+
mdReverse?: boolean
|
|
45
|
+
lgReverse?: boolean
|
|
46
|
+
xlReverse?: boolean
|
|
47
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
48
|
+
testID?: string
|
|
49
|
+
dataSet?: Record<string, any>
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare const FlexGrid: ComponentType<FlexGridProps> & {
|
|
53
|
+
Row: ComponentType<FlexGridRowProps>
|
|
54
|
+
Col: ComponentType<FlexGridColProps>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { FlexGrid }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface FootnoteProps {
|
|
4
|
+
content?: string | ReactNode
|
|
5
|
+
copy?: 'en' | 'fr' | { heading: string; close: string }
|
|
6
|
+
isOpen?: boolean
|
|
7
|
+
number?: number
|
|
8
|
+
onClose: (event: any, options?: { returnFocus?: boolean }) => void
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
11
|
+
dictionary?: Record<string, any>
|
|
12
|
+
testID?: string
|
|
13
|
+
dataSet?: Record<string, any>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const Footnote: ComponentType<FootnoteProps>
|
|
17
|
+
|
|
18
|
+
export { Footnote }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface HorizontalScrollProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
onScrollEnd?: () => void
|
|
6
|
+
onScroll?: (event: any) => void
|
|
7
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
8
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
9
|
+
testID?: string
|
|
10
|
+
dataSet?: Record<string, any>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const HorizontalScroll: ComponentType<HorizontalScrollProps>
|
|
14
|
+
|
|
15
|
+
export { HorizontalScroll }
|