@telus-uds/components-base 4.0.0-alpha.2 → 4.0.0-beta.1
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 +47 -1
- package/lib/cjs/Autocomplete/Autocomplete.js +13 -1
- package/lib/cjs/Autocomplete/constants.js +1 -1
- package/lib/cjs/Button/ButtonGroup.js +91 -23
- package/lib/cjs/Card/CardBase.js +75 -47
- package/lib/cjs/ColourToggle/ColourBubble.js +66 -13
- package/lib/cjs/ColourToggle/ColourToggle.js +41 -11
- package/lib/cjs/ColourToggle/constants.js +15 -0
- package/lib/cjs/ColourToggle/dictionary.js +14 -0
- 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/Validator/Validator.js +5 -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/Button/ButtonGroup.js +91 -23
- package/lib/esm/Card/CardBase.js +75 -47
- package/lib/esm/ColourToggle/ColourBubble.js +67 -14
- package/lib/esm/ColourToggle/ColourToggle.js +41 -11
- package/lib/esm/ColourToggle/constants.js +8 -0
- package/lib/esm/ColourToggle/dictionary.js +8 -0
- 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/Validator/Validator.js +5 -1
- package/lib/esm/utils/useOverlaidPosition.js +83 -42
- package/lib/package.json +3 -3
- package/package.json +3 -3
- package/src/Autocomplete/Autocomplete.jsx +11 -2
- package/src/Autocomplete/constants.js +1 -1
- package/src/Button/ButtonGroup.jsx +93 -24
- package/src/Card/CardBase.jsx +94 -75
- package/src/ColourToggle/ColourBubble.jsx +62 -7
- package/src/ColourToggle/ColourToggle.jsx +43 -9
- package/src/ColourToggle/constants.js +10 -0
- package/src/ColourToggle/dictionary.js +4 -0
- 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/Validator/Validator.jsx +5 -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/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 }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface MultiSelectFilterItem {
|
|
4
|
+
id?: string
|
|
5
|
+
label: string
|
|
6
|
+
[key: string]: any
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface MultiSelectFilterProps {
|
|
10
|
+
label: string
|
|
11
|
+
subtitle?: string | ReactNode
|
|
12
|
+
id?: string
|
|
13
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
14
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
15
|
+
items?: MultiSelectFilterItem[]
|
|
16
|
+
onChange?: (selectedIds: string[]) => void
|
|
17
|
+
selectedIds?: string[]
|
|
18
|
+
testID?: string
|
|
19
|
+
dataSet?: Record<string, any>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare const MultiSelectFilter: ComponentType<MultiSelectFilterProps>
|
|
23
|
+
|
|
24
|
+
export { MultiSelectFilter }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface NotificationProps {
|
|
4
|
+
children?: string | ReactNode | ((props: Record<string, any>) => ReactNode)
|
|
5
|
+
dismissible?: boolean
|
|
6
|
+
copy?: 'en' | 'fr' | { dismiss: string }
|
|
7
|
+
onDismiss?: () => void
|
|
8
|
+
contentMinWidth?: Record<string, 'max' | 'full'>
|
|
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 Notification: ComponentType<NotificationProps>
|
|
18
|
+
|
|
19
|
+
export { Notification }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface OrderedListItemProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface OrderedListProps {
|
|
8
|
+
children: ReactNode
|
|
9
|
+
testID?: string
|
|
10
|
+
dataSet?: Record<string, any>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const OrderedList: ComponentType<OrderedListProps> & {
|
|
14
|
+
Item: ComponentType<OrderedListItemProps>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { OrderedList }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType, ElementType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface PaginationPageButtonProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface PaginationProps {
|
|
8
|
+
children?: ReactNode
|
|
9
|
+
copy?: 'en' | 'fr'
|
|
10
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
11
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
12
|
+
sideButtonVariant?: Record<string, string | number | boolean | undefined>
|
|
13
|
+
sideButtonTokens?: Record<string, string | number | boolean | object>
|
|
14
|
+
numberOfPagesBeforeEllipsis?: number
|
|
15
|
+
LinkRouter?: ElementType
|
|
16
|
+
linkRouterProps?: Record<string, any>
|
|
17
|
+
testID?: string
|
|
18
|
+
dataSet?: Record<string, any>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const Pagination: ComponentType<PaginationProps> & {
|
|
22
|
+
PageButton: ComponentType<PaginationPageButtonProps>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { Pagination }
|
package/types/Portal.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface PriceLockupProps {
|
|
4
|
+
size?: 'small' | 'medium'
|
|
5
|
+
currencySymbol?: string
|
|
6
|
+
topText?: string
|
|
7
|
+
price: string
|
|
8
|
+
rateText?: string
|
|
9
|
+
bottomText?: string
|
|
10
|
+
signDirection?: 'left' | 'right'
|
|
11
|
+
footnoteLinks?: Array<number | string>
|
|
12
|
+
strikeThrough?: boolean
|
|
13
|
+
a11yText?: string
|
|
14
|
+
onClickFootnote?: (index: number) => void
|
|
15
|
+
copy?: 'en' | 'fr'
|
|
16
|
+
dictionary?: Record<string, any>
|
|
17
|
+
ratePosition?: 'right' | 'bottom'
|
|
18
|
+
linkPosition?: string
|
|
19
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
20
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
21
|
+
children?: ReactNode
|
|
22
|
+
testID?: string
|
|
23
|
+
dataSet?: Record<string, any>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const PriceLockup: ComponentType<PriceLockupProps>
|
|
27
|
+
|
|
28
|
+
export { PriceLockup }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ProductCardImage {
|
|
4
|
+
src?: string | ReactNode
|
|
5
|
+
alt?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ProductCardProps {
|
|
9
|
+
image?: ProductCardImage
|
|
10
|
+
copy?: 'en' | 'fr'
|
|
11
|
+
dictionary?: Record<string, any>
|
|
12
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
13
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
14
|
+
testID?: string
|
|
15
|
+
dataSet?: Record<string, any>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare const ProductCard: ComponentType<ProductCardProps>
|
|
19
|
+
|
|
20
|
+
export { ProductCard }
|