@telus-uds/components-base 3.24.0 → 3.26.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 (35) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/lib/cjs/Button/ButtonGroup.js +9 -2
  3. package/lib/cjs/Carousel/Carousel.js +90 -30
  4. package/lib/cjs/Carousel/Constants.js +13 -2
  5. package/lib/cjs/FlexGrid/FlexGrid.js +31 -35
  6. package/lib/cjs/IconButton/IconButton.js +15 -5
  7. package/lib/cjs/InputSupports/InputSupports.js +2 -1
  8. package/lib/cjs/PriceLockup/PriceLockup.js +1 -1
  9. package/lib/cjs/TextInput/TextInputBase.js +2 -3
  10. package/lib/cjs/utils/index.js +9 -1
  11. package/lib/cjs/utils/resolveContentMaxWidth.js +30 -0
  12. package/lib/esm/Button/ButtonGroup.js +9 -2
  13. package/lib/esm/Carousel/Carousel.js +84 -24
  14. package/lib/esm/Carousel/Constants.js +12 -1
  15. package/lib/esm/FlexGrid/FlexGrid.js +31 -35
  16. package/lib/esm/IconButton/IconButton.js +15 -5
  17. package/lib/esm/InputSupports/InputSupports.js +2 -1
  18. package/lib/esm/PriceLockup/PriceLockup.js +1 -1
  19. package/lib/esm/TextInput/TextInputBase.js +2 -3
  20. package/lib/esm/utils/index.js +2 -1
  21. package/lib/esm/utils/resolveContentMaxWidth.js +24 -0
  22. package/lib/package.json +2 -2
  23. package/package.json +2 -2
  24. package/src/Button/ButtonGroup.jsx +20 -3
  25. package/src/Carousel/Carousel.jsx +104 -30
  26. package/src/Carousel/Constants.js +14 -0
  27. package/src/FlexGrid/FlexGrid.jsx +30 -39
  28. package/src/IconButton/IconButton.jsx +12 -5
  29. package/src/InputSupports/InputSupports.jsx +6 -1
  30. package/src/PriceLockup/PriceLockup.jsx +1 -1
  31. package/src/TextInput/TextInputBase.jsx +2 -2
  32. package/src/utils/index.js +1 -0
  33. package/src/utils/resolveContentMaxWidth.js +28 -0
  34. package/types/Status.d.ts +42 -0
  35. package/types/index.d.ts +3 -0
package/CHANGELOG.md CHANGED
@@ -1,9 +1,32 @@
1
1
  # Change Log - @telus-uds/components-base
2
2
 
3
- This log was last generated on Fri, 12 Dec 2025 05:37:22 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 19 Jan 2026 20:39:50 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 3.26.0
8
+
9
+ Mon, 19 Jan 2026 20:39:50 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - `PriceLockup`: Add inverse variant (david.melara1@telus.com)
14
+ - `Carousel`: add new swipe animation (sergio.ramirez@telus.com)
15
+ - `TextInput`: Add ARIA feedback ID for improved accessibility (david.melara1@telus.com)
16
+
17
+ ## 3.25.0
18
+
19
+ Mon, 12 Jan 2026 14:55:21 GMT
20
+
21
+ ### Minor changes
22
+
23
+ - `Status`: Added typescript support for the component (shivam.gupta3@telus.com)
24
+ - `IconButton`: Update the UI to match the design intention, add an inactive prop and selected variant (guillermo.peitzner@telus.com)
25
+ - `FlexGrid`: rename contentMinWidth prop to contentMaxWidth (guillermo.peitzner@telus.com)
26
+ - `ButtonGroup`: add item inactive prop (guillermo.peitzner@telus.com)
27
+ - `Carousel`: add contentMaxWidth prop (guillermo.peitzner@telus.com)
28
+ - Bump @telus-uds/system-theme-tokens to v4.18.0
29
+
7
30
  ## 3.24.0
8
31
 
9
32
  Fri, 12 Dec 2025 05:37:22 GMT
@@ -138,6 +138,7 @@ const ButtonGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
138
138
  id = label,
139
139
  accessibilityLabel,
140
140
  ref: itemRef,
141
+ inactive: itemInactive,
141
142
  ...itemRest
142
143
  } = _ref2;
143
144
  const isSelected = currentValues.includes(id);
@@ -161,6 +162,7 @@ const ButtonGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
161
162
  accessibilityLabel,
162
163
  ..._utils.a11yProps.getPositionInSet(items.length, index)
163
164
  };
165
+ const isInactive = itemInactive !== undefined ? itemInactive : inactive;
164
166
 
165
167
  // Ensure button is direct child of group as MacOS voiceover only applies "X of Y" to
166
168
  // "radio" if it's a direct child of "radiogroup", even if aria-posinset etc exists
@@ -171,7 +173,7 @@ const ButtonGroup = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
171
173
  onPress: handlePress,
