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

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 (82) hide show
  1. package/CHANGELOG.md +62 -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/Footnote/FootnoteLink.js +18 -17
  9. package/lib/cjs/InputSupports/InputSupports.js +1 -2
  10. package/lib/cjs/InputSupports/useInputSupports.js +1 -3
  11. package/lib/cjs/Link/ChevronLink.js +1 -2
  12. package/lib/cjs/Notification/Notification.js +4 -12
  13. package/lib/cjs/Progress/Progress.js +30 -5
  14. package/lib/cjs/Progress/ProgressBar.js +3 -3
  15. package/lib/cjs/Progress/ProgressBarBackground.js +2 -3
  16. package/lib/cjs/QuickLinks/QuickLinks.js +7 -0
  17. package/lib/cjs/Scroll/Scroll.js +472 -0
  18. package/lib/cjs/Scroll/ScrollContext.js +55 -0
  19. package/lib/cjs/Scroll/ScrollItem.js +106 -0
  20. package/lib/cjs/Scroll/ScrollProgress.js +100 -0
  21. package/lib/cjs/Scroll/dictionary.js +18 -0
  22. package/lib/cjs/StackView/StackWrapBox.js +9 -1
  23. package/lib/cjs/StackView/StackWrapGap.js +3 -1
  24. package/lib/cjs/StackView/getStackedContent.js +20 -10
  25. package/lib/cjs/index.js +14 -0
  26. package/lib/cjs/utils/animation/useAnimatedValue.js +46 -0
  27. package/lib/cjs/utils/children.js +2 -1
  28. package/lib/esm/ActionCard/ActionCard.js +10 -3
  29. package/lib/esm/Card/Card.js +3 -3
  30. package/lib/esm/Carousel/Carousel.js +6 -1
  31. package/lib/esm/Carousel/CarouselThumbnail.js +126 -34
  32. package/lib/esm/Carousel/CarouselThumbnailNavigation.js +8 -1
  33. package/lib/esm/Footnote/FootnoteLink.js +18 -17
  34. package/lib/esm/InputSupports/InputSupports.js +1 -2
  35. package/lib/esm/InputSupports/useInputSupports.js +1 -3
  36. package/lib/esm/Link/ChevronLink.js +1 -2
  37. package/lib/esm/Notification/Notification.js +4 -12
  38. package/lib/esm/Progress/Progress.js +30 -5
  39. package/lib/esm/Progress/ProgressBar.js +3 -3
  40. package/lib/esm/Progress/ProgressBarBackground.js +2 -3
  41. package/lib/esm/QuickLinks/QuickLinks.js +7 -0
  42. package/lib/esm/Scroll/Scroll.js +465 -0
  43. package/lib/esm/Scroll/ScrollContext.js +46 -0
  44. package/lib/esm/Scroll/ScrollItem.js +100 -0
  45. package/lib/esm/Scroll/ScrollProgress.js +93 -0
  46. package/lib/esm/Scroll/dictionary.js +12 -0
  47. package/lib/esm/StackView/StackWrapBox.js +9 -1
  48. package/lib/esm/StackView/StackWrapGap.js +3 -1
  49. package/lib/esm/StackView/getStackedContent.js +20 -10
  50. package/lib/esm/index.js +2 -0
  51. package/lib/esm/utils/animation/useAnimatedValue.js +38 -0
  52. package/lib/esm/utils/children.js +2 -1
  53. package/lib/package.json +2 -2
  54. package/package.json +2 -2
  55. package/src/ActionCard/ActionCard.jsx +13 -4
  56. package/src/Card/Card.jsx +3 -3
  57. package/src/Carousel/Carousel.jsx +6 -1
  58. package/src/Carousel/CarouselThumbnail.jsx +117 -30
  59. package/src/Carousel/CarouselThumbnailNavigation.jsx +8 -2
  60. package/src/Footnote/FootnoteLink.jsx +17 -12
  61. package/src/InputSupports/InputSupports.jsx +1 -6
  62. package/src/InputSupports/useInputSupports.js +1 -1
  63. package/src/Link/ChevronLink.jsx +1 -2
  64. package/src/Notification/Notification.jsx +5 -21
  65. package/src/Progress/Progress.jsx +22 -3
  66. package/src/Progress/ProgressBar.jsx +3 -3
  67. package/src/Progress/ProgressBarBackground.jsx +2 -3
  68. package/src/QuickLinks/QuickLinks.jsx +8 -0
  69. package/src/Scroll/Scroll.jsx +483 -0
  70. package/src/Scroll/ScrollContext.jsx +39 -0
  71. package/src/Scroll/ScrollItem.jsx +87 -0
  72. package/src/Scroll/ScrollProgress.jsx +74 -0
  73. package/src/Scroll/dictionary.js +12 -0
  74. package/src/StackView/StackWrapBox.jsx +13 -1
  75. package/src/StackView/StackWrapGap.jsx +2 -1
  76. package/src/StackView/getStackedContent.jsx +22 -8
  77. package/src/index.js +2 -0
  78. package/src/utils/animation/useAnimatedValue.js +35 -0
  79. package/src/utils/children.jsx +4 -1
  80. package/types/Link.d.ts +1 -2
  81. package/types/Scroll.d.ts +66 -0
  82. package/types/index.d.ts +9 -0
