@telus-uds/components-web 2.35.1 → 2.37.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,36 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Thu, 04 Jul 2024 19:28:59 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 26 Jul 2024 21:17:56 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.37.0
8
+
9
+ Fri, 26 Jul 2024 21:17:56 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `Status`: add component (guillermo.peitzner@telus.com)
14
+ - Bump @telus-uds/components-base to v1.90.0
15
+ - Bump @telus-uds/system-theme-tokens to v2.60.0
16
+
17
+ ## 2.36.0
18
+
19
+ Fri, 19 Jul 2024 18:20:50 GMT
20
+
21
+ ### Minor changes
22
+
23
+ - `PriceLockup`: Add `micro` option to `size` variant (tim.hysniu@telus.com)
24
+ - Bump @telus-uds/components-base to v1.89.0
25
+
26
+ ### Patches
27
+
28
+ - `TermsAndConditions`: add accessibilityLabel to resolve accessibility issue (<tony.eng@telus.com>)
29
+ - `TermsAndConditions`: remove main container (guillermo.peitzner@telus.com)
30
+
7
31
  ## 2.35.1
8
32
 
9
- Thu, 04 Jul 2024 19:28:59 GMT
33
+ Thu, 04 Jul 2024 19:35:15 GMT
10
34
 
11
35
  ### Patches
12
36
 
@@ -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;
@@ -285,6 +285,12 @@ Object.defineProperty(exports, "StackWrap", {
285
285
  return _componentsBase.StackWrap;
286
286
  }
287
287
  });
288
+ Object.defineProperty(exports, "Status", {
289
+ enumerable: true,
290
+ get: function () {
291
+ return _componentsBase.Status;
292
+ }
293
+ });
288
294
  Object.defineProperty(exports, "StepTracker", {
289
295
  enumerable: true,
290
296
  get: function () {
@@ -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
  };
@@ -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, 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, 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, ExpandCollapse, Feedback, FlexGrid, 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,
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.88.0",
8
+ "@telus-uds/components-base": "1.90.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.59.0",
16
+ "@telus-uds/system-theme-tokens": "^2.60.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.1"
86
+ "version": "2.37.0"
87
87
  }
@@ -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
  }
@@ -55,6 +55,7 @@ export {
55
55
  StackView,
56
56
  StackWrap,
57
57
  StepTracker,
58
+ Status,
58
59
  Tabs,
59
60
  Tags,
60
61
  TextButton,
@@ -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