@codeleap/mobile 2.3.26 → 2.3.27-2
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/components/ActionIcon/styles.d.ts +2 -2
- package/dist/components/ActivityIndicator/styles.d.ts +2 -2
- package/dist/components/Autocomplete/types.d.ts +59 -0
- package/dist/components/Autocomplete/types.js +3 -0
- package/dist/components/Autocomplete/types.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +23 -0
- package/dist/components/Avatar/index.js +95 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Avatar/styles.d.ts +4 -0
- package/dist/components/Avatar/styles.js +7 -0
- package/dist/components/Avatar/styles.js.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +18 -0
- package/dist/components/AvatarGroup/index.js +70 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/AvatarGroup/styles.d.ts +4 -0
- package/dist/components/AvatarGroup/styles.js +7 -0
- package/dist/components/AvatarGroup/styles.js.map +1 -0
- package/dist/components/Backdrop/styles.d.ts +2 -2
- package/dist/components/Badge/index.d.ts +31 -0
- package/dist/components/Badge/index.js +110 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Badge/styles.d.ts +5 -0
- package/dist/components/Badge/styles.js +7 -0
- package/dist/components/Badge/styles.js.map +1 -0
- package/dist/components/Button/index.d.ts +4 -4
- package/dist/components/Button/styles.d.ts +2 -2
- package/dist/components/Checkbox/styles.d.ts +2 -2
- package/dist/components/ContentView/styles.d.ts +2 -2
- package/dist/components/DatePickerModal/index.d.ts +8 -0
- package/dist/components/DatePickerModal/index.js +153 -0
- package/dist/components/DatePickerModal/index.js.map +1 -0
- package/dist/components/DatePickerModal/styles.d.ts +5 -0
- package/dist/components/DatePickerModal/styles.js +7 -0
- package/dist/components/DatePickerModal/styles.js.map +1 -0
- package/dist/components/DatePickerModal/types.d.ts +40 -0
- package/dist/components/DatePickerModal/types.js +3 -0
- package/dist/components/DatePickerModal/types.js.map +1 -0
- package/dist/components/Drawer/styles.d.ts +2 -2
- package/dist/components/EmptyPlaceholder/styles.d.ts +2 -2
- package/dist/components/FileInput/styles.d.ts +2 -2
- package/dist/components/Grid/styles.d.ts +2 -2
- package/dist/components/Icon/styles.d.ts +2 -2
- package/dist/components/Image/styles.d.ts +2 -2
- package/dist/components/InputBase/index.d.ts +37 -0
- package/dist/components/InputBase/index.js +90 -0
- package/dist/components/InputBase/index.js.map +1 -0
- package/dist/components/InputBase/styles.d.ts +27 -0
- package/dist/components/InputBase/styles.js +92 -0
- package/dist/components/InputBase/styles.js.map +1 -0
- package/dist/components/InputBase/types.d.ts +28 -0
- package/dist/components/InputBase/types.js +3 -0
- package/dist/components/InputBase/types.js.map +1 -0
- package/dist/components/InputBase/utils.d.ts +11 -0
- package/dist/components/InputBase/utils.js +41 -0
- package/dist/components/InputBase/utils.js.map +1 -0
- package/dist/components/List/PaginationIndicator.d.ts +2 -2
- package/dist/components/List/index.js +7 -2
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/List/styles.d.ts +2 -2
- package/dist/components/LoadingOverlay/index.d.ts +11 -0
- package/dist/components/LoadingOverlay/index.js +66 -0
- package/dist/components/LoadingOverlay/index.js.map +1 -0
- package/dist/components/LoadingOverlay/styles.d.ts +5 -0
- package/dist/components/LoadingOverlay/styles.js +7 -0
- package/dist/components/LoadingOverlay/styles.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +2 -2
- package/dist/components/NumberIncrement/index.d.ts +31 -0
- package/dist/components/NumberIncrement/index.js +232 -0
- package/dist/components/NumberIncrement/index.js.map +1 -0
- package/dist/components/NumberIncrement/styles.d.ts +5 -0
- package/dist/components/NumberIncrement/styles.js +7 -0
- package/dist/components/NumberIncrement/styles.js.map +1 -0
- package/dist/components/NumberIncrement/types.d.ts +35 -0
- package/dist/components/NumberIncrement/types.js +3 -0
- package/dist/components/NumberIncrement/types.js.map +1 -0
- package/dist/components/NumberIncrement/utils.d.ts +5 -0
- package/dist/components/NumberIncrement/utils.js +27 -0
- package/dist/components/NumberIncrement/utils.js.map +1 -0
- package/dist/components/Pager/styles.d.ts +2 -2
- package/dist/components/RadioInput/styles.d.ts +2 -2
- package/dist/components/RefreshControl/index.d.ts +9 -0
- package/dist/components/RefreshControl/index.js +31 -0
- package/dist/components/RefreshControl/index.js.map +1 -0
- package/dist/components/RefreshControl/styles.d.ts +2 -0
- package/dist/components/RefreshControl/styles.js +7 -0
- package/dist/components/RefreshControl/styles.js.map +1 -0
- package/dist/components/Scroll/index.js +3 -2
- package/dist/components/Scroll/index.js.map +1 -1
- package/dist/components/Scroll/styles.d.ts +2 -2
- package/dist/components/Sections/styles.d.ts +2 -0
- package/dist/components/Sections/styles.js +7 -0
- package/dist/components/Sections/styles.js.map +1 -0
- package/dist/components/SegmentedControl/Option.d.ts +16 -0
- package/dist/components/SegmentedControl/Option.js +38 -0
- package/dist/components/SegmentedControl/Option.js.map +1 -0
- package/dist/components/SegmentedControl/styles.d.ts +2 -2
- package/dist/components/Select/styles.d.ts +2 -2
- package/dist/components/Slider/styles.d.ts +2 -2
- package/dist/components/Switch/styles.d.ts +2 -2
- package/dist/components/Text/styles.d.ts +2 -2
- package/dist/components/TextInput/index.d.ts +4 -4
- package/dist/components/TextInput/styles.d.ts +2 -2
- package/dist/components/Touchable/styles.d.ts +2 -2
- package/dist/components/View/styles.d.ts +2 -2
- package/dist/components/defaultStyles.d.ts +54 -54
- package/dist/components/legacy/Modal/styles.d.ts +2 -2
- package/dist/components/legacy/Pager/styles.d.ts +2 -2
- package/dist/modules/PressableRipple/index.d.ts +2 -0
- package/dist/modules/PressableRipple/index.js +9 -0
- package/dist/modules/PressableRipple/index.js.map +1 -0
- package/dist/modules/PressableRipple/ripple.d.ts +30 -0
- package/dist/modules/PressableRipple/ripple.js +213 -0
- package/dist/modules/PressableRipple/ripple.js.map +1 -0
- package/dist/modules/PressableRipple/styles.d.ts +19 -0
- package/dist/modules/PressableRipple/styles.js +29 -0
- package/dist/modules/PressableRipple/styles.js.map +1 -0
- package/dist/modules/PressableRipple/type.d.ts +11 -0
- package/dist/modules/PressableRipple/type.js +3 -0
- package/dist/modules/PressableRipple/type.js.map +1 -0
- package/dist/utils/hooks.d.ts +2 -0
- package/dist/utils/hooks.js +13 -1
- package/dist/utils/hooks.js.map +1 -1
- package/dist/utils/locale.d.ts +1 -0
- package/dist/utils/locale.js +10 -0
- package/dist/utils/locale.js.map +1 -0
- package/package.json +3 -2
- package/src/components/List/index.tsx +9 -2
- package/src/components/Scroll/index.tsx +7 -3
- package/src/utils/hooks.ts +17 -2
- package/dist/components/{AutoComplete → Autocomplete}/index.d.ts +0 -0
- package/dist/components/{AutoComplete → Autocomplete}/index.js +0 -0
- package/dist/components/{AutoComplete → Autocomplete}/index.js.map +0 -0
- package/dist/components/{AutoComplete → Autocomplete}/styles.d.ts +2 -2
- /package/dist/components/{AutoComplete → Autocomplete}/styles.js +0 -0
- /package/dist/components/{AutoComplete → Autocomplete}/styles.js.map +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.InputBase = exports.InputBaseDefaultOrder = void 0;
|
|
32
|
+
var react_1 = __importDefault(require("react"));
|
|
33
|
+
var common_1 = require("@codeleap/common");
|
|
34
|
+
var ActionIcon_1 = require("../ActionIcon");
|
|
35
|
+
var View_1 = require("../View");
|
|
36
|
+
var styles_1 = require("./styles");
|
|
37
|
+
var Text_1 = require("../Text");
|
|
38
|
+
__exportStar(require("./styles"), exports);
|
|
39
|
+
__exportStar(require("./utils"), exports);
|
|
40
|
+
__exportStar(require("./types"), exports);
|
|
41
|
+
exports.InputBaseDefaultOrder = [
|
|
42
|
+
'label',
|
|
43
|
+
'description',
|
|
44
|
+
'innerWrapper',
|
|
45
|
+
'error',
|
|
46
|
+
];
|
|
47
|
+
var KeyPassthrough = function (props) {
|
|
48
|
+
return <>{props.children}</>;
|
|
49
|
+
};
|
|
50
|
+
exports.InputBase = react_1.default.forwardRef(function (props, ref) {
|
|
51
|
+
var children = props.children, _a = props.error, error = _a === void 0 ? null : _a, label = props.label, _b = props.description, description = _b === void 0 ? null : _b, _c = props.leftIcon, leftIcon = _c === void 0 ? null : _c, _d = props.rightIcon, rightIcon = _d === void 0 ? null : _d, styles = props.styles, wrapper = props.wrapper, debugName = props.debugName, innerWrapper = props.innerWrapper, focused = props.focused, _e = props.innerWrapperProps, innerWrapperProps = _e === void 0 ? {} : _e, _f = props.wrapperProps, wrapperProps = _f === void 0 ? {} : _f, _g = props.disabled, disabled = _g === void 0 ? false : _g, _h = props.order, order = _h === void 0 ? exports.InputBaseDefaultOrder : _h, style = props.style, _j = props.labelAsRow, labelAsRow = _j === void 0 ? false : _j, _k = props.hideErrorMessage, hideErrorMessage = _k === void 0 ? false : _k, otherProps = __rest(props, ["children", "error", "label", "description", "leftIcon", "rightIcon", "styles", "wrapper", "debugName", "innerWrapper", "focused", "innerWrapperProps", "wrapperProps", "disabled", "order", "style", "labelAsRow", "hideErrorMessage"]);
|
|
52
|
+
var WrapperComponent = wrapper || View_1.View;
|
|
53
|
+
var InnerWrapperComponent = innerWrapper || View_1.View;
|
|
54
|
+
var _styles = (0, styles_1.useInputBaseStyles)(props);
|
|
55
|
+
var _leftIcon = (0, common_1.getRenderedComponent)(leftIcon, ActionIcon_1.ActionIcon, {
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
styles: _styles.leftIconStyles,
|
|
58
|
+
debugName: "".concat(debugName, " left icon"),
|
|
59
|
+
});
|
|
60
|
+
var _rightIcon = (0, common_1.getRenderedComponent)(rightIcon, ActionIcon_1.ActionIcon, {
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
styles: _styles.rightIconStyles,
|
|
63
|
+
debugName: "".concat(debugName, " right icon"),
|
|
64
|
+
});
|
|
65
|
+
var _label = common_1.TypeGuards.isString(label) ? <Text_1.Text text={label} style={_styles.labelStyle}/> : label;
|
|
66
|
+
var _error = common_1.TypeGuards.isString(error) ? <Text_1.Text text={error} style={_styles.errorStyle}/> : error;
|
|
67
|
+
var _description = common_1.TypeGuards.isString(description) ? <Text_1.Text text={description} style={_styles.descriptionStyle}/> : description;
|
|
68
|
+
var parts = {
|
|
69
|
+
label: labelAsRow ? <View_1.View style={_styles.labelRowStyle}>
|
|
70
|
+
{_label}
|
|
71
|
+
{_description}
|
|
72
|
+
</View_1.View> : _label,
|
|
73
|
+
description: labelAsRow ? null : _description,
|
|
74
|
+
innerWrapper: <InnerWrapperComponent style={[
|
|
75
|
+
_styles.innerWrapperStyle,
|
|
76
|
+
]} {...innerWrapperProps}>
|
|
77
|
+
{_leftIcon}
|
|
78
|
+
{children}
|
|
79
|
+
{_rightIcon}
|
|
80
|
+
</InnerWrapperComponent>,
|
|
81
|
+
error: hideErrorMessage ? null : (_error || <Text_1.Text text={''} style={_styles.errorStyle}/>),
|
|
82
|
+
};
|
|
83
|
+
return <WrapperComponent style={[_styles.wrapperStyle, style]} {...otherProps} {...wrapperProps}>
|
|
84
|
+
{order.map(function (key) { return <KeyPassthrough key={key}>
|
|
85
|
+
{parts[key]}
|
|
86
|
+
</KeyPassthrough>; })}
|
|
87
|
+
|
|
88
|
+
</WrapperComponent>;
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InputBase/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,2CAAmE;AACnE,4CAA2D;AAC3D,gCAA8B;AAC9B,mCAA6C;AAE7C,gCAA8B;AAE9B,2CAAwB;AACxB,0CAAuB;AACvB,0CAAuB;AAEV,QAAA,qBAAqB,GAA2B;IAC3D,OAAO;IACP,aAAa;IACb,cAAc;IACd,OAAO;CACR,CAAA;AACD,IAAM,cAAc,GAAG,UAAC,KAAmC;IACzD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAA;AAC9B,CAAC,CAAA;AAEY,QAAA,SAAS,GAAG,eAAK,CAAC,UAAU,CAAsB,UAAC,KAAK,EAAE,GAAG;IAEtE,IAAA,QAAQ,GAmBN,KAAK,SAnBC,EACR,KAkBE,KAAK,MAl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ACb;IAAA,EAAE,qBAAqB,CAAC;QACxB,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/B,MAAM,IAAI,CAAC,WAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CACvD;KACF,CAAA;IAED,OAAO,CAAC,gBAAgB,CACtB,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CACrC,IAAI,UAAU,CAAC,CACf,IAAI,YAAY,CAAC,CAEjB;IAAA,CACE,KAAK,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAC1C;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,CACb;MAAA,EAAE,cAAc,CAAC,EAFE,CAEF,CAAC,CAItB;;EAAA,EAAE,gBAAgB,CAAC,CAAA;AACrB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ActionIconParts } from "../ActionIcon";
|
|
2
|
+
import { InputBaseProps } from "./types";
|
|
3
|
+
type InputIcons = 'icon' | 'leftIcon' | 'rightIcon';
|
|
4
|
+
type IconParts = ActionIconParts;
|
|
5
|
+
export type InputIconComposition = `${InputIcons}${Capitalize<IconParts>}`;
|
|
6
|
+
export type InputBaseStates = 'error' | 'focus' | 'disabled';
|
|
7
|
+
export type InputBaseParts = 'wrapper' | 'innerWrapper' | 'label' | 'errorMessage' | 'description' | 'labelRow' | InputIconComposition;
|
|
8
|
+
export type IconLessInputBaseParts = Exclude<InputBaseParts, InputIconComposition>;
|
|
9
|
+
export type InputBaseComposition = `${InputBaseParts}:${InputBaseStates}` | InputBaseParts;
|
|
10
|
+
export declare const InputBasePresets: import("@codeleap/common").IncludePresetsReturn<(styles: any) => (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<InputBaseComposition, any>>>;
|
|
11
|
+
export declare const useInputBaseStyles: (props: InputBaseProps) => {
|
|
12
|
+
wrapperStyle: any[];
|
|
13
|
+
innerWrapperStyle: any[];
|
|
14
|
+
leftIconStyles: {
|
|
15
|
+
icon: any[];
|
|
16
|
+
touchableWrapper: any[];
|
|
17
|
+
}[];
|
|
18
|
+
rightIconStyles: {
|
|
19
|
+
icon: any[];
|
|
20
|
+
touchableWrapper: any[];
|
|
21
|
+
}[];
|
|
22
|
+
labelStyle: any[];
|
|
23
|
+
errorStyle: any[];
|
|
24
|
+
descriptionStyle: any[];
|
|
25
|
+
labelRowStyle: any[];
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInputBaseStyles = exports.InputBasePresets = void 0;
|
|
4
|
+
var common_1 = require("@codeleap/common");
|
|
5
|
+
var react_native_1 = require("react-native");
|
|
6
|
+
var createTextInputBaseComposition = (0, common_1.createDefaultVariantFactory)();
|
|
7
|
+
exports.InputBasePresets = (0, common_1.includePresets)(function (styles) { return createTextInputBaseComposition(function () { return ({ wrapper: styles }); }); });
|
|
8
|
+
var getIconStyles = function (obj, state) {
|
|
9
|
+
return {
|
|
10
|
+
icon: [
|
|
11
|
+
obj.icon,
|
|
12
|
+
state.focused && obj['icon:focus'],
|
|
13
|
+
state.hasError && obj['icon:error'],
|
|
14
|
+
state.disabled && obj['icon:disabled']
|
|
15
|
+
],
|
|
16
|
+
touchableWrapper: [
|
|
17
|
+
obj.touchableWrapper,
|
|
18
|
+
state.focused && obj['touchableWrapper:focus'],
|
|
19
|
+
state.hasError && obj['touchableWrapper:error'],
|
|
20
|
+
state.disabled && obj['touchableWrapper:disabled']
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var useInputBaseStyles = function (props) {
|
|
25
|
+
var focused = props.focused, disabled = props.disabled, error = props.error, styles = props.styles;
|
|
26
|
+
var hasError = !common_1.TypeGuards.isNil(error);
|
|
27
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:InputBase', {
|
|
28
|
+
styles: styles,
|
|
29
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
30
|
+
rootElement: 'wrapper'
|
|
31
|
+
});
|
|
32
|
+
var _leftIconStyles = (0, common_1.useNestedStylesByKey)('leftIcon', variantStyles);
|
|
33
|
+
var _rightIconStyles = (0, common_1.useNestedStylesByKey)('rightIcon', variantStyles);
|
|
34
|
+
var _generalIconStyles = (0, common_1.useNestedStylesByKey)('icon', variantStyles);
|
|
35
|
+
var generalIconStyles = getIconStyles(_generalIconStyles, { hasError: hasError, disabled: disabled });
|
|
36
|
+
var leftIconStyles = [
|
|
37
|
+
generalIconStyles,
|
|
38
|
+
getIconStyles(_leftIconStyles, { hasError: hasError, disabled: disabled, focused: focused })
|
|
39
|
+
];
|
|
40
|
+
var rightIconStyles = [
|
|
41
|
+
generalIconStyles,
|
|
42
|
+
getIconStyles(_rightIconStyles, { hasError: hasError, disabled: disabled, focused: focused })
|
|
43
|
+
];
|
|
44
|
+
var labelStyle = [
|
|
45
|
+
variantStyles.label,
|
|
46
|
+
focused && variantStyles['label:focus'],
|
|
47
|
+
hasError && variantStyles['label:error'],
|
|
48
|
+
disabled && variantStyles['label:disabled'],
|
|
49
|
+
];
|
|
50
|
+
var errorStyle = [
|
|
51
|
+
variantStyles.errorMessage,
|
|
52
|
+
focused && variantStyles['errorMessage:focus'],
|
|
53
|
+
hasError && variantStyles['errorMessage:error'],
|
|
54
|
+
disabled && variantStyles['errorMessage:disabled'],
|
|
55
|
+
];
|
|
56
|
+
var descriptionStyle = [
|
|
57
|
+
variantStyles.description,
|
|
58
|
+
focused && variantStyles['description:focus'],
|
|
59
|
+
hasError && variantStyles['description:error'],
|
|
60
|
+
disabled && variantStyles['description:disabled'],
|
|
61
|
+
];
|
|
62
|
+
var wrapperStyle = [
|
|
63
|
+
variantStyles.wrapper,
|
|
64
|
+
focused && variantStyles['wrapper:focus'],
|
|
65
|
+
error && variantStyles['wrapper:error'],
|
|
66
|
+
disabled && variantStyles['wrapper:disabled'],
|
|
67
|
+
];
|
|
68
|
+
var innerWrapperStyle = [
|
|
69
|
+
variantStyles.innerWrapper,
|
|
70
|
+
focused && variantStyles['innerWrapper:focus'],
|
|
71
|
+
hasError && variantStyles['innerWrapper:error'],
|
|
72
|
+
disabled && variantStyles['innerWrapper:disabled'],
|
|
73
|
+
];
|
|
74
|
+
var labelRowStyle = [
|
|
75
|
+
variantStyles.labelRow,
|
|
76
|
+
focused && variantStyles['labelRow:focus'],
|
|
77
|
+
hasError && variantStyles['labelRow:error'],
|
|
78
|
+
disabled && variantStyles['labelRow:disabled'],
|
|
79
|
+
];
|
|
80
|
+
return {
|
|
81
|
+
wrapperStyle: wrapperStyle,
|
|
82
|
+
innerWrapperStyle: innerWrapperStyle,
|
|
83
|
+
leftIconStyles: leftIconStyles,
|
|
84
|
+
rightIconStyles: rightIconStyles,
|
|
85
|
+
labelStyle: labelStyle,
|
|
86
|
+
errorStyle: errorStyle,
|
|
87
|
+
descriptionStyle: descriptionStyle,
|
|
88
|
+
labelRowStyle: labelRowStyle
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
exports.useInputBaseStyles = useInputBaseStyles;
|
|
92
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/InputBase/styles.ts"],"names":[],"mappings":";;;AAAA,2CAAyK;AAGzK,6CAAyC;AAuBzC,IAAM,8BAA8B,GAAG,IAAA,oCAA2B,GAAwB,CAAA;AAE7E,QAAA,gBAAgB,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,8BAA8B,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC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AI,aAAa,CAAC,oBAAoB,CAAC;QAC9C,QAAQ,IAAI,aAAa,CAAC,oBAAoB,CAAC;QAC/C,QAAQ,IAAI,aAAa,CAAC,uBAAuB,CAAC;KACnD,CAAA;IAED,IAAM,aAAa,GAAG;QACpB,aAAa,CAAC,QAAQ;QACtB,OAAO,IAAI,aAAa,CAAC,gBAAgB,CAAC;QAC1C,QAAQ,IAAI,aAAa,CAAC,gBAAgB,CAAC;QAC3C,QAAQ,IAAI,aAAa,CAAC,mBAAmB,CAAC;KAC/C,CAAA;IAEF,OAAO;QACJ,YAAY,cAAA;QACZ,iBAAiB,mBAAA;QACjB,cAAc,gBAAA;QACd,eAAe,iBAAA;QACf,UAAU,YAAA;QACV,UAAU,YAAA;QACV,gBAAgB,kBAAA;QAChB,aAAa,eAAA;KACf,CAAA;AACF,CAAC,CAAA;AArFY,QAAA,kBAAkB,sBAqF9B"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropsOf } from '@codeleap/common';
|
|
3
|
+
import { StylesOf } from '../../types';
|
|
4
|
+
import { InputBaseComposition } from './styles';
|
|
5
|
+
import { ActionIcon } from '../ActionIcon';
|
|
6
|
+
type ActionIconProps = PropsOf<typeof ActionIcon>;
|
|
7
|
+
type OrderedParts = 'label' | 'description' | 'innerWrapper' | 'error';
|
|
8
|
+
type IconProp = Partial<ActionIconProps> | JSX.Element;
|
|
9
|
+
export type InputBaseProps = React.PropsWithChildren<{
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
error?: React.ReactNode;
|
|
12
|
+
leftIcon?: IconProp;
|
|
13
|
+
rightIcon?: IconProp;
|
|
14
|
+
wrapper?: React.FC<any>;
|
|
15
|
+
wrapperProps?: any;
|
|
16
|
+
innerWrapper?: React.FC<any>;
|
|
17
|
+
innerWrapperProps?: any;
|
|
18
|
+
styles?: StylesOf<InputBaseComposition>;
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
debugName: string;
|
|
21
|
+
focused?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
order?: OrderedParts[];
|
|
24
|
+
style?: any;
|
|
25
|
+
labelAsRow?: boolean;
|
|
26
|
+
hideErrorMessage?: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/InputBase/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputBaseProps } from './types';
|
|
2
|
+
type OmitDiff<T1, T2> = {
|
|
3
|
+
[K in Exclude<keyof T1, keyof T2>]: T1[K];
|
|
4
|
+
} & {
|
|
5
|
+
[K in keyof T2]: T2[K];
|
|
6
|
+
};
|
|
7
|
+
export declare function selectInputBaseProps<T extends InputBaseProps>(props: T): {
|
|
8
|
+
inputBaseProps: InputBaseProps;
|
|
9
|
+
others: OmitDiff<T, T>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
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.selectInputBaseProps = void 0;
|
|
15
|
+
function selectInputBaseProps(props) {
|
|
16
|
+
var varList = [
|
|
17
|
+
'label',
|
|
18
|
+
'style',
|
|
19
|
+
'error',
|
|
20
|
+
'innerWrapper',
|
|
21
|
+
'leftIcon',
|
|
22
|
+
'rightIcon',
|
|
23
|
+
// 'styles',
|
|
24
|
+
'description',
|
|
25
|
+
'wrapper',
|
|
26
|
+
'children',
|
|
27
|
+
'innerWrapperProps',
|
|
28
|
+
'wrapperProps',
|
|
29
|
+
'disabled',
|
|
30
|
+
'hideErrorMessage',
|
|
31
|
+
];
|
|
32
|
+
var copy = __assign({}, props);
|
|
33
|
+
var result = varList.reduce(function (acc, key) {
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
acc[key] = copy[key];
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
return { inputBaseProps: result, others: copy };
|
|
39
|
+
}
|
|
40
|
+
exports.selectInputBaseProps = selectInputBaseProps;
|
|
41
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/InputBase/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,SAAgB,oBAAoB,CAA2B,KAAQ;IAIrE,IAAM,OAAO,GAAkB;QAC7B,OAAO;QACP,OAAO;QACP,OAAO;QACP,cAAc;QACd,UAAU;QACV,WAAW;QACX,YAAY;QACZ,aAAa;QACb,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,cAAc;QACd,UAAU;QACV,kBAAkB;KACnB,CAAA;IAED,IAAM,IAAI,gBAAQ,KAAK,CAAE,CAAA;IAEzB,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG;QACrC,aAAa;QACb,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;QAEpB,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,EAAoB,CAAC,CAAA;IAExB,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,IAAsB,EAAE,CAAA;AACnE,CAAC;AA/BD,oDA+BC"}
|
|
@@ -7,15 +7,15 @@ export declare type PaginationIndicatorComposition = 'text' | `loader${Capitaliz
|
|
|
7
7
|
export declare const PaginationIndicatorStyles: {
|
|
8
8
|
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
9
9
|
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
10
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
11
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
12
10
|
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
11
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
13
12
|
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
14
13
|
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
15
14
|
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
16
15
|
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
17
16
|
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
18
17
|
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
18
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
19
19
|
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
20
20
|
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
21
21
|
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<PaginationIndicatorComposition, any>>;
|
|
@@ -59,7 +59,7 @@ var utils_1 = require("../../utils");
|
|
|
59
59
|
__exportStar(require("./styles"), exports);
|
|
60
60
|
__exportStar(require("./PaginationIndicator"), exports);
|
|
61
61
|
var ListCP = (0, react_1.forwardRef)(function (flatListProps, ref) {
|
|
62
|
-
var _a = flatListProps.variants, variants = _a === void 0 ? [] : _a, style = flatListProps.style, _b = flatListProps.styles, styles = _b === void 0 ? {} : _b, onRefresh = flatListProps.onRefresh, component = flatListProps.component, refreshing = flatListProps.refreshing, placeholder = flatListProps.placeholder, keyboardAware = flatListProps.keyboardAware, _c = flatListProps.refreshControlProps, refreshControlProps = _c === void 0 ? {} : _c, props = __rest(flatListProps, ["variants", "style", "styles", "onRefresh", "component", "refreshing", "placeholder", "keyboardAware", "refreshControlProps"]);
|
|
62
|
+
var _a = flatListProps.variants, variants = _a === void 0 ? [] : _a, style = flatListProps.style, _b = flatListProps.styles, styles = _b === void 0 ? {} : _b, onRefresh = flatListProps.onRefresh, component = flatListProps.component, refreshing = flatListProps.refreshing, placeholder = flatListProps.placeholder, keyboardAware = flatListProps.keyboardAware, _c = flatListProps.refreshControlProps, refreshControlProps = _c === void 0 ? {} : _c, contentContainerStyle = flatListProps.contentContainerStyle, props = __rest(flatListProps, ["variants", "style", "styles", "onRefresh", "component", "refreshing", "placeholder", "keyboardAware", "refreshControlProps", "contentContainerStyle"]);
|
|
63
63
|
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:List', {
|
|
64
64
|
variants: variants,
|
|
65
65
|
styles: styles,
|
|
@@ -72,7 +72,12 @@ var ListCP = (0, react_1.forwardRef)(function (flatListProps, ref) {
|
|
|
72
72
|
var separator = !isEmpty && (props === null || props === void 0 ? void 0 : props.separators) && renderSeparator;
|
|
73
73
|
var Component = component || react_native_1.FlatList;
|
|
74
74
|
var refreshStyles = react_native_1.StyleSheet.flatten([variantStyles.refreshControl, styles.refreshControl]);
|
|
75
|
-
var
|
|
75
|
+
var keyboardStyle = (0, utils_1.useKeyboardPaddingStyle)([
|
|
76
|
+
variantStyles.content,
|
|
77
|
+
contentContainerStyle,
|
|
78
|
+
isEmpty && variantStyles['content:empty'],
|
|
79
|
+
], keyboardAware && !props.horizontal);
|
|
80
|
+
var _listProps = __assign({ style: [variantStyles.wrapper, style], contentContainerStyle: keyboardStyle, ref: ref, ItemSeparatorComponent: separator, refreshControl: !!onRefresh && (<react_native_1.RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={refreshStyles === null || refreshStyles === void 0 ? void 0 : refreshStyles.color} colors={[refreshStyles === null || refreshStyles === void 0 ? void 0 : refreshStyles.color]} {...refreshControlProps}/>), ListEmptyComponent: <EmptyPlaceholder_1.EmptyPlaceholder {...placeholder}/> }, props);
|
|
76
81
|
var keyboard = (0, utils_1.useKeyboardAwareView)();
|
|
77
82
|
var listProps = keyboard.getKeyboardAwareProps(_listProps, __assign({ adapt: 'paddingBottom', baseStyleProp: 'contentContainerStyle' }, keyboardAware));
|
|
78
83
|
return (<Component {...listProps}/>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/List/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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,EAAE,eAAe,EACtB,aAAa,EAAE,uBAAuB,IACnC,aAAa,EAChB,CAAA;IACF,OAAO,CACL,CAAC,SAAS,CACR,IAAI,SAAS,CAAC,EACd,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAIY,QAAA,IAAI,GAAG,MAA2B,CAAA"}
|
|
@@ -3,15 +3,15 @@ export declare type ListComposition = ScrollComposition | 'separator';
|
|
|
3
3
|
export declare const ListStyles: {
|
|
4
4
|
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
5
5
|
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
6
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
7
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
8
6
|
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
7
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
9
8
|
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
10
9
|
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
11
10
|
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
12
11
|
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
13
12
|
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
14
13
|
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
14
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
15
15
|
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
16
16
|
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
17
17
|
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ListComposition, any>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentVariants } from '@codeleap/common';
|
|
3
|
+
import { StylesOf } from '../../types';
|
|
4
|
+
import { LoadingOverlayComposition, LoadingOverlayPresets } from './styles';
|
|
5
|
+
export * from './styles';
|
|
6
|
+
export type LoadingOverlayProps = React.PropsWithChildren<{
|
|
7
|
+
variants?: ComponentVariants<typeof LoadingOverlayPresets>['variants'];
|
|
8
|
+
styles?: StylesOf<LoadingOverlayComposition>;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const LoadingOverlay: (props: LoadingOverlayProps) => JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.LoadingOverlay = void 0;
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
31
|
+
var common_1 = require("@codeleap/common");
|
|
32
|
+
var react_native_1 = require("react-native");
|
|
33
|
+
var ActivityIndicator_1 = require("../ActivityIndicator");
|
|
34
|
+
var View_1 = require("../View");
|
|
35
|
+
var utils_1 = require("../../utils");
|
|
36
|
+
__exportStar(require("./styles"), exports);
|
|
37
|
+
var LoadingOverlay = function (props) {
|
|
38
|
+
var children = props.children, styles = props.styles, variants = props.variants, visible = props.visible;
|
|
39
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:LoadingOverlay', {
|
|
40
|
+
variants: variants,
|
|
41
|
+
rootElement: 'wrapper',
|
|
42
|
+
styles: styles,
|
|
43
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
44
|
+
});
|
|
45
|
+
var loaderStyles = (0, common_1.useMemo)(function () { return (0, common_1.getNestedStylesByKey)('loader', variantStyles); }, [variantStyles]);
|
|
46
|
+
var wrapperAnimation = (0, utils_1.useAnimatedVariantStyles)({
|
|
47
|
+
variantStyles: variantStyles,
|
|
48
|
+
animatedProperties: ['wrapper:visible', 'wrapper:hidden'],
|
|
49
|
+
updater: function (s) {
|
|
50
|
+
'worklet';
|
|
51
|
+
return visible ? s['wrapper:visible'] : s['wrapper:hidden'];
|
|
52
|
+
},
|
|
53
|
+
transition: variantStyles.transition,
|
|
54
|
+
dependencies: [visible],
|
|
55
|
+
});
|
|
56
|
+
var transition = (0, react_1.useRef)(null);
|
|
57
|
+
if (!transition.current) {
|
|
58
|
+
transition.current = JSON.parse(JSON.stringify(variantStyles['wrapper:transition']));
|
|
59
|
+
}
|
|
60
|
+
return <View_1.View style={[variantStyles.wrapper, wrapperAnimation]} animated transition={transition.current}>
|
|
61
|
+
<ActivityIndicator_1.ActivityIndicator styles={loaderStyles}/>
|
|
62
|
+
{children}
|
|
63
|
+
</View_1.View>;
|
|
64
|
+
};
|
|
65
|
+
exports.LoadingOverlay = LoadingOverlay;
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/LoadingOverlay/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAqC;AACrC,2CAAuH;AACvH,6CAAyC;AAEzC,0DAAwD;AACxD,gCAA8B;AAE9B,qCAAsD;AAEtD,2CAAwB;AAQjB,IAAM,cAAc,GAAG,UAAC,KAA0B;IAErD,IAAA,QAAQ,GAIN,KAAK,SAJC,EACR,MAAM,GAGJ,KAAK,OAHD,EACN,QAAQ,GAEN,KAAK,SAFC,EACR,OAAO,GACL,KAAK,QAD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CAAC,CAAA;AArCY,QAAA,cAAc,kBAqC1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActivityIndicatorComposition } from '../ActivityIndicator';
|
|
2
|
+
type WrapperStates = 'hidden' | 'visible';
|
|
3
|
+
export type LoadingOverlayComposition = 'wrapper' | `wrapper:${WrapperStates}` | 'wrapper:transition' | `loader${Capitalize<ActivityIndicatorComposition>}` | 'transition';
|
|
4
|
+
export declare const LoadingOverlayPresets: import("@codeleap/common").IncludePresetsReturn<(styles: any) => (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<LoadingOverlayComposition, any>>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadingOverlayPresets = void 0;
|
|
4
|
+
var common_1 = require("@codeleap/common");
|
|
5
|
+
var createLoadingOverlayStyle = (0, common_1.createDefaultVariantFactory)();
|
|
6
|
+
exports.LoadingOverlayPresets = (0, common_1.includePresets)(function (styles) { return createLoadingOverlayStyle(function () { return ({ wrapper: styles }); }); });
|
|
7
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/LoadingOverlay/styles.ts"],"names":[],"mappings":";;;AAAA,2CAA8E;AAO9E,IAAM,yBAAyB,GAAG,IAAA,oCAA2B,GAA6B,CAAA;AAE7E,QAAA,qBAAqB,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,yBAAyB,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAArB,CAAqB,CAAC,EAAtD,CAAsD,CAAC,CAAA"}
|
|
@@ -7,15 +7,15 @@ export declare const ModalStyles: {
|
|
|
7
7
|
popup: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
8
8
|
fullscreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
9
9
|
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
10
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
11
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
12
10
|
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
11
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
13
12
|
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
14
13
|
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
15
14
|
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
16
15
|
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
17
16
|
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
18
17
|
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
18
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
19
19
|
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
20
20
|
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
21
21
|
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ModalComposition, any>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TextInput as NativeTextInput, TextInputProps as NativeTextInputProps } from 'react-native';
|
|
3
|
+
export * from './styles';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export declare const NumberIncrement: React.ForwardRefExoticComponent<Omit<import("../InputBase").InputBaseProps, "variants" | "styles"> & NativeTextInputProps & {
|
|
6
|
+
variants?: import("@codeleap/common").VariantProp<import("@codeleap/common").IncludePresetsReturn<(styles: any) => (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<import("./styles").NumberIncrementComposition, any>>>>;
|
|
7
|
+
styles?: Partial<Record<import("./styles").NumberIncrementComposition, any>>;
|
|
8
|
+
value: number;
|
|
9
|
+
validate?: import("yup").BaseSchema<string, import("yup/lib/object").AnyObject, string> | import("@codeleap/common/dist/tools/Form/types").ValidatorFunctionWithoutForm<string>;
|
|
10
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
11
|
+
max?: number;
|
|
12
|
+
min?: number;
|
|
13
|
+
step?: number;
|
|
14
|
+
editable?: boolean;
|
|
15
|
+
_error?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
onChangeMask?: (text: string, rawText?: string) => void;
|
|
18
|
+
masking?: Partial<import("@codeleap/common/dist/types/third-party/react-native-masked-text").TextInputMaskProps> & {
|
|
19
|
+
saveFormatted?: boolean;
|
|
20
|
+
};
|
|
21
|
+
prefix?: string;
|
|
22
|
+
suffix?: string;
|
|
23
|
+
separator?: string;
|
|
24
|
+
delimiter?: string;
|
|
25
|
+
mask?: string;
|
|
26
|
+
formatter?: (value: string | number) => string;
|
|
27
|
+
parseValue?: (value: string) => number;
|
|
28
|
+
timeoutActionFocus?: number;
|
|
29
|
+
actionPressAutoFocus?: boolean;
|
|
30
|
+
actionDebounce?: number;
|
|
31
|
+
} & Pick<Omit<import("../Touchable").TouchableProps, "">, "onPress"> & React.RefAttributes<NativeTextInput>>;
|