172
174
  tokens: getButtonTokens,
173
175
  selected: isSelected,
174
- inactive: inactive,
176
+ inactive: isInactive,
175
177
  icon: iconProp,
176
178
  ...selectItemProps({
177
179
  ...itemRest,
@@ -225,7 +227,12 @@ ButtonGroup.propTypes = {
225
227
  /**
226
228
  * An optional ref for one individual button in the ButtonGroup
227
229
  */
228
- ref: _airbnbPropTypes.default.ref()
230
+ ref: _airbnbPropTypes.default.ref(),
231
+ /**
232
+ * If true, this individual button cannot be interacted with. Takes precedence
233
+ * over the group-level `inactive` prop. Useful for disabling specific options.
234
+ */
235
+ inactive: _propTypes.default.bool
229
236
  })),
230
237
  /**
231
238
  * If provided, this function is called when the current selection is changed
@@ -11,6 +11,7 @@ var _PanResponder = _interopRequireDefault(require("react-native-web/dist/cjs/ex
11
11
  var _StyleSheet = _interopRequireDefault(require("react-native-web/dist/cjs/exports/StyleSheet"));
12
12
  var _Platform = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Platform"));
13
13
  var _Dimensions = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Dimensions"));
14
+ var _Easing = _interopRequireDefault(require("react-native-web/dist/cjs/exports/Easing"));
14
15
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
16
  var _ThemeProvider = require("../ThemeProvider");
16
17
  var _ViewportProvider = require("../ViewportProvider");
@@ -30,11 +31,6 @@ var _Box = _interopRequireDefault(require("../Box"));
30
31
  var _Constants = require("./Constants");
31
32
  var _jsxRuntime = require("react/jsx-runtime");
32
33
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
33
- const TRANSITION_MODES = {
34
- MANUAL: 'manual',
35
- AUTOMATIC: 'automatic',
36
- SWIPE: 'swipe'
37
- };
38
34
  const staticStyles = _StyleSheet.default.create({
39
35
  root: {
40
36
  backgroundColor: 'transparent',
@@ -210,11 +206,18 @@ const selectRootContainerStyles = (enableHero, viewport) => {
210
206
  }
211
207
  return {};
212
208
  };
213
- const selectMainContainerStyles = (enableHero, viewport) => {
209
+ const selectMainContainerStyles = (enableHero, viewport, maxWidth) => {
214
210
  if (enableHero && viewport === 'xl' && _Platform.default.OS === 'web') {
215
211
  return {
216
212
  width: '100%',
217
- maxWidth: 1200
213
+ maxWidth: maxWidth || 1200
214
+ };
215
+ }
216
+ if (maxWidth !== null && maxWidth !== undefined) {
217
+ return {
218
+ maxWidth,
219
+ alignSelf: 'center',
220
+ width: '100%'
218
221
  };
219
222
  }
220
223
  return {};
@@ -361,11 +364,20 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
361
364
  loopDuration = transitionDuration,
362
365
  autoPlay = false,
363
366
  enablePeeking = false,
367
+ contentMaxWidth,
368
+ swipeReleaseStyle = _Constants.SWIPE_RELEASE_STYLES.INSTANT,
369
+ swipeReleaseDuration = _Constants.DEFAULT_SWIPE_RELEASE_DURATION,
364
370
  ...rest
365
371
  } = _ref3;
366
372
  let childrenArray = (0, _utils.unpackFragment)(children);
367
373
  const isTransitioningRef = _react.default.useRef(false);
368
374
  const viewport = (0, _ViewportProvider.useViewport)();
375
+ const {
376
+ themeOptions
377
+ } = (0, _ThemeProvider.useTheme)();
378
+ const contentMaxWidthValue = (0, _utils.useResponsiveProp)(contentMaxWidth);
379
+ const responsiveWidth = (0, _utils.useResponsiveProp)(themeOptions?.contentMaxWidth);
380
+ const maxWidth = (0, _utils.resolveContentMaxWidth)(contentMaxWidthValue, responsiveWidth);
369
381
  const totalItems = getTotalItems(enableDisplayMultipleItemsPerSlide, childrenArray, viewport);
370
382
  const autoPlayFeatureEnabled = autoPlay && slideDuration > 0 && transitionDuration > 0 && totalItems > 1;
371
383
  // if `Carousel` only has one `Carousel.Item`, convert this to a single-item array
@@ -483,7 +495,8 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
483
495
  });
484
496
  }
485
497
  }, [pan, animatedX, heroPan, heroAnimatedX, enableHero, viewport, enablePeeking]);
486
- const animate = _react.default.useCallback((panToAnimate, toValue, toIndex) => {
498
+ const animate = _react.default.useCallback(function (panToAnimate, toValue, toIndex) {
499
+ let isSwipeRelease = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
487
500
  const applicableTransitionDuration = isLastSlide && toIndex === 0 ? loopDuration : transitionDuration;
488
501
  const handleAnimationEndToIndex = function () {
489
502
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -491,10 +504,23 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
491
504
  }
492
505
  return handleAnimationEnd(toIndex, ...args);
493
506
  };
494
- if (reduceMotionRef.current || isSwiping.current) {
507
+ if (reduceMotionRef.current) {
508
+ _Animated.default.timing(panToAnimate, {
509
+ toValue,
510
+ duration: _Constants.INSTANT_ANIMATION_DURATION,
511
+ useNativeDriver: false
512
+ }).start(handleAnimationEndToIndex);
513
+ } else if (isSwipeRelease && swipeReleaseStyle === _Constants.SWIPE_RELEASE_STYLES.EASE_OUT) {
514
+ _Animated.default.timing(panToAnimate, {
515
+ toValue,
516
+ duration: swipeReleaseDuration,
517
+ easing: _Easing.default.out(_Easing.default.cubic),
518
+ useNativeDriver: false
519
+ }).start(handleAnimationEndToIndex);
520
+ } else if (isSwiping.current || isSwipeRelease) {
495
521
  _Animated.default.timing(panToAnimate, {
496
522
  toValue,
497
- duration: 1,
523
+ duration: _Constants.INSTANT_ANIMATION_DURATION,
498
524
  useNativeDriver: false
499
525
  }).start(handleAnimationEndToIndex);
500
526
  } else if (isAutoPlayEnabled) {
@@ -518,7 +544,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
518
544
  useNativeDriver: false
519
545
  }).start(handleAnimationEndToIndex);
520
546
  }
521
- }, [springConfig, handleAnimationEnd, transitionDuration, loopDuration, isLastSlide, isAutoPlayEnabled, enablePeeking, enableDisplayMultipleItemsPerSlide]);
547
+ }, [springConfig, handleAnimationEnd, transitionDuration, loopDuration, isLastSlide, isAutoPlayEnabled, enablePeeking, enableDisplayMultipleItemsPerSlide, swipeReleaseStyle, swipeReleaseDuration]);
522
548
  const stopAutoplay = _react.default.useCallback(() => {
523
549
  if (autoPlayRef?.current) {
524
550
  clearTimeout(autoPlayRef?.current);
@@ -541,19 +567,20 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
541
567
  };
542
568
  let skipChanges = !delta;
543
569
  let calcDelta = delta;
570
+ const isSwipeRelease = transitionMode === _Constants.TRANSITION_MODES.SWIPE;
544
571
  if (activeIndexRef.current <= 0 && delta < 0) {
545
- skipChanges = transitionMode !== TRANSITION_MODES.AUTOMATIC;
572
+ skipChanges = transitionMode !== _Constants.TRANSITION_MODES.AUTOMATIC;
546
573
  calcDelta = totalItems + delta;
547
574
  } else if (activeIndexRef.current + 1 >= totalItems && delta > 0) {
548
- skipChanges = transitionMode !== TRANSITION_MODES.AUTOMATIC;
575
+ skipChanges = transitionMode !== _Constants.TRANSITION_MODES.AUTOMATIC;
549
576
  calcDelta = -1 * activeIndexRef.current + delta - 1;
550
577
  }
551
578
  const index = activeIndexRef.current + calcDelta;
552
579
  if (skipChanges) {
553
580
  isTransitioningRef.current = true;
554
- animate(pan, toValue, index);
581
+ animate(pan, toValue, index, isSwipeRelease);
555
582
  if (enableHero) {
556
- animate(heroPan, toValue, index);
583
+ animate(heroPan, toValue, index, isSwipeRelease);
557
584
  }
558
585
  return calcDelta;
559
586
  }
@@ -567,19 +594,19 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
567
594
  };
568
595
  heroToValue.x = heroContainerLayoutRef.current.width * -1 * calcDelta;
569
596
  isTransitioningRef.current = true;
570
- animate(pan, toValue, index);
597
+ animate(pan, toValue, index, isSwipeRelease);
571
598
  if (enableHero) {
572
- animate(heroPan, heroToValue, index);
599
+ animate(heroPan, heroToValue, index, isSwipeRelease);
573
600
  }
574
601
  if (isCarouselPlaying) {
575
602
  stopAutoplay();
576
- if (index === 0 && activeIndexRef.current + 1 === totalItems && transitionMode === TRANSITION_MODES.AUTOMATIC) {
603
+ if (index === 0 && activeIndexRef.current + 1 === totalItems && transitionMode === _Constants.TRANSITION_MODES.AUTOMATIC) {
577
604
  setisCarouselPlaying(false);
578
605
  } else if (isAutoPlayEnabled) {
579
606
  autoPlayRef.current = setTimeout(() => {
580
607
  updateOffset();
581
608
  handleAnimationStart(activeIndexRef.current);
582
- updateIndex(slideDuration < 0 ? -1 : 1, TRANSITION_MODES.AUTOMATIC);
609
+ updateIndex(slideDuration < 0 ? -1 : 1, _Constants.TRANSITION_MODES.AUTOMATIC);
583
610
  triggerRefocus();
584
611
  }, Math.abs(slideDuration) * 1000);
585
612
  }
@@ -593,7 +620,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
593
620
  autoPlayRef.current = setTimeout(() => {
594
621
  updateOffset();
595
622
  handleAnimationStart(activeIndexRef.current);
596
- updateIndex(slideDuration < 0 ? -1 : 1, TRANSITION_MODES.AUTOMATIC);
623
+ updateIndex(slideDuration < 0 ? -1 : 1, _Constants.TRANSITION_MODES.AUTOMATIC);
597
624
  triggerRefocus();
598
625
  }, Math.abs(slideDuration) * 1000);
599
626
  }
@@ -606,7 +633,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
606
633
  }, [updateIndex, updateOffset, handleAnimationStart, triggerRefocus]);
607
634
  const goToNeighboring = _react.default.useCallback(function () {
608
635
  let toPrev = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
609
- let transitionMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TRANSITION_MODES.MANUAL;
636
+ let transitionMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Constants.TRANSITION_MODES.MANUAL;
610
637
  fixOffsetAndGo(toPrev ? -1 : 1, transitionMode);
611
638
  }, [fixOffsetAndGo]);
612
639
  _react.default.useEffect(() => {
@@ -766,16 +793,16 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
766
793
  startAutoplay();
767
794
  }
768
795
  const correction = gesture.moveX - gesture.x0;
796
+ isSwiping.current = false;
769
797
  if (Math.abs(correction) < containerLayoutRef.current.width * minDistanceForAction) {
770
798
  animate(pan, {
771
799
  x: 0,
772
800
  y: 0
773
- }, 0);
801
+ }, activeIndexRef.current, true);
774
802
  } else {
775
803
  const delta = correction > 0 ? -1 : 1;
776
- updateIndex(delta, TRANSITION_MODES.SWIPE);
804
+ updateIndex(delta, _Constants.TRANSITION_MODES.SWIPE);
777
805
  }
778
- isSwiping.current = false;
779
806
  }
780
807
  }), [pan, updateIndex, updateOffset, animate, isSwipeAllowed, minDistanceForAction, handleAnimationStart, minDistanceToCapture, startAutoplay, stopAutoplay, isCarouselPlaying]);
781
808
  const heroPanResponder = _react.default.useMemo(() => _PanResponder.default.create({
@@ -806,16 +833,16 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
806
833
  startAutoplay();
807
834
  }
808
835
  const correction = gesture.moveX - gesture.x0;
836
+ isSwiping.current = false;
809
837
  if (Math.abs(correction) < containerLayoutRef.current.width * minDistanceForAction) {
810
838
  animate(heroPan, {
811
839
  x: 0,
812
840
  y: 0
813
- }, 0);
841
+ }, activeIndexRef.current, true);
814
842
  } else {
815
843
  const delta = correction > 0 ? -1 : 1;
816
- updateIndex(delta, TRANSITION_MODES.SWIPE);
844
+ updateIndex(delta, _Constants.TRANSITION_MODES.SWIPE);
817
845
  }
818
- isSwiping.current = false;
819
846
  }
820
847
  }), [heroPan, updateIndex, updateOffset, animate, isSwipeAllowed, minDistanceForAction, handleAnimationStart, minDistanceToCapture, startAutoplay, stopAutoplay, isCarouselPlaying]);
821
848
  const goToNext = _react.default.useCallback(() => {
@@ -828,7 +855,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
828
855
  let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
829
856
  const delta = index - activeIndexRef.current;
830
857
  if (delta) {
831
- fixOffsetAndGo(delta, TRANSITION_MODES.MANUAL);
858
+ fixOffsetAndGo(delta, _Constants.TRANSITION_MODES.MANUAL);
832
859
  }
833
860
  }, [fixOffsetAndGo]);
834
861
 
@@ -896,7 +923,7 @@ const Carousel = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
896
923
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_View.default, {
897
924
  style: selectRootContainerStyles(enableHero, viewport),
898
925
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
899
- style: selectMainContainerStyles(enableHero, viewport),
926
+ style: selectMainContainerStyles(enableHero, viewport, maxWidth),
900
927
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CarouselContext.CarouselProvider, {
901
928
  activeIndex: activeIndex,
902
929
  goTo: goTo,
@@ -1254,7 +1281,40 @@ Carousel.propTypes = {
1254
1281
  * If set to `true`, the Carousel will show multiple slides at once
1255
1282
  * - Default value is `false`
1256
1283
  */
