@wlloyalty/wll-react-sdk 1.4.6 → 1.4.8
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 +1 -2
- package/dist/native.js +4 -7
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/Chip/index.d.ts +1 -2
- package/dist/web.js +4 -5
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
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:
|
|
524
|
+
label: string;
|
|
526
525
|
variant?: StatusVariant;
|
|
527
526
|
role?: AccessibilityRole | 'status';
|
|
528
527
|
ariaLive?: AriaLive;
|
package/dist/native.js
CHANGED
|
@@ -2303,11 +2303,9 @@ var BadgeTileDateEarned = function () {
|
|
|
2303
2303
|
var formattedDate = handleLastEarnedDate(lastEarnedAt, locale);
|
|
2304
2304
|
var displayText = count === 0
|
|
2305
2305
|
? badgeNotEarnedMessage
|
|
2306
|
-
: "".concat(awardedDatePrefix
|
|
2307
|
-
var accessibilityLabel = count === 0
|
|
2308
|
-
|
|
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" }));
|
|
2306
|
+
: "".concat(awardedDatePrefix).concat(formattedDate);
|
|
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:
|
|
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 () {
|