@wlloyalty/wll-react-sdk 1.0.107 → 1.0.109

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.
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import Skeleton from './index';
3
+ declare const meta: Meta<typeof Skeleton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Skeleton>;
6
+ export declare const Default: Story;
7
+ export declare const FewerTiles: Story;
8
+ export declare const CustomStyle: Story;
@@ -31,3 +31,9 @@ export declare const HalfWithMultiplier: import("@storybook/csf").AnnotatedStory
31
31
  export declare const FullWithMultiplier: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
32
32
  tile: import("../../../types/tile").Tile;
33
33
  }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
34
+ export declare const WithCtaLink: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
35
+ tile: import("../../../types/tile").Tile;
36
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
37
+ export declare const WithCtaLinkHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
38
+ tile: import("../../../types/tile").Tile;
39
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -12,6 +12,7 @@ export declare const PointsTile: (({ tile }: PointsTileProps) => JSX.Element | n
12
12
  Media: ({ isFullSize, }: {
13
13
  isFullSize: boolean;
14
14
  }) => JSX.Element | null;
15
+ Chevron: () => JSX.Element | null;
15
16
  };
16
17
  declare const _default: (props: Omit<PointsTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
17
18
  export default _default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders a chevron icon for a Roundup Tile.
3
+ *
4
+ * @returns JSX.Element
5
+ */
6
+ export declare const PointsTileChevron: () => JSX.Element | null;
@@ -8,6 +8,9 @@ import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
8
8
  export declare const usePointsTileStyles: (isFullSize?: boolean) => {
9
9
  container: ViewStyle;
10
10
  contentContainer: ViewStyle;
11
+ contentColumn: ViewStyle;
12
+ mediaColumn: ViewStyle;
13
+ chevronContainer: ViewStyle;
11
14
  suffix: TextStyle;
12
15
  pointsWithSuffix: ViewStyle;
13
16
  imageContainer: ViewStyle;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,33 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const ZeroBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
5
+ tile: import("../../../types/tile").Tile;
6
+ }>;
7
+ export declare const StandardBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
8
+ tile: import("../../../types/tile").Tile;
9
+ }>;
10
+ export declare const CashbackRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
11
+ tile: import("../../../types/tile").Tile;
12
+ }>;
13
+ export declare const StarRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
14
+ tile: import("../../../types/tile").Tile;
15
+ }>;
16
+ export declare const MileageProgram: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
17
+ tile: import("../../../types/tile").Tile;
18
+ }>;
19
+ export declare const AccountBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
20
+ tile: import("../../../types/tile").Tile;
21
+ }>;
22
+ export declare const RewardBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
23
+ tile: import("../../../types/tile").Tile;
24
+ }>;
25
+ export declare const EliteBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
26
+ tile: import("../../../types/tile").Tile;
27
+ }>;
28
+ export declare const WithCtaLink: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
29
+ tile: import("../../../types/tile").Tile;
30
+ }>;
31
+ export declare const WithCtaLinkHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
32
+ tile: import("../../../types/tile").Tile;
33
+ }>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Tile } from '../../../types/tile';
3
+ type RoundupTileProps = {
4
+ tile: Tile;
5
+ };
6
+ /**
7
+ * The PointsTile component with subcomponents attached.
8
+ */
9
+ export declare const RoundupTile: (({ tile }: RoundupTileProps) => JSX.Element | null) & {
10
+ Title: () => JSX.Element | null;
11
+ Points: () => JSX.Element | null;
12
+ Media: ({ isFullSize, }: {
13
+ isFullSize: boolean;
14
+ }) => JSX.Element | null;
15
+ Chevron: () => JSX.Element | null;
16
+ };
17
+ declare const _default: (props: Omit<RoundupTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
18
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders a chevron icon for a Roundup Tile.
3
+ *
4
+ * @returns JSX.Element
5
+ */
6
+ export declare const RoundupTileChevron: () => JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders formatted points value for a Roundup Tile.
3
+ *
4
+ * @returns JSX.Element or null if points are undefined or zero
5
+ */
6
+ export declare const RoundupTileFormattedPoints: () => JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ type RoundupTileMediaProps = {
2
+ isFullSize: boolean;
3
+ };
4
+ /**
5
+ * Renders the media of a Points Tile.
6
+ *
7
+ * @returns JSX.Element or null if media is not present
8
+ */
9
+ export declare const RoundupTileMedia: ({ isFullSize, }: RoundupTileMediaProps) => JSX.Element | null;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders the title of a Roundup Tile.
3
+ *
4
+ * @returns JSX.Element or null if no title is present
5
+ */
6
+ export declare const RoundupTileTitle: () => JSX.Element | null;
@@ -0,0 +1,18 @@
1
+ import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+ /**
3
+ * Custom hook that returns the styles for the RoundupTile component.
4
+ * Applies responsive styling based on the current device.
5
+ *
6
+ * @returns StyleSheet styles for the RoundupTile component
7
+ */
8
+ export declare const useRoundupTileStyles: (isFullSize?: boolean) => {
9
+ container: ViewStyle;
10
+ contentContainer: ViewStyle;
11
+ contentColumn: ViewStyle;
12
+ mediaColumn: ViewStyle;
13
+ chevronContainer: ViewStyle;
14
+ suffix: TextStyle;
15
+ pointsWithSuffix: ViewStyle;
16
+ imageContainer: ViewStyle;
17
+ image: ImageStyle;
18
+ };
@@ -7,3 +7,4 @@ export { default as RewardCategoryTile } from './RewardCategoryTile';
7
7
  export { default as RewardTile } from './RewardTile';
8
8
  export { default as Section } from './Section';
9
9
  export { default as TierTileUpdated } from './TierTileUpdated';
10
+ export { default as RoundupTile } from './RoundupTile';
@@ -18,5 +18,7 @@ export declare const createPointsTileMock: (config?: PointsTileMockConfig) => {
18
18
  pointsPrefix: string | null;
19
19
  pointsSuffix: string | null;
20
20
  artworkUrl: string | null;
21
+ ctaLink: string | null | undefined;
22
+ ctaLinkTarget: import("../../types/tile").CTALinkTarget | undefined;
21
23
  };
22
24
  };
