@telus-uds/components-base 4.0.0-alpha.0 → 4.0.0-alpha.1

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +35 -6
  2. package/jest.config.cjs +1 -0
  3. package/lib/cjs/ActionCard/ActionCard.js +10 -3
  4. package/lib/cjs/Card/Card.js +3 -3
  5. package/lib/cjs/Carousel/Carousel.js +6 -1
  6. package/lib/cjs/Carousel/CarouselThumbnail.js +125 -33
  7. package/lib/cjs/Carousel/CarouselThumbnailNavigation.js +8 -1
  8. package/lib/cjs/InputSupports/InputSupports.js +1 -2
  9. package/lib/cjs/InputSupports/useInputSupports.js +1 -3
  10. package/lib/cjs/Link/ChevronLink.js +1 -2
  11. package/lib/cjs/Notification/Notification.js +4 -12
  12. package/lib/cjs/Progress/ProgressBar.js +3 -3
  13. package/lib/cjs/Progress/ProgressBarBackground.js +2 -3
  14. package/lib/cjs/QuickLinks/QuickLinks.js +7 -0
  15. package/lib/cjs/StackView/StackWrapBox.js +9 -1
  16. package/lib/cjs/StackView/StackWrapGap.js +3 -1
  17. package/lib/cjs/StackView/getStackedContent.js +20 -10
  18. package/lib/esm/ActionCard/ActionCard.js +10 -3
  19. package/lib/esm/Card/Card.js +3 -3
  20. package/lib/esm/Carousel/Carousel.js +6 -1
  21. package/lib/esm/Carousel/CarouselThumbnail.js +126 -34
  22. package/lib/esm/Carousel/CarouselThumbnailNavigation.js +8 -1
  23. package/lib/esm/InputSupports/InputSupports.js +1 -2
  24. package/lib/esm/InputSupports/useInputSupports.js +1 -3
  25. package/lib/esm/Link/ChevronLink.js +1 -2
  26. package/lib/esm/Notification/Notification.js +4 -12
  27. package/lib/esm/Progress/ProgressBar.js +3 -3
  28. package/lib/esm/Progress/ProgressBarBackground.js +2 -3
  29. package/lib/esm/QuickLinks/QuickLinks.js +7 -0
  30. package/lib/esm/StackView/StackWrapBox.js +9 -1
  31. package/lib/esm/StackView/StackWrapGap.js +3 -1
  32. package/lib/esm/StackView/getStackedContent.js +20 -10
  33. package/lib/package.json +2 -2
  34. package/package.json +2 -2
  35. package/src/ActionCard/ActionCard.jsx +13 -4
  36. package/src/Card/Card.jsx +3 -3
  37. package/src/Carousel/Carousel.jsx +6 -1
  38. package/src/Carousel/CarouselThumbnail.jsx +117 -30
  39. package/src/Carousel/CarouselThumbnailNavigation.jsx +8 -2
  40. package/src/InputSupports/InputSupports.jsx +1 -6
  41. package/src/InputSupports/useInputSupports.js +1 -1
  42. package/src/Link/ChevronLink.jsx +1 -2
  43. package/src/Notification/Notification.jsx +5 -21
  44. package/src/Progress/ProgressBar.jsx +3 -3
  45. package/src/Progress/ProgressBarBackground.jsx +2 -3
  46. package/src/QuickLinks/QuickLinks.jsx +8 -0
  47. package/src/StackView/StackWrapBox.jsx +13 -1
  48. package/src/StackView/StackWrapGap.jsx +2 -1
  49. package/src/StackView/getStackedContent.jsx +22 -8
  50. package/types/Link.d.ts +1 -2
package/CHANGELOG.md CHANGED
@@ -1,24 +1,53 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Fri, 20 Mar 2026 02:26:39 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 10 Apr 2026 17:20:02 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 4.0.0-alpha.0
7
+ ## 4.0.0-alpha.1
8
8
 
9
- Fri, 20 Mar 2026 02:26:39 GMT
9
+ Fri, 10 Apr 2026 17:20:02 GMT
10
10
 
11
11
  ### Major changes
12
12
 
