@telus-uds/components-base 1.8.2 → 1.8.3

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 CHANGED
@@ -1,12 +1,22 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Tue, 14 Jun 2022 15:26:07 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 15 Jun 2022 19:23:06 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.8.3
8
+
9
+ Wed, 15 Jun 2022 19:23:06 GMT
10
+
11
+ ### Patches
12
+
13
+ - fix List.Item crash on Android (alan.slater@nearform.com)
14
+ - fix modal close button zIndex (eugene@michasiw.com)
15
+ - Bump @telus-uds/browserslist-config to v1.0.3
16
+
7
17
  ## 1.8.2
8
18
 
9
- Tue, 14 Jun 2022 15:26:07 GMT
19
+ Tue, 14 Jun 2022 15:27:31 GMT
10
20
 
11
21
  ### Patches
12
22
 
@@ -4314,6 +4314,13 @@
4314
4314
  "docs": {
4315
4315
  "description": "An unordered List component has a child a ListItem that\nallows icon, dividers and customized typography",
4316
4316
  "props": {
4317
+ "accessibilityRole": {
4318
+ "defaultValue": {
4319
+ "value": "Platform.select({ web: 'list', default: undefined })",
4320
+ "computed": true
4321
+ },
4322
+ "required": false
4323
+ },
4317
4324
  "tokens": {
4318
4325
  "type": {
4319
4326
  "name": "custom",
@@ -4385,6 +4392,13 @@
4385
4392
  "docs": {
4386
4393
  "description": "ListItem is responsible for rendering icon or a bullet as side item",
4387
4394
  "props": {
4395
+ "accessibilityRole": {
4396
+ "defaultValue": {
4397
+ "value": "Platform.select({ web: 'listitem', default: undefined })",
4398
+ "computed": true
4399
+ },
4400
+ "required": false
4401
+ },
4388
4402
  "tokens": {
4389
4403
  "type": {
4390
4404
  "name": "custom",
@@ -4471,6 +4485,13 @@
4471
4485
  "docs": {
4472
4486
  "description": "An unordered List component has a child a ListItem that\nallows icon, dividers and customized typography",
4473
4487
  "props": {
4488
+ "accessibilityRole": {
4489
+ "defaultValue": {
4490
+ "value": "Platform.select({ web: 'list', default: undefined })",
4491
+ "computed": true
4492
+ },
4493
+ "required": false
4494
+ },
4474
4495
  "tokens": {
4475
4496
  "type": {
4476
4497
  "name": "custom",
@@ -4542,6 +4563,13 @@
4542
4563
  "docs": {
4543
4564
  "description": "ListItem is responsible for rendering icon or a bullet as side item",
4544
4565
  "props": {
4566
+ "accessibilityRole": {
4567
+ "defaultValue": {
4568
+ "value": "Platform.select({ web: 'listitem', default: undefined })",
4569
+ "computed": true
4570
+ },
4571
+ "required": false
4572
+ },
4545
4573
  "tokens": {
4546
4574
  "type": {
4547
4575
  "name": "custom",
@@ -4628,6 +4656,13 @@
4628
4656
  "docs": {
4629
4657
  "description": "ListItem is responsible for rendering icon or a bullet as side item",
4630
4658
  "props": {
4659
+ "accessibilityRole": {
4660
+ "defaultValue": {
4661
+ "value": "Platform.select({ web: 'listitem', default: undefined })",
4662
+ "computed": true
4663
+ },
4664
+ "required": false
4665
+ },
4631
4666
  "tokens": {
4632
4667
  "type": {
4633
4668
  "name": "custom",
package/lib/List/List.js CHANGED
@@ -37,14 +37,13 @@ const List = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
37
37
  showDivider,
38
38
  tokens,
39
39
  variant,
40
+ accessibilityRole = _Platform.default.select({
41
+ web: 'list',
42
+ default: undefined
43
+ }),
40
44
  ...rest
41
45
  } = _ref;
42
46
 
43
- const accessibilityRole = _Platform.default.select({
44
- web: 'list',
45
- default: 'none'
46
- });
47
-
48
47
  const items = _react.Children.map(children, (child, index) => {
49
48
  if (child.type.name === _ListItem.default.name) {
50
49
  return /*#__PURE__*/(0, _react.cloneElement)(child, {
@@ -139,6 +139,10 @@ const ListItem = /*#__PURE__*/(0, _react.forwardRef)((_ref9, ref) => {
139
139
  showDivider,
140
140
  children,
141
141
  isLastItem,
142
+ accessibilityRole = _Platform.default.select({
143
+ web: 'listitem',
144
+ default: undefined
145
+ }),
142
146
  ...rest
143
147
  } = _ref9;
144
148
  const themeTokens = (0, _ThemeProvider.useThemeTokens)('List', tokens, variant);
@@ -151,11 +155,6 @@ const ListItem = /*#__PURE__*/(0, _react.forwardRef)((_ref9, ref) => {
151
155
  const iconTokens = selectItemIconTokens(themeTokens);
152
156
  const sideItemContainerStyles = selectSideItemContainerStyles(themeTokens);
153
157
 
154
- const accessibilityRole = _Platform.default.select({
155
- web: 'listitem',
156
- default: 'item'
157
- });
158
-
159
158
  const renderItem = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
160
159
  style: staticStyles.wrap,
161
160
  children: (0, _utils.wrapStringsInText)(children, {
@@ -243,6 +243,7 @@ const staticStyles = _StyleSheet.default.create({
243
243
  closeButtonContainer: {
244
244
  position: 'absolute',
245
245
  top: 0,
246
- right: 0
246
+ right: 0,
247
+ zIndex: 1
247
248
  }
248
249
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telus-uds/components-base",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Base components",
5
5
  "keywords": [
6
6
  "base"
@@ -31,6 +31,7 @@
31
31
  "build:code": "npm run build:main && npm run build:module",
32
32
  "build:docs": "babel-node --plugins=@nearform/babel-plugin-react-docgen generate-component-docs.js",
33
33
  "storybook": "start-storybook",
34
+ "build-storybook": "build-storybook",
34
35
  "dev": "npm run build:code --watch"
35
36
  },
36
37
  "bugs": {
@@ -55,7 +56,7 @@
55
56
  "@storybook/react": "^6.5.6",
56
57
  "@storybook/builder-webpack5": "^6.5.6",
57
58
  "@storybook/manager-webpack5": "^6.5.6",
58
- "@telus-uds/browserslist-config": "^1.0.2",
59
+ "@telus-uds/browserslist-config": "^1.0.3",
59
60
  "@testing-library/jest-native": "^4.0.1",
60
61
  "@testing-library/react-hooks": "^7.0.1",
61
62
  "@testing-library/react-native": "^7.2.0",
package/src/List/List.jsx CHANGED
@@ -17,26 +17,37 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, vie
17
17
  * An unordered List component has a child a ListItem that
18
18
  * allows icon, dividers and customized typography
19
19
  */
20
- const List = forwardRef(({ children, showDivider, tokens, variant, ...rest }, ref) => {
21
- const accessibilityRole = Platform.select({ web: 'list', default: 'none' })
22
- const items = Children.map(children, (child, index) => {
23
- if (child.type.name === ListItem.name) {
24
- return cloneElement(child, {
25
- showDivider,
26
- isLastItem: index + 1 === Children.count(children),
27
- tokens,
28
- variant
29
- })
30
- }
31
- return child
32
- })
20
+ const List = forwardRef(
21
+ (
22
+ {
23
+ children,
24
+ showDivider,
25
+ tokens,
26
+ variant,
27
+ accessibilityRole = Platform.select({ web: 'list', default: undefined }),
28
+ ...rest
29
+ },
30
+ ref
31
+ ) => {
32
+ const items = Children.map(children, (child, index) => {
33
+ if (child.type.name === ListItem.name) {
34
+ return cloneElement(child, {
35
+ showDivider,
36
+ isLastItem: index + 1 === Children.count(children),
37
+ tokens,
38
+ variant
39
+ })
40
+ }
41
+ return child
42
+ })
33
43
 
34
- return (
35
- <View ref={ref} accessibilityRole={accessibilityRole} {...selectProps(rest)}>
36
- {items}
37
- </View>
38
- )
39
- })
44
+ return (
45
+ <View ref={ref} accessibilityRole={accessibilityRole} {...selectProps(rest)}>
46
+ {items}
47
+ </View>
48
+ )
49
+ }
50
+ )
40
51
  List.displayName = 'List'
41
52
 
42
53
  List.propTypes = {
@@ -65,7 +65,18 @@ const selectDividerStyles = ({ dividerColor, dividerSize, interItemMarginWithDiv
65
65
  */
66
66
  const ListItem = forwardRef(
67
67
  (
68
- { tokens, variant, icon, iconColor, iconSize, showDivider, children, isLastItem, ...rest },
68
+ {
69
+ tokens,
70
+ variant,
71
+ icon,
72
+ iconColor,
73
+ iconSize,
74
+ showDivider,
75
+ children,
76
+ isLastItem,
77
+ accessibilityRole = Platform.select({ web: 'listitem', default: undefined }),
78
+ ...rest
79
+ },
69
80
  ref
70
81
  ) => {
71
82
  const themeTokens = useThemeTokens('List', tokens, variant)
@@ -78,7 +89,6 @@ const ListItem = forwardRef(
78
89
  const itemBulletPositioningStyles = selectBulletPositioningStyles(themeTokens)
79
90
  const iconTokens = selectItemIconTokens(themeTokens)
80
91
  const sideItemContainerStyles = selectSideItemContainerStyles(themeTokens)
81
- const accessibilityRole = Platform.select({ web: 'listitem', default: 'item' })
82
92
 
83
93
  const renderItem = () => (
84
94
  <View style={staticStyles.wrap}>{wrapStringsInText(children, { style: itemStyles })}</View>
@@ -202,6 +202,7 @@ const staticStyles = StyleSheet.create({
202
202
  closeButtonContainer: {
203
203
  position: 'absolute',
204
204
  top: 0,
205
- right: 0
205
+ right: 0,
206
+ zIndex: 1
206
207
  }
207
208
  })