react-native-boxes 1.0.16 → 1.0.17

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
- "main": "dist/index.js",
5
+ "main": "src/index.ts",
6
6
  "scripts": {
7
7
  "release": "npm run build && git add src && git add package.json && git commit -m Update-files | npm version patch && npm publish && git add package.json && git commit -m Update-version | git push",
8
8
  "build": "tsc --build --verbose",
package/dist/Bar.d.ts DELETED
@@ -1,26 +0,0 @@
1
- import { TextStyle, ViewProps } from "react-native";
2
- import * as React from 'react';
3
- import { Icon } from "./Image";
4
- export interface Option {
5
- id: string;
6
- title?: string;
7
- icon?: string | any;
8
- onClick?: (id: string) => void;
9
- }
10
- export interface SimpleToolbarProps extends ViewProps {
11
- title?: String;
12
- backgroundColor?: string;
13
- forgroundColor?: string;
14
- homeIcon?: string | typeof Icon;
15
- onHomePress?: () => void;
16
- textStyle?: TextStyle;
17
- options?: Option[];
18
- }
19
- export declare const SimpleToolbarHeight = 40;
20
- export declare function SimpleToolbar(props: SimpleToolbarProps): React.JSX.Element;
21
- export declare function BottomNavBar(props: ViewProps & {
22
- options: Option[];
23
- selectedId: string;
24
- onSelect: (id: string) => void;
25
- onDimens?: (width: number, height: number) => void;
26
- }): React.JSX.Element | null;
package/dist/Bar.js DELETED
@@ -1,167 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.BottomNavBar = exports.SimpleToolbar = exports.SimpleToolbarHeight = void 0;
27
- const react_1 = require("react");
28
- const react_native_1 = require("react-native");
29
- const ThemeContext_1 = require("./ThemeContext");
30
- const React = __importStar(require("react"));
31
- const Box_1 = require("./Box");
32
- const Text_1 = require("./Text");
33
- const Image_1 = require("./Image");
34
- const react_native_safe_area_context_1 = require("react-native-safe-area-context");
35
- const Button_1 = require("./Button");
36
- const utils_1 = require("./utils");
37
- exports.SimpleToolbarHeight = 40;
38
- function SimpleToolbar(props) {
39
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
40
- var HomeIcon = (0, Image_1.getIcon)(props.homeIcon);
41
- let insets;
42
- try {
43
- insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
44
- }
45
- catch (e) {
46
- if (!theme.insets)
47
- console.warn('Unable to useSafeAreaInsets. Please set theme.insets = useSafeAreaInsets(). ' + e.message);
48
- insets = theme.insets || theme.styles.safeAreaInset;
49
- }
50
- return (<Box_1.HBox style={[(0, utils_1.isWeb)() ? {
51
- paddingTop: theme.dimens.space.lg,
52
- paddingBottom: theme.dimens.space.lg,
53
- backgroundColor: props.backgroundColor || theme.colors.accent,
54
- minHeight: exports.SimpleToolbarHeight * ((0, utils_1.isDesktop)() ? 1.3 : 1.25),
55
- } : {
56
- paddingTop: insets.top,
57
- paddingBottom: theme.dimens.space.lg,
58
- backgroundColor: props.backgroundColor || theme.colors.accent,
59
- minHeight: exports.SimpleToolbarHeight,
60
- }, props.style]}>
61
- <react_native_1.StatusBar animated={true} backgroundColor={props.backgroundColor || theme.colors.accent}/>
62
- <Box_1.HBox style={{
63
- left: 0,
64
- paddingStart: HomeIcon ? 0 : theme.dimens.space.sm,
65
- justifyContent: HomeIcon ? 'center' : 'flex-start',
66
- alignSelf: 'center',
67
- position: 'absolute',
68
- width: '100%',
69
- }}>
70
- <Text_1.TextView style={[{
71
- color: props.forgroundColor || theme.colors.invert.text
72
- }, props.textStyle]}>
73
- {props.title}
74
- </Text_1.TextView>
75
- </Box_1.HBox>
76
-
77
- <Box_1.HBox style={{
78
- paddingLeft: theme.dimens.space.md,
79
- alignSelf: 'center',
80
- alignContent: 'center',
81
- position: 'absolute',
82
- justifyContent: 'space-between',
83
- width: '99.9%',
84
- }}>
85
- <Box_1.Center style={{
86
- paddingLeft: theme.dimens.space.sm,
87
- margin: 0,
88
- }}>
89
- <Button_1.PressableView onPress={() => {
90
- props.onHomePress && props.onHomePress();
91
- }}>
92
- {HomeIcon && <HomeIcon />}
93
- </Button_1.PressableView>
94
- </Box_1.Center>
95
- <Box_1.HBox style={{
96
- alignItems: 'center',
97
- marginRight: (0, utils_1.isWeb)() ? theme.dimens.space.sm : theme.dimens.space.md
98
- }}>
99
- {props.options?.map((opt) => {
100
- let ActionIcon = (0, Image_1.getIcon)(opt.icon);
101
- let title = opt.title || opt.id;
102
- return (<Button_1.PressableView style={{
103
- paddingStart: theme.dimens.space.md
104
- }} key={opt.id} accessibilityHint={title} onPress={() => {
105
- opt.onClick && opt.onClick(opt.id);
106
- }}>
107
- <ActionIcon color={props.forgroundColor || theme.colors.invert.text} style={{
108
- paddingLeft: theme.dimens.space.sm
109
- }}/>
110
- </Button_1.PressableView>);
111
- })}
112
- </Box_1.HBox>
113
- </Box_1.HBox>
114
- </Box_1.HBox>);
115
- }
116
- exports.SimpleToolbar = SimpleToolbar;
117
- function BottomNavBar(props) {
118
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
119
- const onDimens = props.onDimens;
120
- const hasText = props.options?.find((op) => {
121
- return op.title != undefined;
122
- });
123
- function getItem(op) {
124
- const color = props.selectedId == op.id ? theme.colors.accent : theme.colors.text;
125
- const ItemIcon = (0, Image_1.getIcon)(op.icon);
126
- const title = op.title || (hasText ? op.id : undefined);
127
- return (<Button_1.PressableView style={{
128
- paddingTop: theme.dimens.space.sm
129
- }} key={op.id} onPress={() => {
130
- op.onClick && op.onClick(op.id);
131
- props.onSelect(op.id);
132
- }}>
133
- <Box_1.Center>
134
- {op.icon && <ItemIcon color={color}/>}
135
- {title &&
136
- <Text_1.TextView style={{
137
- fontSize: theme.dimens.font.sm,
138
- color: color
139
- }}>{title}</Text_1.TextView>}
140
- </Box_1.Center>
141
- </Button_1.PressableView>);
142
- }
143
- if (!props.options || props.options?.length == 0) {
144
- return null;
145
- }
146
- return (<Box_1.HBox onLayout={(event) => {
147
- const { width, height } = event.nativeEvent.layout;
148
- onDimens && onDimens(width, height);
149
- }} {...props} style={[{
150
- padding: theme.dimens.space.md,
151
- paddingTop: !hasText ? theme.dimens.space.lg : theme.dimens.space.md,
152
- paddingBottom: !hasText ? theme.dimens.space.lg : theme.dimens.space.md,
153
- backgroundColor: theme.colors.forground,
154
- zIndex: 100,
155
- width: '100%',
156
- justifyContent: 'space-around',
157
- left: 0,
158
- bottom: 0,
159
- position: 'absolute'
160
- }, props.style]}>
161
- {props.options?.map(op => {
162
- return getItem(op);
163
- })}
164
- </Box_1.HBox>);
165
- }
166
- exports.BottomNavBar = BottomNavBar;
167
- //# sourceMappingURL=Bar.js.map
package/dist/Bar.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Bar.js","sourceRoot":"","sources":["../src/Bar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,+CAA+D;AAC/D,iDAA8C;AAC9C,6CAA8B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M,CAAC,KAAK,CAAC,EAAE;gBACvE,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS;gBACvC,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,MAAM;gBACb,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE,CAAC;gBACP,MAAM,EAAE,CAAC;gBACT,QAAQ,EAAE,UAAU;aACvB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAEhB;YAAA,CACI,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE;YACpB,OAAO,OAAO,CAAC,EAAE,CAAC,CAAA;QACtB,CAAC,CACL,CACJ;QAAA,EAAE,UAAI,CAAC,CACV,CAAA;AAEL,CAAC;AApED,oCAoEC"}
package/dist/Box.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import { ScrollViewProps, ViewProps } from "react-native";
2
- import * as React from 'react';
3
- export declare function Box(props: ViewProps): React.JSX.Element;
4
- export declare function VBox(props: ViewProps): React.JSX.Element;
5
- export declare function HBox(props: ViewProps): React.JSX.Element;
6
- export declare function Center(props: ViewProps): React.JSX.Element;
7
- export declare function VPage(props: ViewProps): React.JSX.Element;
8
- /**
9
- * Must be wrapped with SafeAreaView somewhere in parent tree
10
- * @param param0
11
- * @returns
12
- */
13
- declare const KeyboardAvoidingScrollView: React.FC<ScrollViewProps>;
14
- export default KeyboardAvoidingScrollView;
package/dist/Box.js DELETED
@@ -1,112 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.VPage = exports.Center = exports.HBox = exports.VBox = exports.Box = void 0;
27
- const react_1 = require("react");
28
- const react_native_1 = require("react-native");
29
- const ThemeContext_1 = require("./ThemeContext");
30
- const React = __importStar(require("react"));
31
- const react_native_2 = require("react-native");
32
- const react_native_safe_area_context_1 = require("react-native-safe-area-context");
33
- const utils_1 = require("./utils");
34
- function Box(props) {
35
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
36
- return (<react_native_1.View {...props} style={[
37
- {
38
- padding: theme.dimens.space.xs,
39
- backgroundColor: theme.randomColor() || 'transparent'
40
- },
41
- props.style
42
- ]}/>);
43
- }
44
- exports.Box = Box;
45
- function VBox(props) {
46
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
47
- return (<Box {...props} style={[
48
- {
49
- flexDirection: 'column',
50
- backgroundColor: theme.randomColor() || 'transparent'
51
- },
52
- props.style
53
- ]}/>);
54
- }
55
- exports.VBox = VBox;
56
- function HBox(props) {
57
- return (<VBox {...props} style={[
58
- {
59
- flexDirection: 'row',
60
- },
61
- props.style
62
- ]}/>);
63
- }
64
- exports.HBox = HBox;
65
- function Center(props) {
66
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
67
- return (<Box {...props} style={[{
68
- alignItems: 'center',
69
- justifyContent: 'center',
70
- backgroundColor: theme.randomColor() || 'transparent'
71
- },
72
- props.style]}/>);
73
- }
74
- exports.Center = Center;
75
- function VPage(props) {
76
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
77
- return (<VBox {...props} style={[
78
- {
79
- width: '100%',
80
- height: '100%',
81
- padding: 0,
82
- margin: 0,
83
- },
84
- props.style
85
- ]}/>);
86
- }
87
- exports.VPage = VPage;
88
- /**
89
- * Must be wrapped with SafeAreaView somewhere in parent tree
90
- * @param param0
91
- * @returns
92
- */
93
- const KeyboardAvoidingScrollView = (props) => {
94
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
95
- let insets;
96
- try {
97
- insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
98
- }
99
- catch (e) {
100
- if (!theme.insets)
101
- console.warn('Unable to useSafeAreaInsets. Please set theme.insets = useSafeAreaInsets(). ' + e.message);
102
- insets = theme.insets || theme.styles.safeAreaInset;
103
- }
104
- if ((0, utils_1.isWeb)()) {
105
- return <react_native_2.ScrollView showsVerticalScrollIndicator={false} {...props}/>;
106
- }
107
- return (<react_native_2.KeyboardAvoidingView style={props.style} behavior="padding" enabled keyboardVerticalOffset={insets.top}>
108
- <react_native_2.ScrollView showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} {...props}/>
109
- </react_native_2.KeyboardAvoidingView>);
110
- };
111
- exports.default = KeyboardAvoidingScrollView;
112
- //# sourceMappingURL=Box.js.map
package/dist/Box.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Box.js","sourceRoot":"","sources":["../src/Box.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,+CAAgE;AAChE,iDAA8C;AAC9C,6CAA8B;AAC9B,+CAA+D;AAC/D,mFAAmE;AACnE,mCAAgC;AAEhC,SAAgB,GAAG,CAAC,KAAgB;IAChC,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,OAAO,CACH,CAAC,mBAAI,CACD,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACH;gBACI,OAAO,EAAE,KAAK,CA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 -1,20 +0,0 @@
1
- import { TextProps, TouchableHighlightProps, PressableProps } from "react-native";
2
- export declare function TransparentButton(props: TextProps & TouchableHighlightProps & {
3
- icon?: any;
4
- text?: string;
5
- }): import("react").JSX.Element;
6
- export declare function ButtonView(props: TextProps & TouchableHighlightProps & {
7
- icon?: any;
8
- text?: string;
9
- }): import("react").JSX.Element;
10
- export declare function RightIconButton(props: TextProps & TouchableHighlightProps & {
11
- icon?: any;
12
- text?: string;
13
- }): import("react").JSX.Element;
14
- export declare function LoadingButton(props: TextProps & TouchableHighlightProps & {
15
- loading: boolean;
16
- icon?: any;
17
- text?: string;
18
- loaderStyle?: 'normal' | 'transparent';
19
- }): import("react").JSX.Element;
20
- export declare function PressableView(props: PressableProps): import("react").JSX.Element;
package/dist/Button.js DELETED
@@ -1,220 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PressableView = exports.LoadingButton = exports.RightIconButton = exports.ButtonView = exports.TransparentButton = void 0;
4
- const react_1 = require("react");
5
- const react_native_1 = require("react-native");
6
- const ThemeContext_1 = require("./ThemeContext");
7
- const Box_1 = require("./Box");
8
- const Text_1 = require("./Text");
9
- function TransparentButton(props) {
10
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
11
- const tstyle = props.style || {};
12
- const [isPressed, setIsPressed] = (0, react_1.useState)(false);
13
- const onPressIn = (e) => {
14
- setIsPressed(true);
15
- if (props.onPressIn)
16
- props.onPressIn(e);
17
- };
18
- const onPressOut = (e) => {
19
- setIsPressed(false);
20
- if (props.onPressOut)
21
- props.onPressOut(e);
22
- };
23
- return (<react_native_1.TouchableHighlight {...props} onPressIn={onPressIn} onPressOut={onPressOut} underlayColor={theme.colors.transparent} style={[{
24
- justifyContent: 'center',
25
- alignContent: 'center',
26
- alignItems: 'center',
27
- padding: theme.dimens.space.md,
28
- borderRadius: theme.dimens.space.xl,
29
- margin: theme.dimens.space.sm,
30
- backgroundColor: theme.colors.accent,
31
- }, props.style]}>
32
- <Box_1.Center style={{
33
- padding: 0,
34
- margin: 0,
35
- flexDirection: 'row',
36
- backgroundColor: 'transparent'
37
- }}>
38
-
39
- {props.icon && (<react_native_1.View style={{
40
- margin: theme.dimens.space.sm
41
- }}>
42
- {props.icon}
43
- </react_native_1.View>)}
44
-
45
- {(props.text || props.children) && (<Text_1.TextView style={{
46
- fontWeight: "500",
47
- justifyContent: 'center',
48
- alignContent: 'center',
49
- alignItems: 'center',
50
- //@ts-ignore
51
- fontSize: tstyle.fontSize,
52
- //@ts-ignore
53
- fontFamily: tstyle.fontFamily,
54
- //@ts-ignore
55
- color: isPressed ? (props.underlayColor || theme.colors.accent) : tstyle.color || theme.colors.text,
56
- }}>
57
- {props.text || props.children}
58
- </Text_1.TextView>)}
59
- </Box_1.Center>
60
- </react_native_1.TouchableHighlight>);
61
- }
62
- exports.TransparentButton = TransparentButton;
63
- function ButtonView(props) {
64
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
65
- const tstyle = props.style || {};
66
- const [isPressed, setIsPressed] = (0, react_1.useState)(false);
67
- const onPressIn = (e) => {
68
- setIsPressed(true);
69
- if (props.onPressIn)
70
- props.onPressIn(e);
71
- };
72
- const onPressOut = (e) => {
73
- setIsPressed(false);
74
- if (props.onPressOut)
75
- props.onPressOut(e);
76
- };
77
- return (<react_native_1.TouchableHighlight {...props} onPressIn={onPressIn} onPressOut={onPressOut} underlayColor={props.underlayColor || theme.colors.accentLight} style={[{
78
- justifyContent: 'center',
79
- alignContent: 'center',
80
- alignItems: 'center',
81
- padding: theme.dimens.space.md,
82
- borderRadius: theme.dimens.space.xl,
83
- margin: theme.dimens.space.sm,
84
- backgroundColor: theme.colors.accent,
85
- }, props.style]}>
86
- <Box_1.Center style={{
87
- padding: 0,
88
- margin: 0,
89
- flexDirection: 'row',
90
- backgroundColor: 'transparent'
91
- }}>
92
-
93
- {props.icon && (<react_native_1.View style={{
94
- margin: theme.dimens.space.sm
95
- }}>
96
- {props.icon}
97
- </react_native_1.View>)}
98
-
99
- {(props.text || props.children) && (<Text_1.TextView style={{
100
- opacity: isPressed ? .7 : 1,
101
- fontWeight: "500",
102
- justifyContent: 'center',
103
- alignContent: 'center',
104
- alignItems: 'center',
105
- //@ts-ignore
106
- fontSize: tstyle.fontSize,
107
- //@ts-ignore
108
- fontFamily: tstyle.fontFamily,
109
- //@ts-ignore
110
- color: tstyle.color || theme.colors.invert.text,
111
- }}>
112
- {props.text || props.children}
113
- </Text_1.TextView>)}
114
- </Box_1.Center>
115
- </react_native_1.TouchableHighlight>);
116
- }
117
- exports.ButtonView = ButtonView;
118
- function RightIconButton(props) {
119
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
120
- const tstyle = props.style || {};
121
- const [isPressed, setIsPressed] = (0, react_1.useState)(false);
122
- const onPressIn = (e) => {
123
- setIsPressed(true);
124
- if (props.onPressIn)
125
- props.onPressIn(e);
126
- };
127
- const onPressOut = (e) => {
128
- setIsPressed(false);
129
- if (props.onPressOut)
130
- props.onPressOut(e);
131
- };
132
- return (<react_native_1.TouchableHighlight {...props} onPressIn={onPressIn} onPressOut={onPressOut} underlayColor={props.underlayColor || theme.colors.accentLight} style={[{
133
- justifyContent: 'center',
134
- alignContent: 'center',
135
- alignItems: 'center',
136
- padding: theme.dimens.space.md,
137
- borderRadius: theme.dimens.space.xl,
138
- margin: theme.dimens.space.sm,
139
- backgroundColor: theme.colors.accent,
140
- }, props.style]}>
141
-
142
- <Box_1.HBox style={{
143
- padding: 0,
144
- margin: 0,
145
- alignItems: 'center',
146
- backgroundColor: 'transparent',
147
- width: '100%',
148
- paddingLeft: theme.dimens.space.sm,
149
- paddingRight: theme.dimens.space.sm,
150
- }}>
151
- <Box_1.Center style={{
152
- padding: 0,
153
- margin: 0,
154
- flexDirection: 'row',
155
- backgroundColor: 'transparent'
156
- }}>
157
-
158
- {(props.text) && (<Text_1.TextView style={{
159
- marginRight: theme.dimens.space.lg,
160
- justifyContent: 'center',
161
- alignContent: 'center',
162
- alignItems: 'center',
163
- //@ts-ignore
164
- fontSize: tstyle.fontSize,
165
- //@ts-ignore
166
- fontFamily: tstyle.fontFamily,
167
- //@ts-ignore
168
- color: tstyle.color || theme.colors.invert.text,
169
- }}>
170
- {props.text}
171
- </Text_1.TextView>)}
172
- {props.children}
173
-
174
- </Box_1.Center>
175
- {props.icon && (<react_native_1.View style={{
176
- position: 'absolute',
177
- right: 0,
178
- margin: theme.dimens.space.sm
179
- }}>
180
- {props.icon}
181
- </react_native_1.View>)}
182
-
183
- </Box_1.HBox>
184
- </react_native_1.TouchableHighlight>);
185
- }
186
- exports.RightIconButton = RightIconButton;
187
- function LoadingButton(props) {
188
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
189
- const [_loading, _setIsLoading] = (0, react_1.useState)(props.loading);
190
- (0, react_1.useEffect)(() => {
191
- react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
192
- if (props.loading != _loading)
193
- _setIsLoading(props.loading);
194
- }, [props.loading]);
195
- let loaderColor = theme.colors.invert.text;
196
- let loaderSize = theme.dimens.icon.md;
197
- let btnBg = theme.colors.accent;
198
- let btnBgPressed = theme.colors.accentLight;
199
- if (_loading && props.loaderStyle == 'transparent') {
200
- loaderColor = theme.colors.accent;
201
- btnBg = theme.colors.transparent;
202
- btnBgPressed = theme.colors.transparent;
203
- loaderSize = theme.dimens.icon.lg;
204
- }
205
- return (<ButtonView {...props} underlayColor={btnBgPressed} style={[{
206
- width: _loading ? '100%' : '100%',
207
- backgroundColor: btnBg,
208
- padding: _loading && props.loaderStyle == 'transparent' ?
209
- theme.dimens.space.sm : theme.dimens.space.md
210
- }, props.style]} icon={_loading ?
211
- <react_native_1.ActivityIndicator size={loaderSize} color={loaderColor}/>
212
- : undefined} text={!_loading ? props.text : undefined}/>);
213
- }
214
- exports.LoadingButton = LoadingButton;
215
- function PressableView(props) {
216
- //@ts-ignore
217
- return (<react_native_1.Pressable {...props} style={({ pressed }) => [{ opacity: pressed ? 0.7 : 1.0 }, props.style]}/>);
218
- }
219
- exports.PressableView = PressableView;
220
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":";;;AAAA,iCAAwD;AACxD,+CAAkL;AAClL,iDAA8C;AAC9C,+BAAqC;AACrC,iCAAkC;AAElC,SAAgB,iBAAiB,CAAC,KACC;IAC/B,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAA;IAChC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAA;IACjD,MAAM,SAAS,GAAG,CAAC,CAAwB,EAAE,EAAE;QAC3C,YAAY,CAAC,IAAI,CAAC,CAAA;QAClB,IAAI,KAAK,CAAC,SAAS;YAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;IAC3C,CAAC,CAAA;IACD,MAAM,UAAU,GAAG,CAAC,CAAwB,EAAE,EAAE;QAC5C,YAAY,CAAC,KAAK,CAAC,CAAA;QACnB,IAAI,KAAK,CAAC,UAAU;YAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAC7C,CAAC,CAAA;IACD,OAAO,CACH,CAAC,iCAAkB,CACf,IAAI,KAAK,CAAC,CACV,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,aAAa,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CACxC,KAAK,CAAC,CAAC,CAAC;gBACJ,cAAc,EAAE,QAAQ;gBACxB,YAAY,EAAE,QAAQ;gBACtB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBAC9B,YAAY,EA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AAC;gBACJ,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;gBACjC,eAAe,EAAE,KAAK;gBACtB,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC,WAAW,IAAI,aAAa,CAAC,CAAC;oBACrD,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;aACpD,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAChB,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;YACZ,CAAC,gCAAiB,CACd,IAAI,CAAC,CAAC,UAAU,CAAC,CACjB,KAAK,CAAC,CAAC,WAAW,CAAC,EAAG;YAC1B,CAAC,CAAC,SACN,CAAC,CACD,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,EAAG,CACnD,CAAA;AACL,CAAC;AA3CD,sCA2CC;AAID,SAAgB,aAAa,CAAC,KAAqB;IAE/C,YAAY;IACZ,OAAO,CAAC,CAAC,wBAAS,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAG,CAAC,CAAA;AAC9G,CAAC;AAJD,sCAIC"}
package/dist/I18n.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export type I18n = {
2
- t: (id?: string) => string | undefined;
3
- };
4
- export declare const _i18n: I18n;
package/dist/I18n.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._i18n = void 0;
4
- exports._i18n = {
5
- t: (id) => id
6
- };
7
- //# sourceMappingURL=I18n.js.map
package/dist/I18n.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"I18n.js","sourceRoot":"","sources":["../src/I18n.ts"],"names":[],"mappings":";;;AAIa,QAAA,KAAK,GAAS;IACvB,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;CAChB,CAAA"}
package/dist/Image.d.ts DELETED
@@ -1,21 +0,0 @@
1
- import { ViewProps } from "react-native";
2
- export type IconProps = {
3
- name: any;
4
- size?: number;
5
- color?: string;
6
- };
7
- export declare function Icon(props: ViewProps & IconProps): import("react").JSX.Element;
8
- /**
9
- *
10
- * @param props provide one of iconUrl , iconName , iconText
11
- * @returns
12
- */
13
- export declare function Avatar(props: ViewProps & {
14
- onPress?: Function;
15
- iconUrl?: string;
16
- iconName?: string;
17
- iconText?: string;
18
- iconNameProps?: IconProps;
19
- style?: any;
20
- }): import("react").JSX.Element;
21
- export declare function getIcon(input: any): any;