@wlloyalty/wll-react-sdk 1.4.6 → 1.4.7

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
@@ -519,10 +519,9 @@ type SpacerProps = {
519
519
  */
520
520
  declare const Spacer: ({ style, ...rest }: SpacerProps) => React__default.ReactElement;
521
521
 
522
- type ChipLabel = React__default.ReactNode;
523
522
  type AriaLive = 'polite' | 'assertive' | 'off';
524
523
  type ChipProps = {
525
- label: ChipLabel;
524
+ label: string;
526
525
  variant?: StatusVariant;
527
526
  role?: AccessibilityRole | 'status';
528
527
  ariaLive?: AriaLive;
package/dist/native.js CHANGED
@@ -2304,10 +2304,8 @@ var BadgeTileDateEarned = function () {
2304
2304
  var displayText = count === 0
2305
2305
  ? badgeNotEarnedMessage
2306
2306
  : "".concat(awardedDatePrefix, " ").concat(formattedDate);
2307
- var accessibilityLabel = count === 0
2308
- ? 'Badge not yet earned'
2309
- : "Badge earned on ".concat(formattedDate);
2310
- return (jsxRuntimeExports.jsx(Chip, { label: displayText, variant: count === 0 ? exports.StatusVariant.GREY : exports.StatusVariant.PRIMARY, accessibilityLabel: accessibilityLabel, testID: "badge-tile-date-earned" }));
2307
+ var accessibilityLabel = count === 0 ? 'Badge not yet earned' : "Badge earned on ".concat(formattedDate);
2308
+ return (jsxRuntimeExports.jsx(Chip, { label: (displayText === null || displayText === void 0 ? void 0 : displayText.toString()) || '', variant: count === 0 ? exports.StatusVariant.GREY : exports.StatusVariant.PRIMARY, accessibilityLabel: accessibilityLabel, testID: "badge-tile-date-earned" }));
2311
2309
  };
2312
2310
 
2313
2311
  /**
@@ -4543,9 +4541,8 @@ var Chip = function (_a) {
4543
4541
  }, [theme, variant]);
4544
4542
  var computedAccessibilityLabel = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : (typeof label === 'string' ? label : undefined);
4545
4543
  var _e = mapLiveRegion(ariaLive), accessibilityLiveRegion = _e.native, ariaLiveValue = _e.web;
4546
- var isSimpleLabel = typeof label === 'string';
4547
4544
  var isIndividuallyAccessible = computedAccessibilityLabel !== undefined;
4548
- 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: isSimpleLabel ? (jsxRuntimeExports.jsx(reactNative.Text, { style: [styles.label, variantStyles.label, labelStyle], numberOfLines: 1, ellipsizeMode: "tail", accessible: false, importantForAccessibility: "no", children: label })) : (label) }));
4545
+ 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 }) }));
4549
4546
  };
4550
4547
 
4551
4548
  var Reward = /** @class */ (function () {