@wlloyalty/wll-react-sdk 1.0.59 → 1.0.60
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 +2 -1
- package/dist/native.js +18 -8
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/ProgressiveImage/ProgressiveImage.stories.d.ts +1 -0
- package/dist/types/components/atoms/ProgressiveImage/index.d.ts +2 -1
- package/dist/types/components/organisms/BadgeTile/badge-tile-media.d.ts +3 -2
- package/dist/types/components/organisms/BadgeTile/index.d.ts +1 -1
- package/dist/web.js +18 -8
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -316,9 +316,10 @@ type ProgressiveImageProps = {
|
|
|
316
316
|
source: ImageSourcePropType;
|
|
317
317
|
style?: StyleProp<ViewStyle>;
|
|
318
318
|
isDesaturated?: boolean;
|
|
319
|
+
alt?: string;
|
|
319
320
|
[key: string]: any;
|
|
320
321
|
};
|
|
321
|
-
declare const ProgressiveImage: ({ source, style, isDesaturated, ...props }: ProgressiveImageProps) => JSX.Element;
|
|
322
|
+
declare const ProgressiveImage: ({ source, style, isDesaturated, alt, ...props }: ProgressiveImageProps) => JSX.Element;
|
|
322
323
|
|
|
323
324
|
type TextVariant = 'eyebrow' | 'title' | 'description' | 'body' | 'caption' | 'label' | 'tier-requirement' | 'tier-earned';
|
|
324
325
|
type TextProps = TextProps$1 & {
|
package/dist/native.js
CHANGED
|
@@ -18772,7 +18772,8 @@ var ProgressiveImage = function (_a) {
|
|
|
18772
18772
|
style = _a.style,
|
|
18773
18773
|
_b = _a.isDesaturated,
|
|
18774
18774
|
isDesaturated = _b === void 0 ? false : _b,
|
|
18775
|
-
|
|
18775
|
+
alt = _a.alt,
|
|
18776
|
+
props = __rest(_a, ["source", "style", "isDesaturated", "alt"]);
|
|
18776
18777
|
var imageAnimated = React.useRef(new Animated$1.Value(0)).current;
|
|
18777
18778
|
var theme = useWllSdk().theme;
|
|
18778
18779
|
var onImageLoad = function () {
|
|
@@ -18810,7 +18811,8 @@ var ProgressiveImage = function (_a) {
|
|
|
18810
18811
|
style: [styles$7.imageOverlay, __assign({
|
|
18811
18812
|
opacity: imageAnimated
|
|
18812
18813
|
}, desaturationStyle)],
|
|
18813
|
-
onLoad: onImageLoad
|
|
18814
|
+
onLoad: onImageLoad,
|
|
18815
|
+
accessibilityLabel: alt
|
|
18814
18816
|
})));
|
|
18815
18817
|
};
|
|
18816
18818
|
var styles$7 = StyleSheet$1.create({
|
|
@@ -19218,15 +19220,20 @@ var BaseTileHeader = function (_a) {
|
|
|
19218
19220
|
|
|
19219
19221
|
var BaseTileMedia = function (props) {
|
|
19220
19222
|
var tile = useTileContext();
|
|
19221
|
-
var
|
|
19223
|
+
var _a = tile.configuration,
|
|
19224
|
+
artworkUrl = _a.artworkUrl,
|
|
19225
|
+
title = _a.title;
|
|
19222
19226
|
var styles = useBaseTileStyles();
|
|
19223
19227
|
if (!artworkUrl) return null;
|
|
19224
19228
|
return /*#__PURE__*/React.createElement(ProgressiveImage, _extends({}, props, {
|
|
19225
|
-
testID: "tile-media",
|
|
19226
19229
|
source: {
|
|
19227
19230
|
uri: artworkUrl
|
|
19228
19231
|
},
|
|
19229
|
-
|
|
19232
|
+
testID: "tile-media",
|
|
19233
|
+
style: [props.style, baseStyles.media, styles.media],
|
|
19234
|
+
alt: "Content image".concat(title ? " for ".concat(title) : ''),
|
|
19235
|
+
accessibilityElementsHidden: true,
|
|
19236
|
+
importantForAccessibility: "no-hide-descendants"
|
|
19230
19237
|
}));
|
|
19231
19238
|
};
|
|
19232
19239
|
|
|
@@ -19663,7 +19670,8 @@ var BadgeTileDescription = function () {
|
|
|
19663
19670
|
|
|
19664
19671
|
var BadgeTileMedia = function (_a) {
|
|
19665
19672
|
var children = _a.children,
|
|
19666
|
-
|
|
19673
|
+
alt = _a.alt,
|
|
19674
|
+
props = __rest(_a, ["children", "alt"]);
|
|
19667
19675
|
var styles = useBadgeTileStyles();
|
|
19668
19676
|
var tile = useTileContext();
|
|
19669
19677
|
var configuration = tile.configuration;
|
|
@@ -19684,7 +19692,7 @@ var BadgeTileMedia = function (_a) {
|
|
|
19684
19692
|
style: styles.image,
|
|
19685
19693
|
resizeMode: "contain",
|
|
19686
19694
|
isDesaturated: shouldDesaturate(type, count),
|
|
19687
|
-
alt: "Badge ".concat(name).concat(type === exports.BadgeTileType.Latest && count === 0 ? ' (not earned)' : '')
|
|
19695
|
+
alt: alt !== null && alt !== void 0 ? alt : "Badge ".concat(name).concat(type === exports.BadgeTileType.Latest && count === 0 ? ' (not earned)' : '')
|
|
19688
19696
|
})), children);
|
|
19689
19697
|
};
|
|
19690
19698
|
|
|
@@ -21190,7 +21198,9 @@ var RewardCategoryMedia = function () {
|
|
|
21190
21198
|
uri: artworkUrl
|
|
21191
21199
|
},
|
|
21192
21200
|
style: styles.background,
|
|
21193
|
-
alt: name
|
|
21201
|
+
alt: "Reward category image for ".concat(name),
|
|
21202
|
+
accessibilityElementsHidden: true,
|
|
21203
|
+
importantForAccessibility: "no-hide-descendants"
|
|
21194
21204
|
});
|
|
21195
21205
|
};
|
|
21196
21206
|
|