@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,151 +1,147 @@
|
|
|
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
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
for (var p in
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
};
|
|
148
|
-
exports.Select = Select;
|
|
149
|
-
__exportStar(require("./styles"), exports);
|
|
150
|
-
__exportStar(require("./types"), exports);
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
33
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
34
|
+
};
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.Select = void 0;
|
|
48
|
+
var common_1 = require("@codeleap/common");
|
|
49
|
+
var react_1 = __importStar(require("react"));
|
|
50
|
+
var react_native_1 = require("react-native");
|
|
51
|
+
var Button_1 = require("../Button");
|
|
52
|
+
var Scroll_1 = require("../Scroll");
|
|
53
|
+
var TextInput_1 = require("../TextInput");
|
|
54
|
+
var Touchable_1 = require("../Touchable");
|
|
55
|
+
var View_1 = require("../View");
|
|
56
|
+
var Select = function (selectProps) {
|
|
57
|
+
var value = selectProps.value, onValueChange = selectProps.onValueChange, label = selectProps.label, _a = selectProps.styles, styles = _a === void 0 ? {} : _a, options = selectProps.options, style = selectProps.style, variants = selectProps.variants, renderItem = selectProps.renderItem, _b = selectProps.closeOnSelect, closeOnSelect = _b === void 0 ? true : _b, _c = selectProps.scroll, scroll = _c === void 0 ? false : _c, _d = selectProps.showClose, showClose = _d === void 0 ? true : _d, _e = selectProps.showLabelOnModal, showLabelOnModal = _e === void 0 ? true : _e, _f = selectProps.placeholder, placeholder = _f === void 0 ? 'Select' : _f, _g = selectProps.arrowIconName, arrowIconName = _g === void 0 ? 'selectArrow' : _g, footer = selectProps.footer, _h = selectProps.modalCloseIconName, modalCloseIconName = _h === void 0 ? 'close' : _h, header = selectProps.header, closeButtonProps = selectProps.closeButtonProps, modalLabel = selectProps.modalLabel, _j = selectProps.textInputProps, textInputProps = _j === void 0 ? {} : _j, _k = selectProps.visible, visible = _k === void 0 ? null : _k, _l = selectProps.toggle, toggle = _l === void 0 ? null : _l, renderList = selectProps.renderList, props = __rest(selectProps, ["value", "onValueChange", "label", "styles", "options", "style", "variants", "renderItem", "closeOnSelect", "scroll", "showClose", "showLabelOnModal", "placeholder", "arrowIconName", "footer", "modalCloseIconName", "header", "closeButtonProps", "modalLabel", "textInputProps", "visible", "toggle", "renderList"]);
|
|
58
|
+
var _m = (0, common_1.useBooleanToggle)(false), _isModalVisible = _m[0], _setModalVisibility = _m[1];
|
|
59
|
+
var isModalVisible = visible !== null && visible !== void 0 ? visible : _isModalVisible;
|
|
60
|
+
var setModalVisibility = toggle !== null && toggle !== void 0 ? toggle : _setModalVisibility;
|
|
61
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:MobileSelect', {
|
|
62
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
63
|
+
rootElement: 'inputWrapper',
|
|
64
|
+
styles: styles,
|
|
65
|
+
variants: variants,
|
|
66
|
+
});
|
|
67
|
+
var inputStyles = (0, react_1.useMemo)(function () { return (0, common_1.getNestedStylesByKey)('input', variantStyles); }, [variantStyles]);
|
|
68
|
+
var closeButtonStyles = (0, react_1.useMemo)(function () { return (0, common_1.getNestedStylesByKey)('modalCloseButton', variantStyles); }, [variantStyles]);
|
|
69
|
+
var ListComponent = scroll ? Scroll_1.Scroll : View_1.View;
|
|
70
|
+
var close = function () { return setModalVisibility(); };
|
|
71
|
+
var select = function (value) {
|
|
72
|
+
onValueChange(value);
|
|
73
|
+
if (closeOnSelect) {
|
|
74
|
+
close();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var selectedLabel = (0, react_1.useMemo)(function () {
|
|
78
|
+
var _a;
|
|
79
|
+
var current = options.find(function (o) { return o.value === value; });
|
|
80
|
+
var display = (_a = current === null || current === void 0 ? void 0 : current.label) !== null && _a !== void 0 ? _a : placeholder;
|
|
81
|
+
return common_1.TypeGuards.isString(display) ? display : '';
|
|
82
|
+
}, [value, placeholder, options]);
|
|
83
|
+
return <>
|
|
84
|
+
<TextInput_1.TextInput caretHidden value={selectedLabel} rightIcon={{
|
|
85
|
+
name: arrowIconName,
|
|
86
|
+
}} editable={false} touchableWrapper innerWrapperProps={{
|
|
87
|
+
debugName: 'Select',
|
|
88
|
+
onPress: close,
|
|
89
|
+
}} pointerEvents={'none'} label={label} debugName={'Select input'} styles={inputStyles} style={style} {...textInputProps}/>
|
|
90
|
+
<View_1.AnimatedView pointerEvents={'none'} transition='opacity' style={[
|
|
91
|
+
{
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
top: 0,
|
|
94
|
+
right: 0,
|
|
95
|
+
left: 0,
|
|
96
|
+
bottom: 0,
|
|
97
|
+
},
|
|
98
|
+
variantStyles.backdrop,
|
|
99
|
+
isModalVisible ? variantStyles['backdrop:visible'] : variantStyles['backdrop:hidden'],
|
|
100
|
+
]}/>
|
|
101
|
+
|
|
102
|
+
<react_native_1.Modal animationType='slide' transparent={true} visible={isModalVisible} onRequestClose={function () {
|
|
103
|
+
setModalVisibility();
|
|
104
|
+
}} pointerEvents={isModalVisible ? 'auto' : 'none'}>
|
|
105
|
+
<Touchable_1.Touchable onPress={close} style={{
|
|
106
|
+
position: 'absolute',
|
|
107
|
+
top: 0,
|
|
108
|
+
right: 0,
|
|
109
|
+
left: 0,
|
|
110
|
+
bottom: 0,
|
|
111
|
+
}} debugName={"Close modal"}/>
|
|
112
|
+
<View_1.View style={variantStyles.modalWrapper}>
|
|
113
|
+
|
|
114
|
+
<View_1.View style={variantStyles.modalBox}>
|
|
115
|
+
{(showClose || showLabelOnModal || header) && (<View_1.View style={variantStyles.modalHeader}>
|
|
116
|
+
{header ? header : <>
|
|
117
|
+
{showLabelOnModal && <TextInput_1.InputLabel label={modalLabel || label} style={variantStyles.modalLabelText}/>}
|
|
118
|
+
{showClose && <Button_1.Button icon={modalCloseIconName} onPress={close} styles={closeButtonStyles} debugName={'Close modal'} {...closeButtonProps}/>}
|
|
119
|
+
</>}
|
|
120
|
+
</View_1.View>)}
|
|
121
|
+
<ListComponent style={variantStyles.modalList}>
|
|
122
|
+
{renderList ? renderList(__assign(__assign({}, selectProps), { isEmpty: !options.length })) : options.map(function (item, idx) {
|
|
123
|
+
var isSelected = value === item.value;
|
|
124
|
+
if (renderItem) {
|
|
125
|
+
return renderItem(__assign(__assign({}, item), { index: idx, selected: isSelected, onPress: close, styles: variantStyles }));
|
|
126
|
+
}
|
|
127
|
+
return <Touchable_1.Touchable key={idx} style={[
|
|
128
|
+
variantStyles.modalItem,
|
|
129
|
+
isSelected && variantStyles['modalItem:selected'],
|
|
130
|
+
]} onPress={function () { return select(item.value); }} debugName={"Select ".concat(item.value)}>
|
|
131
|
+
<TextInput_1.InputLabel label={item.label} style={[variantStyles.modalItemText, isSelected && variantStyles['modalItemText:selected']]}/>
|
|
132
|
+
</Touchable_1.Touchable>;
|
|
133
|
+
})}
|
|
134
|
+
</ListComponent>
|
|
135
|
+
|
|
136
|
+
{footer && <View_1.View style={variantStyles.modalFooter}>
|
|
137
|
+
{footer}
|
|
138
|
+
</View_1.View>}
|
|
139
|
+
</View_1.View>
|
|
140
|
+
</View_1.View>
|
|
141
|
+
</react_native_1.Modal>
|
|
142
|
+
</>;
|
|
143
|
+
};
|
|
144
|
+
exports.Select = Select;
|
|
145
|
+
__exportStar(require("./styles"), exports);
|
|
146
|
+
__exportStar(require("./types"), exports);
|
|
151
147
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAgI;AAChI,6CAAsC;AACtC,6CAAgD;AAChD,oCAAkC;AACl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@
|
|
|
1
|
-
import { ButtonParts, TextInputComposition } from '@codeleap/common';
|
|
2
|
-
declare type ModalParts = 'Box' | 'Wrapper' | 'Header' | 'Footer' | 'List' | 'Item' | 'ItemText' | 'Item:selected' | 'ItemText:selected' | 'LabelText' | `CloseButton${Capitalize<ButtonParts>}`;
|
|
3
|
-
declare type InputParts = `input${Capitalize<TextInputComposition>}`;
|
|
4
|
-
export declare type MobileSelectParts = InputParts | `backdrop` | `backdrop:visible` | `backdrop:hidden` | `modal${ModalParts}`;
|
|
5
|
-
export declare type MobileSelectComposition = MobileSelectParts;
|
|
6
|
-
export declare const MobileSelectStyles: {
|
|
7
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileSelectParts, any>>;
|
|
8
|
-
};
|
|
9
|
-
export {};
|
|
1
|
+
import { ButtonParts, TextInputComposition } from '@codeleap/common';
|
|
2
|
+
declare type ModalParts = 'Box' | 'Wrapper' | 'Header' | 'Footer' | 'List' | 'Item' | 'ItemText' | 'Item:selected' | 'ItemText:selected' | 'LabelText' | `CloseButton${Capitalize<ButtonParts>}`;
|
|
3
|
+
declare type InputParts = `input${Capitalize<TextInputComposition>}`;
|
|
4
|
+
export declare type MobileSelectParts = InputParts | `backdrop` | `backdrop:visible` | `backdrop:hidden` | `modal${ModalParts}`;
|
|
5
|
+
export declare type MobileSelectComposition = MobileSelectParts;
|
|
6
|
+
export declare const MobileSelectStyles: {
|
|
7
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<MobileSelectParts, any>>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -1,57 +1,57 @@
|
|
|
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.MobileSelectStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createSelectStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
exports.MobileSelectStyles = {
|
|
18
|
-
default: createSelectStyle(function (theme) { return ({
|
|
19
|
-
modalBox: {
|
|
20
|
-
// ...MobileModalStyles.default(theme).box,
|
|
21
|
-
backgroundColor: theme.colors.background,
|
|
22
|
-
borderTopLeftRadius: 20,
|
|
23
|
-
borderTopRightRadius: 20,
|
|
24
|
-
zIndex: 1,
|
|
25
|
-
elevation: 5,
|
|
26
|
-
},
|
|
27
|
-
modalWrapper: {
|
|
28
|
-
// ...MobileModalStyles.default(theme).wrapper,
|
|
29
|
-
flex: 1,
|
|
30
|
-
alignItems: 'stretch',
|
|
31
|
-
justifyContent: 'flex-end',
|
|
32
|
-
},
|
|
33
|
-
modalItem: __assign(__assign(__assign({}, theme.spacing.paddingVertical(1)), theme.spacing.paddingHorizontal(2)), { color: theme.colors.text }),
|
|
34
|
-
'modalItemText:selected': {
|
|
35
|
-
color: theme.colors.primary,
|
|
36
|
-
},
|
|
37
|
-
modalList: __assign({}, theme.spacing.marginVertical(0.6)),
|
|
38
|
-
backdrop: {
|
|
39
|
-
// ...MobileModalStyles.default(theme).overlay,
|
|
40
|
-
zIndex: 10,
|
|
41
|
-
flex: 1,
|
|
42
|
-
backgroundColor: theme.colors.black,
|
|
43
|
-
},
|
|
44
|
-
'backdrop:hidden': {
|
|
45
|
-
opacity: 0,
|
|
46
|
-
},
|
|
47
|
-
'backdrop:visible': {
|
|
48
|
-
opacity: 0.4,
|
|
49
|
-
},
|
|
50
|
-
modalHeader: __assign(__assign(__assign(__assign({}, theme.spacing.padding(2)), { flexDirection: 'row' }), theme.presets.alignCenter), theme.presets.justifySpaceBetween),
|
|
51
|
-
modalLabelText: __assign({}, (0, common_1.assignTextStyle)('p2')(theme).text),
|
|
52
|
-
modalCloseButtonWrapper: {
|
|
53
|
-
backgroundColor: 'transparent',
|
|
54
|
-
},
|
|
55
|
-
}); }),
|
|
56
|
-
};
|
|
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.MobileSelectStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createSelectStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
exports.MobileSelectStyles = {
|
|
18
|
+
default: createSelectStyle(function (theme) { return ({
|
|
19
|
+
modalBox: {
|
|
20
|
+
// ...MobileModalStyles.default(theme).box,
|
|
21
|
+
backgroundColor: theme.colors.background,
|
|
22
|
+
borderTopLeftRadius: 20,
|
|
23
|
+
borderTopRightRadius: 20,
|
|
24
|
+
zIndex: 1,
|
|
25
|
+
elevation: 5,
|
|
26
|
+
},
|
|
27
|
+
modalWrapper: {
|
|
28
|
+
// ...MobileModalStyles.default(theme).wrapper,
|
|
29
|
+
flex: 1,
|
|
30
|
+
alignItems: 'stretch',
|
|
31
|
+
justifyContent: 'flex-end',
|
|
32
|
+
},
|
|
33
|
+
modalItem: __assign(__assign(__assign({}, theme.spacing.paddingVertical(1)), theme.spacing.paddingHorizontal(2)), { color: theme.colors.text }),
|
|
34
|
+
'modalItemText:selected': {
|
|
35
|
+
color: theme.colors.primary,
|
|
36
|
+
},
|
|
37
|
+
modalList: __assign({}, theme.spacing.marginVertical(0.6)),
|
|
38
|
+
backdrop: {
|
|
39
|
+
// ...MobileModalStyles.default(theme).overlay,
|
|
40
|
+
zIndex: 10,
|
|
41
|
+
flex: 1,
|
|
42
|
+
backgroundColor: theme.colors.black,
|
|
43
|
+
},
|
|
44
|
+
'backdrop:hidden': {
|
|
45
|
+
opacity: 0,
|
|
46
|
+
},
|
|
47
|
+
'backdrop:visible': {
|
|
48
|
+
opacity: 0.4,
|
|
49
|
+
},
|
|
50
|
+
modalHeader: __assign(__assign(__assign(__assign({}, theme.spacing.padding(2)), { flexDirection: 'row' }), theme.presets.alignCenter), theme.presets.justifySpaceBetween),
|
|
51
|
+
modalLabelText: __assign({}, (0, common_1.assignTextStyle)('p2')(theme).text),
|
|
52
|
+
modalCloseButtonWrapper: {
|
|
53
|
+
backgroundColor: 'transparent',
|
|
54
|
+
},
|
|
55
|
+
}); }),
|
|
56
|
+
};
|
|
57
57
|
//# sourceMappingURL=styles.js.map
|
|
File without changes
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { ComponentVariants, FormTypes, IconPlaceholder } from '@codeleap/common';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
|
-
import { StylesOf } from '../../types/utility';
|
|
4
|
-
import { ButtonProps } from '../Button';
|
|
5
|
-
import { TextInputProps } from '../TextInput';
|
|
6
|
-
import { MobileSelectComposition, MobileSelectStyles } from './styles';
|
|
7
|
-
export declare type SelectRenderFNProps<T> = FormTypes.Options<T>[number] & {
|
|
8
|
-
styles: StylesOf<MobileSelectComposition>;
|
|
9
|
-
onPress: () => void;
|
|
10
|
-
selected?: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
import { ComponentVariants, FormTypes, IconPlaceholder } from '@codeleap/common';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { StylesOf } from '../../types/utility';
|
|
4
|
+
import { ButtonProps } from '../Button';
|
|
5
|
+
import { TextInputProps } from '../TextInput';
|
|
6
|
+
import { MobileSelectComposition, MobileSelectStyles } from './styles';
|
|
7
|
+
export declare type SelectRenderFNProps<T> = FormTypes.Options<T>[number] & {
|
|
8
|
+
styles: StylesOf<MobileSelectComposition>;
|
|
9
|
+
onPress: () => void;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
export declare type SelectRenderFN<T> = (props: SelectRenderFNProps<T>) => JSX.Element;
|
|
14
|
+
export declare type CustomSelectProps<T> = {
|
|
15
|
+
value: T;
|
|
16
|
+
placeholder?: FormTypes.Label;
|
|
17
|
+
label?: FormTypes.Label;
|
|
18
|
+
options?: FormTypes.Options<T>;
|
|
19
|
+
onDropdownToggle?: (isOpen?: boolean) => void;
|
|
20
|
+
onValueChange?: (value: T) => void;
|
|
21
|
+
renderItem?: SelectRenderFN<T>;
|
|
22
|
+
styles?: StylesOf<MobileSelectComposition>;
|
|
23
|
+
style?: any;
|
|
24
|
+
arrowIconName?: IconPlaceholder;
|
|
25
|
+
scroll?: boolean;
|
|
26
|
+
closeOnSelect?: boolean;
|
|
27
|
+
footer?: ReactElement;
|
|
28
|
+
header?: ReactElement;
|
|
29
|
+
showLabelOnModal?: boolean;
|
|
30
|
+
modalCloseIconName?: IconPlaceholder;
|
|
31
|
+
showClose?: boolean;
|
|
32
|
+
modalLabel?: string;
|
|
33
|
+
textInputProps?: Partial<TextInputProps>;
|
|
34
|
+
closeButtonProps?: Partial<ButtonProps>;
|
|
35
|
+
toggle: (isOpen?: boolean) => void;
|
|
36
|
+
visible: boolean;
|
|
37
|
+
renderList?: (props: CustomSelectProps<T> & {
|
|
38
|
+
isEmpty: boolean;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
} & ComponentVariants<typeof MobileSelectStyles> & TextInputProps;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=types.js.map
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SliderMarkProps } from './types';
|
|
3
|
-
export declare const SliderMark: React.FC<SliderMarkProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SliderMarkProps } from './types';
|
|
3
|
+
export declare const SliderMark: React.FC<SliderMarkProps>;
|