related-ui-components 1.8.6 → 1.8.8
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/lib/commonjs/app.js +33 -18
- package/lib/commonjs/app.js.map +1 -1
- package/lib/commonjs/components/Popup/Popup.js +22 -24
- package/lib/commonjs/components/Popup/Popup.js.map +1 -1
- package/lib/commonjs/components/Skeleton/Shimmer.js +75 -0
- package/lib/commonjs/components/Skeleton/Shimmer.js.map +1 -0
- package/lib/commonjs/components/Skeleton/SkeletonElement.js +36 -0
- package/lib/commonjs/components/Skeleton/SkeletonElement.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +48 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Wheel/Wheel.js +141 -66
- package/lib/commonjs/components/Wheel/Wheel.js.map +1 -1
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/theme/Colors.js +6 -2
- package/lib/commonjs/theme/Colors.js.map +1 -1
- package/lib/module/app.js +32 -16
- package/lib/module/app.js.map +1 -1
- package/lib/module/components/Popup/Popup.js +22 -24
- package/lib/module/components/Popup/Popup.js.map +1 -1
- package/lib/module/components/Skeleton/Shimmer.js +69 -0
- package/lib/module/components/Skeleton/Shimmer.js.map +1 -0
- package/lib/module/components/Skeleton/SkeletonElement.js +31 -0
- package/lib/module/components/Skeleton/SkeletonElement.js.map +1 -0
- package/lib/module/components/Skeleton/index.js +7 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Wheel/Wheel.js +141 -66
- package/lib/module/components/Wheel/Wheel.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/theme/Colors.js +6 -2
- package/lib/module/theme/Colors.js.map +1 -1
- package/lib/typescript/commonjs/app.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/Skeleton/Shimmer.d.ts +13 -0
- package/lib/typescript/commonjs/components/Skeleton/Shimmer.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonElement.d.ts +12 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonElement.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts +3 -1
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/index.d.ts +1 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/Colors.d.ts +2 -0
- package/lib/typescript/commonjs/theme/Colors.d.ts.map +1 -1
- package/lib/typescript/module/app.d.ts.map +1 -1
- package/lib/typescript/module/components/Skeleton/Shimmer.d.ts +13 -0
- package/lib/typescript/module/components/Skeleton/Shimmer.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/SkeletonElement.d.ts +12 -0
- package/lib/typescript/module/components/Skeleton/SkeletonElement.d.ts.map +1 -0
- package/lib/typescript/module/components/Skeleton/index.d.ts +5 -0
- package/lib/typescript/module/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Wheel/Wheel.d.ts +3 -1
- package/lib/typescript/module/components/Wheel/Wheel.d.ts.map +1 -1
- package/lib/typescript/module/components/index.d.ts +1 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/theme/Colors.d.ts +2 -0
- package/lib/typescript/module/theme/Colors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app.tsx +30 -18
- package/src/components/Popup/Popup.tsx +2 -2
- package/src/components/Skeleton/Shimmer.tsx +89 -0
- package/src/components/Skeleton/SkeletonElement.tsx +34 -0
- package/src/components/Skeleton/index.ts +5 -0
- package/src/components/Wheel/Wheel.tsx +169 -82
- package/src/components/index.ts +2 -1
- package/src/theme/Colors.ts +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAE7D,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAA"}
|
|
@@ -9,8 +9,10 @@ export interface SpinWheelItem {
|
|
|
9
9
|
}
|
|
10
10
|
interface SpinWheelProps {
|
|
11
11
|
items: SpinWheelItem[];
|
|
12
|
+
predeterminedWinner?: SpinWheelItem | string | number;
|
|
12
13
|
size?: number;
|
|
13
14
|
spinDuration?: number;
|
|
15
|
+
friction?: number;
|
|
14
16
|
enabled?: boolean;
|
|
15
17
|
onSpinStart?: () => void;
|
|
16
18
|
onSpinEnd?: (item: SpinWheelItem) => void;
|
|
@@ -21,10 +23,10 @@ interface SpinWheelProps {
|
|
|
21
23
|
knobStyle?: ViewStyle;
|
|
22
24
|
actionButtonStyle?: ViewStyle;
|
|
23
25
|
actionButtonTextStyle?: TextStyle;
|
|
26
|
+
wheelBorderColor?: string;
|
|
24
27
|
wheelTextColor?: string;
|
|
25
28
|
knobColor?: string;
|
|
26
29
|
centerComponent?: React.ReactNode;
|
|
27
|
-
winner?: SpinWheelItem | null;
|
|
28
30
|
}
|
|
29
31
|
declare const SpinWheel: React.FC<SpinWheelProps>;
|
|
30
32
|
export default SpinWheel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Wheel/Wheel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAOL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC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MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwRvC,CAAC;AAqDF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAe,UAAU,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAe,UAAU,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -37,6 +37,8 @@ export interface ThemeType {
|
|
|
37
37
|
secondary?: string[];
|
|
38
38
|
[key: string]: string[] | undefined;
|
|
39
39
|
};
|
|
40
|
+
skeletonBackgroundColor?: string;
|
|
41
|
+
skeletonItemColor?: string;
|
|
40
42
|
}
|
|
41
43
|
export declare const lightTheme: ThemeType;
|
|
42
44
|
export declare const darkTheme: ThemeType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/Colors.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAGlB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,CAAC,EAAE,MAAM,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CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAA;IAED,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KACrC,CAAC;IACF,uBAAuB,CAAC,EAAG,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,eAAO,MAAM,UAAU,EAAE,SA+CxB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,SA+CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,QAAA,MAAM,QAAQ,yBAsGb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ViewStyle, DimensionValue, StyleProp } from "react-native";
|
|
3
|
+
interface ShimmerProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
width: DimensionValue;
|
|
6
|
+
height: DimensionValue;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
duration?: number;
|
|
9
|
+
shimmerWidth?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const Shimmer: React.FC<ShimmerProps>;
|
|
12
|
+
export default Shimmer;
|
|
13
|
+
//# sourceMappingURL=Shimmer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/Shimmer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAKL,SAAS,EACT,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,UAAU,YAAY;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAgEnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ViewStyle, DimensionValue } from "react-native";
|
|
3
|
+
interface SkeletonElementProps {
|
|
4
|
+
width?: DimensionValue;
|
|
5
|
+
height?: DimensionValue;
|
|
6
|
+
borderRadius?: number;
|
|
7
|
+
style?: ViewStyle;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const SkeletonElement: React.FC<SkeletonElementProps>;
|
|
11
|
+
export default SkeletonElement;
|
|
12
|
+
//# sourceMappingURL=SkeletonElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonElement.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/SkeletonElement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE3E,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAE7D,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAA"}
|
|
@@ -9,8 +9,10 @@ export interface SpinWheelItem {
|
|
|
9
9
|
}
|
|
10
10
|
interface SpinWheelProps {
|
|
11
11
|
items: SpinWheelItem[];
|
|
12
|
+
predeterminedWinner?: SpinWheelItem | string | number;
|
|
12
13
|
size?: number;
|
|
13
14
|
spinDuration?: number;
|
|
15
|
+
friction?: number;
|
|
14
16
|
enabled?: boolean;
|
|
15
17
|
onSpinStart?: () => void;
|
|
16
18
|
onSpinEnd?: (item: SpinWheelItem) => void;
|
|
@@ -21,10 +23,10 @@ interface SpinWheelProps {
|
|
|
21
23
|
knobStyle?: ViewStyle;
|
|
22
24
|
actionButtonStyle?: ViewStyle;
|
|
23
25
|
actionButtonTextStyle?: TextStyle;
|
|
26
|
+
wheelBorderColor?: string;
|
|
24
27
|
wheelTextColor?: string;
|
|
25
28
|
knobColor?: string;
|
|
26
29
|
centerComponent?: React.ReactNode;
|
|
27
|
-
winner?: SpinWheelItem | null;
|
|
28
30
|
}
|
|
29
31
|
declare const SpinWheel: React.FC<SpinWheelProps>;
|
|
30
32
|
export default SpinWheel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Wheel/Wheel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAOL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"Wheel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Wheel/Wheel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,EAOL,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+BD,UAAU,cAAc;IAEtB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,mBAAmB,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;IAGtD,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAGlB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAG1C,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,qBAAqB,CAAC,EAAE,SAAS,CAAC;IAGlC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwRvC,CAAC;AAqDF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAe,UAAU,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAe,UAAU,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
|
@@ -37,6 +37,8 @@ export interface ThemeType {
|
|
|
37
37
|
secondary?: string[];
|
|
38
38
|
[key: string]: string[] | undefined;
|
|
39
39
|
};
|
|
40
|
+
skeletonBackgroundColor?: string;
|
|
41
|
+
skeletonItemColor?: string;
|
|
40
42
|
}
|
|
41
43
|
export declare const lightTheme: ThemeType;
|
|
42
44
|
export declare const darkTheme: ThemeType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/Colors.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IAExB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAGlB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,E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CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAGhB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAA;IAED,SAAS,CAAC,EAAE;QACV,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KACrC,CAAC;IACF,uBAAuB,CAAC,EAAG,MAAM,CAAC;IAClC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,eAAO,MAAM,UAAU,EAAE,SA+CxB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,SA+CvB,CAAC"}
|
package/package.json
CHANGED
package/src/app.tsx
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { View, Button } from "react-native";
|
|
3
|
-
import {
|
|
2
|
+
import { View, Button, Text } from "react-native";
|
|
3
|
+
import {
|
|
4
|
+
FilterResult,
|
|
5
|
+
Filters,
|
|
6
|
+
Popup,
|
|
7
|
+
ScratchCard,
|
|
8
|
+
ScratchCardContent,
|
|
9
|
+
UnlockRewards,
|
|
10
|
+
} from "./components";
|
|
4
11
|
import BRANDS from "./constants/BRANDS";
|
|
5
12
|
import { Ionicons } from "@expo/vector-icons";
|
|
6
13
|
import { useTheme } from "./theme";
|
|
@@ -85,22 +92,27 @@ const MyScreen = () => {
|
|
|
85
92
|
|
|
86
93
|
return (
|
|
87
94
|
<>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
<GestureHandlerRootView>
|
|
96
|
+
<Popup visible={true} onClose={()=>{}}>
|
|
97
|
+
<ScratchCard
|
|
98
|
+
backgroundColor="#8A2BE2"
|
|
99
|
+
text="Scratch to reveal your prize!"
|
|
100
|
+
textFontColor="#FFFFFF"
|
|
101
|
+
textFontSize={18}
|
|
102
|
+
width={300}
|
|
103
|
+
height={150}
|
|
104
|
+
onScratched={() => alert("Congratulations! You won a prize!")}
|
|
105
|
+
>
|
|
106
|
+
<ScratchCardContent style={{ backgroundColor: "#FFD700" }}>
|
|
107
|
+
<Text style={{ fontSize: 24, fontWeight: "bold", color: "#000" }}>
|
|
108
|
+
50% OFF COUPON
|
|
109
|
+
</Text>
|
|
110
|
+
<Text style={{ marginTop: 8, color: "#333" }}>
|
|
111
|
+
Use code: SCRATCH50
|
|
112
|
+
</Text>
|
|
113
|
+
</ScratchCardContent>
|
|
114
|
+
</ScratchCard>
|
|
115
|
+
</Popup>
|
|
104
116
|
</GestureHandlerRootView>
|
|
105
117
|
</>
|
|
106
118
|
);
|
|
@@ -210,7 +210,7 @@ const Popup: FC<PopupProps> = ({
|
|
|
210
210
|
]}
|
|
211
211
|
pointerEvents="box-none"
|
|
212
212
|
>
|
|
213
|
-
<TouchableWithoutFeedback>
|
|
213
|
+
{/* <TouchableWithoutFeedback> */}
|
|
214
214
|
<View style={[!children && styles.popupContainer, containerStyle]}>
|
|
215
215
|
<CloseIcon
|
|
216
216
|
show={showCloseIcon}
|
|
@@ -243,7 +243,7 @@ const Popup: FC<PopupProps> = ({
|
|
|
243
243
|
renderDefaultContent()
|
|
244
244
|
)}
|
|
245
245
|
</View>
|
|
246
|
-
</TouchableWithoutFeedback>
|
|
246
|
+
{/* </TouchableWithoutFeedback> */}
|
|
247
247
|
</Animated.View>
|
|
248
248
|
</View>
|
|
249
249
|
</Modal>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
Animated,
|
|
6
|
+
Easing,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
DimensionValue,
|
|
9
|
+
StyleProp,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
import { LinearGradient } from "expo-linear-gradient";
|
|
12
|
+
import { useTheme } from "../../theme";
|
|
13
|
+
|
|
14
|
+
interface ShimmerProps {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
width: DimensionValue;
|
|
17
|
+
height: DimensionValue;
|
|
18
|
+
style?: StyleProp<ViewStyle>;
|
|
19
|
+
duration?: number;
|
|
20
|
+
shimmerWidth?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const Shimmer: React.FC<ShimmerProps> = ({
|
|
24
|
+
children,
|
|
25
|
+
width,
|
|
26
|
+
height,
|
|
27
|
+
style,
|
|
28
|
+
duration = 1500,
|
|
29
|
+
shimmerWidth = 150,
|
|
30
|
+
}) => {
|
|
31
|
+
const { theme } = useTheme();
|
|
32
|
+
|
|
33
|
+
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const animation = Animated.loop(
|
|
37
|
+
Animated.timing(animatedValue, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
duration: duration,
|
|
40
|
+
easing: Easing.linear,
|
|
41
|
+
useNativeDriver: true,
|
|
42
|
+
})
|
|
43
|
+
);
|
|
44
|
+
animation.start();
|
|
45
|
+
return () => animation.stop();
|
|
46
|
+
}, [animatedValue, duration]);
|
|
47
|
+
|
|
48
|
+
const translateX = animatedValue.interpolate({
|
|
49
|
+
inputRange: [0, 1],
|
|
50
|
+
|
|
51
|
+
outputRange: [
|
|
52
|
+
-shimmerWidth,
|
|
53
|
+
typeof width === "number" ? width + shimmerWidth : 400 + shimmerWidth,
|
|
54
|
+
],
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const shimmerColors = [
|
|
58
|
+
"transparent",
|
|
59
|
+
"rgba(255, 255, 255, 0.4)",
|
|
60
|
+
"transparent",
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<View
|
|
65
|
+
style={[
|
|
66
|
+
{ width, height, overflow: "hidden", backgroundColor: theme.skeletonBackgroundColor },
|
|
67
|
+
style,
|
|
68
|
+
]}
|
|
69
|
+
>
|
|
70
|
+
{children}
|
|
71
|
+
<Animated.View
|
|
72
|
+
style={{
|
|
73
|
+
...StyleSheet.absoluteFillObject,
|
|
74
|
+
transform: [{ translateX }],
|
|
75
|
+
zIndex: 1,
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<LinearGradient
|
|
79
|
+
colors={shimmerColors as any}
|
|
80
|
+
style={{ flex: 1, width: shimmerWidth }}
|
|
81
|
+
start={{ x: 0, y: 0.5 }}
|
|
82
|
+
end={{ x: 1, y: 0.5 }}
|
|
83
|
+
/>
|
|
84
|
+
</Animated.View>
|
|
85
|
+
</View>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default Shimmer;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useTheme } from "../../theme";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { View, StyleSheet, ViewStyle, DimensionValue } from "react-native";
|
|
4
|
+
|
|
5
|
+
interface SkeletonElementProps {
|
|
6
|
+
width?: DimensionValue
|
|
7
|
+
height?: DimensionValue;
|
|
8
|
+
borderRadius?: number;
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const SkeletonElement: React.FC<SkeletonElementProps> = ({
|
|
14
|
+
width,
|
|
15
|
+
height,
|
|
16
|
+
borderRadius,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
}) => {
|
|
20
|
+
const { theme } = useTheme();
|
|
21
|
+
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
skeleton: {
|
|
24
|
+
backgroundColor: theme.skeletonItemColor,
|
|
25
|
+
width: width,
|
|
26
|
+
height: height,
|
|
27
|
+
borderRadius: borderRadius,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return <View style={[styles.skeleton, style]}>{children}</View>;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default SkeletonElement;
|