@telus-uds/components-web 2.19.2 → 2.19.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,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 Wed, 20 Sep 2023 21:43:57 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.19.3
|
|
8
|
+
|
|
9
|
+
Wed, 20 Sep 2023 21:43:57 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- `TermsAndConditions`: Fix content not being rendered (shahzaibkhalidmalik@outlook.com)
|
|
14
|
+
|
|
7
15
|
## 2.19.2
|
|
8
16
|
|
|
9
|
-
Sat, 16 Sep 2023 01:
|
|
17
|
+
Sat, 16 Sep 2023 01:01:30 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
|
@@ -84,13 +84,6 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
84
84
|
expandTitleBorderColor,
|
|
85
85
|
expandTitleUnderline
|
|
86
86
|
} = getTokens();
|
|
87
|
-
const [expand, setExpand] = (0, _react.useState)(false);
|
|
88
|
-
|
|
89
|
-
const handleExpandToggle = (expandProps, event, expanded) => {
|
|
90
|
-
expandProps.onToggle('ExpandCollapsePanel', event);
|
|
91
|
-
setExpand(!expanded);
|
|
92
|
-
};
|
|
93
|
-
|
|
94
87
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
|
|
95
88
|
tokens: {
|
|
96
89
|
borderWidth: expandBaseBorderWidth
|
|
@@ -117,7 +110,6 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
117
110
|
expanded
|
|
118
111
|
});
|
|
119
112
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
|
|
120
|
-
onClick: event => handleExpandToggle(expandProps, event, expanded),
|
|
121
113
|
ref: ref,
|
|
122
114
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
|
|
123
115
|
tokens: getTokens(),
|
|
@@ -125,8 +117,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
125
117
|
icon: icon,
|
|
126
118
|
variant: {
|
|
127
119
|
size: 'small'
|
|
128
|
-
}
|
|
129
|
-
onClick: event => handleExpandToggle(expandProps, event, expanded)
|
|
120
|
+
}
|
|
130
121
|
})
|
|
131
122
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseTitle, {
|
|
132
123
|
tokens: getTokens(),
|
|
@@ -142,7 +133,7 @@ const ExpandCollapse = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
|
142
133
|
borderColor: contentBorderColor,
|
|
143
134
|
marginBottom: contentMarginBottom
|
|
144
135
|
},
|
|
145
|
-
children:
|
|
136
|
+
children: children
|
|
146
137
|
})
|
|
147
138
|
});
|
|
148
139
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { 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,13 +64,6 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
64
64
|
expandTitleBorderColor,
|
|
65
65
|
expandTitleUnderline
|
|
66
66
|
} = getTokens();
|
|
67
|
-
const [expand, setExpand] = useState(false);
|
|
68
|
-
|
|
69
|
-
const handleExpandToggle = (expandProps, event, expanded) => {
|
|
70
|
-
expandProps.onToggle('ExpandCollapsePanel', event);
|
|
71
|
-
setExpand(!expanded);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
67
|
return /*#__PURE__*/_jsx(ExpandCollapseBase, {
|
|
75
68
|
tokens: {
|
|
76
69
|
borderWidth: expandBaseBorderWidth
|
|
@@ -97,7 +90,6 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
97
90
|
expanded
|
|
98
91
|
});
|
|
99
92
|
return /*#__PURE__*/_jsxs(ExpandCollapseControl, {
|
|
100
|
-
onClick: event => handleExpandToggle(expandProps, event, expanded),
|
|
101
93
|
ref: ref,
|
|
102
94
|
children: [/*#__PURE__*/_jsx(ExpandCollapseIconContainer, {
|
|
103
95
|
tokens: getTokens(),
|
|
@@ -105,8 +97,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
105
97
|
icon: icon,
|
|
106
98
|
variant: {
|
|
107
99
|
size: 'small'
|
|
108
|
-
}
|
|
109
|
-
onClick: event => handleExpandToggle(expandProps, event, expanded)
|
|
100
|
+
}
|
|
110
101
|
})
|
|
111
102
|
}), /*#__PURE__*/_jsx(ExpandCollapseTitle, {
|
|
112
103
|
tokens: getTokens(),
|
|
@@ -122,7 +113,7 @@ const ExpandCollapse = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
122
113
|
borderColor: contentBorderColor,
|
|
123
114
|
marginBottom: contentMarginBottom
|
|
124
115
|
},
|
|
125
|
-
children:
|
|
116
|
+
children: children
|
|
126
117
|
})
|
|
127
118
|
});
|
|
128
119
|
});
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { forwardRef
|
|
1
|
+
import React, { forwardRef } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import {
|
|
4
4
|
ExpandCollapse as ExpandCollapseBase,
|
|
@@ -47,12 +47,6 @@ const ExpandCollapse = forwardRef(
|
|
|
47
47
|
expandTitleBorderColor,
|
|
48
48
|
expandTitleUnderline
|
|
49
49
|
} = getTokens()
|
|
50
|
-
const [expand, setExpand] = useState(false)
|
|
51
|
-
|
|
52
|
-
const handleExpandToggle = (expandProps, event, expanded) => {
|
|
53
|
-
expandProps.onToggle('ExpandCollapsePanel', event)
|
|
54
|
-
setExpand(!expanded)
|
|
55
|
-
}
|
|
56
50
|
|
|
57
51
|
return (
|
|
58
52
|
<ExpandCollapseBase
|
|
@@ -79,16 +73,10 @@ const ExpandCollapse = forwardRef(
|
|
|
79
73
|
const { icon } = getTokens({ expanded })
|
|
80
74
|
|
|
81
75
|
return (
|
|
82
|
-
<ExpandCollapseControl
|
|
83
|
-
onClick={(event) => handleExpandToggle(expandProps, event, expanded)}
|
|
84
|
-
ref={ref}
|
|
85
|
-
>
|
|
76
|
+
<ExpandCollapseControl ref={ref}>
|
|
86
77
|
<ExpandCollapseIconContainer tokens={getTokens()}>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
variant={{ size: 'small' }}
|
|
90
|
-
onClick={(event) => handleExpandToggle(expandProps, event, expanded)}
|
|
91
|
-
/>
|
|
78
|
+
{/* Can use `Icon` instead of `IconButton` but `Icon` does not have required stylistic variants */}
|
|
79
|
+
<IconButton icon={icon} variant={{ size: 'small' }} />
|
|
92
80
|
</ExpandCollapseIconContainer>
|
|
93
81
|
<ExpandCollapseTitle tokens={getTokens()}>
|
|
94
82
|
{expanded ? expandTitle : collapseTitle}
|
|
@@ -105,7 +93,7 @@ const ExpandCollapse = forwardRef(
|
|
|
105
93
|
marginBottom: contentMarginBottom
|
|
106
94
|
}}
|
|
107
95
|
>
|
|
108
|
-
{
|
|
96
|
+
{children}
|
|
109
97
|
</ExpandCollapseBase.Panel>
|
|
110
98
|
)}
|
|
111
99
|
</ExpandCollapseBase>
|