@telus-uds/components-base 1.14.1 → 1.15.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 +33 -2
- package/__tests17__/A11yText/A11yText.test.jsx +34 -0
- package/__tests17__/ActivityIndicator/ActivityIndicator.test.jsx +68 -0
- package/__tests17__/ActivityIndicator/__snapshots__/ActivityIndicator.test.jsx.snap +299 -0
- package/__tests17__/Box/Box.test.jsx +111 -0
- package/__tests17__/Button/Button.test.jsx +86 -0
- package/__tests17__/Button/ButtonBase.test.jsx +82 -0
- package/__tests17__/Button/ButtonGroup.test.jsx +347 -0
- package/__tests17__/Button/ButtonLink.test.jsx +61 -0
- package/__tests17__/Card/Card.test.jsx +63 -0
- package/__tests17__/Carousel/Carousel.test.jsx +128 -0
- package/__tests17__/Carousel/CarouselTabs.test.jsx +142 -0
- package/__tests17__/Checkbox/Checkbox.test.jsx +94 -0
- package/__tests17__/Checkbox/CheckboxGroup.test.jsx +246 -0
- package/__tests17__/Divider/Divider.test.jsx +91 -0
- package/__tests17__/ExpandCollapse/ExpandCollapse.test.jsx +109 -0
- package/__tests17__/Feedback/Feedback.test.jsx +42 -0
- package/__tests17__/FlexGrid/Col.test.jsx +261 -0
- package/__tests17__/FlexGrid/FlexGrid.test.jsx +136 -0
- package/__tests17__/FlexGrid/Row.test.jsx +273 -0
- package/__tests17__/HorizontalScroll/HorizontalScroll.test.jsx +165 -0
- package/__tests17__/Icon/Icon.test.jsx +61 -0
- package/__tests17__/IconButton/IconButton.test.jsx +52 -0
- package/__tests17__/InputLabel/InputLabel.test.jsx +28 -0
- package/__tests17__/InputLabel/__snapshots__/InputLabel.test.jsx.snap +3 -0
- package/__tests17__/InputSupports/InputSupports.test.jsx +60 -0
- package/__tests17__/Link/Link.test.jsx +63 -0
- package/__tests17__/Link/TextButton.test.jsx +35 -0
- package/__tests17__/List/List.test.jsx +82 -0
- package/__tests17__/Modal/Modal.test.jsx +47 -0
- package/__tests17__/Notification/Notification.test.jsx +20 -0
- package/__tests17__/Pagination/Pagination.test.jsx +160 -0
- package/__tests17__/Progress/Progress.test.jsx +79 -0
- package/__tests17__/Radio/Radio.test.jsx +87 -0
- package/__tests17__/Radio/RadioGroup.test.jsx +220 -0
- package/__tests17__/RadioCard/RadioCard.test.jsx +87 -0
- package/__tests17__/RadioCard/RadioCardGroup.test.jsx +246 -0
- package/__tests17__/Search/Search.test.jsx +87 -0
- package/__tests17__/Select/Select.test.jsx +94 -0
- package/__tests17__/SideNav/SideNav.test.jsx +110 -0
- package/__tests17__/Skeleton/Skeleton.test.jsx +61 -0
- package/__tests17__/SkipLink/SkipLink.test.jsx +61 -0
- package/__tests17__/Spacer/Spacer.test.jsx +63 -0
- package/__tests17__/StackView/StackView.test.jsx +211 -0
- package/__tests17__/StackView/StackWrap.test.jsx +47 -0
- package/__tests17__/StackView/getStackedContent.test.jsx +295 -0
- package/__tests17__/StepTracker/StepTracker.test.jsx +108 -0
- package/__tests17__/Tabs/Tabs.test.jsx +49 -0
- package/__tests17__/Tags/Tags.test.jsx +327 -0
- package/__tests17__/TextInput/TextArea.test.jsx +35 -0
- package/__tests17__/TextInput/TextInputBase.test.jsx +125 -0
- package/__tests17__/ThemeProvider/ThemeProvider.test.jsx +80 -0
- package/__tests17__/ThemeProvider/useThemeTokens.test.jsx +514 -0
- package/__tests17__/ThemeProvider/utils/theme-tokens.test.js +41 -0
- package/__tests17__/ToggleSwitch/ToggleSwitch.test.jsx +82 -0
- package/__tests17__/ToggleSwitch/ToggleSwitchGroup.test.jsx +192 -0
- package/__tests17__/Tooltip/Tooltip.test.jsx +65 -0
- package/__tests17__/Tooltip/getTooltipPosition.test.js +79 -0
- package/__tests17__/Typography/typography.test.jsx +90 -0
- package/__tests17__/utils/children.test.jsx +128 -0
- package/__tests17__/utils/containUniqueFields.test.js +25 -0
- package/__tests17__/utils/input.test.js +375 -0
- package/__tests17__/utils/props.test.js +36 -0
- package/__tests17__/utils/semantics.test.jsx +34 -0
- package/__tests17__/utils/useCopy.test.js +42 -0
- package/__tests17__/utils/useResponsiveProp.test.jsx +202 -0
- package/__tests17__/utils/useSpacingScale.test.jsx +273 -0
- package/__tests17__/utils/useUniqueId.test.js +31 -0
- package/component-docs.json +95 -438
- package/lib/A11yInfoProvider/index.js +14 -5
- package/lib/Button/ButtonGroup.js +3 -2
- package/lib/Checkbox/Checkbox.js +9 -6
- package/lib/ExpandCollapse/Control.js +6 -5
- package/lib/ExpandCollapse/Panel.js +5 -4
- package/lib/List/ListItem.js +10 -236
- package/lib/List/ListItemBase.js +162 -0
- package/lib/List/ListItemContent.js +85 -0
- package/lib/List/ListItemMark.js +158 -0
- package/lib/List/PressableListItemBase.js +147 -0
- package/lib/Notification/Notification.js +2 -1
- package/lib/Pagination/Pagination.js +4 -3
- package/lib/Pagination/SideButton.js +17 -7
- package/lib/Radio/Radio.js +9 -6
- package/lib/RadioCard/RadioCard.js +9 -6
- package/lib/Select/Select.js +1 -0
- package/lib/Tabs/Tabs.js +12 -3
- package/lib/Tags/Tags.js +3 -3
- package/lib/TextInput/TextInput.js +5 -4
- package/lib/ViewportProvider/useViewportListener.js +11 -5
- package/lib/utils/hasOwnProperty.js +18 -0
- package/lib/utils/props/a11yProps.js +212 -45
- package/lib/utils/props/getPropSelector.js +47 -5
- package/lib/utils/ssr.js +116 -1
- package/lib/utils/useResponsiveProp.js +5 -3
- package/lib/utils/withLinkRouter.js +3 -5
- package/lib-module/A11yInfoProvider/index.js +14 -4
- package/lib-module/Button/ButtonGroup.js +3 -2
- package/lib-module/Checkbox/Checkbox.js +9 -6
- package/lib-module/ExpandCollapse/Control.js +6 -5
- package/lib-module/ExpandCollapse/Panel.js +5 -4
- package/lib-module/List/ListItem.js +13 -235
- package/lib-module/List/ListItemBase.js +139 -0
- package/lib-module/List/ListItemContent.js +66 -0
- package/lib-module/List/ListItemMark.js +143 -0
- package/lib-module/List/PressableListItemBase.js +117 -0
- package/lib-module/Notification/Notification.js +2 -1
- package/lib-module/Pagination/Pagination.js +5 -3
- package/lib-module/Pagination/SideButton.js +18 -8
- package/lib-module/Radio/Radio.js +9 -6
- package/lib-module/RadioCard/RadioCard.js +9 -6
- package/lib-module/Select/Select.js +1 -0
- package/lib-module/Tabs/Tabs.js +13 -4
- package/lib-module/Tags/Tags.js +3 -3
- package/lib-module/TextInput/TextInput.js +5 -4
- package/lib-module/ViewportProvider/useViewportListener.js +10 -4
- package/lib-module/utils/hasOwnProperty.js +11 -0
- package/lib-module/utils/props/a11yProps.js +210 -45
- package/lib-module/utils/props/getPropSelector.js +44 -5
- package/lib-module/utils/ssr.js +106 -0
- package/lib-module/utils/useResponsiveProp.js +3 -4
- package/lib-module/utils/withLinkRouter.js +3 -5
- package/package.json +12 -17
- package/src/A11yInfoProvider/index.jsx +20 -4
- package/src/Button/ButtonGroup.jsx +4 -2
- package/src/Checkbox/Checkbox.jsx +7 -3
- package/src/ExpandCollapse/Control.jsx +8 -5
- package/src/ExpandCollapse/Panel.jsx +7 -5
- package/src/List/ListItem.jsx +12 -191
- package/src/List/ListItemBase.jsx +118 -0
- package/src/List/ListItemContent.jsx +52 -0
- package/src/List/ListItemMark.jsx +99 -0
- package/src/List/PressableListItemBase.jsx +102 -0
- package/src/Notification/Notification.jsx +1 -1
- package/src/Pagination/Pagination.jsx +6 -1
- package/src/Pagination/SideButton.jsx +4 -1
- package/src/Radio/Radio.jsx +7 -3
- package/src/RadioCard/RadioCard.jsx +7 -3
- package/src/Select/Select.jsx +1 -1
- package/src/Tabs/Tabs.jsx +19 -2
- package/src/Tags/Tags.jsx +3 -3
- package/src/TextInput/TextInput.jsx +4 -4
- package/src/ViewportProvider/useViewportListener.js +10 -5
- package/src/utils/hasOwnProperty.js +11 -0
- package/src/utils/props/a11yProps.js +168 -55
- package/src/utils/props/getPropSelector.js +45 -4
- package/src/utils/ssr.jsx +124 -0
- package/src/utils/useResponsiveProp.js +3 -3
- package/src/utils/withLinkRouter.jsx +1 -3
- package/src/utils/ssr.js +0 -35
package/component-docs.json
CHANGED
|
@@ -1157,6 +1157,16 @@
|
|
|
1157
1157
|
true
|
|
1158
1158
|
],
|
|
1159
1159
|
"type": "state"
|
|
1160
|
+
},
|
|
1161
|
+
"width": {
|
|
1162
|
+
"description": "The width of the modal",
|
|
1163
|
+
"values": [
|
|
1164
|
+
"s",
|
|
1165
|
+
"m",
|
|
1166
|
+
"l",
|
|
1167
|
+
"xl"
|
|
1168
|
+
],
|
|
1169
|
+
"type": "state"
|
|
1160
1170
|
}
|
|
1161
1171
|
},
|
|
1162
1172
|
"Notification": {
|
|
@@ -4636,12 +4646,26 @@
|
|
|
4636
4646
|
"docs": {
|
|
4637
4647
|
"description": "ListItem is responsible for rendering icon or a bullet as side item",
|
|
4638
4648
|
"props": {
|
|
4639
|
-
"
|
|
4640
|
-
"
|
|
4641
|
-
"
|
|
4642
|
-
"
|
|
4649
|
+
"variant": {
|
|
4650
|
+
"type": {
|
|
4651
|
+
"name": "objectOf",
|
|
4652
|
+
"value": {
|
|
4653
|
+
"name": "union",
|
|
4654
|
+
"value": [
|
|
4655
|
+
{
|
|
4656
|
+
"name": "string"
|
|
4657
|
+
},
|
|
4658
|
+
{
|
|
4659
|
+
"name": "number"
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
"name": "bool"
|
|
4663
|
+
}
|
|
4664
|
+
]
|
|
4665
|
+
}
|
|
4643
4666
|
},
|
|
4644
|
-
"required": false
|
|
4667
|
+
"required": false,
|
|
4668
|
+
"description": ""
|
|
4645
4669
|
},
|
|
4646
4670
|
"tokens": {
|
|
4647
4671
|
"type": {
|
|
@@ -4669,30 +4693,17 @@
|
|
|
4669
4693
|
"required": false,
|
|
4670
4694
|
"description": ""
|
|
4671
4695
|
},
|
|
4672
|
-
"variant": {
|
|
4673
|
-
"type": {
|
|
4674
|
-
"name": "objectOf",
|
|
4675
|
-
"value": {
|
|
4676
|
-
"name": "union",
|
|
4677
|
-
"value": [
|
|
4678
|
-
{
|
|
4679
|
-
"name": "string"
|
|
4680
|
-
},
|
|
4681
|
-
{
|
|
4682
|
-
"name": "number"
|
|
4683
|
-
},
|
|
4684
|
-
{
|
|
4685
|
-
"name": "bool"
|
|
4686
|
-
}
|
|
4687
|
-
]
|
|
4688
|
-
}
|
|
4689
|
-
},
|
|
4690
|
-
"required": false,
|
|
4691
|
-
"description": ""
|
|
4692
|
-
},
|
|
4693
4696
|
"children": {
|
|
4694
4697
|
"type": {
|
|
4695
|
-
"name": "
|
|
4698
|
+
"name": "union",
|
|
4699
|
+
"value": [
|
|
4700
|
+
{
|
|
4701
|
+
"name": "node"
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
"name": "func"
|
|
4705
|
+
}
|
|
4706
|
+
]
|
|
4696
4707
|
},
|
|
4697
4708
|
"required": true,
|
|
4698
4709
|
"description": ""
|
|
@@ -4807,12 +4818,26 @@
|
|
|
4807
4818
|
"docs": {
|
|
4808
4819
|
"description": "ListItem is responsible for rendering icon or a bullet as side item",
|
|
4809
4820
|
"props": {
|
|
4810
|
-
"
|
|
4811
|
-
"
|
|
4812
|
-
"
|
|
4813
|
-
"
|
|
4821
|
+
"variant": {
|
|
4822
|
+
"type": {
|
|
4823
|
+
"name": "objectOf",
|
|
4824
|
+
"value": {
|
|
4825
|
+
"name": "union",
|
|
4826
|
+
"value": [
|
|
4827
|
+
{
|
|
4828
|
+
"name": "string"
|
|
4829
|
+
},
|
|
4830
|
+
{
|
|
4831
|
+
"name": "number"
|
|
4832
|
+
},
|
|
4833
|
+
{
|
|
4834
|
+
"name": "bool"
|
|
4835
|
+
}
|
|
4836
|
+
]
|
|
4837
|
+
}
|
|
4814
4838
|
},
|
|
4815
|
-
"required": false
|
|
4839
|
+
"required": false,
|
|
4840
|
+
"description": ""
|
|
4816
4841
|
},
|
|
4817
4842
|
"tokens": {
|
|
4818
4843
|
"type": {
|
|
@@ -4840,30 +4865,17 @@
|
|
|
4840
4865
|
"required": false,
|
|
4841
4866
|
"description": ""
|
|
4842
4867
|
},
|
|
4843
|
-
"variant": {
|
|
4844
|
-
"type": {
|
|
4845
|
-
"name": "objectOf",
|
|
4846
|
-
"value": {
|
|
4847
|
-
"name": "union",
|
|
4848
|
-
"value": [
|
|
4849
|
-
{
|
|
4850
|
-
"name": "string"
|
|
4851
|
-
},
|
|
4852
|
-
{
|
|
4853
|
-
"name": "number"
|
|
4854
|
-
},
|
|
4855
|
-
{
|
|
4856
|
-
"name": "bool"
|
|
4857
|
-
}
|
|
4858
|
-
]
|
|
4859
|
-
}
|
|
4860
|
-
},
|
|
4861
|
-
"required": false,
|
|
4862
|
-
"description": ""
|
|
4863
|
-
},
|
|
4864
4868
|
"children": {
|
|
4865
4869
|
"type": {
|
|
4866
|
-
"name": "
|
|
4870
|
+
"name": "union",
|
|
4871
|
+
"value": [
|
|
4872
|
+
{
|
|
4873
|
+
"name": "node"
|
|
4874
|
+
},
|
|
4875
|
+
{
|
|
4876
|
+
"name": "func"
|
|
4877
|
+
}
|
|
4878
|
+
]
|
|
4867
4879
|
},
|
|
4868
4880
|
"required": true,
|
|
4869
4881
|
"description": ""
|
|
@@ -4900,12 +4912,26 @@
|
|
|
4900
4912
|
"docs": {
|
|
4901
4913
|
"description": "ListItem is responsible for rendering icon or a bullet as side item",
|
|
4902
4914
|
"props": {
|
|
4903
|
-
"
|
|
4904
|
-
"
|
|
4905
|
-
"
|
|
4906
|
-
"
|
|
4915
|
+
"variant": {
|
|
4916
|
+
"type": {
|
|
4917
|
+
"name": "objectOf",
|
|
4918
|
+
"value": {
|
|
4919
|
+
"name": "union",
|
|
4920
|
+
"value": [
|
|
4921
|
+
{
|
|
4922
|
+
"name": "string"
|
|
4923
|
+
},
|
|
4924
|
+
{
|
|
4925
|
+
"name": "number"
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
"name": "bool"
|
|
4929
|
+
}
|
|
4930
|
+
]
|
|
4931
|
+
}
|
|
4907
4932
|
},
|
|
4908
|
-
"required": false
|
|
4933
|
+
"required": false,
|
|
4934
|
+
"description": ""
|
|
4909
4935
|
},
|
|
4910
4936
|
"tokens": {
|
|
4911
4937
|
"type": {
|
|
@@ -4933,30 +4959,17 @@
|
|
|
4933
4959
|
"required": false,
|
|
4934
4960
|
"description": ""
|
|
4935
4961
|
},
|
|
4936
|
-
"variant": {
|
|
4937
|
-
"type": {
|
|
4938
|
-
"name": "objectOf",
|
|
4939
|
-
"value": {
|
|
4940
|
-
"name": "union",
|
|
4941
|
-
"value": [
|
|
4942
|
-
{
|
|
4943
|
-
"name": "string"
|
|
4944
|
-
},
|
|
4945
|
-
{
|
|
4946
|
-
"name": "number"
|
|
4947
|
-
},
|
|
4948
|
-
{
|
|
4949
|
-
"name": "bool"
|
|
4950
|
-
}
|
|
4951
|
-
]
|
|
4952
|
-
}
|
|
4953
|
-
},
|
|
4954
|
-
"required": false,
|
|
4955
|
-
"description": ""
|
|
4956
|
-
},
|
|
4957
4962
|
"children": {
|
|
4958
4963
|
"type": {
|
|
4959
|
-
"name": "
|
|
4964
|
+
"name": "union",
|
|
4965
|
+
"value": [
|
|
4966
|
+
{
|
|
4967
|
+
"name": "node"
|
|
4968
|
+
},
|
|
4969
|
+
{
|
|
4970
|
+
"name": "func"
|
|
4971
|
+
}
|
|
4972
|
+
]
|
|
4960
4973
|
},
|
|
4961
4974
|
"required": true,
|
|
4962
4975
|
"description": ""
|
|
@@ -5540,7 +5553,7 @@
|
|
|
5540
5553
|
}
|
|
5541
5554
|
},
|
|
5542
5555
|
"attributes": {
|
|
5543
|
-
"acceptsRNA11yProps":
|
|
5556
|
+
"acceptsRNA11yProps": false
|
|
5544
5557
|
}
|
|
5545
5558
|
}
|
|
5546
5559
|
}
|
|
@@ -8128,154 +8141,6 @@
|
|
|
8128
8141
|
}
|
|
8129
8142
|
}
|
|
8130
8143
|
},
|
|
8131
|
-
"Button": {
|
|
8132
|
-
"docs": {
|
|
8133
|
-
"description": "",
|
|
8134
|
-
"props": {
|
|
8135
|
-
"tokens": {
|
|
8136
|
-
"type": {
|
|
8137
|
-
"name": "custom",
|
|
8138
|
-
"raw": {
|
|
8139
|
-
"borderColor": "color",
|
|
8140
|
-
"borderWidth": "border",
|
|
8141
|
-
"borderRadius": "radius",
|
|
8142
|
-
"shadow": "shadow",
|
|
8143
|
-
"fontSize": "fontSize",
|
|
8144
|
-
"color": "color",
|
|
8145
|
-
"lineHeight": "lineHeight",
|
|
8146
|
-
"textAlign": "flexJustifyContent",
|
|
8147
|
-
"alignSelf": "flexAlign",
|
|
8148
|
-
"fontName": "fontName",
|
|
8149
|
-
"fontWeight": "fontWeight",
|
|
8150
|
-
"backgroundColor": "color",
|
|
8151
|
-
"opacity": "opacity",
|
|
8152
|
-
"paddingLeft": "size",
|
|
8153
|
-
"paddingRight": "size",
|
|
8154
|
-
"paddingTop": "size",
|
|
8155
|
-
"paddingBottom": "size",
|
|
8156
|
-
"width": "size",
|
|
8157
|
-
"minWidth": "size",
|
|
8158
|
-
"iconSize": "size",
|
|
8159
|
-
"iconSpace": "integer",
|
|
8160
|
-
"icon": "icon",
|
|
8161
|
-
"outerBorderColor": "color",
|
|
8162
|
-
"outerBorderWidth": "border",
|
|
8163
|
-
"outerBorderGap": "size",
|
|
8164
|
-
"outerBackgroundColor": "color"
|
|
8165
|
-
}
|
|
8166
|
-
},
|
|
8167
|
-
"required": false,
|
|
8168
|
-
"description": ""
|
|
8169
|
-
},
|
|
8170
|
-
"inactive": {
|
|
8171
|
-
"type": {
|
|
8172
|
-
"name": "bool"
|
|
8173
|
-
},
|
|
8174
|
-
"required": false,
|
|
8175
|
-
"description": "If true, prevents the button from being pressed, changes the cursor (on web) and accessibility\nattributes to communicate this to the user, and applies `inactive: true` appearances from the theme"
|
|
8176
|
-
},
|
|
8177
|
-
"disabled": {
|
|
8178
|
-
"type": {
|
|
8179
|
-
"name": "bool"
|
|
8180
|
-
},
|
|
8181
|
-
"required": false,
|
|
8182
|
-
"description": "Alias for `inactive`"
|
|
8183
|
-
},
|
|
8184
|
-
"children": {
|
|
8185
|
-
"type": {
|
|
8186
|
-
"name": "custom",
|
|
8187
|
-
"raw": "ABBPropTypes.childrenOf(\n PropTypes.oneOfType([ABBPropTypes.elementType(A11yText), PropTypes.string])\n)"
|
|
8188
|
-
},
|
|
8189
|
-
"required": false,
|
|
8190
|
-
"description": "Button's children must be either:\n - One or more text strings and / or A11yText components\n - A render function with contents that responds to current button state by being passed an object of:\n```\n{ hovered<bool>, focused<bool>, pressed<bool>, inactive<bool>, selected<bool>, textStyles<RNStyle> }\n```"
|
|
8191
|
-
},
|
|
8192
|
-
"onPress": {
|
|
8193
|
-
"type": {
|
|
8194
|
-
"name": "func"
|
|
8195
|
-
},
|
|
8196
|
-
"required": false,
|
|
8197
|
-
"description": "Function called when the button is pressed. Required unless the button has a href."
|
|
8198
|
-
},
|
|
8199
|
-
"iconProps": {
|
|
8200
|
-
"type": {
|
|
8201
|
-
"name": "exact",
|
|
8202
|
-
"value": {
|
|
8203
|
-
"variant": {
|
|
8204
|
-
"name": "custom",
|
|
8205
|
-
"raw": "variantProp.propType",
|
|
8206
|
-
"required": false
|
|
8207
|
-
},
|
|
8208
|
-
"tokens": {
|
|
8209
|
-
"name": "custom",
|
|
8210
|
-
"raw": "getTokensPropType('Icon')",
|
|
8211
|
-
"required": false
|
|
8212
|
-
},
|
|
8213
|
-
"accessibilityLabel": {
|
|
8214
|
-
"name": "string",
|
|
8215
|
-
"description": "Descriptive label used in web SVG title tag for accessibility",
|
|
8216
|
-
"required": false
|
|
8217
|
-
},
|
|
8218
|
-
"scalesWithText": {
|
|
8219
|
-
"name": "bool",
|
|
8220
|
-
"description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
|
|
8221
|
-
"required": false
|
|
8222
|
-
}
|
|
8223
|
-
}
|
|
8224
|
-
},
|
|
8225
|
-
"required": false,
|
|
8226
|
-
"description": "Optional variant that may be passed down to the link's icon if there is one"
|
|
8227
|
-
},
|
|
8228
|
-
"iconPosition": {
|
|
8229
|
-
"type": {
|
|
8230
|
-
"name": "enum",
|
|
8231
|
-
"value": [
|
|
8232
|
-
{
|
|
8233
|
-
"value": "'left'",
|
|
8234
|
-
"computed": false
|
|
8235
|
-
},
|
|
8236
|
-
{
|
|
8237
|
-
"value": "'right'",
|
|
8238
|
-
"computed": false
|
|
8239
|
-
}
|
|
8240
|
-
]
|
|
8241
|
-
},
|
|
8242
|
-
"required": false,
|
|
8243
|
-
"description": "When `icon` is provided, use `iconPosition` to place the Icon to the left or right side of the button."
|
|
8244
|
-
},
|
|
8245
|
-
"icon": {
|
|
8246
|
-
"type": {
|
|
8247
|
-
"name": "func"
|
|
8248
|
-
},
|
|
8249
|
-
"required": false,
|
|
8250
|
-
"description": "A function component for an SVG icon to render inside the link. Inherits size and color from\nthe link and any Typography the link is nested inside."
|
|
8251
|
-
},
|
|
8252
|
-
"variant": {
|
|
8253
|
-
"type": {
|
|
8254
|
-
"name": "objectOf",
|
|
8255
|
-
"value": {
|
|
8256
|
-
"name": "union",
|
|
8257
|
-
"value": [
|
|
8258
|
-
{
|
|
8259
|
-
"name": "string"
|
|
8260
|
-
},
|
|
8261
|
-
{
|
|
8262
|
-
"name": "number"
|
|
8263
|
-
},
|
|
8264
|
-
{
|
|
8265
|
-
"name": "bool"
|
|
8266
|
-
}
|
|
8267
|
-
]
|
|
8268
|
-
}
|
|
8269
|
-
},
|
|
8270
|
-
"required": false,
|
|
8271
|
-
"description": ""
|
|
8272
|
-
}
|
|
8273
|
-
},
|
|
8274
|
-
"attributes": {
|
|
8275
|
-
"acceptsRNA11yProps": true
|
|
8276
|
-
}
|
|
8277
|
-
}
|
|
8278
|
-
},
|
|
8279
8144
|
"ButtonGroup": {
|
|
8280
8145
|
"docs": {
|
|
8281
8146
|
"description": "",
|
|
@@ -8517,214 +8382,6 @@
|
|
|
8517
8382
|
}
|
|
8518
8383
|
}
|
|
8519
8384
|
},
|
|
8520
|
-
"ButtonLink": {
|
|
8521
|
-
"docs": {
|
|
8522
|
-
"description": "`ButtonLink` is a component with the semantics and behaviour of a link, but with the visual appearance of a button.\nButtonLink is a block-level component and should not be used inline.",
|
|
8523
|
-
"props": {
|
|
8524
|
-
"tokens": {
|
|
8525
|
-
"type": {
|
|
8526
|
-
"name": "custom",
|
|
8527
|
-
"raw": {
|
|
8528
|
-
"borderColor": "color",
|
|
8529
|
-
"borderWidth": "border",
|
|
8530
|
-
"borderRadius": "radius",
|
|
8531
|
-
"shadow": "shadow",
|
|
8532
|
-
"fontSize": "fontSize",
|
|
8533
|
-
"color": "color",
|
|
8534
|
-
"lineHeight": "lineHeight",
|
|
8535
|
-
"textAlign": "flexJustifyContent",
|
|
8536
|
-
"alignSelf": "flexAlign",
|
|
8537
|
-
"fontName": "fontName",
|
|
8538
|
-
"fontWeight": "fontWeight",
|
|
8539
|
-
"backgroundColor": "color",
|
|
8540
|
-
"opacity": "opacity",
|
|
8541
|
-
"paddingLeft": "size",
|
|
8542
|
-
"paddingRight": "size",
|
|
8543
|
-
"paddingTop": "size",
|
|
8544
|
-
"paddingBottom": "size",
|
|
8545
|
-
"width": "size",
|
|
8546
|
-
"minWidth": "size",
|
|
8547
|
-
"iconSize": "size",
|
|
8548
|
-
"iconSpace": "integer",
|
|
8549
|
-
"icon": "icon",
|
|
8550
|
-
"outerBorderColor": "color",
|
|
8551
|
-
"outerBorderWidth": "border",
|
|
8552
|
-
"outerBorderGap": "size",
|
|
8553
|
-
"outerBackgroundColor": "color"
|
|
8554
|
-
}
|
|
8555
|
-
},
|
|
8556
|
-
"required": false,
|
|
8557
|
-
"description": ""
|
|
8558
|
-
},
|
|
8559
|
-
"inactive": {
|
|
8560
|
-
"type": {
|
|
8561
|
-
"name": "bool"
|
|
8562
|
-
},
|
|
8563
|
-
"required": false,
|
|
8564
|
-
"description": "If true, prevents the button from being pressed, changes the cursor (on web) and accessibility\nattributes to communicate this to the user, and applies `inactive: true` appearances from the theme"
|
|
8565
|
-
},
|
|
8566
|
-
"disabled": {
|
|
8567
|
-
"type": {
|
|
8568
|
-
"name": "bool"
|
|
8569
|
-
},
|
|
8570
|
-
"required": false,
|
|
8571
|
-
"description": "Alias for `inactive`"
|
|
8572
|
-
},
|
|
8573
|
-
"children": {
|
|
8574
|
-
"type": {
|
|
8575
|
-
"name": "custom",
|
|
8576
|
-
"raw": "ABBPropTypes.childrenOf(\n PropTypes.oneOfType([ABBPropTypes.elementType(A11yText), PropTypes.string])\n)"
|
|
8577
|
-
},
|
|
8578
|
-
"required": false,
|
|
8579
|
-
"description": "Button's children must be either:\n - One or more text strings and / or A11yText components\n - A render function with contents that responds to current button state by being passed an object of:\n```\n{ hovered<bool>, focused<bool>, pressed<bool>, inactive<bool>, selected<bool>, textStyles<RNStyle> }\n```"
|
|
8580
|
-
},
|
|
8581
|
-
"onPress": {
|
|
8582
|
-
"type": {
|
|
8583
|
-
"name": "func"
|
|
8584
|
-
},
|
|
8585
|
-
"required": false,
|
|
8586
|
-
"description": "Function called when the button is pressed. Required unless the button has a href."
|
|
8587
|
-
},
|
|
8588
|
-
"iconProps": {
|
|
8589
|
-
"type": {
|
|
8590
|
-
"name": "exact",
|
|
8591
|
-
"value": {
|
|
8592
|
-
"variant": {
|
|
8593
|
-
"name": "custom",
|
|
8594
|
-
"raw": "variantProp.propType",
|
|
8595
|
-
"required": false
|
|
8596
|
-
},
|
|
8597
|
-
"tokens": {
|
|
8598
|
-
"name": "custom",
|
|
8599
|
-
"raw": "getTokensPropType('Icon')",
|
|
8600
|
-
"required": false
|
|
8601
|
-
},
|
|
8602
|
-
"accessibilityLabel": {
|
|
8603
|
-
"name": "string",
|
|
8604
|
-
"description": "Descriptive label used in web SVG title tag for accessibility",
|
|
8605
|
-
"required": false
|
|
8606
|
-
},
|
|
8607
|
-
"scalesWithText": {
|
|
8608
|
-
"name": "bool",
|
|
8609
|
-
"description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
|
|
8610
|
-
"required": false
|
|
8611
|
-
}
|
|
8612
|
-
}
|
|
8613
|
-
},
|
|
8614
|
-
"required": false,
|
|
8615
|
-
"description": "Optional variant that may be passed down to the link's icon if there is one"
|
|
8616
|
-
},
|
|
8617
|
-
"iconPosition": {
|
|
8618
|
-
"type": {
|
|
8619
|
-
"name": "enum",
|
|
8620
|
-
"value": [
|
|
8621
|
-
{
|
|
8622
|
-
"value": "'left'",
|
|
8623
|
-
"computed": false
|
|
8624
|
-
},
|
|
8625
|
-
{
|
|
8626
|
-
"value": "'right'",
|
|
8627
|
-
"computed": false
|
|
8628
|
-
}
|
|
8629
|
-
]
|
|
8630
|
-
},
|
|
8631
|
-
"required": false,
|
|
8632
|
-
"description": "When `icon` is provided, use `iconPosition` to place the Icon to the left or right side of the button."
|
|
8633
|
-
},
|
|
8634
|
-
"icon": {
|
|
8635
|
-
"type": {
|
|
8636
|
-
"name": "func"
|
|
8637
|
-
},
|
|
8638
|
-
"required": false,
|
|
8639
|
-
"description": "A function component for an SVG icon to render inside the link. Inherits size and color from\nthe link and any Typography the link is nested inside."
|
|
8640
|
-
},
|
|
8641
|
-
"variant": {
|
|
8642
|
-
"type": {
|
|
8643
|
-
"name": "objectOf",
|
|
8644
|
-
"value": {
|
|
8645
|
-
"name": "union",
|
|
8646
|
-
"value": [
|
|
8647
|
-
{
|
|
8648
|
-
"name": "string"
|
|
8649
|
-
},
|
|
8650
|
-
{
|
|
8651
|
-
"name": "number"
|
|
8652
|
-
},
|
|
8653
|
-
{
|
|
8654
|
-
"name": "bool"
|
|
8655
|
-
}
|
|
8656
|
-
]
|
|
8657
|
-
}
|
|
8658
|
-
},
|
|
8659
|
-
"required": false,
|
|
8660
|
-
"description": ""
|
|
8661
|
-
},
|
|
8662
|
-
"onPressIn": {
|
|
8663
|
-
"type": {
|
|
8664
|
-
"name": "func"
|
|
8665
|
-
},
|
|
8666
|
-
"required": false,
|
|
8667
|
-
"description": ""
|
|
8668
|
-
},
|
|
8669
|
-
"onPressOut": {
|
|
8670
|
-
"type": {
|
|
8671
|
-
"name": "func"
|
|
8672
|
-
},
|
|
8673
|
-
"required": false,
|
|
8674
|
-
"description": ""
|
|
8675
|
-
},
|
|
8676
|
-
"href": {
|
|
8677
|
-
"type": {
|
|
8678
|
-
"name": "string"
|
|
8679
|
-
},
|
|
8680
|
-
"required": false,
|
|
8681
|
-
"description": ""
|
|
8682
|
-
},
|
|
8683
|
-
"hrefAttrs": {
|
|
8684
|
-
"type": {
|
|
8685
|
-
"name": "shape",
|
|
8686
|
-
"value": {
|
|
8687
|
-
"download": {
|
|
8688
|
-
"name": "string",
|
|
8689
|
-
"required": false
|
|
8690
|
-
},
|
|
8691
|
-
"rel": {
|
|
8692
|
-
"name": "string",
|
|
8693
|
-
"required": false
|
|
8694
|
-
},
|
|
8695
|
-
"target": {
|
|
8696
|
-
"name": "enum",
|
|
8697
|
-
"value": [
|
|
8698
|
-
{
|
|
8699
|
-
"value": "'_self'",
|
|
8700
|
-
"computed": false
|
|
8701
|
-
},
|
|
8702
|
-
{
|
|
8703
|
-
"value": "'_blank'",
|
|
8704
|
-
"computed": false
|
|
8705
|
-
},
|
|
8706
|
-
{
|
|
8707
|
-
"value": "'_parent'",
|
|
8708
|
-
"computed": false
|
|
8709
|
-
},
|
|
8710
|
-
{
|
|
8711
|
-
"value": "'_top'",
|
|
8712
|
-
"computed": false
|
|
8713
|
-
}
|
|
8714
|
-
],
|
|
8715
|
-
"required": false
|
|
8716
|
-
}
|
|
8717
|
-
}
|
|
8718
|
-
},
|
|
8719
|
-
"required": false,
|
|
8720
|
-
"description": ""
|
|
8721
|
-
}
|
|
8722
|
-
},
|
|
8723
|
-
"attributes": {
|
|
8724
|
-
"acceptsRNA11yProps": true
|
|
8725
|
-
}
|
|
8726
|
-
}
|
|
8727
|
-
},
|
|
8728
8385
|
"Carousel": {
|
|
8729
8386
|
"docs": {
|
|
8730
8387
|
"description": "Carousel is a general-purpose content slider that can be used to render content in terms of slides.\n\n ## Usage\n - `Carousel` is a top-level export from `@telus-uds/components-base` which is used to render a Carousel\n - Immediately within `Carousel`, individual slides are wrapped in `Carousel.Item` for the top-level `Carousel` to know how to identify an individual slide\n - You can use any UDS component or other platform-specific component, (based on the platform you're rendering) to achieve any desired layout\n - By default, Carousel takea all the `width` available to it and the `height` is determined based on the content in the slide with more content\n - You may want to wrap Carousel in other layout components like `Box`, `FlexGrid` etc, to achieve a responsive layout of your need\n\n ## `useCarousel` custom hook\n\n ```jsx\n import { useCarousel } from '@telus-uds/components-base'\n\n const SomeComponentWithinCarouselItem = () => {\n const {\n activeIndex,\n totalItems,\n width,\n goTo\n } = useCarousel()\n return <Text>Hi!</Text>\n }\n ```\n\n You can use `useCarousel` to hook into internal state of the Carousel component like:\n - `activeIndex`: Index of the current slide\n - `totalItems`: Total number of items/slides passed to the Carousel\n - `width`: Width of the individual carousel slide\n - `goTo`: A function to go to a particular slide by passing the index of that slide, e.g: goTo(0) where `0` is the index of the first slide\n\n ## Accessibility\n\n - Top-level `Carousel` and `Carousel.Item` can take all possible React Native's `View` and `a11y` props\n - If your slide contains input elements like buttons, you may want to configure them to be only focusable when `activeIndex` is equal to the current slide index in order to avoid tabbing going between slides\n\n ## Platform considerations\n The component is available on both native platforms and web.\n\n ## Other considerations\n - You may want to use the same kind of layout in all your slides to avoid visual and height differences\n - `previous` and `next` navigation buttons are automatically removed in `sm` and `xs` viewports, as these smaller viewports offers swipe functionality\n\n ## Tokens\n\n You can override the following tokens in exceptional circumstances:\n - `previousIcon` - Icon of the previous button\n - `nextIcon` - Icon of the next button\n - `showPreviousNextNavigation` - If you want to show/hide the previous/next navigation\n - `showPanelNavigation` - If you want to show/hide the panel navigation\n - `spaceBetweenSlideAndPreviousNextNavigation` - Horizontal space between slide and previous/next navigational buttons\n - `spaceBetweenSlideAndPanelNavigation` - Vertical space between slide area and panel navigation area",
|
|
@@ -37,9 +37,9 @@ const A11yInfoProvider = _ref => {
|
|
|
37
37
|
return () => {};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
_AccessibilityInfo.default.addEventListener('reduceMotionChanged', setReduceMotionEnabled);
|
|
40
|
+
const motionSubscription = _AccessibilityInfo.default.addEventListener('reduceMotionChanged', setReduceMotionEnabled);
|
|
41
41
|
|
|
42
|
-
_AccessibilityInfo.default.addEventListener('screenReaderChanged', setScreenReaderEnabled);
|
|
42
|
+
const screenReaderSubscription = _AccessibilityInfo.default.addEventListener('screenReaderChanged', setScreenReaderEnabled);
|
|
43
43
|
|
|
44
44
|
const setInitialA11yInfo = async () => {
|
|
45
45
|
const [initialReduceMotionEnabled, initialScreenReaderEnabled] = await Promise.all([_AccessibilityInfo.default.isReduceMotionEnabled(), _AccessibilityInfo.default.isScreenReaderEnabled()]); // Browsers can't detect screen readers; in RNW isScreenReaderEnabled() is always `true`
|
|
@@ -55,9 +55,18 @@ const A11yInfoProvider = _ref => {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
return () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
// From react-native 0.65, AccessibilityInfo.removeEventListener is deprecated for `remove` on addEventListener return value
|
|
59
|
+
if (typeof (motionSubscription === null || motionSubscription === void 0 ? void 0 : motionSubscription.remove) === 'function') {
|
|
60
|
+
motionSubscription === null || motionSubscription === void 0 ? void 0 : motionSubscription.remove();
|
|
61
|
+
} else if (typeof _AccessibilityInfo.default.removeEventListener === 'function') {
|
|
62
|
+
_AccessibilityInfo.default.removeEventListener('reduceMotionChanged', setReduceMotionEnabled);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (typeof (screenReaderSubscription === null || screenReaderSubscription === void 0 ? void 0 : screenReaderSubscription.remove) === 'function') {
|
|
66
|
+
screenReaderSubscription === null || screenReaderSubscription === void 0 ? void 0 : screenReaderSubscription.remove();
|
|
67
|
+
} else if (typeof _AccessibilityInfo.default.removeEventListener === 'function') {
|
|
68
|
+
_AccessibilityInfo.default.removeEventListener('screenReaderChanged', setScreenReaderEnabled);
|
|
69
|
+
}
|
|
61
70
|
};
|
|
62
71
|
}, []);
|
|
63
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ReducedMotionContext.Provider, {
|
|
@@ -155,8 +155,9 @@ const ButtonGroup = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
155
155
|
tokens: getButtonTokens,
|
|
156
156
|
selected: isSelected,
|
|
157
157
|
inactive: inactive,
|
|
158
|
-
...
|
|
159
|
-
|
|
158
|
+
...selectItemProps({ ...itemRest,
|
|
159
|
+
...itemA11y
|
|
160
|
+
}),
|
|
160
161
|
children: label
|
|
161
162
|
}, id);
|
|
162
163
|
})
|
package/lib/Checkbox/Checkbox.js
CHANGED
|
@@ -219,6 +219,14 @@ const Checkbox = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
|
|
|
219
219
|
const {
|
|
220
220
|
themeOptions
|
|
221
221
|
} = (0, _ThemeProvider.useTheme)();
|
|
222
|
+
const selectedProps = selectProps({
|
|
223
|
+
accessibilityRole: 'checkbox',
|
|
224
|
+
accessibilityState: {
|
|
225
|
+
checked: isChecked,
|
|
226
|
+
disabled: inactive
|
|
227
|
+
},
|
|
228
|
+
...rest
|
|
229
|
+
});
|
|
222
230
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
|
|
223
231
|
style: staticStyles.wrapper,
|
|
224
232
|
ref: ref,
|
|
@@ -229,12 +237,7 @@ const Checkbox = /*#__PURE__*/(0, _react.forwardRef)((_ref5, ref) => {
|
|
|
229
237
|
disabled: inactive,
|
|
230
238
|
onKeyDown: handleKeyDown,
|
|
231
239
|
onPress: handleChange,
|
|
232
|
-
|
|
233
|
-
accessibilityState: {
|
|
234
|
-
checked: isChecked,
|
|
235
|
-
disabled: inactive
|
|
236
|
-
},
|
|
237
|
-
...selectProps(rest),
|
|
240
|
+
...selectedProps,
|
|
238
241
|
children: _ref6 => {
|
|
239
242
|
let {
|
|
240
243
|
focused: focus,
|