@herca/rn-kit 0.1.92 → 0.1.93
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/module/Provider/RequiredUpdateAppsProvider.js +50 -30
- package/lib/module/Provider/RequiredUpdateAppsProvider.js.map +1 -1
- package/lib/module/_assets/updateapps.png +0 -0
- package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts +1 -1
- package/lib/typescript/src/Provider/RequiredUpdateAppsProvider.d.ts.map +1 -1
- package/lib/typescript/src/Provider/type.d.ts +1 -0
- package/lib/typescript/src/Provider/type.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Provider/RequiredUpdateAppsProvider.tsx +47 -30
- package/src/Provider/type.tsx +1 -0
- package/src/_assets/updateapps.png +0 -0
|
@@ -1,63 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Image, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Button, Color, Container, Modal, Typography } from "../index.js";
|
|
5
3
|
import { useEffect } from 'react';
|
|
4
|
+
import { Image, Platform, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { Button, Card, Color, Modal, Typography } from "../index.js";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
export default function RequiredUpdateAppsProvider({
|
|
8
8
|
title,
|
|
9
9
|
description,
|
|
10
10
|
buttonText = 'Update Sekarang',
|
|
11
|
-
onUpdate
|
|
11
|
+
onUpdate,
|
|
12
|
+
fillScreen = false
|
|
12
13
|
}) {
|
|
13
14
|
useEffect(() => {
|
|
14
15
|
onUpdate?.(false);
|
|
15
16
|
}, [onUpdate]);
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
return /*#__PURE__*/_jsxs(Modal, {
|
|
18
|
+
isOpen: true,
|
|
19
|
+
closable: false,
|
|
20
|
+
modalStyle: fillScreen ? styles.modalFill : undefined,
|
|
21
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
22
|
+
style: {
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
},
|
|
25
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
22
26
|
source: require('../_assets/updateapps.png'),
|
|
23
27
|
style: styles.image
|
|
24
|
-
})
|
|
25
|
-
|
|
28
|
+
})
|
|
29
|
+
}), /*#__PURE__*/_jsxs(Card, {
|
|
30
|
+
style: styles.container,
|
|
31
|
+
borderColor: "transparent",
|
|
32
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
33
|
+
style: styles.content,
|
|
26
34
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
27
|
-
variant: "
|
|
35
|
+
variant: "p1",
|
|
28
36
|
weight: "semibold",
|
|
29
|
-
color: Color.gray[
|
|
37
|
+
color: Color.gray[900],
|
|
30
38
|
center: true,
|
|
31
39
|
children: title
|
|
32
40
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
33
|
-
variant: "
|
|
34
|
-
|
|
35
|
-
color: Color.gray[600],
|
|
41
|
+
variant: "t2",
|
|
42
|
+
color: Color.gray[700],
|
|
36
43
|
center: true,
|
|
37
44
|
children: description
|
|
38
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
39
|
-
style: {},
|
|
40
|
-
children: /*#__PURE__*/_jsx(Button, {
|
|
41
|
-
title: buttonText,
|
|
42
|
-
color: "primary",
|
|
43
|
-
onPress: () => {
|
|
44
|
-
onUpdate?.(false);
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
45
|
})]
|
|
46
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
47
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
48
|
+
title: buttonText,
|
|
49
|
+
color: "primary",
|
|
50
|
+
onPress: () => {
|
|
51
|
+
onUpdate?.(false);
|
|
52
|
+
}
|
|
53
|
+
})
|
|
48
54
|
})]
|
|
49
|
-
})
|
|
55
|
+
})]
|
|
50
56
|
});
|
|
51
57
|
}
|
|
52
58
|
const styles = StyleSheet.create({
|
|
53
59
|
image: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
marginTop: Platform.OS === 'ios' ? -60 : -75,
|
|
61
|
+
objectFit: 'contain',
|
|
62
|
+
height: 124
|
|
57
63
|
},
|
|
58
64
|
container: {
|
|
59
65
|
gap: 20,
|
|
60
|
-
|
|
66
|
+
padding: Platform.OS === 'ios' ? 24 : 10
|
|
67
|
+
},
|
|
68
|
+
content: {
|
|
69
|
+
gap: 10
|
|
70
|
+
},
|
|
71
|
+
modalFill: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
top: 0,
|
|
74
|
+
left: 0,
|
|
75
|
+
right: 0,
|
|
76
|
+
bottom: 0,
|
|
77
|
+
width: '100%',
|
|
78
|
+
height: '100%',
|
|
79
|
+
maxHeight: 'auto',
|
|
80
|
+
justifyContent: 'center'
|
|
61
81
|
}
|
|
62
82
|
});
|
|
63
83
|
//# sourceMappingURL=RequiredUpdateAppsProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Image","StyleSheet","View","Button","
|
|
1
|
+
{"version":3,"names":["useEffect","Image","Platform","StyleSheet","View","Button","Card","Color","Modal","Typography","jsx","_jsx","jsxs","_jsxs","RequiredUpdateAppsProvider","title","description","buttonText","onUpdate","fillScreen","isOpen","closable","modalStyle","styles","modalFill","undefined","children","style","alignItems","source","require","image","container","borderColor","content","variant","weight","color","gray","center","onPress","create","marginTop","OS","objectFit","height","gap","padding","position","top","left","right","bottom","width","maxHeight","justifyContent"],"sourceRoot":"../../../src","sources":["Provider/RequiredUpdateAppsProvider.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAChE,SAASC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,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,CACF,CAAC;MAAA,CACT,CAAC,eAEPL,IAAA,CAACP,IAAI;QAAAsB,QAAA,eACHf,IAAA,CAACN,MAAM;UACLU,KAAK,EAAEE,UAAW;UAClBoB,KAAK,EAAC,SAAS;UACfG,OAAO,EAAEA,CAAA,KAAM;YACbtB,QAAQ,GAAG,KAAK,CAAC;UACnB;QAAE,CACH;MAAC,CACE,CAAC;IAAA,CACH,CAAC;EAAA,CACF,CAAC;AAEZ;AAEA,MAAMK,MAAM,GAAGpB,UAAU,CAACsC,MAAM,CAAC;EAC/BV,KAAK,EAAE;IACLW,SAAS,EAAExC,QAAQ,CAACyC,EAAE,KAAK,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE;IAC5CC,SAAS,EAAE,SAAS;IACpBC,MAAM,EAAE;EACV,CAAC;EACDb,SAAS,EAAE;IACTc,GAAG,EAAE,EAAE;IACPC,OAAO,EAAE7C,QAAQ,CAACyC,EAAE,KAAK,KAAK,GAAG,EAAE,GAAG;EACxC,CAAC;EACDT,OAAO,EAAE;IACPY,GAAG,EAAE;EACP,CAAC;EACDtB,SAAS,EAAE;IACTwB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,MAAM;IACbR,MAAM,EAAE,MAAM;IACdS,SAAS,EAAE,MAAM;IACjBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RequiredUpdateAppsProviderProps } from './type';
|
|
2
|
-
export default function RequiredUpdateAppsProvider({ title, description, buttonText, onUpdate, }: RequiredUpdateAppsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function RequiredUpdateAppsProvider({ title, description, buttonText, onUpdate, fillScreen, }: RequiredUpdateAppsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=RequiredUpdateAppsProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequiredUpdateAppsProvider.d.ts","sourceRoot":"","sources":["../../../../src/Provider/RequiredUpdateAppsProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequiredUpdateAppsProvider.d.ts","sourceRoot":"","sources":["../../../../src/Provider/RequiredUpdateAppsProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,EACjD,KAAK,EACL,WAAW,EACX,UAA8B,EAC9B,QAAQ,EACR,UAAkB,GACnB,EAAE,+BAA+B,2CA2CjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/Provider/type.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/Provider/type.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,+BAA+B;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,64 +1,81 @@
|
|
|
1
|
-
import { Image, StyleSheet, View } from 'react-native';
|
|
2
|
-
import { Button, Color, Container, Modal, Typography } from '..';
|
|
3
|
-
import type { RequiredUpdateAppsProviderProps } from './type';
|
|
4
1
|
import { useEffect } from 'react';
|
|
2
|
+
import { Image, Platform, StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Button, Card, Color, Modal, Typography } from '..';
|
|
4
|
+
import type { RequiredUpdateAppsProviderProps } from './type';
|
|
5
5
|
|
|
6
6
|
export default function RequiredUpdateAppsProvider({
|
|
7
7
|
title,
|
|
8
8
|
description,
|
|
9
9
|
buttonText = 'Update Sekarang',
|
|
10
10
|
onUpdate,
|
|
11
|
+
fillScreen = false,
|
|
11
12
|
}: RequiredUpdateAppsProviderProps) {
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
onUpdate?.(false);
|
|
14
15
|
}, [onUpdate]);
|
|
15
16
|
return (
|
|
16
|
-
<
|
|
17
|
-
|
|
17
|
+
<Modal
|
|
18
|
+
isOpen={true}
|
|
19
|
+
closable={false}
|
|
20
|
+
modalStyle={fillScreen ? styles.modalFill : undefined}
|
|
21
|
+
>
|
|
22
|
+
<View style={{ alignItems: 'center' }}>
|
|
18
23
|
<Image
|
|
19
24
|
source={require('../_assets/updateapps.png')}
|
|
20
25
|
style={styles.image}
|
|
21
26
|
/>
|
|
22
|
-
|
|
27
|
+
</View>
|
|
28
|
+
<Card style={styles.container} borderColor="transparent">
|
|
29
|
+
<View style={styles.content}>
|
|
23
30
|
<Typography
|
|
24
|
-
variant="
|
|
31
|
+
variant="p1"
|
|
25
32
|
weight="semibold"
|
|
26
|
-
color={Color.gray[
|
|
33
|
+
color={Color.gray[900]}
|
|
27
34
|
center
|
|
28
35
|
>
|
|
29
36
|
{title}
|
|
30
37
|
</Typography>
|
|
31
|
-
<Typography
|
|
32
|
-
variant="t1"
|
|
33
|
-
weight="regular"
|
|
34
|
-
color={Color.gray[600]}
|
|
35
|
-
center
|
|
36
|
-
>
|
|
38
|
+
<Typography variant="t2" color={Color.gray[700]} center>
|
|
37
39
|
{description}
|
|
38
40
|
</Typography>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
</View>
|
|
42
|
+
|
|
43
|
+
<View>
|
|
44
|
+
<Button
|
|
45
|
+
title={buttonText}
|
|
46
|
+
color="primary"
|
|
47
|
+
onPress={() => {
|
|
48
|
+
onUpdate?.(false);
|
|
49
|
+
}}
|
|
50
|
+
/>
|
|
51
|
+
</View>
|
|
52
|
+
</Card>
|
|
53
|
+
</Modal>
|
|
51
54
|
);
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
const styles = StyleSheet.create({
|
|
55
58
|
image: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
marginTop: Platform.OS === 'ios' ? -60 : -75,
|
|
60
|
+
objectFit: 'contain',
|
|
61
|
+
height: 124,
|
|
59
62
|
},
|
|
60
63
|
container: {
|
|
61
64
|
gap: 20,
|
|
62
|
-
|
|
65
|
+
padding: Platform.OS === 'ios' ? 24 : 10,
|
|
66
|
+
},
|
|
67
|
+
content: {
|
|
68
|
+
gap: 10,
|
|
69
|
+
},
|
|
70
|
+
modalFill: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
top: 0,
|
|
73
|
+
left: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
width: '100%',
|
|
77
|
+
height: '100%',
|
|
78
|
+
maxHeight: 'auto',
|
|
79
|
+
justifyContent: 'center',
|
|
63
80
|
},
|
|
64
81
|
});
|
package/src/Provider/type.tsx
CHANGED
|
Binary file
|