13
- - Upgrade to React 19 and other major changes, please refer to the changelog for more details (shahzaibkhalidmalik@outlook.com)
14
- - Bump @telus-uds/system-constants to v4.0.0-alpha.0
15
- - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.0
13
+ - `Notification`: remove system prop (guillermo.peitzner@telus.com)
14
+ - `Card`: remove background variant and set style as default (sergio.ramirez@telus.com)
15
+ - `Link`: deprecate alternative and inverse variants (guillermo.peitzner@telus.com)
16
+ - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.1
17
+
18
+ ### Minor changes
19
+
20
+ - `Carousel`: Add `isVideo` prop to thumbnail navigation to display a play icon overlay on video thumbnails (josue.higueros@telus.com)
16
21
 
17
22
  ### Patches
18
23
 
19
24
  - `Modal`: Fix onPress error when backgroundDismissible is false (david.melara1@telus.com)
25
+ - `QuickLinks`: Add `listitem` role to item wrappers on web in button mode for proper ARIA semantics. (sergio.ramirez@telus.com)
26
+ - `TextInput`: Include hint and feedback in the describedBy prop (david.melara1@telus.com)
27
+ - `ActionCard`: fix mobile spacing (guillermo.peitzner@telus.com)
20
28
  - `ExpandCollapse`: columnwrap example fixed in mobile (josue.higueroscalderon@telus.com)
21
29
 
30
+ ## 3.29.1
31
+
32
+ Mon, 06 Apr 2026 21:25:55 GMT
33
+
34
+ ### Patches
35
+
36
+ - `ExpandCollapse`: columnwrap example fixed in mobile (josue.higueroscalderon@telus.com)
37
+ - `Modal`: Fix onPress error when backgroundDismissible is false (david.melara1@telus.com)
38
+ - `QuickLinks`: Add `listitem` role to item wrappers on web in button mode for proper ARIA semantics. (sergio.ramirez@telus.com)
39
+ - `TextInput`: Include hint and feedback in the describedBy prop (david.melara1@telus.com)
40
+
41
+ ## 4.0.0-alpha.0
42
+
43
+ Fri, 20 Mar 2026 00:57:30 GMT
44
+
45
+ ### Major changes
46
+
47
+ - Upgrade to React 19 and other major changes, please refer to the changelog for more details (shahzaibkhalidmalik@outlook.com)
48
+ - Bump @telus-uds/system-constants to v4.0.0-alpha.0
49
+ - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.0
50
+
22
51
  ## 3.29.0
23
52
 
24
53
  Fri, 13 Mar 2026 20:33:41 GMT
package/jest.config.cjs CHANGED
@@ -34,6 +34,7 @@ module.exports = {
34
34
  '^@telus-uds/system-theme-tokens$': '<rootDir>/../system-theme-tokens/src'
35
35
  },
36
36
  testMatch: [`<rootDir>/__tests__/**/*.test.js?(x)`],
37
+ testPathIgnorePatterns: ['\\.web\\.test\\.'],
37
38
  transformIgnorePatterns: [
38
39
  'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-web|@react-native-picker)'
39
40
  ],
@@ -8,7 +8,6 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _Animated = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Animated"));
9
9
  var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
10
10
  var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
11
- var _Text = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Text"));
12
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
12
  var _a11yProps = require("../utils/props/a11yProps");
14
13
  var _tokens = require("../utils/props/tokens");