1257
- enableDisplayMultipleItemsPerSlide: _propTypes.default.bool
1284
+ enableDisplayMultipleItemsPerSlide: _propTypes.default.bool,
1285
+ /**
1286
+ * The maximum width of the content in the Carousel.
1287
+ * This prop accepts responsive values for different viewports. If a number is provided,
1288
+ * it will be the max content width for the desired viewport.
1289
+ * - `xs`: 'max' | 'full' | <number>
1290
+ * - `sm`: 'max' | 'full' | <number>
1291
+ * - `md`: 'max' | 'full' | <number>
1292
+ * - `lg`: 'max' | 'full' | <number>
1293
+ * - `xl`: 'max' | 'full' | <number>
1294
+ */
1295
+ contentMaxWidth: _propTypes.default.shape({
1296
+ xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
1297
+ lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
1298
+ md: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
1299
+ sm: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
1300
+ xs: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number])
1301
+ }),
1302
+ /**
1303
+ * Animation style for swipe release transitions.
1304
+ * - `'instant'`: Immediate snap to position (current default)
1305
+ * - `'ease-out'`: Smooth deceleration animation
1306
+ * - Default value is `'instant'`
1307
+ * - Use `swipeReleaseDuration` to customize the animation duration when using `'ease-out'`
1308
+ *
1309
+ * @deprecated The default will change to `'ease-out'` in Q2 2026 (introduced Jan 2026).
1310
+ */
1311
+ swipeReleaseStyle: _propTypes.default.oneOf(['instant', 'ease-out']),
1312
+ /**
1313
+ * Duration in milliseconds of the ease-out animation when releasing a swipe gesture.
1314
+ * Only applies when `swipeReleaseStyle` is set to `'ease-out'`.
1315
+ * - Default value is `500` (500ms)
1316
+ */
1317
+ swipeReleaseDuration: _propTypes.default.number
1258
1318
  };
