react-native-boxes 1.2.5 → 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.
Files changed (50) hide show
  1. package/package.json +2 -2
  2. package/src/Bar.d.ts +2 -0
  3. package/src/Bar.js +3 -2
  4. package/src/Bar.js.map +1 -1
  5. package/src/Button.js +4 -3
  6. package/src/Button.js.map +1 -1
  7. package/src/Button.tsx +4 -3
  8. package/tsconfig.json +1 -1
  9. package/dist/Bar.d.ts +0 -28
  10. package/dist/Bar.js +0 -168
  11. package/dist/Bar.js.map +0 -1
  12. package/dist/Box.d.ts +0 -14
  13. package/dist/Box.js +0 -112
  14. package/dist/Box.js.map +0 -1
  15. package/dist/Button.d.ts +0 -20
  16. package/dist/Button.js +0 -220
  17. package/dist/Button.js.map +0 -1
  18. package/dist/I18n.d.ts +0 -4
  19. package/dist/I18n.js +0 -7
  20. package/dist/I18n.js.map +0 -1
  21. package/dist/Image.d.ts +0 -21
  22. package/dist/Image.js +0 -79
  23. package/dist/Image.js.map +0 -1
  24. package/dist/Input.d.ts +0 -27
  25. package/dist/Input.js +0 -190
  26. package/dist/Input.js.map +0 -1
  27. package/dist/Message.d.ts +0 -7
  28. package/dist/Message.js +0 -97
  29. package/dist/Message.js.map +0 -1
  30. package/dist/Modal.d.ts +0 -22
  31. package/dist/Modal.js +0 -245
  32. package/dist/Modal.js.map +0 -1
  33. package/dist/Styles.d.ts +0 -119
  34. package/dist/Styles.js +0 -111
  35. package/dist/Styles.js.map +0 -1
  36. package/dist/Text.d.ts +0 -7
  37. package/dist/Text.js +0 -57
  38. package/dist/Text.js.map +0 -1
  39. package/dist/ThemeContext.d.ts +0 -110
  40. package/dist/ThemeContext.js +0 -33
  41. package/dist/ThemeContext.js.map +0 -1
  42. package/dist/demo.d.ts +0 -5
  43. package/dist/demo.js +0 -302
  44. package/dist/demo.js.map +0 -1
  45. package/dist/index.d.ts +0 -12
  46. package/dist/index.js +0 -29
  47. package/dist/index.js.map +0 -1
  48. package/dist/utils.d.ts +0 -5
  49. package/dist/utils.js +0 -45
  50. package/dist/utils.js.map +0 -1
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,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AAiB,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;
package/dist/Image.js DELETED
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getIcon = exports.Avatar = exports.Icon = void 0;
7
- const react_native_1 = require("react-native");
8
- const FontAwesome_1 = __importDefault(require("@expo/vector-icons/FontAwesome"));
9
- const react_1 = require("react");
10
- const ThemeContext_1 = require("./ThemeContext");
11
- const Box_1 = require("./Box");
12
- const Text_1 = require("./Text");
13
- function Icon(props) {
14
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
15
- return (<FontAwesome_1.default {...props} size={props.size || theme.dimens?.icon?.md} color={props.color || theme.colors?.text}/>);
16
- }
17
- exports.Icon = Icon;
18
- /**
19
- *
20
- * @param props provide one of iconUrl , iconName , iconText
21
- * @returns
22
- */
23
- function Avatar(props) {
24
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
25
- const view = <Box_1.Center style={[{
26
- margin: theme.dimens.space.sm,
27
- overflow: 'hidden',
28
- borderRadius: 100,
29
- width: theme.dimens.icon.xl,
30
- height: theme.dimens.icon.xl,
31
- borderWidth: theme.dimens.space.xs * 2,
32
- borderStyle: 'solid',
33
- borderColor: theme.colors.accentLight,
34
- backgroundColor: theme.colors.forground,
35
- }, props.style]}>
36
- <Box_1.Center style={{
37
- width: '110%',
38
- height: '110%',
39
- }}>
40
- {(() => {
41
- if (props.iconUrl)
42
- return (<react_native_1.Image style={{
43
- width: '120%',
44
- height: '120%',
45
- }} source={{
46
- uri: props.iconUrl,
47
- }}/>);
48
- if (props.iconName || props.iconNameProps?.name)
49
- return (<Icon name={props.iconName || props.iconNameProps?.name} {...props.iconNameProps}/>);
50
- if (props.iconText)
51
- return (<Text_1.Subtitle style={{
52
- color: props.style?.color || theme.colors.accentLight,
53
- }}>{props.iconText?.substring(0, 2)}</Text_1.Subtitle>);
54
- })()}
55
- </Box_1.Center>
56
- </Box_1.Center>;
57
- if (props.onPress)
58
- return (<react_native_1.Pressable onPress={() => {
59
- if (props.onPress)
60
- props.onPress();
61
- }}>
62
- {view}
63
- </react_native_1.Pressable>);
64
- return view;
65
- }
66
- exports.Avatar = Avatar;
67
- function getIcon(input) {
68
- if (input == undefined) {
69
- return undefined;
70
- }
71
- if (typeof input == 'string') {
72
- return (props) => {
73
- return (<Icon {...props} name={props.name || input}/>);
74
- };
75
- }
76
- return input;
77
- }
78
- exports.getIcon = getIcon;
79
- //# sourceMappingURL=Image.js.map
package/dist/Image.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":";;;;;;AAAA,+CAA2D;AAC3D,iFAAyD;AACzD,iCAAmC;AACnC,iDAA8C;AAC9C,+BAA+B;AAC/B,iCAAkC;AAOlC,SAAgB,IAAI,CAAC,KAA4B;IAC7C,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,OAAO,CACH,CAAC,qBAAW,CAAC,IAAI,KAAK,CAAC,CACnB,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAC3C,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,EAC3C,CACL,CAAA;AACL,CAAC;AARD,oBAQC;AAGD;;;;GAIG;AACH,SAAgB,MAAM,CAAC,KAOtB;IACG,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,MAAM,I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b,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW;qBACxD,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,eAAQ,CAAC,CAClD,CAAA;QACT,CAAC,CAAC,EACN,CACJ;QAAA,EAAE,YAAM,CACZ;IAAA,EAAE,YAAM,CAAC,CAAA;IACT,IAAI,KAAK,CAAC,OAAO;QACb,OAAO,CACH,CAAC,wBAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE;gBACrB,IAAI,KAAK,CAAC,OAAO;oBACb,KAAK,CAAC,OAAO,EAAE,CAAA;YACvB,CAAC,CAAC,CACE;gBAAA,CAAC,IAAI,CACT;YAAA,EAAE,wBAAS,CAAC,CACf,CAAA;IACL,OAAO,IAAI,CAAA;AACf,CAAC;AA/DD,wBA+DC;AAGD,SAAgB,OAAO,CAAC,KAAU;IAC9B,IAAI,KAAK,IAAI,SAAS,EAAE,CAAC;QACrB,OAAO,SAAS,CAAA;IACpB,CAAC;IACD,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,KAAgB,EAAE,EAAE;YACxB,OAAO,CACH,CAAC,IAAI,CAAE,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAG,CAClD,CAAA;QACL,CAAC,CAAA;IACL,CAAC;IACD,OAAO,KAAK,CAAA;AAChB,CAAC;AAZD,0BAYC"}
package/dist/Input.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import { GestureResponderEvent, TextInputProps } from "react-native";
2
- /**
3
- *
4
- * @param initialText if you use initialText then you dont need to maintain the 2 way binding between value and setValue, just enjoy props.onChangeText events
5
- * @returns
6
- */
7
- export declare function TextInputView(props: TextInputProps & {
8
- initialText?: string;
9
- pattern?: string;
10
- }): import("react").JSX.Element;
11
- /**
12
- * Note: if input is inside a ScrollView in heirarchy anywhere then add keyboardShouldPersistTaps={'handled'}
13
- * to the scrollview else the icon click wont work
14
- * In case, you textinput is getting hidden due to keyboard see https://stackoverflow.com/a/77563800/6865753
15
-
16
- * @param props
17
- * @returns
18
- */
19
- export declare function CompositeTextInputView(props: TextInputProps & {
20
- hint?: string;
21
- alertText?: string;
22
- alertTextColor?: string;
23
- pattern?: string;
24
- initialText?: string;
25
- icon?: 'close' | 'eye' | string | React.Component;
26
- onIconPress?: ((event: GestureResponderEvent) => void) | undefined;
27
- }): import("react").JSX.Element;
package/dist/Input.js DELETED
@@ -1,190 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompositeTextInputView = exports.TextInputView = void 0;
4
- const react_1 = require("react");
5
- const react_native_1 = require("react-native");
6
- const ThemeContext_1 = require("./ThemeContext");
7
- const utils_1 = require("./utils");
8
- const Box_1 = require("./Box");
9
- const Text_1 = require("./Text");
10
- const Image_1 = require("./Image");
11
- /**
12
- *
13
- * @param initialText if you use initialText then you dont need to maintain the 2 way binding between value and setValue, just enjoy props.onChangeText events
14
- * @returns
15
- */
16
- function TextInputView(props) {
17
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
18
- const [text, setText] = (0, react_1.useState)(props.initialText);
19
- const [focused, setFocused] = (0, react_1.useState)(false);
20
- function onTextChange(newText) {
21
- setText(newText);
22
- props.onChangeText && props.onChangeText(newText);
23
- }
24
- return (<react_native_1.TextInput {...props} onFocus={(e) => {
25
- setFocused(true);
26
- props.onFocus && props.onFocus(e);
27
- }} onBlur={(e) => {
28
- setFocused(false);
29
- props.onBlur && props.onBlur(e);
30
- }} value={props.value || text} onChangeText={(newText) => {
31
- if (props.pattern) {
32
- const re = new RegExp(props.pattern);
33
- if (newText === "" || re.test(newText)) {
34
- onTextChange(newText);
35
- }
36
- }
37
- else {
38
- onTextChange(newText);
39
- }
40
- }} style={[{
41
- color: theme.colors.text,
42
- textAlignVertical: "top",
43
- width: 'auto',
44
- fontSize: theme.dimens.font.md,
45
- fontFamily: theme.fonts.Regular,
46
- padding: theme.dimens.space.md,
47
- paddingStart: theme.dimens.space.md,
48
- paddingBottom: (0, utils_1.isWeb)() ? theme.dimens.space.md : theme.dimens.space.sm / 2,
49
- margin: theme.dimens.space.sm,
50
- borderWidth: focused ? 1.5 : 1.5,
51
- borderRadius: theme.dimens.space.sm,
52
- borderColor: !focused ? theme.colors.caption : theme.colors.accent
53
- }, (0, utils_1.isWeb)() ? {
54
- //@ts-ignore
55
- outline: 'none',
56
- } : {},
57
- props.style]}/>);
58
- }
59
- exports.TextInputView = TextInputView;
60
- /**
61
- * Note: if input is inside a ScrollView in heirarchy anywhere then add keyboardShouldPersistTaps={'handled'}
62
- * to the scrollview else the icon click wont work
63
- * In case, you textinput is getting hidden due to keyboard see https://stackoverflow.com/a/77563800/6865753
64
-
65
- * @param props
66
- * @returns
67
- */
68
- function CompositeTextInputView(props) {
69
- const theme = (0, react_1.useContext)(ThemeContext_1.ThemeContext);
70
- const [text, setText] = (0, react_1.useState)(props.initialText);
71
- const [alerttext, setAlertText] = (0, react_1.useState)(props.alertText);
72
- const [focused, setFocused] = (0, react_1.useState)(false);
73
- function onTextChange(newText) {
74
- setText(newText);
75
- props.onChangeText && props.onChangeText(newText);
76
- }
77
- const fontStyles = (0, utils_1.assignFields)({}, props.style, [
78
- "returnKeyType",
79
- "keyboardType",
80
- "textContentType",
81
- "multiline",
82
- "fontFamily",
83
- "fontSize",
84
- "fontWeight",
85
- "fontVariant",
86
- "color",
87
- "inputMode"
88
- ]);
89
- var hintVisible = false;
90
- if (props.placeholder && props.placeholder.length > 0 && focused) {
91
- hintVisible = true;
92
- }
93
- if (!focused && text && text.length > 0) {
94
- hintVisible = true;
95
- }
96
- if (!props.placeholder) {
97
- hintVisible = false;
98
- }
99
- // (focused || ((text ||
100
- // props.value == undefined ? props.placeholder : props.value || ''
101
- // )?.length || 0) > 0)
102
- // if (!hintVisible && props.placeholder != undefined && props.placeholder?.length > 0 && text != undefined && text?.length > 0) {
103
- // hintVisible = false
104
- // }
105
- const alertVisible = alerttext && alerttext.length;
106
- (0, react_1.useEffect)(() => {
107
- setText(props.value);
108
- }, [props.value]);
109
- (0, react_1.useEffect)(() => {
110
- setAlertText(props.alertText);
111
- }, [props.alertText]);
112
- //@ts-ignore
113
- const IconComponent = typeof props.icon == 'string' ? (<Image_1.Icon color={!focused ? theme.colors.caption : theme.colors.accent} style={{
114
- minWidth: (0, utils_1.isWeb)() ? theme.dimens.icon.lg : theme.dimens.icon.sm,
115
- padding: theme.dimens.space.sm / 2,
116
- }} name={props.icon}/>) : props.icon;
117
- return (<Box_1.HBox style={[{
118
- paddingEnd: theme.dimens.space.md,
119
- justifyContent: 'space-between',
120
- alignItems: 'center',
121
- padding: 0,
122
- paddingStart: theme.dimens.space.sm * 1.5,
123
- margin: theme.dimens.space.sm,
124
- borderWidth: 1.5,
125
- borderRadius: theme.dimens.space.sm,
126
- borderColor: !focused ? theme.colors.caption : theme.colors.accent,
127
- }, (!hintVisible && !alertVisible) ? {
128
- paddingTop: theme.dimens.space.sm,
129
- paddingBottom: theme.dimens.space.sm
130
- } : {}, props.style]}>
131
-
132
-
133
- <Box_1.VBox style={[{
134
- flex: 1,
135
- paddingBottom: alertVisible ? 0 : theme.dimens.space.sm
136
- }, hintVisible ? {} : {
137
- paddingTop: theme.dimens.space.sm
138
- }]}>
139
- {hintVisible && <Text_1.TextView style={{
140
- padding: 0,
141
- margin: 0,
142
- fontSize: theme.dimens.font.sm,
143
- color: !focused ? theme.colors.caption : theme.colors.accent,
144
- }}>{props.placeholder}</Text_1.TextView>}
145
- <react_native_1.TextInput selectionColor={props.selectionColor || theme.colors.accent} secureTextEntry={props.secureTextEntry} placeholderTextColor={theme.colors.caption} placeholder={hintVisible ? '' : theme.i18n?.t(props.placeholder) || props.placeholder} keyboardType={props.keyboardType} returnKeyType={props.returnKeyType || 'default'} onFocus={(e) => {
146
- setFocused(true);
147
- props.onFocus && props.onFocus(e);
148
- }} onBlur={(e) => {
149
- setFocused(false);
150
- props.onBlur && props.onBlur(e);
151
- }} value={props.value || text} onChangeText={(newText) => {
152
- if (props.pattern) {
153
- const re = new RegExp(props.pattern);
154
- if (newText === "" || re.test(newText)) {
155
- onTextChange(newText);
156
- }
157
- }
158
- else {
159
- onTextChange(newText);
160
- }
161
- }} style={[{
162
- color: theme.colors.text,
163
- fontSize: theme.dimens.font.md,
164
- fontFamily: theme.fonts.Regular,
165
- }, (0, utils_1.isWeb)() ? {
166
- //@ts-ignore
167
- outline: 'none',
168
- } : {}, fontStyles]}/>
169
- {alertVisible && <Text_1.TextView style={{
170
- color: props.alertTextColor || theme.colors.critical,
171
- padding: 0,
172
- margin: 0,
173
- paddingBottom: theme.dimens.space.sm,
174
- fontSize: theme.dimens.font.sm,
175
- }}>{alerttext}</Text_1.TextView>}
176
- </Box_1.VBox>
177
- {props.icon != undefined &&
178
- <react_native_1.TouchableOpacity onPress={(e) => {
179
- if (!props.onIconPress && props.icon == 'close') {
180
- onTextChange('');
181
- }
182
- props.onIconPress && props.onIconPress(e);
183
- }}>
184
- {(IconComponent)}
185
- </react_native_1.TouchableOpacity>}
186
-
187
- </Box_1.HBox>);
188
- }
189
- exports.CompositeTextInputView = CompositeTextInputView;
190
- //# sourceMappingURL=Input.js.map
package/dist/Input.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":";;;AAAA,iCAAmE;AACnE,+CAAkG;AAClG,iDAA8C;AAC9C,mCAA8C;AAC9C,+BAAmC;AACnC,iCAAkC;AAClC,mCAA+B;AAG/B;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAG7B;IACG,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,2BAAY,CAAC,CAAA;IACtC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,W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CAAC,CAAC;gBACT,YAAY;gBACZ,OAAO,EAAE,MAAM;aAClB,CAAC,CAAC,CAAC,EAEH,EAAE,UAAU,CAAC,CAAC,EAEnB;gBAAA,CACI,YAAY,IAAI,CAAC,eAAQ,CACrB,KAAK,CAAC,CAAC;gBACH,KAAK,EAAE,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ;gBACpD,OAAO,EAAE,CAAC;gBACV,MAAM,EAAE,CAAC;gBACT,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBACpC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;aACjC,CAAC,CACL,CAAC,SAAS,CAAC,EAAE,eAAQ,CAC1B,CACJ;YAAA,EAAE,UAAI,CACN;YAAA,CACI,KAAK,CAAC,IAAI,IAAI,SAAS;YACvB,CAAC,+BAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;oBAC7B,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC;wBAC9C,YAAY,CAAC,EAAE,CAAC,CAAA;oBACpB,CAAC;oBACD,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;gBAC7C,CAAC,CAAC,CACE;oBAAA,CACI,CAAC,aAAa,CAClB,CACJ;gBAAA,EAAE,+BAAgB,CACtB,CAEJ;;QAAA,EAAE,UAAI,CAAE,CACX,CAAA;AACL,CAAC;AApKD,wDAoKC"}
package/dist/Message.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import { ViewProps } from "react-native";
3
- export declare function AlertMessage(props: ViewProps & {
4
- text: string;
5
- type?: 'info' | 'success' | 'warning' | 'critical';
6
- onDismiss?: Function;
7
- }): React.JSX.Element | undefined;