@telus-uds/components-web 2.40.0 → 2.42.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 +34 -2
- package/lib/OrderedList/Item.js +11 -4
- package/lib/PriceLockup/PriceLockup.js +36 -29
- package/lib/Progress/ProgressBar.js +8 -9
- package/lib/TermsAndConditions/TermsAndConditions.js +58 -4
- package/lib/baseExports.js +12 -0
- package/lib-module/OrderedList/Item.js +11 -4
- package/lib-module/PriceLockup/PriceLockup.js +36 -29
- package/lib-module/Progress/ProgressBar.js +9 -10
- package/lib-module/TermsAndConditions/TermsAndConditions.js +59 -5
- package/lib-module/baseExports.js +1 -1
- package/package.json +3 -3
- package/src/OrderedList/Item.jsx +9 -4
- package/src/PriceLockup/PriceLockup.jsx +3 -1
- package/src/Progress/ProgressBar.jsx +8 -8
- package/src/TermsAndConditions/TermsAndConditions.jsx +70 -5
- package/src/baseExports.js +2 -0
- package/types/Typography.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 12 Oct 2024 00:31:05 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.42.0
|
|
8
|
+
|
|
9
|
+
Sat, 12 Oct 2024 00:31:05 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `PriceLockup`: alignItemsText token added to the component to align right (flex-end), left (flex-start) or center the content (35577399+JoshHC@users.noreply.github.com)
|
|
14
|
+
- `ProgressBar`: add shadow tokens (jacqui.koroll@telus.com)
|
|
15
|
+
- `TermsAndConditions`: refactor component to use media-query-stylesheet (guillermo.peitzner@telus.com)
|
|
16
|
+
- Bump @telus-uds/components-base to v1.96.0
|
|
17
|
+
- Bump @telus-uds/system-theme-tokens to v2.65.0
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- `List`: Enable `CircleBullet` icon to visualize order of nested lists (jaime.tuyuc@telus.com)
|
|
22
|
+
- `OrderedList`: change display to render correctly (Mauricio.BatresMontejo@telus.com)
|
|
23
|
+
|
|
24
|
+
## 2.41.0
|
|
25
|
+
|
|
26
|
+
Wed, 25 Sep 2024 17:07:47 GMT
|
|
27
|
+
|
|
28
|
+
### Minor changes
|
|
29
|
+
|
|
30
|
+
- `TabBar`: new component added (35577399+JoshHC@users.noreply.github.com)
|
|
31
|
+
- `DownloadApp`: add component (Mauricio.BatresMontejo@telus.com)
|
|
32
|
+
- Bump @telus-uds/components-base to v1.95.0
|
|
33
|
+
- Bump @telus-uds/system-theme-tokens to v2.64.0
|
|
34
|
+
|
|
35
|
+
### Patches
|
|
36
|
+
|
|
37
|
+
- `Typography`: added strikethrough to components-web typography props as it was missing (chris.tafts@telus.com)
|
|
38
|
+
|
|
7
39
|
## 2.40.0
|
|
8
40
|
|
|
9
|
-
Mon, 16 Sep 2024 12:
|
|
41
|
+
Mon, 16 Sep 2024 12:35:38 GMT
|
|
10
42
|
|
|
11
43
|
### Minor changes
|
|
12
44
|
|
package/lib/OrderedList/Item.js
CHANGED
|
@@ -53,11 +53,14 @@ const StyledItemBase = /*#__PURE__*/(0, _styledComponents.default)(_ItemBase.def
|
|
|
53
53
|
counterIncrement: _constants.OL_COUNTER_NAME,
|
|
54
54
|
'::before': {
|
|
55
55
|
content: `counter(${_constants.OL_COUNTER_NAME})'.'`,
|
|
56
|
-
display: 'inline-
|
|
56
|
+
display: 'inline-block',
|
|
57
57
|
color: itemColor || itemTextColor,
|
|
58
58
|
width: itemBulletContainerWidth,
|
|
59
59
|
paddingRight: listGutter,
|
|
60
|
-
|
|
60
|
+
textAlign: itemBulletTextAlign,
|
|
61
|
+
flexShrink: 0,
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
overflow: 'hidden',
|
|
61
64
|
...(0, _componentsBase.applyTextStyles)({
|
|
62
65
|
fontWeight: itemFontWeight,
|
|
63
66
|
fontSize: itemFontSize,
|
|
@@ -75,7 +78,9 @@ const ItemContent = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
75
78
|
displayName: "Item__ItemContent",
|
|
76
79
|
componentId: "components-web__sc-7jzwcq-1"
|
|
77
80
|
})({
|
|
78
|
-
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexDirection: 'column',
|
|
83
|
+
gap: 5
|
|
79
84
|
});
|
|
80
85
|
const Item = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
81
86
|
let {
|
|
@@ -122,7 +127,9 @@ const Item = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
|
|
|
122
127
|
...themeTokens,
|
|
123
128
|
children: itemContent
|
|
124
129
|
})]
|
|
125
|
-
}) :
|
|
130
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ItemContent, {
|
|
131
|
+
children: itemContent
|
|
132
|
+
})
|
|
126
133
|
});
|
|
127
134
|
});
|
|
128
135
|
Item.displayName = 'OrderedListItem';
|
|
@@ -17,64 +17,69 @@ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemP
|
|
|
17
17
|
const PriceLockupContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
18
18
|
displayName: "PriceLockup__PriceLockupContainer",
|
|
19
19
|
componentId: "components-web__sc-1x6duay-0"
|
|
20
|
-
})(["display:flex;flex-direction:column;width:fit-content;"]
|
|
20
|
+
})(["align-items:", ";display:flex;flex-direction:column;width:fit-content;"], _ref => {
|
|
21
|
+
let {
|
|
22
|
+
alignItemsText
|
|
23
|
+
} = _ref;
|
|
24
|
+
return alignItemsText;
|
|
25
|
+
});
|
|
21
26
|
const PriceContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
22
27
|
displayName: "PriceLockup__PriceContainer",
|
|
23
28
|
componentId: "components-web__sc-1x6duay-1"
|
|
24
|
-
})(["display:flex;margin-bottom:", ";"],
|
|
29
|
+
})(["display:flex;margin-bottom:", ";"], _ref2 => {
|
|
25
30
|
let {
|
|
26
31
|
priceMarginBottom
|
|
27
|
-
} =
|
|
32
|
+
} = _ref2;
|
|
28
33
|
return priceMarginBottom;
|
|
29
34
|
});
|
|
30
35
|
const FootnoteContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
31
36
|
displayName: "PriceLockup__FootnoteContainer",
|
|
32
37
|
componentId: "components-web__sc-1x6duay-2"
|
|
33
|
-
})(["display:flex;margin-top:", ";gap:", ";"],
|
|
38
|
+
})(["display:flex;margin-top:", ";gap:", ";"], _ref3 => {
|
|
34
39
|
let {
|
|
35
40
|
footnoteMarginTop
|
|
36
|
-
} =
|
|
41
|
+
} = _ref3;
|
|
37
42
|
return footnoteMarginTop;
|
|
38
|
-
},
|
|
43
|
+
}, _ref4 => {
|
|
39
44
|
let {
|
|
40
45
|
footnoteGap
|
|
41
|
-
} =
|
|
46
|
+
} = _ref4;
|
|
42
47
|
return footnoteGap;
|
|
43
48
|
});
|
|
44
49
|
const BottomTextContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
45
50
|
displayName: "PriceLockup__BottomTextContainer",
|
|
46
51
|
componentId: "components-web__sc-1x6duay-3"
|
|
47
|
-
})(["margin-top:", ";"],
|
|
52
|
+
})(["margin-top:", ";"], _ref5 => {
|
|
48
53
|
let {
|
|
49
54
|
bottomTextMarginTop
|
|
50
|
-
} =
|
|
55
|
+
} = _ref5;
|
|
51
56
|
return bottomTextMarginTop;
|
|
52
57
|
});
|
|
53
58
|
const BottomLinksContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
54
59
|
displayName: "PriceLockup__BottomLinksContainer",
|
|
55
60
|
componentId: "components-web__sc-1x6duay-4"
|
|
56
|
-
})(["align-self:center;margin-left:", ";"],
|
|
61
|
+
})(["align-self:center;margin-left:", ";"], _ref6 => {
|
|
57
62
|
let {
|
|
58
63
|
bottomLinksMarginLeft
|
|
59
|
-
} =
|
|
64
|
+
} = _ref6;
|
|
60
65
|
return bottomLinksMarginLeft;
|
|
61
66
|
});
|
|
62
67
|
const TopTextContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
63
68
|
displayName: "PriceLockup__TopTextContainer",
|
|
64
69
|
componentId: "components-web__sc-1x6duay-5"
|
|
65
|
-
})(["margin-bottom:", ";"],
|
|
70
|
+
})(["margin-bottom:", ";"], _ref7 => {
|
|
66
71
|
let {
|
|
67
72
|
topTextMarginBottom
|
|
68
|
-
} =
|
|
73
|
+
} = _ref7;
|
|
69
74
|
return topTextMarginBottom;
|
|
70
75
|
});
|
|
71
76
|
const PriceTextContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
72
77
|
displayName: "PriceLockup__PriceTextContainer",
|
|
73
78
|
componentId: "components-web__sc-1x6duay-6"
|
|
74
|
-
})(["display:flex;flex-direction:", ";"],
|
|
79
|
+
})(["display:flex;flex-direction:", ";"], _ref8 => {
|
|
75
80
|
let {
|
|
76
81
|
ratePosition
|
|
77
|
-
} =
|
|
82
|
+
} = _ref8;
|
|
78
83
|
return ratePosition === 'bottom' ? 'column' : 'row';
|
|
79
84
|
});
|
|
80
85
|
const RateContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
@@ -84,38 +89,38 @@ const RateContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
|
84
89
|
const RateTextContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
85
90
|
displayName: "PriceLockup__RateTextContainer",
|
|
86
91
|
componentId: "components-web__sc-1x6duay-8"
|
|
87
|
-
})(["align-self:", ";"],
|
|
92
|
+
})(["align-self:", ";"], _ref9 => {
|
|
88
93
|
let {
|
|
89
94
|
ratePosition
|
|
90
|
-
} =
|
|
95
|
+
} = _ref9;
|
|
91
96
|
return ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
|
|
92
97
|
});
|
|
93
98
|
const StrikeThroughContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
|
|
94
99
|
displayName: "PriceLockup__StrikeThroughContainer",
|
|
95
100
|
componentId: "components-web__sc-1x6duay-9"
|
|
96
|
-
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"],
|
|
101
|
+
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref10 => {
|
|
97
102
|
let {
|
|
98
103
|
strikeThroughPosition
|
|
99
|
-
} =
|
|
104
|
+
} = _ref10;
|
|
100
105
|
return `${strikeThroughPosition}px`;
|
|
101
|
-
},
|
|
106
|
+
}, _ref11 => {
|
|
102
107
|
let {
|
|
103
108
|
strikeThroughHeight
|
|
104
|
-
} =
|
|
109
|
+
} = _ref11;
|
|
105
110
|
return `${strikeThroughHeight}px`;
|
|
106
|
-
},
|
|
111
|
+
}, _ref12 => {
|
|
107
112
|
let {
|
|
108
113
|
strikeThroughColor
|
|
109
|
-
} =
|
|
114
|
+
} = _ref12;
|
|
110
115
|
return strikeThroughColor;
|
|
111
116
|
});
|
|
112
|
-
const selectFootnoteLinkStyles =
|
|
117
|
+
const selectFootnoteLinkStyles = _ref13 => {
|
|
113
118
|
let {
|
|
114
119
|
footnoteLinkColor,
|
|
115
120
|
footnoteLinkFontName,
|
|
116
121
|
footnoteLinkFontWeight,
|
|
117
122
|
footnoteLinkLineHeight
|
|
118
|
-
} =
|
|
123
|
+
} = _ref13;
|
|
119
124
|
return {
|
|
120
125
|
color: footnoteLinkColor,
|
|
121
126
|
fontName: footnoteLinkFontName,
|
|
@@ -123,19 +128,19 @@ const selectFootnoteLinkStyles = _ref12 => {
|
|
|
123
128
|
lineHeight: footnoteLinkLineHeight
|
|
124
129
|
};
|
|
125
130
|
};
|
|
126
|
-
const selectStrikeThroughTokens =
|
|
131
|
+
const selectStrikeThroughTokens = _ref14 => {
|
|
127
132
|
let {
|
|
128
133
|
strikeThroughPosition,
|
|
129
134
|
strikeThroughHeight,
|
|
130
135
|
strikeThroughColor
|
|
131
|
-
} =
|
|
136
|
+
} = _ref14;
|
|
132
137
|
return {
|
|
133
138
|
strikeThroughHeight,
|
|
134
139
|
strikeThroughPosition,
|
|
135
140
|
strikeThroughColor
|
|
136
141
|
};
|
|
137
142
|
};
|
|
138
|
-
const PriceLockup = /*#__PURE__*/_react.default.forwardRef((
|
|
143
|
+
const PriceLockup = /*#__PURE__*/_react.default.forwardRef((_ref15, ref) => {
|
|
139
144
|
let {
|
|
140
145
|
size = 'medium',
|
|
141
146
|
signDirection = 'left',
|
|
@@ -152,7 +157,7 @@ const PriceLockup = /*#__PURE__*/_react.default.forwardRef((_ref14, ref) => {
|
|
|
152
157
|
tokens: priceLockupTokens,
|
|
153
158
|
variant = {},
|
|
154
159
|
...rest
|
|
155
|
-
} =
|
|
160
|
+
} = _ref15;
|
|
156
161
|
const viewport = (0, _componentsBase.useViewport)();
|
|
157
162
|
const {
|
|
158
163
|
footnoteMarginTop,
|
|
@@ -164,6 +169,7 @@ const PriceLockup = /*#__PURE__*/_react.default.forwardRef((_ref14, ref) => {
|
|
|
164
169
|
fontColor,
|
|
165
170
|
dividerColor,
|
|
166
171
|
footnoteLinkFontSize,
|
|
172
|
+
alignItemsText,
|
|
167
173
|
...themeTokens
|
|
168
174
|
} = (0, _componentsBase.useThemeTokens)('PriceLockup', priceLockupTokens, {
|
|
169
175
|
...variant,
|
|
@@ -257,6 +263,7 @@ const PriceLockup = /*#__PURE__*/_react.default.forwardRef((_ref14, ref) => {
|
|
|
257
263
|
}
|
|
258
264
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(PriceLockupContainer, {
|
|
259
265
|
...selectProps(rest),
|
|
266
|
+
alignItemsText: alignItemsText,
|
|
260
267
|
ref: ref,
|
|
261
268
|
children: [topText && /*#__PURE__*/(0, _jsxRuntime.jsx)(TopTextContainer, {
|
|
262
269
|
topTextMarginBottom: `${topTextMarginBottom}px`,
|
|
@@ -22,20 +22,20 @@ const Gradient = /*#__PURE__*/_styledComponents.default.div.attrs({
|
|
|
22
22
|
componentId: "components-web__sc-1vmzyq5-0"
|
|
23
23
|
})(_ref => {
|
|
24
24
|
let {
|
|
25
|
-
percentage,
|
|
26
25
|
gradient: {
|
|
27
26
|
angle,
|
|
28
27
|
stops,
|
|
29
28
|
type
|
|
30
|
-
}
|
|
29
|
+
},
|
|
30
|
+
borderRadius,
|
|
31
|
+
shadow
|
|
31
32
|
} = _ref;
|
|
32
33
|
return {
|
|
33
34
|
height: '100%',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`
|
|
35
|
+
width: '100%',
|
|
36
|
+
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
|
|
37
|
+
borderRadius,
|
|
38
|
+
...(0, _componentsBase.applyShadowToken)(shadow)
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -66,8 +66,7 @@ const ProgressBar = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
|
|
|
66
66
|
ref: ref,
|
|
67
67
|
...selectedProps,
|
|
68
68
|
children: themeTokens.gradient && /*#__PURE__*/(0, _jsxRuntime.jsx)(Gradient, {
|
|
69
|
-
...themeTokens
|
|
70
|
-
percentage: percentage
|
|
69
|
+
...themeTokens
|
|
71
70
|
})
|
|
72
71
|
});
|
|
73
72
|
});
|
|
@@ -122,9 +122,60 @@ const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) =
|
|
|
122
122
|
const hasIndexedContent = indexedContent.length > 0;
|
|
123
123
|
const hasNonIndexedContent = nonIndexedContent.length > 0;
|
|
124
124
|
const viewport = (0, _componentsBase.useViewport)();
|
|
125
|
-
const
|
|
125
|
+
const {
|
|
126
|
+
themeOptions
|
|
127
|
+
} = (0, _componentsBase.useTheme)();
|
|
128
|
+
const {
|
|
129
|
+
enableMediaQueryStyleSheet
|
|
130
|
+
} = themeOptions;
|
|
131
|
+
const useTokens = enableMediaQueryStyleSheet ? _componentsBase.useResponsiveThemeTokens : _componentsBase.useThemeTokens;
|
|
132
|
+
const themeTokens = useTokens('TermsAndConditions', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
126
133
|
viewport
|
|
127
134
|
});
|
|
135
|
+
let listItemStyles;
|
|
136
|
+
let listItemMediaIds;
|
|
137
|
+
let nonIndexedContentStyles;
|
|
138
|
+
let nonIndexedContentMediaIds;
|
|
139
|
+
if (enableMediaQueryStyleSheet) {
|
|
140
|
+
const {
|
|
141
|
+
transformedListItemThemeTokens,
|
|
142
|
+
transformedNonIndexedContentThemeTokens
|
|
143
|
+
} = Object.entries(themeTokens).reduce((acc, _ref7) => {
|
|
144
|
+
let [vp, viewportTokens] = _ref7;
|
|
145
|
+
acc.transformedListItemThemeTokens[vp] = {
|
|
146
|
+
marginLeft: viewportTokens.listMarginLeft
|
|
147
|
+
};
|
|
148
|
+
acc.transformedNonIndexedContentThemeTokens[vp] = {
|
|
149
|
+
paddingLeft: viewportTokens.titlePaddingLeft
|
|
150
|
+
};
|
|
151
|
+
return acc;
|
|
152
|
+
}, {
|
|
153
|
+
transformedListItemThemeTokens: {},
|
|
154
|
+
transformedNonIndexedContentThemeTokens: {}
|
|
155
|
+
});
|
|
156
|
+
const listItemMediaQueryStyles = (0, _componentsBase.createMediaQueryStyles)(transformedListItemThemeTokens);
|
|
157
|
+
const nonIndexedContentMediaQueryStyles = (0, _componentsBase.createMediaQueryStyles)(transformedNonIndexedContentThemeTokens);
|
|
158
|
+
const {
|
|
159
|
+
ids,
|
|
160
|
+
styles
|
|
161
|
+
} = _componentsBase.StyleSheet.create({
|
|
162
|
+
listItem: {
|
|
163
|
+
...themeTokens[viewport],
|
|
164
|
+
...listItemMediaQueryStyles
|
|
165
|
+
},
|
|
166
|
+
nonIndexedContent: {
|
|
167
|
+
...themeTokens[viewport],
|
|
168
|
+
...nonIndexedContentMediaQueryStyles
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
listItemStyles = styles.listItem;
|
|
172
|
+
listItemMediaIds = ids.listItem;
|
|
173
|
+
nonIndexedContentStyles = styles.nonIndexedContent;
|
|
174
|
+
nonIndexedContentMediaIds = ids.nonIndexedContent;
|
|
175
|
+
} else {
|
|
176
|
+
listItemStyles = themeTokens;
|
|
177
|
+
nonIndexedContentStyles = themeTokens;
|
|
178
|
+
}
|
|
128
179
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
129
180
|
...selectProps(rest),
|
|
130
181
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
|
|
@@ -145,13 +196,15 @@ const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) =
|
|
|
145
196
|
/*#__PURE__*/
|
|
146
197
|
// eslint-disable-next-line react/no-array-index-key
|
|
147
198
|
(0, _jsxRuntime.jsx)(ListItem, {
|
|
148
|
-
tokens:
|
|
199
|
+
tokens: listItemStyles,
|
|
200
|
+
media: listItemMediaIds,
|
|
149
201
|
children: (0, _utils.renderStructuredContent)(contentItem)
|
|
150
202
|
}, idx))
|
|
151
203
|
}), hasNonIndexedContent && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_componentsBase.Box, {
|
|
152
204
|
between: 3,
|
|
153
205
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(NonIndexedContentTitle, {
|
|
154
|
-
tokens:
|
|
206
|
+
tokens: nonIndexedContentStyles,
|
|
207
|
+
media: nonIndexedContentMediaIds,
|
|
155
208
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Typography, {
|
|
156
209
|
block: true,
|
|
157
210
|
heading: true,
|
|
@@ -169,7 +222,8 @@ const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) =
|
|
|
169
222
|
/*#__PURE__*/
|
|
170
223
|
// eslint-disable-next-line react/no-array-index-key
|
|
171
224
|
(0, _jsxRuntime.jsx)(ListItem, {
|
|
172
|
-
tokens:
|
|
225
|
+
tokens: listItemStyles,
|
|
226
|
+
media: listItemMediaIds,
|
|
173
227
|
children: (0, _utils.renderStructuredContent)(contentItem)
|
|
174
228
|
}, idx))
|
|
175
229
|
})]
|
package/lib/baseExports.js
CHANGED
|
@@ -117,6 +117,12 @@ Object.defineProperty(exports, "Divider", {
|
|
|
117
117
|
return _componentsBase.Divider;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
|
+
Object.defineProperty(exports, "DownloadApp", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _componentsBase.DownloadApp;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
120
126
|
Object.defineProperty(exports, "ExpandCollapse", {
|
|
121
127
|
enumerable: true,
|
|
122
128
|
get: function () {
|
|
@@ -303,6 +309,12 @@ Object.defineProperty(exports, "StepTracker", {
|
|
|
303
309
|
return _componentsBase.StepTracker;
|
|
304
310
|
}
|
|
305
311
|
});
|
|
312
|
+
Object.defineProperty(exports, "TabBar", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _componentsBase.TabBar;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
306
318
|
Object.defineProperty(exports, "Tabs", {
|
|
307
319
|
enumerable: true,
|
|
308
320
|
get: function () {
|
|
@@ -47,11 +47,14 @@ const StyledItemBase = /*#__PURE__*/styled(ItemBase).withConfig({
|
|
|
47
47
|
counterIncrement: OL_COUNTER_NAME,
|
|
48
48
|
'::before': {
|
|
49
49
|
content: `counter(${OL_COUNTER_NAME})'.'`,
|
|
50
|
-
display: 'inline-
|
|
50
|
+
display: 'inline-block',
|
|
51
51
|
color: itemColor || itemTextColor,
|
|
52
52
|
width: itemBulletContainerWidth,
|
|
53
53
|
paddingRight: listGutter,
|
|
54
|
-
|
|
54
|
+
textAlign: itemBulletTextAlign,
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
whiteSpace: 'nowrap',
|
|
57
|
+
overflow: 'hidden',
|
|
55
58
|
...applyTextStyles({
|
|
56
59
|
fontWeight: itemFontWeight,
|
|
57
60
|
fontSize: itemFontSize,
|
|
@@ -69,7 +72,9 @@ const ItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
69
72
|
displayName: "Item__ItemContent",
|
|
70
73
|
componentId: "components-web__sc-7jzwcq-1"
|
|
71
74
|
})({
|
|
72
|
-
|
|
75
|
+
display: 'flex',
|
|
76
|
+
flexDirection: 'column',
|
|
77
|
+
gap: 5
|
|
73
78
|
});
|
|
74
79
|
const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
75
80
|
let {
|
|
@@ -116,7 +121,9 @@ const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
116
121
|
...themeTokens,
|
|
117
122
|
children: itemContent
|
|
118
123
|
})]
|
|
119
|
-
}) :
|
|
124
|
+
}) : /*#__PURE__*/_jsx(ItemContent, {
|
|
125
|
+
children: itemContent
|
|
126
|
+
})
|
|
120
127
|
});
|
|
121
128
|
});
|
|
122
129
|
Item.displayName = 'OrderedListItem';
|
|
@@ -12,64 +12,69 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
|
12
12
|
const PriceLockupContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13
13
|
displayName: "PriceLockup__PriceLockupContainer",
|
|
14
14
|
componentId: "components-web__sc-1x6duay-0"
|
|
15
|
-
})(["display:flex;flex-direction:column;width:fit-content;"]
|
|
15
|
+
})(["align-items:", ";display:flex;flex-direction:column;width:fit-content;"], _ref => {
|
|
16
|
+
let {
|
|
17
|
+
alignItemsText
|
|
18
|
+
} = _ref;
|
|
19
|
+
return alignItemsText;
|
|
20
|
+
});
|
|
16
21
|
const PriceContainer = /*#__PURE__*/styled.div.withConfig({
|
|
17
22
|
displayName: "PriceLockup__PriceContainer",
|
|
18
23
|
componentId: "components-web__sc-1x6duay-1"
|
|
19
|
-
})(["display:flex;margin-bottom:", ";"],
|
|
24
|
+
})(["display:flex;margin-bottom:", ";"], _ref2 => {
|
|
20
25
|
let {
|
|
21
26
|
priceMarginBottom
|
|
22
|
-
} =
|
|
27
|
+
} = _ref2;
|
|
23
28
|
return priceMarginBottom;
|
|
24
29
|
});
|
|
25
30
|
const FootnoteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
26
31
|
displayName: "PriceLockup__FootnoteContainer",
|
|
27
32
|
componentId: "components-web__sc-1x6duay-2"
|
|
28
|
-
})(["display:flex;margin-top:", ";gap:", ";"],
|
|
33
|
+
})(["display:flex;margin-top:", ";gap:", ";"], _ref3 => {
|
|
29
34
|
let {
|
|
30
35
|
footnoteMarginTop
|
|
31
|
-
} =
|
|
36
|
+
} = _ref3;
|
|
32
37
|
return footnoteMarginTop;
|
|
33
|
-
},
|
|
38
|
+
}, _ref4 => {
|
|
34
39
|
let {
|
|
35
40
|
footnoteGap
|
|
36
|
-
} =
|
|
41
|
+
} = _ref4;
|
|
37
42
|
return footnoteGap;
|
|
38
43
|
});
|
|
39
44
|
const BottomTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
40
45
|
displayName: "PriceLockup__BottomTextContainer",
|
|
41
46
|
componentId: "components-web__sc-1x6duay-3"
|
|
42
|
-
})(["margin-top:", ";"],
|
|
47
|
+
})(["margin-top:", ";"], _ref5 => {
|
|
43
48
|
let {
|
|
44
49
|
bottomTextMarginTop
|
|
45
|
-
} =
|
|
50
|
+
} = _ref5;
|
|
46
51
|
return bottomTextMarginTop;
|
|
47
52
|
});
|
|
48
53
|
const BottomLinksContainer = /*#__PURE__*/styled.div.withConfig({
|
|
49
54
|
displayName: "PriceLockup__BottomLinksContainer",
|
|
50
55
|
componentId: "components-web__sc-1x6duay-4"
|
|
51
|
-
})(["align-self:center;margin-left:", ";"],
|
|
56
|
+
})(["align-self:center;margin-left:", ";"], _ref6 => {
|
|
52
57
|
let {
|
|
53
58
|
bottomLinksMarginLeft
|
|
54
|
-
} =
|
|
59
|
+
} = _ref6;
|
|
55
60
|
return bottomLinksMarginLeft;
|
|
56
61
|
});
|
|
57
62
|
const TopTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
58
63
|
displayName: "PriceLockup__TopTextContainer",
|
|
59
64
|
componentId: "components-web__sc-1x6duay-5"
|
|
60
|
-
})(["margin-bottom:", ";"],
|
|
65
|
+
})(["margin-bottom:", ";"], _ref7 => {
|
|
61
66
|
let {
|
|
62
67
|
topTextMarginBottom
|
|
63
|
-
} =
|
|
68
|
+
} = _ref7;
|
|
64
69
|
return topTextMarginBottom;
|
|
65
70
|
});
|
|
66
71
|
const PriceTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
67
72
|
displayName: "PriceLockup__PriceTextContainer",
|
|
68
73
|
componentId: "components-web__sc-1x6duay-6"
|
|
69
|
-
})(["display:flex;flex-direction:", ";"],
|
|
74
|
+
})(["display:flex;flex-direction:", ";"], _ref8 => {
|
|
70
75
|
let {
|
|
71
76
|
ratePosition
|
|
72
|
-
} =
|
|
77
|
+
} = _ref8;
|
|
73
78
|
return ratePosition === 'bottom' ? 'column' : 'row';
|
|
74
79
|
});
|
|
75
80
|
const RateContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -79,38 +84,38 @@ const RateContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
79
84
|
const RateTextContainer = /*#__PURE__*/styled.div.withConfig({
|
|
80
85
|
displayName: "PriceLockup__RateTextContainer",
|
|
81
86
|
componentId: "components-web__sc-1x6duay-8"
|
|
82
|
-
})(["align-self:", ";"],
|
|
87
|
+
})(["align-self:", ";"], _ref9 => {
|
|
83
88
|
let {
|
|
84
89
|
ratePosition
|
|
85
|
-
} =
|
|
90
|
+
} = _ref9;
|
|
86
91
|
return ratePosition === 'bottom' ? 'flex-start' : 'flex-end';
|
|
87
92
|
});
|
|
88
93
|
const StrikeThroughContainer = /*#__PURE__*/styled.div.withConfig({
|
|
89
94
|
displayName: "PriceLockup__StrikeThroughContainer",
|
|
90
95
|
componentId: "components-web__sc-1x6duay-9"
|
|
91
|
-
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"],
|
|
96
|
+
})(["display:flex;position:relative;align-items:center;::before{content:'';width:100%;top:", ";height:", ";background:", ";position:absolute;}"], _ref10 => {
|
|
92
97
|
let {
|
|
93
98
|
strikeThroughPosition
|
|
94
|
-
} =
|
|
99
|
+
} = _ref10;
|
|
95
100
|
return `${strikeThroughPosition}px`;
|
|
96
|
-
},
|
|
101
|
+
}, _ref11 => {
|
|
97
102
|
let {
|
|
98
103
|
strikeThroughHeight
|
|
99
|
-
} =
|
|
104
|
+
} = _ref11;
|
|
100
105
|
return `${strikeThroughHeight}px`;
|
|
101
|
-
},
|
|
106
|
+
}, _ref12 => {
|
|
102
107
|
let {
|
|
103
108
|
strikeThroughColor
|
|
104
|
-
} =
|
|
109
|
+
} = _ref12;
|
|
105
110
|
return strikeThroughColor;
|
|
106
111
|
});
|
|
107
|
-
const selectFootnoteLinkStyles =
|
|
112
|
+
const selectFootnoteLinkStyles = _ref13 => {
|
|
108
113
|
let {
|
|
109
114
|
footnoteLinkColor,
|
|
110
115
|
footnoteLinkFontName,
|
|
111
116
|
footnoteLinkFontWeight,
|
|
112
117
|
footnoteLinkLineHeight
|
|
113
|
-
} =
|
|
118
|
+
} = _ref13;
|
|
114
119
|
return {
|
|
115
120
|
color: footnoteLinkColor,
|
|
116
121
|
fontName: footnoteLinkFontName,
|
|
@@ -118,19 +123,19 @@ const selectFootnoteLinkStyles = _ref12 => {
|
|
|
118
123
|
lineHeight: footnoteLinkLineHeight
|
|
119
124
|
};
|
|
120
125
|
};
|
|
121
|
-
const selectStrikeThroughTokens =
|
|
126
|
+
const selectStrikeThroughTokens = _ref14 => {
|
|
122
127
|
let {
|
|
123
128
|
strikeThroughPosition,
|
|
124
129
|
strikeThroughHeight,
|
|
125
130
|
strikeThroughColor
|
|
126
|
-
} =
|
|
131
|
+
} = _ref14;
|
|
127
132
|
return {
|
|
128
133
|
strikeThroughHeight,
|
|
129
134
|
strikeThroughPosition,
|
|
130
135
|
strikeThroughColor
|
|
131
136
|
};
|
|
132
137
|
};
|
|
133
|
-
const PriceLockup = /*#__PURE__*/React.forwardRef((
|
|
138
|
+
const PriceLockup = /*#__PURE__*/React.forwardRef((_ref15, ref) => {
|
|
134
139
|
let {
|
|
135
140
|
size = 'medium',
|
|
136
141
|
signDirection = 'left',
|
|
@@ -147,7 +152,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
|
147
152
|
tokens: priceLockupTokens,
|
|
148
153
|
variant = {},
|
|
149
154
|
...rest
|
|
150
|
-
} =
|
|
155
|
+
} = _ref15;
|
|
151
156
|
const viewport = useViewport();
|
|
152
157
|
const {
|
|
153
158
|
footnoteMarginTop,
|
|
@@ -159,6 +164,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
|
159
164
|
fontColor,
|
|
160
165
|
dividerColor,
|
|
161
166
|
footnoteLinkFontSize,
|
|
167
|
+
alignItemsText,
|
|
162
168
|
...themeTokens
|
|
163
169
|
} = useThemeTokens('PriceLockup', priceLockupTokens, {
|
|
164
170
|
...variant,
|
|
@@ -252,6 +258,7 @@ const PriceLockup = /*#__PURE__*/React.forwardRef((_ref14, ref) => {
|
|
|
252
258
|
}
|
|
253
259
|
return /*#__PURE__*/_jsxs(PriceLockupContainer, {
|
|
254
260
|
...selectProps(rest),
|
|
261
|
+
alignItemsText: alignItemsText,
|
|
255
262
|
ref: ref,
|
|
256
263
|
children: [topText && /*#__PURE__*/_jsx(TopTextContainer, {
|
|
257
264
|
topTextMarginBottom: `${topTextMarginBottom}px`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { getTokensPropType, Progress, selectSystemProps, useThemeTokens, a11yProps, viewProps, variantProp } from '@telus-uds/components-base';
|
|
3
|
+
import { getTokensPropType, Progress, selectSystemProps, useThemeTokens, a11yProps, viewProps, variantProp, applyShadowToken } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
|
|
6
6
|
// Passes React Native-oriented system props through UDS Progress
|
|
@@ -16,20 +16,20 @@ const Gradient = /*#__PURE__*/styled.div.attrs({
|
|
|
16
16
|
componentId: "components-web__sc-1vmzyq5-0"
|
|
17
17
|
})(_ref => {
|
|
18
18
|
let {
|
|
19
|
-
percentage,
|
|
20
19
|
gradient: {
|
|
21
20
|
angle,
|
|
22
21
|
stops,
|
|
23
22
|
type
|
|
24
|
-
}
|
|
23
|
+
},
|
|
24
|
+
borderRadius,
|
|
25
|
+
shadow
|
|
25
26
|
} = _ref;
|
|
26
27
|
return {
|
|
27
28
|
height: '100%',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`
|
|
29
|
+
width: '100%',
|
|
30
|
+
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
|
|
31
|
+
borderRadius,
|
|
32
|
+
...applyShadowToken(shadow)
|
|
33
33
|
};
|
|
34
34
|
});
|
|
35
35
|
|
|
@@ -60,8 +60,7 @@ const ProgressBar = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
60
60
|
ref: ref,
|
|
61
61
|
...selectedProps,
|
|
62
62
|
children: themeTokens.gradient && /*#__PURE__*/_jsx(Gradient, {
|
|
63
|
-
...themeTokens
|
|
64
|
-
percentage: percentage
|
|
63
|
+
...themeTokens
|
|
65
64
|
})
|
|
66
65
|
});
|
|
67
66
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import { Box, Divider, selectSystemProps, Typography, useCopy, useThemeTokens, useViewport, getTokensPropType } from '@telus-uds/components-base';
|
|
4
|
+
import { Box, Divider, selectSystemProps, Typography, useCopy, useThemeTokens, useViewport, getTokensPropType, useTheme, useResponsiveThemeTokens, createMediaQueryStyles, StyleSheet } from '@telus-uds/components-base';
|
|
5
5
|
import ExpandCollapse from './ExpandCollapse';
|
|
6
6
|
import OrderedListBase from '../OrderedList/OrderedListBase';
|
|
7
7
|
import { htmlAttrs, media, renderStructuredContent } from '../utils';
|
|
@@ -116,9 +116,60 @@ const TermsAndConditions = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
116
116
|
const hasIndexedContent = indexedContent.length > 0;
|
|
117
117
|
const hasNonIndexedContent = nonIndexedContent.length > 0;
|
|
118
118
|
const viewport = useViewport();
|
|
119
|
-
const
|
|
119
|
+
const {
|
|
120
|
+
themeOptions
|
|
121
|
+
} = useTheme();
|
|
122
|
+
const {
|
|
123
|
+
enableMediaQueryStyleSheet
|
|
124
|
+
} = themeOptions;
|
|
125
|
+
const useTokens = enableMediaQueryStyleSheet ? useResponsiveThemeTokens : useThemeTokens;
|
|
126
|
+
const themeTokens = useTokens('TermsAndConditions', tokens, variant, !enableMediaQueryStyleSheet && {
|
|
120
127
|
viewport
|
|
121
128
|
});
|
|
129
|
+
let listItemStyles;
|
|
130
|
+
let listItemMediaIds;
|
|
131
|
+
let nonIndexedContentStyles;
|
|
132
|
+
let nonIndexedContentMediaIds;
|
|
133
|
+
if (enableMediaQueryStyleSheet) {
|
|
134
|
+
const {
|
|
135
|
+
transformedListItemThemeTokens,
|
|
136
|
+
transformedNonIndexedContentThemeTokens
|
|
137
|
+
} = Object.entries(themeTokens).reduce((acc, _ref7) => {
|
|
138
|
+
let [vp, viewportTokens] = _ref7;
|
|
139
|
+
acc.transformedListItemThemeTokens[vp] = {
|
|
140
|
+
marginLeft: viewportTokens.listMarginLeft
|
|
141
|
+
};
|
|
142
|
+
acc.transformedNonIndexedContentThemeTokens[vp] = {
|
|
143
|
+
paddingLeft: viewportTokens.titlePaddingLeft
|
|
144
|
+
};
|
|
145
|
+
return acc;
|
|
146
|
+
}, {
|
|
147
|
+
transformedListItemThemeTokens: {},
|
|
148
|
+
transformedNonIndexedContentThemeTokens: {}
|
|
149
|
+
});
|
|
150
|
+
const listItemMediaQueryStyles = createMediaQueryStyles(transformedListItemThemeTokens);
|
|
151
|
+
const nonIndexedContentMediaQueryStyles = createMediaQueryStyles(transformedNonIndexedContentThemeTokens);
|
|
152
|
+
const {
|
|
153
|
+
ids,
|
|
154
|
+
styles
|
|
155
|
+
} = StyleSheet.create({
|
|
156
|
+
listItem: {
|
|
157
|
+
...themeTokens[viewport],
|
|
158
|
+
...listItemMediaQueryStyles
|
|
159
|
+
},
|
|
160
|
+
nonIndexedContent: {
|
|
161
|
+
...themeTokens[viewport],
|
|
162
|
+
...nonIndexedContentMediaQueryStyles
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
listItemStyles = styles.listItem;
|
|
166
|
+
listItemMediaIds = ids.listItem;
|
|
167
|
+
nonIndexedContentStyles = styles.nonIndexedContent;
|
|
168
|
+
nonIndexedContentMediaIds = ids.nonIndexedContent;
|
|
169
|
+
} else {
|
|
170
|
+
listItemStyles = themeTokens;
|
|
171
|
+
nonIndexedContentStyles = themeTokens;
|
|
172
|
+
}
|
|
122
173
|
return /*#__PURE__*/_jsxs("div", {
|
|
123
174
|
...selectProps(rest),
|
|
124
175
|
children: [/*#__PURE__*/_jsx(Divider, {
|
|
@@ -139,13 +190,15 @@ const TermsAndConditions = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
139
190
|
/*#__PURE__*/
|
|
140
191
|
// eslint-disable-next-line react/no-array-index-key
|
|
141
192
|
_jsx(ListItem, {
|
|
142
|
-
tokens:
|
|
193
|
+
tokens: listItemStyles,
|
|
194
|
+
media: listItemMediaIds,
|
|
143
195
|
children: renderStructuredContent(contentItem)
|
|
144
196
|
}, idx))
|
|
145
197
|
}), hasNonIndexedContent && /*#__PURE__*/_jsxs(Box, {
|
|
146
198
|
between: 3,
|
|
147
199
|
children: [/*#__PURE__*/_jsx(NonIndexedContentTitle, {
|
|
148
|
-
tokens:
|
|
200
|
+
tokens: nonIndexedContentStyles,
|
|
201
|
+
media: nonIndexedContentMediaIds,
|
|
149
202
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
150
203
|
block: true,
|
|
151
204
|
heading: true,
|
|
@@ -163,7 +216,8 @@ const TermsAndConditions = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
|
163
216
|
/*#__PURE__*/
|
|
164
217
|
// eslint-disable-next-line react/no-array-index-key
|
|
165
218
|
_jsx(ListItem, {
|
|
166
|
-
tokens:
|
|
219
|
+
tokens: listItemStyles,
|
|
220
|
+
media: listItemMediaIds,
|
|
167
221
|
children: renderStructuredContent(contentItem)
|
|
168
222
|
}, idx))
|
|
169
223
|
})]
|
|
@@ -5,7 +5,7 @@ export {
|
|
|
5
5
|
/**
|
|
6
6
|
* Most base components should be re-exported as-is.
|
|
7
7
|
*/
|
|
8
|
-
ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, ExpandCollapse, Feedback, FlexGrid, FileUpload, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
8
|
+
ActionCard, A11yText, ActivityIndicator, Autocomplete, Box, Button, BaseProvider, A11yInfoProvider, ViewportProvider, ThemeProvider, ButtonDropdown, ButtonGroup, ButtonLink, CardGroup, Carousel, CarouselTabs, Checkbox, CheckboxGroup, ChevronLink, ColourToggle, Divider, DownloadApp, ExpandCollapse, Feedback, FlexGrid, FileUpload, Icon, InputLabel, InputSupports, Link, Listbox, Modal, MultiSelectFilter, Notification, Pagination, Portal, QuickLinks, QuickLinksFeature, Radio, RadioGroup, RadioCard, RadioCardGroup, Responsive, Search, Select, SideNav, Skeleton, SkipLink, Spacer, StackView, StackWrap, StepTracker, Status, Tabs, TabBar, Tags, TextButton, TextArea, TextInput, Timeline, ToggleSwitch, ToggleSwitchGroup, TooltipButton, Tooltip, Typography, Validator,
|
|
9
9
|
/*
|
|
10
10
|
* Most utilities exported from @telus-uds/components-base are for building systems, not apps.
|
|
11
11
|
* Re-export only those utilities with a stable API and known use cases within apps / pages.
|
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.
|
|
8
|
+
"@telus-uds/components-base": "1.96.0",
|
|
9
9
|
"@telus-uds/system-constants": "^1.3.0",
|
|
10
10
|
"fscreen": "^1.2.0",
|
|
11
11
|
"lodash.omit": "^4.5.0",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"react-dates": "^21.8.0",
|
|
14
14
|
"react-helmet-async": "^1.3.0",
|
|
15
15
|
"react-moment-proptypes": "^1.8.1",
|
|
16
|
-
"@telus-uds/system-theme-tokens": "^2.
|
|
16
|
+
"@telus-uds/system-theme-tokens": "^2.65.0",
|
|
17
17
|
"prop-types": "^15.7.2",
|
|
18
18
|
"lodash.throttle": "^4.1.1",
|
|
19
19
|
"react-youtube": "^10.1.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"skip": true
|
|
84
84
|
},
|
|
85
85
|
"types": "types/index.d.ts",
|
|
86
|
-
"version": "2.
|
|
86
|
+
"version": "2.42.0"
|
|
87
87
|
}
|
package/src/OrderedList/Item.jsx
CHANGED
|
@@ -47,11 +47,14 @@ const StyledItemBase = styled(ItemBase)(
|
|
|
47
47
|
counterIncrement: OL_COUNTER_NAME,
|
|
48
48
|
'::before': {
|
|
49
49
|
content: `counter(${OL_COUNTER_NAME})'.'`,
|
|
50
|
-
display: 'inline-
|
|
50
|
+
display: 'inline-block',
|
|
51
51
|
color: itemColor || itemTextColor,
|
|
52
52
|
width: itemBulletContainerWidth,
|
|
53
53
|
paddingRight: listGutter,
|
|
54
|
-
|
|
54
|
+
textAlign: itemBulletTextAlign,
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
whiteSpace: 'nowrap',
|
|
57
|
+
overflow: 'hidden',
|
|
55
58
|
...applyTextStyles({
|
|
56
59
|
fontWeight: itemFontWeight,
|
|
57
60
|
fontSize: itemFontSize,
|
|
@@ -65,7 +68,9 @@ const StyledItemBase = styled(ItemBase)(
|
|
|
65
68
|
)
|
|
66
69
|
|
|
67
70
|
const ItemContent = styled.div({
|
|
68
|
-
|
|
71
|
+
display: 'flex',
|
|
72
|
+
flexDirection: 'column',
|
|
73
|
+
gap: 5
|
|
69
74
|
})
|
|
70
75
|
|
|
71
76
|
const Item = React.forwardRef(
|
|
@@ -96,7 +101,7 @@ const Item = React.forwardRef(
|
|
|
96
101
|
<ItemContent {...themeTokens}>{itemContent}</ItemContent>
|
|
97
102
|
</StackView>
|
|
98
103
|
) : (
|
|
99
|
-
itemContent
|
|
104
|
+
<ItemContent>{itemContent}</ItemContent>
|
|
100
105
|
)}
|
|
101
106
|
</StyledItemBase>
|
|
102
107
|
)
|
|
@@ -17,6 +17,7 @@ import { htmlAttrs, warn } from '../utils'
|
|
|
17
17
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
18
18
|
|
|
19
19
|
const PriceLockupContainer = styled.div`
|
|
20
|
+
align-items: ${({ alignItemsText }) => alignItemsText};
|
|
20
21
|
display: flex;
|
|
21
22
|
flex-direction: column;
|
|
22
23
|
width: fit-content;
|
|
@@ -129,6 +130,7 @@ const PriceLockup = React.forwardRef(
|
|
|
129
130
|
fontColor,
|
|
130
131
|
dividerColor,
|
|
131
132
|
footnoteLinkFontSize,
|
|
133
|
+
alignItemsText,
|
|
132
134
|
...themeTokens
|
|
133
135
|
} = useThemeTokens(
|
|
134
136
|
'PriceLockup',
|
|
@@ -234,7 +236,7 @@ const PriceLockup = React.forwardRef(
|
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
return (
|
|
237
|
-
<PriceLockupContainer {...selectProps(rest)} ref={ref}>
|
|
239
|
+
<PriceLockupContainer {...selectProps(rest)} alignItemsText={alignItemsText} ref={ref}>
|
|
238
240
|
{topText && (
|
|
239
241
|
<TopTextContainer topTextMarginBottom={`${topTextMarginBottom}px`}>
|
|
240
242
|
{renderTypography(topText, typographyTokens.topText)}
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
useThemeTokens,
|
|
8
8
|
a11yProps,
|
|
9
9
|
viewProps,
|
|
10
|
-
variantProp
|
|
10
|
+
variantProp,
|
|
11
|
+
applyShadowToken
|
|
11
12
|
} from '@telus-uds/components-base'
|
|
12
13
|
import styled from 'styled-components'
|
|
13
14
|
|
|
@@ -16,13 +17,12 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([a11yProps, vie
|
|
|
16
17
|
|
|
17
18
|
const { Bar: ProgressBarBase } = Progress
|
|
18
19
|
const Gradient = styled.div.attrs({ 'data-testid': 'ProgressBar-Gradient' })(
|
|
19
|
-
({
|
|
20
|
+
({ gradient: { angle, stops, type }, borderRadius, shadow }) => ({
|
|
20
21
|
height: '100%',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`
|
|
22
|
+
width: '100%',
|
|
23
|
+
background: `${type}-gradient(${angle}deg, ${stops[0].color}, ${stops[1].color})`,
|
|
24
|
+
borderRadius,
|
|
25
|
+
...applyShadowToken(shadow)
|
|
26
26
|
})
|
|
27
27
|
)
|
|
28
28
|
|
|
@@ -49,7 +49,7 @@ const ProgressBar = React.forwardRef(({ percentage, tokens, variant, ...rest },
|
|
|
49
49
|
ref={ref}
|
|
50
50
|
{...selectedProps}
|
|
51
51
|
>
|
|
52
|
-
{themeTokens.gradient && <Gradient {...themeTokens}
|
|
52
|
+
{themeTokens.gradient && <Gradient {...themeTokens} />}
|
|
53
53
|
</ProgressBarBase>
|
|
54
54
|
)
|
|
55
55
|
})
|
|
@@ -9,7 +9,11 @@ import {
|
|
|
9
9
|
useCopy,
|
|
10
10
|
useThemeTokens,
|
|
11
11
|
useViewport,
|
|
12
|
-
getTokensPropType
|
|
12
|
+
getTokensPropType,
|
|
13
|
+
useTheme,
|
|
14
|
+
useResponsiveThemeTokens,
|
|
15
|
+
createMediaQueryStyles,
|
|
16
|
+
StyleSheet
|
|
13
17
|
} from '@telus-uds/components-base'
|
|
14
18
|
import ExpandCollapse from './ExpandCollapse'
|
|
15
19
|
import OrderedListBase from '../OrderedList/OrderedListBase'
|
|
@@ -90,7 +94,65 @@ const TermsAndConditions = React.forwardRef(
|
|
|
90
94
|
const hasNonIndexedContent = nonIndexedContent.length > 0
|
|
91
95
|
|
|
92
96
|
const viewport = useViewport()
|
|
93
|
-
const
|
|
97
|
+
const { themeOptions } = useTheme()
|
|
98
|
+
|
|
99
|
+
const { enableMediaQueryStyleSheet } = themeOptions
|
|
100
|
+
|
|
101
|
+
const useTokens = enableMediaQueryStyleSheet ? useResponsiveThemeTokens : useThemeTokens
|
|
102
|
+
const themeTokens = useTokens(
|
|
103
|
+
'TermsAndConditions',
|
|
104
|
+
tokens,
|
|
105
|
+
variant,
|
|
106
|
+
!enableMediaQueryStyleSheet && { viewport }
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
let listItemStyles
|
|
110
|
+
let listItemMediaIds
|
|
111
|
+
let nonIndexedContentStyles
|
|
112
|
+
let nonIndexedContentMediaIds
|
|
113
|
+
|
|
114
|
+
if (enableMediaQueryStyleSheet) {
|
|
115
|
+
const { transformedListItemThemeTokens, transformedNonIndexedContentThemeTokens } =
|
|
116
|
+
Object.entries(themeTokens).reduce(
|
|
117
|
+
(acc, [vp, viewportTokens]) => {
|
|
118
|
+
acc.transformedListItemThemeTokens[vp] = {
|
|
119
|
+
marginLeft: viewportTokens.listMarginLeft
|
|
120
|
+
}
|
|
121
|
+
acc.transformedNonIndexedContentThemeTokens[vp] = {
|
|
122
|
+
paddingLeft: viewportTokens.titlePaddingLeft
|
|
123
|
+
}
|
|
124
|
+
return acc
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
transformedListItemThemeTokens: {},
|
|
128
|
+
transformedNonIndexedContentThemeTokens: {}
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
const listItemMediaQueryStyles = createMediaQueryStyles(transformedListItemThemeTokens)
|
|
133
|
+
const nonIndexedContentMediaQueryStyles = createMediaQueryStyles(
|
|
134
|
+
transformedNonIndexedContentThemeTokens
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
const { ids, styles } = StyleSheet.create({
|
|
138
|
+
listItem: {
|
|
139
|
+
...themeTokens[viewport],
|
|
140
|
+
...listItemMediaQueryStyles
|
|
141
|
+
},
|
|
142
|
+
nonIndexedContent: {
|
|
143
|
+
...themeTokens[viewport],
|
|
144
|
+
...nonIndexedContentMediaQueryStyles
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
listItemStyles = styles.listItem
|
|
149
|
+
listItemMediaIds = ids.listItem
|
|
150
|
+
nonIndexedContentStyles = styles.nonIndexedContent
|
|
151
|
+
nonIndexedContentMediaIds = ids.nonIndexedContent
|
|
152
|
+
} else {
|
|
153
|
+
listItemStyles = themeTokens
|
|
154
|
+
nonIndexedContentStyles = themeTokens
|
|
155
|
+
}
|
|
94
156
|
|
|
95
157
|
return (
|
|
96
158
|
<div {...selectProps(rest)}>
|
|
@@ -107,7 +169,7 @@ const TermsAndConditions = React.forwardRef(
|
|
|
107
169
|
<Ordered tokens={themeTokens}>
|
|
108
170
|
{indexedContent.map((contentItem, idx) => (
|
|
109
171
|
// eslint-disable-next-line react/no-array-index-key
|
|
110
|
-
<ListItem tokens={
|
|
172
|
+
<ListItem tokens={listItemStyles} key={idx} media={listItemMediaIds}>
|
|
111
173
|
{renderStructuredContent(contentItem)}
|
|
112
174
|
</ListItem>
|
|
113
175
|
))}
|
|
@@ -115,7 +177,10 @@ const TermsAndConditions = React.forwardRef(
|
|
|
115
177
|
)}
|
|
116
178
|
{hasNonIndexedContent && (
|
|
117
179
|
<Box between={3}>
|
|
118
|
-
<NonIndexedContentTitle
|
|
180
|
+
<NonIndexedContentTitle
|
|
181
|
+
tokens={nonIndexedContentStyles}
|
|
182
|
+
media={nonIndexedContentMediaIds}
|
|
183
|
+
>
|
|
119
184
|
<Typography
|
|
120
185
|
block
|
|
121
186
|
heading
|
|
@@ -132,7 +197,7 @@ const TermsAndConditions = React.forwardRef(
|
|
|
132
197
|
<Unordered tokens={themeTokens}>
|
|
133
198
|
{nonIndexedContent.map((contentItem, idx) => (
|
|
134
199
|
// eslint-disable-next-line react/no-array-index-key
|
|
135
|
-
<ListItem tokens={
|
|
200
|
+
<ListItem tokens={listItemStyles} key={idx} media={listItemMediaIds}>
|
|
136
201
|
{renderStructuredContent(contentItem)}
|
|
137
202
|
</ListItem>
|
|
138
203
|
))}
|
package/src/baseExports.js
CHANGED
package/types/Typography.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface TypographyProps extends A11yProps, TextProps, ViewProps {
|
|
|
18
18
|
tag?: 'blockquote' | 'code' | 'del' | 'em' | 'ins' | 'li' | 'strong' | 'label' | HeadingTag
|
|
19
19
|
block?: boolean
|
|
20
20
|
align?: TextAlign
|
|
21
|
+
strikeThrough?: boolean
|
|
21
22
|
children?: ReactNode
|
|
22
23
|
skeleton?: SkeletonProps
|
|
23
24
|
}
|