@codeleap/web 2.0.1 → 2.3.12
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/ActivityIndicator/index.d.ts +12 -12
- package/dist/components/ActivityIndicator/index.js +60 -60
- package/dist/components/ActivityIndicator/styles.d.ts +53 -53
- package/dist/components/ActivityIndicator/styles.js +21 -21
- package/dist/components/Button.d.ts +18 -18
- package/dist/components/Button.js +66 -66
- package/dist/components/CenterWrapper.d.ts +7 -7
- package/dist/components/CenterWrapper.js +27 -27
- package/dist/components/Checkbox/index.d.ts +12 -12
- package/dist/components/Checkbox/index.js +61 -61
- package/dist/components/Checkbox/styles.d.ts +53 -53
- package/dist/components/Checkbox/styles.js +63 -63
- package/dist/components/Collapse.d.ts +20 -20
- package/dist/components/Collapse.js +67 -67
- package/dist/components/ContentView.d.ts +10 -10
- package/dist/components/ContentView.js +51 -51
- package/dist/components/Drawer.d.ts +23 -23
- package/dist/components/Drawer.js +72 -72
- package/dist/components/FileInput.d.ts +8 -8
- package/dist/components/FileInput.js +72 -72
- package/dist/components/HorizontalScroll.d.ts +3 -3
- package/dist/components/HorizontalScroll.js +41 -41
- package/dist/components/Icon.d.ts +8 -8
- package/dist/components/Icon.js +54 -54
- package/dist/components/Link.d.ts +7 -7
- package/dist/components/Link.js +62 -62
- package/dist/components/List.d.ts +18 -18
- package/dist/components/List.js +51 -51
- package/dist/components/Modal/index.d.ts +21 -21
- package/dist/components/Modal/index.js +119 -119
- package/dist/components/Modal/styles.d.ts +56 -56
- package/dist/components/Modal/styles.js +35 -35
- package/dist/components/Overlay.d.ts +10 -10
- package/dist/components/Overlay.js +40 -40
- package/dist/components/RadioInput/index.d.ts +21 -21
- package/dist/components/RadioInput/index.js +54 -54
- package/dist/components/RadioInput/styles.d.ts +54 -54
- package/dist/components/RadioInput/styles.js +43 -43
- package/dist/components/RouterPage/Menu.d.ts +10 -10
- package/dist/components/RouterPage/Menu.js +35 -35
- package/dist/components/RouterPage/MenuItem.d.ts +12 -12
- package/dist/components/RouterPage/MenuItem.js +41 -41
- package/dist/components/RouterPage/Router.d.ts +8 -8
- package/dist/components/RouterPage/Router.js +26 -26
- package/dist/components/RouterPage/index.d.ts +29 -29
- package/dist/components/RouterPage/index.js +88 -88
- package/dist/components/RouterPage/styles.d.ts +54 -54
- package/dist/components/RouterPage/styles.js +86 -86
- package/dist/components/Scroll.d.ts +5 -5
- package/dist/components/Scroll.js +23 -23
- package/dist/components/Select/Custom.d.ts +8 -8
- package/dist/components/Select/Custom.js +103 -103
- package/dist/components/Select/Multi.d.ts +3 -3
- package/dist/components/Select/Multi.js +104 -104
- package/dist/components/Select/Native.d.ts +17 -17
- package/dist/components/Select/Native.js +43 -43
- package/dist/components/Select/index.d.ts +12 -12
- package/dist/components/Select/index.js +43 -43
- package/dist/components/Select/styles.d.ts +5 -5
- package/dist/components/Select/styles.js +56 -56
- package/dist/components/Select/types.d.ts +49 -49
- package/dist/components/Select/types.js +2 -2
- package/dist/components/Slider.d.ts +5 -5
- package/dist/components/Slider.js +35 -35
- package/dist/components/Text.d.ts +9 -9
- package/dist/components/Text.js +40 -40
- package/dist/components/TextInput.d.ts +150 -150
- package/dist/components/TextInput.js +124 -124
- package/dist/components/Tooltip.d.ts +12 -12
- package/dist/components/Tooltip.js +121 -121
- package/dist/components/Touchable.d.ts +15 -15
- package/dist/components/Touchable.js +51 -51
- package/dist/components/View.d.ts +10 -10
- package/dist/components/View.js +61 -61
- package/dist/components/index.d.ts +24 -24
- package/dist/components/index.js +40 -40
- package/dist/index.d.ts +6 -6
- package/dist/index.js +28 -28
- package/dist/lib/OSAlert.d.ts +21 -21
- package/dist/lib/OSAlert.js +139 -139
- package/dist/lib/Toast.d.ts +13 -13
- package/dist/lib/Toast.js +31 -31
- package/dist/lib/hooks.d.ts +28 -28
- package/dist/lib/hooks.js +182 -182
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/logger.js +15 -15
- package/dist/lib/utils/cookies.d.ts +6 -6
- package/dist/lib/utils/cookies.js +14 -14
- package/dist/lib/utils/index.d.ts +4 -4
- package/dist/lib/utils/index.js +26 -26
- package/dist/lib/utils/pollyfils/scroll.d.ts +1 -1
- package/dist/lib/utils/pollyfils/scroll.js +65 -65
- package/dist/lib/utils/stopPropagation.d.ts +1 -1
- package/dist/lib/utils/stopPropagation.js +19 -19
- package/dist/types/utility.d.ts +2 -2
- package/dist/types/utility.js +2 -2
- package/package.json +47 -47
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import { ComponentVariants, ActivityIndicatorStyles, ActivityIndicatorComposition } from '@codeleap/common';
|
|
4
|
-
import { StylesOf } from '../../types/utility';
|
|
5
|
-
export * from './styles';
|
|
6
|
-
export declare type ActivityIndicatorProps = {
|
|
7
|
-
animating?: boolean;
|
|
8
|
-
hidesWhenStopped?: boolean;
|
|
9
|
-
styles?: StylesOf<ActivityIndicatorComposition>;
|
|
10
|
-
css?: CSSObject;
|
|
11
|
-
} & ComponentVariants<typeof ActivityIndicatorStyles>;
|
|
12
|
-
export declare const ActivityIndicator: React.FC<ActivityIndicatorProps>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CSSObject } from '@emotion/react';
|
|
3
|
+
import { ComponentVariants, ActivityIndicatorStyles, ActivityIndicatorComposition } from '@codeleap/common';
|
|
4
|
+
import { StylesOf } from '../../types/utility';
|
|
5
|
+
export * from './styles';
|
|
6
|
+
export declare type ActivityIndicatorProps = {
|
|
7
|
+
animating?: boolean;
|
|
8
|
+
hidesWhenStopped?: boolean;
|
|
9
|
+
styles?: StylesOf<ActivityIndicatorComposition>;
|
|
10
|
+
css?: CSSObject;
|
|
11
|
+
} & ComponentVariants<typeof ActivityIndicatorStyles>;
|
|
12
|
+
export declare const ActivityIndicator: React.FC<ActivityIndicatorProps>;
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
-
if (k2 === undefined) k2 = k;
|
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(o, k2, desc);
|
|
24
|
-
}) : (function(o, m, k, k2) {
|
|
25
|
-
if (k2 === undefined) k2 = k;
|
|
26
|
-
o[k2] = m[k];
|
|
27
|
-
}));
|
|
28
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
-
};
|
|
31
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
32
|
-
var t = {};
|
|
33
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
34
|
-
t[p] = s[p];
|
|
35
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
36
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
37
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
38
|
-
t[p[i]] = s[p[i]];
|
|
39
|
-
}
|
|
40
|
-
return t;
|
|
41
|
-
};
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.ActivityIndicator = void 0;
|
|
44
|
-
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
45
|
-
var View_1 = require("../View");
|
|
46
|
-
var react_1 = require("@emotion/react");
|
|
47
|
-
var common_1 = require("@codeleap/common");
|
|
48
|
-
__exportStar(require("./styles"), exports);
|
|
49
|
-
var spin = (0, react_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to{ \n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to{ \n transform: rotate(360deg);\n }\n"])));
|
|
50
|
-
var ActivityIndicator = function (indicatorProps) {
|
|
51
|
-
var _a = indicatorProps.animating, animating = _a === void 0 ? true : _a, _b = indicatorProps.hidesWhenStopped, hidesWhenStopped = _b === void 0 ? true : _b, variants = indicatorProps.variants, responsiveVariants = indicatorProps.responsiveVariants, styles = indicatorProps.styles, viewProps = __rest(indicatorProps, ["animating", "hidesWhenStopped", "variants", "responsiveVariants", "styles"]);
|
|
52
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('ActivityIndicator', {
|
|
53
|
-
styles: styles,
|
|
54
|
-
responsiveVariants: responsiveVariants,
|
|
55
|
-
variants: variants,
|
|
56
|
-
});
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({}, viewProps, { css: [variantStyles.wrapper, (!animating && hidesWhenStopped) && { visibility: 'hidden' }] }, { children: [(0, jsx_runtime_1.jsx)(View_1.View, { css: __assign(__assign({}, variantStyles.circle), variantStyles.backCircle) }), (0, jsx_runtime_1.jsx)(View_1.View, { css: __assign(__assign(__assign({}, variantStyles.circle), variantStyles.frontCircle), { animation: "".concat(spin, " 1s infinite"), animationPlayState: animating ? 'running' : 'paused' }) })] })));
|
|
58
|
-
};
|
|
59
|
-
exports.ActivityIndicator = ActivityIndicator;
|
|
60
|
-
var templateObject_1;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
32
|
+
var t = {};
|
|
33
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
34
|
+
t[p] = s[p];
|
|
35
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
36
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
37
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
38
|
+
t[p[i]] = s[p[i]];
|
|
39
|
+
}
|
|
40
|
+
return t;
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.ActivityIndicator = void 0;
|
|
44
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
45
|
+
var View_1 = require("../View");
|
|
46
|
+
var react_1 = require("@emotion/react");
|
|
47
|
+
var common_1 = require("@codeleap/common");
|
|
48
|
+
__exportStar(require("./styles"), exports);
|
|
49
|
+
var spin = (0, react_1.keyframes)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n transform: rotate(0deg);\n }\n to{ \n transform: rotate(360deg);\n }\n"], ["\n from {\n transform: rotate(0deg);\n }\n to{ \n transform: rotate(360deg);\n }\n"])));
|
|
50
|
+
var ActivityIndicator = function (indicatorProps) {
|
|
51
|
+
var _a = indicatorProps.animating, animating = _a === void 0 ? true : _a, _b = indicatorProps.hidesWhenStopped, hidesWhenStopped = _b === void 0 ? true : _b, variants = indicatorProps.variants, responsiveVariants = indicatorProps.responsiveVariants, styles = indicatorProps.styles, viewProps = __rest(indicatorProps, ["animating", "hidesWhenStopped", "variants", "responsiveVariants", "styles"]);
|
|
52
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('ActivityIndicator', {
|
|
53
|
+
styles: styles,
|
|
54
|
+
responsiveVariants: responsiveVariants,
|
|
55
|
+
variants: variants,
|
|
56
|
+
});
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(View_1.View, __assign({}, viewProps, { css: [variantStyles.wrapper, (!animating && hidesWhenStopped) && { visibility: 'hidden' }] }, { children: [(0, jsx_runtime_1.jsx)(View_1.View, { css: __assign(__assign({}, variantStyles.circle), variantStyles.backCircle) }), (0, jsx_runtime_1.jsx)(View_1.View, { css: __assign(__assign(__assign({}, variantStyles.circle), variantStyles.frontCircle), { animation: "".concat(spin, " 1s infinite"), animationPlayState: animating ? 'running' : 'paused' }) })] })));
|
|
58
|
+
};
|
|
59
|
+
exports.ActivityIndicator = ActivityIndicator;
|
|
60
|
+
var templateObject_1;
|
|
61
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { ActivityIndicatorComposition } from '@codeleap/common';
|
|
2
|
-
export declare const WebActivityIndicatorStyles: {
|
|
3
|
-
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
4
|
-
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
5
|
-
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
6
|
-
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
7
|
-
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
8
|
-
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
9
|
-
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
10
|
-
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
11
|
-
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
12
|
-
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
13
|
-
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
14
|
-
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
15
|
-
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
16
|
-
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
17
|
-
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
18
|
-
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
19
|
-
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
20
|
-
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
21
|
-
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
22
|
-
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
23
|
-
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
24
|
-
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
25
|
-
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
26
|
-
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
27
|
-
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
28
|
-
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
29
|
-
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
30
|
-
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
31
|
-
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
32
|
-
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
33
|
-
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
34
|
-
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
35
|
-
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
36
|
-
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
37
|
-
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
38
|
-
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
39
|
-
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
40
|
-
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
41
|
-
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
42
|
-
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
43
|
-
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
44
|
-
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
45
|
-
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
46
|
-
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
47
|
-
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
48
|
-
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
49
|
-
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
50
|
-
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
51
|
-
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
52
|
-
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
53
|
-
};
|
|
1
|
+
import { ActivityIndicatorComposition } from '@codeleap/common';
|
|
2
|
+
export declare const WebActivityIndicatorStyles: {
|
|
3
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
4
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
5
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
6
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
7
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
8
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
9
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
10
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
11
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
12
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
13
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
14
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
15
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
16
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
17
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
18
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
19
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
20
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
21
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
22
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
23
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
24
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
25
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
26
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
27
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
28
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
29
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
30
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
31
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
32
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
33
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
34
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
35
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
36
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
37
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
38
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
39
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
40
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
41
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
42
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
43
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
44
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
45
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
46
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
47
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
48
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
49
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
50
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
51
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
52
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<ActivityIndicatorComposition, any>>;
|
|
53
|
+
};
|
|
@@ -1,22 +1,22 @@
|
|
|
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.WebActivityIndicatorStyles = void 0;
|
|
15
|
-
var common_1 = require("@codeleap/common");
|
|
16
|
-
var createActivityIndicatorStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
-
var getDefault = common_1.ActivityIndicatorStyles.default;
|
|
18
|
-
exports.WebActivityIndicatorStyles = __assign(__assign({}, common_1.ActivityIndicatorStyles), { default: createActivityIndicatorStyle(function (theme) {
|
|
19
|
-
var defaults = getDefault(theme);
|
|
20
|
-
return defaults;
|
|
21
|
-
}) });
|
|
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.WebActivityIndicatorStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createActivityIndicatorStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var getDefault = common_1.ActivityIndicatorStyles.default;
|
|
18
|
+
exports.WebActivityIndicatorStyles = __assign(__assign({}, common_1.ActivityIndicatorStyles), { default: createActivityIndicatorStyle(function (theme) {
|
|
19
|
+
var defaults = getDefault(theme);
|
|
20
|
+
return defaults;
|
|
21
|
+
}) });
|
|
22
22
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ButtonStyles, ComponentVariants, ButtonComposition, AnyFunction } from '@codeleap/common';
|
|
2
|
-
import React, { ComponentPropsWithRef } from 'react';
|
|
3
|
-
import { StylesOf } from '../types/utility';
|
|
4
|
-
import { TouchableProps } from './Touchable';
|
|
5
|
-
import { IconPlaceholder } from '@codeleap/common';
|
|
6
|
-
declare type NativeButtonProps = ComponentPropsWithRef<'button'>;
|
|
7
|
-
export declare type ButtonProps = NativeButtonProps & ComponentVariants<typeof ButtonStyles> & {
|
|
8
|
-
text?: string;
|
|
9
|
-
rightIcon?: IconPlaceholder;
|
|
10
|
-
icon?: IconPlaceholder;
|
|
11
|
-
onPress?: AnyFunction;
|
|
12
|
-
styles?: StylesOf<ButtonComposition>;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
debugName?: string;
|
|
15
|
-
debounce?: number;
|
|
16
|
-
} & Partial<TouchableProps<any>>;
|
|
17
|
-
export declare const Button: React.FC<ButtonProps>;
|
|
18
|
-
export {};
|
|
1
|
+
import { ButtonStyles, ComponentVariants, ButtonComposition, AnyFunction } from '@codeleap/common';
|
|
2
|
+
import React, { ComponentPropsWithRef } from 'react';
|
|
3
|
+
import { StylesOf } from '../types/utility';
|
|
4
|
+
import { TouchableProps } from './Touchable';
|
|
5
|
+
import { IconPlaceholder } from '@codeleap/common';
|
|
6
|
+
declare type NativeButtonProps = ComponentPropsWithRef<'button'>;
|
|
7
|
+
export declare type ButtonProps = NativeButtonProps & ComponentVariants<typeof ButtonStyles> & {
|
|
8
|
+
text?: string;
|
|
9
|
+
rightIcon?: IconPlaceholder;
|
|
10
|
+
icon?: IconPlaceholder;
|
|
11
|
+
onPress?: AnyFunction;
|
|
12
|
+
styles?: StylesOf<ButtonComposition>;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
debugName?: string;
|
|
15
|
+
debounce?: number;
|
|
16
|
+
} & Partial<TouchableProps<any>>;
|
|
17
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
18
|
+
export {};
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Button = void 0;
|
|
29
|
-
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
|
-
var common_1 = require("@codeleap/common");
|
|
31
|
-
var react_1 = __importDefault(require("react"));
|
|
32
|
-
var Text_1 = require("./Text");
|
|
33
|
-
var Touchable_1 = require("./Touchable");
|
|
34
|
-
var Icon_1 = require("./Icon");
|
|
35
|
-
var ActivityIndicator_1 = require("./ActivityIndicator");
|
|
36
|
-
var Button = function (buttonProps) {
|
|
37
|
-
var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a, _b = buttonProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, children = buttonProps.children, icon = buttonProps.icon, text = buttonProps.text, loading = buttonProps.loading, styles = buttonProps.styles, onPress = buttonProps.onPress, disabled = buttonProps.disabled, rightIcon = buttonProps.rightIcon, _c = buttonProps.debounce, debounce = _c === void 0 ? 600 : _c, props = __rest(buttonProps, ["variants", "responsiveVariants", "children", "icon", "text", "loading", "styles", "onPress", "disabled", "rightIcon", "debounce"]);
|
|
38
|
-
var _d = react_1.default.useState(false), pressed = _d[0], setPressed = _d[1];
|
|
39
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('Button', {
|
|
40
|
-
responsiveVariants: responsiveVariants,
|
|
41
|
-
variants: variants,
|
|
42
|
-
styles: styles,
|
|
43
|
-
});
|
|
44
|
-
function handlePress(e) {
|
|
45
|
-
var _a;
|
|
46
|
-
if (!pressed) {
|
|
47
|
-
(_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
48
|
-
setPressed(true);
|
|
49
|
-
setTimeout(function () { return setPressed(false); }, debounce);
|
|
50
|
-
onPress && onPress();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function getStyles(key) {
|
|
54
|
-
return __assign(__assign({}, variantStyles[key]), (0, common_1.optionalObject)(disabled, variantStyles[key + ':disabled'], {}));
|
|
55
|
-
}
|
|
56
|
-
var iconStyle = getStyles('icon');
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)(Touchable_1.Touchable, __assign({ css: getStyles('wrapper'), component: 'button', debugComponent: 'Button', onPress: handlePress }, props, { children: [loading && (0, jsx_runtime_1.jsx)(ActivityIndicator_1.ActivityIndicator, { styles: {
|
|
58
|
-
'wrapper': getStyles('loaderWrapper'),
|
|
59
|
-
'backCircle': getStyles('loaderBackCircle'),
|
|
60
|
-
'frontCircle': getStyles('loaderFrontCircle'),
|
|
61
|
-
'circle': getStyles('loaderCircle'),
|
|
62
|
-
}, css: getStyles('loader') }), !loading && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, style: __assign(__assign({}, iconStyle), getStyles('leftIcon')), renderEmptySpace: !!text })), children || ((0, jsx_runtime_1.jsx)(Text_1.Text, { text: text, styles: {
|
|
63
|
-
text: getStyles('text'),
|
|
64
|
-
} })), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: rightIcon, style: __assign(__assign({}, iconStyle), getStyles('rightIcon')), renderEmptySpace: !!text })] })));
|
|
65
|
-
};
|
|
66
|
-
exports.Button = Button;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Button = void 0;
|
|
29
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
30
|
+
var common_1 = require("@codeleap/common");
|
|
31
|
+
var react_1 = __importDefault(require("react"));
|
|
32
|
+
var Text_1 = require("./Text");
|
|
33
|
+
var Touchable_1 = require("./Touchable");
|
|
34
|
+
var Icon_1 = require("./Icon");
|
|
35
|
+
var ActivityIndicator_1 = require("./ActivityIndicator");
|
|
36
|
+
var Button = function (buttonProps) {
|
|
37
|
+
var _a = buttonProps.variants, variants = _a === void 0 ? [] : _a, _b = buttonProps.responsiveVariants, responsiveVariants = _b === void 0 ? {} : _b, children = buttonProps.children, icon = buttonProps.icon, text = buttonProps.text, loading = buttonProps.loading, styles = buttonProps.styles, onPress = buttonProps.onPress, disabled = buttonProps.disabled, rightIcon = buttonProps.rightIcon, _c = buttonProps.debounce, debounce = _c === void 0 ? 600 : _c, props = __rest(buttonProps, ["variants", "responsiveVariants", "children", "icon", "text", "loading", "styles", "onPress", "disabled", "rightIcon", "debounce"]);
|
|
38
|
+
var _d = react_1.default.useState(false), pressed = _d[0], setPressed = _d[1];
|
|
39
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('Button', {
|
|
40
|
+
responsiveVariants: responsiveVariants,
|
|
41
|
+
variants: variants,
|
|
42
|
+
styles: styles,
|
|
43
|
+
});
|
|
44
|
+
function handlePress(e) {
|
|
45
|
+
var _a;
|
|
46
|
+
if (!pressed) {
|
|
47
|
+
(_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
48
|
+
setPressed(true);
|
|
49
|
+
setTimeout(function () { return setPressed(false); }, debounce);
|
|
50
|
+
onPress && onPress();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function getStyles(key) {
|
|
54
|
+
return __assign(__assign({}, variantStyles[key]), (0, common_1.optionalObject)(disabled, variantStyles[key + ':disabled'], {}));
|
|
55
|
+
}
|
|
56
|
+
var iconStyle = getStyles('icon');
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(Touchable_1.Touchable, __assign({ css: getStyles('wrapper'), component: 'button', debugComponent: 'Button', onPress: handlePress }, props, { children: [loading && (0, jsx_runtime_1.jsx)(ActivityIndicator_1.ActivityIndicator, { styles: {
|
|
58
|
+
'wrapper': getStyles('loaderWrapper'),
|
|
59
|
+
'backCircle': getStyles('loaderBackCircle'),
|
|
60
|
+
'frontCircle': getStyles('loaderFrontCircle'),
|
|
61
|
+
'circle': getStyles('loaderCircle'),
|
|
62
|
+
}, css: getStyles('loader') }), !loading && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, style: __assign(__assign({}, iconStyle), getStyles('leftIcon')), renderEmptySpace: !!text })), children || ((0, jsx_runtime_1.jsx)(Text_1.Text, { text: text, styles: {
|
|
63
|
+
text: getStyles('text'),
|
|
64
|
+
} })), (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: rightIcon, style: __assign(__assign({}, iconStyle), getStyles('rightIcon')), renderEmptySpace: !!text })] })));
|
|
65
|
+
};
|
|
66
|
+
exports.Button = Button;
|
|
67
67
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StylesOf } from '../types/utility';
|
|
3
|
-
import { ComponentVariants, CenterWrapperComposition, CenterWrapperStyles } from '@codeleap/common';
|
|
4
|
-
export declare type CenterWrapperProps = {
|
|
5
|
-
styles?: StylesOf<CenterWrapperComposition>;
|
|
6
|
-
} & ComponentVariants<typeof CenterWrapperStyles>;
|
|
7
|
-
export declare const CenterWrapper: React.FC<CenterWrapperProps>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StylesOf } from '../types/utility';
|
|
3
|
+
import { ComponentVariants, CenterWrapperComposition, CenterWrapperStyles } from '@codeleap/common';
|
|
4
|
+
export declare type CenterWrapperProps = {
|
|
5
|
+
styles?: StylesOf<CenterWrapperComposition>;
|
|
6
|
+
} & ComponentVariants<typeof CenterWrapperStyles>;
|
|
7
|
+
export declare const CenterWrapper: React.FC<CenterWrapperProps>;
|
|
@@ -1,28 +1,28 @@
|
|
|
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.CenterWrapper = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
16
|
-
var View_1 = require("./View");
|
|
17
|
-
var common_1 = require("@codeleap/common");
|
|
18
|
-
var CenterWrapper = function (props) {
|
|
19
|
-
var _a = props.styles, propStyles = _a === void 0 ? {} : _a, children = props.children, variants = props.variants, styles = props.styles, responsiveVariants = props.responsiveVariants;
|
|
20
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('CenterWrapper', {
|
|
21
|
-
variants: variants,
|
|
22
|
-
styles: styles,
|
|
23
|
-
responsiveVariants: responsiveVariants,
|
|
24
|
-
});
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: [variantStyles.wrapper, propStyles.wrapper] }, { children: (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: [variantStyles.innerWrapper, propStyles.innerWrapper] }, { children: children })) })));
|
|
26
|
-
};
|
|
27
|
-
exports.CenterWrapper = CenterWrapper;
|
|
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.CenterWrapper = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
16
|
+
var View_1 = require("./View");
|
|
17
|
+
var common_1 = require("@codeleap/common");
|
|
18
|
+
var CenterWrapper = function (props) {
|
|
19
|
+
var _a = props.styles, propStyles = _a === void 0 ? {} : _a, children = props.children, variants = props.variants, styles = props.styles, responsiveVariants = props.responsiveVariants;
|
|
20
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('CenterWrapper', {
|
|
21
|
+
variants: variants,
|
|
22
|
+
styles: styles,
|
|
23
|
+
responsiveVariants: responsiveVariants,
|
|
24
|
+
});
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: [variantStyles.wrapper, propStyles.wrapper] }, { children: (0, jsx_runtime_1.jsx)(View_1.View, __assign({ css: [variantStyles.innerWrapper, propStyles.innerWrapper] }, { children: children })) })));
|
|
26
|
+
};
|
|
27
|
+
exports.CenterWrapper = CenterWrapper;
|
|
28
28
|
//# sourceMappingURL=CenterWrapper.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ComponentVariants, StylesOf } from '@codeleap/common';
|
|
2
|
-
import { ComponentPropsWithRef } from 'react';
|
|
3
|
-
import { WebCheckboxComposition, WebCheckboxStyles as CheckboxStyles } from './styles';
|
|
4
|
-
declare type NativeCheckboxProps = ComponentPropsWithRef<'input'>;
|
|
5
|
-
export * from './styles';
|
|
6
|
-
export declare type CheckboxProps = NativeCheckboxProps & {
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
onValueChange?: (checked: boolean) => any;
|
|
9
|
-
label?: React.ReactNode;
|
|
10
|
-
styles?: StylesOf<WebCheckboxComposition>;
|
|
11
|
-
} & ComponentVariants<typeof CheckboxStyles>;
|
|
12
|
-
export declare const Checkbox: (checkboxProps: CheckboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ComponentVariants, StylesOf } from '@codeleap/common';
|
|
2
|
+
import { ComponentPropsWithRef } from 'react';
|
|
3
|
+
import { WebCheckboxComposition, WebCheckboxStyles as CheckboxStyles } from './styles';
|
|
4
|
+
declare type NativeCheckboxProps = ComponentPropsWithRef<'input'>;
|
|
5
|
+
export * from './styles';
|
|
6
|
+
export declare type CheckboxProps = NativeCheckboxProps & {
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
onValueChange?: (checked: boolean) => any;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
styles?: StylesOf<WebCheckboxComposition>;
|
|
11
|
+
} & ComponentVariants<typeof CheckboxStyles>;
|
|
12
|
+
export declare const Checkbox: (checkboxProps: CheckboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|