1259
1319
  Carousel.Item = _CarouselItem.default;
1260
1320
  Carousel.displayName = 'Carousel';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.PEEKING_MULTIPLIER = exports.NEGATIVE_MULTIPLIER = exports.LARGE_VIEWPORT_MARGIN = exports.ITEMS_PER_VIEWPORT_XS_SM = exports.ITEMS_PER_VIEWPORT_MD = exports.ITEMS_PER_VIEWPORT_LG_XL = exports.HERO_POSITION_OFFSET = exports.GAP_BETWEEN_ITEMS = exports.DEFAULT_VIEWPORT_MARGIN = exports.DEFAULT_POSITION_OFFSET = exports.ACTIVE_INDEX_OFFSET_MULTIPLIER = void 0;
6
+ exports.TRANSITION_MODES = exports.SWIPE_RELEASE_STYLES = exports.PEEKING_MULTIPLIER = exports.NEGATIVE_MULTIPLIER = exports.LARGE_VIEWPORT_MARGIN = exports.ITEMS_PER_VIEWPORT_XS_SM = exports.ITEMS_PER_VIEWPORT_MD = exports.ITEMS_PER_VIEWPORT_LG_XL = exports.INSTANT_ANIMATION_DURATION = exports.HERO_POSITION_OFFSET = exports.GAP_BETWEEN_ITEMS = exports.DEFAULT_VIEWPORT_MARGIN = exports.DEFAULT_SWIPE_RELEASE_DURATION = exports.DEFAULT_POSITION_OFFSET = exports.ACTIVE_INDEX_OFFSET_MULTIPLIER = void 0;
7
7
  const ITEMS_PER_VIEWPORT_XS_SM = exports.ITEMS_PER_VIEWPORT_XS_SM = 1;
