@wlloyalty/wll-react-sdk 1.4.4 → 1.4.6

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 (76) hide show
  1. package/dist/index.d.ts +56 -37
  2. package/dist/native.js +535 -1421
  3. package/dist/native.js.map +1 -1
  4. package/dist/types/components/atoms/BaseTile/base-tile-body.d.ts +3 -2
  5. package/dist/types/components/atoms/BaseTile/base-tile-content.d.ts +3 -2
  6. package/dist/types/components/atoms/BaseTile/base-tile-header.d.ts +3 -2
  7. package/dist/types/components/atoms/BaseTile/base-tile-media.d.ts +3 -2
  8. package/dist/types/components/atoms/BaseTile/base-tile-title.d.ts +3 -2
  9. package/dist/types/components/atoms/BaseTile/index.d.ts +8 -7
  10. package/dist/types/components/atoms/Button/index.d.ts +2 -1
  11. package/dist/types/components/atoms/Chip/Chip.spec.d.ts +1 -0
  12. package/dist/types/components/atoms/Chip/Chip.stories.d.ts +7 -0
  13. package/dist/types/components/atoms/Chip/index.d.ts +17 -0
  14. package/dist/types/components/atoms/Chip/styles.d.ts +20 -0
  15. package/dist/types/components/atoms/Icon/index.d.ts +2 -1
  16. package/dist/types/components/atoms/Indicator/index.d.ts +2 -1
  17. package/dist/types/components/atoms/LoadingIndicator/index.d.ts +2 -1
  18. package/dist/types/components/atoms/Primatives/Column.d.ts +1 -1
  19. package/dist/types/components/atoms/Primatives/FullFlex.d.ts +1 -1
  20. package/dist/types/components/atoms/Primatives/Layout.d.ts +1 -1
  21. package/dist/types/components/atoms/Primatives/Row.d.ts +1 -1
  22. package/dist/types/components/atoms/Primatives/Spacer.d.ts +2 -1
  23. package/dist/types/components/atoms/ProgressBar/index.d.ts +2 -1
  24. package/dist/types/components/atoms/ProgressiveImage/index.d.ts +2 -1
  25. package/dist/types/components/atoms/Skeleton/index.d.ts +2 -1
  26. package/dist/types/components/atoms/SkeletonTile/index.d.ts +2 -1
  27. package/dist/types/components/atoms/Text/index.d.ts +4 -3
  28. package/dist/types/components/atoms/TileContainer/index.d.ts +2 -1
  29. package/dist/types/components/atoms/index.d.ts +1 -0
  30. package/dist/types/components/molecules/Carousel/index.d.ts +2 -1
  31. package/dist/types/components/molecules/CarouselNavButton/index.d.ts +2 -1
  32. package/dist/types/components/molecules/ProgressIndicator/index.d.ts +2 -1
  33. package/dist/types/components/molecules/SectionHeader/index.d.ts +2 -1
  34. package/dist/types/components/organisms/BadgeTile/badge-tile-date-earned.d.ts +3 -2
  35. package/dist/types/components/organisms/BadgeTile/badge-tile-description.d.ts +3 -2
  36. package/dist/types/components/organisms/BadgeTile/badge-tile-media.d.ts +2 -2
  37. package/dist/types/components/organisms/BadgeTile/badge-tile-status.d.ts +3 -2
  38. package/dist/types/components/organisms/BadgeTile/badge-tile-title.d.ts +3 -2
  39. package/dist/types/components/organisms/BadgeTile/index.d.ts +6 -6
  40. package/dist/types/components/organisms/BannerTile/banner-tile-cta.d.ts +3 -2
  41. package/dist/types/components/organisms/BannerTile/banner-tile-description.d.ts +3 -2
  42. package/dist/types/components/organisms/BannerTile/banner-tile-media.d.ts +3 -2
  43. package/dist/types/components/organisms/BannerTile/banner-tile-title.d.ts +3 -2
  44. package/dist/types/components/organisms/BannerTile/index.d.ts +5 -5
  45. package/dist/types/components/organisms/ContentTile/content-tile-chevron.d.ts +2 -1
  46. package/dist/types/components/organisms/ContentTile/content-tile-media.d.ts +2 -1
  47. package/dist/types/components/organisms/ContentTile/content-tile-summary.d.ts +2 -1
  48. package/dist/types/components/organisms/ContentTile/content-tile-title.d.ts +2 -1
  49. package/dist/types/components/organisms/ContentTile/index.d.ts +5 -5
  50. package/dist/types/components/organisms/Group/index.d.ts +6 -6
  51. package/dist/types/components/organisms/PointsTile/index.d.ts +5 -5
  52. package/dist/types/components/organisms/PointsTile/points-tile-chevron.d.ts +3 -2
  53. package/dist/types/components/organisms/PointsTile/points-tile-formatted-points.d.ts +3 -2
  54. package/dist/types/components/organisms/PointsTile/points-tile-media.d.ts +3 -2
  55. package/dist/types/components/organisms/PointsTile/points-tile-title.d.ts +3 -2
  56. package/dist/types/components/organisms/RewardCategoryTile/index.d.ts +3 -3
  57. package/dist/types/components/organisms/RewardCategoryTile/reward-category-header.d.ts +3 -2
  58. package/dist/types/components/organisms/RewardCategoryTile/reward-category-media.d.ts +3 -2
  59. package/dist/types/components/organisms/RewardTile/index.d.ts +6 -6
  60. package/dist/types/components/organisms/RewardTile/reward-tile-chevron.d.ts +3 -2
  61. package/dist/types/components/organisms/RewardTile/reward-tile-media.d.ts +3 -2
  62. package/dist/types/components/organisms/RewardTile/reward-tile-points.d.ts +3 -2
  63. package/dist/types/components/organisms/RewardTile/reward-tile-summary.d.ts +3 -2
  64. package/dist/types/components/organisms/RewardTile/reward-tile-title.d.ts +3 -2
  65. package/dist/types/components/organisms/RoundupTile/index.d.ts +5 -5
  66. package/dist/types/components/organisms/RoundupTile/roundup-tile-chevron.d.ts +3 -2
  67. package/dist/types/components/organisms/RoundupTile/roundup-tile-formatted-points.d.ts +3 -2
  68. package/dist/types/components/organisms/RoundupTile/roundup-tile-media.d.ts +3 -2
  69. package/dist/types/components/organisms/RoundupTile/roundup-tile-title.d.ts +3 -2
  70. package/dist/types/components/organisms/Section/index.d.ts +2 -2
  71. package/dist/types/context/WllSdkContext.d.ts +2 -1
  72. package/dist/types/types/tile.d.ts +5 -0
  73. package/dist/types/utils/storybookHelpers.d.ts +1 -1
  74. package/dist/web.js +241 -135
  75. package/dist/web.js.map +1 -1
  76. package/package.json +12 -11
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import * as LucideReactIcons from 'lucide-react';
2
- import * as react_native from 'react-native';
3
- import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps, RefreshControl } from 'react-native';
4
1
  import * as React$1 from 'react';
