@wlloyalty/wll-react-sdk 1.0.44 → 1.0.46
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 +82 -68
- package/dist/index.js +455 -349
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
3
|
import * as LucideIcons from 'lucide-react';
|
|
4
4
|
import * as react_native from 'react-native';
|
|
5
|
-
import { ImageSourcePropType, StyleProp, ViewStyle,
|
|
5
|
+
import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps } from 'react-native';
|
|
6
6
|
|
|
7
7
|
declare const sizes: {
|
|
8
8
|
readonly borderRadiusSm: 15;
|
|
@@ -69,8 +69,12 @@ type ButtonProps = {
|
|
|
69
69
|
title: string;
|
|
70
70
|
onPress: () => void;
|
|
71
71
|
variant: Variant;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
accessibilityLabel?: string;
|
|
74
|
+
accessibilityHint?: string;
|
|
75
|
+
testID?: string;
|
|
72
76
|
};
|
|
73
|
-
declare const Button: ({ title, onPress, variant }: ButtonProps) => JSX.Element;
|
|
77
|
+
declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => JSX.Element;
|
|
74
78
|
|
|
75
79
|
type IconName = keyof typeof LucideIcons;
|
|
76
80
|
type IconProps = {
|
|
@@ -78,7 +82,7 @@ type IconProps = {
|
|
|
78
82
|
color?: string;
|
|
79
83
|
size?: number;
|
|
80
84
|
strokeWidth?: number;
|
|
81
|
-
}
|
|
85
|
+
} & Omit<ViewProps, 'style'>;
|
|
82
86
|
declare const Icon: ({ name, color, size, strokeWidth, ...props }: IconProps) => JSX.Element | null;
|
|
83
87
|
|
|
84
88
|
declare const LoadingIndicator: () => JSX.Element;
|
|
@@ -99,12 +103,6 @@ type ProgressiveImageProps = {
|
|
|
99
103
|
};
|
|
100
104
|
declare const ProgressiveImage: ({ source, style, isDesaturated, ...props }: ProgressiveImageProps) => JSX.Element;
|
|
101
105
|
|
|
102
|
-
type RowHeaderProps = {
|
|
103
|
-
children: React$1.ReactNode;
|
|
104
|
-
className?: string;
|
|
105
|
-
} & React$1.ComponentProps<typeof View>;
|
|
106
|
-
declare const RowHeader: ({ children, style, ...props }: RowHeaderProps) => JSX.Element;
|
|
107
|
-
|
|
108
106
|
type TextVariant = 'eyebrow' | 'title' | 'description' | 'body' | 'caption' | 'label' | 'tier-requirement' | 'tier-earned';
|
|
109
107
|
type TextProps = TextProps$1 & {
|
|
110
108
|
variant?: TextVariant;
|
|
@@ -348,20 +346,20 @@ type BaseTileRootProps = {
|
|
|
348
346
|
* BaseTile component with subcomponents attached.
|
|
349
347
|
*/
|
|
350
348
|
declare const BaseTile: (({ tile, children }: BaseTileProps) => JSX.Element) & {
|
|
351
|
-
|
|
352
|
-
Media:
|
|
353
|
-
Content:
|
|
349
|
+
Container: ({ children, style, }: BaseTileRootProps) => JSX.Element;
|
|
350
|
+
Media: (props: ImagePropsNoSource) => JSX.Element | null;
|
|
351
|
+
Content: ({ children, }: {
|
|
354
352
|
children: React__default.ReactNode;
|
|
355
|
-
}
|
|
356
|
-
Header:
|
|
357
|
-
children
|
|
358
|
-
}
|
|
359
|
-
Title:
|
|
353
|
+
}) => JSX.Element | null;
|
|
354
|
+
Header: ({ children, }: {
|
|
355
|
+
children: React__default.ReactNode;
|
|
356
|
+
}) => JSX.Element | null;
|
|
357
|
+
Title: () => JSX.Element | null;
|
|
360
358
|
Body: (props: Omit<react_native.TextProps, "style"> & {
|
|
361
359
|
variant?: "eyebrow" | "title" | "description" | "body" | "caption" | "label" | "tier-requirement" | "tier-earned";
|
|
362
360
|
isSurface?: boolean;
|
|
363
361
|
style?: react_native.TextStyle;
|
|
364
|
-
}) =>
|
|
362
|
+
}) => JSX.Element | null;
|
|
365
363
|
};
|
|
366
364
|
|
|
367
365
|
declare const Indicator: () => JSX.Element;
|
|
@@ -387,7 +385,7 @@ type ImagePropsNoSource = Omit<ImageProps, 'source'>;
|
|
|
387
385
|
type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
388
386
|
type Justify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
389
387
|
type Align = 'start' | 'end' | 'center' | 'stretch' | 'baseline';
|
|
390
|
-
type LayoutProps = {
|
|
388
|
+
type LayoutProps$1 = {
|
|
391
389
|
children: React.ReactNode;
|
|
392
390
|
justify?: Justify;
|
|
393
391
|
align?: Align;
|
|
@@ -397,52 +395,79 @@ type LayoutProps = {
|
|
|
397
395
|
declare const justifyMap: Record<Justify, ViewStyle['justifyContent']>;
|
|
398
396
|
declare const alignMap: Record<Align, ViewStyle['alignItems']>;
|
|
399
397
|
|
|
400
|
-
type
|
|
398
|
+
type ColumnProps = {
|
|
399
|
+
children: React$1.ReactNode;
|
|
401
400
|
justify?: Justify;
|
|
402
401
|
align?: Align;
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
};
|
|
402
|
+
reverse?: boolean;
|
|
403
|
+
flex?: number;
|
|
404
|
+
style?: ViewProps['style'];
|
|
405
|
+
} & Omit<ViewProps, 'style'>;
|
|
408
406
|
/**
|
|
409
|
-
* A Column
|
|
410
|
-
*
|
|
411
|
-
* @param
|
|
412
|
-
* @param justify -
|
|
413
|
-
* @param align -
|
|
414
|
-
* @param
|
|
407
|
+
* A primitive Column component that extends Layout with vertical direction.
|
|
408
|
+
* Provides a cleaner API for creating vertically aligned layouts.
|
|
409
|
+
* @param reverse - When true, reverses the direction of the column (column-reverse)
|
|
410
|
+
* @param justify - The justify content of the column
|
|
411
|
+
* @param align - The align items of the column
|
|
412
|
+
* @param flex - Optional flex number to control the column's flex behavior
|
|
413
|
+
* @param style - Additional styles to apply to the column
|
|
415
414
|
*/
|
|
416
|
-
declare const Column:
|
|
415
|
+
declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) => JSX.Element;
|
|
417
416
|
|
|
418
417
|
/**
|
|
419
|
-
* Props for the
|
|
418
|
+
* Props for the FullFlex component.
|
|
420
419
|
*
|
|
421
420
|
* @param children - The child components to render inside the flex container.
|
|
422
421
|
* @param style - Optional custom styles to apply to the container.
|
|
423
422
|
*/
|
|
424
|
-
type
|
|
423
|
+
type FullFlexProps = {
|
|
425
424
|
children: React__default.ReactNode;
|
|
426
425
|
style?: ViewStyle;
|
|
427
|
-
}
|
|
426
|
+
} & Omit<ViewProps, 'style'>;
|
|
428
427
|
/**
|
|
429
|
-
* A
|
|
428
|
+
* A FullFlex component that provides a flexible container with `flex: 1`.
|
|
430
429
|
*
|
|
431
430
|
* This component is commonly used to create a full-flex container that expands
|
|
432
431
|
* to fill available space in a layout.
|
|
433
432
|
*/
|
|
434
|
-
declare const
|
|
433
|
+
declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) => JSX.Element;
|
|
435
434
|
|
|
435
|
+
type LayoutProps = {
|
|
436
|
+
children: React$1.ReactNode;
|
|
437
|
+
direction?: FlexDirection;
|
|
438
|
+
justify?: Justify;
|
|
439
|
+
align?: Align;
|
|
440
|
+
style?: ViewProps['style'];
|
|
441
|
+
} & Omit<ViewProps, 'style'>;
|
|
436
442
|
/**
|
|
437
|
-
* A
|
|
438
|
-
*
|
|
439
|
-
* @param
|
|
440
|
-
* @param
|
|
441
|
-
* @param
|
|
442
|
-
* @param
|
|
443
|
-
* @
|
|
443
|
+
* A primitive Layout component that provides flexible layout options.
|
|
444
|
+
* @param direction - The direction of the layout (column or row)
|
|
445
|
+
* @param justify - The justify content of the layout
|
|
446
|
+
* @param align - The align items of the layout
|
|
447
|
+
* @param style - Additional styles to apply to the layout
|
|
448
|
+
* @param children - The child components to render inside the layout
|
|
449
|
+
* @returns The rendered Layout component with special paddings
|
|
450
|
+
*/
|
|
451
|
+
declare const Layout: ({ children, direction, justify, align, style, ...rest }: LayoutProps) => JSX.Element;
|
|
452
|
+
|
|
453
|
+
type RowProps = {
|
|
454
|
+
children: React$1.ReactNode;
|
|
455
|
+
justify?: Justify;
|
|
456
|
+
align?: Align;
|
|
457
|
+
reverse?: boolean;
|
|
458
|
+
flex?: number;
|
|
459
|
+
style?: ViewProps['style'];
|
|
460
|
+
} & Omit<ViewProps, 'style'>;
|
|
461
|
+
/**
|
|
462
|
+
* A primitive Row component that extends Layout with horizontal direction.
|
|
463
|
+
* Provides a cleaner API for creating horizontally aligned layouts.
|
|
464
|
+
* @param reverse - When true, reverses the direction of the row (row-reverse)
|
|
465
|
+
* @param justify - The justify content of the row
|
|
466
|
+
* @param align - The align items of the row
|
|
467
|
+
* @param flex - Optional flex number to control the row's flex behavior
|
|
468
|
+
* @param style - Additional styles to apply to the row
|
|
444
469
|
*/
|
|
445
|
-
declare const Row: ({ children, justify, align,
|
|
470
|
+
declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) => JSX.Element;
|
|
446
471
|
|
|
447
472
|
/**
|
|
448
473
|
* Props for the Spacer component.
|
|
@@ -451,25 +476,14 @@ declare const Row: ({ children, justify, align, direction, style, }: LayoutProps
|
|
|
451
476
|
*/
|
|
452
477
|
type SpacerProps = {
|
|
453
478
|
style?: ViewStyle;
|
|
454
|
-
}
|
|
479
|
+
} & Omit<ViewProps, 'style'>;
|
|
455
480
|
/**
|
|
456
481
|
* A simple Spacer component that creates flexible space in layouts.
|
|
457
482
|
*
|
|
458
483
|
* The Spacer is commonly used in flexbox layouts to create adjustable empty space
|
|
459
484
|
* between child elements, avoiding the need for explicit margins or padding.
|
|
460
485
|
*/
|
|
461
|
-
declare const Spacer: ({ style }: SpacerProps) => JSX.Element;
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* A Stack layout component that arranges its children in a flexible stack.
|
|
465
|
-
*
|
|
466
|
-
* @param children - The child components to render inside the stack.
|
|
467
|
-
* @param justify - Defines how children are aligned along the main axis.
|
|
468
|
-
* @param align - Defines how children are aligned along the cross axis.
|
|
469
|
-
* @param direction - The flex direction for the stack (default is 'column').
|
|
470
|
-
* @param style - Additional styles to apply to the container.
|
|
471
|
-
*/
|
|
472
|
-
declare const Stack: ({ children, justify, align, direction, style, }: LayoutProps) => JSX.Element;
|
|
486
|
+
declare const Spacer: ({ style, ...rest }: SpacerProps) => JSX.Element;
|
|
473
487
|
|
|
474
488
|
declare enum SectionType {
|
|
475
489
|
Grid = "GRID",
|
|
@@ -539,6 +553,15 @@ type ContentTileProps = {
|
|
|
539
553
|
};
|
|
540
554
|
declare const _default$3: (props: Omit<ContentTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
|
|
541
555
|
|
|
556
|
+
type TGroup = {
|
|
557
|
+
name: string;
|
|
558
|
+
active: boolean;
|
|
559
|
+
id: string;
|
|
560
|
+
createdAt: string;
|
|
561
|
+
updatedAt: string;
|
|
562
|
+
sections: TSection[];
|
|
563
|
+
};
|
|
564
|
+
|
|
542
565
|
type GroupProps = {
|
|
543
566
|
id: string;
|
|
544
567
|
};
|
|
@@ -591,15 +614,6 @@ declare const TierTileHalf: React$1.FC<TierTileProps>;
|
|
|
591
614
|
declare const TierTileEmpty: React$1.FC<TierTileProps>;
|
|
592
615
|
declare const TierTile: TierTileComponent;
|
|
593
616
|
|
|
594
|
-
type TGroup = {
|
|
595
|
-
name: string;
|
|
596
|
-
active: boolean;
|
|
597
|
-
id: string;
|
|
598
|
-
createdAt: string;
|
|
599
|
-
updatedAt: string;
|
|
600
|
-
sections: TSection[];
|
|
601
|
-
};
|
|
602
|
-
|
|
603
617
|
type NavigationType = 'external' | 'internal' | 'modal';
|
|
604
618
|
type NavigationHandlerParams = {
|
|
605
619
|
target: string;
|
|
@@ -641,4 +655,4 @@ type WllSdkProviderProps = {
|
|
|
641
655
|
declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => JSX.Element;
|
|
642
656
|
declare const useWllSdk: () => WllSdkContextType;
|
|
643
657
|
|
|
644
|
-
export { type APIResponse, type Align, type Availability, type Badge, type BadgeDetail, _default$5 as BadgeTile, BadgeTileConfig, BadgeTileType, _default$4 as BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, Column, _default$3 as ContentTile, ContentTileConfig, type DerivedProperties,
|
|
658
|
+
export { type APIResponse, type Align, type Availability, type Badge, type BadgeDetail, _default$5 as BadgeTile, BadgeTileConfig, BadgeTileType, _default$4 as BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, Column, _default$3 as ContentTile, ContentTileConfig, type DerivedProperties, type FlexDirection, FullFlex, Grid, Group, Icon, type ImagePropsNoSource, Indicator, type Justify, Layout, type LayoutProps$1 as LayoutProps, LoadingIndicator, type NavigationConfig, type NavigationType, _default$2 as PointsTile, PointsTileConfig, type ProgessType, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, type RewardCategory, _default$1 as RewardCategoryTile, RewardCategoryTileConfig, _default as RewardTile, RewardTileConfig, Row, type SDKConfig, Section, SectionHeader, SectionType, type Size, Skeleton, Spacer, type TGroup, type TSection, Text, type ThemeContextType, type ThemeObject, type ThemeProviderProps, TierTileConfig, TierTileType, TierTile as TierTileUpdated, type TierType, type Tile, type TileConfig, TileContainer, TileHeight, TileType, type Variant, WllSdkProvider, alignMap, justifyMap, useWllSdk };
|