@telus-uds/components-web 2.36.0 → 2.38.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,38 @@
1
1
  # Change Log - @telus-uds/components-web
2
2
 
3
- This log was last generated on Fri, 19 Jul 2024 18:14:09 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 12 Aug 2024 06:26:58 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.38.0
8
+
9
+ Mon, 12 Aug 2024 06:26:58 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `ExpandCollapseMini`: Add `initialOpen` prop to control the expand behavior on first render (jaime.tuyuc@telus.com)
14
+ - OrderedList: add itemTextColor token and pass tokens down to children (jacqui.koroll@telus.com)
15
+ - Bump @telus-uds/components-base to v1.91.0
16
+ - Bump @telus-uds/system-theme-tokens to v2.61.0
17
+
18
+ ### Patches
19
+
20
+ - Ribbon: add overflow hidden to fix sharp ribbon curve (jacqui.koroll@telus.com)
21
+ - QuantitySelector: update default dictionary values (jacqui.koroll@telus.com)
22
+
23
+ ## 2.37.0
24
+
25
+ Fri, 26 Jul 2024 21:24:32 GMT
26
+
27
+ ### Minor changes
28
+
29
+ - `Status`: add component (guillermo.peitzner@telus.com)
30
+ - Bump @telus-uds/components-base to v1.90.0
31
+ - Bump @telus-uds/system-theme-tokens to v2.60.0
32
+
7
33
  ## 2.36.0
8
34
 
9
- Fri, 19 Jul 2024 18:14:09 GMT
35
+ Fri, 19 Jul 2024 18:20:50 GMT
10
36
 
11
37
  ### Minor changes
12
38
 
@@ -16,8 +16,10 @@ const ExpandCollapseMini = /*#__PURE__*/_react.default.forwardRef((_ref, ref) =>
16
16
  onToggle = () => {},
17
17
  tokens = {},
18
18
  nativeID,
19
+ initialOpen = false,
19
20
  ...rest
20
21
  } = _ref;
