@servesall/atoms 1.1.13 → 1.1.15
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/dist/bundle.cjs.js +17 -5
- package/dist/bundle.esm.js +17 -5
- package/dist/bundle.umd.js +17 -5
- package/package.json +1 -1
- package/src/Inputs/InputNormal/index.js +29 -18
- package/src/Theme/definitions/colors.js +6 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -235,8 +235,9 @@ var colors = {
|
|
|
235
235
|
color17: "#6c5ce7",
|
|
236
236
|
color18: "#81ecec",
|
|
237
237
|
darkYellow: "#fdcb6e",
|
|
238
|
-
darkYellowLight: "#
|
|
238
|
+
darkYellowLight: "#FFF7E8",
|
|
239
239
|
darkYellowDark: "#8C6F39",
|
|
240
|
+
darkYellowGray: "#ECE5D8",
|
|
240
241
|
green: "#55efc4",
|
|
241
242
|
greenLight: "#F3FFFC",
|
|
242
243
|
greenDark: "#236A56",
|
|
@@ -251,7 +252,11 @@ var colors = {
|
|
|
251
252
|
darkBlueLight: "#CFEAFF",
|
|
252
253
|
purple: "#6c5ce7",
|
|
253
254
|
purpleLight: "#F9F8FF",
|
|
254
|
-
purpleDark: "#372E78"
|
|
255
|
+
purpleDark: "#372E78",
|
|
256
|
+
orange: "#FFA15F",
|
|
257
|
+
orangeLight: "#FFFAF6",
|
|
258
|
+
orangeDark: "#3D1901",
|
|
259
|
+
orangeGray: "#EEE5DE"
|
|
255
260
|
};
|
|
256
261
|
|
|
257
262
|
var fonts = {
|
|
@@ -1361,7 +1366,9 @@ var Input = function Input(_ref) {
|
|
|
1361
1366
|
_ref$isRightBound = _ref.isRightBound,
|
|
1362
1367
|
isRightBound = _ref$isRightBound === void 0 ? false : _ref$isRightBound,
|
|
1363
1368
|
_ref$isLeftBound = _ref.isLeftBound,
|
|
1364
|
-
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound
|
|
1369
|
+
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound,
|
|
1370
|
+
_ref$euro = _ref.euro,
|
|
1371
|
+
euro = _ref$euro === void 0 ? false : _ref$euro;
|
|
1365
1372
|
|
|
1366
1373
|
var _useState = React.useState(false),
|
|
1367
1374
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1403,7 +1410,12 @@ var Input = function Input(_ref) {
|
|
|
1403
1410
|
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1404
1411
|
}, /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React__default["default"].createElement(H4Text, {
|
|
1405
1412
|
color: borderColorError
|
|
1406
|
-
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(
|
|
1413
|
+
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(Row, null, euro && (isFocused || textValue && textValue.length > 0 || value && value.length > 0) && /*#__PURE__*/React__default["default"].createElement(Row, {
|
|
1414
|
+
style: {
|
|
1415
|
+
minHeight: 40,
|
|
1416
|
+
alignItems: "center"
|
|
1417
|
+
}
|
|
1418
|
+
}, euro), /*#__PURE__*/React__default["default"].createElement(InputElement$1, {
|
|
1407
1419
|
ref: inputRef,
|
|
1408
1420
|
onFocus: function onFocus() {
|
|
1409
1421
|
return setIsFocused(true);
|
|
@@ -1425,7 +1437,7 @@ var Input = function Input(_ref) {
|
|
|
1425
1437
|
active: isFocused,
|
|
1426
1438
|
style: style,
|
|
1427
1439
|
returnKeyType: "done"
|
|
1428
|
-
})))));
|
|
1440
|
+
}))))));
|
|
1429
1441
|
};
|
|
1430
1442
|
|
|
1431
1443
|
var _templateObject$i, _templateObject2$9, _templateObject3$3;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -222,8 +222,9 @@ var colors = {
|
|
|
222
222
|
color17: "#6c5ce7",
|
|
223
223
|
color18: "#81ecec",
|
|
224
224
|
darkYellow: "#fdcb6e",
|
|
225
|
-
darkYellowLight: "#
|
|
225
|
+
darkYellowLight: "#FFF7E8",
|
|
226
226
|
darkYellowDark: "#8C6F39",
|
|
227
|
+
darkYellowGray: "#ECE5D8",
|
|
227
228
|
green: "#55efc4",
|
|
228
229
|
greenLight: "#F3FFFC",
|
|
229
230
|
greenDark: "#236A56",
|
|
@@ -238,7 +239,11 @@ var colors = {
|
|
|
238
239
|
darkBlueLight: "#CFEAFF",
|
|
239
240
|
purple: "#6c5ce7",
|
|
240
241
|
purpleLight: "#F9F8FF",
|
|
241
|
-
purpleDark: "#372E78"
|
|
242
|
+
purpleDark: "#372E78",
|
|
243
|
+
orange: "#FFA15F",
|
|
244
|
+
orangeLight: "#FFFAF6",
|
|
245
|
+
orangeDark: "#3D1901",
|
|
246
|
+
orangeGray: "#EEE5DE"
|
|
242
247
|
};
|
|
243
248
|
|
|
244
249
|
var fonts = {
|
|
@@ -1348,7 +1353,9 @@ var Input = function Input(_ref) {
|
|
|
1348
1353
|
_ref$isRightBound = _ref.isRightBound,
|
|
1349
1354
|
isRightBound = _ref$isRightBound === void 0 ? false : _ref$isRightBound,
|
|
1350
1355
|
_ref$isLeftBound = _ref.isLeftBound,
|
|
1351
|
-
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound
|
|
1356
|
+
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound,
|
|
1357
|
+
_ref$euro = _ref.euro,
|
|
1358
|
+
euro = _ref$euro === void 0 ? false : _ref$euro;
|
|
1352
1359
|
|
|
1353
1360
|
var _useState = useState(false),
|
|
1354
1361
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1390,7 +1397,12 @@ var Input = function Input(_ref) {
|
|
|
1390
1397
|
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1391
1398
|
}, /*#__PURE__*/React.createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React.createElement(H4Text, {
|
|
1392
1399
|
color: borderColorError
|
|
1393
|
-
}, error || hasError))), /*#__PURE__*/React.createElement(MarginHorizontal, null, /*#__PURE__*/React.createElement(
|
|
1400
|
+
}, error || hasError))), /*#__PURE__*/React.createElement(MarginHorizontal, null, /*#__PURE__*/React.createElement(Row, null, euro && (isFocused || textValue && textValue.length > 0 || value && value.length > 0) && /*#__PURE__*/React.createElement(Row, {
|
|
1401
|
+
style: {
|
|
1402
|
+
minHeight: 40,
|
|
1403
|
+
alignItems: "center"
|
|
1404
|
+
}
|
|
1405
|
+
}, euro), /*#__PURE__*/React.createElement(InputElement$1, {
|
|
1394
1406
|
ref: inputRef,
|
|
1395
1407
|
onFocus: function onFocus() {
|
|
1396
1408
|
return setIsFocused(true);
|
|
@@ -1412,7 +1424,7 @@ var Input = function Input(_ref) {
|
|
|
1412
1424
|
active: isFocused,
|
|
1413
1425
|
style: style,
|
|
1414
1426
|
returnKeyType: "done"
|
|
1415
|
-
})))));
|
|
1427
|
+
}))))));
|
|
1416
1428
|
};
|
|
1417
1429
|
|
|
1418
1430
|
var _templateObject$i, _templateObject2$9, _templateObject3$3;
|
package/dist/bundle.umd.js
CHANGED
|
@@ -227,8 +227,9 @@
|
|
|
227
227
|
color17: "#6c5ce7",
|
|
228
228
|
color18: "#81ecec",
|
|
229
229
|
darkYellow: "#fdcb6e",
|
|
230
|
-
darkYellowLight: "#
|
|
230
|
+
darkYellowLight: "#FFF7E8",
|
|
231
231
|
darkYellowDark: "#8C6F39",
|
|
232
|
+
darkYellowGray: "#ECE5D8",
|
|
232
233
|
green: "#55efc4",
|
|
233
234
|
greenLight: "#F3FFFC",
|
|
234
235
|
greenDark: "#236A56",
|
|
@@ -243,7 +244,11 @@
|
|
|
243
244
|
darkBlueLight: "#CFEAFF",
|
|
244
245
|
purple: "#6c5ce7",
|
|
245
246
|
purpleLight: "#F9F8FF",
|
|
246
|
-
purpleDark: "#372E78"
|
|
247
|
+
purpleDark: "#372E78",
|
|
248
|
+
orange: "#FFA15F",
|
|
249
|
+
orangeLight: "#FFFAF6",
|
|
250
|
+
orangeDark: "#3D1901",
|
|
251
|
+
orangeGray: "#EEE5DE"
|
|
247
252
|
};
|
|
248
253
|
|
|
249
254
|
var fonts = {
|
|
@@ -1353,7 +1358,9 @@
|
|
|
1353
1358
|
_ref$isRightBound = _ref.isRightBound,
|
|
1354
1359
|
isRightBound = _ref$isRightBound === void 0 ? false : _ref$isRightBound,
|
|
1355
1360
|
_ref$isLeftBound = _ref.isLeftBound,
|
|
1356
|
-
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound
|
|
1361
|
+
isLeftBound = _ref$isLeftBound === void 0 ? false : _ref$isLeftBound,
|
|
1362
|
+
_ref$euro = _ref.euro,
|
|
1363
|
+
euro = _ref$euro === void 0 ? false : _ref$euro;
|
|
1357
1364
|
|
|
1358
1365
|
var _useState = React.useState(false),
|
|
1359
1366
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1395,7 +1402,12 @@
|
|
|
1395
1402
|
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1396
1403
|
}, /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React__default["default"].createElement(H4Text, {
|
|
1397
1404
|
color: borderColorError
|
|
1398
|
-
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(
|
|
1405
|
+
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(Row, null, euro && (isFocused || textValue && textValue.length > 0 || value && value.length > 0) && /*#__PURE__*/React__default["default"].createElement(Row, {
|
|
1406
|
+
style: {
|
|
1407
|
+
minHeight: 40,
|
|
1408
|
+
alignItems: "center"
|
|
1409
|
+
}
|
|
1410
|
+
}, euro), /*#__PURE__*/React__default["default"].createElement(InputElement$1, {
|
|
1399
1411
|
ref: inputRef,
|
|
1400
1412
|
onFocus: function onFocus() {
|
|
1401
1413
|
return setIsFocused(true);
|
|
@@ -1417,7 +1429,7 @@
|
|
|
1417
1429
|
active: isFocused,
|
|
1418
1430
|
style: style,
|
|
1419
1431
|
returnKeyType: "done"
|
|
1420
|
-
})))));
|
|
1432
|
+
}))))));
|
|
1421
1433
|
};
|
|
1422
1434
|
|
|
1423
1435
|
var _templateObject$i, _templateObject2$9, _templateObject3$3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from "react";
|
|
2
2
|
import { H4 } from "../../Text";
|
|
3
|
-
import { MarginHorizontal } from "../../Layout";
|
|
3
|
+
import { MarginHorizontal, Row } from "../../Layout";
|
|
4
4
|
import { KeyboardAvoidingView, Platform } from "react-native";
|
|
5
5
|
import { InputWrapper, InputElement, BorderWrapper } from "./Animated.style";
|
|
6
6
|
import Placeholder from "./Placeholder";
|
|
@@ -26,6 +26,7 @@ const Input = ({
|
|
|
26
26
|
error,
|
|
27
27
|
isRightBound = false,
|
|
28
28
|
isLeftBound = false,
|
|
29
|
+
euro = false,
|
|
29
30
|
}) => {
|
|
30
31
|
const [isFocused, setIsFocused] = useState(false);
|
|
31
32
|
const [textValue, setTextValue] = useState(value || defaultValue);
|
|
@@ -80,23 +81,33 @@ const Input = ({
|
|
|
80
81
|
</Placeholder>
|
|
81
82
|
|
|
82
83
|
<MarginHorizontal>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
84
|
+
<Row>
|
|
85
|
+
{euro &&
|
|
86
|
+
(isFocused ||
|
|
87
|
+
(textValue && textValue.length > 0) ||
|
|
88
|
+
(value && value.length > 0)) && (
|
|
89
|
+
<Row style={{ minHeight: 40, alignItems: "center" }}>
|
|
90
|
+
{euro}
|
|
91
|
+
</Row>
|
|
92
|
+
)}
|
|
93
|
+
<InputElement
|
|
94
|
+
ref={inputRef}
|
|
95
|
+
onFocus={() => setIsFocused(true)}
|
|
96
|
+
onBlur={() => setIsFocused(false)}
|
|
97
|
+
onChangeText={(text) => setTextValue(text)}
|
|
98
|
+
defaultValue={defaultValue}
|
|
99
|
+
value={value}
|
|
100
|
+
multiline={multiline}
|
|
101
|
+
numberOfLines={numberOfLines}
|
|
102
|
+
maxLength={maxLength}
|
|
103
|
+
autoFocus={autoFocus}
|
|
104
|
+
keyboardType={keyboardType}
|
|
105
|
+
editable={editable}
|
|
106
|
+
active={isFocused}
|
|
107
|
+
style={style}
|
|
108
|
+
returnKeyType="done"
|
|
109
|
+
/>
|
|
110
|
+
</Row>
|
|
100
111
|
</MarginHorizontal>
|
|
101
112
|
</BorderWrapper>
|
|
102
113
|
</InputWrapper>
|
|
@@ -30,8 +30,9 @@ const colors = {
|
|
|
30
30
|
color17: "#6c5ce7",
|
|
31
31
|
color18: "#81ecec",
|
|
32
32
|
darkYellow: "#fdcb6e",
|
|
33
|
-
darkYellowLight: "#
|
|
33
|
+
darkYellowLight: "#FFF7E8",
|
|
34
34
|
darkYellowDark: "#8C6F39",
|
|
35
|
+
darkYellowGray: "#ECE5D8",
|
|
35
36
|
green: "#55efc4",
|
|
36
37
|
greenLight: "#F3FFFC",
|
|
37
38
|
greenDark: "#236A56",
|
|
@@ -47,5 +48,9 @@ const colors = {
|
|
|
47
48
|
purple: "#6c5ce7",
|
|
48
49
|
purpleLight: "#F9F8FF",
|
|
49
50
|
purpleDark: "#372E78",
|
|
51
|
+
orange: "#FFA15F",
|
|
52
|
+
orangeLight: "#FFFAF6",
|
|
53
|
+
orangeDark: "#3D1901",
|
|
54
|
+
orangeGray: "#EEE5DE",
|
|
50
55
|
};
|
|
51
56
|
export default colors;
|