@telus-uds/components-base 4.0.0-alpha.1 → 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 +43 -1
- package/lib/cjs/Autocomplete/Autocomplete.js +13 -1
- package/lib/cjs/Autocomplete/constants.js +1 -1
- package/lib/cjs/Footnote/FootnoteLink.js +18 -17
- 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/Progress/Progress.js +30 -5
- package/lib/cjs/Scroll/Scroll.js +472 -0
- package/lib/cjs/Scroll/ScrollContext.js +55 -0
- package/lib/cjs/Scroll/ScrollItem.js +106 -0
- package/lib/cjs/Scroll/ScrollProgress.js +100 -0
- package/lib/cjs/Scroll/dictionary.js +18 -0
- package/lib/cjs/TextInput/TextInputBase.js +2 -1
- package/lib/cjs/index.js +14 -0
- package/lib/cjs/utils/animation/useAnimatedValue.js +46 -0
- package/lib/cjs/utils/children.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/Footnote/FootnoteLink.js +18 -17
- 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/Progress/Progress.js +30 -5
- package/lib/esm/Scroll/Scroll.js +465 -0
- package/lib/esm/Scroll/ScrollContext.js +46 -0
- package/lib/esm/Scroll/ScrollItem.js +100 -0
- package/lib/esm/Scroll/ScrollProgress.js +93 -0
- package/lib/esm/Scroll/dictionary.js +12 -0
- package/lib/esm/TextInput/TextInputBase.js +2 -1
- package/lib/esm/index.js +2 -0
- package/lib/esm/utils/animation/useAnimatedValue.js +38 -0
- package/lib/esm/utils/children.js +2 -1
- package/lib/esm/utils/useOverlaidPosition.js +83 -42
- package/lib/package.json +2 -2
- package/package.json +2 -2
- package/src/Autocomplete/Autocomplete.jsx +11 -2
- package/src/Autocomplete/constants.js +1 -1
- package/src/Footnote/FootnoteLink.jsx +17 -12
- package/src/Listbox/ListboxOverlay.jsx +6 -2
- package/src/MultiSelectFilter/ModalOverlay.jsx +9 -3
- package/src/MultiSelectFilter/MultiSelectFilter.jsx +1 -31
- package/src/Progress/Progress.jsx +22 -3
- package/src/Scroll/Scroll.jsx +483 -0
- package/src/Scroll/ScrollContext.jsx +39 -0
- package/src/Scroll/ScrollItem.jsx +87 -0
- package/src/Scroll/ScrollProgress.jsx +74 -0
- package/src/Scroll/dictionary.js +12 -0
- package/src/TextInput/TextInputBase.jsx +2 -1
- package/src/index.js +2 -0
- package/src/utils/animation/useAnimatedValue.js +35 -0
- package/src/utils/children.jsx +4 -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 +66 -0
- 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 +205 -49
|
@@ -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 }
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export type HorizontalScrollButtonTokens = {
|
|
2
4
|
backgroundColor?: string
|
|
3
5
|
borderColor?: string
|
|
4
6
|
borderRadius?: number | string
|
|
@@ -14,3 +16,17 @@ export interface HorizontalScrollButtonTokens {
|
|
|
14
16
|
padding?: number | string
|
|
15
17
|
shadow?: string
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
export interface HorizontalScrollButtonProps {
|
|
21
|
+
direction: 'previous' | 'next'
|
|
22
|
+
onPress: () => void
|
|
23
|
+
icon?: ComponentType<any>
|
|
24
|
+
offset?: number
|
|
25
|
+
copy?: 'en' | 'fr'
|
|
26
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
27
|
+
tokens?: HorizontalScrollButtonTokens
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const HorizontalScrollButton: ComponentType<HorizontalScrollButtonProps>
|
|
31
|
+
|
|
32
|
+
export { HorizontalScrollButton }
|
package/types/Icon.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native'
|
|
3
|
+
|
|
1
4
|
export interface IconProps {
|
|
2
5
|
scalesWithText?: boolean
|
|
3
6
|
variant?: IconVariant
|
|
4
7
|
tokens?: IconTokens
|
|
5
|
-
icon:
|
|
8
|
+
icon: ComponentType<any>
|
|
9
|
+
accessibilityLabel?: string
|
|
10
|
+
style?: StyleProp<ViewStyle>
|
|
11
|
+
testID?: string
|
|
12
|
+
dataSet?: Record<string, any>
|
|
6
13
|
}
|
|
7
14
|
|
|
8
15
|
export interface IconTokens {
|
|
@@ -18,4 +25,8 @@ export type IconVariant = {
|
|
|
18
25
|
size?: 'micro' | 'small' | 'large' | 'extraLarge'
|
|
19
26
|
}
|
|
20
27
|
|
|
21
|
-
export type IconPositionLeftRight = 'left' | 'right'
|
|
28
|
+
export type IconPositionLeftRight = 'left' | 'right' | 'inline'
|
|
29
|
+
|
|
30
|
+
declare const Icon: ComponentType<IconProps>
|
|
31
|
+
|
|
32
|
+
export { Icon }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType, ElementType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface IconButtonProps {
|
|
4
|
+
icon?: ElementType
|
|
5
|
+
href?: string
|
|
6
|
+
hrefAttrs?: Record<string, string>
|
|
7
|
+
onPress?: () => void
|
|
8
|
+
inactive?: boolean
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
11
|
+
testID?: string
|
|
12
|
+
dataSet?: Record<string, any>
|
|
13
|
+
accessibilityLabel?: string
|
|
14
|
+
accessibilityRole?: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const IconButton: ComponentType<IconButtonProps>
|
|
18
|
+
|
|
19
|
+
export { IconButton }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface InputLabelProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
forId?: string
|
|
6
|
+
testID?: string
|
|
7
|
+
dataSet?: Record<string, any>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare const InputLabel: ComponentType<InputLabelProps>
|
|
11
|
+
|
|
12
|
+
export { InputLabel }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface InputSupportsProps {
|
|
4
|
+
children?: ReactNode | ((props: Record<string, any>) => ReactNode)
|
|
5
|
+
copy?: 'en' | 'fr'
|
|
6
|
+
label?: string
|
|
7
|
+
hint?: string
|
|
8
|
+
hintPosition?: 'inline' | 'below'
|
|
9
|
+
validation?: 'error' | 'success'
|
|
10
|
+
feedback?: string
|
|
11
|
+
tooltip?: string | Record<string, any>
|
|
12
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
13
|
+
testID?: string
|
|
14
|
+
dataSet?: Record<string, any>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const InputSupports: ComponentType<InputSupportsProps>
|
|
18
|
+
|
|
19
|
+
export { InputSupports }
|
package/types/Link.d.ts
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
1
2
|
import { IconPositionLeftRight, IconProps } from './Icon'
|
|
2
3
|
|
|
3
4
|
export interface LinkProps {
|
|
4
|
-
href
|
|
5
|
-
onPress
|
|
5
|
+
href?: string
|
|
6
|
+
onPress?: () => void
|
|
6
7
|
tokens?: LinkTokens
|
|
7
8
|
accessibilityRole?: string
|
|
8
9
|
accessibilityLabel?: string
|
|
9
10
|
variant?: LinkAndTextButtonVariants
|
|
10
11
|
iconProps?: IconProps
|
|
11
|
-
icon?:
|
|
12
|
+
icon?: ComponentType<any>
|
|
12
13
|
iconPosition?: IconPositionLeftRight
|
|
13
14
|
testID?: string
|
|
14
|
-
children?:
|
|
15
|
+
children?: ReactNode
|
|
16
|
+
hrefAttrs?: HrefAttrs
|
|
17
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
18
|
+
onLayout?: (event: any) => void
|
|
19
|
+
nativeID?: string
|
|
20
|
+
dataSet?: Record<string, any>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface HrefAttrs {
|
|
24
|
+
download?: string
|
|
25
|
+
rel?: string
|
|
26
|
+
target?: string
|
|
15
27
|
}
|
|
16
28
|
|
|
17
29
|
export enum LinkSize {
|
|
@@ -45,3 +57,7 @@ export type LinkTokens = {
|
|
|
45
57
|
iconTranslateY?: number
|
|
46
58
|
alignSelf?: string
|
|
47
59
|
}
|
|
60
|
+
|
|
61
|
+
declare const Link: ComponentType<LinkProps>
|
|
62
|
+
|
|
63
|
+
export { Link }
|
package/types/List.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ComponentType, ReactElement, ReactNode } from 'react'
|
|
2
|
+
import { TextAlign } from './Common'
|
|
3
3
|
|
|
4
|
-
type ListVariants = {
|
|
4
|
+
export type ListVariants = {
|
|
5
5
|
size?: 'small' | 'medium' | 'large'
|
|
6
6
|
compact?: boolean
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
type ListTokens = {
|
|
9
|
+
export type ListTokens = {
|
|
10
10
|
interItemMargin?: number
|
|
11
11
|
interItemMarginWithDivider?: number
|
|
12
12
|
dividerColor?: string
|
|
@@ -35,6 +35,7 @@ export interface ListItemProps {
|
|
|
35
35
|
icon?: ReactNode | string
|
|
36
36
|
iconColor?: string
|
|
37
37
|
iconSize?: number
|
|
38
|
+
iconVerticalAlign?: 'top' | 'center' | 'bottom'
|
|
38
39
|
title?: string
|
|
39
40
|
testID?: string
|
|
40
41
|
}
|
|
@@ -46,3 +47,9 @@ export interface ListItemTokens {
|
|
|
46
47
|
itemLineHeight?: number
|
|
47
48
|
itemFontName?: string
|
|
48
49
|
}
|
|
50
|
+
|
|
51
|
+
declare const List: ComponentType<ListProps> & {
|
|
52
|
+
Item: ComponentType<ListItemProps>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { List }
|
package/types/Listbox.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
type
|
|
1
|
+
import type { ComponentType, ElementType } from 'react'
|
|
2
|
+
|
|
3
|
+
export type ListboxTokens = {
|
|
2
4
|
groupBorderRadius?: number | string
|
|
3
5
|
groupBorderWidth?: number | string
|
|
4
6
|
groupFontSize?: number
|
|
@@ -65,7 +67,7 @@ type ListboxTokens = {
|
|
|
65
67
|
secondLevelParentIcon?: string
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
type ListboxItems = {
|
|
70
|
+
export type ListboxItems = {
|
|
69
71
|
label: string
|
|
70
72
|
href: string
|
|
71
73
|
tokens?: ListboxTokens
|
|
@@ -75,10 +77,18 @@ export interface ListboxProps {
|
|
|
75
77
|
items: ListboxItems[]
|
|
76
78
|
firstItemRef?: object
|
|
77
79
|
parentRef?: object
|
|
78
|
-
LinkRouter?:
|
|
80
|
+
LinkRouter?: ElementType
|
|
79
81
|
linkRouterProps?: object
|
|
80
82
|
tokens?: ListboxTokens
|
|
81
83
|
variant?: { secondLevel?: boolean }
|
|
82
84
|
selectedId?: string
|
|
83
85
|
onClose?: () => void
|
|
86
|
+
copy?: 'en' | 'fr'
|
|
87
|
+
dictionary?: Record<string, any>
|
|
88
|
+
testID?: string
|
|
89
|
+
itemRouterProps?: object
|
|
84
90
|
}
|
|
91
|
+
|
|
92
|
+
declare const Listbox: ComponentType<ListboxProps>
|
|
93
|
+
|
|
94
|
+
export { Listbox }
|
package/types/Modal.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
copy?: 'en' | 'fr'
|
|
6
|
+
isOpen?: boolean
|
|
7
|
+
onClose?: () => void
|
|
8
|
+
maxWidth?: boolean
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
11
|
+
closeButton?: ReactNode | null
|
|
12
|
+
heading?: string
|
|
13
|
+
headingLevel?: 'h3' | 'h4'
|
|
14
|
+
subHeading?: string
|
|
15
|
+
subHeadingSize?: 'small' | 'medium' | 'large'
|
|
16
|
+
bodyText?: string
|
|
17
|
+
confirmButtonText?: string
|
|
18
|
+
testID?: string
|
|
19
|
+
dataSet?: Record<string, any>
|
|
20
|
+
accessibilityLabel?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const Modal: ComponentType<ModalProps>
|
|
24
|
+
|
|
25
|
+
export { Modal }
|