@wlloyalty/wll-react-sdk 1.0.45 → 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 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, TextProps as TextProps$1, TextStyle, ImageProps } from 'react-native';
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;
@@ -342,20 +346,20 @@ type BaseTileRootProps = {
342
346
  * BaseTile component with subcomponents attached.
343
347
  */
344
348
  declare const BaseTile: (({ tile, children }: BaseTileProps) => JSX.Element) & {
345
- Root: ({ children, style }: BaseTileRootProps) => JSX.Element;
346
- Media: React__default.FC<ImagePropsNoSource>;
347
- Content: React__default.FC<{
349
+ Container: ({ children, style, }: BaseTileRootProps) => JSX.Element;
350
+ Media: (props: ImagePropsNoSource) => JSX.Element | null;
351
+ Content: ({ children, }: {
352
+ children: React__default.ReactNode;
353
+ }) => JSX.Element | null;
354
+ Header: ({ children, }: {
348
355
  children: React__default.ReactNode;
349
- }>;
350
- Header: React__default.FC<{
351
- children?: React__default.ReactNode;
352
- }>;
353
- Title: React__default.FC;
356
+ }) => JSX.Element | null;
357
+ Title: () => JSX.Element | null;
354
358
  Body: (props: Omit<react_native.TextProps, "style"> & {
355
359
  variant?: "eyebrow" | "title" | "description" | "body" | "caption" | "label" | "tier-requirement" | "tier-earned";
356
360
  isSurface?: boolean;
357
361
  style?: react_native.TextStyle;
358
- }) => React__default.JSX.Element | null;
362
+ }) => JSX.Element | null;
359
363
  };
360
364
 
361
365
  declare const Indicator: () => JSX.Element;
@@ -377,46 +381,93 @@ type TileContainerProps = {
377
381
  */
378
382
  declare const TileContainer: ({ tiles }: TileContainerProps) => JSX.Element;
379
383
 
384
+ type ImagePropsNoSource = Omit<ImageProps, 'source'>;
385
+ type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
386
+ type Justify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
387
+ type Align = 'start' | 'end' | 'center' | 'stretch' | 'baseline';
388
+ type LayoutProps$1 = {
389
+ children: React.ReactNode;
390
+ justify?: Justify;
391
+ align?: Align;
392
+ direction?: FlexDirection;
393
+ style?: ViewStyle;
394
+ };
395
+ declare const justifyMap: Record<Justify, ViewStyle['justifyContent']>;
396
+ declare const alignMap: Record<Align, ViewStyle['alignItems']>;
397
+
398
+ type ColumnProps = {
399
+ children: React$1.ReactNode;
400
+ justify?: Justify;
401
+ align?: Align;
402
+ reverse?: boolean;
403
+ flex?: number;
404
+ style?: ViewProps['style'];
405
+ } & Omit<ViewProps, 'style'>;
406
+ /**
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
414
+ */
415
+ declare const Column: ({ children, justify, align, reverse, flex, style, ...rest }: ColumnProps) => JSX.Element;
416
+
380
417
  /**
381
- * Props for the FlexBox component.
418
+ * Props for the FullFlex component.
382
419
  *
383
420
  * @param children - The child components to render inside the flex container.
384
421
  * @param style - Optional custom styles to apply to the container.
385
422
  */
386
- type FlexBoxProps = {
423
+ type FullFlexProps = {
387
424
  children: React__default.ReactNode;
388
425
  style?: ViewStyle;
389
- };
426
+ } & Omit<ViewProps, 'style'>;
390
427
  /**
391
- * A FlexBox component that provides a flexible container with `flex: 1`.
428
+ * A FullFlex component that provides a flexible container with `flex: 1`.
392
429
  *
393
430
  * This component is commonly used to create a full-flex container that expands
394
431
  * to fill available space in a layout.
395
432
  */
396
- declare const FlexBox: ({ children, style }: FlexBoxProps) => JSX.Element;
433
+ declare const FullFlex: ({ children, style, ...rest }: FullFlexProps) => JSX.Element;
397
434
 
398
- type ImagePropsNoSource = Omit<ImageProps, 'source'>;
399
- type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
400
- type Justify = 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
401
- type Align = 'start' | 'end' | 'center' | 'stretch' | 'baseline';
402
- type LayoutProps$1 = {
403
- children: React.ReactNode;
435
+ type LayoutProps = {
436
+ children: React$1.ReactNode;
437
+ direction?: FlexDirection;
404
438
  justify?: Justify;
405
439
  align?: Align;
406
- direction?: FlexDirection;
407
- style?: ViewStyle;
408
- };
409
- declare const justifyMap: Record<Justify, ViewStyle['justifyContent']>;
410
- declare const alignMap: Record<Align, ViewStyle['alignItems']>;
440
+ style?: ViewProps['style'];
441
+ } & Omit<ViewProps, 'style'>;
442
+ /**
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;
411
452
 
412
- type LayoutProps = {
453
+ type RowProps = {
413
454
  children: React$1.ReactNode;
414
455
  justify?: Justify;
415
456
  align?: Align;
416
- direction?: FlexDirection;
417
- style?: ViewStyle;
418
- };
419
- declare const Layout: ({ children, justify, align, direction, style, }: LayoutProps) => JSX.Element;
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
469
+ */
470
+ declare const Row: ({ children, justify, align, reverse, flex, style, ...rest }: RowProps) => JSX.Element;
420
471
 
421
472
  /**
422
473
  * Props for the Spacer component.
@@ -425,14 +476,14 @@ declare const Layout: ({ children, justify, align, direction, style, }: LayoutPr
425
476
  */
426
477
  type SpacerProps = {
427
478
  style?: ViewStyle;
428
- };
479
+ } & Omit<ViewProps, 'style'>;
429
480
  /**
430
481
  * A simple Spacer component that creates flexible space in layouts.
431
482
  *
432
483
  * The Spacer is commonly used in flexbox layouts to create adjustable empty space
433
484
  * between child elements, avoiding the need for explicit margins or padding.
434
485
  */
