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/Text.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Caption = exports.Title = exports.Subtitle = exports.TextView = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
const ThemeContext_1 = require("./ThemeContext");
|
|
7
|
-
function TextView(props) {
|
|
8
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
9
|
-
let children = props.children;
|
|
10
|
-
if (theme.i18n && !props.skipI18n) {
|
|
11
|
-
if (children && typeof children == 'string') {
|
|
12
|
-
children = theme.i18n.t(children);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return (<react_native_1.Text {...props} style={[{
|
|
16
|
-
flexWrap: 'wrap',
|
|
17
|
-
color: theme.colors.text,
|
|
18
|
-
padding: theme.dimens.space.sm
|
|
19
|
-
}, theme.styles.text, props.style]}>
|
|
20
|
-
{children}
|
|
21
|
-
</react_native_1.Text>);
|
|
22
|
-
}
|
|
23
|
-
exports.TextView = TextView;
|
|
24
|
-
function Subtitle(props) {
|
|
25
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
26
|
-
return (<TextView {...props} style={[
|
|
27
|
-
{
|
|
28
|
-
fontSize: theme.dimens.font.lg,
|
|
29
|
-
color: theme.colors.text
|
|
30
|
-
},
|
|
31
|
-
props.style
|
|
32
|
-
]}/>);
|
|
33
|
-
}
|
|
34
|
-
exports.Subtitle = Subtitle;
|
|
35
|
-
function Title(props) {
|
|
36
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
37
|
-
return (<TextView {...props} style={[
|
|
38
|
-
{
|
|
39
|
-
fontSize: theme.dimens.font.xl,
|
|
40
|
-
color: theme.colors.heading
|
|
41
|
-
},
|
|
42
|
-
props.style
|
|
43
|
-
]}/>);
|
|
44
|
-
}
|
|
45
|
-
exports.Title = Title;
|
|
46
|
-
function Caption(props) {
|
|
47
|
-
const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
|
|
48
|
-
return (<TextView {...props} style={[
|
|
49
|
-
{
|
|
50
|
-
fontSize: theme.dimens.font.sm,
|
|
51
|
-
color: theme.colors.caption
|
|
52
|
-
},
|
|
53
|
-
props.style
|
|
54
|
-
]}/>);
|
|
55
|
-
}
|
|
56
|
-
exports.Caption = Caption;
|
|
57
|
-
//# sourceMappingURL=Text.js.map
|
package/dist/Text.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../src/Text.tsx"],"names":[],"mappings":";;;AAAA,iCAAmC;AACnC,+CAA+C;AAC/C,iDAA8C;AAE9C,SAAgB,QAAQ,CAAC,KAExB;IACG,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,IAAI,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IAC7B,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,QAAQ,IAAI,OAAO,QAAQ,IAAI,QAAQ,EAAE,CAAC;YAC1C,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;QACrC,CAAC;IACL,CAAC;IACD,OAAO,CACH,CAAC,mBAAI,CAAC,IAAI,KAAK,CAAC,CACZ,KAAK,CAAC,CAAC,CAAC;gBACJ,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;gBACxB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;aACjC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CACnC;YAAA,CAAC,QAAQ,CACb;QAAA,EAAE,mBAAI,CAAC,CACV,CAAA;AACL,CAAC;AApBD,4BAoBC;AAGD,SAAgB,QAAQ,CAAC,KAA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} from "./I18n";
|
|
4
|
-
import { EdgeInsets } from "react-native-safe-area-context";
|
|
5
|
-
declare const DEFAULT_STYLE: {
|
|
6
|
-
safeAreaInset: {
|
|
7
|
-
top: number;
|
|
8
|
-
left: number;
|
|
9
|
-
right: number;
|
|
10
|
-
bottom: number;
|
|
11
|
-
};
|
|
12
|
-
container: {
|
|
13
|
-
marginTop: number;
|
|
14
|
-
backgroundColor: string;
|
|
15
|
-
};
|
|
16
|
-
center: {
|
|
17
|
-
alignContent: "center";
|
|
18
|
-
justifyContent: "center";
|
|
19
|
-
};
|
|
20
|
-
textHead: {
|
|
21
|
-
color: string;
|
|
22
|
-
fontSize: number;
|
|
23
|
-
};
|
|
24
|
-
text: {
|
|
25
|
-
fontFamily: string;
|
|
26
|
-
fontSize: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare class Theme {
|
|
30
|
-
appname: string;
|
|
31
|
-
styles: typeof DEFAULT_STYLE;
|
|
32
|
-
dimens: typeof Dimens;
|
|
33
|
-
colors: typeof Colors;
|
|
34
|
-
fonts: typeof Fonts;
|
|
35
|
-
i18n: I18n;
|
|
36
|
-
insets?: EdgeInsets;
|
|
37
|
-
randomColor: typeof randomColor;
|
|
38
|
-
constructor(appname?: string, colors?: {
|
|
39
|
-
accent: string;
|
|
40
|
-
accentLight: string;
|
|
41
|
-
text: string;
|
|
42
|
-
caption: string;
|
|
43
|
-
heading: string;
|
|
44
|
-
background: string;
|
|
45
|
-
forground: string;
|
|
46
|
-
transparent: string;
|
|
47
|
-
semitransparent: string;
|
|
48
|
-
info: string;
|
|
49
|
-
success: string;
|
|
50
|
-
warning: string;
|
|
51
|
-
critical: string;
|
|
52
|
-
invert: {
|
|
53
|
-
text: string;
|
|
54
|
-
caption: string;
|
|
55
|
-
heading: string;
|
|
56
|
-
background: string;
|
|
57
|
-
};
|
|
58
|
-
}, dimens?: {
|
|
59
|
-
space: {
|
|
60
|
-
xs: number;
|
|
61
|
-
sm: number;
|
|
62
|
-
md: number;
|
|
63
|
-
lg: number;
|
|
64
|
-
xl: number;
|
|
65
|
-
};
|
|
66
|
-
font: {
|
|
67
|
-
sm: number;
|
|
68
|
-
md: number;
|
|
69
|
-
lg: number;
|
|
70
|
-
xl: number;
|
|
71
|
-
};
|
|
72
|
-
icon: {
|
|
73
|
-
sm: number;
|
|
74
|
-
md: number;
|
|
75
|
-
lg: number;
|
|
76
|
-
xl: number;
|
|
77
|
-
xxl: number;
|
|
78
|
-
};
|
|
79
|
-
}, fonts?: {
|
|
80
|
-
Regular: string;
|
|
81
|
-
Bold: string;
|
|
82
|
-
Styled: string;
|
|
83
|
-
}, styles?: {
|
|
84
|
-
safeAreaInset: {
|
|
85
|
-
top: number;
|
|
86
|
-
left: number;
|
|
87
|
-
right: number;
|
|
88
|
-
bottom: number;
|
|
89
|
-
};
|
|
90
|
-
container: {
|
|
91
|
-
marginTop: number;
|
|
92
|
-
backgroundColor: string;
|
|
93
|
-
};
|
|
94
|
-
center: {
|
|
95
|
-
alignContent: "center";
|
|
96
|
-
justifyContent: "center";
|
|
97
|
-
};
|
|
98
|
-
textHead: {
|
|
99
|
-
color: string;
|
|
100
|
-
fontSize: number;
|
|
101
|
-
};
|
|
102
|
-
text: {
|
|
103
|
-
fontFamily: string;
|
|
104
|
-
fontSize: number;
|
|
105
|
-
};
|
|
106
|
-
}, i18n?: I18n);
|
|
107
|
-
setInsets(insets: EdgeInsets): void;
|
|
108
|
-
}
|
|
109
|
-
export declare const ThemeContext: import("react").Context<Theme>;
|
|
110
|
-
export {};
|
package/dist/ThemeContext.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
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
|
package/dist/ThemeContext.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../src/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/dist/demo.d.ts
DELETED
package/dist/demo.js
DELETED
|
@@ -1,302 +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.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/dist/demo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../src/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,CA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C,IAAI,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/dist/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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/dist/index.js
DELETED
|
@@ -1,29 +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 __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/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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/dist/utils.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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/dist/utils.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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/dist/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/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,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