@wlloyalty/wll-react-sdk 1.4.4 → 1.4.5
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 +35 -35
- package/dist/native.js +397 -1351
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/BaseTile/base-tile-body.d.ts +3 -2
- package/dist/types/components/atoms/BaseTile/base-tile-content.d.ts +3 -2
- package/dist/types/components/atoms/BaseTile/base-tile-header.d.ts +3 -2
- package/dist/types/components/atoms/BaseTile/base-tile-media.d.ts +3 -2
- package/dist/types/components/atoms/BaseTile/base-tile-title.d.ts +3 -2
- package/dist/types/components/atoms/BaseTile/index.d.ts +8 -7
- package/dist/types/components/atoms/Button/index.d.ts +2 -1
- package/dist/types/components/atoms/Icon/index.d.ts +2 -1
- package/dist/types/components/atoms/Indicator/index.d.ts +2 -1
- package/dist/types/components/atoms/LoadingIndicator/index.d.ts +2 -1
- package/dist/types/components/atoms/Primatives/Column.d.ts +1 -1
- package/dist/types/components/atoms/Primatives/FullFlex.d.ts +1 -1
- package/dist/types/components/atoms/Primatives/Layout.d.ts +1 -1
- package/dist/types/components/atoms/Primatives/Row.d.ts +1 -1
- package/dist/types/components/atoms/Primatives/Spacer.d.ts +2 -1
- package/dist/types/components/atoms/ProgressBar/index.d.ts +2 -1
- package/dist/types/components/atoms/ProgressiveImage/index.d.ts +2 -1
- package/dist/types/components/atoms/Skeleton/index.d.ts +2 -1
- package/dist/types/components/atoms/SkeletonTile/index.d.ts +2 -1
- package/dist/types/components/atoms/Text/index.d.ts +4 -3
- package/dist/types/components/atoms/TileContainer/index.d.ts +2 -1
- package/dist/types/components/molecules/Carousel/index.d.ts +2 -1
- package/dist/types/components/molecules/CarouselNavButton/index.d.ts +2 -1
- package/dist/types/components/molecules/ProgressIndicator/index.d.ts +2 -1
- package/dist/types/components/molecules/SectionHeader/index.d.ts +2 -1
- package/dist/types/components/organisms/BadgeTile/badge-tile-date-earned.d.ts +3 -2
- package/dist/types/components/organisms/BadgeTile/badge-tile-description.d.ts +3 -2
- package/dist/types/components/organisms/BadgeTile/badge-tile-media.d.ts +2 -2
- package/dist/types/components/organisms/BadgeTile/badge-tile-status.d.ts +3 -2
- package/dist/types/components/organisms/BadgeTile/badge-tile-title.d.ts +3 -2
- package/dist/types/components/organisms/BadgeTile/index.d.ts +6 -6
- package/dist/types/components/organisms/BannerTile/banner-tile-cta.d.ts +3 -2
- package/dist/types/components/organisms/BannerTile/banner-tile-description.d.ts +3 -2
- package/dist/types/components/organisms/BannerTile/banner-tile-media.d.ts +3 -2
- package/dist/types/components/organisms/BannerTile/banner-tile-title.d.ts +3 -2
- package/dist/types/components/organisms/BannerTile/index.d.ts +5 -5
- package/dist/types/components/organisms/ContentTile/content-tile-chevron.d.ts +2 -1
- package/dist/types/components/organisms/ContentTile/content-tile-media.d.ts +2 -1
- package/dist/types/components/organisms/ContentTile/content-tile-summary.d.ts +2 -1
- package/dist/types/components/organisms/ContentTile/content-tile-title.d.ts +2 -1
- package/dist/types/components/organisms/ContentTile/index.d.ts +5 -5
- package/dist/types/components/organisms/Group/index.d.ts +6 -6
- package/dist/types/components/organisms/PointsTile/index.d.ts +5 -5
- package/dist/types/components/organisms/PointsTile/points-tile-chevron.d.ts +3 -2
- package/dist/types/components/organisms/PointsTile/points-tile-formatted-points.d.ts +3 -2
- package/dist/types/components/organisms/PointsTile/points-tile-media.d.ts +3 -2
- package/dist/types/components/organisms/PointsTile/points-tile-title.d.ts +3 -2
- package/dist/types/components/organisms/RewardCategoryTile/index.d.ts +3 -3
- package/dist/types/components/organisms/RewardCategoryTile/reward-category-header.d.ts +3 -2
- package/dist/types/components/organisms/RewardCategoryTile/reward-category-media.d.ts +3 -2
- package/dist/types/components/organisms/RewardTile/index.d.ts +6 -6
- package/dist/types/components/organisms/RewardTile/reward-tile-chevron.d.ts +3 -2
- package/dist/types/components/organisms/RewardTile/reward-tile-media.d.ts +3 -2
- package/dist/types/components/organisms/RewardTile/reward-tile-points.d.ts +3 -2
- package/dist/types/components/organisms/RewardTile/reward-tile-summary.d.ts +3 -2
- package/dist/types/components/organisms/RewardTile/reward-tile-title.d.ts +3 -2
- package/dist/types/components/organisms/RoundupTile/index.d.ts +5 -5
- package/dist/types/components/organisms/RoundupTile/roundup-tile-chevron.d.ts +3 -2
- package/dist/types/components/organisms/RoundupTile/roundup-tile-formatted-points.d.ts +3 -2
- package/dist/types/components/organisms/RoundupTile/roundup-tile-media.d.ts +3 -2
- package/dist/types/components/organisms/RoundupTile/roundup-tile-title.d.ts +3 -2
- package/dist/types/components/organisms/Section/index.d.ts +2 -2
- package/dist/types/context/WllSdkContext.d.ts +2 -1
- package/dist/types/utils/storybookHelpers.d.ts +1 -1
- package/dist/web.js +42 -42
- package/dist/web.js.map +1 -1
- package/package.json +12 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default from 'react';
|
|
1
3
|
import * as LucideReactIcons from 'lucide-react';
|
|
2
4
|
import * as react_native from 'react-native';
|
|
3
5
|
import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps, RefreshControl } from 'react-native';
|
|
4
|
-
import * as React$1 from 'react';
|
|
5
|
-
import React__default from 'react';
|
|
6
6
|
|
|
7
7
|
declare const sizes: {
|
|
8
8
|
readonly borderRadiusSm: 15;
|
|
@@ -315,7 +315,7 @@ type ButtonProps = {
|
|
|
315
315
|
accessibilityHint?: string;
|
|
316
316
|
testID?: string;
|
|
317
317
|
};
|
|
318
|
-
declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) =>
|
|
318
|
+
declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => React$1.ReactElement;
|
|
319
319
|
|
|
320
320
|
type IconName = keyof typeof LucideReactIcons;
|
|
321
321
|
type IconProps = {
|
|
@@ -324,9 +324,9 @@ type IconProps = {
|
|
|
324
324
|
size?: number;
|
|
325
325
|
strokeWidth?: number;
|
|
326
326
|
} & Omit<ViewProps, 'style'>;
|
|
327
|
-
declare const Icon: ({ name, color, size, strokeWidth, ...props }: IconProps) =>
|
|
327
|
+
declare const Icon: ({ name, color, size, strokeWidth, ...props }: IconProps) => React$1.ReactElement | null;
|
|
328
328
|
|
|
329
|
-
declare const LoadingIndicator: () =>
|
|
329
|
+
declare const LoadingIndicator: () => React$1.ReactElement;
|
|
330
330
|
|
|
331
331
|
type ProgressBarProps = {
|
|
332
332
|
percentage: number;
|
|
@@ -334,7 +334,7 @@ type ProgressBarProps = {
|
|
|
334
334
|
height?: Size;
|
|
335
335
|
animationDuration?: number;
|
|
336
336
|
};
|
|
337
|
-
declare const ProgressBar: ({ percentage, variant, height, animationDuration, }: ProgressBarProps) =>
|
|
337
|
+
declare const ProgressBar: ({ percentage, variant, height, animationDuration, }: ProgressBarProps) => React$1.ReactElement;
|
|
338
338
|
|
|
339
339
|
type ProgressiveImageProps = {
|
|
340
340
|
source: ImageSourcePropType;
|
|
@@ -343,15 +343,15 @@ type ProgressiveImageProps = {
|
|
|
343
343
|
alt?: string;
|
|
344
344
|
[key: string]: any;
|
|
345
345
|
};
|
|
346
|
-
declare const ProgressiveImage: ({ source, style, isDesaturated, alt, ...props }: ProgressiveImageProps) =>
|
|
346
|
+
declare const ProgressiveImage: ({ source, style, isDesaturated, alt, ...props }: ProgressiveImageProps) => React__default.ReactElement;
|
|
347
347
|
|
|
348
348
|
type TextVariant = 'eyebrow' | 'title' | 'description' | 'body' | 'caption' | 'label' | 'tier-requirement' | 'tier-earned';
|
|
349
349
|
type TextProps = TextProps$1 & {
|
|
350
350
|
variant?: TextVariant;
|
|
351
|
-
style?: TextStyle
|
|
351
|
+
style?: StyleProp<TextStyle>;
|
|
352
352
|
isSurface?: boolean;
|
|
353
353
|
};
|
|
354
|
-
declare const Text: ({ variant, style, isSurface, ...props }: TextProps) =>
|
|
354
|
+
declare const Text: ({ variant, style, isSurface, ...props }: TextProps) => React$1.ReactElement;
|
|
355
355
|
|
|
356
356
|
type BaseBannerProps = {
|
|
357
357
|
tile: Tile;
|
|
@@ -374,24 +374,24 @@ type BaseTileRootProps = WithChildren & {
|
|
|
374
374
|
/**
|
|
375
375
|
* BaseTile component with subcomponents attached.
|
|
376
376
|
*/
|
|
377
|
-
declare const BaseTile: (({ tile, children, style, }: BaseTileProps) =>
|
|
378
|
-
Container: ({ children, style, }: BaseTileRootProps) =>
|
|
379
|
-
Media: (props: ImagePropsNoSource) =>
|
|
377
|
+
declare const BaseTile: (({ tile, children, style, }: BaseTileProps) => React__default.ReactElement | null) & {
|
|
378
|
+
Container: ({ children, style, }: BaseTileRootProps) => React__default.ReactElement;
|
|
379
|
+
Media: (props: ImagePropsNoSource) => React__default.ReactElement | null;
|
|
380
380
|
Content: ({ children, }: {
|
|
381
|
-
children?:
|
|
382
|
-
}) =>
|
|
381
|
+
children?: React__default.ReactNode;
|
|
382
|
+
}) => React__default.ReactElement | null;
|
|
383
383
|
Header: ({ children, }: {
|
|
384
|
-
children?:
|
|
385
|
-
}) =>
|
|
386
|
-
Title: () =>
|
|
384
|
+
children?: React__default.ReactNode;
|
|
385
|
+
}) => React__default.ReactElement | null;
|
|
386
|
+
Title: () => React__default.ReactElement | null;
|
|
387
387
|
Body: (props: Omit<react_native.TextProps, "style"> & {
|
|
388
388
|
variant?: "eyebrow" | "title" | "description" | "body" | "caption" | "label" | "tier-requirement" | "tier-earned";
|
|
389
389
|
isSurface?: boolean;
|
|
390
390
|
style?: react_native.TextStyle;
|
|
391
|
-
}) =>
|
|
391
|
+
}) => React__default.ReactElement | null;
|
|
392
392
|
};
|
|
393
393
|
|
|
394
|
-
declare const Indicator: () =>
|
|
394
|
+
declare const Indicator: () => React__default.ReactElement;
|
|
395
395
|
|
|
396
396
|
type SkeletonProps = {
|
|
397
397
|
width?: number | `${number}%`;
|
|
@@ -400,7 +400,7 @@ type SkeletonProps = {
|
|
|
400
400
|
style?: ViewStyle;
|
|
401
401
|
numberOfSquares?: number;
|
|
402
402
|
};
|
|
403
|
-
declare const Skeleton: ({ style, numberOfSquares, }: SkeletonProps) =>
|
|
403
|
+
declare const Skeleton: ({ style, numberOfSquares, }: SkeletonProps) => React$1.ReactElement;
|
|
404
404
|
|
|
405
405
|
type TileContainerProps = {
|
|
406
406
|
tiles: Tile[];
|
|
@@ -408,7 +408,7 @@ type TileContainerProps = {
|
|
|
408
408
|
/**
|
|
409
409
|
* TileContainer component to render a list of tiles with proper layout and spacing.
|
|
410
410
|
*/
|
|
411
|
-
declare const TileContainer: ({ tiles }: TileContainerProps) =>
|
|
411
|
+
declare const TileContainer: ({ tiles }: TileContainerProps) => React__default.ReactElement;
|
|
412
412
|
|
|
413
413
|
type ImagePropsNoSource = Omit<ImageProps, 'source'>;
|
|
414
414
|
type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
@@ -441,7 +441,7 @@ type ColumnProps = {
|
|
|
441
441
|
* @param flex - Optional flex number to control the column's flex behavior
|
|
442
442
|
* @param style - Additional styles to apply to the column
|
|
443
443
|
*/
|
|
444
|
-
declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) =>
|
|
444
|
+
declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) => React$1.ReactElement;
|
|
445
445
|
|
|
446
446
|
/**
|
|
447
447
|
* Props for the FullFlex component.
|
|
@@ -459,7 +459,7 @@ type FullFlexProps = {
|
|
|
459
459
|
* This component is commonly used to create a full-flex container that expands
|
|
460
460
|
* to fill available space in a layout.
|
|
461
461
|
*/
|
|
462
|
-
declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) =>
|
|
462
|
+
declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) => React__default.ReactElement;
|
|
463
463
|
|
|
464
464
|
type LayoutProps = {
|
|
465
465
|
children: React$1.ReactNode;
|
|
@@ -477,7 +477,7 @@ type LayoutProps = {
|
|
|
477
477
|
* @param children - The child components to render inside the layout
|
|
478
478
|
* @returns The rendered Layout component with special paddings
|
|
479
479
|
*/
|
|
480
|
-
declare const Layout: ({ children, direction, justify, align, style, ...rest }: LayoutProps) =>
|
|
480
|
+
declare const Layout: ({ children, direction, justify, align, style, ...rest }: LayoutProps) => React$1.ReactElement;
|
|
481
481
|
|
|
482
482
|
type RowProps = {
|
|
483
483
|
children: React$1.ReactNode;
|
|
@@ -496,7 +496,7 @@ type RowProps = {
|
|
|
496
496
|
* @param flex - Optional flex number to control the row's flex behavior
|
|
497
497
|
* @param style - Additional styles to apply to the row
|
|
498
498
|
*/
|
|
499
|
-
declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) =>
|
|
499
|
+
declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) => React$1.ReactElement;
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
* Props for the Spacer component.
|
|
@@ -512,7 +512,7 @@ type SpacerProps = {
|
|
|
512
512
|
* The Spacer is commonly used in flexbox layouts to create adjustable empty space
|
|
513
513
|
* between child elements, avoiding the need for explicit margins or padding.
|
|
514
514
|
*/
|
|
515
|
-
declare const Spacer: ({ style, ...rest }: SpacerProps) =>
|
|
515
|
+
declare const Spacer: ({ style, ...rest }: SpacerProps) => React__default.ReactElement;
|
|
516
516
|
|
|
517
517
|
declare enum SectionType {
|
|
518
518
|
Grid = "GRID",
|
|
@@ -541,13 +541,13 @@ type CarouselProps = {
|
|
|
541
541
|
section?: TSection;
|
|
542
542
|
autoRotateInterval?: number;
|
|
543
543
|
};
|
|
544
|
-
declare const Carousel: ({ section, autoRotateInterval, }: CarouselProps) =>
|
|
544
|
+
declare const Carousel: ({ section, autoRotateInterval, }: CarouselProps) => React__default.ReactElement | null;
|
|
545
545
|
|
|
546
546
|
type CarouselNavButtonProps = {
|
|
547
547
|
direction: 'left' | 'right';
|
|
548
548
|
onPress: () => void;
|
|
549
549
|
};
|
|
550
|
-
declare const CarouselNavButton: ({ direction, onPress, }: CarouselNavButtonProps) =>
|
|
550
|
+
declare const CarouselNavButton: ({ direction, onPress, }: CarouselNavButtonProps) => React__default.ReactElement;
|
|
551
551
|
|
|
552
552
|
type GridProps = {
|
|
553
553
|
section: TSection;
|
|
@@ -561,13 +561,13 @@ type ProgressIndicatorProps = {
|
|
|
561
561
|
height?: Size;
|
|
562
562
|
attained?: boolean;
|
|
563
563
|
};
|
|
564
|
-
declare const ProgressIndicator: ({ currentPoints, maxPoints, variant, height, attained, }: ProgressIndicatorProps) =>
|
|
564
|
+
declare const ProgressIndicator: ({ currentPoints, maxPoints, variant, height, attained, }: ProgressIndicatorProps) => React$1.ReactElement;
|
|
565
565
|
|
|
566
566
|
type SectionHeaderProps = {
|
|
567
567
|
title?: string;
|
|
568
568
|
description?: string;
|
|
569
569
|
};
|
|
570
|
-
declare const SectionHeader: ({ title, description, }: SectionHeaderProps) =>
|
|
570
|
+
declare const SectionHeader: ({ title, description, }: SectionHeaderProps) => React__default.ReactElement | null;
|
|
571
571
|
|
|
572
572
|
type WithTileFetchingProps = {
|
|
573
573
|
tile?: Tile;
|
|
@@ -613,9 +613,9 @@ type GroupProps = {
|
|
|
613
613
|
*
|
|
614
614
|
* @param {GroupProps} props - Component props
|
|
615
615
|
* @param {string} props.id - The unique identifier of the group to fetch and display
|
|
616
|
-
* @returns {
|
|
616
|
+
* @returns {React.ReactElement|null} The rendered group or null if invalid ID
|
|
617
617
|
*/
|
|
618
|
-
declare const Group: ({ id, enablePullToRefresh, onRefresh }: GroupProps) =>
|
|
618
|
+
declare const Group: ({ id, enablePullToRefresh, onRefresh }: GroupProps) => React__default.ReactElement | null;
|
|
619
619
|
|
|
620
620
|
type PointsTileProps = {
|
|
621
621
|
tile: Tile;
|
|
@@ -642,9 +642,9 @@ type SectionProps = {
|
|
|
642
642
|
* @param {SectionProps} props - Component props
|
|
643
643
|
* @param {TSection} [props.section] - The section data
|
|
644
644
|
* @param {string} [props.sectionId] - The ID of the section to fetch
|
|
645
|
-
* @returns {
|
|
645
|
+
* @returns {React.ReactElement|null} The rendered section or null if invalid props
|
|
646
646
|
*/
|
|
647
|
-
declare const Section:
|
|
647
|
+
declare const Section: React__default.FC<SectionProps>;
|
|
648
648
|
|
|
649
649
|
type TierTileProps = {
|
|
650
650
|
tile: Tile;
|
|
@@ -724,7 +724,7 @@ type WllSdkProviderProps = WithChildren & {
|
|
|
724
724
|
config: SDKConfig;
|
|
725
725
|
navigationConfig?: NavigationConfig;
|
|
726
726
|
};
|
|
727
|
-
declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) =>
|
|
727
|
+
declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => React__default.ReactElement;
|
|
728
728
|
declare const useWllSdk: () => WllSdkContextType;
|
|
729
729
|
|
|
730
730
|
/**
|