related-ui-components 1.8.7 → 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 +135 -62
- 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/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +0 -5
- package/lib/commonjs/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 +137 -63
- 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/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +7 -4
- package/lib/module/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 +2 -2
- 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/index.d.ts +1 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -1
- package/lib/typescript/commonjs/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 +2 -2
- 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/index.d.ts +1 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -1
- package/lib/typescript/module/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 +113 -37
- 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/index.ts +2 -1
- package/src/index.ts +4 -4
- package/src/theme/Colors.ts +8 -0
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,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,CA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M,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"}
|
|
@@ -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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,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,C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AAS,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,45 +1,121 @@
|
|
|
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";
|
|
11
|
+
import BRANDS from "./constants/BRANDS";
|
|
12
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
13
|
+
import { useTheme } from "./theme";
|
|
14
|
+
import RedeemedVoucherSheet from "./components/RedeemedVoucher/RedeemedVoucherSheet";
|
|
15
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
4
16
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
{ id: 2, label: "Prize 2", color: "#36A2EB" },
|
|
8
|
-
{ id: 3, label: "Prize 3", color: "#FFCE56" },
|
|
9
|
-
{ id: 4, label: "Prize 4", color: "#4BC0C0" },
|
|
10
|
-
{ id: 5, label: "Prize 5", color: "#9966FF" },
|
|
11
|
-
{ id: 6, label: "Prize 6", color: "#FF9F40" },
|
|
12
|
-
];
|
|
17
|
+
const MyScreen = () => {
|
|
18
|
+
const [isFilterVisible, setIsFilterVisible] = useState(false);
|
|
13
19
|
|
|
14
|
-
const
|
|
15
|
-
const [winner, setWinner] = useState<SpinWheelItem | null>(null);
|
|
20
|
+
const { theme } = useTheme();
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const handleApplyFilters = (result: FilterResult) => {
|
|
23
|
+
console.log("Filters applied:", result);
|
|
24
|
+
// Process filter results...
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const rewardsData = [
|
|
28
|
+
{
|
|
29
|
+
icon: (
|
|
30
|
+
<Ionicons name="briefcase-outline" size={30} color={theme.primary} />
|
|
31
|
+
),
|
|
32
|
+
activeIcon: (
|
|
33
|
+
<Ionicons name="briefcase-outline" size={30} color={theme.onPrimary} />
|
|
34
|
+
),
|
|
35
|
+
title: "Aqua Guardian",
|
|
36
|
+
description:
|
|
37
|
+
"Maintain water usage below the community average for a month.",
|
|
38
|
+
isActive: false,
|
|
39
|
+
status: "0/1",
|
|
40
|
+
statusBackgroundColor: "#FFCDD2",
|
|
41
|
+
statusTextColor: "#D32F2F",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
icon: <Ionicons name="heart-outline" size={30} color={theme.primary} />,
|
|
45
|
+
activeIcon: (
|
|
46
|
+
<Ionicons name="heart-outline" size={30} color={theme.onPrimary} />
|
|
47
|
+
),
|
|
48
|
+
title: "Wellness Warrior",
|
|
49
|
+
description: "Complete 30 days of healthy hydration tracking.",
|
|
50
|
+
isActive: true,
|
|
51
|
+
status: "15/30",
|
|
52
|
+
statusBackgroundColor: "#C8E6C9",
|
|
53
|
+
statusTextColor: "#388E3C",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
icon: <Ionicons name="airplane-outline" size={24} color={theme.helper} />,
|
|
57
|
+
activeIcon: (
|
|
58
|
+
<Ionicons name="airplane-outline" size={24} color={theme.primary} />
|
|
59
|
+
),
|
|
60
|
+
title: "Eco Traveler",
|
|
61
|
+
description: "Log 5 trips where you chose sustainable travel options.",
|
|
62
|
+
isActive: false,
|
|
63
|
+
status: "2/5",
|
|
64
|
+
statusBackgroundColor: theme.disabled,
|
|
65
|
+
statusTextColor: theme.text,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
icon: <Ionicons name="school-outline" size={24} color={theme.helper} />,
|
|
69
|
+
activeIcon: (
|
|
70
|
+
<Ionicons name="school-outline" size={24} color={theme.primary} />
|
|
71
|
+
),
|
|
72
|
+
title: "Knowledge Seeker",
|
|
73
|
+
description: "Complete all water conservation learning modules.",
|
|
74
|
+
isActive: false,
|
|
75
|
+
status: "3/5",
|
|
76
|
+
statusBackgroundColor: theme.disabled,
|
|
77
|
+
statusTextColor: theme.text,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
icon: <Ionicons name="settings-outline" size={24} color={theme.helper} />,
|
|
81
|
+
activeIcon: (
|
|
82
|
+
<Ionicons name="settings-outline" size={24} color={theme.primary} />
|
|
83
|
+
),
|
|
84
|
+
title: "Smart Saver",
|
|
85
|
+
description: "Set up and use all water-saving features in the app.",
|
|
86
|
+
isActive: true,
|
|
87
|
+
status: "4/4",
|
|
88
|
+
statusBackgroundColor: theme.primary,
|
|
89
|
+
statusTextColor: theme.background,
|
|
90
|
+
},
|
|
91
|
+
];
|
|
29
92
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
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>
|
|
116
|
+
</GestureHandlerRootView>
|
|
117
|
+
</>
|
|
42
118
|
);
|
|
43
119
|
};
|
|
44
120
|
|
|
45
|
-
export default
|
|
121
|
+
export default MyScreen;
|
|
@@ -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;
|
package/src/components/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { registerRootComponent } from 'expo';
|
|
2
|
-
import "react-native-reanimated";
|
|
1
|
+
// import { registerRootComponent } from 'expo';
|
|
2
|
+
// import "react-native-reanimated";
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
import App from "./app";
|
|
5
|
+
// import App from "./app";
|
|
6
6
|
|
|
7
|
-
registerRootComponent(App);
|
|
7
|
+
// registerRootComponent(App);
|
|
8
8
|
|
|
9
9
|
export * from "./theme"
|
|
10
10
|
export * from "./components";
|
package/src/theme/Colors.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface ThemeType {
|
|
|
49
49
|
secondary?: string[];
|
|
50
50
|
[key: string]: string[] | undefined;
|
|
51
51
|
};
|
|
52
|
+
skeletonBackgroundColor? : string;
|
|
53
|
+
skeletonItemColor?: string;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
// Updated Light Theme - True black and white oriented, less muted
|
|
@@ -96,6 +98,9 @@ export const lightTheme: ThemeType = {
|
|
|
96
98
|
xl: 32,
|
|
97
99
|
xxl: 64,
|
|
98
100
|
},
|
|
101
|
+
|
|
102
|
+
skeletonBackgroundColor: "#e0e0e0",
|
|
103
|
+
skeletonItemColor: "#2c2c2c"
|
|
99
104
|
};
|
|
100
105
|
|
|
101
106
|
// Updated Dark Theme - True black and white oriented, less muted
|
|
@@ -143,4 +148,7 @@ export const darkTheme: ThemeType = {
|
|
|
143
148
|
xl: 32,
|
|
144
149
|
xxl: 64,
|
|
145
150
|
},
|
|
151
|
+
|
|
152
|
+
skeletonBackgroundColor: "#f5f5f5",
|
|
153
|
+
skeletonItemColor: "#444444"
|
|
146
154
|
};
|