package/CHANGELOG.md CHANGED
@@ -1,23 +1,79 @@
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, 17 Apr 2026 23:54:32 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.2
8
+
9
+ Fri, 17 Apr 2026 23:54:32 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `Scroll`: add component (guillermo.peitzner@telus.com)
14
+ - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.2
15
+
16
+ ### Patches
17
+
18
+ - `FootnoteLink`: fixed superscript text positioning on native to correctly align with surrounding text (josue.higueroscalderon@telus.com)
19
+
20
+ ## 3.30.0
21
+
22
+ Thu, 16 Apr 2026 21:04:33 GMT
8
23
 
9
- Fri, 20 Mar 2026 02:26:39 GMT
24
+ ### Minor changes
25
+
26
+ - `Carousel`: Add `isVideo` prop to thumbnail navigation to display a play icon overlay on video thumbnails (josue.higueros@telus.com)
27
+ - `Scroll`: add component (guillermo.peitzner@telus.com)
28
+ - Bump @telus-uds/system-theme-tokens to v4.21.0
29
+
30
+ ### Patches
31
+
32
+ - `FootnoteLink`: fixed superscript text positioning on native to correctly align with surrounding text (josue.higueroscalderon@telus.com)
33
+
34
+ ## 4.0.0-alpha.1
35
+
36
+ Fri, 10 Apr 2026 17:20:02 GMT
10
37
 
11
38
  ### Major changes
12
39
 
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
40
+ - `Notification`: remove system prop (guillermo.peitzner@telus.com)
41
+ - `Card`: remove background variant and set style as default (sergio.ramirez@telus.com)
42
+ - `Link`: deprecate alternative and inverse variants (guillermo.peitzner@telus.com)
43
+ - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.1
44
+
45
+ ### Minor changes
46
+
47
+ - `Carousel`: Add `isVideo` prop to thumbnail navigation to display a play icon overlay on video thumbnails (josue.higueros@telus.com)
16
48
 
17
49
  ### Patches
18
50
 
19
51
  - `Modal`: Fix onPress error when backgroundDismissible is false (david.melara1@telus.com)
52
+ - `QuickLinks`: Add `listitem` role to item wrappers on web in button mode for proper ARIA semantics. (sergio.ramirez@telus.com)
53
+ - `TextInput`: Include hint and feedback in the describedBy prop (david.melara1@telus.com)
54
+ - `ActionCard`: fix mobile spacing (guillermo.peitzner@telus.com)
55
+ - `ExpandCollapse`: columnwrap example fixed in mobile (josue.higueroscalderon@telus.com)
56
+
57
+ ## 3.29.1
58
+
59
+ Mon, 06 Apr 2026 21:25:55 GMT
60
+
61
+ ### Patches
62
+
20
63
  - `ExpandCollapse`: columnwrap example fixed in mobile (josue.higueroscalderon@telus.com)
64
+ - `Modal`: Fix onPress error when backgroundDismissible is false (david.melara1@telus.com)
65
+ - `QuickLinks`: Add `listitem` role to item wrappers on web in button mode for proper ARIA semantics. (sergio.ramirez@telus.com)
66
+ - `TextInput`: Include hint and feedback in the describedBy prop (david.melara1@telus.com)
67
+
68
+ ## 4.0.0-alpha.0
69
+
70
+ Fri, 20 Mar 2026 00:57:30 GMT
71
+
72
+ ### Major changes
73
+
74
+ - Upgrade to React 19 and other major changes, please refer to the changelog for more details (shahzaibkhalidmalik@outlook.com)
75
+ - Bump @telus-uds/system-constants to v4.0.0-alpha.0
76
+ - Bump @telus-uds/system-theme-tokens to v5.0.0-alpha.0
21
77
 
22
78
  ## 3.29.0
23
79
 
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
  };
@@ -22,28 +22,28 @@ var _useThemeTokens = require("../ThemeProvider/useThemeTokens");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
24
24
  const [selectProps, selectedSystemPropTypes] = (0, _selectSystemProps.selectSystemProps)([_htmlAttrs.htmlAttrs, _viewProps.viewProps]);