22
+ const expandCollapeMiniPanelId = 'ExpandCollapseMiniPanel';
21
23
  const handleChange = (openPanels, event) => {
22
24
  if (typeof onToggle === 'function') {
23
25
  const isOpen = openPanels.length > 0;
@@ -27,9 +29,10 @@ const ExpandCollapseMini = /*#__PURE__*/_react.default.forwardRef((_ref, ref) =>
27
29
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse, {
28
30
  onChange: handleChange,
29
31
  tokens: tokens,
32
+ initialOpen: initialOpen ? [expandCollapeMiniPanelId] : [],
30
33
  children: expandProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_componentsBase.ExpandCollapse.Panel, {
31
34
  ...expandProps,
32
- panelId: "ExpandCollapseMiniPanel",
35
+ panelId: expandCollapeMiniPanelId,
33
36
  variant: {
34
37
  mini: true
35
38
  },
@@ -68,6 +71,10 @@ ExpandCollapseMini.propTypes = {
68
71
  * Children nodes that can be added
69
72
  */
70
73
  children: _propTypes.default.node.isRequired,
74
+ /**
75
+ * Controls if the panel and the content is opened by default on the first load
76
+ */
77
+ initialOpen: _propTypes.default.bool,
71
78
  tokens: (0, _componentsBase.getTokensPropType)('ExpandCollapseMini')
72
79
  };
73
80
  var _default = ExpandCollapseMini;
@@ -20,13 +20,14 @@ const selectItemTextStyles = (_ref, themeOptions) => {
20
20
  itemFontSize,
21
21
  itemLineHeight,
22
22
  itemFontName,
23
- itemColor
23
+ itemColor,
24
+ itemTextColor
24
25
  } = _ref;
25
26
  return (0, _componentsBase.applyTextStyles)({
26
27
  fontWeight: itemFontWeight,
27
28
  fontSize: itemFontSize,
28
29
  fontName: itemFontName,
29
- color: itemColor,
30
+ color: itemColor || itemTextColor,
30
31
  themeOptions,
31
32
  lineHeight: itemLineHeight
32
33
  });
@@ -45,14 +46,15 @@ const StyledItemBase = /*#__PURE__*/(0, _styledComponents.default)(_ItemBase.def
45
46
  itemLineHeight,
46
47
  themeOptions,
47
48
  listGutter,
48
- itemColor
49
+ itemColor,
50
+ itemTextColor
49
51
  } = _ref2;
50
52
  return {
51
53
  counterIncrement: _constants.OL_COUNTER_NAME,
52
54
  '::before': {
53
55
  content: `counter(${_constants.OL_COUNTER_NAME})'.'`,
54
56
  display: 'inline-flex',
55
- color: itemColor,
57
+ color: itemColor || itemTextColor,
56
58
  width: itemBulletContainerWidth,
57
59
  paddingRight: listGutter,
58
60
  justifyContent: itemBulletTextAlign,
@@ -90,7 +92,7 @@ const Item = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
90
92
  const headingTokens = title && {
91
93
  lineHeight: themeTokens.itemLineHeight,
92
94
  fontSize: themeTokens.itemFontSize,
93
- color: themeTokens.itemColor,
95
+ color: themeTokens.itemColor || themeTokens.itemTextColor,
94
96
  fontName: themeTokens.headerFontName,
95
97
  fontWeight: themeTokens.headerFontWeight
96
98
  };
@@ -137,7 +139,7 @@ Item.propTypes = {
137
139
  /**
138
140
  * Item tokens
139
141
  */
140
- tokens: (0, _componentsBase.getTokensPropType)('List')
142
+ tokens: (0, _componentsBase.getTokensPropType)('OrderedList')
141
143
  };
142
144
  var _default = Item;
143
145
  exports.default = _default;
@@ -37,36 +37,42 @@ const OrderedList = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
37
37
  children,
38
38
  start = 1,
39
39
  variant = {},
40
+ tokens = {},
40
41
  ...rest
41
42
  } = _ref2;
42
43
  // Check if children is an array
43
44
  const isChildrenArray = Array.isArray(children);
44
45
 
45
- // Pass any variants "OrderedList" receives down to the individual list items.
46
- const childrenWithParentVariants = _react.default.useMemo(() => {
47
- const addVariantToProps = child => {
48
- var _child$props;
46
+ // Pass any variants and tokens "OrderedList" receives down to the individual list items.
47
+ const childrenWithParentVariantsAndTokens = _react.default.useMemo(() => {
48
+ const addVariantAndTokensToProps = child => {
49
+ var _child$props, _child$props2;
49
50
  const existingChildVariants = ((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.variant) ?? {};
51
+ const existingChildTokens = ((_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.tokens) ?? {};
50
52
  return /*#__PURE__*/_react.default.cloneElement(child, {
51
53
  variant: {
52
54
  ...existingChildVariants,
53
55
  ...variant
56
+ },
57
+ tokens: {
58
+ ...existingChildTokens,
59
+ ...tokens
54
60
  }
55
61
  });
56
62
  };
57
- if (variant) {
63
+ if (variant || tokens) {
58
64
  if (isChildrenArray) {
59
- return children.map(addVariantToProps);
65
+ return children.map(addVariantAndTokensToProps);
60
66
  }
61
- return [addVariantToProps(children)];
67
+ return [addVariantAndTokensToProps(children)];
62
68
  }
63
69
  return children;
64
- }, [children, variant, isChildrenArray]);
70
+ }, [children, variant, isChildrenArray, tokens]);
65
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledOrderedListBase, {
66
72
  ...selectProps(rest),
67
73
  ref: ref,
68
74
  start: start,
69
- children: childrenWithParentVariants
75
+ children: childrenWithParentVariantsAndTokens
70
76
  });
71
77
  });
72
78
  OrderedList.displayName = 'OrderedList';
@@ -80,7 +86,8 @@ OrderedList.propTypes = {
80
86
  * The position to start the list with.
81
87
  */
82
88
  start: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
83
- variant: _componentsBase.variantProp.propType
89
+ variant: _componentsBase.variantProp.propType,
90
+ tokens: (0, _componentsBase.getTokensPropType)('OrderedList')
84
91
  };
85
92
  OrderedList.Item = _Item.default;
86
93
  var _default = OrderedList;
@@ -7,26 +7,26 @@ exports.default = void 0;
7
7
  var _default = {
8
8
  en: {
9
9
  accessibility: {
10
- a11yLabel: 'Quantity Selector control',
11
- increaseButton: 'Increase quantity button',
12
- decreaseButton: 'Decrease quantity button'
10
+ a11yLabel: 'Quantity selector',
11
+ increaseButton: 'Increase quantity',
12
+ decreaseButton: 'Decrease quantity'
13
13
  },
14
14
  errors: {
15
- numberIsTooSmall: minNumber => `Number must be equal or greater than ${minNumber}`,
16
- numberIsTooBig: maxNumber => `Number must be equal or less than ${maxNumber}`,
17
- invalidCharacters: 'This control does not allow alphabetical or symbol characters. Try using numbers only'
15
+ numberIsTooSmall: minNumber => `You can enter a number equal or greater than ${minNumber}.`,
16
+ numberIsTooBig: maxNumber => `You can enter a number equal or less than ${maxNumber}.`,
17
+ invalidCharacters: 'Try using numbers only. Alphabetical or symbols characters are not allowed.'
18
18
  }
19
19
  },
20
20
  fr: {
21
21
  accessibility: {
22
- a11yLabel: 'Contrôleur de sélection de nombre',
23
- increaseButton: `Bouton d'augmentation de quantité`,
24
- decreaseButton: `Bouton de diminution de quantité`
22
+ a11yLabel: 'Sélecteur de quantité',
23
+ increaseButton: `Augmenter la quantité`,
24
+ decreaseButton: `Réduire la quantité`
25
25
  },
26
26
  errors: {
27
- numberIsTooSmall: minNumber => `Le nombre doit être plus grand ou égal que ${minNumber}`,
28
- numberIsTooBig: maxNumber => `Le nombre doit être plus petit ou égal que ${maxNumber}`,
29
- invalidCharacters: `Ce champ ne supporte pas les caractères alphabétiques ni les symboles. Essayez d'utiliser des chiffres uniquement`
27
+ numberIsTooSmall: minNumber => `Vous pouvez saisir un nombre égal ou supérieur à ${minNumber}.`,
28
+ numberIsTooBig: maxNumber => `Vous pouvez saisir un nombre égal ou inférieur à ${maxNumber}.`,
29
+ invalidCharacters: `Essayez d'utiliser seulement des chiffres. Les caractères alphabétiques ou les symboles ne sont pas permis.`
30
30
  }
31
31
  }
32
32
  };
@@ -70,7 +70,7 @@ const RibbonContainer = /*#__PURE__*/_styledComponents.default.div.withConfig({
70
70
  const RibbonCurve = /*#__PURE__*/_styledComponents.default.div.withConfig({
71
71
  displayName: "Ribbon__RibbonCurve",
72
72
  componentId: "components-web__sc-186270k-2"
73
- })(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
73
+ })(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
74
74
  let {
75
75
  curveBackgroundColor
76
76
  } = _ref10;
@@ -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 () {
@@ -9,8 +9,10 @@ const ExpandCollapseMini = /*#__PURE__*/React.forwardRef((_ref, ref) => {
9
9
  onToggle = () => {},
10
10
  tokens = {},
11
11
  nativeID,
12
+ initialOpen = false,
12
13
  ...rest
13
14
  } = _ref;
15
+ const expandCollapeMiniPanelId = 'ExpandCollapseMiniPanel';
14
16
  const handleChange = (openPanels, event) => {
15
17
  if (typeof onToggle === 'function') {
16
18
  const isOpen = openPanels.length > 0;
@@ -20,9 +22,10 @@ const ExpandCollapseMini = /*#__PURE__*/React.forwardRef((_ref, ref) => {
20
22
  return /*#__PURE__*/_jsx(ExpandCollapse, {
21
23
  onChange: handleChange,
22
24
  tokens: tokens,
25
+ initialOpen: initialOpen ? [expandCollapeMiniPanelId] : [],
23
26
  children: expandProps => /*#__PURE__*/_jsx(ExpandCollapse.Panel, {
24
27
  ...expandProps,
25
- panelId: "ExpandCollapseMiniPanel",
28
+ panelId: expandCollapeMiniPanelId,
26
29
  variant: {
27
30
  mini: true
28
31
  },
@@ -61,6 +64,10 @@ ExpandCollapseMini.propTypes = {
61
64
  * Children nodes that can be added
62
65
  */
63
66
  children: PropTypes.node.isRequired,
67
+ /**
68
+ * Controls if the panel and the content is opened by default on the first load
69
+ */
70
+ initialOpen: PropTypes.bool,
64
71
  tokens: getTokensPropType('ExpandCollapseMini')
65
72
  };
66
73
  export default ExpandCollapseMini;
@@ -14,13 +14,14 @@ const selectItemTextStyles = (_ref, themeOptions) => {
14
14
  itemFontSize,
15
15
  itemLineHeight,
16
16
  itemFontName,
17
- itemColor
17
+ itemColor,
18
+ itemTextColor
18
19
  } = _ref;
19
20
  return applyTextStyles({
20
21
  fontWeight: itemFontWeight,
21
22
  fontSize: itemFontSize,
22
23
  fontName: itemFontName,
23
- color: itemColor,
24
+ color: itemColor || itemTextColor,
24
25
  themeOptions,
25
26
  lineHeight: itemLineHeight
26
27
  });
@@ -39,14 +40,15 @@ const StyledItemBase = /*#__PURE__*/styled(ItemBase).withConfig({
39
40
  itemLineHeight,
40
41
  themeOptions,
41
42
  listGutter,
42
- itemColor
43
+ itemColor,
44
+ itemTextColor
43
45
  } = _ref2;
44
46
  return {
45
47
  counterIncrement: OL_COUNTER_NAME,
46
48
  '::before': {
47
49
  content: `counter(${OL_COUNTER_NAME})'.'`,
48
50
  display: 'inline-flex',
49
- color: itemColor,
51
+ color: itemColor || itemTextColor,
50
52
  width: itemBulletContainerWidth,
51
53
  paddingRight: listGutter,
52
54
  justifyContent: itemBulletTextAlign,
@@ -84,7 +86,7 @@ const Item = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
84
86
  const headingTokens = title && {
85
87
  lineHeight: themeTokens.itemLineHeight,
86
88
  fontSize: themeTokens.itemFontSize,
87
- color: themeTokens.itemColor,
89
+ color: themeTokens.itemColor || themeTokens.itemTextColor,
88
90
  fontName: themeTokens.headerFontName,
89
91
  fontWeight: themeTokens.headerFontWeight
90
92
  };
@@ -131,6 +133,6 @@ Item.propTypes = {
131
133
  /**
132
134
  * Item tokens
133
135
  */
134
- tokens: getTokensPropType('List')
136
+ tokens: getTokensPropType('OrderedList')
135
137
  };
136
138
  export default Item;
@@ -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 { selectSystemProps, variantProp } from '@telus-uds/components-base';
4
+ import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base';
5
5
  import { htmlAttrs } from '../utils';
6
6
  import OrderedListBase from './OrderedListBase';
7
7
  import Item from './Item';
@@ -30,36 +30,42 @@ const OrderedList = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
30
30
  children,
31
31
  start = 1,
32
32
  variant = {},
33
+ tokens = {},
33
34
  ...rest
34
35
  } = _ref2;
35
36
  // Check if children is an array
36
37
  const isChildrenArray = Array.isArray(children);
37
38
 
38
- // Pass any variants "OrderedList" receives down to the individual list items.
39
- const childrenWithParentVariants = React.useMemo(() => {
40
- const addVariantToProps = child => {
41
- var _child$props;
39
+ // Pass any variants and tokens "OrderedList" receives down to the individual list items.
40
+ const childrenWithParentVariantsAndTokens = React.useMemo(() => {
41
+ const addVariantAndTokensToProps = child => {
42
+ var _child$props, _child$props2;
42
43
  const existingChildVariants = ((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.variant) ?? {};
44
+ const existingChildTokens = ((_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.tokens) ?? {};
43
45
  return /*#__PURE__*/React.cloneElement(child, {
44
46
  variant: {
45
47
  ...existingChildVariants,
46
48
  ...variant
49
+ },
50
+ tokens: {
51
+ ...existingChildTokens,
52
+ ...tokens
47
53
  }
48
54
  });
49
55
  };
50
- if (variant) {
56
+ if (variant || tokens) {
51
57
  if (isChildrenArray) {
52
- return children.map(addVariantToProps);
58
+ return children.map(addVariantAndTokensToProps);
53
59
  }
54
- return [addVariantToProps(children)];
60
+ return [addVariantAndTokensToProps(children)];
55
61
  }
56
62
  return children;
57
- }, [children, variant, isChildrenArray]);
63
+ }, [children, variant, isChildrenArray, tokens]);
58
64
  return /*#__PURE__*/_jsx(StyledOrderedListBase, {
59
65
  ...selectProps(rest),
60
66
  ref: ref,
61
67
  start: start,
62
- children: childrenWithParentVariants
68
+ children: childrenWithParentVariantsAndTokens
63
69
  });
64
70
  });
65
71
  OrderedList.displayName = 'OrderedList';
@@ -73,7 +79,8 @@ OrderedList.propTypes = {
73
79
  * The position to start the list with.
74
80
  */
75
81
  start: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
76
- variant: variantProp.propType
82
+ variant: variantProp.propType,
83
+ tokens: getTokensPropType('OrderedList')
77
84
  };
78
85
  OrderedList.Item = Item;
79
86
  export default OrderedList;
@@ -1,26 +1,26 @@
1
1
  export default {
2
2
  en: {
3
3
  accessibility: {
4
- a11yLabel: 'Quantity Selector control',
5
- increaseButton: 'Increase quantity button',
6
- decreaseButton: 'Decrease quantity button'
4
+ a11yLabel: 'Quantity selector',
5
+ increaseButton: 'Increase quantity',
6
+ decreaseButton: 'Decrease quantity'
7
7
  },
8
8
  errors: {
9
- numberIsTooSmall: minNumber => `Number must be equal or greater than ${minNumber}`,
10
- numberIsTooBig: maxNumber => `Number must be equal or less than ${maxNumber}`,
11
- invalidCharacters: 'This control does not allow alphabetical or symbol characters. Try using numbers only'
9
+ numberIsTooSmall: minNumber => `You can enter a number equal or greater than ${minNumber}.`,
10
+ numberIsTooBig: maxNumber => `You can enter a number equal or less than ${maxNumber}.`,
11
+ invalidCharacters: 'Try using numbers only. Alphabetical or symbols characters are not allowed.'
12
12
  }
13
13
  },
14
14
  fr: {
15
15
  accessibility: {
16
- a11yLabel: 'Contrôleur de sélection de nombre',
17
- increaseButton: `Bouton d'augmentation de quantité`,
18
- decreaseButton: `Bouton de diminution de quantité`
16
+ a11yLabel: 'Sélecteur de quantité',
17
+ increaseButton: `Augmenter la quantité`,
18
+ decreaseButton: `Réduire la quantité`
19
19
  },
20
20
  errors: {
21
- numberIsTooSmall: minNumber => `Le nombre doit être plus grand ou égal que ${minNumber}`,
22
- numberIsTooBig: maxNumber => `Le nombre doit être plus petit ou égal que ${maxNumber}`,
23
- invalidCharacters: `Ce champ ne supporte pas les caractères alphabétiques ni les symboles. Essayez d'utiliser des chiffres uniquement`
21
+ numberIsTooSmall: minNumber => `Vous pouvez saisir un nombre égal ou supérieur à ${minNumber}.`,
22
+ numberIsTooBig: maxNumber => `Vous pouvez saisir un nombre égal ou inférieur à ${maxNumber}.`,
23
+ invalidCharacters: `Essayez d'utiliser seulement des chiffres. Les caractères alphabétiques ou les symboles ne sont pas permis.`
24
24
  }
25
25
  }
26
26
  };
@@ -64,7 +64,7 @@ const RibbonContainer = /*#__PURE__*/styled.div.withConfig({
64
64
  const RibbonCurve = /*#__PURE__*/styled.div.withConfig({
65
65
  displayName: "Ribbon__RibbonCurve",
66
66
  componentId: "components-web__sc-186270k-2"
67
- })(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
67
+ })(["background:", ";width:", ";height:", ";margin-top:-", ";border-radius:0 0 0 100%;position:relative;z-index:-1;overflow:hidden;&::after{content:'';border-bottom-left-radius:", ";position:absolute;height:", ";background:", ";width:", ";}"], _ref10 => {
68
68
  let {
69
69
  curveBackgroundColor
70
70
  } = _ref10;
@@ -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.89.0",
8
+ "@telus-uds/components-base": "1.91.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.61.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.36.0"
86
+ "version": "2.38.0"
87
87
  }
@@ -4,7 +4,8 @@ import { ExpandCollapse, getTokensPropType } from '@telus-uds/components-base'
4
4
  import ExpandCollapseMiniControl from './ExpandCollapseMiniControl'
5
5
 
6
6
  const ExpandCollapseMini = React.forwardRef(
7
- ({ children, onToggle = () => {}, tokens = {}, nativeID, ...rest }, ref) => {
7
+ ({ children, onToggle = () => {}, tokens = {}, nativeID, initialOpen = false, ...rest }, ref) => {
8
+ const expandCollapeMiniPanelId = 'ExpandCollapseMiniPanel'
8
9
  const handleChange = (openPanels, event) => {
9
10
  if (typeof onToggle === 'function') {
10
11
  const isOpen = openPanels.length > 0
@@ -13,11 +14,15 @@ const ExpandCollapseMini = React.forwardRef(
13
14
  }
14
15
 
15
16
  return (
16
- <ExpandCollapse onChange={handleChange} tokens={tokens}>
17
+ <ExpandCollapse
18
+ onChange={handleChange}
19
+ tokens={tokens}
20
+ initialOpen={initialOpen ? [expandCollapeMiniPanelId] : []}
21
+ >
17
22
  {(expandProps) => (
18
23
  <ExpandCollapse.Panel
19
24
  {...expandProps}
20
- panelId="ExpandCollapseMiniPanel"
25
+ panelId={expandCollapeMiniPanelId}
21
26
  variant={{ mini: true }}
22
27
  controlTokens={{
23
28
  // Remove unwanted look and feel from ExpandCollapse(background pressed, focus border and text underline)
@@ -57,6 +62,10 @@ ExpandCollapseMini.propTypes = {
57
62
  * Children nodes that can be added
58
63
  */
59
64
  children: PropTypes.node.isRequired,
65
+ /**
66
+ * Controls if the panel and the content is opened by default on the first load
67
+ */
68
+ initialOpen: PropTypes.bool,
60
69
  tokens: getTokensPropType('ExpandCollapseMini')
61
70
  }
62
71
 
@@ -18,14 +18,14 @@ import { OL_COUNTER_NAME } from './constants'
18
18
  const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
19
19
 
20
20
  const selectItemTextStyles = (
21
- { itemFontWeight, itemFontSize, itemLineHeight, itemFontName, itemColor },
21
+ { itemFontWeight, itemFontSize, itemLineHeight, itemFontName, itemColor, itemTextColor },
22
22
  themeOptions
23
23
  ) =>
24
24
  applyTextStyles({
25
25
  fontWeight: itemFontWeight,
26
26
  fontSize: itemFontSize,
27
27
  fontName: itemFontName,
28
- color: itemColor,
28
+ color: itemColor || itemTextColor,
29
29
  themeOptions,
30
30
  lineHeight: itemLineHeight
31
31
  })
@@ -41,13 +41,14 @@ const StyledItemBase = styled(ItemBase)(
41
41
  itemLineHeight,
42
42
  themeOptions,
43
43
  listGutter,
44
- itemColor
44
+ itemColor,
45
+ itemTextColor
45
46
  }) => ({
46
47
  counterIncrement: OL_COUNTER_NAME,
47
48
  '::before': {
48
49
  content: `counter(${OL_COUNTER_NAME})'.'`,
49
50
  display: 'inline-flex',
50
- color: itemColor,
51
+ color: itemColor || itemTextColor,
51
52
  width: itemBulletContainerWidth,
52
53
  paddingRight: listGutter,
53
54
  justifyContent: itemBulletTextAlign,
@@ -75,7 +76,7 @@ const Item = React.forwardRef(
75
76
  const headingTokens = title && {
76
77
  lineHeight: themeTokens.itemLineHeight,
77
78
  fontSize: themeTokens.itemFontSize,
78
- color: themeTokens.itemColor,
79
+ color: themeTokens.itemColor || themeTokens.itemTextColor,
79
80
  fontName: themeTokens.headerFontName,
80
81
  fontWeight: themeTokens.headerFontWeight
81
82
  }
@@ -117,7 +118,7 @@ Item.propTypes = {
117
118
  /**
118
119
  * Item tokens
119
120
  */
120
- tokens: getTokensPropType('List')
121
+ tokens: getTokensPropType('OrderedList')
121
122
  }
122
123
 
123
124
  export default Item
@@ -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 { selectSystemProps, variantProp } from '@telus-uds/components-base'
4
+ import { getTokensPropType, selectSystemProps, variantProp } from '@telus-uds/components-base'
5
5
  import { htmlAttrs } from '../utils'
6
6
  import OrderedListBase from './OrderedListBase'
7
7
  import Item from './Item'
@@ -18,38 +18,40 @@ const StyledOrderedListBase = styled(OrderedListBase)(({ start }) => ({
18
18
  /**
19
19
  * Themed semantic ordered list.
20
20
  */
21
- const OrderedList = React.forwardRef(({ children, start = 1, variant = {}, ...rest }, ref) => {
22
- // Check if children is an array
23
- const isChildrenArray = Array.isArray(children)
21
+ const OrderedList = React.forwardRef(
22
+ ({ children, start = 1, variant = {}, tokens = {}, ...rest }, ref) => {
23
+ // Check if children is an array
24
+ const isChildrenArray = Array.isArray(children)
24
25
 
25
- // Pass any variants "OrderedList" receives down to the individual list items.
26
- const childrenWithParentVariants = React.useMemo(() => {
27
- const addVariantToProps = (child) => {
28
- const existingChildVariants = child.props?.variant ?? {}
29
- return React.cloneElement(child, {
30
- variant: {
31
- ...existingChildVariants,
32
- ...variant
33
- }
34
- })
35
- }
26
+ // Pass any variants and tokens "OrderedList" receives down to the individual list items.
27
+ const childrenWithParentVariantsAndTokens = React.useMemo(() => {
28
+ const addVariantAndTokensToProps = (child) => {
29
+ const existingChildVariants = child.props?.variant ?? {}
30
+ const existingChildTokens = child.props?.tokens ?? {}
31
+
32
+ return React.cloneElement(child, {
33
+ variant: { ...existingChildVariants, ...variant },
34
+ tokens: { ...existingChildTokens, ...tokens }
35
+ })
36
+ }
36
37
 
37
- if (variant) {
38
- if (isChildrenArray) {
39
- return children.map(addVariantToProps)
38
+ if (variant || tokens) {
39
+ if (isChildrenArray) {
40
+ return children.map(addVariantAndTokensToProps)
41
+ }
42
+ return [addVariantAndTokensToProps(children)]
40
43
  }
41
- return [addVariantToProps(children)]
42
- }
43
44
 
44
- return children
45
- }, [children, variant, isChildrenArray])
45
+ return children
46
+ }, [children, variant, isChildrenArray, tokens])
46
47
 
47
- return (
48
- <StyledOrderedListBase {...selectProps(rest)} ref={ref} start={start}>
49
- {childrenWithParentVariants}
50
- </StyledOrderedListBase>
51
- )
52
- })
48
+ return (
49
+ <StyledOrderedListBase {...selectProps(rest)} ref={ref} start={start}>
50
+ {childrenWithParentVariantsAndTokens}
51
+ </StyledOrderedListBase>
52
+ )
53
+ }
54
+ )
53
55
  OrderedList.displayName = 'OrderedList'
54
56
 
55
57
  OrderedList.propTypes = {
@@ -62,7 +64,8 @@ OrderedList.propTypes = {
62
64
  * The position to start the list with.
63
65
  */
64
66
  start: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
65
- variant: variantProp.propType
67
+ variant: variantProp.propType,
68
+ tokens: getTokensPropType('OrderedList')
66
69
  }
67
70
 
68
71
  OrderedList.Item = Item
@@ -1,27 +1,29 @@
1
1
  export default {
2
2
  en: {
3
3
  accessibility: {
4
- a11yLabel: 'Quantity Selector control',
5
- increaseButton: 'Increase quantity button',
6
- decreaseButton: 'Decrease quantity button'
4
+ a11yLabel: 'Quantity selector',
5
+ increaseButton: 'Increase quantity',
6
+ decreaseButton: 'Decrease quantity'
7
7
  },
8
8
  errors: {
9
- numberIsTooSmall: (minNumber) => `Number must be equal or greater than ${minNumber}`,
10
- numberIsTooBig: (maxNumber) => `Number must be equal or less than ${maxNumber}`,
9
+ numberIsTooSmall: (minNumber) => `You can enter a number equal or greater than ${minNumber}.`,
10
+ numberIsTooBig: (maxNumber) => `You can enter a number equal or less than ${maxNumber}.`,
11
11
  invalidCharacters:
12
- 'This control does not allow alphabetical or symbol characters. Try using numbers only'
12
+ 'Try using numbers only. Alphabetical or symbols characters are not allowed.'
13
13
  }
14
14
  },
15
15
  fr: {
16
16
  accessibility: {
17
- a11yLabel: 'Contrôleur de sélection de nombre',
18
- increaseButton: `Bouton d'augmentation de quantité`,
19
- decreaseButton: `Bouton de diminution de quantité`
17
+ a11yLabel: 'Sélecteur de quantité',
18
+ increaseButton: `Augmenter la quantité`,
19
+ decreaseButton: `Réduire la quantité`
20
20
  },
21
21
  errors: {
22
- numberIsTooSmall: (minNumber) => `Le nombre doit être plus grand ou égal que ${minNumber}`,
23
- numberIsTooBig: (maxNumber) => `Le nombre doit être plus petit ou égal que ${maxNumber}`,
24
- invalidCharacters: `Ce champ ne supporte pas les caractères alphabétiques ni les symboles. Essayez d'utiliser des chiffres uniquement`
22
+ numberIsTooSmall: (minNumber) =>
23
+ `Vous pouvez saisir un nombre égal ou supérieur à ${minNumber}.`,
24
+ numberIsTooBig: (maxNumber) =>
25
+ `Vous pouvez saisir un nombre égal ou inférieur à ${maxNumber}.`,
26
+ invalidCharacters: `Essayez d'utiliser seulement des chiffres. Les caractères alphabétiques ou les symboles ne sont pas permis.`
25
27
  }
26
28
  }
27
29
  }
@@ -39,6 +39,7 @@ const RibbonCurve = styled.div`
39
39
  border-radius: 0 0 0 100%;
40
40
  position: relative;
41
41
  z-index: -1;
42
+ overflow: hidden;
42
43
  &::after {
43
44
  content: '';
44
45
  border-bottom-left-radius: ${({ curveAfterRadius }) => curveAfterRadius};
@@ -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,