@wlloyalty/wll-react-sdk 1.0.51 → 1.0.52

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.
Files changed (144) hide show
  1. package/dist/components/__test__/test-setup.d.ts +9 -0
  2. package/dist/components/__test__/test-utils.d.ts +4 -0
  3. package/dist/components/atoms/BaseBanner/index.d.ts +15 -0
  4. package/dist/components/atoms/BaseTile/base-tile-body.d.ts +8 -0
  5. package/dist/components/atoms/BaseTile/base-tile-content.d.ts +4 -0
  6. package/dist/components/atoms/BaseTile/base-tile-header.d.ts +4 -0
  7. package/dist/components/atoms/BaseTile/base-tile-media.d.ts +2 -0
  8. package/dist/components/atoms/BaseTile/base-tile-title.d.ts +1 -0
  9. package/dist/components/atoms/BaseTile/index.d.ts +36 -0
  10. package/dist/components/atoms/BaseTile/styles.d.ts +47 -0
  11. package/dist/components/atoms/Button/Button.stories.d.ts +7 -0
  12. package/dist/components/atoms/Button/index.d.ts +12 -0
  13. package/dist/components/atoms/Button/styles.d.ts +2 -0
  14. package/dist/components/atoms/Icon/Icon.stories.d.ts +28 -0
  15. package/dist/components/atoms/Icon/index.d.ts +11 -0
  16. package/dist/components/atoms/Indicator/index.d.ts +2 -0
  17. package/dist/components/atoms/LoadingIndicator/index.d.ts +2 -0
  18. package/dist/components/atoms/Primatives/Column.d.ts +22 -0
  19. package/dist/components/atoms/Primatives/FullFlex.d.ts +20 -0
  20. package/dist/components/atoms/Primatives/Layout.d.ts +21 -0
  21. package/dist/components/atoms/Primatives/Row.d.ts +22 -0
  22. package/dist/components/atoms/Primatives/Spacer.d.ts +17 -0
  23. package/dist/components/atoms/Primatives/index.d.ts +5 -0
  24. package/dist/components/atoms/ProgressBar/ProgressBar.stories.d.ts +8 -0
  25. package/dist/components/atoms/ProgressBar/index.d.ts +9 -0
  26. package/dist/components/atoms/ProgressiveImage/ProgressiveImage.stories.d.ts +9 -0
  27. package/dist/components/atoms/ProgressiveImage/index.d.ts +9 -0
  28. package/dist/components/atoms/Skeleton/index.d.ts +10 -0
  29. package/dist/components/atoms/SkeletonTile/index.d.ts +6 -0
  30. package/dist/components/atoms/Text/Text.stories.d.ts +11 -0
  31. package/dist/components/atoms/Text/index.d.ts +9 -0
  32. package/dist/components/atoms/TileContainer/index.d.ts +9 -0
  33. package/dist/components/atoms/index.d.ts +12 -0
  34. package/dist/components/hoc/withTileFetching.d.ts +9 -0
  35. package/dist/components/molecules/Carousel/Carousel.spec.d.ts +1 -0
  36. package/dist/components/molecules/Carousel/Carousel.stories.d.ts +12 -0
  37. package/dist/components/molecules/Carousel/index.d.ts +6 -0
  38. package/dist/components/molecules/Carousel/styles.d.ts +2 -0
  39. package/dist/components/molecules/Grid/Grid.spec.d.ts +1 -0
  40. package/dist/components/molecules/Grid/Grid.stories.d.ts +6 -0
  41. package/dist/components/molecules/Grid/index.d.ts +7 -0
  42. package/dist/components/molecules/ProgressIndicator/ProgressIndicator.stories.d.ts +8 -0
  43. package/dist/components/molecules/ProgressIndicator/index.d.ts +10 -0
  44. package/dist/components/molecules/SectionHeader/SectionHeader.spec.d.ts +1 -0
  45. package/dist/components/molecules/SectionHeader/SectionHeader.stories.d.ts +7 -0
  46. package/dist/components/molecules/SectionHeader/index.d.ts +6 -0
  47. package/dist/components/molecules/SectionHeader/styles.d.ts +2 -0
  48. package/dist/components/molecules/index.d.ts +4 -0
  49. package/dist/components/organisms/BadgeTile/BadgeTile.spec.d.ts +1 -0
  50. package/dist/components/organisms/BadgeTile/BadgeTile.stories.d.ts +21 -0
  51. package/dist/components/organisms/BadgeTile/badge-tile-date-earned.d.ts +1 -0
  52. package/dist/components/organisms/BadgeTile/badge-tile-description.d.ts +1 -0
  53. package/dist/components/organisms/BadgeTile/badge-tile-media.d.ts +6 -0
  54. package/dist/components/organisms/BadgeTile/badge-tile-status.d.ts +1 -0
  55. package/dist/components/organisms/BadgeTile/badge-tile-title.d.ts +1 -0
  56. package/dist/components/organisms/BadgeTile/index.d.ts +17 -0
  57. package/dist/components/organisms/BadgeTile/styles.d.ts +2 -0
  58. package/dist/components/organisms/BannerTile/BannerTile.spec.d.ts +1 -0
  59. package/dist/components/organisms/BannerTile/BannerTile.stories.d.ts +12 -0
  60. package/dist/components/organisms/BannerTile/banner-tile-cta.d.ts +1 -0
  61. package/dist/components/organisms/BannerTile/banner-tile-description.d.ts +1 -0
  62. package/dist/components/organisms/BannerTile/banner-tile-media.d.ts +5 -0
  63. package/dist/components/organisms/BannerTile/banner-tile-title.d.ts +1 -0
  64. package/dist/components/organisms/BannerTile/index.d.ts +18 -0
  65. package/dist/components/organisms/BannerTile/styles.d.ts +2 -0
  66. package/dist/components/organisms/ContentTile/ContentTile.spec.d.ts +2 -0
  67. package/dist/components/organisms/ContentTile/ContentTile.stories.d.ts +28 -0
  68. package/dist/components/organisms/ContentTile/content-tile-body.d.ts +1 -0
  69. package/dist/components/organisms/ContentTile/content-tile-container.d.ts +4 -0
  70. package/dist/components/organisms/ContentTile/content-tile-content.d.ts +4 -0
  71. package/dist/components/organisms/ContentTile/content-tile-header.d.ts +1 -0
  72. package/dist/components/organisms/ContentTile/content-tile-media.d.ts +1 -0
  73. package/dist/components/organisms/ContentTile/index.d.ts +21 -0
  74. package/dist/components/organisms/ContentTile/styles.d.ts +2 -0
  75. package/dist/components/organisms/Group/Group.stories.d.ts +10 -0
  76. package/dist/components/organisms/Group/index.d.ts +27 -0
  77. package/dist/components/organisms/PointsTile/PointsTile.spec.d.ts +3 -0
  78. package/dist/components/organisms/PointsTile/PointsTile.stories.d.ts +30 -0
  79. package/dist/components/organisms/PointsTile/index.d.ts +17 -0
  80. package/dist/components/organisms/PointsTile/points-tile-formatted-points.d.ts +1 -0
  81. package/dist/components/organisms/PointsTile/points-tile-media.d.ts +5 -0
  82. package/dist/components/organisms/PointsTile/points-tile-title.d.ts +1 -0
  83. package/dist/components/organisms/PointsTile/styles.d.ts +9 -0
  84. package/dist/components/organisms/RewardCategoryTile/RewardCategoryTile.spec.d.ts +17 -0
  85. package/dist/components/organisms/RewardCategoryTile/RewardCategoryTile.stories.d.ts +24 -0
  86. package/dist/components/organisms/RewardCategoryTile/index.d.ts +14 -0
  87. package/dist/components/organisms/RewardCategoryTile/reward-category-header.d.ts +1 -0
  88. package/dist/components/organisms/RewardCategoryTile/reward-category-media.d.ts +1 -0
  89. package/dist/components/organisms/RewardCategoryTile/styles.d.ts +2 -0
  90. package/dist/components/organisms/RewardTile/RewardTile.spec.d.ts +2 -0
  91. package/dist/components/organisms/RewardTile/RewardTile.stories.d.ts +12 -0
  92. package/dist/components/organisms/RewardTile/index.d.ts +19 -0
  93. package/dist/components/organisms/RewardTile/reward-tile-chevron.d.ts +1 -0
  94. package/dist/components/organisms/RewardTile/reward-tile-media.d.ts +5 -0
  95. package/dist/components/organisms/RewardTile/reward-tile-points.d.ts +1 -0
  96. package/dist/components/organisms/RewardTile/reward-tile-summary.d.ts +1 -0
  97. package/dist/components/organisms/RewardTile/reward-tile-title.d.ts +1 -0
  98. package/dist/components/organisms/RewardTile/styles.d.ts +2 -0
  99. package/dist/components/organisms/Section/Section.spec.d.ts +1 -0
  100. package/dist/components/organisms/Section/Section.stories.d.ts +7 -0
  101. package/dist/components/organisms/Section/index.d.ts +22 -0
  102. package/dist/components/organisms/Section/styles.d.ts +2 -0
  103. package/dist/components/organisms/TierTileUpdated/TierTileUpdated.stories.d.ts +33 -0
  104. package/dist/components/organisms/TierTileUpdated/index.d.ts +15 -0
  105. package/dist/components/organisms/TierTileUpdated/styles.d.ts +36 -0
  106. package/dist/components/organisms/index.d.ts +9 -0
  107. package/dist/constants/device.d.ts +7 -0
  108. package/dist/constants/grid.d.ts +1 -0
  109. package/dist/constants/index.d.ts +3 -0
  110. package/dist/constants/responsive.d.ts +7 -0
  111. package/dist/context/ResponsiveContext.d.ts +4 -0
  112. package/dist/context/WllSdkContext.d.ts +33 -0
  113. package/dist/hooks/useHandleTilePress.d.ts +2 -0
  114. package/dist/hooks/useNavigationHandler.d.ts +3 -0
  115. package/dist/hooks/useResponsive.d.ts +8 -0
  116. package/dist/hooks/useTileSize.d.ts +5 -0
  117. package/dist/index.d.ts +10 -4
  118. package/dist/index.js +7958 -8017
  119. package/dist/index.js.map +1 -1
  120. package/dist/types/common.d.ts +14 -0
  121. package/dist/types/group.d.ts +9 -0
  122. package/dist/types/navigation.d.ts +14 -0
  123. package/dist/types/responsive.d.ts +11 -0
  124. package/dist/types/section.d.ts +23 -0
  125. package/dist/types/theme.d.ts +40 -0
  126. package/dist/types/tile.d.ts +158 -0
  127. package/dist/types/wll.d.ts +60 -0
  128. package/dist/unit-tests/apiHelpers.spec.d.ts +1 -0
  129. package/dist/unit-tests/navigationHelpers.spec.d.ts +1 -0
  130. package/dist/unit-tests/pointsHelpers.spec.d.ts +1 -0
  131. package/dist/unit-tests/responsiveHelper.spec.d.ts +1 -0
  132. package/dist/unit-tests/transforms.spec.d.ts +1 -0
  133. package/dist/unit-tests/useNavigationHandler.spec.d.ts +1 -0
  134. package/dist/utils/apiHelpers.d.ts +28 -0
  135. package/dist/utils/navigationHelpers.d.ts +5 -0
  136. package/dist/utils/pointsHelpers.d.ts +21 -0
  137. package/dist/utils/responsiveHelper.d.ts +2 -0
  138. package/dist/utils/storybookHelpers.d.ts +5 -0
  139. package/dist/utils/storybookThemes.d.ts +74 -0
  140. package/dist/utils/styling.d.ts +26 -0
  141. package/dist/utils/themeHelpers.d.ts +13 -0
  142. package/dist/utils/transforms.d.ts +7 -0
  143. package/dist/utils/variant.d.ts +5 -0
  144. package/package.json +21 -6