8
8
  const ITEMS_PER_VIEWPORT_MD = exports.ITEMS_PER_VIEWPORT_MD = 2;
9
9
  const ITEMS_PER_VIEWPORT_LG_XL = exports.ITEMS_PER_VIEWPORT_LG_XL = 3;
@@ -14,4 +14,15 @@ const LARGE_VIEWPORT_MARGIN = exports.LARGE_VIEWPORT_MARGIN = 40;
14
14
  const DEFAULT_VIEWPORT_MARGIN = exports.DEFAULT_VIEWPORT_MARGIN = 10;
15
15
  const PEEKING_MULTIPLIER = exports.PEEKING_MULTIPLIER = 2;
16
16
  const ACTIVE_INDEX_OFFSET_MULTIPLIER = exports.ACTIVE_INDEX_OFFSET_MULTIPLIER = 1;
17
- const NEGATIVE_MULTIPLIER = exports.NEGATIVE_MULTIPLIER = -1;
17
+ const NEGATIVE_MULTIPLIER = exports.NEGATIVE_MULTIPLIER = -1;
18
+ const TRANSITION_MODES = exports.TRANSITION_MODES = {
19
+ MANUAL: 'manual',
20
+ AUTOMATIC: 'automatic',
21
+ SWIPE: 'swipe'
22
+ };
23
+ const SWIPE_RELEASE_STYLES = exports.SWIPE_RELEASE_STYLES = {
24
+ INSTANT: 'instant',
25
+ EASE_OUT: 'ease-out'
26
+ };
27
+ const INSTANT_ANIMATION_DURATION = exports.INSTANT_ANIMATION_DURATION = 1;
28
+ const DEFAULT_SWIPE_RELEASE_DURATION = exports.DEFAULT_SWIPE_RELEASE_DURATION = 500;
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _systemConstants = require("@telus-uds/system-constants");
10
10
  var _utils = require("../utils");