@@ -0,0 +1,23 @@
1
+ import { CTALinkTarget, RoundupTileConfig, TileHeight, TileType } from '../../types/tile';
2
+ export type RoundupTileMockConfig = Partial<RoundupTileConfig> & {
3
+ active?: boolean;
4
+ tileHeight?: TileHeight;
5
+ };
6
+ export declare const createRoundupTileMock: (config?: RoundupTileMockConfig) => {
7
+ id: string;
8
+ type: TileType;
9
+ active: boolean;
10
+ createdAt: string;
11
+ updatedAt: string;
12
+ tileHeight: TileHeight;
13
+ priority: number;
14
+ configuration: {
15
+ title: string | null;
16
+ amount: number;
17
+ amountPrefix: string | null;
18
+ amountSuffix: string | null;
19
+ artworkUrl: string | null;
20
+ ctaLink: string | null | undefined;
21
+ ctaLinkTarget: CTALinkTarget | undefined;
22
+ };
23
+ };
@@ -18,7 +18,8 @@ export declare enum TileType {
18
18
  Reward = "REWARD",
19
19
  Badge = "BADGE",
20
20
  RewardCategory = "REWARD_CATEGORY",
21
- Tier = "TIER"
21
+ Tier = "TIER",
22
+ Roundup = "ROUND_UP_BALANCE"
22
23
  }
23
24
  export declare enum TileHeight {
24
25
  Half = "HALF",
@@ -40,6 +41,17 @@ export declare class PointsTileConfig {
40
41
  pointsSuffix?: string | null;
41
42
  artworkUrl?: string | null;
42
43
  points?: number;
44
+ ctaLink?: string | null;
45
+ ctaLinkTarget?: CTALinkTarget;
46
+ }
47
+ export declare class RoundupTileConfig {
48
+ title?: string | null;
49
+ amountPrefix?: string | null;
50
+ amountSuffix?: string | null;
51
+ artworkUrl?: string | null;
52
+ amount?: number;
53
+ ctaLink?: string | null;
54
+ ctaLinkTarget?: CTALinkTarget;
43
55
  }
44
56
  export declare class ContentTileConfig {
45
57
  title?: string | null;