@wlloyalty/wll-react-sdk 1.0.89 → 1.0.91
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 +7 -1
- package/dist/native.js +41 -11
- package/dist/native.js.map +1 -1
- package/dist/types/components/molecules/CarouselNavButton/index.d.ts +6 -0
- package/dist/types/components/molecules/CarouselNavButton/styles.d.ts +22 -0
- package/dist/types/components/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/PointsTile/PointsTile.stories.d.ts +3 -0
- package/dist/web.js +58 -26
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const useNavButtonStyles: () => {
|
|
2
|
+
navButton: {
|
|
3
|
+
position: "absolute";
|
|
4
|
+
top: "50%";
|
|
5
|
+
transform: {
|
|
6
|
+
translateY: number;
|
|
7
|
+
}[];
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
borderRadius: number;
|
|
11
|
+
backgroundColor: string;
|
|
12
|
+
justifyContent: "center";
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
zIndex: number;
|
|
15
|
+
};
|
|
16
|
+
navButtonLeft: {
|
|
17
|
+
left: number;
|
|
18
|
+
};
|
|
19
|
+
navButtonRight: {
|
|
20
|
+
right: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as Carousel } from './Carousel';
|
|
2
|
+
export { default as CarouselNavButton } from './CarouselNavButton';
|
|
2
3
|
export { default as Grid } from './Grid';
|
|
3
4
|
export { default as ProgressIndicator } from './ProgressIndicator';
|
|
4
5
|
export { default as SectionHeader } from './SectionHeader';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Meta } from '@storybook/react';
|
|
2
2
|
declare const _default: Meta;
|
|
3
3
|
export default _default;
|
|
4
|
+
export declare const ZeroPointsBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
5
|
+
tile: import("../../../types/tile").Tile;
|
|
6
|
+
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
|
4
7
|
export declare const StandardPointsBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
|
|
5
8
|
tile: import("../../../types/tile").Tile;
|
|
6
9
|
}, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
|
package/dist/web.js
CHANGED
|
@@ -20596,18 +20596,10 @@ var Carousel = function (_a) {
|
|
|
20596
20596
|
}
|
|
20597
20597
|
}, /*#__PURE__*/React.createElement(View$2, {
|
|
20598
20598
|
style: styles.carouselContainer
|
|
20599
|
-
}, showPrevButton && (/*#__PURE__*/React.createElement(
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
onPress: handlePrev,
|
|
20604
|
-
accessibilityLabel: "Previous slide",
|
|
20605
|
-
role: "button"
|
|
20606
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20607
|
-
name: "ArrowLeft",
|
|
20608
|
-
size: 20,
|
|
20609
|
-
color: theme.primary
|
|
20610
|
-
}))), /*#__PURE__*/React.createElement(ScrollView$2, {
|
|
20599
|
+
}, showPrevButton && (/*#__PURE__*/React.createElement(CarouselNavButton, {
|
|
20600
|
+
direction: "left",
|
|
20601
|
+
onPress: handlePrev
|
|
20602
|
+
})), /*#__PURE__*/React.createElement(ScrollView$2, {
|
|
20611
20603
|
ref: scrollViewRef,
|
|
20612
20604
|
horizontal: true,
|
|
20613
20605
|
pagingEnabled: true,
|
|
@@ -20615,7 +20607,7 @@ var Carousel = function (_a) {
|
|
|
20615
20607
|
onScroll: handleScroll,
|
|
20616
20608
|
onMomentumScrollEnd: handleScrollEnd,
|
|
20617
20609
|
scrollEventThrottle: 16,
|
|
20618
|
-
style:
|
|
20610
|
+
style: styles.carouselContent,
|
|
20619
20611
|
contentContainerStyle: {
|
|
20620
20612
|
width: containerWidth * sortedTiles.length
|
|
20621
20613
|
},
|
|
@@ -20631,18 +20623,10 @@ var Carousel = function (_a) {
|
|
|
20631
20623
|
}, /*#__PURE__*/React.createElement(BannerTile$1, {
|
|
20632
20624
|
tile: tile
|
|
20633
20625
|
}));
|
|
20634
|
-
})), showNextButton && (/*#__PURE__*/React.createElement(
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
onPress: handleNext,
|
|
20639
|
-
accessibilityLabel: "Next slide",
|
|
20640
|
-
role: "button"
|
|
20641
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20642
|
-
name: "ArrowRight",
|
|
20643
|
-
size: 20,
|
|
20644
|
-
color: theme.primary
|
|
20645
|
-
})))), displayControls && (/*#__PURE__*/React.createElement(View$2, {
|
|
20626
|
+
})), showNextButton && (/*#__PURE__*/React.createElement(CarouselNavButton, {
|
|
20627
|
+
direction: "right",
|
|
20628
|
+
onPress: handleNext
|
|
20629
|
+
}))), displayControls && (/*#__PURE__*/React.createElement(View$2, {
|
|
20646
20630
|
style: dynamicStyles.indicators
|
|
20647
20631
|
}, sortedTiles.map(function (_, index) {
|
|
20648
20632
|
var width = animatedIndex.interpolate({
|
|
@@ -20662,6 +20646,53 @@ var Carousel = function (_a) {
|
|
|
20662
20646
|
})))));
|
|
20663
20647
|
};
|
|
20664
20648
|
|
|
20649
|
+
var useNavButtonStyles = function () {
|
|
20650
|
+
var theme = useWllSdk().theme;
|
|
20651
|
+
var buttonSize = IS_MOBILE ? BUTTON_SIZE * 0.75 : BUTTON_SIZE;
|
|
20652
|
+
return StyleSheet$1.create({
|
|
20653
|
+
navButton: {
|
|
20654
|
+
position: 'absolute',
|
|
20655
|
+
top: '50%',
|
|
20656
|
+
transform: [{
|
|
20657
|
+
translateY: -buttonSize / 2
|
|
20658
|
+
}],
|
|
20659
|
+
width: buttonSize,
|
|
20660
|
+
height: buttonSize,
|
|
20661
|
+
borderRadius: buttonSize / 2,
|
|
20662
|
+
backgroundColor: theme.background,
|
|
20663
|
+
justifyContent: 'center',
|
|
20664
|
+
alignItems: 'center',
|
|
20665
|
+
zIndex: 1
|
|
20666
|
+
},
|
|
20667
|
+
navButtonLeft: {
|
|
20668
|
+
left: -buttonSize / 2
|
|
20669
|
+
},
|
|
20670
|
+
navButtonRight: {
|
|
20671
|
+
right: -buttonSize / 2
|
|
20672
|
+
}
|
|
20673
|
+
});
|
|
20674
|
+
};
|
|
20675
|
+
|
|
20676
|
+
var CarouselNavButton = function (_a) {
|
|
20677
|
+
var direction = _a.direction,
|
|
20678
|
+
onPress = _a.onPress;
|
|
20679
|
+
var theme = useWllSdk().theme;
|
|
20680
|
+
var isRight = direction === 'right';
|
|
20681
|
+
var styles = useNavButtonStyles();
|
|
20682
|
+
return /*#__PURE__*/React.createElement(Pressable$1, {
|
|
20683
|
+
style: [styles.navButton, isRight ? styles.navButtonRight : styles.navButtonLeft, {
|
|
20684
|
+
backgroundColor: theme.background
|
|
20685
|
+
}],
|
|
20686
|
+
onPress: onPress,
|
|
20687
|
+
accessibilityLabel: "".concat(isRight ? 'Next' : 'Previous', " slide"),
|
|
20688
|
+
role: "button"
|
|
20689
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20690
|
+
name: isRight ? 'ArrowRight' : 'ArrowLeft',
|
|
20691
|
+
size: 20,
|
|
20692
|
+
color: theme.primary
|
|
20693
|
+
}));
|
|
20694
|
+
};
|
|
20695
|
+
|
|
20665
20696
|
var Grid = function (_a) {
|
|
20666
20697
|
var section = _a.section;
|
|
20667
20698
|
if (section.type !== exports.SectionType.Grid) {
|
|
@@ -21432,7 +21463,7 @@ var PointsTileFormattedPoints = function () {
|
|
|
21432
21463
|
pointsSuffix = _d === void 0 ? 'pts' : _d,
|
|
21433
21464
|
_e = _a.points,
|
|
21434
21465
|
points = _e === void 0 ? 0 : _e;
|
|
21435
|
-
if (points === undefined
|
|
21466
|
+
if (points === undefined) return null;
|
|
21436
21467
|
var calculatedPoints = applyMultiplier(points, pointsMultiplier);
|
|
21437
21468
|
var fullPointsText = "".concat(pointsPrefix).concat(calculatedPoints, " ").concat(pointsSuffix).trim();
|
|
21438
21469
|
return /*#__PURE__*/React.createElement(View$2, {
|
|
@@ -22142,6 +22173,7 @@ exports.BaseBanner = BaseBanner;
|
|
|
22142
22173
|
exports.BaseTile = BaseTile;
|
|
22143
22174
|
exports.Button = Button;
|
|
22144
22175
|
exports.Carousel = Carousel;
|
|
22176
|
+
exports.CarouselNavButton = CarouselNavButton;
|
|
22145
22177
|
exports.Column = Column;
|
|
22146
22178
|
exports.ContentTile = ContentTile$1;
|
|
22147
22179
|
exports.ContentTileConfig = ContentTileConfig;
|