11
+ var _resolveContentMaxWidth = _interopRequireDefault(require("../utils/resolveContentMaxWidth"));
11
12
  var _Row = _interopRequireDefault(require("./Row"));
12
13
  var _Col = _interopRequireDefault(require("./Col"));
13
14
  var _GutterContext = _interopRequireDefault(require("./providers/GutterContext"));
@@ -17,47 +18,24 @@ var _ViewportProvider = require("../ViewportProvider");
17
18
  var _jsxRuntime = require("react/jsx-runtime");
18
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
20
  const [selectProps, selectedSystemPropTypes] = (0, _utils.selectSystemProps)([_utils.a11yProps, _utils.viewProps]);
20
- const CONTENT_MAX_WIDTH = 'max';
21
- const CONTENT_FULL_WIDTH = 'full';
22
21
 
23
22
  /**
24
- * Resolves the maximum width for content based on the provided value and responsive width.
25
- *
26
- * @param {number|string|null|undefined} contentMinWidthValue - The minimum width value for the content.
27
- * Can be a number, a special string constant (e.g., CONTENT_FULL_WIDTH, CONTENT_MAX_WIDTH), or null/undefined.
28
- * @param {number} responsiveWidth - The responsive width to use when contentMinWidthValue is CONTENT_MAX_WIDTH.
29
- * @returns {number|string|null} The resolved maximum width value, or null if full width is desired.
30
- */
31
- const resolveContentMaxWidth = (contentMinWidthValue, responsiveWidth) => {
32
- if (!contentMinWidthValue || contentMinWidthValue === CONTENT_FULL_WIDTH) {
33
- return null;
34
- }
35
- if (Number.isFinite(contentMinWidthValue)) {
36
- return contentMinWidthValue;
37
- }
38
- if (contentMinWidthValue === CONTENT_MAX_WIDTH) {
39
- return responsiveWidth;
40
- }
41
- return contentMinWidthValue;
42
- };
43
-
44
- /**
45
- * Calculates the maximum width for a given viewport based on limitWidth and contentMinWidth settings.
23
+ * Calculates the maximum width for a given viewport based on limitWidth and contentMaxWidth settings.
46
24
  *
47
25
  * @param {string} viewportKey - The viewport key ('xs', 'sm', 'md', 'lg', 'xl')
48
26
  * @param {boolean} limitWidth - Whether to limit the width to viewport breakpoints
49
- * @param {any} contentMinWidth - The contentMinWidth prop value
27
+ * @param {any} contentWidthProp - The contentMaxWidth (or contentMinWidth) prop value
50
28
  * @param {number|string|null} maxWidth - The resolved max width value
51
29
  * @returns {number|string|null} The calculated maximum width for the viewport
52
30
  */
