@codeleap/mobile 1.9.0 → 1.9.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/CodeLeap-Mobile-Packages.code-workspace +7 -7
- package/dist/components/ActivityIndicator.d.ts +13 -13
- package/dist/components/ActivityIndicator.js +50 -54
- package/dist/components/ActivityIndicator.js.map +1 -1
- package/dist/components/Animated.d.ts +15 -15
- package/dist/components/Animated.js +54 -58
- package/dist/components/Animated.js.map +1 -1
- package/dist/components/Button.d.ts +125 -125
- package/dist/components/Button.js +78 -82
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +15 -15
- package/dist/components/Checkbox/index.js +73 -77
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.d.ts +55 -55
- package/dist/components/Checkbox/styles.js +48 -48
- package/dist/components/Checkbox/styles.js.map +0 -0
- package/dist/components/ContentView.d.ts +10 -10
- package/dist/components/ContentView.js +50 -50
- package/dist/components/ContentView.js.map +0 -0
- package/dist/components/FileInput.d.ts +27 -27
- package/dist/components/FileInput.js +174 -178
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/Icon.d.ts +12 -12
- package/dist/components/Icon.js +66 -70
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Image.d.ts +18 -18
- package/dist/components/Image.js +55 -59
- package/dist/components/Image.js.map +1 -1
- package/dist/components/List.d.ts +13 -13
- package/dist/components/List.js +78 -82
- package/dist/components/List.js.map +1 -1
- package/dist/components/Modal/index.d.ts +26 -26
- package/dist/components/Modal/index.js +108 -112
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/styles.d.ts +69 -69
- package/dist/components/Modal/styles.js +64 -64
- package/dist/components/Modal/styles.js.map +0 -0
- package/dist/components/Navigation/Navigation.d.ts +3 -3
- package/dist/components/Navigation/Navigation.js +83 -87
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Navigation/constants.d.ts +5 -5
- package/dist/components/Navigation/constants.js +10 -10
- package/dist/components/Navigation/constants.js.map +0 -0
- package/dist/components/Navigation/index.d.ts +3 -3
- package/dist/components/Navigation/index.js +15 -19
- package/dist/components/Navigation/index.js.map +1 -1
- package/dist/components/Navigation/types.d.ts +26 -26
- package/dist/components/Navigation/types.js +7 -7
- package/dist/components/Navigation/types.js.map +0 -0
- package/dist/components/Navigation/utils.d.ts +3 -3
- package/dist/components/Navigation/utils.js +69 -69
- package/dist/components/Navigation/utils.js.map +0 -0
- package/dist/components/Overlay.d.ts +16 -16
- package/dist/components/Overlay.js +65 -69
- package/dist/components/Overlay.js.map +1 -1
- package/dist/components/Pager/index.d.ts +20 -20
- package/dist/components/Pager/index.js +163 -167
- package/dist/components/Pager/index.js.map +1 -1
- package/dist/components/Pager/styles.d.ts +54 -54
- package/dist/components/Pager/styles.js +43 -43
- package/dist/components/Pager/styles.js.map +0 -0
- package/dist/components/RadioInput/index.d.ts +26 -26
- package/dist/components/RadioInput/index.js +68 -72
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.d.ts +57 -57
- package/dist/components/RadioInput/styles.js +44 -44
- package/dist/components/RadioInput/styles.js.map +0 -0
- package/dist/components/Scroll.d.ts +12 -12
- package/dist/components/Scroll.js +76 -80
- package/dist/components/Scroll.js.map +1 -1
- package/dist/components/Sections.d.ts +11 -11
- package/dist/components/Sections.js +76 -80
- package/dist/components/Sections.js.map +1 -1
- package/dist/components/Select/index.d.ts +5 -5
- package/dist/components/Select/index.js +146 -150
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.d.ts +9 -9
- package/dist/components/Select/styles.js +56 -56
- package/dist/components/Select/styles.js.map +0 -0
- package/dist/components/Select/types.d.ts +40 -39
- package/dist/components/Select/types.js +2 -2
- package/dist/components/Select/types.js.map +0 -0
- package/dist/components/Slider/Mark.d.ts +3 -3
- package/dist/components/Slider/Mark.js +31 -31
- package/dist/components/Slider/Mark.js.map +0 -0
- package/dist/components/Slider/Thumb.d.ts +7 -7
- package/dist/components/Slider/Thumb.js +29 -29
- package/dist/components/Slider/Thumb.js.map +0 -0
- package/dist/components/Slider/index.d.ts +3 -3
- package/dist/components/Slider/index.js +93 -97
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/types.d.ts +25 -25
- package/dist/components/Slider/types.js +2 -2
- package/dist/components/Slider/types.js.map +0 -0
- package/dist/components/Switch.d.ts +13 -13
- package/dist/components/Switch.js +71 -75
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Text.d.ts +12 -12
- package/dist/components/Text.js +48 -52
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextInput.d.ts +183 -183
- package/dist/components/TextInput.js +174 -177
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/Touchable.d.ts +14 -14
- package/dist/components/Touchable.js +57 -61
- package/dist/components/Touchable.js.map +1 -1
- package/dist/components/View.d.ts +120 -120
- package/dist/components/View.js +50 -54
- package/dist/components/View.js.map +1 -1
- package/dist/components/components.d.ts +25 -25
- package/dist/components/components.js +37 -41
- package/dist/components/components.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +24 -28
- package/dist/index.js.map +1 -1
- package/dist/modules/documentPicker.d.ts +3 -3
- package/dist/modules/documentPicker.js +11 -11
- package/dist/modules/documentPicker.js.map +0 -0
- package/dist/modules/fastImage.d.ts +1 -1
- package/dist/modules/fastImage.js +9 -9
- package/dist/modules/fastImage.js.map +0 -0
- package/dist/modules/reactNavigation.d.ts +3 -3
- package/dist/modules/reactNavigation.js +10 -10
- package/dist/modules/reactNavigation.js.map +0 -0
- package/dist/modules/textInputMask.d.ts +7 -7
- package/dist/modules/textInputMask.js +9 -9
- package/dist/modules/types/fileTypes.d.ts +138 -138
- package/dist/modules/types/fileTypes.js +2 -2
- package/dist/modules/types/fileTypes.js.map +0 -0
- package/dist/modules/types/textInputMask.d.ts +9 -9
- package/dist/modules/types/textInputMask.js +2 -2
- package/dist/types/utility.d.ts +2 -2
- package/dist/types/utility.js +2 -2
- package/dist/types/utility.js.map +0 -0
- package/dist/utils/OSAlert.d.ts +31 -31
- package/dist/utils/OSAlert.js +141 -141
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/misc.d.ts +2 -2
- package/dist/utils/misc.js +25 -25
- package/dist/utils/misc.js.map +0 -0
- package/dist/utils/styles.d.ts +1 -1
- package/dist/utils/styles.js +12 -12
- package/dist/utils/styles.js.map +0 -0
- package/package.json +39 -39
- package/src/components/ActivityIndicator.tsx +46 -46
- package/src/components/Animated.tsx +34 -34
- package/src/components/Button.tsx +95 -95
- package/src/components/Checkbox/index.tsx +83 -83
- package/src/components/Checkbox/styles.ts +72 -72
- package/src/components/ContentView.tsx +58 -58
- package/src/components/FileInput.tsx +181 -181
- package/src/components/Icon.tsx +58 -58
- package/src/components/Image.tsx +61 -61
- package/src/components/List.tsx +109 -109
- package/src/components/Modal/index.tsx +161 -161
- package/src/components/Modal/styles.ts +133 -133
- package/src/components/Navigation/Navigation.tsx +58 -58
- package/src/components/Navigation/constants.ts +8 -8
- package/src/components/Navigation/index.tsx +3 -3
- package/src/components/Navigation/types.ts +35 -35
- package/src/components/Navigation/utils.tsx +59 -59
- package/src/components/Overlay.tsx +77 -77
- package/src/components/Pager/index.tsx +242 -242
- package/src/components/Pager/styles.ts +51 -51
- package/src/components/RadioInput/index.tsx +101 -101
- package/src/components/RadioInput/styles.ts +67 -67
- package/src/components/Scroll.tsx +104 -104
- package/src/components/Sections.tsx +101 -101
- package/src/components/Select/index.tsx +195 -195
- package/src/components/Select/styles.ts +81 -81
- package/src/components/Select/types.ts +46 -45
- package/src/components/Slider/Mark.tsx +46 -46
- package/src/components/Slider/Thumb.tsx +29 -29
- package/src/components/Slider/index.tsx +123 -123
- package/src/components/Slider/types.ts +25 -25
- package/src/components/Switch.tsx +81 -81
- package/src/components/Text.tsx +30 -30
- package/src/components/TextInput.tsx +246 -245
- package/src/components/Touchable.tsx +64 -64
- package/src/components/View.tsx +46 -46
- package/src/components/components.ts +26 -26
- package/src/index.ts +6 -6
- package/src/modules/documentPicker.ts +7 -7
- package/src/modules/fastImage.ts +2 -2
- package/src/modules/index.d.ts +496 -496
- package/src/modules/reactNavigation.ts +4 -4
- package/src/modules/textInputMask.ts +7 -7
- package/src/modules/types/documentPicker.d.ts +215 -215
- package/src/modules/types/fileTypes.ts +138 -138
- package/src/modules/types/textInputMask.ts +9 -9
- package/src/types/utility.ts +3 -3
- package/src/utils/OSAlert.ts +180 -180
- package/src/utils/misc.ts +24 -24
- package/src/utils/styles.ts +14 -14
|
@@ -1,78 +1,74 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
for (var p in
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
variantStyles[key],
|
|
59
|
-
key
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</Touchable_1.Touchable>
|
|
75
|
-
<TextInput_1.FormError message={error.message} style={getStyles('error')}/>
|
|
76
|
-
</View_1.View>);
|
|
77
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
24
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
25
|
+
var t = {};
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
27
|
+
t[p] = s[p];
|
|
28
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
29
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
30
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
31
|
+
t[p[i]] = s[p[i]];
|
|
32
|
+
}
|
|
33
|
+
return t;
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Checkbox = void 0;
|
|
37
|
+
var React = __importStar(require("react"));
|
|
38
|
+
var common_1 = require("@codeleap/common");
|
|
39
|
+
var react_1 = require("react");
|
|
40
|
+
var TextInput_1 = require("../TextInput");
|
|
41
|
+
var View_1 = require("../View");
|
|
42
|
+
var Touchable_1 = require("../Touchable");
|
|
43
|
+
__exportStar(require("./styles"), exports);
|
|
44
|
+
exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
|
|
45
|
+
var _a = checkboxProps.variants, variants = _a === void 0 ? [] : _a, _b = checkboxProps.style, style = _b === void 0 ? {} : _b, _c = checkboxProps.styles, styles = _c === void 0 ? {} : _c, label = checkboxProps.label, value = checkboxProps.value, onValueChange = checkboxProps.onValueChange, validate = checkboxProps.validate, required = checkboxProps.required, props = __rest(checkboxProps, ["variants", "style", "styles", "label", "value", "onValueChange", "validate", "required"]);
|
|
46
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('Checkbox', {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
variants: variants,
|
|
49
|
+
});
|
|
50
|
+
var _d = (0, common_1.useValidate)(value, validate), error = _d.error, showError = _d.showError;
|
|
51
|
+
function getStyles(key) {
|
|
52
|
+
return [
|
|
53
|
+
variantStyles[key],
|
|
54
|
+
variantStyles[key],
|
|
55
|
+
key === 'wrapper' ? style : {},
|
|
56
|
+
value ? variantStyles[key + ':checked'] : {},
|
|
57
|
+
value ? styles[key + ':checked'] : {},
|
|
58
|
+
showError ? variantStyles[key + ':error'] : {},
|
|
59
|
+
showError ? styles[key + ':error'] : {},
|
|
60
|
+
checkboxProps.disabled ? variantStyles[key + ':disabled'] : {},
|
|
61
|
+
checkboxProps.disabled ? styles[key + ':disabled'] : {},
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
return (<View_1.View style={getStyles('wrapper')} {...props}>
|
|
65
|
+
<Touchable_1.Touchable debugName={"Set checkbox value to ".concat(!value)} style={getStyles('input')} onPress={function () { return onValueChange(!value); }}>
|
|
66
|
+
<View_1.View style={getStyles('checkmarkWrapper')}>
|
|
67
|
+
<View_1.View style={getStyles('checkmark')}/>
|
|
68
|
+
</View_1.View>
|
|
69
|
+
<TextInput_1.InputLabel label={label} style={getStyles('label')} required={required}/>
|
|
70
|
+
</Touchable_1.Touchable>
|
|
71
|
+
<TextInput_1.FormError message={error.message} style={getStyles('error')}/>
|
|
72
|
+
</View_1.View>);
|
|
73
|
+
});
|
|
78
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
declare type CheckboxParts = 'wrapper' | 'label' | 'input' | 'checkmark' | 'checkmarkWrapper' | 'error';
|
|
2
|
-
export declare type MobileCheckboxComposition = CheckboxParts | `${CheckboxParts}:checked` | `${CheckboxParts}:disabled` | `${CheckboxParts}:error`;
|
|
3
|
-
export declare const MobileCheckboxStyles: {
|
|
4
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
11
|
-
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
12
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
13
|
-
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
14
|
-
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
15
|
-
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
16
|
-
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
17
|
-
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
18
|
-
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
19
|
-
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
20
|
-
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
21
|
-
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
22
|
-
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
23
|
-
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
24
|
-
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
25
|
-
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
26
|
-
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
27
|
-
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
28
|
-
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
29
|
-
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
30
|
-
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
31
|
-
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
32
|
-
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
33
|
-
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
34
|
-
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
35
|
-
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
36
|
-
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
37
|
-
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
38
|
-
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
39
|
-
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
40
|
-
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
41
|
-
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
42
|
-
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
43
|
-
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
44
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
45
|
-
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
46
|
-
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
47
|
-
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
48
|
-
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
49
|
-
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
50
|
-
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
51
|
-
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
52
|
-
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
53
|
-
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
54
|
-
};
|
|
55
|
-
export {};
|
|
1
|
+
declare type CheckboxParts = 'wrapper' | 'label' | 'input' | 'checkmark' | 'checkmarkWrapper' | 'error';
|
|
2
|
+
export declare type MobileCheckboxComposition = CheckboxParts | `${CheckboxParts}:checked` | `${CheckboxParts}:disabled` | `${CheckboxParts}:error`;
|
|
3
|
+
export declare const MobileCheckboxStyles: {
|
|
4
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
5
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
6
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
7
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
8
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
9
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
10
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
11
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
12
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
13
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
14
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
15
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
16
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
17
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
18
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
19
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
20
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
21
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
22
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
23
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
24
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
25
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
26
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
27
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
28
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
29
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
30
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
31
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
32
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
33
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
34
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
35
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
36
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
37
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
38
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
39
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
40
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
41
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
42
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
43
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
44
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
45
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
46
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
47
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
48
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
49
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
50
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
51
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
52
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
53
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileCheckboxComposition, any>>;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.MobileCheckboxStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createCheckboxStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
var presets = (0, common_1.includePresets)(function (styles) { return createCheckboxStyle(function () { return ({ wrapper: styles }); }); });
|
|
18
|
-
exports.MobileCheckboxStyles = __assign(__assign({}, presets), { default: createCheckboxStyle(function (theme) {
|
|
19
|
-
var size = theme.typography.baseFontSize * 1.2;
|
|
20
|
-
var markHeight = size * 0.5;
|
|
21
|
-
var markWidth = size * 0.25;
|
|
22
|
-
var translateX = -(markWidth / 2);
|
|
23
|
-
var translateY = -(markHeight / 2);
|
|
24
|
-
return {
|
|
25
|
-
wrapper: {},
|
|
26
|
-
input: __assign(__assign({ flexDirection: 'row' }, theme.presets.alignCenter), { borderRadius: theme.borderRadius.small }),
|
|
27
|
-
label: __assign({}, theme.spacing.marginLeft(0.5)),
|
|
28
|
-
checkmark: {
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
top: '40%',
|
|
31
|
-
left: '50%',
|
|
32
|
-
height: markHeight,
|
|
33
|
-
width: markWidth,
|
|
34
|
-
transform: [{ translateX: translateX }, { translateY: translateY }, { rotate: '45deg' }],
|
|
35
|
-
},
|
|
36
|
-
'checkmark:checked': __assign({}, theme.border.white({
|
|
37
|
-
width: 2,
|
|
38
|
-
directions: ['right', 'bottom'],
|
|
39
|
-
})),
|
|
40
|
-
checkmarkWrapper: __assign({ position: 'relative', width: size, height: size }, theme.border.neutral(1)),
|
|
41
|
-
'checkmarkWrapper:checked': {
|
|
42
|
-
backgroundColor: theme.colors.primary,
|
|
43
|
-
},
|
|
44
|
-
error: {
|
|
45
|
-
color: theme.colors.negative,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}) });
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.MobileCheckboxStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createCheckboxStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var presets = (0, common_1.includePresets)(function (styles) { return createCheckboxStyle(function () { return ({ wrapper: styles }); }); });
|
|
18
|
+
exports.MobileCheckboxStyles = __assign(__assign({}, presets), { default: createCheckboxStyle(function (theme) {
|
|
19
|
+
var size = theme.typography.baseFontSize * 1.2;
|
|
20
|
+
var markHeight = size * 0.5;
|
|
21
|
+
var markWidth = size * 0.25;
|
|
22
|
+
var translateX = -(markWidth / 2);
|
|
23
|
+
var translateY = -(markHeight / 2);
|
|
24
|
+
return {
|
|
25
|
+
wrapper: {},
|
|
26
|
+
input: __assign(__assign({ flexDirection: 'row' }, theme.presets.alignCenter), { borderRadius: theme.borderRadius.small }),
|
|
27
|
+
label: __assign({}, theme.spacing.marginLeft(0.5)),
|
|
28
|
+
checkmark: {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
top: '40%',
|
|
31
|
+
left: '50%',
|
|
32
|
+
height: markHeight,
|
|
33
|
+
width: markWidth,
|
|
34
|
+
transform: [{ translateX: translateX }, { translateY: translateY }, { rotate: '45deg' }],
|
|
35
|
+
},
|
|
36
|
+
'checkmark:checked': __assign({}, theme.border.white({
|
|
37
|
+
width: 2,
|
|
38
|
+
directions: ['right', 'bottom'],
|
|
39
|
+
})),
|
|
40
|
+
checkmarkWrapper: __assign({ position: 'relative', width: size, height: size }, theme.border.neutral(1)),
|
|
41
|
+
'checkmarkWrapper:checked': {
|
|
42
|
+
backgroundColor: theme.colors.primary,
|
|
43
|
+
},
|
|
44
|
+
error: {
|
|
45
|
+
color: theme.colors.negative,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}) });
|
|
49
49
|
//# sourceMappingURL=styles.js.map
|
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentVariants, ContentViewStyles, ViewComposition } from '@codeleap/common';
|
|
3
|
-
import { ViewProps } from './View';
|
|
4
|
-
import { StylesOf } from '../types/utility';
|
|
5
|
-
export declare type ContentViewProps = Omit<ViewProps, 'variants' | 'responsiveVariants'> & {
|
|
6
|
-
placeholderMsg: string;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
styles?: StylesOf<ViewComposition>;
|
|
9
|
-
} & ComponentVariants<typeof ContentViewStyles>;
|
|
10
|
-
export declare const ContentView: React.FC<ContentViewProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentVariants, ContentViewStyles, ViewComposition } from '@codeleap/common';
|
|
3
|
+
import { ViewProps } from './View';
|
|
4
|
+
import { StylesOf } from '../types/utility';
|
|
5
|
+
export declare type ContentViewProps = Omit<ViewProps, 'variants' | 'responsiveVariants'> & {
|
|
6
|
+
placeholderMsg: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
styles?: StylesOf<ViewComposition>;
|
|
9
|
+
} & ComponentVariants<typeof ContentViewStyles>;
|
|
10
|
+
export declare const ContentView: React.FC<ContentViewProps>;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ContentView = void 0;
|
|
18
|
-
var react_1 = __importDefault(require("react"));
|
|
19
|
-
var common_1 = require("@codeleap/common");
|
|
20
|
-
var View_1 = require("./View");
|
|
21
|
-
var Text_1 = require("./Text");
|
|
22
|
-
var ActivityIndicator_1 = require("./ActivityIndicator");
|
|
23
|
-
var react_native_1 = require("react-native");
|
|
24
|
-
var WrapContent = function (_a) {
|
|
25
|
-
var children = _a.children, props = __rest(_a, ["children"]);
|
|
26
|
-
return (<View_1.View {...props}>{children}</View_1.View>);
|
|
27
|
-
};
|
|
28
|
-
var ContentView = function (rawProps) {
|
|
29
|
-
var children = rawProps.children, placeholderMsg = rawProps.placeholderMsg, loading = rawProps.loading, variants = rawProps.variants, styles = rawProps.styles, props = __rest(rawProps, ["children", "placeholderMsg", "loading", "variants", "styles"]);
|
|
30
|
-
var variantStyle = (0, common_1.useDefaultComponentStyle)('ContentView', {
|
|
31
|
-
variants: variants,
|
|
32
|
-
transform: react_native_1.StyleSheet.flatten,
|
|
33
|
-
styles: styles,
|
|
34
|
-
});
|
|
35
|
-
if (loading) {
|
|
36
|
-
return (<WrapContent {...props} style={variantStyle.wrapper}>
|
|
37
|
-
<ActivityIndicator_1.ActivityIndicator styles={{ wrapper: variantStyle.loader }}/>
|
|
38
|
-
</WrapContent>);
|
|
39
|
-
}
|
|
40
|
-
var hasChildren = Object.keys(children || {}).length > 0;
|
|
41
|
-
if (hasChildren) {
|
|
42
|
-
return (<WrapContent {...props} style={variantStyle.wrapper}>
|
|
43
|
-
{children}
|
|
44
|
-
</WrapContent>);
|
|
45
|
-
}
|
|
46
|
-
return (<WrapContent {...props} style={styles}>
|
|
47
|
-
<Text_1.Text text={placeholderMsg}/>
|
|
48
|
-
</WrapContent>);
|
|
49
|
-
};
|
|
50
|
-
exports.ContentView = ContentView;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ContentView = void 0;
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var common_1 = require("@codeleap/common");
|
|
20
|
+
var View_1 = require("./View");
|
|
21
|
+
var Text_1 = require("./Text");
|
|
22
|
+
var ActivityIndicator_1 = require("./ActivityIndicator");
|
|
23
|
+
var react_native_1 = require("react-native");
|
|
24
|
+
var WrapContent = function (_a) {
|
|
25
|
+
var children = _a.children, props = __rest(_a, ["children"]);
|
|
26
|
+
return (<View_1.View {...props}>{children}</View_1.View>);
|
|
27
|
+
};
|
|
28
|
+
var ContentView = function (rawProps) {
|
|
29
|
+
var children = rawProps.children, placeholderMsg = rawProps.placeholderMsg, loading = rawProps.loading, variants = rawProps.variants, styles = rawProps.styles, props = __rest(rawProps, ["children", "placeholderMsg", "loading", "variants", "styles"]);
|
|
30
|
+
var variantStyle = (0, common_1.useDefaultComponentStyle)('ContentView', {
|
|
31
|
+
variants: variants,
|
|
32
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
33
|
+
styles: styles,
|
|
34
|
+
});
|
|
35
|
+
if (loading) {
|
|
36
|
+
return (<WrapContent {...props} style={variantStyle.wrapper}>
|
|
37
|
+
<ActivityIndicator_1.ActivityIndicator styles={{ wrapper: variantStyle.loader }}/>
|
|
38
|
+
</WrapContent>);
|
|
39
|
+
}
|
|
40
|
+
var hasChildren = Object.keys(children || {}).length > 0;
|
|
41
|
+
if (hasChildren) {
|
|
42
|
+
return (<WrapContent {...props} style={variantStyle.wrapper}>
|
|
43
|
+
{children}
|
|
44
|
+
</WrapContent>);
|
|
45
|
+
}
|
|
46
|
+
return (<WrapContent {...props} style={styles}>
|
|
47
|
+
<Text_1.Text text={placeholderMsg}/>
|
|
48
|
+
</WrapContent>);
|
|
49
|
+
};
|
|
50
|
+
exports.ContentView = ContentView;
|
|
51
51
|
//# sourceMappingURL=ContentView.js.map
|
|
File without changes
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentVariants, FileInputComposition, FileInputStyles, IconPlaceholder, MobileInputFile } from '@codeleap/common';
|
|
3
|
-
import { StylesOf } from '../types/utility';
|
|
4
|
-
import { ButtonProps } from './Button';
|
|
5
|
-
import OSAlert from '../utils/OSAlert';
|
|
6
|
-
import { Options } from 'react-native-image-crop-picker';
|
|
7
|
-
import { DocumentPickerOptions } from '../modules/types/documentPicker';
|
|
8
|
-
export declare type FileInputRef = {
|
|
9
|
-
openFilePicker: () => void;
|
|
10
|
-
};
|
|
11
|
-
export declare type FileInputProps = {
|
|
12
|
-
label?: string;
|
|
13
|
-
iconName?: IconPlaceholder;
|
|
14
|
-
styles?: StylesOf<FileInputComposition>;
|
|
15
|
-
mode: 'hidden' | 'button';
|
|
16
|
-
variants?: ComponentVariants<typeof FileInputStyles>['variants'];
|
|
17
|
-
onFileSelect(files: MobileInputFile[]): void;
|
|
18
|
-
options?: DocumentPickerOptions<any>;
|
|
19
|
-
buttonProps?: ButtonProps;
|
|
20
|
-
ref?: FileInputRef;
|
|
21
|
-
placeholder?: string;
|
|
22
|
-
type?: 'image' | 'anyFile';
|
|
23
|
-
alertProps?: Parameters<typeof OSAlert.ask>[0];
|
|
24
|
-
pickerOptions?: Partial<Options>;
|
|
25
|
-
required?: boolean;
|
|
26
|
-
};
|
|
27
|
-
export declare const FileInput: React.ForwardRefExoticComponent<Pick<FileInputProps, "label" | "variants" | "styles" | "placeholder" | "type" | "required" | "options" | "buttonProps" | "iconName" | "mode" | "onFileSelect" | "alertProps" | "pickerOptions"> & React.RefAttributes<FileInputRef>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentVariants, FileInputComposition, FileInputStyles, IconPlaceholder, MobileInputFile } from '@codeleap/common';
|
|
3
|
+
import { StylesOf } from '../types/utility';
|
|
4
|
+
import { ButtonProps } from './Button';
|
|
5
|
+
import OSAlert from '../utils/OSAlert';
|
|
6
|
+
import { Options } from 'react-native-image-crop-picker';
|
|
7
|
+
import { DocumentPickerOptions } from '../modules/types/documentPicker';
|
|
8
|
+
export declare type FileInputRef = {
|
|
9
|
+
openFilePicker: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare type FileInputProps = {
|
|
12
|
+
label?: string;
|
|
13
|
+
iconName?: IconPlaceholder;
|
|
14
|
+
styles?: StylesOf<FileInputComposition>;
|
|
15
|
+
mode: 'hidden' | 'button';
|
|
16
|
+
variants?: ComponentVariants<typeof FileInputStyles>['variants'];
|
|
17
|
+
onFileSelect(files: MobileInputFile[]): void;
|
|
18
|
+
options?: DocumentPickerOptions<any>;
|
|
19
|
+
buttonProps?: ButtonProps;
|
|
20
|
+
ref?: FileInputRef;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
type?: 'image' | 'anyFile';
|
|
23
|
+
alertProps?: Parameters<typeof OSAlert.ask>[0];
|
|
24
|
+
pickerOptions?: Partial<Options>;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare const FileInput: React.ForwardRefExoticComponent<Pick<FileInputProps, "label" | "variants" | "styles" | "placeholder" | "type" | "required" | "options" | "buttonProps" | "iconName" | "mode" | "onFileSelect" | "alertProps" | "pickerOptions"> & React.RefAttributes<FileInputRef>>;
|