@@ -0,0 +1,30 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const StandardPointsBalance: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
+ tile: import("../../../types/tile").Tile;
6
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
+ export declare const CashbackRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
+ tile: import("../../../types/tile").Tile;
9
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
+ export declare const StarRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
+ tile: import("../../../types/tile").Tile;
12
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
13
+ export declare const MileageProgram: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
14
+ tile: import("../../../types/tile").Tile;
15
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
16
+ export declare const CoinPoints: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
17
+ tile: import("../../../types/tile").Tile;
18
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
19
+ export declare const GamifiedCoins: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
20
+ tile: import("../../../types/tile").Tile;
21
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
22
+ export declare const HotelPoints: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
23
+ tile: import("../../../types/tile").Tile;
24
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
25
+ export declare const HalfWithMultiplier: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
26
+ tile: import("../../../types/tile").Tile;
27
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
28
+ export declare const FullWithMultiplier: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
29
+ tile: import("../../../types/tile").Tile;
30
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { Tile } from '../../../types/tile';
3
+ type PointsTileProps = {
4
+ tile: Tile;
5
+ };
6
+ /**
7
+ * The PointsTile component with subcomponents attached.
8
+ */
9
+ export declare const PointsTile: (({ tile }: PointsTileProps) => JSX.Element | null) & {
10
+ Title: () => JSX.Element | null;
11
+ Points: () => JSX.Element | null;
12
+ Media: ({ isFullSize, }: {
13
+ isFullSize: boolean;
14
+ }) => JSX.Element | null;
15
+ };
16
+ declare const _default: (props: Omit<PointsTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
17
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const PointsTileFormattedPoints: () => JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ type PointsTileMediaProps = {
2
+ isFullSize: boolean;
3
+ };
4
+ export declare const PointsTileMedia: ({ isFullSize, }: PointsTileMediaProps) => JSX.Element | null;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const PointsTileTitle: () => JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+ export declare const usePointsTileStyles: (isFullSize?: boolean) => {
3
+ container: ViewStyle;
4
+ contentContainer: ViewStyle;
5
+ suffix: TextStyle;
6
+ pointsWithSuffix: ViewStyle;
7
+ imageContainer: ViewStyle;
8
+ image: ImageStyle;
9
+ };
@@ -0,0 +1,17 @@
1
+ import '@testing-library/jest-dom';
2
+ import { TileHeight, TileType } from '../../../types/tile';
3
+ export declare const RewardCategoryTileMock: {
4
+ tileHeight: TileHeight;
5
+ active: boolean;
6
+ type: TileType;
7
+ configuration: {
8
+ showName: boolean;
9
+ rewardCategoryId: string;
10
+ artworkUrl: string;
11
+ name: string;
12
+ };
13
+ id: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ priority: number;
17
+ };
@@ -0,0 +1,24 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const DiningRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
+ tile: import("../../../types/tile").Tile;
6
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
+ export declare const ExclusiveExperiences: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
+ tile: import("../../../types/tile").Tile;
9
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
+ export declare const InstantRedemption: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
+ tile: import("../../../types/tile").Tile;
12
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
13
+ export declare const TravelPerks: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
14
+ tile: import("../../../types/tile").Tile;
15
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
16
+ export declare const GiftCardsAndVouchers: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
17
+ tile: import("../../../types/tile").Tile;
18
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
19
+ export declare const CharitableDonations: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
20
+ tile: import("../../../types/tile").Tile;
21
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
22
+ export declare const LifestyleRewards: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
23
+ tile: import("../../../types/tile").Tile;
24
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Tile } from '../../../types/tile';
3
+ type RewardCategoryTileProps = {
4
+ tile: Tile;
5
+ };
6
+ /**
7
+ * The RewardCategoryTile component with subcomponents attached.
8
+ */
9
+ export declare const RewardCategoryTile: (({ tile, }: RewardCategoryTileProps) => JSX.Element | null) & {
10
+ Header: () => JSX.Element | null;
11
+ Media: () => JSX.Element | null;
12
+ };
13
+ declare const _default: (props: Omit<RewardCategoryTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
14
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const RewardCategoryHeader: () => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const RewardCategoryMedia: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export declare const useRewardCategoryTileStyles: () => ReturnType<typeof StyleSheet.create>;
@@ -0,0 +1,2 @@
1
+ import { Tile } from '../../../types/tile';
2
+ export declare const RewardTileMock: Tile;
@@ -0,0 +1,12 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
5
+ tile: import("../../../types/tile").Tile;
6
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
7
+ export declare const DefaultWithPoints: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
8
+ tile: import("../../../types/tile").Tile;
9
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
10
+ export declare const ArtworkOnly: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<{
11
+ tile: import("../../../types/tile").Tile;
12
+ }, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps>;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { Tile } from '../../../types/tile';
3
+ type RewardTileProps = {
4
+ tile: Tile;
5
+ };
6
+ /**
7
+ * The RewardTile component with subcomponents attached.
8
+ */
9
+ export declare const RewardTile: (({ tile }: RewardTileProps) => JSX.Element | null) & {
10
+ Media: ({ isArtworkOnly, }: {
11
+ isArtworkOnly: boolean;
12
+ }) => JSX.Element | null;
13
+ Title: () => JSX.Element | null;
14
+ Summary: () => JSX.Element | null;
15
+ Points: () => JSX.Element | null;
16
+ Chevron: () => JSX.Element;
17
+ };
18
+ declare const _default: (props: Omit<RewardTileProps, "tile"> & import("../../hoc/withTileFetching").WithTileFetchingProps) => React.JSX.Element;
19
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const RewardTileChevron: () => JSX.Element;
@@ -0,0 +1,5 @@
1
+ type RewardTileMediaProps = {
2
+ isArtworkOnly: boolean;
3
+ };
4
+ export declare const RewardTileMedia: ({ isArtworkOnly, }: RewardTileMediaProps) => JSX.Element | null;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const RewardTilePoints: () => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const RewardTileSummary: () => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const RewardTileTitle: () => JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export declare const useRewardTileStyles: () => ReturnType<typeof StyleSheet.create>;
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const TravelRewardsSection: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
5
+ section?: import("../../../types/section").TSection;
6
+ sectionId?: string;
7
+ }>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { TSection } from '../../../types/section';
3
+ type SectionContextType = {
4
+ sectionData: TSection;
5
+ };
6
+ type SectionProps = {
7
+ section?: TSection;
8
+ sectionId?: string;
9
+ };
10
+ /**
11
+ * SectionContext provides the current section data to child components.
12
+ */
13
+ export declare const SectionContext: React.Context<SectionContextType | undefined>;
14
+ /**
15
+ * Custom hook to access the SectionContext.
16
+ */
17
+ export declare const useSectionContext: () => SectionContextType;
18
+ /**
19
+ * The Section component renders a section based on its type (e.g., Banner, Grid).
20
+ */
21
+ declare const Section: ({ section, sectionId }: SectionProps) => JSX.Element | null;
22
+ export default Section;
@@ -0,0 +1,2 @@
1
+ import { StyleSheet } from 'react-native';
2
+ export declare const useSectionStyles: () => ReturnType<typeof StyleSheet.create>;
@@ -0,0 +1,33 @@
1
+ import { Meta } from '@storybook/react';
2
+ declare const _default: Meta;
3
+ export default _default;
4
+ export declare const CurrentTier: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
5
+ tile: import("../../../types/tile").Tile;
6
+ }>;
7
+ export declare const CurrentTierHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
8
+ tile: import("../../../types/tile").Tile;
9
+ }>;
10
+ export declare const CurrentTierNoArtwork: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
11
+ tile: import("../../../types/tile").Tile;
12
+ }>;
13
+ export declare const CurrentTierNoArtworkHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
14
+ tile: import("../../../types/tile").Tile;
15
+ }>;
16
+ export declare const CurrentNoTier: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
17
+ tile: import("../../../types/tile").Tile;
18
+ }>;
19
+ export declare const CurrentNoTierHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
20
+ tile: import("../../../types/tile").Tile;
21
+ }>;
22
+ export declare const PointsToTierNotAchieved: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
23
+ tile: import("../../../types/tile").Tile;
24
+ }>;
25
+ export declare const PointsToTierNotAchievedHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
26
+ tile: import("../../../types/tile").Tile;
27
+ }>;
28
+ export declare const PointsToTierAchieved: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
29
+ tile: import("../../../types/tile").Tile;
30
+ }>;
31
+ export declare const PointsToTierAchievedHalf: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, {
32
+ tile: import("../../../types/tile").Tile;
33
+ }>;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Tile } from '../../../types/tile';
3
+ type TierTileProps = {
4
+ tile: Tile;
5
+ };
6
+ type TierTileComponent = React.FC<TierTileProps> & {
7
+ Full: typeof TierTileFull;
8
+ Half: typeof TierTileHalf;
9
+ Empty: typeof TierTileEmpty;
10
+ };
11
+ declare const TierTileFull: React.FC<TierTileProps>;
12
+ declare const TierTileHalf: React.FC<TierTileProps>;
13
+ declare const TierTileEmpty: React.FC<TierTileProps>;
14
+ export declare const TierTile: TierTileComponent;
15
+ export default TierTile;
@@ -0,0 +1,36 @@
1
+ export declare const useTierTileStyles: () => {
2
+ header: {
3
+ flexBasis: "50%";
4
+ width: "100%";
5
+ overflow: "hidden";
6
+ marginBottom: number;
7
+ };
8
+ title: {
9
+ marginBottom: number;
10
+ };
11
+ smallImageContainer: {
12
+ width: number;
13
+ height: number;
14
+ position: "relative";
15
+ };
16
+ smallImage: {
17
+ width: "100%";
18
+ height: "100%";
19
+ resizeMode: "cover";
20
+ position: "absolute";
21
+ top: number;
22
+ left: number;
23
+ right: number;
24
+ bottom: number;
25
+ };
26
+ image: {
27
+ width: "100%";
28
+ height: "100%";
29
+ resizeMode: "cover";
30
+ };
31
+ name: {
32
+ marginBottom: number;
33
+ numberOfLines: number;
34
+ ellipsizeMode: string;
35
+ };
36
+ };
@@ -0,0 +1,9 @@
1
+ export { default as BadgeTile } from './BadgeTile';
2
+ export { default as BannerTile } from './BannerTile';
3
+ export { default as ContentTile } from './ContentTile';
4
+ export { default as Group } from './Group';
5
+ export { default as PointsTile } from './PointsTile';
6
+ export { default as RewardCategoryTile } from './RewardCategoryTile';
7
+ export { default as RewardTile } from './RewardTile';
8
+ export { default as Section } from './Section';
9
+ export { default as TierTileUpdated } from './TierTileUpdated';
@@ -0,0 +1,7 @@
1
+ export declare const IS_WEB: boolean;
2
+ export declare const IS_IOS: boolean;
3
+ export declare const IS_ANDROID: boolean;
4
+ export declare const IS_MOBILE: boolean;
5
+ export declare const IS_DESKTOP: boolean;
6
+ export declare const SCREEN_WIDTH: number;
7
+ export declare const SCREEN_HEIGHT: number;
@@ -0,0 +1 @@
1
+ export declare const GRID_GAP = 16;
@@ -0,0 +1,3 @@
1
+ export declare const MAX_WIDTH = 1080;
2
+ export declare const SLIDE_WIDTH = 1080;
3
+ export declare const BUTTON_SIZE = 42;
@@ -0,0 +1,7 @@
1
+ export declare const DIMENSION_MODES: {
2
+ DESKTOP: "desktop";
3
+ TABLET: "tablet";
4
+ MOBILE: "mobile";
5
+ };
6
+ export declare const TABLET_SCREEN_WIDTH = 728;
7
+ export declare const SMALL_SCREEN_WIDTH = 530;
@@ -0,0 +1,4 @@
1
+ import React, { PropsWithChildren } from 'react';
2
+ import { ResponsiveContextType } from '../types/responsive';
3
+ export declare function ResponsiveProvider({ children }: PropsWithChildren): React.JSX.Element;
4
+ export declare function useResponsive(): ResponsiveContextType;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { TGroup } from '../types/group';
3
+ import { NavigationConfig } from '../types/navigation';
4
+ import { TSection } from '../types/section';
5
+ import { BaseThemeObject, ThemeContextType } from '../types/theme';
6
+ import { CTALinkTarget, Tile } from '../types/tile';
7
+ type Fetcher = <T>(endpoint: string, options?: RequestInit) => Promise<APIResponse<T>>;
8
+ export type SDKConfig = {
9
+ apiKey: string;
10
+ userToken?: string;
11
+ fetcher?: Fetcher;
12
+ locale?: string;
13
+ };
14
+ export type APIResponse<T> = {
15
+ status: 'success' | 'error';
16
+ data: T | null;
17
+ error?: string;
18
+ };
19
+ type WllSdkContextType = ThemeContextType & {
20
+ getGroupByID: (id: string) => Promise<APIResponse<TGroup>>;
21
+ getSectionByID: (id: string) => Promise<APIResponse<TSection>>;
22
+ getTileByID: (id: string) => Promise<APIResponse<Tile>>;
23
+ handleNavigation: (link: string, target: CTALinkTarget) => void;
24
+ };
25
+ type WllSdkProviderProps = {
26
+ children: React.ReactNode;
27
+ theme?: Partial<BaseThemeObject>;
28
+ config: SDKConfig;
29
+ navigationConfig?: NavigationConfig;
30
+ };
31
+ export declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => JSX.Element;
32
+ export declare const useWllSdk: () => WllSdkContextType;
33
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Tile } from '../types/tile';
2
+ export declare const useHandleTilePress: (tile: Tile, ctaLink?: string | null, ctaLinkTarget?: string) => () => void;
@@ -0,0 +1,3 @@
1
+ import { NavigationConfig } from '../types/navigation';
2
+ import { CTALinkTarget } from '../types/tile';
3
+ export declare const useNavigation: (config: NavigationConfig) => (link: string, ctaTarget: CTALinkTarget) => void;
@@ -0,0 +1,8 @@
1
+ import { DimensionMode, WindowDimensions } from '../types/responsive';
2
+ export declare function getDimensionMode(window: WindowDimensions): DimensionMode;
3
+ export declare function useResponsive(): {
4
+ dimensionMode: DimensionMode;
5
+ isDesktop: boolean;
6
+ isTablet: boolean;
7
+ isMobile: boolean;
8
+ };
@@ -0,0 +1,5 @@
1
+ import { Tile } from '../types/tile';
2
+ export declare const useTileSize: (tile: Tile) => {
3
+ isFullSize: boolean;
4
+ isHalfSize: boolean;
5
+ };
package/dist/index.d.ts CHANGED
@@ -222,6 +222,7 @@ declare class ContentTileConfig {
222
222
  }
