@telus-uds/components-web 2.35.0 → 2.36.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 CHANGED
@@ -1,12 +1,37 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Mon, 24 Jun 2024 16:19:29 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 19 Jul 2024 18:14:09 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.36.0
8
+
9
+ Fri, 19 Jul 2024 18:14:09 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `PriceLockup`: Add `micro` option to `size` variant (tim.hysniu@telus.com)
14
+ - Bump @telus-uds/components-base to v1.89.0
15
+
16
+ ### Patches
17
+
18
+ - `TermsAndConditions`: add accessibilityLabel to resolve accessibility issue (<tony.eng@telus.com>)
19
+ - `TermsAndConditions`: remove main container (guillermo.peitzner@telus.com)
20
+
21
+ ## 2.35.1
22
+
23
+ Thu, 04 Jul 2024 19:35:15 GMT
24
+
25
+ ### Patches
26
+
27
+ - `Breadcrumbs`: fix line break (guillermo.peitzner@telus.com)
28
+ - `OrderedList`: fix numbered text alignment (guillermo.peitzner@telus.com)
29
+ - Bump @telus-uds/components-base to v1.88.0
30
+ - Bump @telus-uds/system-theme-tokens to v2.59.0
31
+
7
32
  ## 2.35.0
8
33
 
9
- Mon, 24 Jun 2024 16:19:29 GMT
34
+ Mon, 24 Jun 2024 16:28:34 GMT
10
35
 
11
36
  ### Minor changes
12
37
 
@@ -16,7 +16,7 @@ const StyledItemContainer = /*#__PURE__*/_styledComponents.default.li.withConfig
16
16
  displayName: "Item__StyledItemContainer",
17
17
  componentId: "components-web__sc-1rfdaul-0"
18
18
  })({
19
- display: 'flex',
19
+ display: 'inline-block',
20
20
  paddingLeft: _ref => {
21
21
  let {
22
22
  listItemPadding
@@ -30,58 +30,51 @@ const StyledItemContainer = /*#__PURE__*/_styledComponents.default.li.withConfig
30
30
  } = _ref2;
31
31
  return `${Math.ceil(lineHeight * fontSize)}px`;
32
32
  },
33
- height: _ref3 => {
34
- let {
35
- iconContainerSize
36
- } = _ref3;
37
- return `${iconContainerSize}px`;
38
- },
39
33
  marginBottom: '8px'
40
34
  });
41
35
  const IconContainer = /*#__PURE__*/_styledComponents.default.span.withConfig({
42
36
  displayName: "Item__IconContainer",
43
37
  componentId: "components-web__sc-1rfdaul-1"
44
38
  })({
45
- display: 'flex',
46
- justifyContent: 'center',
47
- alignItems: 'center',
48
- paddingLeft: _ref4 => {
39
+ display: 'inline-block',
40
+ paddingLeft: _ref3 => {
49
41
  let {
50
42
  iconPadding
51
- } = _ref4;
43
+ } = _ref3;
52
44
  return `${iconPadding}px`;
53
45
  },
54
- paddingRight: _ref5 => {
46
+ paddingRight: _ref4 => {
55
47
  let {
56
48
  iconPadding
57
- } = _ref5;
49
+ } = _ref4;
58
50
  return `${iconPadding}px`;
59
51
  },
60
- fontFamily: _ref6 => {
52
+ fontFamily: _ref5 => {
61
53
  let {
62
54
  fontName,
63
55
  fontWeight
64
- } = _ref6;
56
+ } = _ref5;
65
57
  return (0, _componentsBase.applyTextStyles)({
66
58
  fontName,
67
59
  fontWeight
68
60
  }).fontFamily;
69
61
  },
70
- height: _ref7 => {
62
+ height: _ref6 => {
71
63
  let {
72
64
  iconContainerSize
73
- } = _ref7;
65
+ } = _ref6;
74
66
  return `${iconContainerSize}px`;
75
67
  },
76
- width: _ref8 => {
68
+ width: _ref7 => {
77
69
  let {
78
70
  iconContainerSize,
79
71
  iconPadding
80
- } = _ref8;
72
+ } = _ref7;
81
73
  return `${iconContainerSize + iconPadding * 2}px`;
82
- }
74
+ },
75
+ verticalAlign: 'bottom'
83
76
  });