435
- declare const Spacer: ({ style }: SpacerProps) => JSX.Element;
486
+ declare const Spacer: ({ style, ...rest }: SpacerProps) => JSX.Element;
436
487
 
437
488
  declare enum SectionType {
438
489
  Grid = "GRID",
@@ -502,6 +553,15 @@ type ContentTileProps = {
502
553
  };
503
554
  declare const _default$3: (props: Omit<ContentTileProps, "tile"> & WithTileFetchingProps) => React__default.JSX.Element;
504
555
 
556
+ type TGroup = {
557
+ name: string;
558
+ active: boolean;
559
+ id: string;
560
+ createdAt: string;
561
+ updatedAt: string;
562
+ sections: TSection[];
563
+ };
564
+
505
565
  type GroupProps = {
506
566
  id: string;
507
567
  };
@@ -554,15 +614,6 @@ declare const TierTileHalf: React$1.FC<TierTileProps>;
554
614
  declare const TierTileEmpty: React$1.FC<TierTileProps>;
555
615
  declare const TierTile: TierTileComponent;
556
616
 
557
- type TGroup = {
558
- name: string;
559
- active: boolean;
560
- id: string;
561
- createdAt: string;
562
- updatedAt: string;
563
- sections: TSection[];
564
- };
565
-
566
617
  type NavigationType = 'external' | 'internal' | 'modal';
567
618
  type NavigationHandlerParams = {
568
619
  target: string;
@@ -604,4 +655,4 @@ type WllSdkProviderProps = {
604
655
  declare const WllSdkProvider: ({ children, theme: providedTheme, config, navigationConfig, }: WllSdkProviderProps) => JSX.Element;
605
656
  declare const useWllSdk: () => WllSdkContextType;
606
657
 
607
- 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, _default$3 as ContentTile, ContentTileConfig, type DerivedProperties, FlexBox, type FlexDirection, 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, 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 };
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 };