@telus-uds/components-base 3.18.0 → 3.19.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/jest.config.cjs +10 -2
  3. package/lib/cjs/Box/Box.js +114 -62
  4. package/lib/cjs/Box/backgroundImageStylesMap.js +136 -28
  5. package/lib/cjs/Carousel/Carousel.js +1 -1
  6. package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +2 -2
  7. package/lib/cjs/StepTracker/Step.js +12 -1
  8. package/lib/cjs/StepTracker/StepTracker.js +15 -4
  9. package/lib/cjs/TabBar/TabBar.js +4 -2
  10. package/lib/cjs/TabBar/index.js +2 -0
  11. package/lib/cjs/Tooltip/Backdrop.js +1 -1
  12. package/lib/cjs/utils/index.js +9 -1
  13. package/lib/cjs/utils/isTouchDevice.js +34 -0
  14. package/lib/esm/Box/Box.js +113 -63
  15. package/lib/esm/Box/backgroundImageStylesMap.js +134 -27
  16. package/lib/esm/Carousel/Carousel.js +2 -2
  17. package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +2 -2
  18. package/lib/esm/StepTracker/Step.js +12 -1
  19. package/lib/esm/StepTracker/StepTracker.js +15 -4
  20. package/lib/esm/TabBar/TabBar.js +4 -2
  21. package/lib/esm/TabBar/index.js +2 -0
  22. package/lib/esm/Tooltip/Backdrop.js +1 -1
  23. package/lib/esm/utils/index.js +2 -1
  24. package/lib/esm/utils/isTouchDevice.js +27 -0
  25. package/lib/package.json +2 -2
  26. package/package.json +2 -2
  27. package/src/Box/Box.jsx +97 -55
  28. package/src/Box/backgroundImageStylesMap.js +48 -15
  29. package/src/Carousel/Carousel.jsx +3 -2
  30. package/src/MultiSelectFilter/MultiSelectFilter.jsx +2 -2
  31. package/src/StepTracker/Step.jsx +47 -27
  32. package/src/StepTracker/StepTracker.jsx +9 -1
  33. package/src/TabBar/TabBar.jsx +3 -1
  34. package/src/TabBar/index.js +3 -0
  35. package/src/Tooltip/Backdrop.jsx +1 -1
  36. package/src/utils/index.js +1 -0
  37. package/src/utils/isTouchDevice.js +34 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,25 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Tue, 16 Sep 2025 21:19:36 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 03 Oct 2025 20:34:06 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 3.19.0
8
+
9
+ Fri, 03 Oct 2025 20:34:06 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `Carousel`: add swipe functionality to MD viewport (guillermo.peitzner@telus.com)
14
+ - `MultiSelectFilter`: add documentation for JSX usage in `subtitle` prop (oscar.palencia@telus.com)
15
+ - `StepTracker`: add style bar variant (guillermo.peitzner@telus.com)
16
+ - Bump @telus-uds/system-theme-tokens to v4.15.0
17
+
18
+ ### Patches
19
+
20
+ - `TabBar`: fix item token management (guillermo.peitzner@telus.com)
21
+ - `Box`: fix background image contain position (guillermo.peitzner@telus.com)
22
+
7
23
  ## 3.18.0
8
24
 
9
25
  Tue, 16 Sep 2025 21:19:36 GMT
package/jest.config.cjs CHANGED
@@ -29,12 +29,20 @@ module.exports = {
29
29
  ],
30
30
  cacheDirectory: '.cache/jest-cache-react-17',
31
31
  moduleNameMapper: {
32
- '.+\\.(otf|svg|png|jpg)$': 'identity-obj-proxy'
32
+ '.+\\.(otf|svg|png|jpg)$': 'identity-obj-proxy',
33
+ '^@telus-uds/system-constants$': '<rootDir>/../system-constants/src',
34
+ '^@telus-uds/system-theme-tokens$': '<rootDir>/../system-theme-tokens/src'
33
35
  },
34
36
  testMatch: [`<rootDir>/__tests__/**/*.test.js?(x)`],
35
37
  transformIgnorePatterns: [
36
38
  'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|react-native-web|@react-native-picker)'
37
39
  ],
38
- // Count everything in src when calculating coverage
40
+ // Count everything in src when calculating coverage,
41
+ coveragePathIgnorePatterns: [
42
+ '/node_modules/',
43
+ '/packages/palette-allium/build/'
44
+ // '/@telus-uds/palette-allium',
45
+ // '/@telus-uds/palette-allium/build/rn/icons/, /@telus-uds/palette-allium/build/web/icons/'
46
+ ],
39
47
  collectCoverageFrom: ['src/**/*.{js,jsx}']