25
-
26
- // The top property varies between devices due to how devices render the viewport.
25
+ const HALF_FONT_SIZE = 2;
26
+ const QUARTER_FONT_SIZE = 4;
27
+ const DEFAULT_LINE_HEIGHT = 1;
28
+ const LINE_HEIGHT_MULTIPLIER = 2;
27
29
  const selectTextStyle = _ref => {
28
30
  let {
29
31
  fontSize,
30
32
  lineHeight
31
33
  } = _ref;
32
- return {
33
- fontSize,
34
- lineHeight: lineHeight !== 1 ? lineHeight : fontSize * 2,
35
- ..._Platform.default.select({
36
- ios: {
37
- top: -fontSize / 2
38
- },
39
- android: {
40
- top: fontSize / 4
41
- },
42
- web: {
43
- top: -fontSize / 2.8
44
- }
45
- })
46
- };
34
+ return _Platform.default.select({
35
+ native: {
36
+ fontSize: fontSize / HALF_FONT_SIZE,
37
+ lineHeight: fontSize,
38
+ position: 'relative',
39
+ top: -(fontSize * lineHeight) / HALF_FONT_SIZE
40
+ },
41
+ web: {
42
+ fontSize,
43
+ lineHeight: lineHeight !== DEFAULT_LINE_HEIGHT ? lineHeight : fontSize * LINE_HEIGHT_MULTIPLIER,
44
+ top: -fontSize / QUARTER_FONT_SIZE
45
+ }
46
+ });
47
47
  };
48
48
  const FootnoteLink = exports.FootnoteLink = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
49
49
  let {
@@ -87,6 +87,7 @@ const FootnoteLink = exports.FootnoteLink = /*#__PURE__*/_react.default.forwardR
87
87
  });
88
88
  });
89
89
  FootnoteLink.displayName = 'FootnoteLink';
90
+ FootnoteLink.__UDS_COMPONENT_NAME__ = 'FootnoteLink';
90
91
  const copyShape = _propTypes.default.shape({
91
92
  a11yLabel: _propTypes.default.string.isRequired
92
93
  });
@@ -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
  */
@@ -19,6 +19,8 @@ var _ProgressContext = require("./ProgressContext");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
20
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
21
  const [selectProps, selectedSystemPropTypes] = (0, _selectSystemProps.selectSystemProps)([_a11yProps.a11yProps, _viewProps.viewProps]);
22
+ const BORDER_SIDES = 2;
23
+ const CENTER_DIVISOR = 2;
22
24
  const selectProgressStyles = _ref => {
23
25
  let {
24
26
  backgroundColor,
@@ -37,6 +39,21 @@ const selectProgressStyles = _ref => {
37
39
  ...(0, _styles.applyShadowToken)(shadow)
38
40
  };
39
41
  };
42
+ const selectBarWrapperStyles = _ref2 => {
43
+ let {
44
+ barHeight,
45
+ borderRadius,
46
+ borderWidth,
47
+ height
48
+ } = _ref2;
49
+ return {
50
+ height: barHeight,
51
+ width: '100%',
52
+ position: 'absolute',
53
+ top: (height - borderWidth * BORDER_SIDES - barHeight) / CENTER_DIVISOR,
54
+ borderRadius
55
+ };
56
+ };
40
57
 
41
58
  /**
42
59
  * The `Progress` is a container for displaying one or several `ProgressBar`s.
@@ -50,10 +67,11 @@ const selectProgressStyles = _ref => {
50
67
  *
51
68
  * - Use the following tokens to customize the appearance:
52
69
  * - `backgroundColor` for the background color of the progress container,
70
+ * - `barHeight` to control the height of the progress bars displayed within the container,
53
71
  * - `borderColor` to control the color of the border,
54
72
  * - `borderRadius` for the rounded corners,
55
73
  * - `borderWidth` to change the border width.
56
- * - `height` to control the height of the progress bars displayed within the progress bar container.
74
+ * - `height` to control the height of the progress bar container.
57
75
  * - `shadow` to apply a box shadow to the progress bar container.
58
76
  *
59
77
  * ## Variants
@@ -74,16 +92,23 @@ const selectProgressStyles = _ref => {
74
92
  * role.
75
93
  *
76
94
  */
77
- const Progress = exports.Progress = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
95
+ const Progress = exports.Progress = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
78
96
  let {
79
97
  children,
80
98
  tokens,
81
99
  variant,
82
100
  ...rest
83
- } = _ref2;
101
+ } = _ref3;
84
102
  const themeTokens = (0, _useThemeTokens.useThemeTokens)('Progress', tokens, variant);
85
- // Default to false (vertical layout) to preserve existing behavior and avoid breaking changes
86
103
  const layers = variant?.layers ?? false;
104
+ const {
105
+ barHeight,
106
+ height
107
+ } = themeTokens;
108
+ const content = barHeight && barHeight !== height ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
109
+ style: selectBarWrapperStyles(themeTokens),
110
+ children: children
111
+ }) : children;
87
112
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressContext.ProgressContext.Provider, {
88
113
  value: {
89
114
  layers
@@ -92,7 +117,7 @@ const Progress = exports.Progress = /*#__PURE__*/_react.default.forwardRef((_ref
92
117
  ref: ref,
93
118
  style: [staticStyles.progressContainer, selectProgressStyles(themeTokens)],
94
119
  ...selectProps(rest),
95
- children: children
120
+ children: content
96
121
  })
97
122
  });
98
123
  });
@@ -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;