@telus-uds/components-web 2.19.3 → 2.19.4
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,20 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 21 Sep 2023 23:08:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.19.4
|
|
8
|
+
|
|
9
|
+
Thu, 21 Sep 2023 23:08:57 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- `TermsAndConditions`: Extra white space when `TermsAndConditions` is rendered at the bottom of page (shahzaibkhalidmalik@outlook.com)
|
|
14
|
+
|
|
7
15
|
## 2.19.3
|
|
8
16
|
|
|
9
|
-
Wed, 20 Sep 2023 21:
|
|
17
|
+
Wed, 20 Sep 2023 21:45:03 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
|
@@ -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
|
@@ -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>
|