@wlloyalty/wll-react-sdk 1.8.1 → 1.10.0-alpha.20260628090616.f2fb2a1
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 +66 -48
- package/dist/native.js +148 -552
- package/dist/native.js.map +1 -1
- package/dist/types/components/atoms/Chip/styles.d.ts +1 -1
- package/dist/types/components/organisms/ContentTile/content-tile-media.d.ts +5 -0
- package/dist/types/types/theme.d.ts +19 -2
- package/dist/types/utils/storybookThemes.d.ts +5 -0
- package/dist/web.js +1055 -19241
- package/dist/web.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -4,52 +4,6 @@ import * as LucideReactIcons from 'lucide-react';
|
|
|
4
4
|
import * as react_native from 'react-native';
|
|
5
5
|
import { ViewProps, ImageSourcePropType, StyleProp, TextProps as TextProps$1, TextStyle, ViewStyle, ImageProps, AccessibilityRole, RefreshControl } from 'react-native';
|
|
6
6
|
|
|
7
|
-
declare const sizes: {
|
|
8
|
-
readonly borderRadiusSm: 15;
|
|
9
|
-
readonly borderRadiusLg: 20;
|
|
10
|
-
readonly borderRadiusButton: 9;
|
|
11
|
-
readonly borderRadiusRounded: 9999;
|
|
12
|
-
readonly xxxs: 4;
|
|
13
|
-
readonly xxs: 8;
|
|
14
|
-
readonly xs: 10;
|
|
15
|
-
readonly sm: 12;
|
|
16
|
-
readonly md: 14;
|
|
17
|
-
readonly lg: 16;
|
|
18
|
-
readonly xl: 20;
|
|
19
|
-
readonly xxl: 24;
|
|
20
|
-
readonly xxxl: 32;
|
|
21
|
-
readonly xxxxl: 40;
|
|
22
|
-
readonly xxxxxl: 60;
|
|
23
|
-
};
|
|
24
|
-
declare const commonStyles: {
|
|
25
|
-
emptyContainer: {
|
|
26
|
-
flex: number;
|
|
27
|
-
justifyContent: "center";
|
|
28
|
-
alignItems: "center";
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
declare const defaultTheme: BaseThemeObject;
|
|
32
|
-
/**
|
|
33
|
-
* Creates appropriate directional margin styles for both web and native platforms.
|
|
34
|
-
* Handles RTL layouts correctly across platforms by using the I18nManager.
|
|
35
|
-
*
|
|
36
|
-
* @param value - The margin value to apply
|
|
37
|
-
* @returns An object with the appropriate margin style property
|
|
38
|
-
*/
|
|
39
|
-
declare const getDirectionalMargin: (value: number) => {
|
|
40
|
-
marginLeft: number;
|
|
41
|
-
marginRight?: undefined;
|
|
42
|
-
marginEnd?: undefined;
|
|
43
|
-
} | {
|
|
44
|
-
marginRight: number;
|
|
45
|
-
marginLeft?: undefined;
|
|
46
|
-
marginEnd?: undefined;
|
|
47
|
-
} | {
|
|
48
|
-
marginEnd: number;
|
|
49
|
-
marginLeft?: undefined;
|
|
50
|
-
marginRight?: undefined;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
7
|
/**
|
|
54
8
|
* Adds optional children to any component props.
|
|
55
9
|
*/
|
|
@@ -316,6 +270,23 @@ type DerivedColors = {
|
|
|
316
270
|
[K in PercentageKey]: string;
|
|
317
271
|
};
|
|
318
272
|
type DesaturationType = BadgeTileType.Specific | BadgeTileType.Latest;
|
|
273
|
+
type Sizes = {
|
|
274
|
+
borderRadiusSm: number;
|
|
275
|
+
borderRadiusLg: number;
|
|
276
|
+
borderRadiusButton: number;
|
|
277
|
+
borderRadiusRounded: number;
|
|
278
|
+
xxxs: number;
|
|
279
|
+
xxs: number;
|
|
280
|
+
xs: number;
|
|
281
|
+
sm: number;
|
|
282
|
+
md: number;
|
|
283
|
+
lg: number;
|
|
284
|
+
xl: number;
|
|
285
|
+
xxl: number;
|
|
286
|
+
xxxl: number;
|
|
287
|
+
xxxxl: number;
|
|
288
|
+
xxxxxl: number;
|
|
289
|
+
};
|
|
319
290
|
type BaseThemeObject = {
|
|
320
291
|
fontFamily: string;
|
|
321
292
|
accent: string;
|
|
@@ -329,6 +300,7 @@ type BaseThemeObject = {
|
|
|
329
300
|
surface: string;
|
|
330
301
|
surfaceText: string;
|
|
331
302
|
text: string;
|
|
303
|
+
sizes?: Partial<Sizes>;
|
|
332
304
|
};
|
|
333
305
|
type DerivedProperties = {
|
|
334
306
|
accentText: string;
|
|
@@ -342,7 +314,7 @@ type DerivedProperties = {
|
|
|
342
314
|
alphaDerivedText: DerivedColors;
|
|
343
315
|
};
|
|
344
316
|
type ThemeObject = BaseThemeObject & DerivedProperties & {
|
|
345
|
-
|
|
317
|
+
sizes: Sizes;
|
|
346
318
|
};
|
|
347
319
|
type ThemeContextType = {
|
|
348
320
|
theme: ThemeObject;
|
|
@@ -909,6 +881,52 @@ declare const useGetGroupByID: (config: SDKConfig) => (id: string) => Promise<AP
|
|
|
909
881
|
declare const useGetSectionByID: (config: SDKConfig) => (id: string) => Promise<APIResponse<unknown>>;
|
|
910
882
|
declare const useGetTileByID: (config: SDKConfig) => (id: string) => Promise<APIResponse<unknown>>;
|
|
911
883
|
|
|
884
|
+
declare const sizes: {
|
|
885
|
+
readonly borderRadiusSm: 15;
|
|
886
|
+
readonly borderRadiusLg: 20;
|
|
887
|
+
readonly borderRadiusButton: 9;
|
|
888
|
+
readonly borderRadiusRounded: 9999;
|
|
889
|
+
readonly xxxs: 4;
|
|
890
|
+
readonly xxs: 8;
|
|
891
|
+
readonly xs: 10;
|
|
892
|
+
readonly sm: 12;
|
|
893
|
+
readonly md: 14;
|
|
894
|
+
readonly lg: 16;
|
|
895
|
+
readonly xl: 20;
|
|
896
|
+
readonly xxl: 24;
|
|
897
|
+
readonly xxxl: 32;
|
|
898
|
+
readonly xxxxl: 40;
|
|
899
|
+
readonly xxxxxl: 60;
|
|
900
|
+
};
|
|
901
|
+
declare const commonStyles: {
|
|
902
|
+
emptyContainer: {
|
|
903
|
+
flex: number;
|
|
904
|
+
justifyContent: "center";
|
|
905
|
+
alignItems: "center";
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
declare const defaultTheme: BaseThemeObject;
|
|
909
|
+
/**
|
|
910
|
+
* Creates appropriate directional margin styles for both web and native platforms.
|
|
911
|
+
* Handles RTL layouts correctly across platforms by using the I18nManager.
|
|
912
|
+
*
|
|
913
|
+
* @param value - The margin value to apply
|
|
914
|
+
* @returns An object with the appropriate margin style property
|
|
915
|
+
*/
|
|
916
|
+
declare const getDirectionalMargin: (value: number) => {
|
|
917
|
+
marginLeft: number;
|
|
918
|
+
marginRight?: undefined;
|
|
919
|
+
marginEnd?: undefined;
|
|
920
|
+
} | {
|
|
921
|
+
marginRight: number;
|
|
922
|
+
marginLeft?: undefined;
|
|
923
|
+
marginEnd?: undefined;
|
|
924
|
+
} | {
|
|
925
|
+
marginEnd: number;
|
|
926
|
+
marginLeft?: undefined;
|
|
927
|
+
marginRight?: undefined;
|
|
928
|
+
};
|
|
929
|
+
|
|
912
930
|
type ThemeName = 'default' | 'dark' | 'modern' | 'warm' | 'forest' | 'sunset';
|
|
913
931
|
declare const themes: Record<ThemeName, BaseThemeObject>;
|
|
914
932
|
declare const themeItems: Array<{
|
|
@@ -1029,4 +1047,4 @@ declare const useInitialGroupFetch: ({ id, setGroupData, }: UseInitialGroupFetch
|
|
|
1029
1047
|
declare const useNavigation: (config: NavigationConfig) => (link: string, ctaTarget: CTALinkTarget) => Promise<void>;
|
|
1030
1048
|
|
|
1031
1049
|
export { BUTTON_SIZE, _default$7 as BadgeTile, BadgeTileConfig, BadgeTileType, _default$6 as BannerTile, BannerTileConfig, BaseBanner, BaseTile, Button, COLOR_CONSTANTS, CTALinkTarget, Carousel, CarouselNavButton, Chip, Column, _default$5 as ContentTile, ContentTileConfig, CoreApiUrl, DIMENSION_MODES, EventEmitter, FullFlex, GRID_GAP, Grid, Group, IS_ANDROID, IS_DESKTOP, IS_IOS, IS_MOBILE, IS_WEB, Icon, Indicator, Layout, LoadingIndicator, MAX_WIDTH, _default$4 as PointsTile, PointsTileConfig, ProgressBar, ProgressIndicator, ProgressType, ProgressiveImage, Reward, _default$3 as RewardCategoryTile, RewardCategoryTileConfig, _default$2 as RewardTile, RewardTileConfig, _default$1 as RoundupTile, RoundupTileConfig, Row, SCREEN_HEIGHT, SCREEN_WIDTH, SLIDE_WIDTH, SMALL_SCREEN_WIDTH, Section, SectionHeader, SectionType, Skeleton, Spacer, StatusVariant, TABLET_SCREEN_WIDTH, Text, TierTileConfig, TierTileType, TierTile as TierTileUpdated, TileContainer, TileHeight, TileType, _default as VenueTile, VenueTileConfig, WllSdkProvider, alignMap, commonStyles, createResourceGetter, defaultTheme, desaturateColor, getAlphaDerivedColors, getDerivedColor, getDerivedColorPercentages, getDimensionMode, getDirectionalMargin, getReadableTextColor, getResponsiveValue, getStateColor, handleLastEarnedDate, justifyMap, sdkEventEmitter, shouldDesaturate, sizes, sortByPriority, themeItems, themes, transformLocale, useCreateRequestOptions, useGetGroupByID, useGetSectionByID, useGetTileByID, useGroupRefresh, useInitialGroupFetch, useInvalidateData, useMakeRequest, useNavigation, usePullToRefresh, useResponsive, useResponsiveValue, useTileSize, useWllSdk, validateTheme };
|
|
1032
|
-
export type { APIResponse$1 as APIResponse, Align, AllowedCoreApiUrl, Availability, Badge, BadgeDetail, BaseThemeObject, DerivedColors, DerivedProperties, DesaturationType, EventCallback, EventTypes, FlexDirection, ImagePropsNoSource, Justify, LayoutProps$1 as LayoutProps, NavigationConfig, NavigationType, PercentageKey, ProgessType, RewardCategory, SDKConfig, Size, TGroup, TSection, ThemeContextType, ThemeName, ThemeObject, ThemeProviderProps, TierType, Tile, TileConfig, TileSizeInfo, Variant };
|
|
1050
|
+
export type { APIResponse$1 as APIResponse, Align, AllowedCoreApiUrl, Availability, Badge, BadgeDetail, BaseThemeObject, DerivedColors, DerivedProperties, DesaturationType, EventCallback, EventTypes, FlexDirection, ImagePropsNoSource, Justify, LayoutProps$1 as LayoutProps, NavigationConfig, NavigationType, PercentageKey, ProgessType, RewardCategory, SDKConfig, Size, Sizes, TGroup, TSection, ThemeContextType, ThemeName, ThemeObject, ThemeProviderProps, TierType, Tile, TileConfig, TileSizeInfo, Variant };
|