react-native-boxes 1.0.17 → 1.0.18
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 +26 -0
- package/src/Bar.js +167 -0
- package/src/Bar.js.map +1 -0
- package/src/Box.d.ts +14 -0
- package/src/Box.js +112 -0
- package/src/Box.js.map +1 -0
- package/src/Button.d.ts +20 -0
- package/src/Button.js +220 -0
- package/src/Button.js.map +1 -0
- package/src/I18n.d.ts +4 -0
- package/src/I18n.js +7 -0
- package/src/I18n.js.map +1 -0
- package/src/Image.d.ts +21 -0
- package/src/Image.js +79 -0
- package/src/Image.js.map +1 -0
- package/src/Input.d.ts +27 -0
- package/src/Input.js +190 -0
- package/src/Input.js.map +1 -0
- package/src/Message.d.ts +7 -0
- package/src/Message.js +97 -0
- package/src/Message.js.map +1 -0
- package/src/Modal.d.ts +22 -0
- package/src/Modal.js +245 -0
- package/src/Modal.js.map +1 -0
- package/src/Styles.d.ts +119 -0
- package/src/Styles.js +111 -0
- package/src/Styles.js.map +1 -0
- package/src/Text.d.ts +7 -0
- package/src/Text.js +57 -0
- package/src/Text.js.map +1 -0
- package/src/ThemeContext.d.ts +110 -0
- package/src/ThemeContext.js +33 -0
- package/src/ThemeContext.js.map +1 -0
- package/src/demo.d.ts +5 -0
- package/src/demo.js +302 -0
- package/src/demo.js.map +1 -0
- package/src/index.d.ts +12 -0
- package/src/index.js +29 -0
- package/src/index.js.map +1 -0
- package/src/utils.d.ts +5 -0
- package/src/utils.js +45 -0
- package/src/utils.js.map +1 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeContext = exports.Theme = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const Styles_1 = require("./Styles");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
const I18n_1 = require("./I18n");
|
|
8
|
+
const DEFAULT_STYLE = (0, Styles_1.createStyle)(Styles_1.Dimens, Styles_1.Colors, Styles_1.Fonts);
|
|
9
|
+
class Theme {
|
|
10
|
+
appname = '';
|
|
11
|
+
styles;
|
|
12
|
+
dimens;
|
|
13
|
+
colors;
|
|
14
|
+
fonts;
|
|
15
|
+
i18n;
|
|
16
|
+
insets;
|
|
17
|
+
randomColor = utils_1.randomColor;
|
|
18
|
+
constructor(appname = '', colors = Styles_1.Colors, dimens = Styles_1.Dimens, fonts = Styles_1.Fonts, styles = DEFAULT_STYLE, i18n = I18n_1._i18n) {
|
|
19
|
+
this.appname = appname;
|
|
20
|
+
this.fonts = fonts ?? Styles_1.Fonts;
|
|
21
|
+
this.colors = colors ?? Styles_1.Colors;
|
|
22
|
+
this.dimens = dimens ?? Styles_1.Dimens;
|
|
23
|
+
this.fonts = fonts ?? Styles_1.Fonts;
|
|
24
|
+
this.styles = styles ?? (0, Styles_1.createStyle)(this.dimens, this.colors, this.fonts);
|
|
25
|
+
this.i18n = i18n;
|
|
26
|
+
}
|
|
27
|
+
setInsets(insets) {
|
|
28
|
+
this.insets = insets;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Theme = Theme;
|
|
32
|
+
exports.ThemeContext = (0, react_1.createContext)(new Theme());
|
|
33
|
+
//# sourceMappingURL=ThemeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["ThemeContext.ts"],"names":[],"mappings":";;;AAAA,iCAAqC;AACrC,qCAAsF;AACtF,mCAAqC;AACrC,iCAAoC;AAEpC,MAAM,aAAa,GAAG,IAAA,oBAAW,EAAC,eAAM,EAAE,eAAM,EAAE,cAAK,CAAC,CAAA;AACxD,MAAa,KAAK;IACd,OAAO,GAAW,EAAE,CAAA;IACpB,MAAM,CAAsB;IAC5B,MAAM,CAAe;IACrB,MAAM,CAAe;IACrB,KAAK,CAAc;IACnB,IAAI,CAAM;IACV,MAAM,CAAa;IACnB,WAAW,GAAG,mBAAW,CAAA;IACzB,YAAY,OAAO,GAAG,EAAE,EACpB,MAAM,GAAG,eAAM,EACf,MAAM,GAAG,eAAM,EACf,KAAK,GAAG,cAAK,EACb,MAAM,GAAG,aAAa,EACtB,IAAI,GAAG,YAAK;QACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,cAAK,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,eAAM,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,eAAM,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,IAAI,cAAK,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;QACzE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IACpB,CAAC;IACD,SAAS,CAAC,MAAkB;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACxB,CAAC;CACJ;AA1BD,sBA0BC;AACY,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAC,IAAI,KAAK,EAAE,CAAC,CAAA"}
|
package/src/demo.d.ts
ADDED
package/src/demo.js
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
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.DemoScreen = void 0;
|
|
30
|
+
const react_1 = require("react");
|
|
31
|
+
const React = __importStar(require("react"));
|
|
32
|
+
const react_native_1 = require("react-native");
|
|
33
|
+
const _1 = require(".");
|
|
34
|
+
const FontAwesome_1 = __importDefault(require("@expo/vector-icons/FontAwesome"));
|
|
35
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
36
|
+
const Message_1 = require("./Message");
|
|
37
|
+
const Modal_1 = require("./Modal");
|
|
38
|
+
const Image_1 = require("./Image");
|
|
39
|
+
const utils_1 = require("./utils");
|
|
40
|
+
const Box_1 = __importDefault(require("./Box"));
|
|
41
|
+
const Styles_1 = require("./Styles");
|
|
42
|
+
function DemoScreen({ navigation }) {
|
|
43
|
+
const theme = (0, react_1.useContext)(_1.ThemeContext);
|
|
44
|
+
console.log('Rendering');
|
|
45
|
+
const btnIcon = (<FontAwesome_1.default name='google' size={theme.dimens.icon.md} color={theme.colors.invert.text}/>);
|
|
46
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
47
|
+
const [alert, setBs] = (0, react_1.useState)(`In this version, the icon used is always 'chevron-right' even when expanded.`);
|
|
48
|
+
const [bottomsheetVisible, setbottomsheetVisible] = (0, react_1.useState)(false);
|
|
49
|
+
function setAlert(bs) {
|
|
50
|
+
setBs(bs);
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
setBs(`In this version, the icon used is always 'chevron-right' even when expanded.`);
|
|
53
|
+
}, 5000);
|
|
54
|
+
}
|
|
55
|
+
const [selectedBottombarId, setSelectedBottomBarId] = (0, react_1.useState)('home');
|
|
56
|
+
const [mText, setMText] = (0, react_1.useState)(`@shivesh`);
|
|
57
|
+
const [bottomBarHeight, setBottombarHeight] = (0, react_1.useState)(theme.dimens.space.xl);
|
|
58
|
+
const [selectedTheme, setSelectedTheme] = (0, react_1.useState)(true);
|
|
59
|
+
(0, react_1.useEffect)(() => {
|
|
60
|
+
theme.colors = selectedTheme ? Styles_1.LightColors : Styles_1.DarkColors;
|
|
61
|
+
forceUpdate();
|
|
62
|
+
}, [selectedTheme]);
|
|
63
|
+
const [, forceUpdate] = (0, react_1.useReducer)(x => x + 1, 0);
|
|
64
|
+
return (<react_native_safe_area_context_1.SafeAreaProvider>
|
|
65
|
+
<_1.VBox style={{
|
|
66
|
+
backgroundColor: theme.colors.background,
|
|
67
|
+
padding: 0,
|
|
68
|
+
paddingBottom: bottomBarHeight,
|
|
69
|
+
margin: 0,
|
|
70
|
+
height: '100%'
|
|
71
|
+
}}>
|
|
72
|
+
<_1.SimpleToolbar title="Demo" homeIcon={(0, utils_1.ReactWrapper)(<Image_1.Icon color={theme.colors.invert.text} name="plus"/>)} options={[
|
|
73
|
+
{
|
|
74
|
+
id: 'test',
|
|
75
|
+
icon: 'gear',
|
|
76
|
+
onClick: (id) => {
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'test2',
|
|
81
|
+
icon: (0, utils_1.ReactWrapper)(<_1.PressableView>
|
|
82
|
+
<Image_1.Avatar style={{
|
|
83
|
+
margin: 0,
|
|
84
|
+
height: theme.dimens?.icon?.md * 1.25,
|
|
85
|
+
width: theme.dimens?.icon?.md * 1.25,
|
|
86
|
+
}} iconUrl="https://avatars.githubusercontent.com/u/16799797?v=4"/>
|
|
87
|
+
</_1.PressableView>),
|
|
88
|
+
onClick: (id) => {
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]}/>
|
|
92
|
+
<Box_1.default automaticallyAdjustKeyboardInsets={true} keyboardShouldPersistTaps={'handled'} style={{
|
|
93
|
+
flexGrow: 1,
|
|
94
|
+
}} nestedScrollEnabled={true} showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false}>
|
|
95
|
+
|
|
96
|
+
<_1.Center style={{
|
|
97
|
+
flexDirection: 'row',
|
|
98
|
+
padding: 20
|
|
99
|
+
}}>
|
|
100
|
+
|
|
101
|
+
<Image_1.Avatar onPress={() => {
|
|
102
|
+
setbottomsheetVisible(true);
|
|
103
|
+
}} style={{
|
|
104
|
+
borderColor: theme.colors.success,
|
|
105
|
+
}} iconNameProps={{
|
|
106
|
+
name: 'user',
|
|
107
|
+
color: theme.colors.success,
|
|
108
|
+
size: theme.dimens.icon.lg
|
|
109
|
+
}}/>
|
|
110
|
+
<_1.Center>
|
|
111
|
+
<Image_1.Avatar style={{
|
|
112
|
+
borderWidth: theme.dimens.space.sm,
|
|
113
|
+
width: 100,
|
|
114
|
+
height: 100,
|
|
115
|
+
borderColor: theme.colors.success
|
|
116
|
+
}} iconText='SN' onPress={() => {
|
|
117
|
+
setbottomsheetVisible(true);
|
|
118
|
+
}} iconNameProps={{
|
|
119
|
+
name: 'user',
|
|
120
|
+
color: theme.colors.success,
|
|
121
|
+
size: theme.dimens.icon.lg
|
|
122
|
+
}} iconUrl='https://cdn.truelancer.com/user-picture/307510-5c1f11bad82e9.jpg'/>
|
|
123
|
+
<_1.Subtitle>{mText}</_1.Subtitle>
|
|
124
|
+
</_1.Center>
|
|
125
|
+
|
|
126
|
+
<Image_1.Avatar style={{
|
|
127
|
+
borderColor: theme.colors.success,
|
|
128
|
+
color: theme.colors.success
|
|
129
|
+
}} onPress={() => {
|
|
130
|
+
setbottomsheetVisible(true);
|
|
131
|
+
}} iconText='SN'/>
|
|
132
|
+
</_1.Center>
|
|
133
|
+
<_1.Expand title='Message Alert' initialExpand={false} style={{
|
|
134
|
+
backgroundColor: theme.colors.forground
|
|
135
|
+
}} titleBackgroundColor={theme.colors.forground}>
|
|
136
|
+
<_1.VBox>
|
|
137
|
+
<Message_1.AlertMessage text={alert} onDismiss={() => {
|
|
138
|
+
react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
|
|
139
|
+
setAlert('');
|
|
140
|
+
}}/>
|
|
141
|
+
<Message_1.AlertMessage text='Critial Message' type='critical'/>
|
|
142
|
+
<Message_1.AlertMessage text='Success' type='success'/>
|
|
143
|
+
<Message_1.AlertMessage text='Warning Message' type='warning'/>
|
|
144
|
+
</_1.VBox>
|
|
145
|
+
|
|
146
|
+
</_1.Expand>
|
|
147
|
+
<_1.Expand style={{
|
|
148
|
+
padding: 0,
|
|
149
|
+
borderWidth: 0.1,
|
|
150
|
+
borderColor: '#DCDCDC'
|
|
151
|
+
}} duration={200} title='In this version, the icon used is always chevron-right even when expanded. In this version, the icon used is always chevron-right even when expanded.' initialExpand={false} iconPosition='right'>
|
|
152
|
+
<_1.VBox>
|
|
153
|
+
<_1.Title>Text A</_1.Title>
|
|
154
|
+
<_1.Subtitle>Text A Text A Text AText A Text AText A</_1.Subtitle>
|
|
155
|
+
<_1.TextView>Text A</_1.TextView>
|
|
156
|
+
<_1.Caption>Text Caption</_1.Caption>
|
|
157
|
+
</_1.VBox>
|
|
158
|
+
</_1.Expand>
|
|
159
|
+
<_1.Expand title='Inputs'>
|
|
160
|
+
|
|
161
|
+
<_1.VBox>
|
|
162
|
+
<_1.TextInputView style={{
|
|
163
|
+
fontFamily: theme.fonts.Bold
|
|
164
|
+
}} initialText={mText} value={mText} onChangeText={t => setMText(t)}/>
|
|
165
|
+
<_1.CompositeTextInputView onChangeText={t => setMText(t)} placeholder='A test' initialText='Test'/>
|
|
166
|
+
<_1.CompositeTextInputView inputMode='decimal' icon={"close"} style={{}} alertTextColor={theme.colors.warning} placeholder='Enter your name' initialText='Test' value={mText} onChangeText={t => setMText(t)}/>
|
|
167
|
+
<_1.CompositeTextInputView style={{}} placeholder='Enter number' alertText={mText?.indexOf("@") > -1 ? '' : 'Please enter @ or else I am gonna come down at your place and mess you up buddy !'} initialText='Test' value={mText} onChangeText={t => setMText(t)}/>
|
|
168
|
+
</_1.VBox>
|
|
169
|
+
</_1.Expand>
|
|
170
|
+
|
|
171
|
+
<_1.Expand iconStyle={{
|
|
172
|
+
name: 'chevron-right',
|
|
173
|
+
color: 'red'
|
|
174
|
+
}} title='Buttons' initialExpand={false}>
|
|
175
|
+
<_1.VBox style={{}}>
|
|
176
|
+
<_1.VBox>
|
|
177
|
+
<_1.ButtonView icon={btnIcon} style={{}}>Button Icon</_1.ButtonView>
|
|
178
|
+
|
|
179
|
+
<_1.ButtonView style={{}}>Button Text</_1.ButtonView>
|
|
180
|
+
</_1.VBox>
|
|
181
|
+
<_1.RightIconButton text='Click Me Icon' icon={btnIcon}>
|
|
182
|
+
</_1.RightIconButton>
|
|
183
|
+
|
|
184
|
+
<_1.Center>
|
|
185
|
+
<_1.LoadingButton onPress={(e) => {
|
|
186
|
+
setLoading(!loading);
|
|
187
|
+
}} loading={loading} text='Click Me'/>
|
|
188
|
+
|
|
189
|
+
<_1.ButtonView underlayColor={theme.colors.transparent} style={{
|
|
190
|
+
color: theme.colors.accent,
|
|
191
|
+
backgroundColor: theme.colors.transparent,
|
|
192
|
+
}}>Tertiary button</_1.ButtonView>
|
|
193
|
+
|
|
194
|
+
</_1.Center>
|
|
195
|
+
|
|
196
|
+
<_1.Expand title='Nested expand'>
|
|
197
|
+
<_1.HBox style={{
|
|
198
|
+
justifyContent: 'center',
|
|
199
|
+
}}>
|
|
200
|
+
<_1.LoadingButton style={{
|
|
201
|
+
width: 'auto'
|
|
202
|
+
}} onPress={(e) => {
|
|
203
|
+
setLoading(!loading);
|
|
204
|
+
}} loading={loading} text='Click Me left'/>
|
|
205
|
+
<_1.LoadingButton loaderStyle='transparent' style={{
|
|
206
|
+
width: 'auto'
|
|
207
|
+
}} onPress={(e) => {
|
|
208
|
+
setLoading(!loading);
|
|
209
|
+
}} loading={loading} text='Click Me right'/>
|
|
210
|
+
</_1.HBox>
|
|
211
|
+
</_1.Expand>
|
|
212
|
+
|
|
213
|
+
</_1.VBox>
|
|
214
|
+
</_1.Expand>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
<_1.ButtonView underlayColor={theme.colors.transparent} style={{
|
|
219
|
+
color: theme.colors.accent,
|
|
220
|
+
backgroundColor: theme.colors.transparent,
|
|
221
|
+
}} onPress={() => {
|
|
222
|
+
setSelectedTheme(!selectedTheme);
|
|
223
|
+
}}>{selectedTheme ? 'Light' : 'Dark'}</_1.ButtonView>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
<_1.ButtonView underlayColor={theme.colors.transparent} style={{
|
|
227
|
+
color: theme.colors.accent,
|
|
228
|
+
backgroundColor: theme.colors.transparent,
|
|
229
|
+
}} onPress={() => {
|
|
230
|
+
setbottomsheetVisible(true);
|
|
231
|
+
}}>Show Sheet</_1.ButtonView>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
</Box_1.default>
|
|
235
|
+
<_1.BottomNavBar style={{
|
|
236
|
+
borderTopLeftRadius: theme.dimens.space.md,
|
|
237
|
+
borderTopRightRadius: theme.dimens.space.md,
|
|
238
|
+
}} onSelect={setSelectedBottomBarId} selectedId={selectedBottombarId} options={[
|
|
239
|
+
{
|
|
240
|
+
id: 'home',
|
|
241
|
+
title: 'Home',
|
|
242
|
+
icon: 'home'
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
id: 'create',
|
|
246
|
+
title: 'Create',
|
|
247
|
+
icon: 'plus'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
id: 'search',
|
|
251
|
+
title: 'Search',
|
|
252
|
+
icon: 'search'
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: 'profile',
|
|
256
|
+
title: 'Profile',
|
|
257
|
+
icon: (0, utils_1.ReactWrapper)(<_1.PressableView>
|
|
258
|
+
<Image_1.Avatar onPress={() => {
|
|
259
|
+
setSelectedBottomBarId('profile');
|
|
260
|
+
}} style={{
|
|
261
|
+
borderColor: selectedBottombarId == 'profile' ?
|
|
262
|
+
theme.colors.accent : theme.colors.caption,
|
|
263
|
+
margin: 0,
|
|
264
|
+
height: theme.dimens?.icon?.md,
|
|
265
|
+
width: theme.dimens?.icon?.md,
|
|
266
|
+
}}
|
|
267
|
+
// iconName='user'
|
|
268
|
+
iconUrl="https://avatars.githubusercontent.com/u/16799797?v=4"/>
|
|
269
|
+
</_1.PressableView>)
|
|
270
|
+
}
|
|
271
|
+
]} onDimens={(w, h) => {
|
|
272
|
+
setBottombarHeight(h);
|
|
273
|
+
console.log("bottomBarHeight", h);
|
|
274
|
+
}}/>
|
|
275
|
+
|
|
276
|
+
<Modal_1.BottomSheet title="About" visible={bottomsheetVisible} onDismiss={() => {
|
|
277
|
+
setbottomsheetVisible(false);
|
|
278
|
+
}}>
|
|
279
|
+
<_1.TextView>Dinosaurs are a diverse group of reptiles of the clade Dinosauria. They first appeared during the Triassic period, between 243 and 233.23 million years ago, although the exact origin and timing of the evolution of dinosaurs is a subject of active research.</_1.TextView>
|
|
280
|
+
|
|
281
|
+
<_1.TextView>Dinosaurs are a diverse group of reptiles of the clade Dinosauria. They first appeared during the Triassic period, between 243 and 233.23 million years ago, although the exact origin and timing of the evolution of dinosaurs is a subject of active research.</_1.TextView>
|
|
282
|
+
<_1.Expand title='Types' initialExpand={false} style={{
|
|
283
|
+
padding: 0,
|
|
284
|
+
backgroundColor: theme.colors.forground
|
|
285
|
+
}} titleBackgroundColor={theme.colors.forground}>
|
|
286
|
+
<_1.VBox>
|
|
287
|
+
<Message_1.AlertMessage text={alert} onDismiss={() => {
|
|
288
|
+
react_native_1.LayoutAnimation.configureNext(react_native_1.LayoutAnimation.Presets.easeInEaseOut);
|
|
289
|
+
setAlert('');
|
|
290
|
+
}}/>
|
|
291
|
+
<Message_1.AlertMessage text='Tyrannosaurus rex' type='critical'/>
|
|
292
|
+
<Message_1.AlertMessage text='Spinosaurus' type='success'/>
|
|
293
|
+
<Message_1.AlertMessage text='Ankylosaurs' type='warning'/>
|
|
294
|
+
</_1.VBox>
|
|
295
|
+
|
|
296
|
+
</_1.Expand>
|
|
297
|
+
</Modal_1.BottomSheet>
|
|
298
|
+
</_1.VBox>
|
|
299
|
+
</react_native_safe_area_context_1.SafeAreaProvider>);
|
|
300
|
+
}
|
|
301
|
+
exports.DemoScreen = DemoScreen;
|
|
302
|
+
//# sourceMappingURL=demo.js.map
|
package/src/demo.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demo.js","sourceRoot":"","sources":["demo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAoE;AACpE,6CAA8B;AAC9B,+CAA6D;AAC7D,wBAAuO;AACvO,iFAAyD;AACzD,mFAAkE;AAClE,uCAAyC;AACzC,mCAAsC;AACtC,mCAAuC;AACvC,mCAAuC;AACvC,gDAA+C;AAC/C,qCAAmD;AAMnD,SAAgB,UAAU,CAAC,EAAE,UAAU,EAAmB;IAExD,MAAM,KAAK,GAAU,IAAA,kBAAU,EAAC,eAAY,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IACxB,MAAM,OAAO,GAAG,CAAC,CAAC,qBAAW,CAAC,IAAI,CAAC,QAAQ,CACzC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,I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AI,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE;YACzC,8BAAe,CAAC,aAAa,CAAC,8BAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YACrE,QAAQ,CAAC,EAAE,CAAC,CAAA;QACd,CAAC,CAAC,EACF;cAAA,CAAC,sBAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,EACtD;cAAA,CAAC,sBAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAC/C;cAAA,CAAC,sBAAY,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EACjD;YAAA,EAAE,OAAI,CAER;;UAAA,EAAE,SAAM,CACV;QAAA,EAAE,mBAAW,CACf;MAAA,EAAE,OAAI,CACR;IAAA,EAAE,iDAAgB,CAAC,CACpB,CAAC;AACJ,CAAC;AA9WD,gCA8WC"}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './Text';
|
|
2
|
+
export * from './Box';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './Modal';
|
|
5
|
+
export * from './Image';
|
|
6
|
+
export * from './Input';
|
|
7
|
+
export * from './Bar';
|
|
8
|
+
export * from './utils';
|
|
9
|
+
export * from './Styles';
|
|
10
|
+
export * from './demo';
|
|
11
|
+
export * from './ThemeContext';
|
|
12
|
+
export * from './I18n';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Text"), exports);
|
|
18
|
+
__exportStar(require("./Box"), exports);
|
|
19
|
+
__exportStar(require("./Button"), exports);
|
|
20
|
+
__exportStar(require("./Modal"), exports);
|
|
21
|
+
__exportStar(require("./Image"), exports);
|
|
22
|
+
__exportStar(require("./Input"), exports);
|
|
23
|
+
__exportStar(require("./Bar"), exports);
|
|
24
|
+
__exportStar(require("./utils"), exports);
|
|
25
|
+
__exportStar(require("./Styles"), exports);
|
|
26
|
+
__exportStar(require("./demo"), exports);
|
|
27
|
+
__exportStar(require("./ThemeContext"), exports);
|
|
28
|
+
__exportStar(require("./I18n"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,wCAAsB;AACtB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,wCAAsB;AACtB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB;AACvB,iDAA+B;AAC/B,yCAAsB"}
|
package/src/utils.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function ReactWrapper(component: any): (props: any) => any;
|
|
2
|
+
export declare function randomColor(): undefined;
|
|
3
|
+
export declare function isWeb(): boolean;
|
|
4
|
+
export declare function isDesktop(): boolean;
|
|
5
|
+
export declare function assignFields(target: any, source: any, fields: string[], skipUndefined?: boolean): any;
|
package/src/utils.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assignFields = exports.isDesktop = exports.isWeb = exports.randomColor = exports.ReactWrapper = void 0;
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
const react_native_2 = require("react-native");
|
|
6
|
+
function ReactWrapper(component) {
|
|
7
|
+
return (props) => {
|
|
8
|
+
return component;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.ReactWrapper = ReactWrapper;
|
|
12
|
+
function randomColor() {
|
|
13
|
+
const letters = '0123456789ABCDEF';
|
|
14
|
+
let color = '#';
|
|
15
|
+
for (let i = 0; i < 6; i++) {
|
|
16
|
+
color += letters[Math.floor(Math.random() * 16)];
|
|
17
|
+
}
|
|
18
|
+
// return color;
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
exports.randomColor = randomColor;
|
|
22
|
+
function isWeb() {
|
|
23
|
+
return react_native_1.Platform.OS == 'web';
|
|
24
|
+
}
|
|
25
|
+
exports.isWeb = isWeb;
|
|
26
|
+
function isDesktop() {
|
|
27
|
+
const windowWidth = react_native_2.Dimensions.get('window').width;
|
|
28
|
+
const windowHeight = react_native_2.Dimensions.get('window').height;
|
|
29
|
+
return windowWidth > windowHeight;
|
|
30
|
+
}
|
|
31
|
+
exports.isDesktop = isDesktop;
|
|
32
|
+
function assignFields(target, source, fields, skipUndefined = true) {
|
|
33
|
+
if (!target)
|
|
34
|
+
target = {};
|
|
35
|
+
Object.keys(source || {}).forEach(k => {
|
|
36
|
+
if (fields?.indexOf(k) > -1) {
|
|
37
|
+
if (!skipUndefined && !source[k])
|
|
38
|
+
return;
|
|
39
|
+
target[k] = source[k];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
exports.assignFields = assignFields;
|
|
45
|
+
//# sourceMappingURL=utils.js.map
|
package/src/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,+CAA0C;AAG1C,SAAgB,YAAY,CAAC,SAAc;IACvC,OAAO,CAAC,KAAU,EAAE,EAAE;QAClB,OAAO,SAAS,CAAA;IACpB,CAAC,CAAA;AACL,CAAC;AAJD,oCAIC;AAED,SAAgB,WAAW;IACvB,MAAM,OAAO,GAAG,kBAAkB,CAAC;IACnC,IAAI,KAAK,GAAG,GAAG,CAAC;IAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB;IAChB,OAAO,SAAS,CAAC;AACrB,CAAC;AAVD,kCAUC;AAED,SAAgB,KAAK;IACjB,OAAO,uBAAQ,CAAC,EAAE,IAAI,KAAK,CAAA;AAC/B,CAAC;AAFD,sBAEC;AAGD,SAAgB,SAAS;IACrB,MAAM,WAAW,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACnD,MAAM,YAAY,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IACrD,OAAO,WAAW,GAAG,YAAY,CAAA;AACrC,CAAC;AAJD,8BAIC;AAED,SAAgB,YAAY,CACxB,MAAW,EACX,MAAW,EACX,MAAgB,EAChB,gBAAyB,IAAI;IAC7B,IAAI,CAAC,MAAM;QACP,MAAM,GAAG,EAAE,CAAA;IACf,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,E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