84
- const Item = /*#__PURE__*/_react.default.forwardRef((_ref9, ref) => {
77
+ const Item = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
85
78
  let {
86
79
  href,
87
80
  children,
@@ -94,7 +87,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef((_ref9, ref) => {
94
87
  LinkRouter,
95
88
  linkRouterProps,
96
89
  ...rest
97
- } = _ref9;
90
+ } = _ref8;
98
91
  const {
99
92
  iconColor,
100
93
  icon: ChevronRightIcon,
@@ -38,7 +38,7 @@ const StyledItemBase = /*#__PURE__*/(0, _styledComponents.default)(_ItemBase.def
38
38
  let {
39
39
  interItemMargin,
40
40
  itemBulletContainerWidth,
41
- itemBulletContainerAlign,
41
+ itemBulletTextAlign,
42
42
  itemFontWeight,
43
43
  itemFontSize,
44
44
  itemFontName,
@@ -55,7 +55,7 @@ const StyledItemBase = /*#__PURE__*/(0, _styledComponents.default)(_ItemBase.def
55
55
  color: itemColor,
56
56
  width: itemBulletContainerWidth,
57
57
  paddingRight: listGutter,
58
- textAlign: itemBulletContainerAlign,
58
+ justifyContent: itemBulletTextAlign,
59
59
  ...(0, _componentsBase.applyTextStyles)({
60
60
  fontWeight: itemFontWeight,
61
61
  fontSize: itemFontSize,
@@ -276,9 +276,9 @@ PriceLockup.propTypes = {
276
276
  /**
277
277
  * Size of the component
278
278
  *
279
- * Small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
279
+ * Micro for mini cart pricing, small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
280
280
  */
281
- size: _propTypes.default.oneOf(['small', 'medium', 'large']),
281
+ size: _propTypes.default.oneOf(['micro', 'small', 'medium', 'large']),
282
282
  /**
283
283
  * If currency symbol other than `$` to be used
284
284
  */
@@ -74,7 +74,9 @@ const ExpandCollapse = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
74
74
  let {
75
75
  children,
76
76
  collapseTitle,
77
- expandTitle = collapseTitle
77
+ expandTitle = collapseTitle,
78
+ expandLabel,
79
+ collapseLabel
78
80
  } = _ref4;
79
81
  const getTokens = (0, _componentsBase.useThemeTokensCallback)('TermsAndConditions', {}, {});
80
82
  const {
@@ -114,6 +116,7 @@ const ExpandCollapse = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
114
116
  expanded
115
117
  } = pressableState || {};
116
118
  const iconTokens = getIconButtonTokens(getTokens(pressableState || {}));
119
+ const label = expanded ? collapseLabel : expandLabel;
117
120
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ExpandCollapseControl, {
118
121
  ref: ref,
119
122
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseIconContainer, {
@@ -123,7 +126,8 @@ const ExpandCollapse = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
123
126
  size: 'small'
124
127
  },
125
128
  tokens: iconTokens,
126
- focusable: false
129
+ focusable: false,
130
+ accessibilityLabel: label
127
131
  })
128
132
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandCollapseTitle, {
129
133
  tokens: getTokens(),
@@ -148,7 +152,9 @@ ExpandCollapse.displayName = 'ExpandCollapse';
148
152
  ExpandCollapse.propTypes = {
149
153
  children: _propTypes.default.node.isRequired,
150
154
  collapseTitle: _propTypes.default.string.isRequired,
151
- expandTitle: _propTypes.default.string
155
+ expandTitle: _propTypes.default.string,
156
+ collapseLabel: _propTypes.default.string,
157
+ expandLabel: _propTypes.default.string
152
158
  };
153
159
  var _default = ExpandCollapse;
154
160
  exports.default = _default;
@@ -95,10 +95,6 @@ const NonIndexedContentTitle = /*#__PURE__*/_styledComponents.default.div.withCo
95
95
  paddingLeft: tokens.titlePaddingLeft
96
96
  };
97
97
  });
98
- const MainContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
99
- displayName: "TermsAndConditions__MainContainer",
100
- componentId: "components-web__sc-1199epn-5"
101
- })(["overflow:hidden;"]);
102
98
 
103
99
  /**
104
100
  * Use `TermsAndConditions` to display important legal content.
@@ -129,7 +125,7 @@ const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) =
129
125
  const themeTokens = (0, _componentsBase.useThemeTokens)('TermsAndConditions', tokens, variant, {
130
126
  viewport
131
127
  });
132
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(MainContainer, {
128
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
133
129
  ...selectProps(rest),
134
130
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.Divider, {
135
131
  tokens: {
@@ -138,6 +134,8 @@ const TermsAndConditions = /*#__PURE__*/_react.default.forwardRef((_ref6, ref) =
138
134
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandCollapse.default, {
139
135
  collapseTitle: getCopy('headingView'),
140
136
  expandTitle: getCopy('headingHide'),
137
+ collapseLabel: getCopy('collapseLabel'),
138
+ expandLabel: getCopy('expandLabel'),
141
139
  ref: ref,
142
140
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentContainer, {
143
141
  tokens: themeTokens,
@@ -8,12 +8,16 @@ var _default = {
8
8
  en: {
9
9
  headingHide: 'Hide terms and conditions',
10
10
  headingView: 'View terms and conditions',
11
- nonIndexedTitle: 'The following applies to all terms and conditions above'
11
+ nonIndexedTitle: 'The following applies to all terms and conditions above',
12
+ expandLabel: 'Expand',
13
+ collapseLabel: 'Collapse'
12
14
  },
13
15
  fr: {
14
16
  headingHide: 'Masquer les modalités et conditions',
15
17
  headingView: 'Voir les modalités et conditions',
16
- nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus'
18
+ nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus',
19
+ expandLabel: 'Détailler',
20
+ collapseLabel: 'Réduire'
17
21
  }
18
22
  };
19
23
  exports.default = _default;
@@ -11,7 +11,7 @@ const StyledItemContainer = /*#__PURE__*/styled.li.withConfig({
11
11
  displayName: "Item__StyledItemContainer",
12
12
  componentId: "components-web__sc-1rfdaul-0"
13
13
  })({
14
- display: 'flex',
14
+ display: 'inline-block',
15
15
  paddingLeft: _ref => {
16
16
  let {
17
17
  listItemPadding
@@ -25,58 +25,51 @@ const StyledItemContainer = /*#__PURE__*/styled.li.withConfig({
25
25
  } = _ref2;
26
26
  return `${Math.ceil(lineHeight * fontSize)}px`;
27
27
  },
28
- height: _ref3 => {
29
- let {
30
- iconContainerSize
31
- } = _ref3;
32
- return `${iconContainerSize}px`;
33
- },
34
28
  marginBottom: '8px'
35
29
  });
36
30
  const IconContainer = /*#__PURE__*/styled.span.withConfig({
37
31
  displayName: "Item__IconContainer",
38
32
  componentId: "components-web__sc-1rfdaul-1"
39
33
  })({
40
- display: 'flex',
41
- justifyContent: 'center',
42
- alignItems: 'center',
43
- paddingLeft: _ref4 => {
34
+ display: 'inline-block',
35
+ paddingLeft: _ref3 => {
44
36
  let {
45
37
  iconPadding
46
- } = _ref4;
38
+ } = _ref3;
47
39
  return `${iconPadding}px`;
48
40
  },
49
- paddingRight: _ref5 => {
41
+ paddingRight: _ref4 => {
50
42
  let {
51
43
  iconPadding
52
- } = _ref5;
44
+ } = _ref4;
53
45
  return `${iconPadding}px`;
54
46
  },
55
- fontFamily: _ref6 => {
47
+ fontFamily: _ref5 => {
56
48
  let {
57
49
  fontName,
58
50
  fontWeight
59
- } = _ref6;
51
+ } = _ref5;
60
52
  return applyTextStyles({
61
53
  fontName,
62
54
  fontWeight
63
55
  }).fontFamily;
64
56
  },
65
- height: _ref7 => {
57
+ height: _ref6 => {
66
58
  let {
67
59
  iconContainerSize
68
- } = _ref7;
60
+ } = _ref6;
69
61
  return `${iconContainerSize}px`;
70
62
  },
71
- width: _ref8 => {
63
+ width: _ref7 => {
72
64
  let {
73
65
  iconContainerSize,
74
66
  iconPadding
75
- } = _ref8;
67
+ } = _ref7;
76
68
  return `${iconContainerSize + iconPadding * 2}px`;
77
- }
69
+ },
70
+ verticalAlign: 'bottom'
78
71
  });
79
- const Item = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
72
+ const Item = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
80
73
  let {
81
74
  href,
82
75
  children,
@@ -89,7 +82,7 @@ const Item = /*#__PURE__*/React.forwardRef((_ref9, ref) => {
89
82
  LinkRouter,
90
83
  linkRouterProps,
91
84
  ...rest
92
- } = _ref9;
85
+ } = _ref8;
93
86
  const {
94
87
  iconColor,
95
88
  icon: ChevronRightIcon,
@@ -32,7 +32,7 @@ const StyledItemBase = /*#__PURE__*/styled(ItemBase).withConfig({
32
32
  let {
33
33
  interItemMargin,
34
34
  itemBulletContainerWidth,
35
- itemBulletContainerAlign,
35
+ itemBulletTextAlign,
36
36
  itemFontWeight,
37
37
  itemFontSize,
38
38
  itemFontName,
@@ -49,7 +49,7 @@ const StyledItemBase = /*#__PURE__*/styled(ItemBase).withConfig({
49
49
  color: itemColor,
50
50
  width: itemBulletContainerWidth,
51
51
  paddingRight: listGutter,
52
- textAlign: itemBulletContainerAlign,
52
+ justifyContent: itemBulletTextAlign,
53
53
  ...applyTextStyles({
54
54
  fontWeight: itemFontWeight,
55
55
  fontSize: itemFontSize,
@@ -271,9 +271,9 @@ PriceLockup.propTypes = {
271
271
  /**
272
272
  * Size of the component
273
273
  *
274
- * Small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
274
+ * Micro for mini cart pricing, small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
275
275
  */
276
- size: PropTypes.oneOf(['small', 'medium', 'large']),
276
+ size: PropTypes.oneOf(['micro', 'small', 'medium', 'large']),
277
277
  /**
278
278
  * If currency symbol other than `$` to be used
279
279
  */
@@ -68,7 +68,9 @@ const ExpandCollapse = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
68
68
  let {
69
69
  children,
70
70
  collapseTitle,
71
- expandTitle = collapseTitle
71
+ expandTitle = collapseTitle,
72
+ expandLabel,
73
+ collapseLabel
72
74
  } = _ref4;
73
75
  const getTokens = useThemeTokensCallback('TermsAndConditions', {}, {});
74
76
  const {
@@ -108,6 +110,7 @@ const ExpandCollapse = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
108
110
  expanded
109
111
  } = pressableState || {};
110
112
  const iconTokens = getIconButtonTokens(getTokens(pressableState || {}));
113
+ const label = expanded ? collapseLabel : expandLabel;
111
114
  return /*#__PURE__*/_jsxs(ExpandCollapseControl, {
112
115
  ref: ref,
113
116
  children: [/*#__PURE__*/_jsx(ExpandCollapseIconContainer, {
@@ -117,7 +120,8 @@ const ExpandCollapse = /*#__PURE__*/React.forwardRef((_ref4, ref) => {
117
120
  size: 'small'
118
121
  },
119
122
  tokens: iconTokens,
120
- focusable: false
123
+ focusable: false,
124
+ accessibilityLabel: label
121
125
  })
122
126
  }), /*#__PURE__*/_jsx(ExpandCollapseTitle, {
123
127
  tokens: getTokens(),
@@ -142,6 +146,8 @@ ExpandCollapse.displayName = 'ExpandCollapse';
142
146
  ExpandCollapse.propTypes = {
143
147
  children: PropTypes.node.isRequired,
144
148
  collapseTitle: PropTypes.string.isRequired,
145
- expandTitle: PropTypes.string
149
+ expandTitle: PropTypes.string,
150
+ collapseLabel: PropTypes.string,
151
+ expandLabel: PropTypes.string
146
152
  };
147
153
  export default ExpandCollapse;
@@ -89,10 +89,6 @@ const NonIndexedContentTitle = /*#__PURE__*/styled.div.withConfig({
89
89
  paddingLeft: tokens.titlePaddingLeft
90
90
  };
91
91
  });
92
- const MainContainer = /*#__PURE__*/styled.div.withConfig({
93
- displayName: "TermsAndConditions__MainContainer",
94
- componentId: "components-web__sc-1199epn-5"
95
- })(["overflow:hidden;"]);
96
92
 
97
93
  /**
98
94
  * Use `TermsAndConditions` to display important legal content.
@@ -123,7 +119,7 @@ const TermsAndConditions = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
123
119
  const themeTokens = useThemeTokens('TermsAndConditions', tokens, variant, {
124
120
  viewport
125
121
  });
126
- return /*#__PURE__*/_jsxs(MainContainer, {
122
+ return /*#__PURE__*/_jsxs("div", {
127
123
  ...selectProps(rest),
128
124
  children: [/*#__PURE__*/_jsx(Divider, {
129
125
  tokens: {
@@ -132,6 +128,8 @@ const TermsAndConditions = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
132
128
  }), /*#__PURE__*/_jsx(ExpandCollapse, {
133
129
  collapseTitle: getCopy('headingView'),
134
130
  expandTitle: getCopy('headingHide'),
131
+ collapseLabel: getCopy('collapseLabel'),
132
+ expandLabel: getCopy('expandLabel'),
135
133
  ref: ref,
136
134
  children: /*#__PURE__*/_jsxs(ContentContainer, {
137
135
  tokens: themeTokens,
@@ -2,11 +2,15 @@ export default {
2
2
  en: {
3
3
  headingHide: 'Hide terms and conditions',
4
4
  headingView: 'View terms and conditions',
5
- nonIndexedTitle: 'The following applies to all terms and conditions above'
5
+ nonIndexedTitle: 'The following applies to all terms and conditions above',
6
+ expandLabel: 'Expand',
7
+ collapseLabel: 'Collapse'
6
8
  },
7
9
  fr: {
8
10
  headingHide: 'Masquer les modalités et conditions',
9
11
  headingView: 'Voir les modalités et conditions',
10
- nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus'
12
+ nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus',
13
+ expandLabel: 'Détailler',
14
+ collapseLabel: 'Réduire'
11
15
  }
12
16
  };
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.87.0",
8
+ "@telus-uds/components-base": "1.89.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.58.0",
16
+ "@telus-uds/system-theme-tokens": "^2.59.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.35.0"
86
+ "version": "2.36.0"
87
87
  }
@@ -14,22 +14,20 @@ import { htmlAttrs } from '../../utils'
14
14
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
15
15
 
16
16
  const StyledItemContainer = styled.li({
17
- display: 'flex',
17
+ display: 'inline-block',
18
18
  paddingLeft: ({ listItemPadding }) => `${listItemPadding}px`,
19
19
  lineHeight: ({ lineHeight, fontSize }) => `${Math.ceil(lineHeight * fontSize)}px`,
20
- height: ({ iconContainerSize }) => `${iconContainerSize}px`,
21
20
  marginBottom: '8px'
22
21
  })
23
22
 
24
23
  const IconContainer = styled.span({
25
- display: 'flex',
26
- justifyContent: 'center',
27
- alignItems: 'center',
24
+ display: 'inline-block',
28
25
  paddingLeft: ({ iconPadding }) => `${iconPadding}px`,
29
26
  paddingRight: ({ iconPadding }) => `${iconPadding}px`,
30
27
  fontFamily: ({ fontName, fontWeight }) => applyTextStyles({ fontName, fontWeight }).fontFamily,
31
28
  height: ({ iconContainerSize }) => `${iconContainerSize}px`,
32
- width: ({ iconContainerSize, iconPadding }) => `${iconContainerSize + iconPadding * 2}px`
29
+ width: ({ iconContainerSize, iconPadding }) => `${iconContainerSize + iconPadding * 2}px`,
30
+ verticalAlign: 'bottom'
33
31
  })
34
32
 
35
33
  const Item = React.forwardRef(
@@ -34,7 +34,7 @@ const StyledItemBase = styled(ItemBase)(
34
34
  ({
35
35
  interItemMargin,
36
36
  itemBulletContainerWidth,
37
- itemBulletContainerAlign,
37
+ itemBulletTextAlign,
38
38
  itemFontWeight,
39
39
  itemFontSize,
40
40
  itemFontName,
@@ -50,7 +50,7 @@ const StyledItemBase = styled(ItemBase)(
50
50
  color: itemColor,
51
51
  width: itemBulletContainerWidth,
52
52
  paddingRight: listGutter,
53
- textAlign: itemBulletContainerAlign,
53
+ justifyContent: itemBulletTextAlign,
54
54
  ...applyTextStyles({
55
55
  fontWeight: itemFontWeight,
56
56
  fontSize: itemFontSize,
@@ -136,6 +136,7 @@ const PriceLockup = React.forwardRef(
136
136
  { ...variant, size },
137
137
  { viewport, strikeThrough }
138
138
  )
139
+
139
140
  const typographyTokens = getTypographyTokens(themeTokens)
140
141
  const priceString = String(price)
141
142
  const lastDotPosition = priceString.lastIndexOf('.')
@@ -260,9 +261,9 @@ PriceLockup.propTypes = {
260
261
  /**
261
262
  * Size of the component
262
263
  *
263
- * Small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
264
+ * Micro for mini cart pricing, small for pricing in product catalogue pages, medium for pricing in product comparison cards and large for pricing in banners and promo cards
264
265
  */
265
- size: PropTypes.oneOf(['small', 'medium', 'large']),
266
+ size: PropTypes.oneOf(['micro', 'small', 'medium', 'large']),
266
267
  /**
267
268
  * If currency symbol other than `$` to be used
268
269
  */
@@ -50,7 +50,7 @@ const getIconButtonTokens = ({
50
50
  })
51
51
 
52
52
  const ExpandCollapse = React.forwardRef(
53
- ({ children, collapseTitle, expandTitle = collapseTitle }, ref) => {
53
+ ({ children, collapseTitle, expandTitle = collapseTitle, expandLabel, collapseLabel }, ref) => {
54
54
  const getTokens = useThemeTokensCallback('TermsAndConditions', {}, {})
55
55
  const {
56
56
  expandBaseBorderWidth,
@@ -89,12 +89,18 @@ const ExpandCollapse = React.forwardRef(
89
89
  control={(pressableState) => {
90
90
  const { expanded } = pressableState || {}
91
91
  const iconTokens = getIconButtonTokens(getTokens(pressableState || {}))
92
+ const label = expanded ? collapseLabel : expandLabel
92
93
 
93
94
  return (
94
95
  <ExpandCollapseControl ref={ref}>
95
96
  <ExpandCollapseIconContainer tokens={getTokens()}>
96
97
  {/* Can use `Icon` instead of `IconButton` but `Icon` does not have required stylistic variants */}
97
- <IconButton variant={{ size: 'small' }} tokens={iconTokens} focusable={false} />
98
+ <IconButton
99
+ variant={{ size: 'small' }}
100
+ tokens={iconTokens}
101
+ focusable={false}
102
+ accessibilityLabel={label}
103
+ />
98
104
  </ExpandCollapseIconContainer>
99
105
  <ExpandCollapseTitle tokens={getTokens()}>
100
106
  {expanded ? expandTitle : collapseTitle}
@@ -125,7 +131,9 @@ ExpandCollapse.displayName = 'ExpandCollapse'
125
131
  ExpandCollapse.propTypes = {
126
132
  children: PropTypes.node.isRequired,
127
133
  collapseTitle: PropTypes.string.isRequired,
128
- expandTitle: PropTypes.string
134
+ expandTitle: PropTypes.string,
135
+ collapseLabel: PropTypes.string,
136
+ expandLabel: PropTypes.string
129
137
  }
130
138
 
131
139
  export default ExpandCollapse
@@ -63,10 +63,6 @@ const NonIndexedContentTitle = styled.div(({ tokens }) => ({
63
63
  paddingLeft: tokens.titlePaddingLeft
64
64
  }))
65
65
 
66
- const MainContainer = styled.div`
67
- overflow: hidden;
68
- `
69
-
70
66
  /**
71
67
  * Use `TermsAndConditions` to display important legal content.
72
68
  *
@@ -97,11 +93,13 @@ const TermsAndConditions = React.forwardRef(
97
93
  const themeTokens = useThemeTokens('TermsAndConditions', tokens, variant, { viewport })
98
94
 
99
95
  return (
100
- <MainContainer {...selectProps(rest)}>
96
+ <div {...selectProps(rest)}>
101
97
  <Divider tokens={{ color: themeTokens.dividerColor }} />
102
98
  <ExpandCollapse
103
99
  collapseTitle={getCopy('headingView')}
104
100
  expandTitle={getCopy('headingHide')}
101
+ collapseLabel={getCopy('collapseLabel')}
102
+ expandLabel={getCopy('expandLabel')}
105
103
  ref={ref}
106
104
  >
107
105
  <ContentContainer tokens={themeTokens}>
@@ -144,7 +142,7 @@ const TermsAndConditions = React.forwardRef(
144
142
  </ContentContainer>
145
143
  </ExpandCollapse>
146
144
  <Divider tokens={{ color: themeTokens.dividerColor }} />
147
- </MainContainer>
145
+ </div>
148
146
  )
149
147
  }
150
148
  )
@@ -2,11 +2,15 @@ export default {
2
2
  en: {
3
3
  headingHide: 'Hide terms and conditions',
4
4
  headingView: 'View terms and conditions',
5
- nonIndexedTitle: 'The following applies to all terms and conditions above'
5
+ nonIndexedTitle: 'The following applies to all terms and conditions above',
6
+ expandLabel: 'Expand',
7
+ collapseLabel: 'Collapse'
6
8
  },
7
9
  fr: {
8
10
  headingHide: 'Masquer les modalités et conditions',
9
11
  headingView: 'Voir les modalités et conditions',
10
- nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus'
12
+ nonIndexedTitle: 'Ce qui suit s’applique aux modalités et conditions ci-dessus',
13
+ expandLabel: 'Détailler',
14
+ collapseLabel: 'Réduire'
11
15
  }
12
16
  }
@@ -4,7 +4,7 @@ import type { HTMLAttrs, Variant } from './common'
4
4
  export interface PriceLockupProps extends HTMLAttrs {
5
5
  children: ReactNode
6
6
  variant?: Variant
7
- size?: 'small' | 'medium' | 'large'
7
+ size?: 'micro' | 'small' | 'medium' | 'large'
8
8
  signDirection?: 'left' | 'right'
9
9
  footnoteLinks?: [number] | [string]
10
10
  topText?: string