223
223
  declare class RewardTileConfig {
224
224
  rewardId: string;
225
+ defaultLocale: string;
225
226
  showPrice: boolean;
226
227
  showArtwork?: boolean;
227
228
  showDetails?: boolean;
@@ -330,8 +331,13 @@ type TileConfig = InstanceType<ReturnType<typeof getConfigForTileType>>;
330
331
  type BaseBannerProps = {
331
332
  tile: Tile;
332
333
  children: React__default.ReactNode;
334
+ style?: StyleProp<ViewStyle>;
335
+ onPress?: () => void;
336
+ testID?: string;
337
+ disabled?: boolean;
338
+ accessibilityLabel?: string;
333
339
  };
334
- declare const BaseBanner: ({ tile, children }: BaseBannerProps) => JSX.Element;
340
+ declare const BaseBanner: React__default.FC<BaseBannerProps>;
335
341
 
336
342
  type BaseTileProps = {
337
343
  tile: Tile;
@@ -509,14 +515,14 @@ type TSection = {
509
515
  };
510
516
 
511
517
  type CarouselProps = {
512
- section: TSection;
518
+ section?: TSection;
513
519
  };
514
- declare const Carousel: ({ section }: CarouselProps) => JSX.Element;
520
+ declare const Carousel: ({ section }: CarouselProps) => JSX.Element | null;
515
521
 
516
522
  type GridProps = {
517
523
  section: TSection;
518
524
  };
519
- declare const Grid: ({ section }: GridProps) => React__default.JSX.Element;
525
+ declare const Grid: ({ section }: GridProps) => React__default.JSX.Element | null;
520
526
 
521
527
  type ProgressIndicatorProps = {
522
528
  currentPoints: number;