5
2
  import React__default from 'react';
3
+ import * as LucideReactIcons from 'lucide-react';
4
+ import * as react_native from 'react-native';
5
+ import { ViewProps, ImageSourcePropType, StyleProp, ViewStyle, TextProps as TextProps$1, TextStyle, ImageProps, AccessibilityRole, RefreshControl } from 'react-native';
6
6
 
7
7
  declare const sizes: {
8
8
  readonly borderRadiusSm: 15;
@@ -116,6 +116,11 @@ declare enum TileHeight {
116
116
  Full = "FULL"
117
117
  }
118
118
  type ProgessType = 'NAME' | 'POINTS';
119
+ declare enum StatusVariant {
120
+ PRIMARY = "primary",
121
+ GREEN = "green",
122
+ GREY = "grey"
123
+ }
119
124
  declare class BannerTileConfig {
120
125
  artworkUrl?: string | null;
121
126
  title?: string | null;
@@ -315,7 +320,7 @@ type ButtonProps = {
315
320
  accessibilityHint?: string;
316
321
  testID?: string;
317
322
  };
318
- declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => JSX.Element;
323
+ declare const Button: ({ title, onPress, variant, disabled, accessibilityLabel, accessibilityHint, testID, }: ButtonProps) => React$1.ReactElement;
319
324
 
320
325
  type IconName = keyof typeof LucideReactIcons;
321
326
  type IconProps = {
@@ -324,9 +329,9 @@ type IconProps = {
324
329
  size?: number;
325
330
  strokeWidth?: number;
326
331
  } & Omit<ViewProps, 'style'>;
327
- declare const Icon: ({ name, color, size, strokeWidth, ...props }: IconProps) => JSX.Element | null;
332
+ declare const Icon: ({ name, color, size, strokeWidth, ...props }: IconProps) => React$1.ReactElement | null;
328
333
 
329
- declare const LoadingIndicator: () => JSX.Element;
334
+ declare const LoadingIndicator: () => React$1.ReactElement;
330
335
 
331
336
  type ProgressBarProps = {
332
337
  percentage: number;
@@ -334,7 +339,7 @@ type ProgressBarProps = {
334
339
  height?: Size;
335
340
  animationDuration?: number;
336
341
  };
337
- declare const ProgressBar: ({ percentage, variant, height, animationDuration, }: ProgressBarProps) => JSX.Element;
342
+ declare const ProgressBar: ({ percentage, variant, height, animationDuration, }: ProgressBarProps) => React$1.ReactElement;
338
343
 
339
344
  type ProgressiveImageProps = {
340
345
  source: ImageSourcePropType;
@@ -343,15 +348,15 @@ type ProgressiveImageProps = {
343
348
  alt?: string;
344
349
  [key: string]: any;
345
350
  };
346
- declare const ProgressiveImage: ({ source, style, isDesaturated, alt, ...props }: ProgressiveImageProps) => JSX.Element;
351
+ declare const ProgressiveImage: ({ source, style, isDesaturated, alt, ...props }: ProgressiveImageProps) => React__default.ReactElement;
347
352
 
348
353
  type TextVariant = 'eyebrow' | 'title' | 'description' | 'body' | 'caption' | 'label' | 'tier-requirement' | 'tier-earned';
349
354
  type TextProps = TextProps$1 & {
350
355
  variant?: TextVariant;
351
- style?: TextStyle;
356
+ style?: StyleProp<TextStyle>;
352
357
  isSurface?: boolean;
353
358
  };
354
- declare const Text: ({ variant, style, isSurface, ...props }: TextProps) => JSX.Element;
359
+ declare const Text: ({ variant, style, isSurface, ...props }: TextProps) => React$1.ReactElement;
355
360
 
356
361
  type BaseBannerProps = {
357
362
  tile: Tile;
@@ -374,24 +379,24 @@ type BaseTileRootProps = WithChildren & {
374
379
  /**
375
380
  * BaseTile component with subcomponents attached.
376
381
  */
377
- declare const BaseTile: (({ tile, children, style, }: BaseTileProps) => JSX.Element | null) & {
378
- Container: ({ children, style, }: BaseTileRootProps) => JSX.Element;
379
- Media: (props: ImagePropsNoSource) => JSX.Element | null;
382
+ declare const BaseTile: (({ tile, children, style, }: BaseTileProps) => React__default.ReactElement | null) & {
383
+ Container: ({ children, style, }: BaseTileRootProps) => React__default.ReactElement;
384
+ Media: (props: ImagePropsNoSource) => React__default.ReactElement | null;
380
385
  Content: ({ children, }: {
381
- children?: React.ReactNode;
382
- }) => JSX.Element | null;
386
+ children?: React__default.ReactNode;
387
+ }) => React__default.ReactElement | null;
383
388
  Header: ({ children, }: {
384
- children?: React.ReactNode;
385
- }) => JSX.Element | null;
386
- Title: () => JSX.Element | null;
389
+ children?: React__default.ReactNode;
390
+ }) => React__default.ReactElement | null;
391
+ Title: () => React__default.ReactElement | null;
387
392
  Body: (props: Omit<react_native.TextProps, "style"> & {
388
393
  variant?: "eyebrow" | "title" | "description" | "body" | "caption" | "label" | "tier-requirement" | "tier-earned";
389
394
  isSurface?: boolean;
390
395
  style?: react_native.TextStyle;
391
- }) => JSX.Element | null;
396
+ }) => React__default.ReactElement | null;
392
397
  };
393
398
 
394
- declare const Indicator: () => JSX.Element;
399
+ declare const Indicator: () => React__default.ReactElement;
395
400
 
396
401
  type SkeletonProps = {
397
402
  width?: number | `${number}%`;
@@ -400,7 +405,7 @@ type SkeletonProps = {
400
405
  style?: ViewStyle;
401
406
  numberOfSquares?: number;
402
407
  };
403
- declare const Skeleton: ({ style, numberOfSquares, }: SkeletonProps) => JSX.Element;
408
+ declare const Skeleton: ({ style, numberOfSquares, }: SkeletonProps) => React$1.ReactElement;
404
409
 
405
410
  type TileContainerProps = {
406
411
  tiles: Tile[];
@@ -408,7 +413,7 @@ type TileContainerProps = {
408
413
  /**
409
414
  * TileContainer component to render a list of tiles with proper layout and spacing.
410
415
  */
411
- declare const TileContainer: ({ tiles }: TileContainerProps) => JSX.Element;
416
+ declare const TileContainer: ({ tiles }: TileContainerProps) => React__default.ReactElement;
412
417
 
413
418
  type ImagePropsNoSource = Omit<ImageProps, 'source'>;
414
419
  type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
@@ -441,7 +446,7 @@ type ColumnProps = {
441
446
  * @param flex - Optional flex number to control the column's flex behavior
442
447
  * @param style - Additional styles to apply to the column
443
448
  */
444
- declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) => JSX.Element;
449
+ declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) => React$1.ReactElement;
445
450
 
446
451
  /**
447
452
  * Props for the FullFlex component.
@@ -459,7 +464,7 @@ type FullFlexProps = {
459
464
  * This component is commonly used to create a full-flex container that expands
460
465
  * to fill available space in a layout.
461
466
  */
462
- declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) => JSX.Element;
467
+ declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) => React__default.ReactElement;
463
468
 
464
469
  type LayoutProps = {
465
470
  children: React$1.ReactNode;
@@ -477,7 +482,7 @@ type LayoutProps = {
477
482
  * @param children - The child components to render inside the layout
478
483
  * @returns The rendered Layout component with special paddings
479
484
  */
480
- declare const Layout: ({ children, direction, justify, align, style, ...rest }: LayoutProps) => JSX.Element;
485
+ declare const Layout: ({ children, direction, justify, align, style, ...rest }: LayoutProps) => React$1.ReactElement;
481
486
 
482
487
  type RowProps = {
483
488
  children: React$1.ReactNode;
@@ -496,7 +501,7 @@ type RowProps = {
496
501
  * @param flex - Optional flex number to control the row's flex behavior
497
502
  * @param style - Additional styles to apply to the row
498
503
  */
499
- declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) => JSX.Element;
504
+ declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) => React$1.ReactElement;
500
505
 
501
506
  /**
502
507
  * Props for the Spacer component.
@@ -512,7 +517,21 @@ type SpacerProps = {
512
517
  * The Spacer is commonly used in flexbox layouts to create adjustable empty space
513
518
  * between child elements, avoiding the need for explicit margins or padding.
514
519
  */
515
- declare const Spacer: ({ style, ...rest }: SpacerProps) => JSX.Element;
520
+ declare const Spacer: ({ style, ...rest }: SpacerProps) => React__default.ReactElement;
521
+
522
+ type ChipLabel = React__default.ReactNode;
523
+ type AriaLive = 'polite' | 'assertive' | 'off';
524
+ type ChipProps = {
525
+ label: ChipLabel;
526
+ variant?: StatusVariant;
527
+ role?: AccessibilityRole | 'status';
528
+ ariaLive?: AriaLive;
529
+ accessibilityLabel?: string;
530
+ testID?: string;
531
+ style?: StyleProp<ViewStyle>;
532
+ labelStyle?: StyleProp<TextStyle>;
533
+ };
534
+ declare const Chip: ({ label, variant, role, ariaLive, accessibilityLabel, testID, style, labelStyle, }: ChipProps) => React__default.ReactElement;
516
535
 
517
536
  declare enum SectionType {
518
537
  Grid = "GRID",
@@ -541,13 +560,13 @@ type CarouselProps = {
541
560
  section?: TSection;
542
561
  autoRotateInterval?: number;
543
562
  };
544
- declare const Carousel: ({ section, autoRotateInterval, }: CarouselProps) => JSX.Element | null;
563
+ declare const Carousel: ({ section, autoRotateInterval, }: CarouselProps) => React__default.ReactElement | null;
545
564
 
546
565
  type CarouselNavButtonProps = {
547
566
  direction: 'left' | 'right';
548
567
  onPress: () => void;
549
568
  };
550
- declare const CarouselNavButton: ({ direction, onPress, }: CarouselNavButtonProps) => JSX.Element;
569
+ declare const CarouselNavButton: ({ direction, onPress, }: CarouselNavButtonProps) => React__default.ReactElement;
551
570
 
552
571
  type GridProps = {
553
572
  section: TSection;
@@ -561,13 +580,13 @@ type ProgressIndicatorProps = {
561
580
  height?: Size;
562
581
  attained?: boolean;
563
582
  };
564
- declare const ProgressIndicator: ({ currentPoints, maxPoints, variant, height, attained, }: ProgressIndicatorProps) => JSX.Element;
583
+ declare const ProgressIndicator: ({ currentPoints, maxPoints, variant, height, attained, }: ProgressIndicatorProps) => React$1.ReactElement;
565
584
 
566
585
  type SectionHeaderProps = {
567
586
  title?: string;
568
587
  description?: string;
569
588
  };
570
- declare const SectionHeader: ({ title, description, }: SectionHeaderProps) => JSX.Element | null;
589
+ declare const SectionHeader: ({ title, description, }: SectionHeaderProps) => React__default.ReactElement | null;
571
590
 
572
591
  type WithTileFetchingProps = {
573
592
  tile?: Tile;
@@ -613,9 +632,9 @@ type GroupProps = {
613
632
  *
614
633
  * @param {GroupProps} props - Component props
615
634
  * @param {string} props.id - The unique identifier of the group to fetch and display
616
- * @returns {JSX.Element|null} The rendered group or null if invalid ID
635
+ * @returns {React.ReactElement|null} The rendered group or null if invalid ID
617
636
  */
618
- declare const Group: ({ id, enablePullToRefresh, onRefresh }: GroupProps) => JSX.Element | null;
637
+ declare const Group: ({ id, enablePullToRefresh, onRefresh }: GroupProps) => React__default.ReactElement | null;
619
638
 
620
639
  type PointsTileProps = {
621
640
  tile: Tile;
@@ -642,9 +661,9 @@ type SectionProps = {
642
661
  * @param {SectionProps} props - Component props
643
662
  * @param {TSection} [props.section] - The section data
644
663
  * @param {string} [props.sectionId] - The ID of the section to fetch
645
- * @returns {JSX.Element|null} The rendered section or null if invalid props
664
+ * @returns {React.ReactElement|null} The rendered section or null if invalid props
646
665
  */
647
- declare const Section: ({ section, sectionId }: SectionProps) => JSX.Element | null;
666
+ declare const Section: React__default.FC<SectionProps>;
648
667
 
649
668
  type TierTileProps = {
650
669
  tile: Tile;
@@ -724,7 +743,7 @@ type WllSdkProviderProps = WithChildren & {
724
743
  config: SDKConfig;
725
744
  navigationConfig?: NavigationConfig;
726
745
  };
727
- declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => JSX.Element;
746
+ declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => React__default.ReactElement;
728
747
  declare const useWllSdk: () => WllSdkContextType;
729
748
 
730
749
  /**
@@ -747,4 +766,4 @@ declare function usePullToRefresh({ onRefresh, refreshing: externalRefreshing, }
747
766
  handleRefresh: () => Promise<void>;
748
767
  };
749
768
 
750
- export { type APIResponse, type Align, type AllowedCoreApiUrl, type Availability, type Badge, type BadgeDetail, _default$6 as BadgeTile, BadgeTileConfig, BadgeTileType, _default$5 as BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, CarouselNavButton, Column, _default$4 as ContentTile, ContentTileConfig, CoreApiUrl, type DerivedColors, type DerivedProperties, type DesaturationType, type FlexDirection, FullFlex, Grid, Group, Icon, type ImagePropsNoSource, Indicator, type Justify, Layout, type LayoutProps$1 as LayoutProps, LoadingIndicator, type NavigationConfig, type NavigationType, type PercentageKey, _default$3 as PointsTile, PointsTileConfig, type ProgessType, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, type RewardCategory, _default$2 as RewardCategoryTile, RewardCategoryTileConfig, _default$1 as RewardTile, RewardTileConfig, _default as RoundupTile, RoundupTileConfig, 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, type TileSizeInfo, TileType, type Variant, WllSdkProvider, alignMap, justifyMap, useInvalidateData, usePullToRefresh, useWllSdk };
769
+ export { type APIResponse, type Align, type AllowedCoreApiUrl, type Availability, type Badge, type BadgeDetail, _default$6 as BadgeTile, BadgeTileConfig, BadgeTileType, _default$5 as BannerTile, BannerTileConfig, BaseBanner, type BaseThemeObject, BaseTile, Button, CTALinkTarget, Carousel, CarouselNavButton, Chip, Column, _default$4 as ContentTile, ContentTileConfig, CoreApiUrl, type DerivedColors, type DerivedProperties, type DesaturationType, type FlexDirection, FullFlex, Grid, Group, Icon, type ImagePropsNoSource, Indicator, type Justify, Layout, type LayoutProps$1 as LayoutProps, LoadingIndicator, type NavigationConfig, type NavigationType, type PercentageKey, _default$3 as PointsTile, PointsTileConfig, type ProgessType, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, type RewardCategory, _default$2 as RewardCategoryTile, RewardCategoryTileConfig, _default$1 as RewardTile, RewardTileConfig, _default as RoundupTile, RoundupTileConfig, Row, type SDKConfig, Section, SectionHeader, SectionType, type Size, Skeleton, Spacer, StatusVariant, type TGroup, type TSection, Text, type ThemeContextType, type ThemeObject, type ThemeProviderProps, TierTileConfig, TierTileType, TierTile as TierTileUpdated, type TierType, type Tile, type TileConfig, TileContainer, TileHeight, type TileSizeInfo, TileType, type Variant, WllSdkProvider, alignMap, justifyMap, useInvalidateData, usePullToRefresh, useWllSdk };