@telus-uds/components-web 2.19.3 → 2.19.5

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,29 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Wed, 20 Sep 2023 21:43:57 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 27 Sep 2023 20:45:15 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.19.5
8
+
9
+ Wed, 27 Sep 2023 20:45:15 GMT
10
+
11
+ ### Patches
12
+
13
+ - Clicking on any clickable area should bubble event to relevant `Pressable` element (shahzaibkhalidmalik@outlook.com)
14
+ - Bump @telus-uds/components-base to v1.62.1
15
+
16
+ ## 2.19.4
17
+
18
+ Thu, 21 Sep 2023 23:09:58 GMT
19
+
20
+ ### Patches
21
+
22
+ - `TermsAndConditions`: Extra white space when `TermsAndConditions` is rendered at the bottom of page (shahzaibkhalidmalik@outlook.com)
23
+
7
24
  ## 2.19.3
8
25
 
9
- Wed, 20 Sep 2023 21:43:57 GMT
26
+ Wed, 20 Sep 2023 21:45:03 GMT
10
27
 
11
28
  ### Patches
12
29
 
@@ -4736,6 +4736,11 @@
4736
4736
  "name": "bool",
4737
4737
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
4738
4738
  "required": false
4739
+ },
4740
+ "style": {
4741
+ "name": "object",
4742
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
4743
+ "required": false
4739
4744
  }
4740
4745
  }
4741
4746
  },
@@ -4919,6 +4924,11 @@
4919
4924
  "name": "bool",
4920
4925
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
4921
4926
  "required": false
4927
+ },
4928
+ "style": {
4929
+ "name": "object",
4930
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
4931
+ "required": false
4922
4932
  }
4923
4933
  }
4924
4934
  },
@@ -5359,6 +5369,11 @@
5359
5369
  "name": "bool",
5360
5370
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling.",
5361
5371
  "required": false
5372
+ },
5373
+ "style": {
5374
+ "name": "object",
5375
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}",
5376
+ "required": false
5362
5377
  }
5363
5378
  }
5364
5379
  },
@@ -8403,6 +8418,17 @@
8403
8418
  "required": false,
8404
8419
  "description": "controls whether the icon size should be proportionate to any accessibility-related font scaling."
8405
8420
  },
8421
+ "style": {
8422
+ "defaultValue": {
8423
+ "value": "{}",
8424
+ "computed": false
8425
+ },
8426
+ "type": {
8427
+ "name": "object"
8428
+ },
8429
+ "required": false,
8430
+ "description": "Custom style object to be applied to the icon component.\nThis is useful for overriding the default icon style but for cases where desires styles are not available as tokens.\n\nNote: This prop is only used in web.\n\n@example\n<Icon style={{ color: 'red' }}"
8431
+ },
8406
8432
  "variant": {
8407
8433
  "type": {
8408
8434
  "name": "objectOf",
@@ -13803,6 +13829,13 @@
13803
13829
  "required": false,
13804
13830
  "description": "The message. Can be raw text or text components."
13805
13831
  },
13832
+ "nativeID": {
13833
+ "type": {
13834
+ "name": "string"
13835
+ },
13836
+ "required": false,
13837
+ "description": "The `id` of the tooltip button."
13838
+ },
13806
13839
  "tokens": {
13807
13840
  "type": {
13808
13841
  "name": "custom",
@@ -84,6 +84,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
84
84
  expandTitleBorderColor,
85
85
  expandTitleUnderline
86
86
  } = getTokens();
87
+ const [isExpanded, setIsExpanded] = (0, _react.useState)(false);
87
88
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
88
89
  tokens: {
89
90
  borderWidth: expandBaseBorderWidth
@@ -109,6 +110,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
109
110
  } = getTokens({
110
111
  expanded
111
112
  });
113
+ setIsExpanded(expanded);
112
114
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
113
115
  ref: ref,
114
116
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
@@ -133,7 +135,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
133
135
  borderColor: contentBorderColor,
134
136
  marginBottom: contentMarginBottom
135
137
  },
136
- children: children
138
+ children: isExpanded ? children : null
137
139
  })
138
140
  });
139
141
  });
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from 'react';
1
+ import React, { useState, forwardRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { ExpandCollapse as ExpandCollapseBase, IconButton, useThemeTokensCallback } from '@telus-uds/components-base';
4
4
  import styled from 'styled-components';
@@ -64,6 +64,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
64
64
  expandTitleBorderColor,
65
65
  expandTitleUnderline
66
66
  } = getTokens();
67
+ const [isExpanded, setIsExpanded] = useState(false);
67
68
  return /*#__PURE__*/_jsx(ExpandCollapseBase, {
68
69
  tokens: {
69
70
  borderWidth: expandBaseBorderWidth
@@ -89,6 +90,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
89
90
  } = getTokens({
90
91
  expanded
91
92
  });
93
+ setIsExpanded(expanded);
92
94
  return /*#__PURE__*/_jsxs(ExpandCollapseControl, {
93
95
  ref: ref,
94
96
  children: [/*#__PURE__*/_jsx(ExpandCollapseIconContainer, {
@@ -113,7 +115,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
113
115
  borderColor: contentBorderColor,
114
116
  marginBottom: contentMarginBottom
115
117
  },
116
- children: children
118
+ children: isExpanded ? children : null
117
119
  })
118
120
  });
119
121
  });
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  ],
6
6
  "dependencies": {
7
7
  "@gorhom/portal": "^1.0.14",
8
- "@telus-uds/components-base": "1.62.0",
8
+ "@telus-uds/components-base": "1.62.1",
9
9
  "@telus-uds/system-constants": "^1.3.0",
10
10
  "fscreen": "^1.2.0",
11
11
  "lodash.omit": "^4.5.0",
@@ -63,5 +63,5 @@
63
63
  "skip": true
64
64
  },
65
65
  "types": "types/index.d.ts",
66
- "version": "2.19.3"
66
+ "version": "2.19.5"
67
67
  }
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from 'react'
1
+ import React, { useState, forwardRef } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import {
4
4
  ExpandCollapse as ExpandCollapseBase,
@@ -47,6 +47,7 @@ const ExpandCollapse = forwardRef(
47
47
  expandTitleBorderColor,
48
48
  expandTitleUnderline
49
49
  } = getTokens()
50
+ const [isExpanded, setIsExpanded] = useState(false)
50
51
 
51
52
  return (
52
53
  <ExpandCollapseBase
@@ -71,6 +72,7 @@ const ExpandCollapse = forwardRef(
71
72
  control={(pressableState) => {
72
73
  const { expanded } = pressableState || {}
73
74
  const { icon } = getTokens({ expanded })
75
+ setIsExpanded(expanded)
74
76
 
75
77
  return (
76
78
  <ExpandCollapseControl ref={ref}>
@@ -93,7 +95,7 @@ const ExpandCollapse = forwardRef(
93
95
  marginBottom: contentMarginBottom
94
96
  }}
95
97
  >
96
- {children}
98
+ {isExpanded ? children : null}
97
99
  </ExpandCollapseBase.Panel>
98
100
  )}
99
101
  </ExpandCollapseBase>