react-native-boxes 1.2.4 → 1.2.6
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 +2 -2
- package/src/Bar.d.ts +2 -0
- package/src/Bar.js +3 -2
- package/src/Bar.js.map +1 -1
- package/src/Button.js +4 -3
- package/src/Button.js.map +1 -1
- package/src/Button.tsx +4 -3
- package/tsconfig.json +1 -1
- package/dist/Bar.d.ts +0 -28
- package/dist/Bar.js +0 -168
- package/dist/Bar.js.map +0 -1
- package/dist/Box.d.ts +0 -14
- package/dist/Box.js +0 -112
- package/dist/Box.js.map +0 -1
- package/dist/Button.d.ts +0 -20
- package/dist/Button.js +0 -220
- package/dist/Button.js.map +0 -1
- package/dist/I18n.d.ts +0 -4
- package/dist/I18n.js +0 -7
- package/dist/I18n.js.map +0 -1
- package/dist/Image.d.ts +0 -21
- package/dist/Image.js +0 -79
- package/dist/Image.js.map +0 -1
- package/dist/Input.d.ts +0 -27
- package/dist/Input.js +0 -190
- package/dist/Input.js.map +0 -1
- package/dist/Message.d.ts +0 -7
- package/dist/Message.js +0 -97
- package/dist/Message.js.map +0 -1
- package/dist/Modal.d.ts +0 -22
- package/dist/Modal.js +0 -245
- package/dist/Modal.js.map +0 -1
- package/dist/Styles.d.ts +0 -119
- package/dist/Styles.js +0 -111
- package/dist/Styles.js.map +0 -1
- package/dist/Text.d.ts +0 -7
- package/dist/Text.js +0 -57
- package/dist/Text.js.map +0 -1
- package/dist/ThemeContext.d.ts +0 -110
- package/dist/ThemeContext.js +0 -33
- package/dist/ThemeContext.js.map +0 -1
- package/dist/demo.d.ts +0 -5
- package/dist/demo.js +0 -302
- package/dist/demo.js.map +0 -1
- package/dist/index.d.ts +0 -12
- package/dist/index.js +0 -29
- package/dist/index.js.map +0 -1
- package/dist/utils.d.ts +0 -5
- package/dist/utils.js +0 -45
- package/dist/utils.js.map +0 -1
package/dist/Message.js
DELETED
|
@@ -1,97 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.AlertMessage = void 0;
|
|
30
|
-
const Box_1 = require("./Box");
|
|
31
|
-
const React = __importStar(require("react"));
|
|
32
|
-
const react_1 = require("react");
|
|
33
|
-
const ThemeContext_1 = require("./ThemeContext");
|
|
34
|
-
const FontAwesome_1 = __importDefault(require("@expo/vector-icons/FontAwesome"));
|
|
35
|
-
const react_native_1 = require("react-native");
|
|
36
|
-
const Text_1 = require("./Text");
|
|
37
|
-
function AlertMessage(props) {
|
|
38
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
39
|
-
const type = props.type || 'info';
|
|
40
|
-
//@ts-ignore
|
|
41
|
-
let icon = {
|
|
42
|
-
'info': 'info-circle',
|
|
43
|
-
'success': 'check-circle',
|
|
44
|
-
'warning': 'info-circle',
|
|
45
|
-
'critical': 'warning'
|
|
46
|
-
}[type];
|
|
47
|
-
let color = {
|
|
48
|
-
'info': '#2196F3',
|
|
49
|
-
'success': '#4CAF50',
|
|
50
|
-
'warning': '#FFC107',
|
|
51
|
-
'critical': '#F44336'
|
|
52
|
-
}[type];
|
|
53
|
-
if (!props.text || props.text.length < 1) {
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
return (<Box_1.HBox style={[{
|
|
57
|
-
flex: 1,
|
|
58
|
-
margin: theme.dimens.space.sm,
|
|
59
|
-
backgroundColor: theme.colors[type] || color,
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
justifyContent: 'space-between',
|
|
62
|
-
flexDirection: 'row',
|
|
63
|
-
paddingStart: theme.dimens.space.md,
|
|
64
|
-
paddingEnd: theme.dimens.space.md,
|
|
65
|
-
paddingBottom: props.text.length > 40 && react_native_1.Platform.OS == 'web' ?
|
|
66
|
-
theme.dimens.space.lg : theme.dimens.space.md,
|
|
67
|
-
paddingTop: props.text.length > 40 && react_native_1.Platform.OS == 'web' ?
|
|
68
|
-
theme.dimens.space.lg : theme.dimens.space.md,
|
|
69
|
-
borderRadius: theme.dimens.space.sm,
|
|
70
|
-
}, props.style]}>
|
|
71
|
-
|
|
72
|
-
<Box_1.HBox style={{
|
|
73
|
-
flex: 0.93,
|
|
74
|
-
alignItems: 'center',
|
|
75
|
-
}}>
|
|
76
|
-
<FontAwesome_1.default style={{
|
|
77
|
-
marginRight: theme.dimens.space.md
|
|
78
|
-
}} name={icon} size={theme.dimens.icon.md} color={theme.colors.invert.text}/>
|
|
79
|
-
<Text_1.TextView style={{
|
|
80
|
-
flexShrink: 1,
|
|
81
|
-
padding: 0,
|
|
82
|
-
color: theme.colors.invert.text,
|
|
83
|
-
}}>{props.text}
|
|
84
|
-
</Text_1.TextView>
|
|
85
|
-
</Box_1.HBox>
|
|
86
|
-
{props.onDismiss && <react_native_1.Pressable style={{
|
|
87
|
-
flexDirection: 'row-reverse',
|
|
88
|
-
flex: 0.06,
|
|
89
|
-
}} onPress={() => {
|
|
90
|
-
props.onDismiss && props.onDismiss();
|
|
91
|
-
}}>
|
|
92
|
-
<FontAwesome_1.default name={'close'} size={theme.dimens.icon.md} color={theme.colors.invert.text}/>
|
|
93
|
-
</react_native_1.Pressable>}
|
|
94
|
-
</Box_1.HBox>);
|
|
95
|
-
}
|
|
96
|
-
exports.AlertMessage = AlertMessage;
|
|
97
|
-
//# sourceMappingURL=Message.js.map
|
package/dist/Message.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../src/Message.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA6B;AAC7B,6CAA+B;AAC/B,iCAAkC;AAClC,iDAA8C;AAC9C,iFAAyD;AACzD,+CAAoE;AACpE,iCAAkC;AAIlC,SAAgB,YAAY,CAAC,KAMxB;IACD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,MAAM,CAAA;IACjC,YAAY;IACZ,IAAI,IAAI,GAA8B;QAClC,MAAM,EAAE,aAAa;QACrB,SAAS,EAAE,cAAc;QACzB,SAAS,EAAE,aAAa;QACxB,UAAU,EAAE,SAAS;KACxB,CAAC,IAAI,CAAC,CAAA;IAEP,IAAI,KAAK,GAAG;QACR,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;KACxB,CAAC,IAAI,CAA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W,CACR,KAAK,CAAC,CAAC;YACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;SACrC,CAAC,CACF,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAC3B,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EACpC;gBAAA,CAAC,eAAQ,CAAC,KAAK,CAAC,CAAC;YACb,UAAU,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;YACV,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI;SAClC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CACd;gBAAA,EAAE,eAAQ,CACd;YAAA,EAAE,UAAI,CACN;YAAA,CACI,KAAK,CAAC,SAAS,IAAI,CAAC,wBAAS,CACzB,KAAK,CAAC,CAAC;gBACH,aAAa,EAAE,aAAa;gBAC5B,IAAI,EAAE,IAAI;aACb,CAAC,CACF,OAAO,CAAC,CAAC,GAAG,EAAE;gBACV,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,EAAE,CAAA;YACxC,CAAC,CAAC,CACF;oBAAA,CAAC,qBAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CACvB,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAC3B,KAAK,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EACxC;gBAAA,EAAE,wBAAS,CACf,CACJ;QAAA,EAAE,UAAI,CAAC,CACV,CAAA;AACL,CAAC;AA/ED,oCA+EC"}
|
package/dist/Modal.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StyleProp, TextStyle, ViewProps } from 'react-native';
|
|
3
|
-
import { IconProps } from './Image';
|
|
4
|
-
export type BottomSheetProps = {
|
|
5
|
-
visible: boolean;
|
|
6
|
-
title?: string | React.Component;
|
|
7
|
-
cancellable?: boolean;
|
|
8
|
-
children: any;
|
|
9
|
-
onDismiss?: Function;
|
|
10
|
-
};
|
|
11
|
-
export declare const BottomSheet: (props: BottomSheetProps) => React.JSX.Element;
|
|
12
|
-
export declare function Expand(props: ViewProps & {
|
|
13
|
-
title?: string;
|
|
14
|
-
iconName?: string;
|
|
15
|
-
iconPosition?: 'left' | 'right';
|
|
16
|
-
titleStyle?: StyleProp<TextStyle>;
|
|
17
|
-
titleBackgroundColor?: string;
|
|
18
|
-
iconStyle?: IconProps;
|
|
19
|
-
initialExpand?: boolean;
|
|
20
|
-
duration?: number;
|
|
21
|
-
onChange?: (isExpanded: boolean) => void;
|
|
22
|
-
}): React.JSX.Element;
|
package/dist/Modal.js
DELETED
|
@@ -1,245 +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.Expand = exports.BottomSheet = void 0;
|
|
27
|
-
const React = __importStar(require("react"));
|
|
28
|
-
const react_1 = require("react");
|
|
29
|
-
const react_native_1 = require("react-native");
|
|
30
|
-
const Image_1 = require("./Image");
|
|
31
|
-
const utils_1 = require("./utils");
|
|
32
|
-
const ThemeContext_1 = require("./ThemeContext");
|
|
33
|
-
const Box_1 = require("./Box");
|
|
34
|
-
const Text_1 = require("./Text");
|
|
35
|
-
const BottomSheet = (props) => {
|
|
36
|
-
const [modalVisible, setModalVisible] = (0, react_1.useState)(false);
|
|
37
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
38
|
-
let cancellable = props.cancellable != undefined ?
|
|
39
|
-
props.cancellable : true;
|
|
40
|
-
(0, react_1.useEffect)(() => {
|
|
41
|
-
setModalVisible(props.visible);
|
|
42
|
-
}, [props.visible]);
|
|
43
|
-
function cancel() {
|
|
44
|
-
setModalVisible(false);
|
|
45
|
-
if (props.onDismiss) {
|
|
46
|
-
props.onDismiss();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return (<react_native_1.View style={styles.container}>
|
|
50
|
-
<react_native_1.Modal onDismiss={() => {
|
|
51
|
-
}} animationType="fade" transparent={true} visible={modalVisible} onRequestClose={() => {
|
|
52
|
-
cancel();
|
|
53
|
-
}}>
|
|
54
|
-
<react_native_1.TouchableHighlight onPress={() => {
|
|
55
|
-
cancel();
|
|
56
|
-
}} style={{
|
|
57
|
-
flex: 1,
|
|
58
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)'
|
|
59
|
-
}}>
|
|
60
|
-
<react_native_1.View />
|
|
61
|
-
</react_native_1.TouchableHighlight>
|
|
62
|
-
|
|
63
|
-
</react_native_1.Modal>
|
|
64
|
-
|
|
65
|
-
<react_native_1.Modal onDismiss={() => {
|
|
66
|
-
cancel();
|
|
67
|
-
}} style={{
|
|
68
|
-
flex: 1
|
|
69
|
-
}} animationType="slide" transparent={true} visible={modalVisible} onRequestClose={() => cancel()}>
|
|
70
|
-
<react_native_1.View style={[styles.modalContainer, {
|
|
71
|
-
backgroundColor: theme.colors.forground
|
|
72
|
-
}]}>
|
|
73
|
-
<react_native_1.View style={[{
|
|
74
|
-
paddingTop: theme.dimens.space.md,
|
|
75
|
-
paddingStart: theme.dimens.space.lg,
|
|
76
|
-
paddingEnd: theme.dimens.space.lg,
|
|
77
|
-
}]}>
|
|
78
|
-
<Box_1.HBox style={{
|
|
79
|
-
justifyContent: 'space-between',
|
|
80
|
-
width: '100%'
|
|
81
|
-
}}>
|
|
82
|
-
<react_native_1.View style={{ width: theme.dimens.icon.md }}/>
|
|
83
|
-
{typeof props.title == 'string' ? (<Text_1.Subtitle style={{
|
|
84
|
-
fontFamily: theme.fonts.Bold
|
|
85
|
-
}}>{props.title.toString()}</Text_1.Subtitle>) : <>{props.title}</>}
|
|
86
|
-
{cancellable ? (<react_native_1.TouchableOpacity style={{
|
|
87
|
-
padding: theme.dimens.space.sm
|
|
88
|
-
}} onPress={() => {
|
|
89
|
-
cancel();
|
|
90
|
-
}}>
|
|
91
|
-
<Image_1.Icon color={theme.colors.caption} name="close"/>
|
|
92
|
-
</react_native_1.TouchableOpacity>) : (<react_native_1.View style={{ width: theme.dimens.icon.md }}/>)}
|
|
93
|
-
</Box_1.HBox>
|
|
94
|
-
<Box_1.VBox style={{
|
|
95
|
-
width: '100%'
|
|
96
|
-
}}>
|
|
97
|
-
<react_native_1.ScrollView nestedScrollEnabled={true} showsVerticalScrollIndicator={false} style={{
|
|
98
|
-
flex: 1,
|
|
99
|
-
maxHeight: 500,
|
|
100
|
-
}}>
|
|
101
|
-
{props.children}
|
|
102
|
-
</react_native_1.ScrollView>
|
|
103
|
-
</Box_1.VBox>
|
|
104
|
-
</react_native_1.View>
|
|
105
|
-
</react_native_1.View>
|
|
106
|
-
</react_native_1.Modal>
|
|
107
|
-
</react_native_1.View>);
|
|
108
|
-
};
|
|
109
|
-
exports.BottomSheet = BottomSheet;
|
|
110
|
-
const styles = react_native_1.StyleSheet.create({
|
|
111
|
-
container: {
|
|
112
|
-
flex: 1,
|
|
113
|
-
justifyContent: 'center',
|
|
114
|
-
alignItems: 'center',
|
|
115
|
-
},
|
|
116
|
-
modalContainer: (0, utils_1.isDesktop)() ? {
|
|
117
|
-
marginLeft: '20%',
|
|
118
|
-
marginRight: '20%',
|
|
119
|
-
marginBottom: '1%',
|
|
120
|
-
width: '60%',
|
|
121
|
-
overflow: 'hidden',
|
|
122
|
-
borderBottomRightRadius: 20,
|
|
123
|
-
borderBottomLeftRadius: 20,
|
|
124
|
-
borderTopLeftRadius: 20,
|
|
125
|
-
borderTopRightRadius: 20,
|
|
126
|
-
position: 'absolute',
|
|
127
|
-
left: 0,
|
|
128
|
-
right: 0,
|
|
129
|
-
bottom: 0,
|
|
130
|
-
} : {
|
|
131
|
-
position: 'absolute',
|
|
132
|
-
left: 0,
|
|
133
|
-
right: 0,
|
|
134
|
-
bottom: 0,
|
|
135
|
-
borderTopLeftRadius: 20,
|
|
136
|
-
borderTopRightRadius: 20,
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
function Expand(props) {
|
|
140
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
141
|
-
const [expanded, setExpanded] = (0, react_1.useState)(props.initialExpand != undefined ? props.initialExpand : false);
|
|
142
|
-
const [contentHeight, setContentHeight] = (0, react_1.useState)(null);
|
|
143
|
-
const spinValue = (0, react_1.useRef)(new react_native_1.Animated.Value(expanded ? 1 : 0)).current;
|
|
144
|
-
const [initDone, setInitDone] = (0, react_1.useState)(false);
|
|
145
|
-
const [fadeAnim] = (0, react_1.useState)(new react_native_1.Animated.Value(0));
|
|
146
|
-
(0, react_1.useEffect)(() => {
|
|
147
|
-
react_native_1.Animated.timing(spinValue, {
|
|
148
|
-
toValue: expanded ? 1 : 0,
|
|
149
|
-
duration: props.duration || 200,
|
|
150
|
-
easing: react_native_1.Easing.ease,
|
|
151
|
-
useNativeDriver: false
|
|
152
|
-
}).start();
|
|
153
|
-
react_native_1.Animated.timing(fadeAnim, {
|
|
154
|
-
toValue: expanded ? 0 : -20,
|
|
155
|
-
duration: props.duration || 200, // Animation duration in milliseconds
|
|
156
|
-
useNativeDriver: true // Add this line for better performance
|
|
157
|
-
}).start();
|
|
158
|
-
}, [expanded]);
|
|
159
|
-
(0, react_1.useEffect)(() => {
|
|
160
|
-
setInitDone(true);
|
|
161
|
-
}, []);
|
|
162
|
-
const toggleExpand = () => {
|
|
163
|
-
if (props.onChange) {
|
|
164
|
-
props.onChange(!expanded);
|
|
165
|
-
}
|
|
166
|
-
setExpanded(!expanded);
|
|
167
|
-
};
|
|
168
|
-
var onLayoutContent = (event) => {
|
|
169
|
-
if (!contentHeight) {
|
|
170
|
-
setContentHeight(event.nativeEvent.layout.height);
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
if (react_native_1.Platform.OS == "web") {
|
|
174
|
-
const [initalLayoutWait, setinitalLayoutWait] = (0, react_1.useState)(false);
|
|
175
|
-
(0, react_1.useEffect)(() => {
|
|
176
|
-
setTimeout(() => {
|
|
177
|
-
setinitalLayoutWait(true);
|
|
178
|
-
}, 2000);
|
|
179
|
-
}, []);
|
|
180
|
-
onLayoutContent = (event) => {
|
|
181
|
-
if (!contentHeight && initalLayoutWait) {
|
|
182
|
-
setContentHeight(event.nativeEvent.layout.height);
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
const spinInterpolated = spinValue.interpolate({
|
|
187
|
-
easing: react_native_1.Easing.ease,
|
|
188
|
-
inputRange: [0, 1],
|
|
189
|
-
outputRange: ['0deg', '90deg']
|
|
190
|
-
});
|
|
191
|
-
const ExpandIcon = () => {
|
|
192
|
-
return (<react_native_1.Pressable style={[{
|
|
193
|
-
borderRadius: theme.dimens.space.md,
|
|
194
|
-
padding: theme.dimens.space.md,
|
|
195
|
-
}, {
|
|
196
|
-
backgroundColor: props.titleBackgroundColor
|
|
197
|
-
}]} onPress={toggleExpand}>
|
|
198
|
-
<Box_1.Center style={props.iconPosition == 'right' ? {
|
|
199
|
-
paddingLeft: theme.dimens.space.sm,
|
|
200
|
-
justifyContent: 'space-between',
|
|
201
|
-
flexDirection: 'row-reverse',
|
|
202
|
-
} : {
|
|
203
|
-
justifyContent: 'flex-start',
|
|
204
|
-
flexDirection: 'row',
|
|
205
|
-
}}>
|
|
206
|
-
<react_native_1.Animated.View style={{
|
|
207
|
-
transform: [{ rotate: spinInterpolated }],
|
|
208
|
-
}}>
|
|
209
|
-
<Image_1.Icon color={theme.colors.text} {...props.iconStyle} name={props.iconName || 'chevron-right'}/>
|
|
210
|
-
</react_native_1.Animated.View>
|
|
211
|
-
<Box_1.HBox style={{
|
|
212
|
-
width: theme.dimens.space.sm
|
|
213
|
-
}}/>
|
|
214
|
-
<Text_1.Title style={[{
|
|
215
|
-
padding: 0,
|
|
216
|
-
paddingLeft: props.iconPosition == 'right' ? 0 :
|
|
217
|
-
theme.dimens.space.sm,
|
|
218
|
-
margin: 0,
|
|
219
|
-
fontSize: theme.dimens.font.md
|
|
220
|
-
}, props.titleStyle]}>{props.title}</Text_1.Title>
|
|
221
|
-
</Box_1.Center>
|
|
222
|
-
</react_native_1.Pressable>);
|
|
223
|
-
};
|
|
224
|
-
return (<Box_1.VBox style={[{
|
|
225
|
-
padding: 0,
|
|
226
|
-
borderRadius: theme.dimens.space.md,
|
|
227
|
-
margin: theme.dimens.space.sm
|
|
228
|
-
}, {
|
|
229
|
-
justifyContent: (props.iconPosition) == 'right' ? 'space-between' : 'flex-start'
|
|
230
|
-
}, props.style]}>
|
|
231
|
-
<ExpandIcon />
|
|
232
|
-
<react_native_1.Animated.View style={{
|
|
233
|
-
zIndex: -1,
|
|
234
|
-
transform: [{ translateY: fadeAnim }],
|
|
235
|
-
height: expanded ? 'auto' : 0,
|
|
236
|
-
overflow: 'hidden'
|
|
237
|
-
}} onLayout={onLayoutContent}>
|
|
238
|
-
{(expanded || initDone) && (<Box_1.VBox onLayout={onLayoutContent}>
|
|
239
|
-
{props.children}
|
|
240
|
-
</Box_1.VBox>)}
|
|
241
|
-
</react_native_1.Animated.View>
|
|
242
|
-
</Box_1.VBox>);
|
|
243
|
-
}
|
|
244
|
-
exports.Expand = Expand;
|
|
245
|
-
//# sourceMappingURL=Modal.js.map
|
package/dist/Modal.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../src/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,iCAAgE;AAChE,+CAAoM;AACpM,mCAA0C;AAC1C,mCAAoC;AACpC,iDAA8C;AAC9C,+BAA2C;AAC3C,iCAAyC;AASlC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACnD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,IAAI,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,SAAS,CAAC,CAAC;QAC9C,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA;IAE5B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAClC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IAEnB,SAAS,MAAM;QACX,eAAe,CAAC,KAAK,CAAC,CAAA;QACtB,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YAClB,KA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I,QAAQ,CAAC,IAAI,CACtB,CAAC,UAAI,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC,CAC5B;4BAAA,CAAC,KAAK,CAAC,QAAQ,CACnB;wBAAA,EAAE,UAAI,CAAC,CAEf,CACJ;YAAA,EAAE,uBAAQ,CAAC,IAAI,CACnB;QAAA,EAAE,UAAI,CAAC,CACV,CAAC;AACN,CAAC;AAhJD,wBAgJC"}
|
package/dist/Styles.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export declare const Dimens: {
|
|
2
|
-
space: {
|
|
3
|
-
xs: number;
|
|
4
|
-
sm: number;
|
|
5
|
-
md: number;
|
|
6
|
-
lg: number;
|
|
7
|
-
xl: number;
|
|
8
|
-
};
|
|
9
|
-
font: {
|
|
10
|
-
sm: number;
|
|
11
|
-
md: number;
|
|
12
|
-
lg: number;
|
|
13
|
-
xl: number;
|
|
14
|
-
};
|
|
15
|
-
icon: {
|
|
16
|
-
sm: number;
|
|
17
|
-
md: number;
|
|
18
|
-
lg: number;
|
|
19
|
-
xl: number;
|
|
20
|
-
xxl: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const Fonts: {
|
|
24
|
-
Regular: string;
|
|
25
|
-
Bold: string;
|
|
26
|
-
Styled: string;
|
|
27
|
-
};
|
|
28
|
-
export declare const Colors: {
|
|
29
|
-
accent: string;
|
|
30
|
-
accentLight: string;
|
|
31
|
-
text: string;
|
|
32
|
-
caption: string;
|
|
33
|
-
heading: string;
|
|
34
|
-
background: string;
|
|
35
|
-
forground: string;
|
|
36
|
-
transparent: string;
|
|
37
|
-
semitransparent: string;
|
|
38
|
-
info: string;
|
|
39
|
-
success: string;
|
|
40
|
-
warning: string;
|
|
41
|
-
critical: string;
|
|
42
|
-
invert: {
|
|
43
|
-
text: string;
|
|
44
|
-
caption: string;
|
|
45
|
-
heading: string;
|
|
46
|
-
background: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export declare const LightColors: {
|
|
50
|
-
accent: string;
|
|
51
|
-
accentLight: string;
|
|
52
|
-
text: string;
|
|
53
|
-
caption: string;
|
|
54
|
-
heading: string;
|
|
55
|
-
background: string;
|
|
56
|
-
forground: string;
|
|
57
|
-
transparent: string;
|
|
58
|
-
semitransparent: string;
|
|
59
|
-
info: string;
|
|
60
|
-
success: string;
|
|
61
|
-
warning: string;
|
|
62
|
-
critical: string;
|
|
63
|
-
invert: {
|
|
64
|
-
text: string;
|
|
65
|
-
caption: string;
|
|
66
|
-
heading: string;
|
|
67
|
-
background: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
export declare const DarkColors: {
|
|
71
|
-
accent: string;
|
|
72
|
-
accentLight: string;
|
|
73
|
-
text: string;
|
|
74
|
-
caption: string;
|
|
75
|
-
heading: string;
|
|
76
|
-
background: string;
|
|
77
|
-
forground: string;
|
|
78
|
-
transparent: string;
|
|
79
|
-
semitransparent: string;
|
|
80
|
-
info: string;
|
|
81
|
-
success: string;
|
|
82
|
-
warning: string;
|
|
83
|
-
critical: string;
|
|
84
|
-
invert: {
|
|
85
|
-
text: string;
|
|
86
|
-
caption: string;
|
|
87
|
-
heading: string;
|
|
88
|
-
background: string;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export declare function extendValues(dimens: typeof Dimens, colors: typeof Colors, fonts: typeof Fonts): {
|
|
92
|
-
dimens: typeof Dimens;
|
|
93
|
-
colors: typeof Colors;
|
|
94
|
-
fonts: typeof Fonts;
|
|
95
|
-
};
|
|
96
|
-
export declare function createStyle(dimens: typeof Dimens, colors: typeof Colors, fonts: typeof Fonts): {
|
|
97
|
-
safeAreaInset: {
|
|
98
|
-
top: number;
|
|
99
|
-
left: number;
|
|
100
|
-
right: number;
|
|
101
|
-
bottom: number;
|
|
102
|
-
};
|
|
103
|
-
container: {
|
|
104
|
-
marginTop: number;
|
|
105
|
-
backgroundColor: string;
|
|
106
|
-
};
|
|
107
|
-
center: {
|
|
108
|
-
alignContent: "center";
|
|
109
|
-
justifyContent: "center";
|
|
110
|
-
};
|
|
111
|
-
textHead: {
|
|
112
|
-
color: string;
|
|
113
|
-
fontSize: number;
|
|
114
|
-
};
|
|
115
|
-
text: {
|
|
116
|
-
fontFamily: string;
|
|
117
|
-
fontSize: number;
|
|
118
|
-
};
|
|
119
|
-
};
|
package/dist/Styles.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createStyle = exports.extendValues = exports.DarkColors = exports.LightColors = exports.Colors = exports.Fonts = exports.Dimens = void 0;
|
|
4
|
-
const react_native_1 = require("react-native");
|
|
5
|
-
exports.Dimens = {
|
|
6
|
-
space: {
|
|
7
|
-
xs: 1,
|
|
8
|
-
sm: 5,
|
|
9
|
-
md: 10,
|
|
10
|
-
lg: 20,
|
|
11
|
-
xl: 50,
|
|
12
|
-
},
|
|
13
|
-
font: {
|
|
14
|
-
sm: 12,
|
|
15
|
-
md: 14,
|
|
16
|
-
lg: 16,
|
|
17
|
-
xl: 24,
|
|
18
|
-
},
|
|
19
|
-
icon: {
|
|
20
|
-
sm: 12,
|
|
21
|
-
md: 20,
|
|
22
|
-
lg: 30,
|
|
23
|
-
xl: 50,
|
|
24
|
-
xxl: 80,
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.Fonts = {
|
|
28
|
-
Regular: 'Regular',
|
|
29
|
-
Bold: 'Bold',
|
|
30
|
-
Styled: 'Styled',
|
|
31
|
-
};
|
|
32
|
-
exports.Colors = {
|
|
33
|
-
accent: '#1976D2',
|
|
34
|
-
accentLight: '#2196F3',
|
|
35
|
-
text: '#444444',
|
|
36
|
-
caption: '#A9A9A9',
|
|
37
|
-
heading: '#222222',
|
|
38
|
-
background: '#E6E6E6',
|
|
39
|
-
forground: '#fff',
|
|
40
|
-
transparent: 'transparent',
|
|
41
|
-
semitransparent: '#111a1a1c',
|
|
42
|
-
info: '#2196F3',
|
|
43
|
-
success: '#4CAF50',
|
|
44
|
-
warning: '#FFA726',
|
|
45
|
-
critical: '#F44336',
|
|
46
|
-
invert: {
|
|
47
|
-
text: '#fff',
|
|
48
|
-
caption: '#fff',
|
|
49
|
-
heading: '#fff',
|
|
50
|
-
background: '#1a1a1c'
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
exports.LightColors = exports.Colors;
|
|
54
|
-
exports.DarkColors = {
|
|
55
|
-
accent: '#1976D2',
|
|
56
|
-
accentLight: '#2196F3',
|
|
57
|
-
text: '#f2f2f2',
|
|
58
|
-
caption: '#565656',
|
|
59
|
-
heading: '#dddddd',
|
|
60
|
-
background: '#212121',
|
|
61
|
-
forground: '#191919',
|
|
62
|
-
transparent: 'transparent',
|
|
63
|
-
semitransparent: '#111a1a1c',
|
|
64
|
-
info: '#2196F3',
|
|
65
|
-
success: '#4CAF50',
|
|
66
|
-
warning: '#FFA726',
|
|
67
|
-
critical: '#F44336',
|
|
68
|
-
invert: {
|
|
69
|
-
text: '#fff',
|
|
70
|
-
caption: '#fff',
|
|
71
|
-
heading: '#fff',
|
|
72
|
-
background: '#E6E6E6'
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
function extendValues(dimens, colors, fonts) {
|
|
76
|
-
return {
|
|
77
|
-
dimens: Object.assign(dimens || {}, exports.Dimens),
|
|
78
|
-
colors: Object.assign(colors || {}, exports.Colors),
|
|
79
|
-
fonts: Object.assign(fonts || {}, exports.Fonts),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
exports.extendValues = extendValues;
|
|
83
|
-
function createStyle(dimens, colors, fonts) {
|
|
84
|
-
const Styles = react_native_1.StyleSheet.create({
|
|
85
|
-
safeAreaInset: {
|
|
86
|
-
top: dimens.space.md,
|
|
87
|
-
left: 0,
|
|
88
|
-
right: 0,
|
|
89
|
-
bottom: dimens.space.md,
|
|
90
|
-
},
|
|
91
|
-
container: {
|
|
92
|
-
marginTop: dimens.space.xl,
|
|
93
|
-
backgroundColor: colors.background,
|
|
94
|
-
},
|
|
95
|
-
center: {
|
|
96
|
-
alignContent: 'center',
|
|
97
|
-
justifyContent: 'center'
|
|
98
|
-
},
|
|
99
|
-
textHead: {
|
|
100
|
-
color: colors.text,
|
|
101
|
-
fontSize: dimens.font.xl,
|
|
102
|
-
},
|
|
103
|
-
text: {
|
|
104
|
-
fontFamily: fonts.Regular,
|
|
105
|
-
fontSize: dimens.font.md,
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
return Styles;
|
|
109
|
-
}
|
|
110
|
-
exports.createStyle = createStyle;
|
|
111
|
-
//# sourceMappingURL=Styles.js.map
|
package/dist/Styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","sourceRoot":"","sources":["../src/Styles.tsx"],"names":[],"mappings":";;;AAAA,+CAA0C;AAE7B,QAAA,MAAM,GAAG;IAClB,KAAK,EAAE;QACH,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,CAAC;QACL,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;KACT;IACD,IAAI,EAAE;QACF,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;KACT;IACD,IAAI,EAAE;QACF,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;QACN,GAAG,EAAE,EAAE;KACV;CACJ,CAAA;AAEY,QAAA,KAAK,GAAG;IACjB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACnB,CAAA;AAEY,QAAA,MAAM,GAAG;IAClB,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,UAA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AM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;QAC7B,aAAa,EAAE;YACX,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;YACpB,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;SAC1B;QACD,SAAS,EAAE;YACP,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;YAC1B,eAAe,EAAE,MAAM,CAAC,UAAU;SACrC;QACD,MAAM,EAAE;YACJ,YAAY,EAAE,QAAQ;YACtB,cAAc,EAAE,QAAQ;SAC3B;QACD,QAAQ,EAAE;YACN,KAAK,EAAE,MAAM,CAAC,IAAI;YAClB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE;SAC3B;QACD,IAAI,EAAE;YACF,UAAU,EAAE,KAAK,CAAC,OAAO;YACzB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE;SAC3B;KACJ,CAAC,CAAC;IACH,OAAO,MAAM,CAAA;AACjB,CAAC;AA9BD,kCA8BC"}
|
package/dist/Text.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TextProps } from "react-native";
|
|
2
|
-
export declare function TextView(props: TextProps & {
|
|
3
|
-
skipI18n?: boolean;
|
|
4
|
-
}): import("react").JSX.Element;
|
|
5
|
-
export declare function Subtitle(props: TextProps): import("react").JSX.Element;
|
|
6
|
-
export declare function Title(props: TextProps): import("react").JSX.Element;
|
|
7
|
-
export declare function Caption(props: TextProps): import("react").JSX.Element;
|