40
48
  }
@@ -14,9 +14,11 @@ var _ImageBackground = _interopRequireDefault(require("react-native-web/dist/cjs
14
14
  var _Image = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Image"));
15
15
  var _ThemeProvider = require("../ThemeProvider");
16
16
  var _utils = require("../utils");
17
- var _backgroundImageStylesMap = _interopRequireDefault(require("./backgroundImageStylesMap"));
17
+ var _backgroundImageStylesMap = _interopRequireWildcard(require("./backgroundImageStylesMap"));
18
18
  var _ViewportProvider = require("../ViewportProvider");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
22
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
23
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
22
24
 
@@ -75,39 +77,51 @@ const setBackgroundImage = _ref2 => {
75
77
  backgroundImageResizeMode,
76
78
  backgroundImagePosition,
77
79
  backgroundImageAlign,
78
- backgroundImageWidth,
79
- backgroundImageHeight,
80
- content
80
+ content,
81
+ testID
81
82
  } = _ref2;
82
- if (backgroundImageResizeMode === 'contain') {
83
- const containedViewStyle = {
84
- ...staticStyles.containedView,
85
- width: backgroundImageWidth,
86
- height: backgroundImageHeight,
87
- ..._backgroundImageStylesMap.default[`${backgroundImagePosition}-${backgroundImageAlign}`]
88
- };
83
+ const backgroundImageTestID = testID ? `${testID}-background-image` : undefined;
84
+ if (backgroundImageResizeMode === 'contain' && backgroundImagePosition && backgroundImageAlign) {
85
+ const positionKey = `${backgroundImagePosition}-${backgroundImageAlign}`;
86
+ if (_Platform.default.OS === 'web') {
87
+ const backgroundPosition = _backgroundImageStylesMap.backgroundPositions[positionKey] || 'center center';
88
+ const backgroundImageStyle = {
89
+ backgroundImage: `url(${src})`,
90
+ backgroundSize: 'contain',
91
+ backgroundRepeat: 'no-repeat',
92
+ backgroundPosition
93
+ };
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
95
+ style: [staticStyles.imageBackground, backgroundImageStyle],
96
+ "aria-label": alt,
97
+ testID: backgroundImageTestID,
98
+ children: content
99
+ });
100
+ }
101
+ const positionStyles = _backgroundImageStylesMap.default[positionKey] || {};
89
102
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
90
- style: staticStyles.containedContainer,
91
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
92
- style: containedViewStyle,
93
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
94
- source: {
95
- uri: src
96
- },
97
- alt: alt,
98
- style: staticStyles.containedImage,
99
- accessibilityIgnoresInvertColors: true
100
- })
101
- }), content]
103
+ style: staticStyles.containContainer,
104
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
105
+ source: src,
106
+ resizeMode: backgroundImageResizeMode,
107
+ style: [staticStyles.containImage, positionStyles],
108
+ accessible: true,
109
+ accessibilityLabel: alt,
110
+ accessibilityIgnoresInvertColors: true,
111
+ testID: backgroundImageTestID
112
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
113
+ style: staticStyles.contentOverlay,
114
+ children: content
115
+ })]
102
116
  });
103
117
  }
104
118
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageBackground.default, {
105
- source: {
106
- uri: src
107
- },
108
- alt: alt,
109
- style: staticStyles.backgroundImageContainer,
119
+ source: src,
110
120
  resizeMode: backgroundImageResizeMode,
121
+ style: staticStyles.imageBackground,
122
+ accessible: true,
123
+ accessibilityLabel: alt,
124
+ testID: backgroundImageTestID,
111
125
  children: content
112
126
  });
113
127
  };
@@ -264,31 +278,61 @@ const Box = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
264
278
  align = ''
265
279
  } = backgroundImage || {};
266
280
  const backgroundImageResizeMode = (0, _utils.useResponsiveProp)(resizeMode, 'cover');
