@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,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 }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ProductCardGroupCardItem {
|
|
4
|
+
id: string
|
|
5
|
+
image?: Record<string, any>
|
|
6
|
+
dictionary?: Record<string, any>
|
|
7
|
+
[key: string]: any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ProductCardGroupProps {
|
|
11
|
+
maxSelection?: number
|
|
12
|
+
productCards: ProductCardGroupCardItem[]
|
|
13
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
14
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
15
|
+
testID?: string
|
|
16
|
+
dataSet?: Record<string, any>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const ProductCardGroup: ComponentType<ProductCardGroupProps>
|
|
20
|
+
|
|
21
|
+
export { ProductCardGroup }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface ProgressBarProps {
|
|
4
|
+
value?: number
|
|
5
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
6
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
7
|
+
testID?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ProgressProps {
|
|
11
|
+
children: ReactNode
|
|
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 Progress: ComponentType<ProgressProps> & {
|
|
19
|
+
Bar: ComponentType<ProgressBarProps>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Progress }
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface QuickLinksItemProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
href?: string
|
|
6
|
+
onPress?: () => void
|
|
7
|
+
icon?: ComponentType<any>
|
|
8
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
9
|
+
testID?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface QuickLinksProps {
|
|
13
|
+
children?: ReactNode
|
|
14
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
15
|
+
cardTokens?: Record<string, string | number | boolean | object>
|
|
16
|
+
listTokens?: Record<string, string | number | boolean | object>
|
|
17
|
+
tag?: string
|
|
18
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
19
|
+
testID?: string
|
|
20
|
+
dataSet?: Record<string, any>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const QuickLinks: ComponentType<QuickLinksProps> & {
|
|
24
|
+
Item: ComponentType<QuickLinksItemProps>
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { QuickLinks }
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode, ElementType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface QuickLinksFeatureItemProps {
|
|
4
|
+
children: ReactNode
|
|
5
|
+
imageAccessibilityLabel: string
|
|
6
|
+
imageSource: string | ReactNode
|
|
7
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
8
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
9
|
+
href?: string
|
|
10
|
+
onPress?: () => void
|
|
11
|
+
LinkRouter?: ElementType
|
|
12
|
+
linkRouterProps?: Record<string, any>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface QuickLinksFeatureProps {
|
|
16
|
+
children?: ReactNode
|
|
17
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
18
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
19
|
+
testID?: string
|
|
20
|
+
dataSet?: Record<string, any>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const QuickLinksFeature: ComponentType<QuickLinksFeatureProps> & {
|
|
24
|
+
Item: ComponentType<QuickLinksFeatureItemProps>
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { QuickLinksFeature }
|
package/types/Radio.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface RadioProps {
|
|
4
|
+
checked?: boolean
|
|
5
|
+
defaultChecked?: boolean
|
|
6
|
+
description?: string
|
|
7
|
+
id?: string
|
|
8
|
+
inactive?: boolean
|
|
9
|
+
label?: string | ReactNode
|
|
10
|
+
name?: string
|
|
11
|
+
onChange?: (value: any) => void
|
|
12
|
+
value?: any
|
|
13
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
14
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
15
|
+
testID?: string
|
|
16
|
+
dataSet?: Record<string, any>
|
|
17
|
+
accessibilityLabel?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare const Radio: ComponentType<RadioProps>
|
|
21
|
+
|
|
22
|
+
export { Radio }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface RadioCardProps {
|
|
4
|
+
title?: string
|
|
5
|
+
children?: ReactNode | ((state: Record<string, any>) => ReactNode)
|
|
6
|
+
checked?: boolean
|
|
7
|
+
defaultChecked?: boolean
|
|
8
|
+
description?: string
|
|
9
|
+
id?: string
|
|
10
|
+
inactive?: boolean
|
|
11
|
+
onChange?: (value: any) => void
|
|
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
|
+
accessibilityLabel?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const RadioCard: ComponentType<RadioCardProps>
|
|
20
|
+
|
|
21
|
+
export { RadioCard }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export type ViewportKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
4
|
+
|
|
5
|
+
export interface ResponsiveProps {
|
|
6
|
+
min?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
7
|
+
max?: 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
inheritedStyles?: string[]
|
|
9
|
+
children: ReactNode
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const Responsive: ComponentType<ResponsiveProps>
|
|
13
|
+
|
|
14
|
+
export { Responsive }
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
import type { SemanticTag } from './Common'
|
|
3
|
+
|
|
4
|
+
export interface ScrollDictionary {
|
|
5
|
+
accessibilityLabel: string
|
|
6
|
+
instructionText: string
|
|
7
|
+
progressBarLabel: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ScrollProps {
|
|
11
|
+
/**
|
|
12
|
+
* Scroll items to display. Should be `ScrollItem` components.
|
|
13
|
+
*/
|
|
14
|
+
children: ReactNode
|
|
15
|
+
/**
|
|
16
|
+
* Theme tokens for customizing the Scroll appearance.
|
|
17
|
+
*/
|
|
18
|
+
tokens?: ScrollTokens
|
|
19
|
+
/**
|
|
20
|
+
* Variant for the Scroll component.
|
|
21
|
+
*/
|
|
22
|
+
variant?: ScrollVariant
|
|
23
|
+
/**
|
|
24
|
+
* Select English or French copy for accessible labels.
|
|
25
|
+
*/
|
|
26
|
+
copy?: 'en' | 'fr'
|
|
27
|
+
/**
|
|
28
|
+
* Override the default dictionary by passing the complete dictionary object for `en` and `fr`.
|
|
29
|
+
*/
|
|
30
|
+
dictionary?: {
|
|
31
|
+
en: ScrollDictionary
|
|
32
|
+
fr: ScrollDictionary
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Accessibility label for the scrollable region.
|
|
36
|
+
*/
|
|
37
|
+
accessibilityLabel?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ScrollVariant = {}
|
|
41
|
+
|
|
42
|
+
export interface ScrollTokens {
|
|
43
|
+
itemGap?: number
|
|
44
|
+
progressBarColor?: string
|
|
45
|
+
progressBarHeight?: number
|
|
46
|
+
progressHitAreaHeight?: number
|
|
47
|
+
progressSpacing?: number
|
|
48
|
+
progressTrackColor?: string
|
|
49
|
+
progressTrackHeight?: number
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface ScrollItemProps {
|
|
53
|
+
/**
|
|
54
|
+
* Content of the scroll item.
|
|
55
|
+
*/
|
|
56
|
+
children: ReactNode
|
|
57
|
+
/**
|
|
58
|
+
* Sets the HTML tag of the outer container. Defaults to `'li'`.
|
|
59
|
+
*/
|
|
60
|
+
tag?: SemanticTag
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare const Scroll: ComponentType<ScrollProps>
|
|
64
|
+
declare const ScrollItem: ComponentType<ScrollItemProps>
|
|
65
|
+
|
|
66
|
+
export { Scroll, ScrollItem }
|
package/types/Search.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
1
2
|
import { CopyType, Size } from './Common'
|
|
2
3
|
|
|
3
4
|
export type SearchTokens = {
|
|
@@ -20,8 +21,8 @@ export type SearchTokens = {
|
|
|
20
21
|
lineHeight?: number
|
|
21
22
|
placeholderColor?: string
|
|
22
23
|
buttonsGap?: Size
|
|
23
|
-
clearButtonIcon?:
|
|
24
|
-
submitButtonIcon?:
|
|
24
|
+
clearButtonIcon?: any
|
|
25
|
+
submitButtonIcon?: any
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export interface SearchProps {
|
|
@@ -35,4 +36,16 @@ export interface SearchProps {
|
|
|
35
36
|
onClear?: () => void
|
|
36
37
|
onFocus?: () => void
|
|
37
38
|
tokens?: SearchTokens
|
|
39
|
+
nativeSubmitBtnID?: string
|
|
40
|
+
searchIconPosition?: 'left' | 'right'
|
|
41
|
+
pointerEvents?: 'all' | 'none' | 'box-only' | 'box-none'
|
|
42
|
+
onLayout?: (event: any) => void
|
|
43
|
+
nativeID?: string
|
|
44
|
+
dataSet?: Record<string, any>
|
|
45
|
+
accessibilityLabel?: string
|
|
46
|
+
accessibilityRole?: string
|
|
38
47
|
}
|
|
48
|
+
|
|
49
|
+
declare const Search: ComponentType<SearchProps>
|
|
50
|
+
|
|
51
|
+
export { Search }
|
package/types/Select.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
2
|
import { IconProps } from './Icon'
|
|
3
3
|
|
|
4
4
|
export type SelectTokens = {
|
|
@@ -28,7 +28,7 @@ export type SelectTokens = {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface SelectProps {
|
|
31
|
-
children: string |
|
|
31
|
+
children: string | ReactNode
|
|
32
32
|
label: string
|
|
33
33
|
initialValue?: string
|
|
34
34
|
feedback?: string
|
|
@@ -44,14 +44,22 @@ export interface SelectProps {
|
|
|
44
44
|
placeholder?: string
|
|
45
45
|
tokens?: SelectTokens
|
|
46
46
|
testID?: string
|
|
47
|
+
dataSet?: Record<string, any>
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
export interface SelectItemProps {
|
|
50
|
-
children: string |
|
|
51
|
+
children: string | ReactNode
|
|
51
52
|
value: string
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
export interface SelectGroupProps {
|
|
55
|
-
children: string |
|
|
56
|
+
children: string | ReactNode
|
|
56
57
|
label: string
|
|
57
58
|
}
|
|
59
|
+
|
|
60
|
+
declare const Select: ComponentType<SelectProps> & {
|
|
61
|
+
Item: ComponentType<SelectItemProps>
|
|
62
|
+
Group: ComponentType<SelectGroupProps>
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { Select }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface SideNavItemProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
label?: string
|
|
6
|
+
href?: string
|
|
7
|
+
onPress?: () => void
|
|
8
|
+
id?: string
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SideNavItemsGroupProps {
|
|
13
|
+
children?: ReactNode
|
|
14
|
+
label: string
|
|
15
|
+
groupId?: string
|
|
16
|
+
onToggle?: () => void
|
|
17
|
+
openGroups?: Array<string | number>
|
|
18
|
+
isActive?: boolean
|
|
19
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
20
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface SideNavProps {
|
|
24
|
+
children?: ReactNode
|
|
25
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
26
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
27
|
+
openGroups?: Array<string | number>
|
|
28
|
+
onToggle?: (groupId: string) => void
|
|
29
|
+
testID?: string
|
|
30
|
+
dataSet?: Record<string, any>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const SideNav: ComponentType<SideNavProps> & {
|
|
34
|
+
ItemsGroup: ComponentType<SideNavItemsGroupProps>
|
|
35
|
+
Item: ComponentType<SideNavItemProps>
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { SideNav }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface SkeletonProps {
|
|
4
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
5
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
6
|
+
sizeIndex?: number | Record<string, number>
|
|
7
|
+
sizePixels?: number | Record<string, number>
|
|
8
|
+
characters?: number
|
|
9
|
+
lines?: number
|
|
10
|
+
shape?: 'line' | 'circle' | 'square'
|
|
11
|
+
testID?: string
|
|
12
|
+
dataSet?: Record<string, any>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const Skeleton: ComponentType<SkeletonProps>
|
|
16
|
+
|
|
17
|
+
export { Skeleton }
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface SkipLinkProps {
|
|
4
|
+
children?: ReactNode
|
|
5
|
+
href?: string
|
|
6
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
7
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
8
|
+
testID?: string
|
|
9
|
+
dataSet?: Record<string, any>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const SkipLink: ComponentType<SkipLinkProps>
|
|
13
|
+
|
|
14
|
+
export { SkipLink }
|
package/types/Spacer.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
1
3
|
export interface SpacerProps {
|
|
2
|
-
space?: number
|
|
4
|
+
space?: number | Record<string, number>
|
|
3
5
|
direction?: 'column' | 'row'
|
|
4
6
|
testID?: string
|
|
7
|
+
dataSet?: Record<string, any>
|
|
5
8
|
}
|
|
9
|
+
|
|
10
|
+
declare const Spacer: ComponentType<SpacerProps>
|
|
11
|
+
|
|
12
|
+
export { Spacer }
|
package/types/StackView.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react'
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
Direction,
|
|
4
4
|
FlexAlign,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from './Common'
|
|
10
10
|
import { DividerProps } from './Divider'
|
|
11
11
|
|
|
12
|
-
type StackViewTokens = {
|
|
12
|
+
export type StackViewTokens = {
|
|
13
13
|
alignItems?: FlexAlign
|
|
14
14
|
justifyContent?: FlexJustify
|
|
15
15
|
flexGrow?: number
|
|
@@ -25,4 +25,10 @@ export interface StackViewProps {
|
|
|
25
25
|
tag?: SemanticTag
|
|
26
26
|
children: ReactNode
|
|
27
27
|
testID?: string
|
|
28
|
+
dataSet?: Record<string, any>
|
|
29
|
+
accessibilityRole?: string
|
|
28
30
|
}
|
|
31
|
+
|
|
32
|
+
declare const StackView: ComponentType<StackViewProps>
|
|
33
|
+
|
|
34
|
+
export { StackView }
|
package/types/Status.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
import { Variant } from './Common'
|
|
4
3
|
import { IconProps } from './Icon'
|
|
5
4
|
|
|
6
5
|
export type StatusTokensProps = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface StepTrackerProps {
|
|
4
|
+
current?: number
|
|
5
|
+
copy?: 'en' | 'fr' | Record<string, any>
|
|
6
|
+
dictionary?: Record<string, any>
|
|
7
|
+
steps?: 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 StepTracker: ComponentType<StepTrackerProps>
|
|
15
|
+
|
|
16
|
+
export { StepTracker }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface TabBarItem {
|
|
4
|
+
id: string
|
|
5
|
+
icon?: ReactNode
|
|
6
|
+
iconActive?: ReactNode
|
|
7
|
+
label: string
|
|
8
|
+
href?: string
|
|
9
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TabBarProps {
|
|
13
|
+
items: TabBarItem[]
|
|
14
|
+
initiallySelectedItem?: number
|
|
15
|
+
onChange?: (id: string) => void
|
|
16
|
+
variant?: Record<string, string | number | boolean | undefined>
|
|
17
|
+
tokens?: Record<string, string | number | boolean | object>
|
|
18
|
+
accessibilityLabel?: string
|
|
19
|
+
testID?: string
|
|
20
|
+
dataSet?: Record<string, any>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const TabBar: ComponentType<TabBarProps>
|
|
24
|
+
|
|
25
|
+
export { TabBar }
|
package/types/Tabs.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import type { ComponentType, ElementType } from 'react'
|
|
1
2
|
import { Size } from './Common'
|
|
2
3
|
import { IconProps } from './Icon'
|
|
3
4
|
import { TypographyVariants, TypographyTokens } from './Typography'
|
|
4
5
|
import { HorizontalScrollButtonTokens } from './HorizontalScrollButton'
|
|
5
6
|
|
|
6
|
-
type TabsItem = {
|
|
7
|
+
export type TabsItem = {
|
|
7
8
|
label: string
|
|
8
9
|
href: string
|
|
9
10
|
id: string
|
|
11
|
+
linkRouter?: ElementType
|
|
12
|
+
linkRouterProps?: Record<string, any>
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
type TabsVariant = {
|
|
15
|
+
export type TabsVariant = {
|
|
13
16
|
equalWidth?: string
|
|
14
17
|
inverse?: boolean
|
|
15
18
|
}
|
|
@@ -19,9 +22,11 @@ export interface TabsProps {
|
|
|
19
22
|
value?: string
|
|
20
23
|
initialValue?: string
|
|
21
24
|
onChange?: () => void
|
|
22
|
-
itemTokens?:
|
|
25
|
+
itemTokens?: Partial<TabsTokens>
|
|
23
26
|
scrollButtonTokens?: HorizontalScrollButtonTokens
|
|
24
27
|
variant?: TabsVariant
|
|
28
|
+
LinkRouter?: ElementType
|
|
29
|
+
linkRouterProps?: Record<string, any>
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
export type TabsTokens = {
|
|
@@ -44,3 +49,7 @@ export interface TabSelectorProps {
|
|
|
44
49
|
testID?: string
|
|
45
50
|
selectedTestID?: string
|
|
46
51
|
}
|
|
52
|
+
|
|
53
|
+
declare const Tabs: ComponentType<TabsProps>
|
|
54
|
+
|
|
55
|
+
export { Tabs }
|