react-native-umui 1.3.65 → 1.3.91
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/Accordion.js +46 -0
- package/lib/commonjs/Accordion.js.map +1 -0
- package/lib/commonjs/Badge.js +1 -1
- package/lib/commonjs/Badge.js.map +1 -1
- package/lib/commonjs/Button.js +10 -7
- package/lib/commonjs/Button.js.map +1 -1
- package/lib/commonjs/Checkbox.js +0 -1
- package/lib/commonjs/Checkbox.js.map +1 -1
- package/lib/commonjs/Divider.js.map +1 -1
- package/lib/commonjs/EasyIn.js +43 -0
- package/lib/commonjs/EasyIn.js.map +1 -1
- package/lib/commonjs/FlatList.js +2 -1
- package/lib/commonjs/FlatList.js.map +1 -1
- package/lib/commonjs/FlatPanel.js.map +1 -1
- package/lib/commonjs/Grid.js.map +1 -1
- package/lib/commonjs/InputField.js +2 -0
- package/lib/commonjs/InputField.js.map +1 -1
- package/lib/commonjs/Line.js +0 -1
- package/lib/commonjs/Line.js.map +1 -1
- package/lib/commonjs/Load.js +1 -2
- package/lib/commonjs/Load.js.map +1 -1
- package/lib/commonjs/Numeral.js +6 -1
- package/lib/commonjs/Numeral.js.map +1 -1
- package/lib/commonjs/PanelRK.js +1 -1
- package/lib/commonjs/PanelRK.js.map +1 -1
- package/lib/commonjs/Phone.js +12 -5
- package/lib/commonjs/Phone.js.map +1 -1
- package/lib/commonjs/Press.js.map +1 -1
- package/lib/commonjs/Radio.js +0 -1
- package/lib/commonjs/Radio.js.map +1 -1
- package/lib/commonjs/Scroll.js +2 -2
- package/lib/commonjs/Scroll.js.map +1 -1
- package/lib/commonjs/Tab.js +3 -12
- package/lib/commonjs/Tab.js.map +1 -1
- package/lib/commonjs/Text.js +22 -2
- package/lib/commonjs/Text.js.map +1 -1
- package/lib/commonjs/TextInput.js +69 -1
- package/lib/commonjs/TextInput.js.map +1 -1
- package/lib/commonjs/regions.js +8 -2
- package/lib/commonjs/regions.js.map +1 -1
- package/lib/commonjs/shadows.js +3 -2
- package/lib/commonjs/shadows.js.map +1 -1
- package/lib/module/Accordion.js +37 -0
- package/lib/module/Accordion.js.map +1 -0
- package/lib/module/Badge.js +1 -1
- package/lib/module/Badge.js.map +1 -1
- package/lib/module/Button.js +10 -7
- package/lib/module/Button.js.map +1 -1
- package/lib/module/Checkbox.js +0 -1
- package/lib/module/Checkbox.js.map +1 -1
- package/lib/module/Divider.js.map +1 -1
- package/lib/module/EasyIn.js +40 -0
- package/lib/module/EasyIn.js.map +1 -1
- package/lib/module/FlatList.js +2 -1
- package/lib/module/FlatList.js.map +1 -1
- package/lib/module/FlatPanel.js.map +1 -1
- package/lib/module/Grid.js.map +1 -1
- package/lib/module/InputField.js +2 -0
- package/lib/module/InputField.js.map +1 -1
- package/lib/module/Line.js +0 -1
- package/lib/module/Line.js.map +1 -1
- package/lib/module/Load.js +1 -2
- package/lib/module/Load.js.map +1 -1
- package/lib/module/Numeral.js +6 -1
- package/lib/module/Numeral.js.map +1 -1
- package/lib/module/PanelRK.js +2 -2
- package/lib/module/PanelRK.js.map +1 -1
- package/lib/module/Phone.js +12 -5
- package/lib/module/Phone.js.map +1 -1
- package/lib/module/Press.js.map +1 -1
- package/lib/module/Radio.js +0 -1
- package/lib/module/Radio.js.map +1 -1
- package/lib/module/Scroll.js +2 -2
- package/lib/module/Scroll.js.map +1 -1
- package/lib/module/Tab.js +3 -12
- package/lib/module/Tab.js.map +1 -1
- package/lib/module/Text.js +21 -2
- package/lib/module/Text.js.map +1 -1
- package/lib/module/TextInput.js +69 -2
- package/lib/module/TextInput.js.map +1 -1
- package/lib/module/regions.js +8 -2
- package/lib/module/regions.js.map +1 -1
- package/lib/module/shadows.js +3 -2
- package/lib/module/shadows.js.map +1 -1
- package/lib/typescript/src/Accordion.d.ts +12 -0
- package/lib/typescript/src/Accordion.d.ts.map +1 -0
- package/lib/typescript/src/Badge.d.ts.map +1 -1
- package/lib/typescript/src/Button.d.ts +1 -1
- package/lib/typescript/src/Button.d.ts.map +1 -1
- package/lib/typescript/src/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/Divider.d.ts.map +1 -1
- package/lib/typescript/src/EasyIn.d.ts +3 -0
- package/lib/typescript/src/EasyIn.d.ts.map +1 -1
- package/lib/typescript/src/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/FlatPanel.d.ts.map +1 -1
- package/lib/typescript/src/Grid.d.ts.map +1 -1
- package/lib/typescript/src/InputField.d.ts +1 -2
- package/lib/typescript/src/InputField.d.ts.map +1 -1
- package/lib/typescript/src/Line.d.ts.map +1 -1
- package/lib/typescript/src/Load.d.ts.map +1 -1
- package/lib/typescript/src/Numeral.d.ts.map +1 -1
- package/lib/typescript/src/PanelRK.d.ts +2 -2
- package/lib/typescript/src/PanelRK.d.ts.map +1 -1
- package/lib/typescript/src/Phone.d.ts +2 -1
- package/lib/typescript/src/Phone.d.ts.map +1 -1
- package/lib/typescript/src/Press.d.ts.map +1 -1
- package/lib/typescript/src/Radio.d.ts.map +1 -1
- package/lib/typescript/src/Scroll.d.ts.map +1 -1
- package/lib/typescript/src/Tab.d.ts.map +1 -1
- package/lib/typescript/src/Text.d.ts.map +1 -1
- package/lib/typescript/src/TextInput.d.ts +8 -1
- package/lib/typescript/src/TextInput.d.ts.map +1 -1
- package/lib/typescript/src/regions.d.ts +7 -1
- package/lib/typescript/src/regions.d.ts.map +1 -1
- package/lib/typescript/src/shadows.d.ts +2 -2
- package/lib/typescript/src/shadows.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Accordion.tsx +1 -0
- package/src/Badge.tsx +1 -1
- package/src/Button.tsx +81 -7
- package/src/Checkbox.tsx +1 -13
- package/src/Divider.tsx +1 -11
- package/src/EasyIn.tsx +1 -22
- package/src/FlatList.tsx +1 -6
- package/src/FlatPanel.tsx +1 -9
- package/src/Grid.tsx +1 -18
- package/src/InputField.tsx +1 -14
- package/src/Line.tsx +13 -5
- package/src/Load.tsx +59 -2
- package/src/Numeral.tsx +115 -31
- package/src/PanelRK.tsx +1 -6
- package/src/Phone.tsx +100 -73
- package/src/Press.tsx +1 -6
- package/src/Radio.tsx +1 -15
- package/src/Scroll.tsx +1 -13
- package/src/Tab.tsx +223 -23
- package/src/Text.tsx +21 -8
- package/src/TextInput.tsx +1 -24
- package/src/regions.ts +13 -5
- package/src/shadows.ts +1 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAW,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../src/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAAC,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAAC,UAAU,SAAS;IAAG,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAAE;AAAE,wBAAgB,IAAI,CAAC,EAAG,EAAE,SAAS,qBAAiD;AAAC,UAAU,WAAW;IAAG,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,CAAC;IAAC,KAAK,CAAC,EAAE,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;CAAE;AAAmJ,wBAAgB,KAAK,CAAC,KAAK,EAAE,WAAW,qBAA0d"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
|
-
import { TextStyle, ViewStyle } from "react-native";
|
|
3
|
-
import { StyleProp } from "react-native";
|
|
2
|
+
import { TextStyle, ViewStyle, StyleProp } from "react-native";
|
|
4
3
|
interface InputFieldProps {
|
|
5
4
|
testID?: string;
|
|
6
5
|
label?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.d.ts","sourceRoot":"","sources":["../../../src/InputField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"InputField.d.ts","sourceRoot":"","sources":["../../../src/InputField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAAC,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAAiC,UAAU,eAAe;IAAG,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAAE;AAAE,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,qBAAuV;AAAE,KAAK,mBAAmB,GAAG,eAAe,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAAC,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAA+lB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../src/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../src/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;AAEzD,UAAU,OAAO;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC/B;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAe,EAAE,MAAU,EAAE,KAAK,EAAE,EAAE,OAAO,qBAMpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Load.d.ts","sourceRoot":"","sources":["../../../src/Load.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAA4C,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Load.d.ts","sourceRoot":"","sources":["../../../src/Load.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAA4C,MAAM,OAAO,CAAC;AAWxF,UAAU,UAAW,SAAQ,cAAc,CAAC,GAAG,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,IAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBA+CjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Numeral.d.ts","sourceRoot":"","sources":["../../../src/Numeral.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AACD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,WAAW;IACxB;;;MAGE;IACF,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC;;;MAGE;IACF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,KAAK,MAAM,CAAC;IAE5I;;;MAGE;IACF,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAE/G;;;MAGE;IACF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAE7E;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAEhE;;;OAGG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;CAClE;AACD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AACD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAyGD,eAAO,MAAM,OAAO,EAAE,WAqDlB,CAAC;AACL,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,qBAErD;AACD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAElD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
interface MPanelRkProps extends
|
|
2
|
+
import { TouchableOpacityProps } from "react-native";
|
|
3
|
+
interface MPanelRkProps extends TouchableOpacityProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare function MPanelRK({ style, children, ...props }: MPanelRkProps): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelRK.d.ts","sourceRoot":"","sources":["../../../src/PanelRK.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PanelRK.d.ts","sourceRoot":"","sources":["../../../src/PanelRK.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAAC,OAAO,EAAoB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAAC,UAAU,aAAc,SAAQ,qBAAqB;IAAG,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAAE;AAAE,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBAA0S"}
|
|
@@ -42,12 +42,13 @@ interface MPhoneInputProps {
|
|
|
42
42
|
noPlusPrefix?: boolean;
|
|
43
43
|
regions?: Array<keyof typeof codesMap>;
|
|
44
44
|
phoneType?: PhoneType;
|
|
45
|
+
keyboardType?: 'default' | 'number-pad' | 'decimal-pad' | 'numeric' | 'email-address' | 'phone-pad' | 'url';
|
|
45
46
|
code: string;
|
|
46
47
|
value: any;
|
|
47
48
|
onChangeCountry: (regions: string[], active?: string) => void;
|
|
48
49
|
onChange: (value: string) => void;
|
|
49
50
|
onBlur: () => void;
|
|
50
51
|
}
|
|
51
|
-
export declare function MPhoneInput(props: MPhoneInputProps): React.JSX.Element;
|
|
52
|
+
export declare function MPhoneInput({ keyboardType, ...props }: MPhoneInputProps): React.JSX.Element;
|
|
52
53
|
export {};
|
|
53
54
|
//# sourceMappingURL=Phone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../src/Phone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAA4B,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzF,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW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E,KAAK,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,eAAe,GAAG,WAAW,GAAG,KAAK,CAAC;IAC5G,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,YAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAAgiG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Press.d.ts","sourceRoot":"","sources":["../../../src/Press.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Press.d.ts","sourceRoot":"","sources":["../../../src/Press.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAAC,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAAC,UAAU,WAAY,SAAQ,cAAc;IAAG,QAAQ,EAAE,SAAS,CAAC;CAAE;AAAE,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAA4D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAAC,OAAO,EAAE,SAAS,EAAsB,uBAAuB,EAAQ,MAAM,cAAc,CAAC;AAAiC,UAAU,WAAY,SAAQ,uBAAuB;IAAG,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;CAAE;AAAE,wBAAgB,MAAM,CAAC,EAAE,IAAS,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAS,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAAixB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scroll.d.ts","sourceRoot":"","sources":["../../../src/Scroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Scroll.d.ts","sourceRoot":"","sources":["../../../src/Scroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAAC,OAAO,EAAkB,UAAU,EAAE,SAAS,EAAE,SAAS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AED,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,QAAQ,EAAE,SAAS,CAAA;CACtB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAMlD;AAED,UAAU,iBAAiB;IACvB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAA;CAClD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAEpD;AAED,UAAU,kBAAkB;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,QAAQ,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC,CAAA;CAChF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAMtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAAC,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAAC,UAAU,UAAW,SAAQ,SAAS;CAAI;AAAE,eAAO,MAAM,KAAK,yEAAmL,CAAA"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextInputProps } from "react-native";
|
|
2
|
+
import { StyleProp, TextInputProps, ViewStyle } from "react-native";
|
|
3
3
|
interface ITextInputProps extends TextInputProps {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare function MTextInput({ disabled, editable, style, ...props }: ITextInputProps): JSX.Element;
|
|
7
7
|
export declare function MTextareaInput({ disabled, editable, style, ...props }: ITextInputProps): JSX.Element;
|
|
8
|
+
interface IMPinInputMatProps extends TextInputProps {
|
|
9
|
+
size: number;
|
|
10
|
+
styleContainer?: StyleProp<ViewStyle>;
|
|
11
|
+
styleBadge?: StyleProp<ViewStyle>;
|
|
12
|
+
onFilledFully?: (value?: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function MPinInput({ size, styleContainer, onFilledFully, ...props }: IMPinInputMatProps): JSX.Element;
|
|
8
15
|
export {};
|
|
9
16
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAyB,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../src/TextInput.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAyB,cAAc,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAC;AAAiY,UAAU,eAAgB,SAAQ,cAAc;IAAG,QAAQ,CAAC,EAAE,OAAO,CAAC;CAAE;AAAE,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,eAAiR;AAAC,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,eAAmV;AAAC,UAAU,kBAAmB,SAAQ,cAAc;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAI,IAAI,CAAC;CAAE;AAAE,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,eAAo8B"}
|
|
@@ -230,6 +230,7 @@ export declare const MCOLORS: Readonly<{
|
|
|
230
230
|
warning: "#f97316";
|
|
231
231
|
secondary: "#14b8a6";
|
|
232
232
|
danger: "#ca251a";
|
|
233
|
+
dangerlight: "#ff1818";
|
|
233
234
|
light: "white";
|
|
234
235
|
smokelight: "#f7f7f7";
|
|
235
236
|
light9: "#f9f9f9";
|
|
@@ -241,11 +242,16 @@ export declare const MCOLORS: Readonly<{
|
|
|
241
242
|
cyan: "#4bb790";
|
|
242
243
|
gray: "gray";
|
|
243
244
|
lightgray: "#dadce0";
|
|
245
|
+
metalicgray: "#43484b";
|
|
246
|
+
metalicgraylight: "#4d555a";
|
|
244
247
|
green: "#85d89a";
|
|
245
|
-
|
|
248
|
+
greenb1: "#21c161";
|
|
249
|
+
lightgreen: "#51ff0d";
|
|
246
250
|
black: "black";
|
|
247
251
|
metalicblack1: "#292929";
|
|
248
252
|
metalicblack2: "#343434";
|
|
249
253
|
metalicblack3: "#343434";
|
|
254
|
+
blueafc: "#0088cc";
|
|
255
|
+
metalicblue: "#121b22";
|
|
250
256
|
}>;
|
|
251
257
|
//# sourceMappingURL=regions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regions.d.ts","sourceRoot":"","sources":["../../../src/regions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgOnB,
|
|
1
|
+
{"version":3,"file":"regions.d.ts","sourceRoot":"","sources":["../../../src/regions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgOnB,CAAA;AAEF,eAAO,MAAM,KAAK,4hDAA0B,CAAA;AAE5C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BlB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const MSHADOWS:
|
|
1
|
+
export declare const MSHADOWS: {
|
|
2
2
|
_1: {
|
|
3
3
|
shadowColor: string;
|
|
4
4
|
shadowOffset: {
|
|
@@ -209,6 +209,6 @@ export declare const MSHADOWS: Readonly<{
|
|
|
209
209
|
shadowRadius: number;
|
|
210
210
|
elevation: number;
|
|
211
211
|
};
|
|
212
|
-
}
|
|
212
|
+
};
|
|
213
213
|
export declare const mshadow: (index: number, color: string, shadowOpacity?: number, shadowRadius?: number) => any;
|
|
214
214
|
//# sourceMappingURL=shadows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/shadows.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/shadows.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0jF,CAAC;AAA0B,eAAO,MAAM,OAAO,UAAW,MAAM,SAAS,MAAM,kBAAkB,MAAM,iBAAiB,MAAM,QAA0M,CAAA"}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React,{ FC, ReactNode, useState } from "react"; import { Pressable, StyleProp, View, ViewStyle } from "react-native"; import { MText } from "./Text";import { MSHADOWS } from "./shadows"; interface MAccordionProps { styleContainer?: StyleProp<ViewStyle>; styleAccordion?: StyleProp<ViewStyle>; label?: string | ReactNode; disabled?: boolean; render: () => ReactNode; } export const MAccordion: FC<MAccordionProps> = (props) => { const [isExpand, setIsExpand] = useState<boolean>(false); return (<View style={[{ marginBottom: isExpand ? 5 : 3 }, props.styleContainer]}> <Pressable style={[ props.disabled ? { opacity: 0.55 } : {}, { display: "flex", flexDirection: "row", alignItems: "center", backgroundColor: "#fcfcfc", padding: 5, paddingVertical: 9, marginBottom: isExpand ? 1 : 0 }, MSHADOWS._1, props.styleAccordion ]} onPress={() => { if (!props.disabled) { setIsExpand(val => (!val)) } }}> {typeof props.label === "string"?<MText style={{ flex: 1, color: "black", fontSize: 17, fontWeight: "500" }}>{props.label}</MText>:props.label}</Pressable>{isExpand && props.render()}</View> ) }
|
package/src/Badge.tsx
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { ReactNode } from "react"; import { StyleProp, TextStyle } from "react-native"; import { MText } from "./Text"; const nmcolors = { "success": "#3b82f6", "warning": "#ffffff", "danger": "#ffffff", "info": "#ffffff", "light": "gray", "dark": "white" }; const bgs = { "success": "#22c55e", "warning": "#f97316", "danger": "#ef4444", "info": "#14b8a6", "light": "black", "dark": "white" }; const otls = { "success": "#22c55e", "warning": "#f97316", "danger": "#ef4444", "info": "#14b8a6", "light": "#dadce0", "dark": "white" }; interface MBadgeProps { testID?: string; nativeID?: string; type: "success" | "warning" | "danger" | "info" | "light" | "dark"; align?: "auto" | "left" | "right" | "center" | "justify"; size?: "sm" | "md" | "nm"; outline?: boolean; style?: StyleProp<TextStyle>; label?: string; children?: ReactNode; }; export function MBadge({ size = "md", align = "center", ...props }: MBadgeProps) { return (<MText testID={props.testID} nativeID={props.nativeID} style={[{ fontSize: size === "sm" ? 12.5 : (size === "nm" ? 19 : 16), textAlign: align, paddingHorizontal: 4, paddingVertical: 3, borderWidth: 1, borderColor: otls[props.type], backgroundColor: props.outline ? "white" : bgs[props.type], color: props.outline ? bgs[props.type] : nmcolors[props.type], }, props.style]}>{props.children || props.label}</MText>)
|
|
1
|
+
import React, { ReactNode } from "react"; import { StyleProp, TextStyle } from "react-native"; import { MText } from "./Text"; const nmcolors = { "success": "#3b82f6", "warning": "#ffffff", "danger": "#ffffff", "info": "#ffffff", "light": "gray", "dark": "white" }; const bgs = { "success": "#22c55e", "warning": "#f97316", "danger": "#ef4444", "info": "#14b8a6", "light": "black", "dark": "white" }; const otls = { "success": "#22c55e", "warning": "#f97316", "danger": "#ef4444", "info": "#14b8a6", "light": "#dadce0", "dark": "white" }; interface MBadgeProps { testID?: string; nativeID?: string; type: "success" | "warning" | "danger" | "info" | "light" | "dark"; align?: "auto" | "left" | "right" | "center" | "justify"; size?: "sm" | "md" | "nm"; outline?: boolean; style?: StyleProp<TextStyle>; label?: string; children?: ReactNode; }; export function MBadge({ size = "md", align = "center", ...props }: MBadgeProps) { return ( <MText testID={props.testID} nativeID={props.nativeID} style={[ { fontSize: size === "sm" ? 12.5 : (size === "nm" ? 19 : 16), textAlign: align, paddingHorizontal: 4, paddingVertical: 3, borderWidth: 1, borderColor: otls[props.type], backgroundColor: props.outline ? "white" : bgs[props.type], color: props.outline ? bgs[props.type] : nmcolors[props.type], }, props.style ]}> {props.children || props.label} </MText> ) }
|
package/src/Button.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { ActivityIndicator, StyleProp, TouchableOpacity, ViewStyle } from "react-native";
|
|
3
3
|
import { MText } from "./Text";
|
|
4
|
+
|
|
4
5
|
const colorsBg = {
|
|
5
6
|
"primary": "#3b82f6",
|
|
6
7
|
"success": "#22c55e",
|
|
@@ -11,8 +12,10 @@ const colorsBg = {
|
|
|
11
12
|
"smokelight": "#f7f7f7",
|
|
12
13
|
"navy": "#3e4b67",
|
|
13
14
|
"orange": "#ff4e02",
|
|
14
|
-
"darksky": "#004d6c"
|
|
15
|
+
"darksky": "#004d6c",
|
|
16
|
+
"metalic": "#43484b"
|
|
15
17
|
};
|
|
18
|
+
|
|
16
19
|
const colorsBr = {
|
|
17
20
|
"primary": "#3b82f6",
|
|
18
21
|
"success": "#22c55e",
|
|
@@ -23,8 +26,10 @@ const colorsBr = {
|
|
|
23
26
|
"smokelight": "white",
|
|
24
27
|
"navy": "#3e4b67",
|
|
25
28
|
"orange": "#ff4e02",
|
|
26
|
-
"darksky": "#004d6c"
|
|
29
|
+
"darksky": "#004d6c",
|
|
30
|
+
"metalic": "#43484b"
|
|
27
31
|
};
|
|
32
|
+
|
|
28
33
|
const colorTxt = {
|
|
29
34
|
"primary": "white",
|
|
30
35
|
"success": "white",
|
|
@@ -35,8 +40,10 @@ const colorTxt = {
|
|
|
35
40
|
"smokelight": "black",
|
|
36
41
|
"navy": "white",
|
|
37
42
|
"orange": "white",
|
|
38
|
-
"darksky": "white"
|
|
43
|
+
"darksky": "white",
|
|
44
|
+
"metalic": "white"
|
|
39
45
|
};
|
|
46
|
+
|
|
40
47
|
const colorTxtOutline = {
|
|
41
48
|
"primary": "#3b82f6",
|
|
42
49
|
"success": "#22c55e",
|
|
@@ -47,8 +54,11 @@ const colorTxtOutline = {
|
|
|
47
54
|
"smokelight": "black",
|
|
48
55
|
"navy": "#3e4b67",
|
|
49
56
|
"orange": "#ff4e02",
|
|
50
|
-
"darksky": "#004d6c"
|
|
57
|
+
"darksky": "#004d6c",
|
|
58
|
+
"metalic": "#43484b"
|
|
51
59
|
};
|
|
60
|
+
|
|
61
|
+
|
|
52
62
|
interface MButtonProps {
|
|
53
63
|
testID?: string;
|
|
54
64
|
size?: "xs" | "sm" | "md" | "nm";
|
|
@@ -60,9 +70,73 @@ interface MButtonProps {
|
|
|
60
70
|
outline?: boolean;
|
|
61
71
|
noborder?: boolean;
|
|
62
72
|
loading?: boolean;
|
|
63
|
-
btnType: "primary" | "success" | "warning" | "secondary" | "danger" | "light" | "navy" | "smokelight" | "orange" | "darksky";
|
|
73
|
+
btnType: "primary" | "success" | "warning" | "secondary" | "danger" | "light" | "navy" | "smokelight" | "orange" | "darksky" | "metalic";
|
|
64
74
|
fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | undefined;
|
|
65
75
|
onPress?: () => void;
|
|
66
76
|
children?: ReactNode;
|
|
67
|
-
}
|
|
68
|
-
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function MButton({
|
|
80
|
+
testID,
|
|
81
|
+
size = "md",
|
|
82
|
+
noSizeLimit = false,
|
|
83
|
+
style,
|
|
84
|
+
label,
|
|
85
|
+
textAlign = "center",
|
|
86
|
+
fontWeight = "500",
|
|
87
|
+
disabled,
|
|
88
|
+
outline,
|
|
89
|
+
noborder,
|
|
90
|
+
loading,
|
|
91
|
+
btnType,
|
|
92
|
+
onPress,
|
|
93
|
+
children
|
|
94
|
+
}: MButtonProps) {
|
|
95
|
+
return (
|
|
96
|
+
<TouchableOpacity
|
|
97
|
+
testID={testID}
|
|
98
|
+
style={[
|
|
99
|
+
disabled || loading ? { opacity: 0.55 } : {},
|
|
100
|
+
{
|
|
101
|
+
flex: 1,
|
|
102
|
+
height: noSizeLimit ? null : size === "nm" ? 49 : size === "md" ? 45 : size === "xs" ? 27 : 33,
|
|
103
|
+
minHeight: noSizeLimit ? null : size === "nm" ? 49 : size === "md" ? 45 : size === "xs" ? 27 : 33,
|
|
104
|
+
maxHeight: noSizeLimit ? null : size === "nm" ? 49 : size === "md" ? 45 : size === "xs" ? 27 : 33,
|
|
105
|
+
backgroundColor: "purple",
|
|
106
|
+
display: "flex",
|
|
107
|
+
flexDirection: "row",
|
|
108
|
+
justifyContent: "center",
|
|
109
|
+
alignItems: "center",
|
|
110
|
+
borderRadius: 2
|
|
111
|
+
},
|
|
112
|
+
{ backgroundColor: outline && btnType !== "smokelight" ? "white" : colorsBg[btnType] },
|
|
113
|
+
outline ? { borderWidth: 1, borderColor: colorsBr[btnType] } : {},
|
|
114
|
+
style,
|
|
115
|
+
noborder ? { borderWidth: 0 } : {}
|
|
116
|
+
]}
|
|
117
|
+
activeOpacity={0.85}
|
|
118
|
+
disabled={disabled || loading}
|
|
119
|
+
onPress={onPress}
|
|
120
|
+
>
|
|
121
|
+
{loading ? (
|
|
122
|
+
<ActivityIndicator size={21} color="purple" style={{ flex: 1, marginLeft: 9, marginRight: 9 }} />
|
|
123
|
+
) : (
|
|
124
|
+
label ? (
|
|
125
|
+
<MText
|
|
126
|
+
style={{
|
|
127
|
+
flex: 1,
|
|
128
|
+
textAlign: textAlign,
|
|
129
|
+
color: outline ? colorTxtOutline[btnType] : colorTxt[btnType],
|
|
130
|
+
fontSize: size === "nm" ? 18 : size === "md" ? 16 : size === "xs" ? 11 : 14,
|
|
131
|
+
paddingHorizontal: 11,
|
|
132
|
+
fontWeight: fontWeight
|
|
133
|
+
}}>
|
|
134
|
+
{label}
|
|
135
|
+
</MText>
|
|
136
|
+
) : (
|
|
137
|
+
children
|
|
138
|
+
)
|
|
139
|
+
)}
|
|
140
|
+
</TouchableOpacity>
|
|
141
|
+
)
|
|
142
|
+
}
|
package/src/Checkbox.tsx
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
import React, { TextStyle, TouchableHighlight, TouchableHighlightProps, View } from "react-native";
|
|
2
|
-
import { MText } from "./Text";
|
|
3
|
-
interface MCheckboxProps extends TouchableHighlightProps {
|
|
4
|
-
name?: string;
|
|
5
|
-
value: string | number | boolean;
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
size?: number;
|
|
8
|
-
color: string;
|
|
9
|
-
label: string;
|
|
10
|
-
labelStyle?: TextStyle;
|
|
11
|
-
onChange?: (values: string | number | boolean, checked: boolean, name?: string) => void;
|
|
12
|
-
};
|
|
13
|
-
export function MCheckbox({ name = "", value, checked, color, label, size = 26, labelStyle, style, onChange, ...props }: MCheckboxProps) { return (<TouchableHighlight activeOpacity={0.85}{...props} onPress={() => { if (onChange) { onChange(checked ? "" : value, !checked, name) }; }} underlayColor="transparent" style={[{ flex: 1, maxHeight: size }, style]}><View style={{ flexDirection: "row", alignItems: "center" }}><View style={{ padding: 4, width: size, minHeight: size, height: size, borderWidth: 1, borderColor: color, backgroundColor: "white", display: "flex", justifyContent: "center", alignItems: "center", }}><View style={{ width: size - 8, minHeight: size - 8, height: size - 8, backgroundColor: checked ? color : "white", }} /></View><MText style={[{ fontSize: 16, paddingLeft: 11 }, labelStyle]}>{label}</MText></View></TouchableHighlight>); }
|
|
1
|
+
import React, { TextStyle, TouchableHighlight, TouchableHighlightProps, View } from "react-native"; import { MText } from "./Text"; interface MCheckboxProps extends TouchableHighlightProps { name?: string; value: string | number | boolean; checked?: boolean; size?: number; color: string; label: string; labelStyle?: TextStyle; onChange?: (values: string | number | boolean, checked: boolean, name?: string) => void; }; export function MCheckbox({ name = "", value, checked, color, label, size = 26, labelStyle, style, onChange, ...props }: MCheckboxProps) { return (<TouchableHighlight activeOpacity={0.85} {...props} onPress={() => { if (onChange) { onChange(checked ? "" : value, !checked, name); } }} underlayColor="transparent" style={[{ flex: 1, maxHeight: size }, style]}><View style={{ flexDirection: "row", alignItems: "center" }}><View style={{ padding: 4, width: size, minHeight: size, height: size, borderWidth: 1, borderColor: color, backgroundColor: "white", display: "flex", justifyContent: "center", alignItems: "center" }}><View style={{ width: size - 8, minHeight: size - 8, height: size - 8, backgroundColor: checked ? color : "white" }} /></View><MText style={[{ fontSize: 16, paddingLeft: 11 }, labelStyle]}>{label}</MText></View></TouchableHighlight>) }
|
package/src/Divider.tsx
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { StyleProp, TextStyle, View } from "react-native";
|
|
3
|
-
import { MText } from "./Text";
|
|
4
|
-
interface MDividerProps {
|
|
5
|
-
testID?: string
|
|
6
|
-
label: string
|
|
7
|
-
description?: string
|
|
8
|
-
labelStyle?: StyleProp<TextStyle>
|
|
9
|
-
descStyle?: StyleProp<TextStyle>
|
|
10
|
-
children?: ReactNode
|
|
11
|
-
}; export function MDivider(props: MDividerProps) { return (<View testID={props.testID} style={{ padding: 3, paddingVertical: 15, borderBottomWidth: 1, borderBottomColor: "#dadce0" }}><MText style={[{ color: "grey", fontSize: 15 }, props.labelStyle]}>{props.label}</MText><View style={{ marginTop: 5 }}>{props.description ? <MText style={[{ width: "100%", color: "black", fontSize: 15, fontWeight: "500" }, props.descStyle]}>{props.description}</MText> : (props.children || <MText style={[{ width: "100%", color: "black", fontSize: 15, fontWeight: "500" }, props.descStyle]}>-</MText>)}</View></View>) }
|
|
1
|
+
import React, { ReactNode } from "react"; import { StyleProp, TextStyle, View } from "react-native"; import { MText } from "./Text"; interface MDividerProps { testID?: string; label: string; description?: string; labelStyle?: StyleProp<TextStyle>; descStyle?: StyleProp<TextStyle>; children?: ReactNode; }; export function MDivider(props: MDividerProps) { return (<View testID={props.testID} style={{ padding: 3, paddingVertical: 15, borderBottomWidth: 1, borderBottomColor: "#dadce0" }}><MText style={[{ color: "grey", fontSize: 15 }, props.labelStyle]}>{props.label}</MText><View style={{ marginTop: 5 }}>{props.description?<MText style={[{ width: "100%", color: "black", fontSize: 15, fontWeight: "500" }, props.descStyle]}>{props.description}</MText>:(props.children || <MText style={[{ width: "100%", color: "black", fontSize: 15, fontWeight: "500" }, props.descStyle]}>-</MText>)}</View></View> ) }
|
package/src/EasyIn.tsx
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
import React, { FC, useEffect } from "react";
|
|
2
|
-
import { Animated, StyleProp, Text, TextStyle, ViewProps } from "react-native";
|
|
3
|
-
type MEasyInProps = ViewProps & {
|
|
4
|
-
direction?: "vr" | "hr";
|
|
5
|
-
from?: number;
|
|
6
|
-
to?: number;
|
|
7
|
-
duration?: number;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export const MEasyIn: FC<MEasyInProps> = ({ style, direction = "hr", from = 85, to = 0, duration = 500, children, ...props }) => { const popAnim = React.useRef(new Animated.Value(from)).current; useEffect(() => { Animated.timing(popAnim, { toValue: to, duration: duration, useNativeDriver: true, }).start(); }, []); return (<Animated.View {...props} style={[style, { transform: [direction === "hr" ? { translateX: popAnim } : { translateY: popAnim }] }]}>{children}</Animated.View>) }
|
|
11
|
-
type MOpacityProps = ViewProps & {
|
|
12
|
-
from?: number;
|
|
13
|
-
to?: number;
|
|
14
|
-
duration?: number;
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
};
|
|
17
|
-
export function MOpacity({ style, from = 0, to = 1, duration = 500, children, ...props }: MOpacityProps) { const popAnim = React.useRef(new Animated.Value(from)).current; useEffect(() => { Animated.timing(popAnim, { toValue: to, duration: duration, useNativeDriver: true, }).start(); }, []); return (<Animated.View {...props} style={[style, { opacity: popAnim }]}>{children}</Animated.View>) }
|
|
18
|
-
interface MEmptyProps {
|
|
19
|
-
size?: number;
|
|
20
|
-
style?: StyleProp<TextStyle>;
|
|
21
|
-
};
|
|
22
|
-
export function MEmpty({ size = 35, style }: MEmptyProps) { return (<Text style={[{ fontSize: size, textAlign: "center", letterSpacing: 0.63 }, style]}>📥</Text>) }
|
|
1
|
+
import React, { FC, useEffect } from "react"; import { Animated, StyleProp, Text, TextStyle, ViewProps } from "react-native"; type MEasyInProps = ViewProps & { direction?: "vr" | "hr"; from?: number; to?: number; duration?: number; children?: React.ReactNode; }; export const MEasyIn: FC<MEasyInProps> = ({ style, direction = "hr", from = 85, to = 0, duration = 500, children, ...props }) => { const popAnim = React.useRef(new Animated.Value(from)).current; useEffect(() => { Animated.timing(popAnim, { toValue: to, duration: duration, useNativeDriver: true, }).start(); }, []); return (<Animated.View {...props} style={[style, { transform: [direction === "hr" ? { translateX: popAnim } : { translateY: popAnim }] }]}>{children}</Animated.View>); }; type MOpacityProps = ViewProps & { from?: number; to?: number; duration?: number; children?: React.ReactNode; }; export function MOpacity({ style, from = 0, to = 1, duration = 500, children, ...props }: MOpacityProps) { const popAnim = React.useRef(new Animated.Value(from)).current; useEffect(() => { Animated.timing(popAnim, { toValue: to, duration: duration, useNativeDriver: true, }).start(); }, []); return (<Animated.View {...props} style={[style, { opacity: popAnim }]}>{children}</Animated.View>); }; interface MEmptyProps { size?: number; style?: StyleProp<TextStyle>; }; export function MEmpty({ size = 35, style }: MEmptyProps) { return (<Text style={[{ fontSize: size, textAlign: "center", letterSpacing: 0.63 }, style]}>📥</Text>); } export function MIPlay({ size = 19, style }: MEmptyProps) { return (<Text style={[{ fontSize: size, textAlign: "center", letterSpacing: 0.63 }, style]}>►</Text>); } export function MIPause({ size = 19, style }: MEmptyProps) { return (<Text style={[{ fontSize: size, textAlign: "center", letterSpacing: 0.63 }, style]}>📥</Text>); } export function MIStop({ size = 19, style }: MEmptyProps) { return (<Text style={[{ fontSize: size, textAlign: "center", letterSpacing: 0.63 }, style]}>📥</Text>); }
|
package/src/FlatList.tsx
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import { FlatList, FlatListProps } from "react-native";
|
|
3
|
-
interface MFlatListProps<T> extends FlatListProps<T> {
|
|
4
|
-
initialNumToRender?: number;
|
|
5
|
-
};
|
|
6
|
-
export const MFlatList = forwardRef<FlatList, MFlatListProps<any>>(({ contentContainerStyle, ...props }, ref) => { return (<FlatList ref={ref} scrollEnabled={true} {...props} contentContainerStyle={[{ flexGrow: 1, paddingBottom: 125 }, contentContainerStyle]} />) })
|
|
1
|
+
import React, { forwardRef } from "react"; import { FlatList, FlatListProps } from "react-native"; interface MFlatListProps<T> extends FlatListProps<T> { initialNumToRender?: number; }; export const MFlatList = forwardRef<FlatList, MFlatListProps<any>>(({ contentContainerStyle, ...props }, ref) => { return (<FlatList ref={ref} scrollEnabled={true} initialNumToRender={15} {...props} contentContainerStyle={[{ flexGrow: 1, paddingBottom: 125 }, contentContainerStyle]} />); })
|
package/src/FlatPanel.tsx
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { Dimensions, StyleProp, View, ViewStyle } from "react-native";
|
|
3
|
-
interface IFlatPanelProps {
|
|
4
|
-
position: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-center" | "right-center" | "top- center" | "bottom-center";
|
|
5
|
-
style?: StyleProp<ViewStyle>;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
};
|
|
8
|
-
const positionconstains = {"top-left": { top: 9, left: 9 },"top-right": { top: 9, right: 9 },"top-center": { top: 0, left: 9, right: 9,display: "flex", flexDirection: "row", justifyContent: "center" },"bottom-left": { bottom: 9, left: 9 },"bottom-right": { bottom: 9, right: 9 },"bottom-center": { bottom: 0, left: 9, right: 9, display: "flex", flexDirection: "row", justifyContent: "center" },"left-center": { top: Dimensions.get("window").height / 2.0, left: 9 },"right-center": { top: Dimensions.get("window").height / 2.0, right: 9 },};
|
|
9
|
-
export function MFlatPanel(props: IFlatPanelProps) {return (<View style={[{position: "absolute",zIndex: 99,backgroundColor: "transparent",alignItems: props.position.includes("right") ? "flex-end" : "flex-start",},positionconstains[props.position] || positionconstains["top-center"],props.style]}>{props.children}</View>);}
|
|
1
|
+
import React, { ReactNode } from "react"; import { Dimensions, StyleProp, View, ViewStyle } from "react-native"; interface IFlatPanelProps { position: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "left-center" | "right-center" | "top- center" | "bottom-center"; style?: StyleProp<ViewStyle>; children?: ReactNode; }; const positionconstains = { "top-left": { top: 9, left: 9 }, "top-right": { top: 9, right: 9 }, "top-center": { top: 0, left: 9, right: 9,display: "flex", flexDirection: "row", justifyContent: "center" }, "bottom-left": { bottom: 9, left: 9 }, "bottom-right": { bottom: 9, right: 9 }, "bottom-center": { bottom: 0, left: 9, right: 9, display: "flex", flexDirection: "row", justifyContent: "center" }, "left-center": { top: Dimensions.get("window").height / 2.0, left: 9 }, "right-center": { top: Dimensions.get("window").height / 2.0, right: 9 }, }; export function MFlatPanel(props: IFlatPanelProps) { return (<View style={[ { position: "absolute", zIndex: 99, backgroundColor: "transparent", alignItems: props.position.includes("right") ? "flex-end" : "flex-start", }, positionconstains[props.position] || positionconstains["top-center"], props.style ]}>{props.children}</View>) }
|
package/src/Grid.tsx
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import React, { ReactElement, useMemo } from "react"
|
|
2
|
-
import { StyleProp, View, ViewStyle } from "react-native"
|
|
3
|
-
interface IColProps {
|
|
4
|
-
colSpan: number;
|
|
5
|
-
style?: StyleProp<ViewStyle>;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export function MCol({ }: IColProps) { return (<></>) };
|
|
9
|
-
interface IMGridProps {
|
|
10
|
-
testID?: string;
|
|
11
|
-
cols?: number;
|
|
12
|
-
content?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
13
|
-
items?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
gap?: number;
|
|
16
|
-
children: ReactElement<IColProps> | Array<ReactElement<IColProps>>;
|
|
17
|
-
}
|
|
18
|
-
function calc(cols: number = 12) { let _cols = Number(cols) || 12; _cols = _cols <= 0 ? 12 : cols; return Number((100.0 / _cols).toFixed(5)); }; export function MGrid(props: IMGridProps) { const span = useMemo(() => { return calc(props.cols); }, [props.cols]); return (<View testID={props.testID} style={[{ display: "flex", flexDirection: "row", flexWrap: "wrap", justifyContent: props.content, alignItems: props.items, columnGap: props.gap }, props.style,]}>{(Array.isArray(props.children) ? props.children : [props.children])?.map(k => { return (<View style={[k.props.style, { flex: (span * k.props.colSpan) || 0 }]}>{k.props.children}</View>) })}</View>); }
|
|
1
|
+
import React, { ReactElement, useMemo } from "react"; import { StyleProp, View, ViewStyle } from "react-native"; interface IColProps { colSpan: number; style?: StyleProp<ViewStyle>; children?: React.ReactNode; }; export function MCol({ }: IColProps) { return (<React.Fragment></React.Fragment>); } interface IMGridProps { testID?: string; cols?: number; content?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly"; items?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline"; style?: StyleProp<ViewStyle>; gap?: number; children: ReactElement<IColProps> | Array<ReactElement<IColProps>>; }; function calc(cols: number = 12) { let _cols = Number(cols) || 12; _cols = _cols <= 0 ? 12 : cols; return Number((100.0 / _cols).toFixed(5)); }; export function MGrid(props: IMGridProps) { const span = useMemo(() => { return calc(props.cols); }, [props.cols]); return (<View testID={props.testID} style={[ { display: "flex", flexDirection: "row", flexWrap: "wrap", justifyContent: props.content, alignItems: props.items, columnGap: props.gap }, props.style, ]}>{(Array.isArray(props.children) ? props.children : [props.children])?.map(k => {return(<View style={[k.props.style, { flex: (span * k.props.colSpan) || 0 }]}>{k.props.children}</View>);})}</View>) }
|
package/src/InputField.tsx
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
import React, { ReactNode } from "react"
|
|
2
|
-
import { TextStyle, View, ViewStyle } from "react-native"
|
|
3
|
-
import { MText } from "./Text"
|
|
4
|
-
import { StyleProp } from "react-native"
|
|
5
|
-
interface InputFieldProps {
|
|
6
|
-
testID?: string
|
|
7
|
-
label?: string
|
|
8
|
-
containerStyle?: StyleProp<ViewStyle>
|
|
9
|
-
labelStyle?: StyleProp<TextStyle>
|
|
10
|
-
children?: ReactNode
|
|
11
|
-
}
|
|
12
|
-
export function MInputField(props: InputFieldProps) { return (<View testID={props.testID} style={[{ width: "100%", marginVertical: 5 }, props.containerStyle]}>{props.label ? <MText style={[{ color: "black", marginBottom: 3, fontSize: 15, paddingHorizontal: 3, fontWeight: "500" }, props.labelStyle]}>{props.label}</MText> : <React.Fragment></React.Fragment>}<View>{props.children}</View></View>); }
|
|
13
|
-
type MInputSetFieldProps = InputFieldProps & { noBackground?: boolean, border?: boolean }
|
|
14
|
-
export function MInputSetField(props: MInputSetFieldProps) { return (<View testID={props.testID} style={[{ width: "100%", marginVertical: 5 }, props.border ? { borderWidth: 1, borderColor: "#dadce0" } : {}, props.containerStyle]}>{props.label ? <MText style={[{ color: "black", fontWeight: "500", marginBottom: 3, paddingHorizontal: 7, paddingVertical: 1, fontSize: 15, top: -11.5, left: 7, zIndex: 105, position: "absolute", borderLeftWidth: 1, borderRightWidth: 1, borderColor: "#dadce0" }, props.noBackground ? {} : { backgroundColor: "white" }, props.labelStyle]}>{props.label}</MText> : <React.Fragment></React.Fragment>}<View>{props.children}</View></View>); }
|
|
1
|
+
import React, { ReactNode } from "react"; import { TextStyle, View, ViewStyle, StyleProp } from "react-native"; import { MText } from "./Text"; interface InputFieldProps { testID?: string; label?: string; containerStyle?: StyleProp<ViewStyle>; labelStyle?: StyleProp<TextStyle>; children?: ReactNode; }; export function MInputField(props: InputFieldProps) {return (<View testID={props.testID} style={[{ width: "100%", marginVertical: 5 }, props.containerStyle]}>{props.label?<MText style={[{ color: "black", marginBottom: 3, fontSize: 15, paddingHorizontal: 3, fontWeight: "500" }, props.labelStyle]}>{props.label}</MText>:<React.Fragment></React.Fragment>}<View>{props.children}</View></View>); }; type MInputSetFieldProps = InputFieldProps & { noBackground?: boolean, border?: boolean }; export function MInputSetField(props: MInputSetFieldProps) { return (<View testID={props.testID} style={[{ width: "100%", marginVertical: 5 }, props.border ? { borderWidth: 1, borderColor: "#dadce0" } : {}, props.containerStyle]}>{props.label?<MText style={[ { color: "black", fontWeight: "500", marginBottom: 3, paddingHorizontal: 7, paddingVertical: 1, fontSize: 15, top: -11.5, left: 7, zIndex: 105, position: "absolute", borderLeftWidth: 1, borderRightWidth: 1, borderColor: "#dadce0" }, props.noBackground ? {} : { backgroundColor: "white" }, props.labelStyle ]}>{props.label}</MText>:<React.Fragment></React.Fragment>}<View>{props.children}</View></View>); }
|
package/src/Line.tsx
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { StyleProp, View, ViewStyle } from "react-native"
|
|
3
|
+
|
|
3
4
|
interface HrProps {
|
|
4
|
-
margin?: number
|
|
5
|
-
direction?: "w" | "h"
|
|
6
|
-
style?: StyleProp<ViewStyle
|
|
7
|
-
}
|
|
8
|
-
|
|
5
|
+
margin?: number
|
|
6
|
+
direction?: "w" | "h"
|
|
7
|
+
style?: StyleProp<ViewStyle>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function MLine({ direction = "w", margin = 5, style }: HrProps) {
|
|
11
|
+
return (<View style={[
|
|
12
|
+
direction === "w" ? { flex: 1, height: 1, maxHeight: 1, marginVertical: margin } : { flex: 1, width: 1, maxWidth: 1, marginHorizontal: margin },
|
|
13
|
+
{ backgroundColor: "#dadce0" },
|
|
14
|
+
style
|
|
15
|
+
]} />)
|
|
16
|
+
}
|
package/src/Load.tsx
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import React, { ComponentProps, useCallback, useEffect, useRef, useState } from "react"
|
|
1
|
+
import React, { ComponentProps, useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { ActivityIndicator, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
function LoadActivity() {
|
|
5
|
+
return (
|
|
6
|
+
<View style={{ flex: 1, display: "flex", justifyContent: "center", alignItems: "center" }}>
|
|
7
|
+
<ActivityIndicator size={45} color="#016db6" />
|
|
8
|
+
</View>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
|
|
3
12
|
interface MLoadProps extends ComponentProps<any> {
|
|
4
13
|
loadId: string;
|
|
5
14
|
showLoading?: boolean;
|
|
@@ -8,4 +17,52 @@ interface MLoadProps extends ComponentProps<any> {
|
|
|
8
17
|
load: () => Promise<{}>;
|
|
9
18
|
onLoaded?: () => void;
|
|
10
19
|
};
|
|
11
|
-
|
|
20
|
+
|
|
21
|
+
export function MLoad({ loadId, showLoading, name = "default", delay, load, ...props }: MLoadProps) {
|
|
22
|
+
const [loaded, setLoaded] = useState<boolean>(false);
|
|
23
|
+
const loadIfRef = useRef<string>();
|
|
24
|
+
const timeRef = useRef<any>();
|
|
25
|
+
const ref = useRef<any>();
|
|
26
|
+
|
|
27
|
+
const loadCmp = useCallback(async () => {
|
|
28
|
+
try {
|
|
29
|
+
if (!timeRef.current) {
|
|
30
|
+
setLoaded(false);
|
|
31
|
+
|
|
32
|
+
timeRef.current = setTimeout(async () => {
|
|
33
|
+
try {
|
|
34
|
+
ref.current = await load();
|
|
35
|
+
if (props.onLoaded) {
|
|
36
|
+
props.onLoaded();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
clearTimeout(timeRef.current);
|
|
40
|
+
timeRef.current = undefined;
|
|
41
|
+
loadIfRef.current = loadId;
|
|
42
|
+
setLoaded(true);
|
|
43
|
+
} catch (error) {
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
}, delay || 25);
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
}, [timeRef, loadId, props.load, props.name]);
|
|
52
|
+
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
loadCmp();
|
|
55
|
+
return () => {
|
|
56
|
+
clearTimeout(timeRef.current)
|
|
57
|
+
};
|
|
58
|
+
}, [loadCmp]);
|
|
59
|
+
|
|
60
|
+
if (showLoading && !loaded) {
|
|
61
|
+
return (<LoadActivity />);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const Component = ref.current && ref.current[name] ? ref.current[name] : LoadActivity;
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<Component key={loadIfRef.current} {...props} />);
|
|
68
|
+
}
|