267
- const backgroundImagePosition = (0, _utils.useResponsiveProp)(position, 'none');
268
- const backgroundImageAlign = (0, _utils.useResponsiveProp)(align, 'stretch');
269
- const [backgroundImageWidth, setBackgroundImageWidth] = _react.default.useState(0);
270
- const [backgroundImageHeight, setBackgroundImageHeight] = _react.default.useState(0);
271
- if (backgroundImage) content = setBackgroundImage({
272
- src,
273
- alt,
274
- backgroundImageResizeMode,
275
- backgroundImagePosition,
276
- backgroundImageAlign,
277
- backgroundImageWidth,
278
- backgroundImageHeight,
279
- content
280
- });
281
- _react.default.useEffect(() => {
282
- if (backgroundImage && backgroundImageWidth === 0 && backgroundImageHeight === 0) {
283
- _Image.default.getSize(src, (width, height) => {
284
- // Only update the state if the size has changed
285
- if (width !== backgroundImageWidth || height !== backgroundImageHeight) {
286
- setBackgroundImageWidth(width);
287
- setBackgroundImageHeight(height);
288
- }
281
+ const backgroundImagePosition = (0, _utils.useResponsiveProp)(position);
282
+ const backgroundImageAlign = (0, _utils.useResponsiveProp)(align);
283
+ const imageSourceViewport = (0, _utils.formatImageSource)((0, _utils.useResponsiveProp)(src));
284
+ if (backgroundImage && src) {
285
+ const {
286
+ paddingTop,
287
+ paddingBottom,
288
+ paddingLeft,
289
+ paddingRight,
290
+ ...containerStyle
291
+ } = boxStyles;
292
+ const hasPadding = paddingTop || paddingBottom || paddingLeft || paddingRight;
293
+ const paddedContent = hasPadding ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
294
+ style: {
295
+ paddingTop,
296
+ paddingBottom,
297
+ paddingLeft,
298
+ paddingRight
299
+ },
300
+ children: children
301
+ }) : children;
302
+ content = setBackgroundImage({
303
+ src: imageSourceViewport,
304
+ alt,
305
+ backgroundImageResizeMode,
306
+ backgroundImagePosition,
307
+ backgroundImageAlign,
308
+ content: paddedContent,
309
+ testID
310
+ });
311
+ const dataSetValue = boxMediaIds ? {
312
+ media: boxMediaIds,
313
+ ...dataSet
314
+ } : dataSet;
315
+ if (scroll) {
316
+ const scrollProps = typeof scroll === 'object' ? scroll : {};
317
+ scrollProps.contentContainerStyle = [containerStyle, scrollProps.contentContainerStyle];
318
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScrollView.default, {
319
+ ...scrollProps,
320
+ ...props,
321
+ testID: testID,
322
+ dataSet: dataSetValue,
323
+ ref: ref,
324
+ children: content
289
325
  });
290
326
  }
291
- }, [backgroundImage, backgroundImageWidth, backgroundImageHeight, src]);
327
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
328
+ ...props,
329
+ style: containerStyle,
330
+ testID: testID,
331
+ dataSet: dataSetValue,
332
+ ref: ref,
333
+ children: content
334
+ });
335
+ }
292
336
  const dataSetValue = boxMediaIds ? {
293
337
  media: boxMediaIds,
294
338
  ...dataSet
@@ -401,10 +445,12 @@ Box.propTypes = {
401
445
  */
402
446
  customGradient: _propTypes.default.func,
403
447
  /**
404
- * Use this prop to add a background image to the box.
448
+ * Apply background image to the box.
405
449
  */
406
450
  backgroundImage: _propTypes.default.shape({
407
- src: _propTypes.default.string.isRequired,
451
+ // The image src is either a URI string or a number (when a local image src is bundled in IOS or Android app)
452
+ // src is an object when used responsively to provide different image sources for different screen sizes
453
+ src: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.object]).isRequired,
408
454
  alt: _propTypes.default.string,
409
455
  resizeMode: _utils.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(['cover', 'contain', 'stretch', 'repeat', 'center'])),
410
456
  position: _utils.responsiveProps.getTypeOptionallyByViewport(_propTypes.default.oneOf(['none', 'bottom', 'left', 'right', 'top'])),
@@ -413,18 +459,24 @@ Box.propTypes = {
413
459
  };
414
460
  var _default = exports.default = Box;
415
461
  const staticStyles = _StyleSheet.default.create({
416
- backgroundImageContainer: {
417
- flex: 1
462
+ imageBackground: {
463
+ width: '100%',
464
+ height: '100%'
418
465
  },
419
- containedContainer: {
420
- flex: 1,
421
- overflow: 'hidden'
466
+ contentOverlay: {
467
+ position: 'relative',
468
+ width: '100%',
469
+ height: '100%',
470
+ zIndex: 1
422
471
  },
423
- containedView: {
424
- zIndex: -1,
425
- position: 'absolute'
472
+ containContainer: {
473
+ width: '100%',
474
+ height: '100%',
475
+ overflow: 'hidden',
476
+ position: 'relative'
426
477
  },
427
- containedImage: {
478
+ containImage: {
479
+ position: 'absolute',
428
480
  width: '100%',
429
481
  height: '100%'
430
482
  }
@@ -3,15 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
7
- var _default = exports.default = {
6
+ exports.default = exports.backgroundPositions = void 0;
7
+ var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const webStyles = {
8
10
  'top-start': {
9
- top: 0
11
+ top: 0,
12
+ left: 0
10
13
  },
11
14
  'top-center': {
12
- left: 0,
13
- right: 0,
14
- marginHorizontal: 'auto'
15
+ top: 0,
16
+ left: '50%',
17
+ transform: [{
18
+ translateX: '-50%'
19
+ }]
15
20
  },
16
21
  'top-end': {
17
22
  top: 0,
@@ -22,60 +27,160 @@ var _default = exports.default = {
22
27
  right: 0
23
28
  },
24
29
  'left-start': {
25
- top: 0
30
+ top: 0,
31
+ left: 0
26
32
  },
27
33
  'left-center': {
28
- top: 0,
34
+ top: '50%',
35
+ left: 0,
36
+ transform: [{
37
+ translateY: '-50%'
38
+ }]
39
+ },
40
+ 'right-center': {
41
+ top: '50%',
42
+ right: 0,
43
+ transform: [{
44
+ translateY: '-50%'
45
+ }]
46
+ },
47
+ 'bottom-start': {
48
+ bottom: 0,
49
+ left: 0
50
+ },
51
+ 'left-end': {
52
+ bottom: 0,
53
+ left: 0
54
+ },
55
+ 'bottom-center': {
56
+ bottom: 0,
57
+ left: '50%',
58
+ transform: [{
59
+ translateX: '-50%'
60
+ }]
61
+ },
62
+ 'bottom-end': {
29
63
  bottom: 0,
30
- marginVertical: 'auto'
64
+ right: 0
65
+ },
66
+ 'right-end': {
67
+ bottom: 0,
68
+ right: 0
31
69
  },
32
- 'none-start': {
70
+ 'top-stretch': {
71
+ top: 0,
72
+ left: 0,
73
+ right: 0,
74
+ width: '100%'
75
+ },
76
+ 'left-stretch': {
33
77
  top: 0,
34
78
  bottom: 0,
35
- marginVertical: 'auto'
79
+ left: 0,
80
+ height: '100%'
36
81
  },
37
- 'none-center': {
82
+ 'right-stretch': {
38
83
  top: 0,
84
+ bottom: 0,
85
+ right: 0,
86
+ height: '100%'
87
+ },
88
+ 'bottom-stretch': {
39
89
  bottom: 0,
40
90
  left: 0,
41
91
  right: 0,
42
- margin: 'auto'
92
+ width: '100%'
93
+ }
94
+ };
95
+ const webBackgroundPositions = {
96
+ 'top-start': 'left top',
97
+ 'top-center': 'center top',
98
+ 'top-end': 'right top',
99
+ 'bottom-start': 'left bottom',
100
+ 'bottom-center': 'center bottom',
101
+ 'bottom-end': 'right bottom',
102
+ 'left-center': 'left center',
103
+ 'right-center': 'right center'
104
+ };
105
+ const nativeStyles = {
106
+ 'top-start': {
107
+ top: 0,
108
+ left: 0,
109
+ width: 150,
110
+ height: 200
43
111
  },
44
- 'right-center': {
112
+ 'top-center': {
113
+ top: 0,
114
+ left: '50%',
115
+ marginLeft: -75,
116
+ width: 150,
117
+ height: 200
118
+ },
119
+ 'top-end': {
45
120
  top: 0,
46
- bottom: 0,
47
121
  right: 0,
48
- marginVertical: 'auto'
122
+ width: 150,
123
+ height: 200
49
124
  },
50
- 'none-end': {
125
+ 'right-start': {
51
126
  top: 0,
52
- bottom: 0,
53
127
  right: 0,
54
- marginVertical: 'auto'
128
+ width: 150,
129
+ height: 200
130
+ },
131
+ 'left-start': {
132
+ top: 0,
133
+ left: 0,
134
+ width: 150,
135
+ height: 200
136
+ },
137
+ 'left-center': {
138
+ left: 0,
139
+ top: '50%',
140
+ marginTop: -100,
141
+ width: 150,
142
+ height: 200
143
+ },
144
+ 'right-center': {
145
+ right: 0,
146
+ top: '50%',
147
+ marginTop: -100,
148
+ width: 150,
149
+ height: 200
55
150
  },
56
151
  'bottom-start': {
57
152
  bottom: 0,
58
- left: 0
153
+ left: 0,
154
+ width: 150,
155
+ height: 200
59
156
  },
60
157
  'left-end': {
61
158
  bottom: 0,
62
- left: 0
159
+ left: 0,
160
+ width: 150,
161
+ height: 200
63
162
  },
64
163
  'bottom-center': {
65
- left: 0,
66
- right: 0,
67
164
  bottom: 0,
68
- marginHorizontal: 'auto'
165
+ left: '50%',
166
+ marginLeft: -75,
167
+ width: 150,
168
+ height: 200
69
169
  },
70
170
  'bottom-end': {
171
+ bottom: 0,
71
172
  right: 0,
72
- bottom: 0
173
+ width: 150,
174
+ height: 200
73
175
  },
74
176
  'right-end': {
177
+ bottom: 0,
75
178
  right: 0,
76
- bottom: 0
179
+ width: 150,
180
+ height: 200
77
181
  },
78
182
  'top-stretch': {
183
+ top: 0,
79
184
  left: 0,
80
185
  right: 0,
81
186
  width: '100%'
@@ -83,6 +188,7 @@ var _default = exports.default = {
83
188
  'left-stretch': {
84
189
  top: 0,
85
190
  bottom: 0,
191
+ left: 0,
86
192
  height: '100%'
87
193
  },
88
194
  'right-stretch': {
@@ -92,9 +198,11 @@ var _default = exports.default = {
92
198
  height: '100%'
93
199
  },
94
200
  'bottom-stretch': {
201
+ bottom: 0,
95
202
  left: 0,
96
203
  right: 0,
97
- bottom: 0,
98
204
  width: '100%'
99
205
  }
100
- };
206
+ };
207
+ const backgroundPositions = exports.backgroundPositions = _Platform.default.OS === 'web' ? webBackgroundPositions : {};
208
+ var _default = exports.default = _Platform.default.OS === 'web' ? webStyles : nativeStyles;
@@ -724,7 +724,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
724
724
  return false;
725
725
  }
726
726
  if (_Platform.default.OS === 'web') {
727
- return !!(viewport === 'xs' || viewport === 'sm');
727
+ return !!(viewport === 'xs' || viewport === 'sm' || viewport === 'md' && (0, _utils.isTouchDevice)());
728
728
  }
729
729
  return true;
730
730
  }, [viewport, totalItems]);
@@ -489,9 +489,9 @@ MultiSelectFilter.propTypes = {
489
489
  */
490
490
  label: _propTypes.default.string.isRequired,
491
491
  /**
492
- * The text for the subtitle
492
+ * The text for the subtitle. Can also be JSX.
493
493
  */
494
- subtitle: _propTypes.default.string,
494
+ subtitle: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
495
495
  /**
496
496
  * An optional unique string may be provided to identify the ButtonDropdown.
497
497
  * If not provided, the label is used.
@@ -157,6 +157,13 @@ const getStepTestID = (isCompleted, isCurrent) => {
157
157
  }
158
158
  return testID;
159
159
  };
160
+ const selectBarContainerStyles = (themeTokens, isCompleted, isCurrent) => ({
161
+ backgroundColor: isCompleted ? themeTokens.barCompletedBackgroundColor : themeTokens.barBackgroundColor,
162
+ height: themeTokens.barHeight,
163
+ ...(isCurrent && {
164
+ backgroundColor: themeTokens.barCurrentBackgroundColor
165
+ })
166
+ });
160
167
 
161
168
  /**
162
169
  * A single step of a StepTracker.
@@ -169,6 +176,7 @@ const Step = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
169
176
  stepCount = 0,
170
177
  stepIndex = 0,
171
178
  tokens,
179
+ isBarVariant,
172
180
  ...rest
173
181
  } = _ref8;
174
182
  const {
@@ -197,7 +205,10 @@ const Step = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
197
205
  accessibilityCurrent: status === stepIndex,
198
206
  ref: ref,
199
207
  ...selectProps(rest),
200
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
208
+ children: [isBarVariant && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
209
+ style: selectBarContainerStyles(themeTokens, isCompleted, isCurrent),
210
+ testID: getStepTestID(isCompleted, isCurrent)
211
+ }), !isBarVariant && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
201
212
  direction: "row",
202
213
  space: 0,
203
214
  tokens: {
@@ -19,6 +19,7 @@ var _Step = _interopRequireDefault(require("./Step"));
19
19
  var _dictionary = _interopRequireDefault(require("./dictionary"));
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ const STYLE_BAR_VARIANT = 'bar';
22
23
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
23
24
  const selectContainerStyles = _ref => {
24
25
  let {
@@ -59,6 +60,14 @@ const selectStepTrackerLabelStyles = (_ref3, themeOptions) => {
59
60
  themeOptions
60
61
  });
61
62
  };
63
+ const selectStepsContainerStyles = _ref4 => {
64
+ let {
65
+ barGap
66
+ } = _ref4;
67
+ return {
68
+ gap: barGap
69
+ };
70
+ };
62
71
 
63
72
  /**
64
73
  * StepTracker component shows the current position in a sequence of steps.
@@ -92,7 +101,7 @@ const selectStepTrackerLabelStyles = (_ref3, themeOptions) => {
92
101
  * - `accessibilityValue.text` (`aria-valuetext`): `<Current Step Label>`,
93
102
  *
94
103
  */
95
- const StepTracker = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
104
+ const StepTracker = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
96
105
  let {
97
106
  current = 0,
98
107
  copy = 'en',
@@ -101,7 +110,8 @@ const StepTracker = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
101
110
  tokens,
102
111
  variant,
103
112
  ...rest
104
- } = _ref4;
113
+ } = _ref5;
114
+ const isBarVariant = variant?.style === STYLE_BAR_VARIANT;
105
115
  const viewport = (0, _ViewportProvider.useViewport)();
106
116
  const {
107
117
  showStepTrackerLabel,
@@ -147,7 +157,7 @@ const StepTracker = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
147
157
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StackView.default, {
148
158
  space: 0,
149
159
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
150
- style: staticStyles.stepsContainer,
160
+ style: [staticStyles.stepsContainer, selectStepsContainerStyles(themeTokens)],
151
161
  accessibilityRole: stepsContainerAccessibilityRole,
152
162
  children: steps.map((label, index) => {
153
163
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Step.default, {
@@ -158,7 +168,8 @@ const StepTracker = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
158
168
  stepCount: steps.length,
159
169
  tokens: themeTokens,
160
170
  accessibilityRole: stepAccessibilityRole,
161
- accessibilityCurrent: current === index && _Platform.default.OS === 'web' && 'step'
171
+ accessibilityCurrent: current === index && _Platform.default.OS === 'web' && 'step',
172
+ isBarVariant: isBarVariant
162
173
  }, label);
163
174
  })
164
175
  }), showStepTrackerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
@@ -91,7 +91,8 @@ const TabBar = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
91
91
  iconActive: item.iconActive,
92
92
  onPress: () => handlePress(item.id),
93
93
  id: `tab-item-${index}`,
94
- accessibilityRole: "tablist"
94
+ accessibilityRole: "tablist",
95
+ tokens: item.tokens
95
96
  }, item.id))
96
97
  })
97
98
  });
@@ -105,7 +106,8 @@ TabBar.propTypes = {
105
106
  icon: _propTypes.default.node,
106
107
  iconActive: _propTypes.default.node,
107
108
  label: _propTypes.default.string.isRequired,
108
- href: _propTypes.default.string
109
+ href: _propTypes.default.string,
110
+ tokens: (0, _utils.getTokensPropType)('TabBarItem')
109
111
  })).isRequired,
110
112
  /** Id of the initially selected item. */
111
113
  initiallySelectedItem: _propTypes.default.number,
@@ -5,5 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _TabBar = _interopRequireDefault(require("./TabBar"));
8
+ var _TabBarItem = _interopRequireDefault(require("./TabBarItem"));
8
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ _TabBar.default.Item = _TabBarItem.default;
9
11
  var _default = exports.default = _TabBar.default;
@@ -21,7 +21,7 @@ function createPortalNode(nodeId) {
21
21
  left: ${window.scrollX}px;
22
22
  right: 0;
23
23
  bottom: 0;
24
- z-index: 9999;
24
+ z-index: 100000;
25
25
  pointer-events: none;
26
26
  `;
27
27
  document.body.appendChild(node);