53
- const getMaxWidthForViewport = (viewportKey, limitWidth, contentMinWidth, maxWidth) => {
31
+ const getMaxWidthForViewport = (viewportKey, limitWidth, contentWidthProp, maxWidth) => {
54
32
  if (limitWidth) {
55
33
  if (viewportKey === 'xs') {
56
34
  return null;
57
35
  }
58
36
  return _systemConstants.viewports.map.get(viewportKey);
59
37
  }
60
- if (contentMinWidth) {
38
+ if (contentWidthProp) {
61
39
  return maxWidth;
62
40
  }
63
41
  return null;
@@ -81,6 +59,7 @@ const FlexGrid = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
81
59
  accessibilityRole,
82
60
  children,
83
61
  dataSet,
62
+ contentMaxWidth,
84
63
  contentMinWidth,
85
64
  ...rest
86
65
  } = _ref;
@@ -94,28 +73,31 @@ const FlexGrid = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
94
73
  } = (0, _ThemeProvider.useTheme)();
95
74
  let flexgridStyles;
96
75
  let mediaIds;
97
- const contentMinWidthValue = (0, _utils.useResponsiveProp)(contentMinWidth);
76
+
77
+ // Support both contentMaxWidth and deprecated contentMinWidth for backwards compatibility
78
+ const contentWidthProp = contentMaxWidth || contentMinWidth;
79
+ const contentWidthValue = (0, _utils.useResponsiveProp)(contentWidthProp);
98
80
  const responsiveWidth = (0, _utils.useResponsiveProp)(themeOptions?.contentMaxWidth);
99
- const maxWidth = resolveContentMaxWidth(contentMinWidthValue, responsiveWidth);
81
+ const maxWidth = (0, _resolveContentMaxWidth.default)(contentWidthValue, responsiveWidth);
100
82
  const stylesByViewport = {
101
83
  xs: {
102
- maxWidth: getMaxWidthForViewport('xs', limitWidth, contentMinWidth, maxWidth),
84
+ maxWidth: getMaxWidthForViewport('xs', limitWidth, contentWidthProp, maxWidth),
103
85
  flexDirection: reverseLevel[0] ? 'column-reverse' : 'column'
104
86
  },
105
87
  sm: {
106
- maxWidth: getMaxWidthForViewport('sm', limitWidth, contentMinWidth, maxWidth),
88
+ maxWidth: getMaxWidthForViewport('sm', limitWidth, contentWidthProp, maxWidth),
107
89
  flexDirection: reverseLevel[1] ? 'column-reverse' : 'column'
108
90
  },
109
91
  md: {
110
- maxWidth: getMaxWidthForViewport('md', limitWidth, contentMinWidth, maxWidth),
92
+ maxWidth: getMaxWidthForViewport('md', limitWidth, contentWidthProp, maxWidth),
111
93
  flexDirection: reverseLevel[2] ? 'column-reverse' : 'column'
112
94
  },
113
95
  lg: {
114
- maxWidth: getMaxWidthForViewport('lg', limitWidth, contentMinWidth, maxWidth),
96
+ maxWidth: getMaxWidthForViewport('lg', limitWidth, contentWidthProp, maxWidth),
115
97
  flexDirection: reverseLevel[3] ? 'column-reverse' : 'column'
116
98
  },
117
99
  xl: {
118
- maxWidth: getMaxWidthForViewport('xl', limitWidth, contentMinWidth, maxWidth),
100
+ maxWidth: getMaxWidthForViewport('xl', limitWidth, contentWidthProp, maxWidth),
119
101
  flexDirection: reverseLevel[4] ? 'column-reverse' : 'column'
120
102
  }
121
103
  };
@@ -211,7 +193,7 @@ FlexGrid.propTypes = {
211
193
  */
212
194
  children: _propTypes.default.node.isRequired,
213
195
  /**
214
- * The minimum width of the content in the FlexGrid.
196
+ * The maximum width of the content in the FlexGrid.
215
197
  * This prop accepts responsive values for different viewports. If a number is provided,
216
198
  * it will be the max content width for the desired viewport.
217
199
  * - `xs`: 'max' | 'full' | <number>
@@ -220,6 +202,20 @@ FlexGrid.propTypes = {
220
202
  * - `lg`: 'max' | 'full' | <number>
221
203
  * - `xl`: 'max' | 'full' | <number>
222
204
  */
205
+ contentMaxWidth: _propTypes.default.shape({
206
+ xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
207
+ lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
208
+ md: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
209
+ sm: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
210
+ xs: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number])
211
+ }),
212
+ /**
213
+ * @deprecated Use `contentMaxWidth` instead. This prop will be removed in a future version.
214
+ *
215
+ * The minimum width of the content in the FlexGrid.
216
+ * This prop accepts responsive values for different viewports. If a number is provided,
217
+ * it will be the max content width for the desired viewport.
218
+ */
223
219
  contentMinWidth: _propTypes.default.shape({
224
220
  xl: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
225
221
  lg: _propTypes.default.oneOfType([_propTypes.default.oneOf(['max', 'full']), _propTypes.default.number]),
@@ -129,6 +129,7 @@ const IconButton = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
129
129
  hrefAttrs,
130
130
  testID,
131
131
  accessibilityRole = href ? 'link' : 'button',
132
+ inactive = false,
132
133
  ...rawRest
133
134
  } = _ref3;
134
135
  const {
@@ -149,8 +150,12 @@ const IconButton = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
149
150
  }
150
151
  });
151
152
  };
152
- const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('IconButton', tokens, variant);
153
- const getOuterStyle = pressableState => selectOuterStyle(getTokens((0, _utils.resolvePressableState)(pressableState), variant.password));
153
+ const mergedVariant = inactive ? {
154
+ ...variant,
155
+ inactive: true
156
+ } : variant;
157
+ const getTokens = (0, _ThemeProvider.useThemeTokensCallback)('IconButton', tokens, mergedVariant);
158
+ const getOuterStyle = pressableState => selectOuterStyle(getTokens((0, _utils.resolvePressableState)(pressableState), mergedVariant.password));
154
159
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pressable.default, {
155
160
  ref: ref,
156
161
  href: href,
@@ -159,15 +164,16 @@ const IconButton = /*#__PURE__*/_react.default.forwardRef((_ref3, ref) => {
159
164
  style: getOuterStyle,
160
165
  ...selectedProps,
161
166
  testID: testID,
167
+ disabled: inactive,
162
168
  children: pressableState => {
163
169
  const themeTokens = getTokens((0, _utils.resolvePressableState)(pressableState));
164
170
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
165
- style: selectInnerStyle(themeTokens, variant.password),
171
+ style: selectInnerStyle(themeTokens, mergedVariant.password),
166
172
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
167
173
  icon: IconComponent || themeTokens.icon,
168
174
  title: selectedProps.accessibilityLabel,
169
175
  tokens: (0, _utils.selectTokens)('Icon', themeTokens, 'icon'),
170
- variant: variant
176
+ variant: mergedVariant
171
177
  })
172
178
  });
