@wlloyalty/wll-react-sdk 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -589,8 +589,15 @@ type ChipProps = {
589
589
  testID?: string;
590
590
  style?: StyleProp<ViewStyle>;
591
591
  labelStyle?: StyleProp<TextStyle>;
592
+ /**
593
+ * Maximum number of lines the label may wrap onto before truncating.
594
+ * Defaults to 2 so long, tenant-configured labels wrap onto a second row
595
+ * and stay inside the parent (e.g. a badge tile) instead of overflowing.
596
+ * Pass 1 to force a single line with tail truncation.
597
+ */
598
+ numberOfLines?: number;
592
599
  };
593
- declare const Chip: ({ label, variant, role, ariaLive, accessibilityLabel, testID, style, labelStyle, }: ChipProps) => React__default.ReactElement;
600
+ declare const Chip: ({ label, variant, role, ariaLive, accessibilityLabel, testID, style, labelStyle, numberOfLines, }: ChipProps) => React__default.ReactElement;
594
601
 
595
602
  declare enum SectionType {
596
603
  Grid = "GRID",
package/dist/native.js CHANGED
@@ -5035,6 +5035,7 @@ var useChipStyles = function () {
5035
5035
  borderRadius: theme.sizes.borderRadiusRounded,
5036
5036
  overflow: 'hidden',
5037
5037
  flexShrink: 1,
5038
+ maxWidth: '100%',
5038
5039
  },
5039
5040
  label: {
5040
5041
  fontFamily: theme.fontFamily,
@@ -5059,7 +5060,7 @@ var mapLiveRegion = function (ariaLive) {
5059
5060
  }
5060
5061
  };
5061
5062
  var Chip = function (_a) {
5062
- var label = _a.label, _b = _a.variant, variant = _b === void 0 ? exports.StatusVariant.PRIMARY : _b, _c = _a.role, role = _c === void 0 ? 'text' : _c, _d = _a.ariaLive, ariaLive = _d === void 0 ? 'polite' : _d, accessibilityLabel = _a.accessibilityLabel, testID = _a.testID, style = _a.style, labelStyle = _a.labelStyle;
5063
+ var label = _a.label, _b = _a.variant, variant = _b === void 0 ? exports.StatusVariant.PRIMARY : _b, _c = _a.role, role = _c === void 0 ? 'text' : _c, _d = _a.ariaLive, ariaLive = _d === void 0 ? 'polite' : _d, accessibilityLabel = _a.accessibilityLabel, testID = _a.testID, style = _a.style, labelStyle = _a.labelStyle, _e = _a.numberOfLines, numberOfLines = _e === void 0 ? 2 : _e;
5063
5064
  var styles = useChipStyles();
5064
5065
  var theme = useWllSdk().theme;
5065
5066
  var variantStyles = React.useMemo(function () {
@@ -5086,9 +5087,9 @@ var Chip = function (_a) {
5086
5087
  }
5087
5088
  }, [theme, variant]);
5088
5089
  var computedAccessibilityLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : (typeof label === 'string' ? label : undefined);
5089
- var _e = mapLiveRegion(ariaLive), accessibilityLiveRegion = _e.native, ariaLiveValue = _e.web;
5090
+ var _f = mapLiveRegion(ariaLive), accessibilityLiveRegion = _f.native, ariaLiveValue = _f.web;
5090
5091
  var isIndividuallyAccessible = computedAccessibilityLabel !== undefined;
5091
- return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.container, variantStyles.container, style], accessible: isIndividuallyAccessible, accessibilityRole: role, accessibilityLiveRegion: accessibilityLiveRegion, accessibilityLabel: computedAccessibilityLabel, "aria-live": ariaLiveValue, testID: testID, children: jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.label, variantStyles.label, labelStyle], numberOfLines: 1, ellipsizeMode: "tail", accessible: false, importantForAccessibility: "no", children: label }) }));
5092
+ return (jsxRuntimeExports.jsx(reactNative.View, { style: [styles.container, variantStyles.container, style], accessible: isIndividuallyAccessible, accessibilityRole: role, accessibilityLiveRegion: accessibilityLiveRegion, accessibilityLabel: computedAccessibilityLabel, "aria-live": ariaLiveValue, testID: testID, children: jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.label, variantStyles.label, labelStyle], numberOfLines: numberOfLines, ellipsizeMode: "tail", accessible: false, importantForAccessibility: "no", children: label }) }));
5092
5093
  };
5093
5094
 
5094
5095
  var Reward = /** @class */ (function () {