@codeleap/mobile 1.2.1 → 1.4.0
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/.eslintignore +2 -0
- package/.eslintrc.js +3 -0
- package/.vscode/settings.json +11 -0
- package/CodeLeap-Mobile-Packages.code-workspace +8 -0
- package/dist/components/ActivityIndicator.js +9 -6
- package/dist/components/ActivityIndicator.js.map +1 -1
- package/dist/components/Animated.d.ts +15 -0
- package/dist/components/Animated.js +55 -0
- package/dist/components/Animated.js.map +1 -0
- package/dist/components/Button.d.ts +107 -104
- package/dist/components/Button.js +30 -9
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Checkbox/index.js +7 -8
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.d.ts +47 -43
- package/dist/components/Checkbox/styles.js +8 -8
- package/dist/components/Checkbox/styles.js.map +1 -1
- package/dist/components/ContentView.js +4 -2
- package/dist/components/ContentView.js.map +1 -1
- package/dist/components/FileInput.d.ts +26 -2
- package/dist/components/FileInput.js +151 -4
- package/dist/components/FileInput.js.map +1 -1
- package/dist/components/Icon.d.ts +4 -6
- package/dist/components/Icon.js +25 -11
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Image.d.ts +7 -6
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.js.map +1 -1
- package/dist/components/List.d.ts +11 -0
- package/dist/components/List.js +77 -0
- package/dist/components/List.js.map +1 -0
- package/dist/components/Modal/index.d.ts +25 -0
- package/dist/components/Modal/index.js +109 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +66 -0
- package/dist/components/Modal/styles.js +57 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Navigation/Navigation.d.ts +3 -0
- package/dist/components/Navigation/Navigation.js +76 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/constants.d.ts +5 -0
- package/dist/components/Navigation/constants.js +11 -0
- package/dist/components/Navigation/constants.js.map +1 -0
- package/dist/components/Navigation/index.d.ts +3 -0
- package/dist/components/Navigation/index.js +16 -0
- package/dist/components/Navigation/index.js.map +1 -0
- package/dist/components/Navigation/types.d.ts +26 -0
- package/dist/components/Navigation/types.js +8 -0
- package/dist/components/Navigation/types.js.map +1 -0
- package/dist/components/Navigation/utils.d.ts +3 -0
- package/dist/components/Navigation/utils.js +67 -0
- package/dist/components/Navigation/utils.js.map +1 -0
- package/dist/components/Overlay.d.ts +16 -0
- package/dist/components/Overlay.js +66 -0
- package/dist/components/Overlay.js.map +1 -0
- package/dist/components/Pager/index.d.ts +19 -0
- package/dist/components/Pager/index.js +164 -0
- package/dist/components/Pager/index.js.map +1 -0
- package/dist/components/Pager/styles.d.ts +51 -0
- package/dist/components/Pager/styles.js +44 -0
- package/dist/components/Pager/styles.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +1 -0
- package/dist/components/RadioInput/index.js +13 -19
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.d.ts +48 -44
- package/dist/components/RadioInput/styles.js +4 -4
- package/dist/components/RadioInput/styles.js.map +1 -1
- package/dist/components/Scroll.d.ts +3 -96
- package/dist/components/Scroll.js +11 -8
- package/dist/components/Scroll.js.map +1 -1
- package/dist/components/Sections.d.ts +11 -0
- package/dist/components/Sections.js +77 -0
- package/dist/components/Sections.js.map +1 -0
- package/dist/components/Select/index.d.ts +5 -2
- package/dist/components/Select/index.js +118 -5
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.d.ts +9 -0
- package/dist/components/Select/styles.js +57 -0
- package/dist/components/Select/styles.js.map +1 -0
- package/dist/components/Select/types.d.ts +33 -0
- package/dist/components/Select/types.js +3 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/Slider/Mark.d.ts +3 -0
- package/dist/components/Slider/Mark.js +32 -0
- package/dist/components/Slider/Mark.js.map +1 -0
- package/dist/components/Slider/Thumb.d.ts +7 -0
- package/dist/components/Slider/Thumb.js +30 -0
- package/dist/components/Slider/Thumb.js.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.js +94 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/{Slider.d.ts → Slider/types.d.ts} +12 -7
- package/dist/components/Slider/types.js +3 -0
- package/dist/components/Slider/types.js.map +1 -0
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.js +6 -7
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Text.js +5 -5
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextInput.d.ts +108 -94
- package/dist/components/TextInput.js +42 -35
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/Touchable.d.ts +9 -14
- package/dist/components/Touchable.js +11 -15
- package/dist/components/Touchable.js.map +1 -1
- package/dist/components/View.d.ts +105 -181
- package/dist/components/View.js +6 -8
- package/dist/components/View.js.map +1 -1
- package/dist/components/{index.d.ts → components.d.ts} +6 -0
- package/dist/components/{index.js → components.js} +7 -1
- package/dist/components/components.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/modules/documentPicker.d.ts +3 -0
- package/dist/modules/documentPicker.js +12 -0
- package/dist/modules/documentPicker.js.map +1 -0
- package/dist/modules/fastImage.js +1 -1
- package/dist/modules/fastImage.js.map +1 -1
- package/dist/modules/reactNavigation.d.ts +3 -0
- package/dist/modules/reactNavigation.js +11 -0
- package/dist/modules/reactNavigation.js.map +1 -0
- package/dist/modules/types/fileTypes.d.ts +138 -0
- package/dist/modules/types/fileTypes.js +3 -0
- package/dist/modules/types/fileTypes.js.map +1 -0
- package/dist/types/utility.d.ts +1 -1
- package/dist/utils/OSAlert.d.ts +3 -3
- package/dist/utils/OSAlert.js.map +1 -1
- package/dist/utils/misc.d.ts +2 -0
- package/dist/utils/misc.js +26 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/styles.js +1 -1
- package/dist/utils/styles.js.map +1 -1
- package/package.json +10 -4
- package/src/components/ActivityIndicator.tsx +38 -28
- package/src/components/Animated.tsx +34 -0
- package/src/components/Button.tsx +68 -34
- package/src/components/Checkbox/index.tsx +60 -48
- package/src/components/Checkbox/styles.ts +39 -30
- package/src/components/ContentView.tsx +24 -18
- package/src/components/FileInput.tsx +177 -5
- package/src/components/Icon.tsx +36 -23
- package/src/components/Image.tsx +41 -35
- package/src/components/List.tsx +100 -0
- package/src/components/Modal/index.tsx +158 -0
- package/src/components/Modal/styles.ts +118 -0
- package/src/components/Navigation/Navigation.tsx +51 -0
- package/src/components/Navigation/constants.ts +8 -0
- package/src/components/Navigation/index.tsx +3 -0
- package/src/components/Navigation/types.ts +37 -0
- package/src/components/Navigation/utils.tsx +54 -0
- package/src/components/Overlay.tsx +76 -0
- package/src/components/Pager/index.tsx +241 -0
- package/src/components/Pager/styles.ts +51 -0
- package/src/components/RadioInput/index.tsx +76 -52
- package/src/components/RadioInput/styles.ts +23 -18
- package/src/components/Scroll.tsx +84 -73
- package/src/components/Select/index.tsx +179 -6
- package/src/components/Select/styles.ts +81 -0
- package/src/components/Select/types.ts +41 -0
- package/src/components/Slider/Mark.tsx +46 -0
- package/src/components/Slider/Thumb.tsx +29 -0
- package/src/components/Slider/index.tsx +123 -0
- package/src/components/Slider/types.ts +25 -0
- package/src/components/Switch.tsx +63 -54
- package/src/components/Text.tsx +22 -23
- package/src/components/TextInput.tsx +194 -191
- package/src/components/Touchable.tsx +45 -35
- package/src/components/View.tsx +33 -40
- package/src/components/components.ts +26 -0
- package/src/index.ts +6 -2
- package/src/modules/documentPicker.ts +8 -0
- package/src/modules/fastImage.ts +2 -2
- package/src/modules/index.d.ts +496 -0
- package/src/modules/reactNavigation.ts +4 -0
- package/src/modules/types/documentPicker.d.ts +215 -0
- package/src/modules/types/fileTypes.ts +138 -0
- package/src/types/utility.ts +2 -2
- package/src/utils/OSAlert.ts +35 -33
- package/src/utils/misc.ts +24 -0
- package/src/utils/styles.ts +13 -16
- package/dist/components/Drawer.d.ts +0 -23
- package/dist/components/Drawer.js +0 -78
- package/dist/components/Drawer.js.map +0 -1
- package/dist/components/Navigation.d.ts +0 -30
- package/dist/components/Navigation.js +0 -126
- package/dist/components/Navigation.js.map +0 -1
- package/dist/components/Slider.js +0 -130
- package/dist/components/Slider.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/src/components/Navigation.tsx +0 -125
- package/src/components/Slider.tsx +0 -198
- package/src/components/index.ts +0 -19
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"eslint.alwaysShowStatus": true,
|
|
3
|
+
"editor.codeActionsOnSave": {
|
|
4
|
+
"source.fixAll.eslint": true
|
|
5
|
+
},
|
|
6
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
|
7
|
+
"eslint.format.enable": true,
|
|
8
|
+
"[html]": {
|
|
9
|
+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
|
10
|
+
},
|
|
11
|
+
}
|
|
@@ -36,14 +36,17 @@ var react_1 = require("react");
|
|
|
36
36
|
var react_native_1 = require("react-native");
|
|
37
37
|
var common_1 = require("@codeleap/common");
|
|
38
38
|
exports.ActivityIndicator = (0, react_1.forwardRef)(function (activityIndicatorProps, ref) {
|
|
39
|
-
var _a
|
|
40
|
-
var
|
|
41
|
-
|
|
39
|
+
var _a, _b, _c;
|
|
40
|
+
var _d = activityIndicatorProps.variants, variants = _d === void 0 ? [] : _d, style = activityIndicatorProps.style, propStyles = activityIndicatorProps.styles, props = __rest(activityIndicatorProps, ["variants", "style", "styles"]);
|
|
41
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('ActivityIndicator', {
|
|
42
|
+
variants: variants,
|
|
43
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
44
|
+
styles: propStyles,
|
|
42
45
|
});
|
|
43
|
-
var Theme = (0, common_1.
|
|
46
|
+
var Theme = (0, common_1.useCodeleapContext)().Theme;
|
|
47
|
+
var color = ((_a = variantStyles.wrapper) === null || _a === void 0 ? void 0 : _a.color) || Theme.colors.gray;
|
|
48
|
+
var size = ((_b = variantStyles.wrapper) === null || _b === void 0 ? void 0 : _b.height) || ((_c = variantStyles.wrapper) === null || _c === void 0 ? void 0 : _c.width) || 'large';
|
|
44
49
|
var styles = react_native_1.StyleSheet.flatten([variantStyles.wrapper, style]);
|
|
45
|
-
var color = (styles === null || styles === void 0 ? void 0 : styles.color) || Theme.colors.gray;
|
|
46
|
-
var size = (styles === null || styles === void 0 ? void 0 : styles.height) || (styles === null || styles === void 0 ? void 0 : styles.width) || 'large';
|
|
47
50
|
return (<react_native_1.ActivityIndicator size={size} ref={ref} color={color} style={styles} {...props}/>);
|
|
48
51
|
});
|
|
49
52
|
//# sourceMappingURL=ActivityIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../../src/components/ActivityIndicator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,6CAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"ActivityIndicator.js","sourceRoot":"","sources":["../../src/components/ActivityIndicator.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,6CAAyE;AACzE,2CAMyB;AAUZ,QAAA,iBAAiB,GAAG,IAAA,kBAAU,EACzC,UAAC,sBAAsB,EAAE,GAAG;;IAClB,IAAA,KAAuD,sBAAsB,SAAhE,EAAb,QAAQ,mBAAG,EAAE,KAAA,EAAE,KAAK,GAAmC,sBAAsB,MAAzD,EAAU,UAAU,GAAe,sBAAsB,OAArC,EAAK,KAAK,UAAK,sBAAsB,EAA/E,+BAAsD,CAAF,CAA2B;IAErF,IAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,mBAAmB,EAAE;QAClE,QAAQ,UAAA;QACR,SAAS,EAAE,yBAAU,CAAC,OAAO;QAC7B,MAAM,EAAE,UAAU;KACnB,CAAC,CAAA;IAEM,IAAA,KAAK,GAAK,IAAA,2BAAkB,GAAE,MAAzB,CAAyB;IAEtC,IAAM,KAAK,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,KAAK,KAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA;IAC/D,IAAM,IAAI,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,0CAAE,MAAM,MAAI,MAAA,aAAa,CAAC,OAAO,0CAAE,KAAK,CAAA,IAAI,OAAO,CAAA;IAErF,IAAM,MAAM,GAAG,yBAAU,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IAEjE,OAAO,CACL,CAAC,gCAAS,CACR,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,IAAI,KAAK,CAAC,EACV,CACH,CAAA;AACH,CAAC,CACF,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Components: {
|
|
3
|
+
Touchable: React.FC<import("./Touchable").TouchableProps>;
|
|
4
|
+
View: React.FC<import("./View").ViewProps>;
|
|
5
|
+
};
|
|
6
|
+
declare type AnimatedComponents = typeof Components;
|
|
7
|
+
declare type CP = keyof AnimatedComponents;
|
|
8
|
+
declare type AnimatedProps<T extends CP, CFG = Record<string, any>> = {
|
|
9
|
+
component: T;
|
|
10
|
+
config: CFG;
|
|
11
|
+
pose: keyof CFG;
|
|
12
|
+
initialPose?: keyof CFG;
|
|
13
|
+
} & Omit<Parameters<AnimatedComponents[T]>[0], 'component'>;
|
|
14
|
+
export declare const Animated: <T extends "View" | "Touchable", CFG = any>({ config, component, ...props }: AnimatedProps<T, CFG>) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
+
var t = {};
|
|
23
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
+
t[p] = s[p];
|
|
25
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
+
t[p[i]] = s[p[i]];
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Animated = void 0;
|
|
37
|
+
var react_1 = __importStar(require("react"));
|
|
38
|
+
var react_native_pose_1 = __importDefault(require("react-native-pose"));
|
|
39
|
+
var Touchable_1 = require("./Touchable");
|
|
40
|
+
var View_1 = require("./View");
|
|
41
|
+
var Components = {
|
|
42
|
+
Touchable: Touchable_1.Touchable,
|
|
43
|
+
View: View_1.View,
|
|
44
|
+
};
|
|
45
|
+
var PosedComponents = Object.fromEntries(Object.entries(Components).map(function (_a) {
|
|
46
|
+
var key = _a[0], Render = _a[1];
|
|
47
|
+
return [key, (0, react_native_pose_1.default)(Render)];
|
|
48
|
+
}));
|
|
49
|
+
var Animated = function (_a) {
|
|
50
|
+
var config = _a.config, component = _a.component, props = __rest(_a, ["config", "component"]);
|
|
51
|
+
var Component = (0, react_1.useRef)(PosedComponents[component](config)).current;
|
|
52
|
+
return <Component withParent={false} {...props}/>;
|
|
53
|
+
};
|
|
54
|
+
exports.Animated = Animated;
|
|
55
|
+
//# sourceMappingURL=Animated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Animated.js","sourceRoot":"","sources":["../../src/components/Animated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAAqC;AAErC,wEAAqC;AACrC,yCAAuC;AACvC,+BAA6B;AAC7B,IAAM,UAAU,GAAG;IACjB,SAAS,uBAAA;IACT,IAAI,aAAA;CACL,CAAA;AAED,IAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,UAAC,EAAa;QAAZ,GAAG,QAAA,EAAE,MAAM,QAAA;IAAM,OAAA,CAAC,GAAG,EAAE,IAAA,2BAAK,EAAC,MAAM,CAAC,CAAC;AAApB,CAAoB,CAAC,CACxE,CAAA;AAYM,IAAM,QAAQ,GAAG,UAA0B,EAI1B;IAHtB,IAAA,MAAM,YAAA,EACN,SAAS,eAAA,EACN,KAAK,cAHwC,uBAIjD,CADS;IAER,IAAM,SAAS,GAAG,IAAA,cAAM,EAAC,eAAe,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;IAEpE,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAAA;AACpD,CAAC,CAAA;AARY,QAAA,QAAQ,YAQpB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonStyles, ComponentVariants, ButtonComposition } from '@codeleap/common';
|
|
2
|
+
import { ButtonStyles, ComponentVariants, ButtonComposition, IconPlaceholder } from '@codeleap/common';
|
|
3
3
|
import { StylesOf } from '../types/utility';
|
|
4
4
|
import { TouchableProps } from './Touchable';
|
|
5
|
-
import { IconPlaceholder } from '@codeleap/common';
|
|
6
5
|
import { TouchableOpacity } from 'react-native';
|
|
7
6
|
export declare type ButtonProps = Omit<TouchableProps, 'variants'> & ComponentVariants<typeof ButtonStyles> & {
|
|
8
7
|
text?: string;
|
|
@@ -10,107 +9,111 @@ export declare type ButtonProps = Omit<TouchableProps, 'variants'> & ComponentVa
|
|
|
10
9
|
icon?: IconPlaceholder;
|
|
11
10
|
styles?: StylesOf<ButtonComposition>;
|
|
12
11
|
loading?: boolean;
|
|
12
|
+
debounce?: number;
|
|
13
|
+
debugName?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
15
|
-
default: (theme: import("@codeleap/common").
|
|
16
|
-
negative: (theme: import("@codeleap/common").
|
|
17
|
-
circle: (theme: import("@codeleap/common").
|
|
18
|
-
pill: (theme: import("@codeleap/common").
|
|
19
|
-
icon: (theme: import("@codeleap/common").
|
|
20
|
-
fixed: (theme: import("@codeleap/common").
|
|
21
|
-
block: (theme: import("@codeleap/common").
|
|
22
|
-
flex: (theme: import("@codeleap/common").
|
|
23
|
-
absolute: (theme: import("@codeleap/common").
|
|
24
|
-
sticky: (theme: import("@codeleap/common").
|
|
25
|
-
row: (theme: import("@codeleap/common").
|
|
26
|
-
center: (theme: import("@codeleap/common").
|
|
27
|
-
column: (theme: import("@codeleap/common").
|
|
28
|
-
wrap: (theme: import("@codeleap/common").
|
|
29
|
-
inline: (theme: import("@codeleap/common").
|
|
30
|
-
inlineFlex: (theme: import("@codeleap/common").
|
|
31
|
-
hidden: (theme: import("@codeleap/common").
|
|
32
|
-
full: (theme: import("@codeleap/common").
|
|
33
|
-
noWrap: (theme: import("@codeleap/common").
|
|
34
|
-
fullWidth: (theme: import("@codeleap/common").
|
|
35
|
-
fullHeight: (theme: import("@codeleap/common").
|
|
36
|
-
fullView: (theme: import("@codeleap/common").
|
|
37
|
-
fullViewWidth: (theme: import("@codeleap/common").
|
|
38
|
-
fullViewHeight: (theme: import("@codeleap/common").
|
|
39
|
-
whole: (theme: import("@codeleap/common").
|
|
40
|
-
centerRow: (theme: import("@codeleap/common").
|
|
41
|
-
listStyles: (theme: import("@codeleap/common").
|
|
42
|
-
alignStart: (theme: import("@codeleap/common").
|
|
43
|
-
alignEnd: (theme: import("@codeleap/common").
|
|
44
|
-
alignCenter: (theme: import("@codeleap/common").
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
15
|
+
export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "children" | "hitSlop" | "onLayout" | "style" | "testID" | "hasTVPreferredFocus" | "tvParallaxProperties" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "text" | "component" | keyof import("@codeleap/common").BaseViewProps | "activeOpacity" | "delayLongPress" | "delayPressIn" | "delayPressOut" | "disabled" | "onBlur" | "onFocus" | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset" | "touchSoundDisabled" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "debugName" | "debugComponent" | "icon" | "styles" | "rightIcon" | keyof ComponentVariants<{
|
|
16
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
17
|
+
negative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
18
|
+
circle: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
19
|
+
pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
20
|
+
icon: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
21
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
22
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
23
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
24
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
25
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
26
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
27
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
28
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
29
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
30
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
31
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
32
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
33
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
34
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
35
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
36
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
37
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
38
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
39
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
40
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
41
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
42
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
43
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
44
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
45
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
46
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
47
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
48
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
49
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
50
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
51
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
52
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
53
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
54
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
55
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
56
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
57
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
58
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
59
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
60
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
61
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
62
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
63
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
64
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
65
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
66
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
62
67
|
}, import("@codeleap/common").EnhancedTheme<any>, import("@codeleap/common").VariantProp<{
|
|
63
|
-
default: (theme: import("@codeleap/common").
|
|
64
|
-
negative: (theme: import("@codeleap/common").
|
|
65
|
-
circle: (theme: import("@codeleap/common").
|
|
66
|
-
pill: (theme: import("@codeleap/common").
|
|
67
|
-
icon: (theme: import("@codeleap/common").
|
|
68
|
-
fixed: (theme: import("@codeleap/common").
|
|
69
|
-
block: (theme: import("@codeleap/common").
|
|
70
|
-
flex: (theme: import("@codeleap/common").
|
|
71
|
-
absolute: (theme: import("@codeleap/common").
|
|
72
|
-
sticky: (theme: import("@codeleap/common").
|
|
73
|
-
row: (theme: import("@codeleap/common").
|
|
74
|
-
center: (theme: import("@codeleap/common").
|
|
75
|
-
column: (theme: import("@codeleap/common").
|
|
76
|
-
wrap: (theme: import("@codeleap/common").
|
|
77
|
-
inline: (theme: import("@codeleap/common").
|
|
78
|
-
inlineFlex: (theme: import("@codeleap/common").
|
|
79
|
-
hidden: (theme: import("@codeleap/common").
|
|
80
|
-
full: (theme: import("@codeleap/common").
|
|
81
|
-
noWrap: (theme: import("@codeleap/common").
|
|
82
|
-
fullWidth: (theme: import("@codeleap/common").
|
|
83
|
-
fullHeight: (theme: import("@codeleap/common").
|
|
84
|
-
fullView: (theme: import("@codeleap/common").
|
|
85
|
-
fullViewWidth: (theme: import("@codeleap/common").
|
|
86
|
-
fullViewHeight: (theme: import("@codeleap/common").
|
|
87
|
-
whole: (theme: import("@codeleap/common").
|
|
88
|
-
centerRow: (theme: import("@codeleap/common").
|
|
89
|
-
listStyles: (theme: import("@codeleap/common").
|
|
90
|
-
alignStart: (theme: import("@codeleap/common").
|
|
91
|
-
alignEnd: (theme: import("@codeleap/common").
|
|
92
|
-
alignCenter: (theme: import("@codeleap/common").
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
loading?: boolean;
|
|
116
|
-
} & React.RefAttributes<TouchableOpacity>>;
|
|
68
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
69
|
+
negative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
70
|
+
circle: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
71
|
+
pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
72
|
+
icon: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
73
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
74
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
75
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
76
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
77
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
78
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
79
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
80
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
81
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
82
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
83
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
84
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
85
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
86
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
87
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
88
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
89
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
90
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
91
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
92
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
93
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
94
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
95
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
96
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
97
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
98
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
99
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
100
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
101
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
102
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
103
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
104
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
105
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
106
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
107
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
108
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
109
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
110
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
111
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
112
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
113
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
114
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
115
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
116
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
117
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
118
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ButtonComposition, any>>;
|
|
119
|
+
}>> | "loading" | "debounce"> & React.RefAttributes<TouchableOpacity>>;
|
|
@@ -40,18 +40,39 @@ var Icon_1 = require("./Icon");
|
|
|
40
40
|
var ActivityIndicator_1 = require("./ActivityIndicator");
|
|
41
41
|
var react_native_1 = require("react-native");
|
|
42
42
|
exports.Button = (0, react_1.forwardRef)(function (buttonProps, ref) {
|
|
43
|
-
var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a,
|
|
44
|
-
var
|
|
43
|
+
var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a, children = buttonProps.children, icon = buttonProps.icon, text = buttonProps.text, loading = buttonProps.loading, _b = buttonProps.styles, styles = _b === void 0 ? {} : _b, onPress = buttonProps.onPress, disabled = buttonProps.disabled, rightIcon = buttonProps.rightIcon, _c = buttonProps.debounce, debounce = _c === void 0 ? 600 : _c, props = __rest(buttonProps, ["variants", "children", "icon", "text", "loading", "styles", "onPress", "disabled", "rightIcon", "debounce"]);
|
|
44
|
+
var _d = React.useState(false), pressed = _d[0], setPressed = _d[1];
|
|
45
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('Button', {
|
|
45
46
|
variants: variants,
|
|
47
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
48
|
+
styles: styles,
|
|
46
49
|
});
|
|
47
|
-
function handlePress(
|
|
48
|
-
|
|
50
|
+
function handlePress() {
|
|
51
|
+
if (!pressed) {
|
|
52
|
+
setPressed(true);
|
|
53
|
+
setTimeout(function () { return setPressed(false); }, debounce);
|
|
54
|
+
onPress && onPress();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function getStyles(key) {
|
|
58
|
+
return [
|
|
59
|
+
variantStyles[key],
|
|
60
|
+
disabled && variantStyles[key + ':disabled'],
|
|
61
|
+
styles[key],
|
|
62
|
+
disabled && styles[key + ':disabled'],
|
|
63
|
+
];
|
|
49
64
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
var iconStyle = getStyles('icon');
|
|
66
|
+
var leftIconStyle = react_native_1.StyleSheet.flatten([iconStyle, getStyles('leftIcon')]);
|
|
67
|
+
var rightIconStyle = react_native_1.StyleSheet.flatten([iconStyle, getStyles('rightIcon')]);
|
|
68
|
+
var hasText = !!(text || children);
|
|
69
|
+
return (<Touchable_1.Touchable style={getStyles('wrapper')} onPress={handlePress} ref={ref} disabled={disabled} debugComponent={'Button'} {...props}>
|
|
70
|
+
|
|
71
|
+
{loading && <ActivityIndicator_1.ActivityIndicator style={getStyles('loader')}/>}
|
|
72
|
+
{!loading && <Icon_1.Icon name={icon} style={leftIconStyle} renderEmptySpace={hasText}/>}
|
|
73
|
+
{text ? <Text_1.Text text={text} style={getStyles('text')}/> : null}
|
|
74
|
+
{children}
|
|
75
|
+
<Icon_1.Icon name={rightIcon} style={rightIconStyle} renderEmptySpace={hasText}/>
|
|
55
76
|
</Touchable_1.Touchable>);
|
|
56
77
|
});
|
|
57
78
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"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"}
|
|
@@ -9,6 +9,6 @@ declare type CheckboxProps = NativeCheckboxProps & {
|
|
|
9
9
|
variants?: ComponentVariants<typeof CheckboxStyles>['variants'];
|
|
10
10
|
label?: ReactNode;
|
|
11
11
|
styles?: StylesOf<CheckboxComposition>;
|
|
12
|
-
validate?: Form.
|
|
12
|
+
validate?: Form.ValidatorFunctionWithoutForm | string;
|
|
13
13
|
};
|
|
14
14
|
export declare const Checkbox: React.ForwardRefExoticComponent<Pick<CheckboxProps, "children" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "style" | "testID" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "label" | "variants" | "key" | "disabled" | "styles" | "onChange" | "value" | "validate" | "onValueChange" | "ios_backgroundColor" | "onTintColor" | "thumbTintColor" | "tintColor"> & React.RefAttributes<NativeCheckbox>>;
|
|
@@ -43,7 +43,7 @@ var Touchable_1 = require("../Touchable");
|
|
|
43
43
|
__exportStar(require("./styles"), exports);
|
|
44
44
|
exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
|
|
45
45
|
var _a = checkboxProps.variants, variants = _a === void 0 ? [] : _a, _b = checkboxProps.style, style = _b === void 0 ? {} : _b, _c = checkboxProps.styles, styles = _c === void 0 ? {} : _c, label = checkboxProps.label, value = checkboxProps.value, onValueChange = checkboxProps.onValueChange, validate = checkboxProps.validate, props = __rest(checkboxProps, ["variants", "style", "styles", "label", "value", "onValueChange", "validate"]);
|
|
46
|
-
var variantStyles = (0, common_1.
|
|
46
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('Checkbox', {
|
|
47
47
|
// @ts-ignore
|
|
48
48
|
variants: variants,
|
|
49
49
|
});
|
|
@@ -61,15 +61,14 @@ exports.Checkbox = (0, react_1.forwardRef)(function (checkboxProps, ref) {
|
|
|
61
61
|
checkboxProps.disabled ? styles[key + ':disabled'] : {},
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
|
-
return <View_1.View style={getStyles('wrapper')} {...props}>
|
|
64
|
+
return (<View_1.View style={getStyles('wrapper')} {...props}>
|
|
65
65
|
<Touchable_1.Touchable style={getStyles('input')} onPress={function () { return onValueChange(!value); }}>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
<View_1.View style={getStyles('checkmarkWrapper')}>
|
|
67
|
+
<View_1.View style={getStyles('checkmark')}/>
|
|
68
|
+
</View_1.View>
|
|
69
|
+
<TextInput_1.InputLabel label={label} style={getStyles('label')}/>
|
|
71
70
|
</Touchable_1.Touchable>
|
|
72
71
|
<TextInput_1.FormError message={error.message} style={getStyles('error')}/>
|
|
73
|
-
|
|
72
|
+
</View_1.View>);
|
|
74
73
|
});
|
|
75
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Checkbox/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CAMyB;AACzB,+BAAoE;AAEpE,0CAAoD;AACpD,gCAA8B;AAC9B,0CAAwC;AAKxC,2CAAwB;AAaX,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAChC,UAAC,aAAa,EAAE,GAAG;IAEf,IAAA,KAQE,aAAa,SARF,EAAb,QAAQ,mBAAG,EAAE,KAAA,EACb,KAOE,aAAa,MAPL,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAME,aAAa,OANJ,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,KAAK,GAKH,aAAa,MALV,EACL,KAAK,GAIH,aAAa,MAJV,EACL,aAAa,GAGX,aAAa,cAHF,EACb,QAAQ,GAEN,aAAa,SAFP,EACL,KAAK,UACN,aAAa,EATX,8EASL,CADS,CACO;IAEjB,IAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,UAAU,EAAE;QACzD,aAAa;QACb,QAAQ,UAAA;KACT,CAAC,CAAA;IAEI,IAAA,KAAuB,IAAA,oBAAW,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAjD,KAAK,WAAA,EAAE,SAAS,eAAiC,CAAA;IAEzD,SAAS,SAAS,CAAC,GAAwB;QACzC,OAAO;YACL,aAAa,CAAC,GAAG,CAAC;YAClB,aAAa,CAAC,GAAG,CAAC;YAClB,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YAC9B,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;YAC5C,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE;YACrC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YAC9C,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;YAC9D,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;SACxD,CAAA;IACH,CAAC;IAED,OAAO,CACL,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC3C;QAAA,CAAC,qBAAS,CACR,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAC1B,OAAO,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,CAAC,KAAK,CAAC,EAArB,CAAqB,CAAC,CAErC;UAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CACzC;YAAA,CAAC,WAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,EACtC;UAAA,EAAE,WAAI,CACN;UAAA,CAAC,sBAAU,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EACtD;QAAA,EAAE,qBAAS,CACX;QAAA,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAC/D;MAAA,EAAE,WAAI,CAAC,CACR,CAAA;AACH,CAAC,CACF,CAAA"}
|