@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.
@@ -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__*/_jsx(View, {
17
- children: /*#__PURE__*/_jsxs(Modal, {
18
- height: 300,
19
- isOpen: true,
20
- closable: false,
21
- children: [/*#__PURE__*/_jsx(Image, {
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
- }), /*#__PURE__*/_jsxs(Container, {
25
- style: styles.container,
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: "h4",
35
+ variant: "p1",
28
36
  weight: "semibold",
29
- color: Color.gray[800],
37
+ color: Color.gray[900],
30
38
  center: true,
31
39
  children: title
32
40
  }), /*#__PURE__*/_jsx(Typography, {
33
- variant: "t1",
34
- weight: "regular",
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
- position: 'absolute',
55
- marginTop: -60,
56
- left: 30
60
+ marginTop: Platform.OS === 'ios' ? -60 : -75,
61
+ objectFit: 'contain',
62
+ height: 124
57
63
  },
58
64
  container: {
59
65
  gap: 20,
60
- marginTop: 80
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","Color","Container","Modal","Typography","useEffect","jsx","_jsx","jsxs","_jsxs","RequiredUpdateAppsProvider","title","description","buttonText","onUpdate","children","height","isOpen","closable","source","require","style","styles","image","container","variant","weight","color","gray","center","onPress","create","position","marginTop","left","gap"],"sourceRoot":"../../../src","sources":["Provider/RequiredUpdateAppsProvider.tsx"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACtD,SAASC,MAAM,EAAEC,KAAK,EAAE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O,EAAEA,CAAA,KAAM;cACbhB,QAAQ,GAAG,KAAK,CAAC;YACnB;UAAE,CACH;QAAC,CACE,CAAC;MAAA,CACE,CAAC;IAAA,CACP;EAAC,CACJ,CAAC;AAEX;AAEA,MAAMQ,MAAM,GAAGxB,UAAU,CAACiC,MAAM,CAAC;EAC/BR,KAAK,EAAE;IACLS,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,CAAC,EAAE;IACdC,IAAI,EAAE;EACR,CAAC;EACDV,SAAS,EAAE;IACTW,GAAG,EAAE,EAAE;IACPF,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
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,EAAEC,UAAU,QAAQ,aAAI;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG5D,eAAe,SAASC,0BAA0BA,CAAC;EACjDC,KAAK;EACLC,WAAW;EACXC,UAAU,GAAG,iBAAiB;EAC9BC,QAAQ;EACRC,UAAU,GAAG;AACkB,CAAC,EAAE;EAClCnB,SAAS,CAAC,MAAM;IACdkB,QAAQ,GAAG,KAAK,CAAC;EACnB,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EACd,oBACEL,KAAA,CAAC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K,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":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAG9D,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,EACjD,KAAK,EACL,WAAW,EACX,UAA8B,EAC9B,QAAQ,GACT,EAAE,+BAA+B,2CAyCjC"}
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"}
@@ -3,5 +3,6 @@ export interface RequiredUpdateAppsProviderProps {
3
3
  description?: string;
4
4
  buttonText?: string;
5
5
  onUpdate?: (value: boolean) => void;
6
+ fillScreen?: boolean;
6
7
  }
7
8
  //# sourceMappingURL=type.d.ts.map
@@ -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;CACrC"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@herca/rn-kit",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
4
4
  "description": "React Native UI Kit",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -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
- <View>
17
- <Modal height={300} isOpen={true} closable={false}>
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
- <Container style={styles.container}>
27
+ </View>
28
+ <Card style={styles.container} borderColor="transparent">
29
+ <View style={styles.content}>
23
30
  <Typography
24
- variant="h4"
31
+ variant="p1"
25
32
  weight="semibold"
26
- color={Color.gray[800]}
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
- <View style={{}}>
40
- <Button
41
- title={buttonText}
42
- color="primary"
43
- onPress={() => {
44
- onUpdate?.(false);
45
- }}
46
- />
47
- </View>
48
- </Container>
49
- </Modal>
50
- </View>
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
- position: 'absolute',
57
- marginTop: -60,
58
- left: 30,
59
+ marginTop: Platform.OS === 'ios' ? -60 : -75,
60
+ objectFit: 'contain',
61
+ height: 124,
59
62
  },
60
63
  container: {
61
64
  gap: 20,
62
- marginTop: 80,
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
  });
@@ -3,4 +3,5 @@ export interface RequiredUpdateAppsProviderProps {
3
3
  description?: string;
4
4
  buttonText?: string;
5
5
  onUpdate?: (value: boolean) => void;
6
+ fillScreen?: boolean;
6
7
  }
Binary file