@@ -260,9 +259,10 @@ const ActionCard = exports.ActionCard = /*#__PURE__*/_react.default.forwardRef((
260
259
  style: staticStyles.header,
261
260
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
262
261
  style: [selectTitleStyles(themeTokens), staticStyles.title],
263
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Text.default, {
262
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
263
+ style: staticStyles.titleRow,
264
264
  children: [(0, _children.wrapStringsInText)(title, {
265
- style: selectTitleTextStyles(themeTokens)
265
+ style: [selectTitleTextStyles(themeTokens), staticStyles.titleText]
266
266
  }), themeTokens.statusIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
267
267
  style: staticStyles.statusIcon,
268
268
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
@@ -351,6 +351,13 @@ const staticStyles = _StyleSheet.default.create({
351
351
  title: {
352
352
  flexShrink: 1
353
353
  },
354
+ titleRow: {
355
+ flexDirection: 'row',
356
+ alignItems: 'center'
357
+ },
358
+ titleText: {
359
+ flexShrink: 1
360
+ },
354
361
  statusIcon: {
355
362
  marginLeft: 4
356
363
  }
@@ -87,10 +87,10 @@ const getInputProps = _ref3 => {
87
87
  *
88
88
  * ## Component API
89
89
  *
90
- * ### Background
90
+ * ### Style
91
91
  *
92
- * In order to control the background of a card, the following tokens are currently
93
- * supported:
92
+ * In order to control the style of a card, use the `style` variant.
93
+ * The following tokens are supported:
94
94
  *
95
95
  * - `backgroundColor`
96
96
  *
@@ -1187,9 +1187,14 @@ Carousel.propTypes = {
1187
1187
  * An array of objects containing information on the thumbnails to be rendered as navigation panel
1188
1188
  */
1189
1189
  thumbnails: _propTypes.default.arrayOf(_propTypes.default.shape({
1190
+ /** Accessibility label for the thumbnail image, used by assistive technologies. */
1190
1191
  accessibilityLabel: _propTypes.default.string,
1192
+ /** Alternative text for the thumbnail image, displayed when the image cannot be rendered. */
1191
1193
  alt: _propTypes.default.string,
1192
- src: _propTypes.default.string
1194
+ /** When true, renders a play icon overlay on the thumbnail to indicate that the slide contains a video. */
1195
+ isVideo: _propTypes.default.bool,
1196
+ /** URL or path of the thumbnail image. When used with `isVideo`, this should be the video's poster/preview image. */
1197
+ src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
1193
1198
  })),
1194
1199
  /**
1195
1200
  * Minimal part of slide width must be swiped for changing index.
@@ -6,11 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.CarouselThumbnail = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
9
10
  var _Pressable = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Pressable"));
10
11
  var _Image = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Image"));
12
+ var _View = _interopRequireDefault(require("react-native-web/dist/cjs/exports/View"));
11
13
  var _CarouselContext = require("./CarouselContext");
12
14
  var _useThemeTokens = require("../ThemeProvider/useThemeTokens");
13
15
  var _useViewport = require("../ViewportProvider/useViewport");
16
+ var _Icon = require("../Icon/Icon");
14
17
  var _jsxRuntime = require("react/jsx-runtime");
15
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
19
  const selectPressableTokens = _ref => {
@@ -30,17 +33,64 @@ const selectPressableTokens = _ref => {
30
33
  };
31
34
  };
32
35
 
36
+ // Play icon overlay appearance is consistent across all brands and is not theme-configurable.
37
+ // The circle occupies 55% of the thumbnail size, and the icon occupies 55% of the circle diameter.
38
+ const PLAY_ICON_RATIO = 0.55;
39
+ const PLAY_ICON_BORDER_RADIUS_DIVISOR = 2;
40
+ const selectImageStyles = size => ({
41
+ width: size,
42
+ height: size
43
+ });
44
+ const selectSelectedStyles = _ref2 => {
45
+ let {
46
+ selectedBorderColor,
47
+ selectedBorderWidth,
48
+ padding,
49
+ margin
50
+ } = _ref2;
51
+ return {
52
+ borderColor: selectedBorderColor,
53
+ borderWidth: selectedBorderWidth,
54
+ padding: padding - selectedBorderWidth,
55
+ marginBottom: margin + selectedBorderWidth
56
+ };
57
+ };
58
+ const selectNonSelectedStyles = _ref3 => {
59
+ let {
60
+ borderWidth,
61
+ padding,
62
+ margin,
63
+ selectedBorderWidth
64
+ } = _ref3;
65
+ return {
66
+ padding: padding - borderWidth,
67
+ marginBottom: margin + selectedBorderWidth
68
+ };
69
+ };
70
+ const selectPlayIconCircleStyles = thumbnailSize => {
71
+ const diameter = thumbnailSize * PLAY_ICON_RATIO;
72
+ return {
73
+ width: diameter,
74
+ height: diameter,
75
+ borderRadius: diameter / PLAY_ICON_BORDER_RADIUS_DIVISOR
76
+ };
77
+ };
78
+ const selectPlayIconTokens = thumbnailSize => ({
79
+ size: thumbnailSize * PLAY_ICON_RATIO * PLAY_ICON_RATIO
80
+ });
81
+
33
82
  /**
34
- * `Carousel.Thumbnail` is used to wrap the content of an individual slide and is suppsoed to be the
83
+ * `CarouselThumbnail` is used to wrap the content of an individual slide and is suppsoed to be the
35
84
  * only top-level component passed to the `Carousel`
36
85
  */
37
- const CarouselThumbnail = exports.CarouselThumbnail = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
86
+ const CarouselThumbnail = exports.CarouselThumbnail = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
38
87
  let {
39
88
  accessibilityLabel,
40
89
  alt,
41
90
  index,
91
+ isVideo,
42
92
  src
43
- } = _ref2;
93
+ } = _ref4;
44
94
  const {
45
95
  activeIndex,
46
96
  itemLabel,
@@ -62,58 +112,100 @@ const CarouselThumbnail = exports.CarouselThumbnail = /*#__PURE__*/_react.defaul
62
112
  selectedBorderColor,
63
113
  selectedBorderWidth,
64
114
  size,
65
- margin
115
+ margin,
116
+ playIcon
66
117
  } = getThumbnailTokens({
67
118
  viewport
68
119
  });
69
- const styles = {
70
- image: {
71
- height: size,
72
- width: size
73
- },
74
- selected: {
75
- borderColor: selectedBorderColor,
76
- borderWidth: selectedBorderWidth,
77
- padding: padding - selectedBorderWidth,
78
- marginBottom: margin + selectedBorderWidth
79
- },
80
- nonSelected: {
81
- padding: padding - borderWidth,
82
- marginBottom: margin + selectedBorderWidth
83
- }
84
- };
85
120
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
86
121
  onKeyDown: handleKeyDown,
87
122
  onPress: handlePress,
88
- style: _ref3 => {
123
+ style: _ref5 => {
89
124
  let {
90
125
  hovered,
91
126
  pressed,
92
127
  focused
93
- } = _ref3;
128
+ } = _ref5;
94
129
  const pressableStyles = selectPressableTokens(getThumbnailTokens({
95
130
  hover: hovered,
96
131
  pressed,
97
132
  focus: focused
98
133
  }));
99
- return [pressableStyles, index === activeIndex ? [styles.selected, {
100
- outline: 'none'
101
- }] : styles.nonSelected];
134
+ return [pressableStyles, index === activeIndex ? [selectSelectedStyles({
135
+ selectedBorderColor,
136
+ selectedBorderWidth,
137
+ padding,
138
+ margin
139
+ }), staticStyles.selectedPressableOutline] : selectNonSelectedStyles({
140
+ borderWidth,
141
+ padding,
142
+ margin,
143
+ selectedBorderWidth
144
+ })];
102
145
  },
103
146
  ref: ref,
104
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
105
- accessibilityIgnoresInvertColors: true,
106
- accessibilityLabel: accessibilityLabel ?? alt,
107
- source: src,
108
- style: styles.image,
109
- title: thumbnailTitle
147
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
148
+ style: [staticStyles.imageContainer, selectImageStyles(size)],
149
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
150
+ accessibilityIgnoresInvertColors: true,
151
+ accessibilityLabel: accessibilityLabel ?? alt,
152
+ source: src,
153
+ style: selectImageStyles(size),
154
+ title: thumbnailTitle
155
+ }), isVideo && playIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
156
+ style: staticStyles.playIconOverlayContainer,
157
+ testID: `play-icon-overlay-${index}`,
158
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
159
+ style: [selectPlayIconCircleStyles(size), staticStyles.playIconCircleBackground],
160
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
161
+ icon: playIcon,
162
+ tokens: {
163
+ ...selectPlayIconTokens(size),
164
+ color: staticStyles.playIconSymbol.color
165
+ }
166
+ })
167
+ })
168
+ })]
110
169
  })