173
179
  }
@@ -198,7 +204,11 @@ IconButton.propTypes = {
198
204
  /**
199
205
  * Function to execute when the `Iconbutton` is pressed
200
206
  */
201
- onPress: _propTypes.default.func
207
+ onPress: _propTypes.default.func,
208
+ /**
209
+ * When true, applies the inactive variant styling
210
+ */
211
+ inactive: _propTypes.default.bool
202
212
  };
203
213
  const staticStyles = _StyleSheet.default.create({
204
214
  outer: {
@@ -72,7 +72,8 @@ const InputSupports = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
72
72
  }), typeof children === 'function' ? children({
73
73
  inputId,
74
74
  ...a11yProps,
75
- validation: feedbackValidation
75
+ validation: feedbackValidation,
76
+ accessibilityDescribedBy: feedbackId
76
77
  }) : children, feedback || maxCharsReachedErrorMessage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Feedback.default, {
77
78
  id: feedbackId,
78
79
  title: feedback || maxCharsReachedErrorMessage,
@@ -149,7 +149,7 @@ const PriceLockup = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
149
149
  ...selectProps(rest),
150
150
  children: [topText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_View.default, {
151
151
  style: staticStyles.topText,
152
- children: (0, _renderTypography.default)(topText, topTextTypographyTokens)
152
+ children: (0, _renderTypography.default)(topText, topTextTypographyTokens, undefined, fontColor)
153
153
  }) : null, (0, _renderPrice.default)(price, rateText, ratePosition, signDirection, currencySymbol, currencySymbolTypographyTokens, amountTypographyTokens, centsTypographyTokens, rateTypographyTokens, fontColor, strikeThrough, a11yText, bottomText, bottomLinksMarginLeft, footnoteLinks, onClickFootnote, themeTokens, isPriceBaseline), bottomText ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
154
154
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, {
155
155
  testID: "price-lockup-divider",
@@ -332,7 +332,7 @@ const TextInputBase = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
332
332
  icon: ClearButtonIcon,
333
333
  onPress: handleClear,
334
334
  variant: {
335
- compact: true
335
+ subtle: true
336
336
  }
337
337
  }, "clear"));
338
338
  }
@@ -342,8 +342,7 @@ const TextInputBase = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
342
342
  icon: !showPassword ? passwordShowButtonIcon : passwordHideButtonIcon,
343
343
  onPress: handleShowOrHide,
344
344
  variant: {
345
- compact: true,
346
- password: true,
345
+ subtle: true,
347
346
  inactive: variant.inactive,
348
347
  size: 'large'
349
348
  },
@@ -23,7 +23,8 @@ var _exportNames = {
23
23
  formatImageSource: true,
24
24
  getSpacingScale: true,
25
25
  useVariants: true,
26
- isTouchDevice: true
26
+ isTouchDevice: true,
27
+ resolveContentMaxWidth: true
27
28
  };
28
29
  Object.defineProperty(exports, "BaseView", {
29
30
  enumerable: true,
@@ -73,6 +74,12 @@ Object.defineProperty(exports, "isTouchDevice", {
73
74
  return _isTouchDevice.default;
74
75
  }
75
76
  });
77
+ Object.defineProperty(exports, "resolveContentMaxWidth", {
78
+ enumerable: true,
79
+ get: function () {
80
+ return _resolveContentMaxWidth.default;
81
+ }
82
+ });
76
83
  Object.defineProperty(exports, "transformGradient", {
77
84
  enumerable: true,
78
85
  get: function () {
@@ -272,6 +279,7 @@ var _formatImageSource = _interopRequireDefault(require("./formatImageSource"));
272
279
  var _getSpacingScale = _interopRequireDefault(require("./getSpacingScale"));
273
280
  var _useVariants = _interopRequireDefault(require("./useVariants"));
274
281
  var _isTouchDevice = _interopRequireDefault(require("./isTouchDevice"));
282
+ var _resolveContentMaxWidth = _interopRequireDefault(require("./resolveContentMaxWidth"));
275
283
  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); }
276
284
  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; }
277
285
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }