related-ui-components 1.8.5 → 1.8.7
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 +62 -120
- package/lib/commonjs/app.js.map +1 -1
- package/lib/commonjs/components/Wheel/Wheel.js +193 -178
- package/lib/commonjs/components/Wheel/Wheel.js.map +1 -1
- package/lib/commonjs/index.js +5 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/app.js +63 -121
- package/lib/module/app.js.map +1 -1
- package/lib/module/components/Wheel/Wheel.js +194 -180
- package/lib/module/components/Wheel/Wheel.js.map +1 -1
- package/lib/module/index.js +4 -7
- package/lib/module/index.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/Wheel/Wheel.d.ts +3 -1
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.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/Wheel/Wheel.d.ts +3 -1
- package/lib/typescript/module/components/Wheel/Wheel.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app.tsx +35 -99
- package/src/components/Wheel/Wheel.tsx +233 -220
- package/src/index.ts +4 -4
package/lib/module/app.js
CHANGED
|
@@ -1,127 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
status: "2/5",
|
|
67
|
-
statusBackgroundColor: theme.disabled,
|
|
68
|
-
statusTextColor: theme.text
|
|
69
|
-
}, {
|
|
70
|
-
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
71
|
-
name: "school-outline",
|
|
72
|
-
size: 24,
|
|
73
|
-
color: theme.helper
|
|
74
|
-
}),
|
|
75
|
-
activeIcon: /*#__PURE__*/_jsx(Ionicons, {
|
|
76
|
-
name: "school-outline",
|
|
77
|
-
size: 24,
|
|
78
|
-
color: theme.primary
|
|
79
|
-
}),
|
|
80
|
-
title: "Knowledge Seeker",
|
|
81
|
-
description: "Complete all water conservation learning modules.",
|
|
82
|
-
isActive: false,
|
|
83
|
-
status: "3/5",
|
|
84
|
-
statusBackgroundColor: theme.disabled,
|
|
85
|
-
statusTextColor: theme.text
|
|
86
|
-
}, {
|
|
87
|
-
icon: /*#__PURE__*/_jsx(Ionicons, {
|
|
88
|
-
name: "settings-outline",
|
|
89
|
-
size: 24,
|
|
90
|
-
color: theme.helper
|
|
91
|
-
}),
|
|
92
|
-
activeIcon: /*#__PURE__*/_jsx(Ionicons, {
|
|
93
|
-
name: "settings-outline",
|
|
94
|
-
size: 24,
|
|
95
|
-
color: theme.primary
|
|
96
|
-
}),
|
|
97
|
-
title: "Smart Saver",
|
|
98
|
-
description: "Set up and use all water-saving features in the app.",
|
|
99
|
-
isActive: true,
|
|
100
|
-
status: "4/4",
|
|
101
|
-
statusBackgroundColor: theme.primary,
|
|
102
|
-
statusTextColor: theme.background
|
|
103
|
-
}];
|
|
104
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
105
|
-
children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
106
|
-
children: /*#__PURE__*/_jsx(RedeemedVoucherSheet, {
|
|
107
|
-
visible: true,
|
|
108
|
-
onClose: () => {},
|
|
109
|
-
code: "0000P78SHV50KK"
|
|
110
|
-
// amount={100}
|
|
111
|
-
,
|
|
112
|
-
expiry: "22/01/2025",
|
|
113
|
-
currency: "USD",
|
|
114
|
-
title: "Voucher Activated!"
|
|
115
|
-
// primaryButtonColors={["red", "blue"]}
|
|
116
|
-
,
|
|
117
|
-
onMyVouchersButtonPress: () => console.log("My Vouchers pressed"),
|
|
118
|
-
onCopyCode: code => console.log("Copied:", code)
|
|
119
|
-
// To use custom icons:
|
|
120
|
-
// amountIconComponent={<Image source={YourCustomAmountIcon} style={{width: 20, height: 20, marginRight: 5}} />}
|
|
121
|
-
// renderCopyIcon={() => <Text style={{fontSize: 22, color: 'blue'}}>COPY</Text>}
|
|
122
|
-
})
|
|
123
|
-
})
|
|
4
|
+
import { View, Button } from "react-native";
|
|
5
|
+
import SpinWheel from "./components/Wheel/Wheel.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const wheelItems = [{
|
|
8
|
+
id: 1,
|
|
9
|
+
label: "Prize 1",
|
|
10
|
+
color: "#FF6384"
|
|
11
|
+
}, {
|
|
12
|
+
id: 2,
|
|
13
|
+
label: "Prize 2",
|
|
14
|
+
color: "#36A2EB"
|
|
15
|
+
}, {
|
|
16
|
+
id: 3,
|
|
17
|
+
label: "Prize 3",
|
|
18
|
+
color: "#FFCE56"
|
|
19
|
+
}, {
|
|
20
|
+
id: 4,
|
|
21
|
+
label: "Prize 4",
|
|
22
|
+
color: "#4BC0C0"
|
|
23
|
+
}, {
|
|
24
|
+
id: 5,
|
|
25
|
+
label: "Prize 5",
|
|
26
|
+
color: "#9966FF"
|
|
27
|
+
}, {
|
|
28
|
+
id: 6,
|
|
29
|
+
label: "Prize 6",
|
|
30
|
+
color: "#FF9F40"
|
|
31
|
+
}];
|
|
32
|
+
const MockWheelScreen = () => {
|
|
33
|
+
const [winner, setWinner] = useState(null);
|
|
34
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
35
|
+
style: {
|
|
36
|
+
flex: 1,
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
alignItems: "center"
|
|
39
|
+
},
|
|
40
|
+
children: [/*#__PURE__*/_jsx(SpinWheel, {
|
|
41
|
+
items: wheelItems,
|
|
42
|
+
predeterminedWinner: wheelItems[2],
|
|
43
|
+
onSpinEnd: item => {
|
|
44
|
+
alert(`Winner: ${item.label}`);
|
|
45
|
+
setWinner(null);
|
|
46
|
+
},
|
|
47
|
+
size: 300,
|
|
48
|
+
spinButtonText: "Spin Randomly"
|
|
49
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
50
|
+
style: {
|
|
51
|
+
flexDirection: "row",
|
|
52
|
+
marginTop: 20
|
|
53
|
+
},
|
|
54
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
55
|
+
title: "Spin to Prize 3",
|
|
56
|
+
onPress: () => setWinner(wheelItems[2])
|
|
57
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
58
|
+
style: {
|
|
59
|
+
width: 20
|
|
60
|
+
}
|
|
61
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
62
|
+
title: "Spin Random",
|
|
63
|
+
onPress: () => setWinner(null)
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
124
66
|
});
|
|
125
67
|
};
|
|
126
|
-
export default
|
|
68
|
+
export default MockWheelScreen;
|
|
127
69
|
//# sourceMappingURL=app.js.map
|
package/lib/module/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","
|
|
1
|
+
{"version":3,"names":["React","useState","View","Button","SpinWheel","jsx","_jsx","jsxs","_jsxs","wheelItems","id","label","color","MockWheelScreen","winner","setWinner","style","flex","justifyContent","alignItems","children","items","predeterminedWinner","onSpinEnd","item","alert","size","spinButtonText","flexDirection","marginTop","title","onPress","width"],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,IAAI,EAAEC,MAAM,QAAQ,cAAc;AAC3C,OAAOC,SAAS,MAAyB,6BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpE,MAAMC,UAA2B,GAAG,CAClC;EAAEC,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,EAC7C;EAAEF,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,EAC7C;EAAEF,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,EAC7C;EAAEF,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,EAC7C;EAAEF,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,EAC7C;EAAEF,EAAE,EAAE,CAAC;EAAEC,KAAK,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,CAC9C;AAED,MAAMC,eAAe,GAAGA,CAAA,KAAM;EAC5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