111
170
  }, src);
112
171
  });
113
172
  CarouselThumbnail.displayName = 'CarouselThumbnail';
114
173
  CarouselThumbnail.propTypes = {
174
+ /** Accessibility label for screen readers, overrides the alt text */
115
175
  accessibilityLabel: _propTypes.default.string,
176
+ /** Alt text for the thumbnail image */
116
177
  alt: _propTypes.default.string,
178
+ /** Zero-based index of this thumbnail within the carousel */
117
179
  index: _propTypes.default.number,
118
- src: _propTypes.default.string
119
- };
180
+ /**
181
+ * When true, renders a play icon overlay on the thumbnail to indicate that the slide contains a video.
182
+ */
183
+ isVideo: _propTypes.default.bool,
184
+ /** Image source URI (web) or local asset require() (native) */
185
+ src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
186
+ };
187
+ const staticStyles = _StyleSheet.default.create({
188
+ imageContainer: {
189
+ position: 'relative'
190
+ },
191
+ playIconOverlayContainer: {
192
+ position: 'absolute',
193
+ top: 0,
194
+ left: 0,
195
+ right: 0,
196
+ bottom: 0,
197
+ justifyContent: 'center',
198
+ alignItems: 'center'
199
+ },
200
+ selectedPressableOutline: {
201
+ outlineStyle: 'none'
202
+ },
203
+ playIconCircleBackground: {
204
+ backgroundColor: 'rgba(0, 0, 0, 0.6)',
205
+ justifyContent: 'center',
206
+ alignItems: 'center'
207
+ },
208
+ playIconSymbol: {
209
+ color: 'rgb(255, 255, 255)'
210
+ }
211
+ });
@@ -52,12 +52,14 @@ const CarouselThumbnailNavigation = exports.CarouselThumbnailNavigation = /*#__P
52
52
  let {
53
53
  accessibilityLabel,
54
54
  alt,
55
+ isVideo,
55
56
  src
56
57
  } = _ref2;
57
58
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CarouselThumbnail.CarouselThumbnail, {
58
59
  accessibilityLabel: accessibilityLabel,
59
60
  alt: alt,
60
61
  index: index,
62
+ isVideo: isVideo,
61
63
  src: src
62
64
  }, src);
63
65
  })
@@ -70,8 +72,13 @@ CarouselThumbnailNavigation.propTypes = {
70
72
  * An array of objects containing information on the thumbnail images.
71
73
  */
72
74
  thumbnails: _propTypes.default.arrayOf(_propTypes.default.shape({
75
+ /** Accessibility label for the thumbnail image, used by assistive technologies. */
73
76
  accessibilityLabel: _propTypes.default.string,
77
+ /** Alternative text for the thumbnail image, displayed when the image cannot be rendered. */
74
78
  alt: _propTypes.default.string,
75
- src: _propTypes.default.string
79
+ /** When true, renders a play icon overlay on the thumbnail to indicate that the slide contains a video. */
80
+ isVideo: _propTypes.default.bool,
81
+ /** URL or path of the thumbnail image. When used with `isVideo`, this should be the video's poster/preview image. */
82
+ src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])
76
83
  })).isRequired
77
84
  };
@@ -73,8 +73,7 @@ const InputSupports = exports.InputSupports = /*#__PURE__*/_react.default.forwar
73
73
  }), typeof children === 'function' ? children({
74
74
  inputId,
75
75
  ...a11yProps,
76
- validation: feedbackValidation,
77
- accessibilityDescribedBy: feedbackId
76
+ validation: feedbackValidation
78
77
  }) : children, feedback || maxCharsReachedErrorMessage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Feedback.Feedback, {
79
78
  id: feedbackId,
80
79
  title: feedback || maxCharsReachedErrorMessage,
@@ -31,9 +31,7 @@ const useInputSupports = _ref => {
31
31
  accessibilityLabel: label,
32
32
  accessibilityHint: joinDefined([!hasValidationError && feedback, hint, maxCharacterAllowed ? getCopy('maxCharacters').replace(/%\{charCount\}/g, maxCharacterAllowed) : undefined]),
33
33
  // native only -> replaced with describedBy on web
34
- accessibilityDescribedBy: joinDefined([!hasValidationError && feedback && feedbackId,
35
- // feedback receives a11yRole=alert on error, so there's no need to include it here
36
- hint && hintId, charactersCount ? getCopy('charactersRemaining').replace(/%\{charCount\}/g, charactersCount) : undefined]),
34
+ accessibilityDescribedBy: joinDefined([hint && hintId, feedback && feedbackId || undefined, charactersCount ? getCopy('charactersRemaining').replace(/%\{charCount\}/g, charactersCount) : undefined]),
37
35
  accessibilityInvalid: hasValidationError
38
36
  };
39
37
  return {
@@ -63,8 +63,7 @@ ChevronLink.propTypes = {
63
63
  children: _propTypes.default.node,
64
64
  variant: _propTypes.default.exact({
65
65
  size: _propTypes.default.oneOf(['large', 'small', 'micro']),
66
- alternative: _propTypes.default.bool,
67
- inverse: _propTypes.default.bool
66
+ style: _propTypes.default.oneOf(['inline', 'subtle', 'feature', 'danger', 'inverse'])
68
67
  }),
69
68
  ..._linkProps.linkProps.types,
70
69
  tokens: (0, _tokens.getTokensPropType)('ChevronLink', 'Link'),
@@ -255,11 +255,10 @@ const getDefaultStyles = (themeTokens, themeOptions, maxWidth, dismissible, view
255
255
  * ### Variants
256
256
  * - Use `variant.style` to set the visual style of the notification
257
257
  * - Use `dismissible` prop to enable dismissible functionality
258
- * - Use `system` prop to set the visual style of the notification and denote an announcement from the system or application
259
258
  *
260
- * ### When to use the system prop?
261
- * - Use `system` to show system-based messages coming from the application
262
- * - Don’t use `system` when the message is in response to user action
259
+ * ### When to use the system style variant?
260
+ * - Use `variant.style ‘system’` to show system-based messages coming from the application
261
+ * - Don’t use the `system` style variant when the message is in response to user action
263
262
  *
264
263
  * ## Variants
265
264
  *
@@ -292,7 +291,6 @@ const getDefaultStyles = (themeTokens, themeOptions, maxWidth, dismissible, view
292
291
  const Notification = exports.Notification = /*#__PURE__*/_react.default.forwardRef((_ref7, ref) => {
293
292
  let {
294
293
  children,
295
- system,
296
294
  dismissible,
297
295
  copy = 'en',
298
296
  tokens,
@@ -307,9 +305,7 @@ const Notification = exports.Notification = /*#__PURE__*/_react.default.forwardR
307
305
  dictionary: _dictionary.dictionary,
308
306
  copy
309
307
  });
310
-
311
- // TODO: Remove this once the system style variant is deprecated
312
- const isSystemEnabled = system || variant?.style?.includes('system');
308
+ const isSystemEnabled = variant?.style?.includes('system');
313
309
  const {
314
310
  themeOptions
315
311
  } = (0, _useTheme.useTheme)();
@@ -425,10 +421,6 @@ Notification.propTypes = {
425
421
  * Content of the `Notification`.
426
422
  */
427
423
  children: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node, _propTypes.default.func]),
428
- /**
429
- * Use `system` prop to set the visual style of the notification and denote an announcement from the system or application
430
- */
431
- system: _propTypes.default.bool,
432
424
  /**
433
425
  * Use the `dismissible` prop to allow users to dismiss the Notification at any time.
434
426
  */
@@ -69,9 +69,9 @@ const selectBarStyles = _ref => {
69
69
  *
70
70
  * ## Variants
71
71
  *
72
- * - Use the following variants to render specific types of progress bars:
73
- * - `negative`: set to `true` if you wish to use the negative theming for progress bar filling,
74
- * - `inactive`: set to `true` if you wish to style the progress bar as inactive.
72
+ * - Use `variant={{ style: 'value' }}` to render specific types of progress bars:
73
+ * - `style: 'negative'` for negative theming for progress bar filling,
74
+ * - `style: 'inactive'` to style the progress bar as inactive.
75
75
  *
76
76
  * ## Usability and A11y guidelines
77
77
  *
@@ -18,10 +18,9 @@ const ProgressBarBackground = exports.ProgressBarBackground = /*#__PURE__*/_reac
18
18
  variant
19
19
  } = _ref;
20
20
  let source = null;
21
- // TODO: Remove the `variant?.inactive` & `variant?.negative` to complete the deprecation
22
- if (variant?.inactive || variant?.style === _constants.INACTIVE_VARIANT) {
21
+ if (variant?.style === _constants.INACTIVE_VARIANT) {
23
22
  source = inactiveBackground;
24
- } else if (variant?.negative || variant?.style === _constants.NEGATIVE_VARIANT) {
23
+ } else if (variant?.style === _constants.NEGATIVE_VARIANT) {
25
24
  source = negativeBackground;
26
25
  } else {
27
26
  return null;
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.QuickLinks = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
9
10
  var _useThemeTokens = require("../ThemeProvider/useThemeTokens");
10
11
  var _useViewport = require("../ViewportProvider/useViewport");
11
12
  var _tokens = require("../utils/props/tokens");
12
13
  var _variantProp = require("../utils/props/variantProp");
14
+ var _semantics = require("../utils/a11y/semantics");
13
15
  var _List = require("../List/List");
14
16
  var _StackWrap = require("../StackView/StackWrap");
15
17
  var _QuickLinksCard = require("./QuickLinksCard");
@@ -42,6 +44,10 @@ const QuickLinks = exports.QuickLinks = /*#__PURE__*/_react.default.forwardRef((
42
44
  } = (0, _useThemeTokens.useThemeTokens)('QuickLinks', tokens, variant, {
43
45
  viewport
44
46
  });
47
+ const itemAccessibilityRole = _Platform.default.select({
48
+ web: ['ul', 'ol'].includes(tag) ? _semantics.tagsToRoles.li : undefined,
49
+ default: undefined
50
+ });
45
51
  const content = list && /*#__PURE__*/(0, _jsxRuntime.jsx)(_List.List, {
46
52
  ref: ref,
47
53
  tokens: listTokens,
@@ -56,6 +62,7 @@ const QuickLinks = exports.QuickLinks = /*#__PURE__*/_react.default.forwardRef((
56
62
  justifyContent: stackJustify
57
63
  },
58
64
  tag: tag,
65
+ itemAccessibilityRole: itemAccessibilityRole,
59
66
  ...rest,
60
67
  children: children
61
68
  });
@@ -58,6 +58,7 @@ const StackWrapBox = exports.StackWrapBox = /*#__PURE__*/_react.default.forwardR
58
58
  variant,
59
59
  tag,
60
60
  accessibilityRole,
61
+ itemAccessibilityRole,
61
62
  ...rest
62
63
  } = _ref;
63
64
  const viewport = (0, _useViewport.useViewport)();
@@ -84,7 +85,8 @@ const StackWrapBox = exports.StackWrapBox = /*#__PURE__*/_react.default.forwardR
84
85
  const content = (0, _getStackedContent.getStackedContent)(children, {
85
86
  direction,
86
87
  space: 0,
87
- box: boxProps
88
+ box: boxProps,
89
+ itemAccessibilityRole
88
90
  });
89
91
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
90
92
  ref: ref,
@@ -120,6 +122,12 @@ StackWrapBox.propTypes = {
120
122
  * is not defined, the accessibilityRole will default to "heading".
121
123
  */
122
124
  tag: _propTypes.default.oneOf(_semantics.layoutTags),
125
+ /**
126
+ * Optional accessibility role to apply to each item in the stack.
127
+ * On web, items are wrapped (or cloned) with this role, enabling correct list semantics
128
+ * when the container tag is "ul" or "ol".
129
+ */
130
+ itemAccessibilityRole: _propTypes.default.string,
123
131
  /**
124
132
  * A StackWrap may take any children, but will have no effect if it is only passed one child or is passed children
125
133
  * wrapped in a component. If necessary, children may be wrapped in one React Fragment.
@@ -40,6 +40,7 @@ const StackWrapGap = exports.StackWrapGap = /*#__PURE__*/_react.default.forwardR
40
40
  children,
41
41
  tag,
42
42
  accessibilityRole,
43
+ itemAccessibilityRole,
43
44
  ...rest
44
45
  } = _ref;
45
46
  const viewport = (0, _useViewport.useViewport)();
@@ -59,7 +60,8 @@ const StackWrapGap = exports.StackWrapGap = /*#__PURE__*/_react.default.forwardR
59
60
  };
60
61
  const content = (0, _getStackedContent.getStackedContent)(children, {
61
62
  direction,
62
- space: 0
63
+ space: 0,
64
+ itemAccessibilityRole
63
65
  });
64
66
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
65
67
  ref: ref,
@@ -42,7 +42,8 @@ const getStackedContent = (children, _ref) => {
42
42
  space,
43
43
  direction = 'column',
44
44
  box,
45
- preserveFragments = false
45
+ preserveFragments = false,
46
+ itemAccessibilityRole
46
47
  } = _ref;
47
48
  const boxProps = box && typeof box === 'object' ? box : {
48
49
  space
@@ -54,15 +55,24 @@ const getStackedContent = (children, _ref) => {
54
55
  const validChildren = _react.default.Children.toArray(topLevelChildren).filter(Boolean);
55
56
  const content = validChildren.reduce((newChildren, child, index) => {
56
57
  const boxID = `Stack-Box-${index}`;
57
- const item = box ?
58
- /*#__PURE__*/
59
- // If wrapped in Box, that Box needs a key.
60
- // If possible, use an existing content key; use an index-based key only if necessary.
61
- (0, _react.createElement)(_Box.Box, {
62
- ...boxProps,
63
- key: child.key || boxID,
64
- testID: boxID
65
- }, child) : child;
58
+ let item;
59
+ if (box) {
60
+ // If wrapped in Box, that Box needs a key.
61
+ // If possible, use an existing content key; use an index-based key only if necessary.
62
+ item = /*#__PURE__*/(0, _react.createElement)(_Box.Box, {
63
+ ...boxProps,
64
+ accessibilityRole: itemAccessibilityRole,
65
+ key: child.key || boxID,
66
+ testID: boxID
67
+ }, child);
68
+ } else if (itemAccessibilityRole) {
69
+ item = /*#__PURE__*/_react.default.cloneElement(child, {
70
+ accessibilityRole: itemAccessibilityRole,
71
+ key: child.key || boxID
72
+ });
73
+ } else {
74
+ item = child;
75
+ }
66
76
  if (!index || !space && !divider) return [...newChildren, item];
67
77
  const testID = `Stack-${divider ? 'Divider' : 'Spacer'}-${index}`;
68
78
  const commonProps = {
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import Animated from "react-native-web/dist/exports/Animated";
3
3
  import View from "react-native-web/dist/exports/View";
4
4
  import StyleSheet from "react-native-web/dist/exports/StyleSheet";
5
- import Text from "react-native-web/dist/exports/Text";
6
5
  import PropTypes from 'prop-types';
7
6
  import { a11yProps } from '../utils/props/a11yProps';
8
7
  import { getTokensPropType } from '../utils/props/tokens';
@@ -253,9 +252,10 @@ export const ActionCard = /*#__PURE__*/React.forwardRef((_ref1, ref) => {
253
252
  style: staticStyles.header,
254
253
  children: [/*#__PURE__*/_jsx(View, {
255
254
  style: [selectTitleStyles(themeTokens), staticStyles.title],
256
- children: /*#__PURE__*/_jsxs(Text, {
255
+ children: /*#__PURE__*/_jsxs(View, {
256
+ style: staticStyles.titleRow,
257
257
  children: [wrapStringsInText(title, {
258
- style: selectTitleTextStyles(themeTokens)
258
+ style: [selectTitleTextStyles(themeTokens), staticStyles.titleText]
259
259
  }), themeTokens.statusIcon && /*#__PURE__*/_jsx(View, {
260
260
  style: staticStyles.statusIcon,
261
261
  children: /*#__PURE__*/_jsx(Icon, {
@@ -344,6 +344,13 @@ const staticStyles = StyleSheet.create({
344
344
  title: {
345
345
  flexShrink: 1
346
346
  },
347
+ titleRow: {
348
+ flexDirection: 'row',
349
+ alignItems: 'center'
350
+ },
351
+ titleText: {
352
+ flexShrink: 1
353
+ },
347
354
  statusIcon: {
348
355
  marginLeft: 4
349
356
  }
@@ -80,10 +80,10 @@ const getInputProps = _ref3 => {
80
80
  *
81
81
  * ## Component API
82
82
  *
83
- * ### Background
83
+ * ### Style
84
84
  *
85
- * In order to control the background of a card, the following tokens are currently
86
- * supported:
85
+ * In order to control the style of a card, use the `style` variant.
86
+ * The following tokens are supported:
87
87
  *
88
88
  * - `backgroundColor`
89
89
  *