react-native-package-fast 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-package-fast",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "test",
5
5
  "main": "./src/module/index.js",
6
6
  "types": "./src/typescript/index.d.ts",
@@ -10,7 +10,8 @@ const ButtonApp = props => {
10
10
  propsText,
11
11
  normal,
12
12
  disable,
13
- whiteNormal
13
+ whiteNormal,
14
+ grayNormal
14
15
  } = props;
15
16
  let _propsText = propsText;
16
17
  let styleAll = parseStyles({
@@ -25,7 +26,7 @@ const ButtonApp = props => {
25
26
  black: true
26
27
  };
27
28
  }
28
- if (disable) {
29
+ if (disable || grayNormal) {
29
30
  _propsText = {
30
31
  ..._propsText,
31
32
  h3: true,
@@ -4,7 +4,7 @@ const {
4
4
  height: heightScreen
5
5
  } = Dimensions.get('window');
6
6
  const RFValueHorizontal = function (fontSize) {
7
- let standardScreenHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 375;
7
+ let standardScreenHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : widthScreen;
8
8
  const heightPercent = Math.round(fontSize * widthScreen / standardScreenHeight);
9
9
  return heightPercent > fontSize + 5 ? fontSize + 5 : heightPercent;
10
10
  };
@@ -0,0 +1,45 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React from 'react';
3
+ import { Image } from 'react-native';
4
+ import { ImageAppStyles, parseStyles } from './Utils';
5
+ import { ScaleSize } from './DeviceUtils';
6
+ const ImageApp = props => {
7
+ const {
8
+ size,
9
+ source,
10
+ ratio,
11
+ color
12
+ } = props;
13
+ let styleAll = parseStyles({
14
+ passStyle: ['flex', 'width', 'height', 'ratio'],
15
+ styles: ImageAppStyles,
16
+ props
17
+ });
18
+ if (size) {
19
+ styleAll = {
20
+ ...styleAll,
21
+ width: ScaleSize(size),
22
+ height: ScaleSize(size)
23
+ };
24
+ }
25
+ if (ratio) {
26
+ styleAll = {
27
+ ...styleAll,
28
+ aspectRatio: ratio
29
+ };
30
+ }
31
+ if (color) {
32
+ styleAll = {
33
+ ...styleAll,
34
+ tintColor: color
35
+ };
36
+ }
37
+ return /*#__PURE__*/React.createElement(Image, _extends({}, props, {
38
+ style: styleAll,
39
+ source: typeof source === 'string' ? {
40
+ uri: source
41
+ } : source
42
+ }));
43
+ };
44
+ export default ImageApp;
45
+ //# sourceMappingURL=ImageApp.js.map
@@ -0,0 +1,16 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React from 'react';
3
+ import { TextInput } from 'react-native';
4
+ import { InputAppStyles, parseStyles } from './Utils';
5
+ const InputApp = props => {
6
+ let styleAll = parseStyles({
7
+ passStyle: ['flex', 'width', 'height'],
8
+ styles: InputAppStyles,
9
+ props
10
+ });
11
+ return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
12
+ style: styleAll
13
+ }));
14
+ };
15
+ export default InputApp;
16
+ //# sourceMappingURL=InputApp.js.map
@@ -5,7 +5,31 @@ const colors = {
5
5
  yellow: '#FEBD00',
6
6
  grey: '#9C9C9C',
7
7
  black: '#303030',
8
- white: '#ffffff'
8
+ white: '#ffffff',
9
+ Yellow: '#FEBD00',
10
+ Red: '#E42939',
11
+ Orange: '#EE780C',
12
+ Gray1: '#5C5C5C',
13
+ Gray2: '#C4C4C4',
14
+ Gray3: '#D1D1D1',
15
+ Gray4: '#E0E0E0',
16
+ Gray5: '#575757',
17
+ Gray6: '#D8D8D8',
18
+ Gray7: '#747474',
19
+ Gray8: '#D9D9D9',
20
+ Gray9: '#A8A8A8',
21
+ Gray10: '#FAFAFA',
22
+ Gray11: '#686868',
23
+ Gray12: '#F4F4F4',
24
+ Gray13: '#9C9C9C',
25
+ Gray14: '#B0B0B0',
26
+ Gray15: '#595959',
27
+ Gray16: '#E3E3E3',
28
+ Gray17: '#ACACAC',
29
+ Gray18: '#E0E0E0',
30
+ Gray19: '#E5E5E5',
31
+ Gray20: '#E7E7E7',
32
+ Black: '#000000'
9
33
  };
10
34
  const numStyles = [{
11
35
  key: 'padding-',
@@ -99,6 +123,20 @@ const numStyles = [{
99
123
  borderWidth: ScaleSize(value)
100
124
  };
101
125
  }
126
+ }, {
127
+ key: 'font-',
128
+ func: value => {
129
+ return {
130
+ fontSize: ScaleSize(value)
131
+ };
132
+ }
133
+ }, {
134
+ key: 'line-',
135
+ func: value => {
136
+ return {
137
+ lineHeight: ScaleSize(value)
138
+ };
139
+ }
102
140
  }];
103
141
  export const parseStyles = _ref => {
104
142
  var _Object$keys;
@@ -145,8 +183,21 @@ const CommonStyles = StyleSheet.create({
145
183
  position: 'absolute',
146
184
  top: 0,
147
185
  left: 0
186
+ },
187
+ center: {
188
+ justifyContent: 'center',
189
+ alignItems: 'center'
190
+ },
191
+ centerItem: {
192
+ alignItems: 'center'
193
+ },
194
+ centerContent: {
195
+ justifyContent: 'center'
148
196
  }
197
+ // center: { alignItems: 'center' },
198
+ // center: { alignSelf: 'center' },
149
199
  });
200
+
150
201
  export const ViewAppStyles = StyleSheet.create({
151
202
  ...CommonStyles,
152
203
  Black: {
@@ -171,6 +222,11 @@ export const ViewAppStyles = StyleSheet.create({
171
222
  export const TextAppStyles = StyleSheet.create({
172
223
  ...CommonStyles,
173
224
  //size
225
+ default: {
226
+ fontSize: ScaleSize(14),
227
+ lineHeight: ScaleSize(20),
228
+ fontFamily: 'NotoSansKR-Regular'
229
+ },
174
230
  h1: {
175
231
  fontSize: ScaleSize(20),
176
232
  lineHeight: ScaleSize(26)
@@ -219,15 +275,36 @@ export const TextAppStyles = StyleSheet.create({
219
275
  orange: {
220
276
  color: colors.orange
221
277
  },
278
+ Gray5: {
279
+ color: colors.Gray5
280
+ },
222
281
  //weight
282
+ Bold: {
283
+ fontFamily: 'NotoSansKR-Black'
284
+ },
223
285
  bold: {
224
- fontWeight: 'bold'
286
+ fontFamily: 'NotoSansKR-Bold'
287
+ },
288
+ medium: {
289
+ fontFamily: 'NotoSansKR-Medium'
225
290
  },
226
291
  thin: {
227
- fontWeight: '100'
292
+ fontFamily: 'NotoSansKR-Thin'
228
293
  },
229
- medium: {
230
- fontWeight: '500'
294
+ light: {
295
+ fontFamily: 'NotoSansKR-Light'
296
+ },
297
+ regular: {
298
+ fontFamily: 'NotoSansKR-Regular'
299
+ },
300
+ gs_light: {
301
+ fontFamily: 'GmarketSansTTFLight'
302
+ },
303
+ gs_bold: {
304
+ fontFamily: 'GmarketSansTTFBold'
305
+ },
306
+ gs_medium: {
307
+ fontFamily: 'GmarketSansTTFMedium'
231
308
  },
232
309
  //style
233
310
  line: {
@@ -243,6 +320,14 @@ export const TextAppStyles = StyleSheet.create({
243
320
  });
244
321
  export const ButtonAppStyles = StyleSheet.create({
245
322
  ...ViewAppStyles,
323
+ tabNormal: {
324
+ paddingHorizontal: 16,
325
+ paddingBottom: 7,
326
+ paddingTop: 6,
327
+ borderRadius: 50,
328
+ borderWidth: 1,
329
+ borderColor: colors.Gray2
330
+ },
246
331
  normal: {
247
332
  paddingVertical: 10,
248
333
  alignItems: 'center',
@@ -250,6 +335,13 @@ export const ButtonAppStyles = StyleSheet.create({
250
335
  backgroundColor: colors.yellow,
251
336
  borderRadius: 5
252
337
  },
338
+ grayNormal: {
339
+ paddingVertical: 10,
340
+ alignItems: 'center',
341
+ justifyContent: 'center',
342
+ backgroundColor: '#D1D1D1',
343
+ borderRadius: 5
344
+ },
253
345
  yellowSmall: {
254
346
  paddingVertical: 7,
255
347
  alignItems: 'center',
@@ -274,4 +366,27 @@ export const ButtonAppStyles = StyleSheet.create({
274
366
  borderRadius: 5
275
367
  }
276
368
  });
369
+ export const InputAppStyles = StyleSheet.create({
370
+ ...CommonStyles,
371
+ borderType: {
372
+ paddingHorizontal: ScaleSize(10),
373
+ borderWidth: ScaleSize(1),
374
+ borderColor: colors.Gray2,
375
+ height: ScaleSize(40),
376
+ justifyContent: 'center',
377
+ borderRadius: ScaleSize(3)
378
+ }
379
+ });
380
+ export const ImageAppStyles = StyleSheet.create({
381
+ ...CommonStyles,
382
+ contain: {
383
+ resizeMode: 'contain'
384
+ },
385
+ cover: {
386
+ resizeMode: 'cover'
387
+ },
388
+ stretch: {
389
+ resizeMode: 'stretch'
390
+ }
391
+ });
277
392
  //# sourceMappingURL=Utils.js.map
@@ -1,6 +1,8 @@
1
1
  import TextApp from './cores/TextApp';
2
2
  import ViewApp from './cores/ViewApp';
3
3
  import ButtonApp from './cores/ButtonApp';
4
+ import ImageApp from './cores/ImageApp';
5
+ import InputApp from './cores/InputApp';
4
6
  import { ScaleSize } from './cores/DeviceUtils';
5
- export { TextApp, ScaleSize, ButtonApp, ViewApp };
7
+ export { TextApp, ScaleSize, ButtonApp, ViewApp, InputApp, ImageApp };
6
8
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ImageAppProps } from './Utils';
3
+ declare const ImageApp: (props: ImageAppProps) => React.JSX.Element;
4
+ export default ImageApp;
5
+ //# sourceMappingURL=ImageApp.d.ts.map
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { InputAppProps } from './Utils';
3
+ declare const InputApp: (props: InputAppProps) => React.JSX.Element;
4
+ export default InputApp;
5
+ //# sourceMappingURL=InputApp.d.ts.map
@@ -1,4 +1,4 @@
1
- import { TextProps, ViewProps } from 'react-native';
1
+ import { ImageProps, TextInputProps, TextProps, ViewProps } from 'react-native';
2
2
  import { TouchableOpacityProps } from 'react-native';
3
3
  interface ByPassProps {
4
4
  flex?: any;
@@ -8,6 +8,9 @@ interface ByPassProps {
8
8
  export declare const parseStyles: ({ passStyle, styles, props }: any) => any;
9
9
  interface CommonProps extends ByPassProps {
10
10
  topLeft?: any;
11
+ center?: boolean;
12
+ centerItem?: boolean;
13
+ centerContent?: boolean;
11
14
  }
12
15
  export interface ViewAppProps extends ViewProps, CommonProps {
13
16
  Black?: boolean;
@@ -49,6 +52,16 @@ export declare const ViewAppStyles: {
49
52
  top: number;
50
53
  left: number;
51
54
  };
55
+ center: {
56
+ justifyContent: "center";
57
+ alignItems: "center";
58
+ };
59
+ centerItem: {
60
+ alignItems: "center";
61
+ };
62
+ centerContent: {
63
+ justifyContent: "center";
64
+ };
52
65
  };
53
66
  export interface TextAppProps extends TextProps, CommonProps {
54
67
  h1?: boolean;
@@ -64,9 +77,16 @@ export interface TextAppProps extends TextProps, CommonProps {
64
77
  white?: boolean;
65
78
  yellow?: boolean;
66
79
  orange?: boolean;
80
+ Gray5?: boolean;
67
81
  bold?: boolean;
68
82
  medium?: boolean;
69
83
  thin?: boolean;
84
+ regular?: boolean;
85
+ Bold?: boolean;
86
+ light?: boolean;
87
+ gs_light?: boolean;
88
+ gs_bold?: boolean;
89
+ gs_medium?: boolean;
70
90
  line?: boolean;
71
91
  center?: boolean;
72
92
  left?: boolean;
@@ -75,6 +95,11 @@ export interface TextAppProps extends TextProps, CommonProps {
75
95
  hardHeight?: boolean;
76
96
  }
77
97
  export declare const TextAppStyles: {
98
+ default: {
99
+ fontSize: any;
100
+ lineHeight: any;
101
+ fontFamily: string;
102
+ };
78
103
  h1: {
79
104
  fontSize: any;
80
105
  lineHeight: any;
@@ -122,14 +147,35 @@ export declare const TextAppStyles: {
122
147
  orange: {
123
148
  color: string;
124
149
  };
150
+ Gray5: {
151
+ color: string;
152
+ };
153
+ Bold: {
154
+ fontFamily: string;
155
+ };
125
156
  bold: {
126
- fontWeight: "bold";
157
+ fontFamily: string;
158
+ };
159
+ medium: {
160
+ fontFamily: string;
127
161
  };
128
162
  thin: {
129
- fontWeight: "100";
163
+ fontFamily: string;
130
164
  };
131
- medium: {
132
- fontWeight: "500";
165
+ light: {
166
+ fontFamily: string;
167
+ };
168
+ regular: {
169
+ fontFamily: string;
170
+ };
171
+ gs_light: {
172
+ fontFamily: string;
173
+ };
174
+ gs_bold: {
175
+ fontFamily: string;
176
+ };
177
+ gs_medium: {
178
+ fontFamily: string;
133
179
  };
134
180
  line: {
135
181
  textDecorationLine: "underline";
@@ -146,8 +192,14 @@ export declare const TextAppStyles: {
146
192
  top: number;
147
193
  left: number;
148
194
  };
195
+ centerItem: {
196
+ alignItems: "center";
197
+ };
198
+ centerContent: {
199
+ justifyContent: "center";
200
+ };
149
201
  };
150
- export interface ButtonAppProps extends ViewAppProps {
202
+ export interface ButtonAppProps extends TouchAppProps {
151
203
  title?: String;
152
204
  children?: any;
153
205
  propsText?: TextAppProps;
@@ -155,8 +207,18 @@ export interface ButtonAppProps extends ViewAppProps {
155
207
  disable?: boolean;
156
208
  yellowSmall?: boolean;
157
209
  whiteNormal?: boolean;
210
+ grayNormal?: any;
211
+ tabNormal?: any;
158
212
  }
159
213
  export declare const ButtonAppStyles: {
214
+ tabNormal: {
215
+ paddingHorizontal: number;
216
+ paddingBottom: number;
217
+ paddingTop: number;
218
+ borderRadius: number;
219
+ borderWidth: number;
220
+ borderColor: string;
221
+ };
160
222
  normal: {
161
223
  paddingVertical: number;
162
224
  alignItems: "center";
@@ -164,6 +226,13 @@ export declare const ButtonAppStyles: {
164
226
  backgroundColor: string;
165
227
  borderRadius: number;
166
228
  };
229
+ grayNormal: {
230
+ paddingVertical: number;
231
+ alignItems: "center";
232
+ justifyContent: "center";
233
+ backgroundColor: string;
234
+ borderRadius: number;
235
+ };
167
236
  yellowSmall: {
168
237
  paddingVertical: number;
169
238
  alignItems: "center";
@@ -209,6 +278,78 @@ export declare const ButtonAppStyles: {
209
278
  top: number;
210
279
  left: number;
211
280
  };
281
+ center: {
282
+ justifyContent: "center";
283
+ alignItems: "center";
284
+ };
285
+ centerItem: {
286
+ alignItems: "center";
287
+ };
288
+ centerContent: {
289
+ justifyContent: "center";
290
+ };
291
+ };
292
+ export interface InputAppProps extends TextInputProps, CommonProps {
293
+ borderType?: any;
294
+ }
295
+ export declare const InputAppStyles: {
296
+ borderType: {
297
+ paddingHorizontal: any;
298
+ borderWidth: any;
299
+ borderColor: string;
300
+ height: any;
301
+ justifyContent: "center";
302
+ borderRadius: any;
303
+ };
304
+ topLeft: {
305
+ position: "absolute";
306
+ top: number;
307
+ left: number;
308
+ };
309
+ center: {
310
+ justifyContent: "center";
311
+ alignItems: "center";
312
+ };
313
+ centerItem: {
314
+ alignItems: "center";
315
+ };
316
+ centerContent: {
317
+ justifyContent: "center";
318
+ };
319
+ };
320
+ export interface ImageAppProps extends ImageProps, CommonProps {
321
+ contain?: any;
322
+ cover?: any;
323
+ stretch?: any;
324
+ size?: any;
325
+ ratio?: any;
326
+ color?: any;
327
+ }
328
+ export declare const ImageAppStyles: {
329
+ contain: {
330
+ resizeMode: "contain";
331
+ };
332
+ cover: {
333
+ resizeMode: "cover";
334
+ };
335
+ stretch: {
336
+ resizeMode: "stretch";
337
+ };
338
+ topLeft: {
339
+ position: "absolute";
340
+ top: number;
341
+ left: number;
342
+ };
343
+ center: {
344
+ justifyContent: "center";
345
+ alignItems: "center";
346
+ };
347
+ centerItem: {
348
+ alignItems: "center";
349
+ };
350
+ centerContent: {
351
+ justifyContent: "center";
352
+ };
212
353
  };
213
354
  export {};
214
355
  //# sourceMappingURL=Utils.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import TextApp from './cores/TextApp';
2
2
  import ViewApp from './cores/ViewApp';
3
3
  import ButtonApp from './cores/ButtonApp';
4
+ import ImageApp from './cores/ImageApp';
5
+ import InputApp from './cores/InputApp';
4
6
  import { ScaleSize } from './cores/DeviceUtils';
5
- export { TextApp, ScaleSize, ButtonApp, ViewApp };
7
+ export { TextApp, ScaleSize, ButtonApp, ViewApp, InputApp, ImageApp };
6
8
  //# sourceMappingURL=index.d.ts.map