@codeleap/mobile 4.2.9 → 4.2.10
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/dist/Registry.js +28 -53
- package/dist/Registry.js.map +1 -1
- package/dist/components/ActionIcon/index.js +27 -67
- package/dist/components/ActionIcon/index.js.map +1 -1
- package/dist/components/ActionIcon/styles.js +1 -2
- package/dist/components/ActionIcon/types.js +1 -2
- package/dist/components/ActivityIndicator/index.js +22 -62
- package/dist/components/ActivityIndicator/index.js.map +1 -1
- package/dist/components/ActivityIndicator/styles.js +1 -2
- package/dist/components/ActivityIndicator/types.js +1 -2
- package/dist/components/Autocomplete/index.js +73 -121
- package/dist/components/Autocomplete/index.js.map +1 -1
- package/dist/components/Autocomplete/styles.js +1 -2
- package/dist/components/Autocomplete/types.js +1 -2
- package/dist/components/Avatar/index.js +49 -90
- package/dist/components/Avatar/index.js.map +1 -1
- package/dist/components/Avatar/styles.js +1 -2
- package/dist/components/Avatar/types.js +1 -2
- package/dist/components/AvatarGroup/index.js +30 -75
- package/dist/components/AvatarGroup/index.js.map +1 -1
- package/dist/components/AvatarGroup/styles.js +1 -2
- package/dist/components/AvatarGroup/types.js +1 -2
- package/dist/components/Backdrop/index.js +26 -66
- package/dist/components/Backdrop/index.js.map +1 -1
- package/dist/components/Backdrop/styles.js +1 -2
- package/dist/components/Backdrop/types.js +1 -2
- package/dist/components/Badge/index.js +44 -85
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Badge/styles.js +1 -2
- package/dist/components/Badge/types.js +1 -2
- package/dist/components/Button/index.js +49 -98
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Button/styles.js +1 -2
- package/dist/components/Button/types.js +1 -2
- package/dist/components/Calendar/index.js +27 -68
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/types.d.ts +1 -2
- package/dist/components/Calendar/types.js +1 -2
- package/dist/components/Checkbox/index.js +52 -85
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.js +1 -2
- package/dist/components/Checkbox/types.js +1 -2
- package/dist/components/DatePickerModal/index.js +61 -113
- package/dist/components/DatePickerModal/index.js.map +1 -1
- package/dist/components/DatePickerModal/styles.js +1 -2
- package/dist/components/DatePickerModal/types.js +1 -2
- package/dist/components/EmptyPlaceholder/index.js +40 -69
- package/dist/components/EmptyPlaceholder/index.js.map +1 -1
- package/dist/components/EmptyPlaceholder/styles.js +1 -2
- package/dist/components/EmptyPlaceholder/types.js +1 -2
- package/dist/components/FileInput/index.js +112 -178
- package/dist/components/FileInput/index.js.map +1 -1
- package/dist/components/FileInput/types.js +1 -2
- package/dist/components/Grid/index.js +47 -97
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/Grid/styles.js +1 -2
- package/dist/components/Grid/types.js +1 -2
- package/dist/components/Icon/index.js +34 -75
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Icon/styles.js +1 -2
- package/dist/components/Icon/types.js +1 -2
- package/dist/components/Image/index.js +53 -96
- package/dist/components/Image/index.js.map +1 -1
- package/dist/components/Image/styles.js +1 -2
- package/dist/components/Image/types.js +1 -2
- package/dist/components/ImageView/Spotlight.js +75 -131
- package/dist/components/ImageView/Spotlight.js.map +1 -1
- package/dist/components/ImageView/component.js +8 -15
- package/dist/components/ImageView/component.js.map +1 -1
- package/dist/components/ImageView/index.js +2 -18
- package/dist/components/ImageView/index.js.map +1 -1
- package/dist/components/InputBase/index.js +35 -75
- package/dist/components/InputBase/index.js.map +1 -1
- package/dist/components/InputBase/styles.d.ts +3 -3
- package/dist/components/InputBase/styles.js +49 -50
- package/dist/components/InputBase/styles.js.map +1 -1
- package/dist/components/InputBase/types.d.ts +1 -0
- package/dist/components/InputBase/types.js +1 -2
- package/dist/components/InputBase/utils.js +4 -19
- package/dist/components/InputBase/utils.js.map +1 -1
- package/dist/components/List/index.js +46 -86
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/List/styles.js +1 -2
- package/dist/components/List/types.js +1 -2
- package/dist/components/LoadingOverlay/index.js +28 -66
- package/dist/components/LoadingOverlay/index.js.map +1 -1
- package/dist/components/LoadingOverlay/styles.js +1 -2
- package/dist/components/LoadingOverlay/types.js +1 -2
- package/dist/components/Modal/index.js +77 -113
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/styles.js +1 -2
- package/dist/components/Modal/types.js +1 -2
- package/dist/components/Navigation/Navigation.js +23 -66
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Navigation/constants.js +7 -10
- package/dist/components/Navigation/constants.js.map +1 -1
- package/dist/components/Navigation/index.js +3 -19
- package/dist/components/Navigation/index.js.map +1 -1
- package/dist/components/Navigation/types.js +1 -2
- package/dist/components/Navigation/utils.js +24 -59
- package/dist/components/Navigation/utils.js.map +1 -1
- package/dist/components/NumberIncrement/index.js +132 -165
- package/dist/components/NumberIncrement/index.js.map +1 -1
- package/dist/components/NumberIncrement/styles.js +1 -2
- package/dist/components/NumberIncrement/types.d.ts +2 -2
- package/dist/components/NumberIncrement/types.js +1 -2
- package/dist/components/NumberIncrement/utils.js +8 -12
- package/dist/components/NumberIncrement/utils.js.map +1 -1
- package/dist/components/Pager/PagerDots.js +17 -54
- package/dist/components/Pager/PagerDots.js.map +1 -1
- package/dist/components/Pager/index.js +43 -97
- package/dist/components/Pager/index.js.map +1 -1
- package/dist/components/Pager/styles.js +1 -2
- package/dist/components/Pager/types.js +1 -2
- package/dist/components/PaginationIndicator/index.js +23 -38
- package/dist/components/PaginationIndicator/index.js.map +1 -1
- package/dist/components/PaginationIndicator/styles.js +1 -2
- package/dist/components/PaginationIndicator/types.js +1 -2
- package/dist/components/PlacesAutocomplete/index.js +55 -106
- package/dist/components/PlacesAutocomplete/index.js.map +1 -1
- package/dist/components/PlacesAutocomplete/styles.js +1 -2
- package/dist/components/PlacesAutocomplete/types.js +1 -2
- package/dist/components/RadioInput/index.js +46 -84
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.js +1 -2
- package/dist/components/RadioInput/types.js +1 -2
- package/dist/components/RefreshControl/index.js +22 -63
- package/dist/components/RefreshControl/index.js.map +1 -1
- package/dist/components/RefreshControl/styles.js +1 -2
- package/dist/components/RefreshControl/types.js +1 -2
- package/dist/components/Scroll/index.js +33 -81
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/Scroll/styles.js +1 -2
- package/dist/components/Scroll/types.js +1 -2
- package/dist/components/SearchInput/index.js +22 -69
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/SectionFilters/context.d.ts +6 -0
- package/dist/components/SectionFilters/context.js +4 -8
- package/dist/components/SectionFilters/context.js.map +1 -1
- package/dist/components/SectionFilters/index.js +33 -76
- package/dist/components/SectionFilters/index.js.map +1 -1
- package/dist/components/SectionFilters/types.js +1 -2
- package/dist/components/SectionFilters/useSectionFilters.d.ts +3 -0
- package/dist/components/SectionFilters/useSectionFilters.js +71 -73
- package/dist/components/SectionFilters/useSectionFilters.js.map +1 -1
- package/dist/components/Sections/index.d.ts +8 -8
- package/dist/components/Sections/index.js +61 -106
- package/dist/components/Sections/index.js.map +1 -1
- package/dist/components/Sections/styles.d.ts +1 -1
- package/dist/components/Sections/styles.js +1 -2
- package/dist/components/Sections/types.js +1 -2
- package/dist/components/SegmentedControl/Option.js +13 -31
- package/dist/components/SegmentedControl/Option.js.map +1 -1
- package/dist/components/SegmentedControl/index.js +71 -114
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SegmentedControl/styles.js +1 -2
- package/dist/components/SegmentedControl/types.js +1 -2
- package/dist/components/Select/index.js +94 -157
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.js +1 -2
- package/dist/components/Select/types.js +1 -2
- package/dist/components/Slider/index.js +89 -129
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/styles.d.ts +0 -6
- package/dist/components/Slider/styles.js +1 -2
- package/dist/components/Slider/types.js +1 -2
- package/dist/components/SortablePhotos/index.js +58 -91
- package/dist/components/SortablePhotos/index.js.map +1 -1
- package/dist/components/SortablePhotos/styles.js +1 -2
- package/dist/components/SortablePhotos/types.js +1 -2
- package/dist/components/SortablePhotos/useSortablePhotos.js +93 -157
- package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -1
- package/dist/components/Switch/index.js +51 -84
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Switch/styles.js +1 -2
- package/dist/components/Switch/types.js +1 -2
- package/dist/components/Text/index.js +40 -88
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/Text/styles.js +1 -2
- package/dist/components/Text/types.js +1 -2
- package/dist/components/TextInput/index.js +83 -131
- package/dist/components/TextInput/index.js.map +1 -1
- package/dist/components/TextInput/styles.js +1 -2
- package/dist/components/TextInput/types.js +1 -2
- package/dist/components/Touchable/index.js +69 -122
- package/dist/components/Touchable/index.js.map +1 -1
- package/dist/components/Touchable/styles.js +1 -2
- package/dist/components/Touchable/types.js +1 -2
- package/dist/components/View/index.js +19 -51
- package/dist/components/View/index.js.map +1 -1
- package/dist/components/View/styles.js +1 -2
- package/dist/components/View/types.js +1 -2
- package/dist/components/components.js +43 -59
- package/dist/components/components.js.map +1 -1
- package/dist/hooks/index.js +7 -11
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.js +8 -43
- package/dist/index.js.map +1 -1
- package/dist/modules/PressableRipple/index.js +2 -8
- package/dist/modules/PressableRipple/index.js.map +1 -1
- package/dist/modules/PressableRipple/ripple.js +125 -163
- package/dist/modules/PressableRipple/ripple.js.map +1 -1
- package/dist/modules/PressableRipple/styles.js +9 -20
- package/dist/modules/PressableRipple/styles.js.map +1 -1
- package/dist/modules/PressableRipple/type.js +1 -2
- package/dist/modules/reactNavigation.js +10 -21
- package/dist/modules/reactNavigation.js.map +1 -1
- package/dist/modules/textInputMask.js +3 -20
- package/dist/modules/textInputMask.js.map +1 -1
- package/dist/modules/types/textInputMask.js +1 -2
- package/dist/types/index.js +1 -17
- package/dist/types/index.js.map +1 -1
- package/dist/types/utility.js +1 -2
- package/dist/utils/KeyboardAware/context.js +5 -14
- package/dist/utils/KeyboardAware/context.js.map +1 -1
- package/dist/utils/KeyboardAware/index.js +3 -19
- package/dist/utils/KeyboardAware/index.js.map +1 -1
- package/dist/utils/KeyboardAware/keyboardHooks.js +36 -41
- package/dist/utils/KeyboardAware/keyboardHooks.js.map +1 -1
- package/dist/utils/KeyboardAware/types.js +1 -2
- package/dist/utils/KeyboardAware/types.js.map +1 -1
- package/dist/utils/ModalManager/components.js +24 -54
- package/dist/utils/ModalManager/components.js.map +1 -1
- package/dist/utils/ModalManager/context.js +94 -89
- package/dist/utils/ModalManager/context.js.map +1 -1
- package/dist/utils/ModalManager/index.js +7 -10
- package/dist/utils/ModalManager/index.js.map +1 -1
- package/dist/utils/NotificationManager/index.js +115 -245
- package/dist/utils/NotificationManager/index.js.map +1 -1
- package/dist/utils/NotificationManager/types.js +1 -2
- package/dist/utils/OSAlert.js +32 -48
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/PermissionManager/context.js +138 -255
- package/dist/utils/PermissionManager/context.js.map +1 -1
- package/dist/utils/PermissionManager/index.js +2 -8
- package/dist/utils/PermissionManager/index.js.map +1 -1
- package/dist/utils/PermissionManager/types.js +1 -2
- package/dist/utils/StorageManager.js +39 -46
- package/dist/utils/StorageManager.js.map +1 -1
- package/dist/utils/Subscription.js +30 -54
- package/dist/utils/Subscription.js.map +1 -1
- package/dist/utils/deprecated/notifications.js +143 -250
- package/dist/utils/deprecated/notifications.js.map +1 -1
- package/dist/utils/hooks.js +101 -120
- package/dist/utils/hooks.js.map +1 -1
- package/dist/utils/index.js +14 -43
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/input.js +15 -19
- package/dist/utils/input.js.map +1 -1
- package/dist/utils/locale.js +5 -9
- package/dist/utils/locale.js.map +1 -1
- package/dist/utils/misc.js +25 -40
- package/dist/utils/misc.js.map +1 -1
- package/dist/utils/theme.js +24 -33
- package/dist/utils/theme.js.map +1 -1
- package/dist/utils/useQueryListRefresh.js +16 -26
- package/dist/utils/useQueryListRefresh.js.map +1 -1
- package/package.json +6 -6
- package/package.json.bak +2 -2
- package/src/components/Calendar/types.ts +3 -3
- package/src/components/InputBase/styles.ts +35 -23
- package/src/components/InputBase/types.ts +1 -0
- package/src/components/NumberIncrement/index.tsx +8 -2
- package/src/components/NumberIncrement/types.ts +3 -3
- package/src/components/RadioInput/index.tsx +4 -0
- package/src/components/SectionFilters/useSectionFilters.tsx +31 -1
- package/src/components/Sections/index.tsx +3 -2
- package/src/components/Sections/styles.ts +2 -2
- package/src/components/Slider/index.tsx +9 -1
- package/src/components/Slider/styles.ts +0 -6
- package/src/components/TextInput/index.tsx +5 -0
|
@@ -1,127 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import React, { forwardRef, useState } from 'react';
|
|
2
|
+
import { TypeGuards } from '@codeleap/common';
|
|
3
|
+
import { Animated, Platform, Text as NativeText } from 'react-native';
|
|
4
|
+
import { usePressableFeedback } from '../../utils';
|
|
5
|
+
import { MobileStyleRegistry } from '../../Registry';
|
|
6
|
+
import { useStylesFor } from '../../hooks';
|
|
7
|
+
export * from './styles';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export const Text = forwardRef((textProps, ref) => {
|
|
10
|
+
const { text, children, onPress, style, debounce, pressDisabled, animated, animatedStyle, ...props } = {
|
|
11
|
+
...Text.defaultProps,
|
|
12
|
+
...textProps,
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
-
};
|
|
39
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
40
|
-
var t = {};
|
|
41
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
42
|
-
t[p] = s[p];
|
|
43
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
44
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
45
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
46
|
-
t[p[i]] = s[p[i]];
|
|
47
|
-
}
|
|
48
|
-
return t;
|
|
49
|
-
};
|
|
50
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.AnimatedText = exports.Text = void 0;
|
|
52
|
-
var react_1 = __importStar(require("react"));
|
|
53
|
-
var common_1 = require("@codeleap/common");
|
|
54
|
-
var react_native_1 = require("react-native");
|
|
55
|
-
var utils_1 = require("../../utils");
|
|
56
|
-
var Registry_1 = require("../../Registry");
|
|
57
|
-
var hooks_1 = require("../../hooks");
|
|
58
|
-
__exportStar(require("./styles"), exports);
|
|
59
|
-
__exportStar(require("./types"), exports);
|
|
60
|
-
exports.Text = (0, react_1.forwardRef)(function (textProps, ref) {
|
|
61
|
-
var _a = __assign(__assign({}, exports.Text.defaultProps), textProps), text = _a.text, children = _a.children, onPress = _a.onPress, style = _a.style, debounce = _a.debounce, pressDisabled = _a.pressDisabled, animated = _a.animated, animatedStyle = _a.animatedStyle, props = __rest(_a, ["text", "children", "onPress", "style", "debounce", "pressDisabled", "animated", "animatedStyle"]);
|
|
62
|
-
var pressPolyfillEnabled = react_native_1.Platform.select({
|
|
14
|
+
const pressPolyfillEnabled = Platform.select({
|
|
63
15
|
ios: props.suppressHighlighting,
|
|
64
16
|
android: true,
|
|
65
17
|
}) && !!onPress && !pressDisabled;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
18
|
+
const [pressed, setPressed] = useState(false);
|
|
19
|
+
const pressedRef = React.useRef(false);
|
|
20
|
+
const _onPress = (e) => {
|
|
69
21
|
if (!onPress)
|
|
70
22
|
return;
|
|
71
|
-
if (
|
|
23
|
+
if (TypeGuards.isNumber(debounce)) {
|
|
72
24
|
if (pressedRef.current) {
|
|
73
25
|
return;
|
|
74
26
|
}
|
|
75
27
|
pressedRef.current = true;
|
|
76
|
-
onPress
|
|
77
|
-
setTimeout(
|
|
28
|
+
onPress?.(e);
|
|
29
|
+
setTimeout(() => {
|
|
78
30
|
pressedRef.current = false;
|
|
79
31
|
}, debounce);
|
|
80
32
|
}
|
|
81
33
|
else {
|
|
82
|
-
onPress
|
|
34
|
+
onPress?.(e);
|
|
83
35
|
}
|
|
84
36
|
};
|
|
85
|
-
|
|
37
|
+
const handlePress = (pressed) => {
|
|
86
38
|
if (!pressPolyfillEnabled)
|
|
87
39
|
return;
|
|
88
|
-
return
|
|
40
|
+
return () => {
|
|
89
41
|
if (onPress) {
|
|
90
42
|
setPressed(pressed);
|
|
91
43
|
}
|
|
92
44
|
};
|
|
93
45
|
};
|
|
94
|
-
|
|
95
|
-
if (!!text && !
|
|
46
|
+
const styles = useStylesFor(Text.styleRegistryName, style);
|
|
47
|
+
if (!!text && !TypeGuards.isString(text))
|
|
96
48
|
return <>{text}</>;
|
|
97
|
-
|
|
98
|
-
|
|
49
|
+
const Component = animated ? Animated.Text : NativeText;
|
|
50
|
+
const { getFeedbackStyle } = usePressableFeedback(styles, {
|
|
99
51
|
disabled: !pressPolyfillEnabled,
|
|
100
|
-
feedbackConfig: styles
|
|
52
|
+
feedbackConfig: styles?.pressFeedback,
|
|
101
53
|
hightlightPropertyIn: 'color',
|
|
102
54
|
hightlightPropertyOut: 'backgroundColor',
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
|
|
55
|
+
});
|
|
56
|
+
const feedbackStyle = pressPolyfillEnabled ? getFeedbackStyle(pressed) : undefined;
|
|
57
|
+
const pressProps = !!onPress ? {
|
|
106
58
|
onPress: pressDisabled ? null : _onPress,
|
|
107
59
|
} : {};
|
|
108
|
-
|
|
109
|
-
return (<Component {...props} onPressIn={handlePress(true)} onPressOut={handlePress(false)} style={[styles
|
|
60
|
+
const disabled = !!onPress && pressDisabled;
|
|
61
|
+
return (<Component {...props} onPressIn={handlePress(true)} onPressOut={handlePress(false)} style={[styles?.text, animatedStyle, feedbackStyle, disabled ? styles['text:disabled'] : null]} allowFontScaling={false} {...pressProps}
|
|
110
62
|
// @ts-ignore
|
|
111
63
|
ref={ref}>
|
|
112
64
|
{text}
|
|
113
65
|
{children}
|
|
114
66
|
</Component>);
|
|
115
67
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return
|
|
68
|
+
Text.styleRegistryName = 'Text';
|
|
69
|
+
Text.elements = ['text', 'pressFeedback'];
|
|
70
|
+
Text.rootElement = 'text';
|
|
71
|
+
Text.withVariantTypes = (styles) => {
|
|
72
|
+
return Text;
|
|
121
73
|
};
|
|
122
|
-
|
|
74
|
+
Text.defaultProps = {
|
|
123
75
|
debounce: 1000,
|
|
124
76
|
};
|
|
125
|
-
|
|
126
|
-
|
|
77
|
+
MobileStyleRegistry.registerComponent(Text);
|
|
78
|
+
export const AnimatedText = Animated.createAnimatedComponent(Text);
|
|
127
79
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACrE,OAAO,EAA2B,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAwB,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE;IACvE,MAAM,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,KAAK,EACL,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,aAAa,EACb,GAAG,KAAK,EACT,GAAG;QACF,GAAG,IAAI,CAAC,YAAY;QACpB,GAAG,SAAS;KACb,CAAA;IAED,MAAM,oBAAo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AG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;AACzC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,IAAI,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IACzD,OAAO,IAAuE,CAAA;AAChF,CAAC,CAAA;AAED,IAAI,CAAC,YAAY,GAAG;IAClB,QAAQ,EAAE,IAAI;CACO,CAAA;AAEvB,mBAAmB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAA;AAE3C,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -1,181 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
-
};
|
|
39
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
40
|
-
var t = {};
|
|
41
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
42
|
-
t[p] = s[p];
|
|
43
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
44
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
45
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
46
|
-
t[p[i]] = s[p[i]];
|
|
47
|
-
}
|
|
48
|
-
return t;
|
|
49
|
-
};
|
|
50
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
51
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
52
|
-
if (ar || !(i in from)) {
|
|
53
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
54
|
-
ar[i] = from[i];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.TextInput = void 0;
|
|
61
|
-
var react_1 = __importStar(require("react"));
|
|
62
|
-
var common_1 = require("@codeleap/common");
|
|
63
|
-
var react_2 = require("react");
|
|
64
|
-
var react_native_1 = require("react-native");
|
|
65
|
-
var InputBase_1 = require("../InputBase");
|
|
66
|
-
var Touchable_1 = require("../Touchable");
|
|
67
|
-
var textInputMask_1 = require("../../modules/textInputMask");
|
|
68
|
-
var Registry_1 = require("../../Registry");
|
|
69
|
-
var hooks_1 = require("../../hooks");
|
|
70
|
-
__exportStar(require("./styles"), exports);
|
|
71
|
-
__exportStar(require("./types"), exports);
|
|
72
|
-
exports.TextInput = (0, react_2.forwardRef)(function (props, inputRef) {
|
|
73
|
-
var _a, _b, _c, _d, _e, _f;
|
|
74
|
-
var innerInputRef = react_1.default.useRef(null);
|
|
75
|
-
var _g = (0, react_1.useState)(false), isFocused = _g[0], setIsFocused = _g[1];
|
|
76
|
-
var _h = (0, react_1.useState)({ start: 0 }), currentSelection = _h[0], setCurrentSelection = _h[1];
|
|
77
|
-
var _j = (0, InputBase_1.selectInputBaseProps)(__assign(__assign({}, exports.TextInput.defaultProps), props)), inputBaseProps = _j.inputBaseProps, others = _j.others;
|
|
78
|
-
var value = others.value, validate = others.validate, debugName = others.debugName, visibilityToggle = others.visibilityToggle, masking = others.masking, password = others.password, onChangeMask = others.onChangeMask, onPress = others.onPress, visibleIcon = others.visibleIcon, hiddenIcon = others.hiddenIcon, style = others.style, autoAdjustSelection = others.autoAdjustSelection, selectionStart = others.selectionStart, _k = others._error, _error = _k === void 0 ? null : _k, textInputProps = __rest(others, ["value", "validate", "debugName", "visibilityToggle", "masking", "password", "onChangeMask", "onPress", "visibleIcon", "hiddenIcon", "style", "autoAdjustSelection", "selectionStart", "_error"]);
|
|
79
|
-
var _l = (0, common_1.useBooleanToggle)(true), secureTextEntry = _l[0], toggleSecureTextEntry = _l[1];
|
|
80
|
-
var isMasked = !!masking;
|
|
81
|
-
var InputElement = isMasked ? textInputMask_1.MaskedTextInput : react_native_1.TextInput;
|
|
82
|
-
var styles = (0, hooks_1.useStylesFor)(exports.TextInput.styleRegistryName, style);
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { TypeGuards, useValidate, useBooleanToggle } from '@codeleap/common';
|
|
3
|
+
import { forwardRef, useImperativeHandle } from 'react';
|
|
4
|
+
import { TextInput as NativeTextInput } from 'react-native';
|
|
5
|
+
import { InputBase, selectInputBaseProps } from '../InputBase';
|
|
6
|
+
import { Touchable } from '../Touchable';
|
|
7
|
+
import { MaskedTextInput } from '../../modules/textInputMask';
|
|
8
|
+
import { MobileStyleRegistry } from '../../Registry';
|
|
9
|
+
import { useStylesFor } from '../../hooks';
|
|
10
|
+
export * from './styles';
|
|
11
|
+
export * from './types';
|
|
12
|
+
export const TextInput = forwardRef((props, inputRef) => {
|
|
13
|
+
const innerInputRef = React.useRef(null);
|
|
14
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
15
|
+
const [currentSelection, setCurrentSelection] = useState({ start: 0 });
|
|
16
|
+
const { inputBaseProps, others, } = selectInputBaseProps({
|
|
17
|
+
...TextInput.defaultProps,
|
|
18
|
+
...props,
|
|
19
|
+
});
|
|
20
|
+
const { value, validate, debugName, visibilityToggle, masking, password, onChangeMask, onPress, visibleIcon, hiddenIcon, style, autoAdjustSelection, selectionStart, _error = null, ...textInputProps } = others;
|
|
21
|
+
const [secureTextEntry, toggleSecureTextEntry] = useBooleanToggle(true);
|
|
22
|
+
const isMasked = !!masking;
|
|
23
|
+
const InputElement = isMasked ? MaskedTextInput : NativeTextInput;
|
|
24
|
+
const styles = useStylesFor(TextInput.styleRegistryName, style);
|
|
83
25
|
// @ts-expect-error - React's ref type system is weird
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
26
|
+
useImperativeHandle(inputRef, () => {
|
|
27
|
+
return {
|
|
28
|
+
...innerInputRef.current,
|
|
29
|
+
focus: () => {
|
|
30
|
+
innerInputRef.current?.focus?.();
|
|
31
|
+
},
|
|
32
|
+
isTextInput: true,
|
|
33
|
+
};
|
|
34
|
+
}, [!!innerInputRef?.current?.focus]);
|
|
35
|
+
const isPressable = TypeGuards.isFunction(onPress);
|
|
36
|
+
const validation = useValidate(value, validate);
|
|
37
|
+
const handleBlur = React.useCallback((e) => {
|
|
94
38
|
validation.onInputBlurred();
|
|
95
39
|
setIsFocused(false);
|
|
96
40
|
if (autoAdjustSelection)
|
|
97
41
|
setCurrentSelection({ start: selectionStart });
|
|
98
|
-
|
|
42
|
+
props.onBlur?.(e);
|
|
99
43
|
}, [validation.onInputBlurred, props.onBlur]);
|
|
100
|
-
|
|
101
|
-
var _a;
|
|
44
|
+
const handleFocus = React.useCallback((e) => {
|
|
102
45
|
validation.onInputFocused();
|
|
103
46
|
setIsFocused(true);
|
|
104
47
|
if (autoAdjustSelection)
|
|
105
48
|
setCurrentSelection(null);
|
|
106
|
-
|
|
49
|
+
props.onFocus?.(e);
|
|
107
50
|
}, [validation.onInputFocused, props.onFocus]);
|
|
108
|
-
|
|
51
|
+
const handleMaskChange = (masked, unmasked) => {
|
|
109
52
|
if (textInputProps.onChangeText)
|
|
110
|
-
textInputProps.onChangeText(
|
|
53
|
+
textInputProps.onChangeText(masking?.saveFormatted ? masked : masked);
|
|
111
54
|
if (onChangeMask)
|
|
112
55
|
onChangeMask(masked, unmasked);
|
|
113
56
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
57
|
+
const isMultiline = textInputProps.multiline;
|
|
58
|
+
const isDisabled = !!inputBaseProps.disabled;
|
|
59
|
+
const placeholderTextColor = [
|
|
117
60
|
[isDisabled, styles['placeholder:disabled']],
|
|
118
61
|
[!validation.isValid, styles['placeholder:error']],
|
|
119
62
|
[isFocused, styles['placeholder:focus']],
|
|
120
|
-
[true, styles
|
|
63
|
+
[true, styles?.placeholder],
|
|
121
64
|
// @ts-expect-error
|
|
122
|
-
].find(
|
|
123
|
-
|
|
124
|
-
return x;
|
|
125
|
-
})) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.color;
|
|
126
|
-
var selectionColor = (_e = (_d = [
|
|
65
|
+
].find(([x]) => x)?.[1]?.color;
|
|
66
|
+
const selectionColor = [
|
|
127
67
|
[isDisabled, styles['selection:disabled']],
|
|
128
68
|
[!validation.isValid, styles['selection:error']],
|
|
129
69
|
[isFocused, styles['selection:focus']],
|
|
130
|
-
[true, styles
|
|
70
|
+
[true, styles?.selection],
|
|
131
71
|
// @ts-expect-error
|
|
132
|
-
].find(
|
|
133
|
-
|
|
134
|
-
return x;
|
|
135
|
-
})) === null || _d === void 0 ? void 0 : _d[1]) === null || _e === void 0 ? void 0 : _e.color;
|
|
136
|
-
var visibilityToggleProps = visibilityToggle ? {
|
|
72
|
+
].find(([x]) => x)?.[1]?.color;
|
|
73
|
+
const visibilityToggleProps = visibilityToggle ? {
|
|
137
74
|
onPress: toggleSecureTextEntry,
|
|
138
75
|
icon: (secureTextEntry ? hiddenIcon : visibleIcon),
|
|
139
|
-
debugName:
|
|
76
|
+
debugName: `${debugName} toggle visibility`,
|
|
140
77
|
} : null;
|
|
141
|
-
|
|
142
|
-
|
|
78
|
+
const rightIcon = inputBaseProps?.rightIcon ?? visibilityToggleProps;
|
|
79
|
+
const maskingExtraProps = isMasked ? {
|
|
80
|
+
onChangeText: handleMaskChange,
|
|
81
|
+
ref: null,
|
|
82
|
+
refInput: (inputRef) => {
|
|
143
83
|
if (!!inputRef) {
|
|
144
84
|
innerInputRef.current = inputRef;
|
|
145
85
|
}
|
|
146
|
-
}
|
|
147
|
-
|
|
86
|
+
},
|
|
87
|
+
...masking,
|
|
88
|
+
} : {};
|
|
89
|
+
const buttonModeProps = isPressable ? {
|
|
148
90
|
editable: false,
|
|
149
91
|
caretHidden: true,
|
|
150
92
|
} : {};
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
93
|
+
const hasMultipleLines = isMultiline && value?.includes('\n');
|
|
94
|
+
const hasValue = value?.length > 0;
|
|
95
|
+
return <InputBase {...inputBaseProps} innerWrapper={isPressable ? Touchable : undefined} debugName={debugName} error={(validation.isValid && !_error) ? null : _error || validation.message} style={{
|
|
96
|
+
...styles,
|
|
97
|
+
innerWrapper: [
|
|
98
|
+
styles?.innerWrapper,
|
|
154
99
|
isMultiline && styles['innerWrapper:multiline'],
|
|
155
100
|
hasMultipleLines && styles['innerWrapper:hasMultipleLines'],
|
|
156
|
-
]
|
|
101
|
+
],
|
|
102
|
+
}} innerWrapperProps={{
|
|
103
|
+
...(inputBaseProps.innerWrapperProps || {}),
|
|
104
|
+
onPress,
|
|
105
|
+
debugName,
|
|
106
|
+
dismissKeyboard: false,
|
|
107
|
+
}} rightIcon={rightIcon} focused={isFocused} hasValue={hasValue}>
|
|
157
108
|
<InputElement allowFontScaling={false} editable={!isPressable && !isDisabled} {...buttonModeProps} selection={autoAdjustSelection ? currentSelection : undefined} placeholderTextColor={placeholderTextColor} value={value} selectionColor={selectionColor} secureTextEntry={password && secureTextEntry} textAlignVertical={isMultiline ? 'top' : undefined} {...textInputProps} onBlur={handleBlur} onFocus={handleFocus} style={[
|
|
158
|
-
styles
|
|
109
|
+
styles?.input,
|
|
159
110
|
isMultiline && styles['input:multiline'],
|
|
160
111
|
isFocused && styles['input:focused'],
|
|
161
112
|
!validation.isValid && styles['input:error'],
|
|
162
113
|
isDisabled && styles['input:disabled'],
|
|
163
114
|
hasMultipleLines && styles['input:hasMultipleLines'],
|
|
115
|
+
hasValue && styles['input:typed'],
|
|
164
116
|
]} ref={innerInputRef} pointerEvents={isPressable ? 'none' : undefined} {...maskingExtraProps}/>
|
|
165
|
-
</
|
|
117
|
+
</InputBase>;
|
|
166
118
|
});
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return
|
|
119
|
+
TextInput.styleRegistryName = 'TextInput';
|
|
120
|
+
TextInput.elements = [...InputBase.elements, 'input', 'placeholder', 'selection'];
|
|
121
|
+
TextInput.rootElement = 'wrapper';
|
|
122
|
+
TextInput.withVariantTypes = (styles) => {
|
|
123
|
+
return TextInput;
|
|
172
124
|
};
|
|
173
|
-
|
|
125
|
+
TextInput.defaultProps = {
|
|
174
126
|
hiddenIcon: 'input-visiblity:hidden',
|
|
175
127
|
visibleIcon: 'input-visiblity:visible',
|
|
176
128
|
visibilityToggle: false,
|
|
177
129
|
autoAdjustSelection: false,
|
|
178
130
|
selectionStart: 0,
|
|
179
131
|
};
|
|
180
|
-
|
|
132
|
+
MobileStyleRegistry.registerComponent(TextInput);
|
|
181
133
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextInput/index.tsx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