@servesall/atoms 1.1.21 → 1.1.23
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 +131 -54
- package/dist/bundle.esm.js +131 -54
- package/dist/bundle.umd.js +131 -54
- package/package.json +1 -1
- package/src/Buttons/RoundButton/RoundButton.style.js +11 -0
- package/src/Inputs/InputNormal/index.js +9 -6
- package/src/Layout/Box.js +2 -1
- package/src/Theme/definitions/colors.js +67 -54
package/dist/bundle.cjs.js
CHANGED
|
@@ -204,60 +204,121 @@ function _nonIterableRest() {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
var colors = {
|
|
207
|
+
// Whites & Grays
|
|
207
208
|
color1: "#FFFFFF",
|
|
209
|
+
// Pure white
|
|
210
|
+
color7: "#dfe6e9",
|
|
211
|
+
// Light gray
|
|
212
|
+
color8: "#F8F9FB",
|
|
213
|
+
// Very light gray
|
|
214
|
+
color10: "#F2F3F7",
|
|
215
|
+
// Another light gray
|
|
216
|
+
color16: "#636e72",
|
|
217
|
+
// Dark gray
|
|
218
|
+
greyText: "#b2bec3",
|
|
219
|
+
// Gray for text
|
|
220
|
+
greyButton: "#94A3A9",
|
|
221
|
+
// Gray for buttons
|
|
208
222
|
color2: "#2d3436",
|
|
223
|
+
// Almost black
|
|
224
|
+
// Blues
|
|
209
225
|
color3: "#74b9ff",
|
|
226
|
+
// Light blue
|
|
210
227
|
color3light: "#E1F0FF",
|
|
228
|
+
// Very light blue
|
|
211
229
|
color4: "#0984e3",
|
|
230
|
+
// Medium blue
|
|
231
|
+
blue: "#74b9ff",
|
|
232
|
+
// Light blue (duplicate)
|
|
233
|
+
blueLight: "#E1F0FF",
|
|
234
|
+
// Very light blue (duplicate)
|
|
235
|
+
darkBlue: "#0984e3",
|
|
236
|
+
// Medium blue (duplicate)
|
|
237
|
+
darkBlueLight: "#CFEAFF",
|
|
238
|
+
// Pale blue
|
|
239
|
+
color15: "#00cec9",
|
|
240
|
+
// Cyan
|
|
241
|
+
color18: "#81ecec",
|
|
242
|
+
// Light cyan
|
|
243
|
+
// Yellows
|
|
212
244
|
color5: "#ffeaa7",
|
|
245
|
+
// Light yellow
|
|
213
246
|
color5light: "#FFF9E5",
|
|
247
|
+
// Very light yellow
|
|
214
248
|
color5border: "#E4E0D2",
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
249
|
+
// Yellow border
|
|
250
|
+
darkYellow: "#fdcb6e",
|
|
251
|
+
// Dark yellow
|
|
252
|
+
darkYellowLight: "#FFF7E8",
|
|
253
|
+
// Light yellow
|
|
254
|
+
darkYellowDark: "#8C6F39",
|
|
255
|
+
// Brown yellow
|
|
256
|
+
darkYellowGray: "#ECE5D8",
|
|
257
|
+
// Grayish yellow
|
|
258
|
+
// Oranges & Browns
|
|
219
259
|
color9: "#FFA15F",
|
|
260
|
+
// Orange
|
|
220
261
|
color9light: "#F9F0EA",
|
|
262
|
+
// Light orange
|
|
221
263
|
color9dark: "#804F2D",
|
|
264
|
+
// Dark brown
|
|
222
265
|
color9border: "#DDD1C9",
|
|
223
|
-
|
|
266
|
+
// Orange border
|
|
267
|
+
color13: "#fab1a0",
|
|
268
|
+
// Peach
|
|
269
|
+
orange: "#FFA15F",
|
|
270
|
+
// Orange (duplicate)
|
|
271
|
+
orangeLight: "#FFFAF6",
|
|
272
|
+
// Light orange
|
|
273
|
+
orangeDark: "#3D1901",
|
|
274
|
+
// Very dark brown
|
|
275
|
+
orangeGray: "#EEE5DE",
|
|
276
|
+
// Grayish orange
|
|
277
|
+
// Reds
|
|
278
|
+
color6: "#ff7675",
|
|
279
|
+
// Red
|
|
280
|
+
color6light: "#FFDCDB",
|
|
281
|
+
// Light red
|
|
282
|
+
red: "#ff7675",
|
|
283
|
+
// Red (duplicate)
|
|
284
|
+
redlight: "#fff0ed",
|
|
285
|
+
// Very light red
|
|
286
|
+
redDark: "#9C4140",
|
|
287
|
+
// Dark red
|
|
288
|
+
redBorder: "#D2BBBB",
|
|
289
|
+
// Red border
|
|
290
|
+
// Greens
|
|
224
291
|
color11: "#00b894",
|
|
292
|
+
// Green
|
|
225
293
|
color11light: "#EEFFFC",
|
|
294
|
+
// Light green
|
|
226
295
|
color11border: "#D2E3E0",
|
|
296
|
+
// Green border
|
|
297
|
+
color14: "#00b894",
|
|
298
|
+
// Green (duplicate)
|
|
299
|
+
green: "#55efc4",
|
|
300
|
+
// Light green
|
|
301
|
+
greenLight: "#F3FFFC",
|
|
302
|
+
// Very light green
|
|
303
|
+
greenDark: "#236A56",
|
|
304
|
+
// Dark green
|
|
305
|
+
// Purples
|
|
227
306
|
color12: "#6c5ce7",
|
|
307
|
+
// Purple
|
|
228
308
|
color12light: "#F5F4FF",
|
|
309
|
+
// Light purple
|
|
229
310
|
color12border: "#DFDDEA",
|
|
311
|
+
// Purple border
|
|
230
312
|
color12dark: "#584E74",
|
|
231
|
-
|
|
232
|
-
color14: "#00b894",
|
|
233
|
-
color15: "#00cec9",
|
|
234
|
-
color16: "#636e72",
|
|
313
|
+
// Dark purple
|
|
235
314
|
color17: "#6c5ce7",
|
|
236
|
-
|
|
237
|
-
darkYellow: "#fdcb6e",
|
|
238
|
-
darkYellowLight: "#FFF7E8",
|
|
239
|
-
darkYellowDark: "#8C6F39",
|
|
240
|
-
darkYellowGray: "#ECE5D8",
|
|
241
|
-
green: "#55efc4",
|
|
242
|
-
greenLight: "#F3FFFC",
|
|
243
|
-
greenDark: "#236A56",
|
|
244
|
-
greyText: "#b2bec3",
|
|
245
|
-
greyButton: "#94A3A9",
|
|
246
|
-
red: "#ff7675",
|
|
247
|
-
redlight: "#FFFAF9",
|
|
248
|
-
redDark: "#9C4140",
|
|
249
|
-
redBorder: "#D2BBBB",
|
|
250
|
-
blue: "#74b9ff",
|
|
251
|
-
blueLight: "#E1F0FF",
|
|
252
|
-
darkBlue: "#0984e3",
|
|
253
|
-
darkBlueLight: "#CFEAFF",
|
|
315
|
+
// Purple (duplicate)
|
|
254
316
|
purple: "#6c5ce7",
|
|
317
|
+
// Purple (duplicate)
|
|
255
318
|
purpleLight: "#F9F8FF",
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
orangeDark: "#3D1901",
|
|
260
|
-
orangeGray: "#EEE5DE"
|
|
319
|
+
// Light purple
|
|
320
|
+
purpleDark: "#372E78" // Dark purple
|
|
321
|
+
|
|
261
322
|
};
|
|
262
323
|
|
|
263
324
|
var fonts = {
|
|
@@ -396,7 +457,7 @@ var P = styled__default["default"].Text(_templateObject7$1 || (_templateObject7$
|
|
|
396
457
|
return props.style;
|
|
397
458
|
});
|
|
398
459
|
|
|
399
|
-
var _excluded$
|
|
460
|
+
var _excluded$7 = ["children", "style", "align", "color", "fontFamily"];
|
|
400
461
|
|
|
401
462
|
var H1Text = function H1Text(_ref) {
|
|
402
463
|
var children = _ref.children,
|
|
@@ -405,7 +466,7 @@ var H1Text = function H1Text(_ref) {
|
|
|
405
466
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
406
467
|
color = _ref.color,
|
|
407
468
|
fontFamily = _ref.fontFamily,
|
|
408
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
469
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
409
470
|
|
|
410
471
|
return /*#__PURE__*/React__default["default"].createElement(H1, _extends({}, rest, {
|
|
411
472
|
style: style,
|
|
@@ -419,7 +480,7 @@ H1Text.propTypes = {
|
|
|
419
480
|
style: PropTypes__default["default"].object
|
|
420
481
|
};
|
|
421
482
|
|
|
422
|
-
var _excluded$
|
|
483
|
+
var _excluded$6 = ["children", "style", "align", "color", "fontFamily"];
|
|
423
484
|
|
|
424
485
|
var H2Text = function H2Text(_ref) {
|
|
425
486
|
var children = _ref.children,
|
|
@@ -428,7 +489,7 @@ var H2Text = function H2Text(_ref) {
|
|
|
428
489
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
429
490
|
color = _ref.color,
|
|
430
491
|
fontFamily = _ref.fontFamily,
|
|
431
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
492
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
432
493
|
|
|
433
494
|
return /*#__PURE__*/React__default["default"].createElement(H2, _extends({}, rest, {
|
|
434
495
|
style: style,
|
|
@@ -442,7 +503,7 @@ H2Text.propTypes = {
|
|
|
442
503
|
style: PropTypes__default["default"].object
|
|
443
504
|
};
|
|
444
505
|
|
|
445
|
-
var _excluded$
|
|
506
|
+
var _excluded$5 = ["children", "style", "align", "color", "fontFamily"];
|
|
446
507
|
|
|
447
508
|
var H3Text = function H3Text(_ref) {
|
|
448
509
|
var children = _ref.children,
|
|
@@ -451,7 +512,7 @@ var H3Text = function H3Text(_ref) {
|
|
|
451
512
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
452
513
|
color = _ref.color,
|
|
453
514
|
fontFamily = _ref.fontFamily,
|
|
454
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
515
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
455
516
|
|
|
456
517
|
return /*#__PURE__*/React__default["default"].createElement(H3, _extends({}, rest, {
|
|
457
518
|
style: style,
|
|
@@ -465,7 +526,7 @@ H3Text.propTypes = {
|
|
|
465
526
|
style: PropTypes__default["default"].object
|
|
466
527
|
};
|
|
467
528
|
|
|
468
|
-
var _excluded$
|
|
529
|
+
var _excluded$4 = ["children", "style", "align", "color", "fontFamily"];
|
|
469
530
|
|
|
470
531
|
var H4Text = function H4Text(_ref) {
|
|
471
532
|
var children = _ref.children,
|
|
@@ -474,7 +535,7 @@ var H4Text = function H4Text(_ref) {
|
|
|
474
535
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
475
536
|
color = _ref.color,
|
|
476
537
|
fontFamily = _ref.fontFamily,
|
|
477
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
538
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
478
539
|
|
|
479
540
|
return /*#__PURE__*/React__default["default"].createElement(H4, _extends({}, rest, {
|
|
480
541
|
style: style,
|
|
@@ -488,7 +549,7 @@ H4Text.propTypes = {
|
|
|
488
549
|
style: PropTypes__default["default"].object
|
|
489
550
|
};
|
|
490
551
|
|
|
491
|
-
var _excluded$
|
|
552
|
+
var _excluded$3 = ["children", "style", "align", "color", "fontFamily"];
|
|
492
553
|
|
|
493
554
|
var H5Text = function H5Text(_ref) {
|
|
494
555
|
var children = _ref.children,
|
|
@@ -497,7 +558,7 @@ var H5Text = function H5Text(_ref) {
|
|
|
497
558
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
498
559
|
color = _ref.color,
|
|
499
560
|
fontFamily = _ref.fontFamily,
|
|
500
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
561
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
501
562
|
|
|
502
563
|
return /*#__PURE__*/React__default["default"].createElement(H5, _extends({}, rest, {
|
|
503
564
|
style: style,
|
|
@@ -511,7 +572,7 @@ H5Text.propTypes = {
|
|
|
511
572
|
style: PropTypes__default["default"].object
|
|
512
573
|
};
|
|
513
574
|
|
|
514
|
-
var _excluded$
|
|
575
|
+
var _excluded$2 = ["children", "style", "align", "color", "fontFamily"];
|
|
515
576
|
|
|
516
577
|
var pText = function pText(_ref) {
|
|
517
578
|
var children = _ref.children,
|
|
@@ -520,7 +581,7 @@ var pText = function pText(_ref) {
|
|
|
520
581
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
521
582
|
color = _ref.color,
|
|
522
583
|
fontFamily = _ref.fontFamily,
|
|
523
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
584
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
524
585
|
|
|
525
586
|
return /*#__PURE__*/React__default["default"].createElement(P, _extends({}, rest, {
|
|
526
587
|
style: style,
|
|
@@ -534,7 +595,7 @@ pText.propTypes = {
|
|
|
534
595
|
style: PropTypes__default["default"].object
|
|
535
596
|
};
|
|
536
597
|
|
|
537
|
-
var _excluded = ["children", "style", "align", "color", "fontFamily"];
|
|
598
|
+
var _excluded$1 = ["children", "style", "align", "color", "fontFamily"];
|
|
538
599
|
|
|
539
600
|
var SpanText = function SpanText(_ref) {
|
|
540
601
|
var children = _ref.children,
|
|
@@ -543,7 +604,7 @@ var SpanText = function SpanText(_ref) {
|
|
|
543
604
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
544
605
|
color = _ref.color,
|
|
545
606
|
fontFamily = _ref.fontFamily,
|
|
546
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
607
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
547
608
|
|
|
548
609
|
return /*#__PURE__*/React__default["default"].createElement(Span, _extends({}, rest, {
|
|
549
610
|
style: style,
|
|
@@ -953,19 +1014,23 @@ var WebSmallWrapper = function WebSmallWrapper(_ref) {
|
|
|
953
1014
|
}, children);
|
|
954
1015
|
};
|
|
955
1016
|
|
|
1017
|
+
var _excluded = ["children", "color", "style", "direction"];
|
|
1018
|
+
|
|
956
1019
|
var Box = function Box(_ref) {
|
|
957
1020
|
var children = _ref.children,
|
|
958
1021
|
_ref$color = _ref.color,
|
|
959
1022
|
color = _ref$color === void 0 ? "" : _ref$color,
|
|
960
1023
|
style = _ref.style,
|
|
961
1024
|
_ref$direction = _ref.direction,
|
|
962
|
-
direction = _ref$direction === void 0 ? false : _ref$direction
|
|
963
|
-
|
|
1025
|
+
direction = _ref$direction === void 0 ? false : _ref$direction,
|
|
1026
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
1027
|
+
|
|
1028
|
+
return /*#__PURE__*/React__default["default"].createElement(BoxElement, _extends({
|
|
964
1029
|
style: _objectSpread2({
|
|
965
1030
|
backgroundColor: color
|
|
966
1031
|
}, style),
|
|
967
1032
|
direction: direction
|
|
968
|
-
}, children);
|
|
1033
|
+
}, rest), children);
|
|
969
1034
|
};
|
|
970
1035
|
|
|
971
1036
|
var RoundedTopBox = function RoundedTopBox(_ref) {
|
|
@@ -1445,7 +1510,9 @@ var Input = function Input(_ref) {
|
|
|
1445
1510
|
focused();
|
|
1446
1511
|
}, [isFocused]);
|
|
1447
1512
|
React.useEffect(function () {
|
|
1448
|
-
|
|
1513
|
+
if (textValue !== undefined) {
|
|
1514
|
+
textChange(textValue);
|
|
1515
|
+
}
|
|
1449
1516
|
}, [textValue]);
|
|
1450
1517
|
React.useEffect(function () {
|
|
1451
1518
|
defaultValue && setTextValue(defaultValue);
|
|
@@ -1486,10 +1553,10 @@ var Input = function Input(_ref) {
|
|
|
1486
1553
|
active: isFocused,
|
|
1487
1554
|
color: !hasError ? isFocused ? borderColorActive : borderColorIdle : borderColorError
|
|
1488
1555
|
}, /*#__PURE__*/React__default["default"].createElement(PlaceholderElement$1, {
|
|
1489
|
-
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1556
|
+
active: isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0
|
|
1490
1557
|
}, /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React__default["default"].createElement(H4Text, {
|
|
1491
1558
|
color: borderColorError
|
|
1492
|
-
}, 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, {
|
|
1559
|
+
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(Row, null, euro && (isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0) && /*#__PURE__*/React__default["default"].createElement(Row, {
|
|
1493
1560
|
style: {
|
|
1494
1561
|
minHeight: 40,
|
|
1495
1562
|
alignItems: "center"
|
|
@@ -1505,7 +1572,7 @@ var Input = function Input(_ref) {
|
|
|
1505
1572
|
onChangeText: function onChangeText(text) {
|
|
1506
1573
|
return setTextValue(text);
|
|
1507
1574
|
},
|
|
1508
|
-
defaultValue: defaultValue,
|
|
1575
|
+
defaultValue: defaultValue && String(defaultValue),
|
|
1509
1576
|
value: value,
|
|
1510
1577
|
multiline: multiline,
|
|
1511
1578
|
numberOfLines: numberOfLines,
|
|
@@ -1848,7 +1915,17 @@ var RoundedBtn$1 = function RoundedBtn(_ref) {
|
|
|
1848
1915
|
|
|
1849
1916
|
var _templateObject$e, _templateObject2$5;
|
|
1850
1917
|
styled__default["default"].View(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral([""])));
|
|
1851
|
-
var ButtonStyle$3 = styled__default["default"].Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1918
|
+
var ButtonStyle$3 = styled__default["default"].Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n min-width: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1919
|
+
if (props.size === "big") {
|
|
1920
|
+
return "70px";
|
|
1921
|
+
} else if (props.size === "small") {
|
|
1922
|
+
return "56px";
|
|
1923
|
+
} else if (props.size === "xsmall") {
|
|
1924
|
+
return "40px";
|
|
1925
|
+
} else {
|
|
1926
|
+
return "70px";
|
|
1927
|
+
}
|
|
1928
|
+
}, function (props) {
|
|
1852
1929
|
if (props.size === "big") {
|
|
1853
1930
|
return "70px";
|
|
1854
1931
|
} else if (props.size === "small") {
|
package/dist/bundle.esm.js
CHANGED
|
@@ -191,60 +191,121 @@ function _nonIterableRest() {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
var colors = {
|
|
194
|
+
// Whites & Grays
|
|
194
195
|
color1: "#FFFFFF",
|
|
196
|
+
// Pure white
|
|
197
|
+
color7: "#dfe6e9",
|
|
198
|
+
// Light gray
|
|
199
|
+
color8: "#F8F9FB",
|
|
200
|
+
// Very light gray
|
|
201
|
+
color10: "#F2F3F7",
|
|
202
|
+
// Another light gray
|
|
203
|
+
color16: "#636e72",
|
|
204
|
+
// Dark gray
|
|
205
|
+
greyText: "#b2bec3",
|
|
206
|
+
// Gray for text
|
|
207
|
+
greyButton: "#94A3A9",
|
|
208
|
+
// Gray for buttons
|
|
195
209
|
color2: "#2d3436",
|
|
210
|
+
// Almost black
|
|
211
|
+
// Blues
|
|
196
212
|
color3: "#74b9ff",
|
|
213
|
+
// Light blue
|
|
197
214
|
color3light: "#E1F0FF",
|
|
215
|
+
// Very light blue
|
|
198
216
|
color4: "#0984e3",
|
|
217
|
+
// Medium blue
|
|
218
|
+
blue: "#74b9ff",
|
|
219
|
+
// Light blue (duplicate)
|
|
220
|
+
blueLight: "#E1F0FF",
|
|
221
|
+
// Very light blue (duplicate)
|
|
222
|
+
darkBlue: "#0984e3",
|
|
223
|
+
// Medium blue (duplicate)
|
|
224
|
+
darkBlueLight: "#CFEAFF",
|
|
225
|
+
// Pale blue
|
|
226
|
+
color15: "#00cec9",
|
|
227
|
+
// Cyan
|
|
228
|
+
color18: "#81ecec",
|
|
229
|
+
// Light cyan
|
|
230
|
+
// Yellows
|
|
199
231
|
color5: "#ffeaa7",
|
|
232
|
+
// Light yellow
|
|
200
233
|
color5light: "#FFF9E5",
|
|
234
|
+
// Very light yellow
|
|
201
235
|
color5border: "#E4E0D2",
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
236
|
+
// Yellow border
|
|
237
|
+
darkYellow: "#fdcb6e",
|
|
238
|
+
// Dark yellow
|
|
239
|
+
darkYellowLight: "#FFF7E8",
|
|
240
|
+
// Light yellow
|
|
241
|
+
darkYellowDark: "#8C6F39",
|
|
242
|
+
// Brown yellow
|
|
243
|
+
darkYellowGray: "#ECE5D8",
|
|
244
|
+
// Grayish yellow
|
|
245
|
+
// Oranges & Browns
|
|
206
246
|
color9: "#FFA15F",
|
|
247
|
+
// Orange
|
|
207
248
|
color9light: "#F9F0EA",
|
|
249
|
+
// Light orange
|
|
208
250
|
color9dark: "#804F2D",
|
|
251
|
+
// Dark brown
|
|
209
252
|
color9border: "#DDD1C9",
|
|
210
|
-
|
|
253
|
+
// Orange border
|
|
254
|
+
color13: "#fab1a0",
|
|
255
|
+
// Peach
|
|
256
|
+
orange: "#FFA15F",
|
|
257
|
+
// Orange (duplicate)
|
|
258
|
+
orangeLight: "#FFFAF6",
|
|
259
|
+
// Light orange
|
|
260
|
+
orangeDark: "#3D1901",
|
|
261
|
+
// Very dark brown
|
|
262
|
+
orangeGray: "#EEE5DE",
|
|
263
|
+
// Grayish orange
|
|
264
|
+
// Reds
|
|
265
|
+
color6: "#ff7675",
|
|
266
|
+
// Red
|
|
267
|
+
color6light: "#FFDCDB",
|
|
268
|
+
// Light red
|
|
269
|
+
red: "#ff7675",
|
|
270
|
+
// Red (duplicate)
|
|
271
|
+
redlight: "#fff0ed",
|
|
272
|
+
// Very light red
|
|
273
|
+
redDark: "#9C4140",
|
|
274
|
+
// Dark red
|
|
275
|
+
redBorder: "#D2BBBB",
|
|
276
|
+
// Red border
|
|
277
|
+
// Greens
|
|
211
278
|
color11: "#00b894",
|
|
279
|
+
// Green
|
|
212
280
|
color11light: "#EEFFFC",
|
|
281
|
+
// Light green
|
|
213
282
|
color11border: "#D2E3E0",
|
|
283
|
+
// Green border
|
|
284
|
+
color14: "#00b894",
|
|
285
|
+
// Green (duplicate)
|
|
286
|
+
green: "#55efc4",
|
|
287
|
+
// Light green
|
|
288
|
+
greenLight: "#F3FFFC",
|
|
289
|
+
// Very light green
|
|
290
|
+
greenDark: "#236A56",
|
|
291
|
+
// Dark green
|
|
292
|
+
// Purples
|
|
214
293
|
color12: "#6c5ce7",
|
|
294
|
+
// Purple
|
|
215
295
|
color12light: "#F5F4FF",
|
|
296
|
+
// Light purple
|
|
216
297
|
color12border: "#DFDDEA",
|
|
298
|
+
// Purple border
|
|
217
299
|
color12dark: "#584E74",
|
|
218
|
-
|
|
219
|
-
color14: "#00b894",
|
|
220
|
-
color15: "#00cec9",
|
|
221
|
-
color16: "#636e72",
|
|
300
|
+
// Dark purple
|
|
222
301
|
color17: "#6c5ce7",
|
|
223
|
-
|
|
224
|
-
darkYellow: "#fdcb6e",
|
|
225
|
-
darkYellowLight: "#FFF7E8",
|
|
226
|
-
darkYellowDark: "#8C6F39",
|
|
227
|
-
darkYellowGray: "#ECE5D8",
|
|
228
|
-
green: "#55efc4",
|
|
229
|
-
greenLight: "#F3FFFC",
|
|
230
|
-
greenDark: "#236A56",
|
|
231
|
-
greyText: "#b2bec3",
|
|
232
|
-
greyButton: "#94A3A9",
|
|
233
|
-
red: "#ff7675",
|
|
234
|
-
redlight: "#FFFAF9",
|
|
235
|
-
redDark: "#9C4140",
|
|
236
|
-
redBorder: "#D2BBBB",
|
|
237
|
-
blue: "#74b9ff",
|
|
238
|
-
blueLight: "#E1F0FF",
|
|
239
|
-
darkBlue: "#0984e3",
|
|
240
|
-
darkBlueLight: "#CFEAFF",
|
|
302
|
+
// Purple (duplicate)
|
|
241
303
|
purple: "#6c5ce7",
|
|
304
|
+
// Purple (duplicate)
|
|
242
305
|
purpleLight: "#F9F8FF",
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
orangeDark: "#3D1901",
|
|
247
|
-
orangeGray: "#EEE5DE"
|
|
306
|
+
// Light purple
|
|
307
|
+
purpleDark: "#372E78" // Dark purple
|
|
308
|
+
|
|
248
309
|
};
|
|
249
310
|
|
|
250
311
|
var fonts = {
|
|
@@ -383,7 +444,7 @@ var P = styled.Text(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateL
|
|
|
383
444
|
return props.style;
|
|
384
445
|
});
|
|
385
446
|
|
|
386
|
-
var _excluded$
|
|
447
|
+
var _excluded$7 = ["children", "style", "align", "color", "fontFamily"];
|
|
387
448
|
|
|
388
449
|
var H1Text = function H1Text(_ref) {
|
|
389
450
|
var children = _ref.children,
|
|
@@ -392,7 +453,7 @@ var H1Text = function H1Text(_ref) {
|
|
|
392
453
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
393
454
|
color = _ref.color,
|
|
394
455
|
fontFamily = _ref.fontFamily,
|
|
395
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
456
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
396
457
|
|
|
397
458
|
return /*#__PURE__*/React.createElement(H1, _extends({}, rest, {
|
|
398
459
|
style: style,
|
|
@@ -406,7 +467,7 @@ H1Text.propTypes = {
|
|
|
406
467
|
style: PropTypes.object
|
|
407
468
|
};
|
|
408
469
|
|
|
409
|
-
var _excluded$
|
|
470
|
+
var _excluded$6 = ["children", "style", "align", "color", "fontFamily"];
|
|
410
471
|
|
|
411
472
|
var H2Text = function H2Text(_ref) {
|
|
412
473
|
var children = _ref.children,
|
|
@@ -415,7 +476,7 @@ var H2Text = function H2Text(_ref) {
|
|
|
415
476
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
416
477
|
color = _ref.color,
|
|
417
478
|
fontFamily = _ref.fontFamily,
|
|
418
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
479
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
419
480
|
|
|
420
481
|
return /*#__PURE__*/React.createElement(H2, _extends({}, rest, {
|
|
421
482
|
style: style,
|
|
@@ -429,7 +490,7 @@ H2Text.propTypes = {
|
|
|
429
490
|
style: PropTypes.object
|
|
430
491
|
};
|
|
431
492
|
|
|
432
|
-
var _excluded$
|
|
493
|
+
var _excluded$5 = ["children", "style", "align", "color", "fontFamily"];
|
|
433
494
|
|
|
434
495
|
var H3Text = function H3Text(_ref) {
|
|
435
496
|
var children = _ref.children,
|
|
@@ -438,7 +499,7 @@ var H3Text = function H3Text(_ref) {
|
|
|
438
499
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
439
500
|
color = _ref.color,
|
|
440
501
|
fontFamily = _ref.fontFamily,
|
|
441
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
502
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
442
503
|
|
|
443
504
|
return /*#__PURE__*/React.createElement(H3, _extends({}, rest, {
|
|
444
505
|
style: style,
|
|
@@ -452,7 +513,7 @@ H3Text.propTypes = {
|
|
|
452
513
|
style: PropTypes.object
|
|
453
514
|
};
|
|
454
515
|
|
|
455
|
-
var _excluded$
|
|
516
|
+
var _excluded$4 = ["children", "style", "align", "color", "fontFamily"];
|
|
456
517
|
|
|
457
518
|
var H4Text = function H4Text(_ref) {
|
|
458
519
|
var children = _ref.children,
|
|
@@ -461,7 +522,7 @@ var H4Text = function H4Text(_ref) {
|
|
|
461
522
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
462
523
|
color = _ref.color,
|
|
463
524
|
fontFamily = _ref.fontFamily,
|
|
464
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
525
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
465
526
|
|
|
466
527
|
return /*#__PURE__*/React.createElement(H4, _extends({}, rest, {
|
|
467
528
|
style: style,
|
|
@@ -475,7 +536,7 @@ H4Text.propTypes = {
|
|
|
475
536
|
style: PropTypes.object
|
|
476
537
|
};
|
|
477
538
|
|
|
478
|
-
var _excluded$
|
|
539
|
+
var _excluded$3 = ["children", "style", "align", "color", "fontFamily"];
|
|
479
540
|
|
|
480
541
|
var H5Text = function H5Text(_ref) {
|
|
481
542
|
var children = _ref.children,
|
|
@@ -484,7 +545,7 @@ var H5Text = function H5Text(_ref) {
|
|
|
484
545
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
485
546
|
color = _ref.color,
|
|
486
547
|
fontFamily = _ref.fontFamily,
|
|
487
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
548
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
488
549
|
|
|
489
550
|
return /*#__PURE__*/React.createElement(H5, _extends({}, rest, {
|
|
490
551
|
style: style,
|
|
@@ -498,7 +559,7 @@ H5Text.propTypes = {
|
|
|
498
559
|
style: PropTypes.object
|
|
499
560
|
};
|
|
500
561
|
|
|
501
|
-
var _excluded$
|
|
562
|
+
var _excluded$2 = ["children", "style", "align", "color", "fontFamily"];
|
|
502
563
|
|
|
503
564
|
var pText = function pText(_ref) {
|
|
504
565
|
var children = _ref.children,
|
|
@@ -507,7 +568,7 @@ var pText = function pText(_ref) {
|
|
|
507
568
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
508
569
|
color = _ref.color,
|
|
509
570
|
fontFamily = _ref.fontFamily,
|
|
510
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
571
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
511
572
|
|
|
512
573
|
return /*#__PURE__*/React.createElement(P, _extends({}, rest, {
|
|
513
574
|
style: style,
|
|
@@ -521,7 +582,7 @@ pText.propTypes = {
|
|
|
521
582
|
style: PropTypes.object
|
|
522
583
|
};
|
|
523
584
|
|
|
524
|
-
var _excluded = ["children", "style", "align", "color", "fontFamily"];
|
|
585
|
+
var _excluded$1 = ["children", "style", "align", "color", "fontFamily"];
|
|
525
586
|
|
|
526
587
|
var SpanText = function SpanText(_ref) {
|
|
527
588
|
var children = _ref.children,
|
|
@@ -530,7 +591,7 @@ var SpanText = function SpanText(_ref) {
|
|
|
530
591
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
531
592
|
color = _ref.color,
|
|
532
593
|
fontFamily = _ref.fontFamily,
|
|
533
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
594
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
534
595
|
|
|
535
596
|
return /*#__PURE__*/React.createElement(Span, _extends({}, rest, {
|
|
536
597
|
style: style,
|
|
@@ -940,19 +1001,23 @@ var WebSmallWrapper = function WebSmallWrapper(_ref) {
|
|
|
940
1001
|
}, children);
|
|
941
1002
|
};
|
|
942
1003
|
|
|
1004
|
+
var _excluded = ["children", "color", "style", "direction"];
|
|
1005
|
+
|
|
943
1006
|
var Box = function Box(_ref) {
|
|
944
1007
|
var children = _ref.children,
|
|
945
1008
|
_ref$color = _ref.color,
|
|
946
1009
|
color = _ref$color === void 0 ? "" : _ref$color,
|
|
947
1010
|
style = _ref.style,
|
|
948
1011
|
_ref$direction = _ref.direction,
|
|
949
|
-
direction = _ref$direction === void 0 ? false : _ref$direction
|
|
950
|
-
|
|
1012
|
+
direction = _ref$direction === void 0 ? false : _ref$direction,
|
|
1013
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
1014
|
+
|
|
1015
|
+
return /*#__PURE__*/React.createElement(BoxElement, _extends({
|
|
951
1016
|
style: _objectSpread2({
|
|
952
1017
|
backgroundColor: color
|
|
953
1018
|
}, style),
|
|
954
1019
|
direction: direction
|
|
955
|
-
}, children);
|
|
1020
|
+
}, rest), children);
|
|
956
1021
|
};
|
|
957
1022
|
|
|
958
1023
|
var RoundedTopBox = function RoundedTopBox(_ref) {
|
|
@@ -1432,7 +1497,9 @@ var Input = function Input(_ref) {
|
|
|
1432
1497
|
focused();
|
|
1433
1498
|
}, [isFocused]);
|
|
1434
1499
|
useEffect(function () {
|
|
1435
|
-
|
|
1500
|
+
if (textValue !== undefined) {
|
|
1501
|
+
textChange(textValue);
|
|
1502
|
+
}
|
|
1436
1503
|
}, [textValue]);
|
|
1437
1504
|
useEffect(function () {
|
|
1438
1505
|
defaultValue && setTextValue(defaultValue);
|
|
@@ -1473,10 +1540,10 @@ var Input = function Input(_ref) {
|
|
|
1473
1540
|
active: isFocused,
|
|
1474
1541
|
color: !hasError ? isFocused ? borderColorActive : borderColorIdle : borderColorError
|
|
1475
1542
|
}, /*#__PURE__*/React.createElement(PlaceholderElement$1, {
|
|
1476
|
-
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1543
|
+
active: isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0
|
|
1477
1544
|
}, /*#__PURE__*/React.createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React.createElement(H4Text, {
|
|
1478
1545
|
color: borderColorError
|
|
1479
|
-
}, 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, {
|
|
1546
|
+
}, error || hasError))), /*#__PURE__*/React.createElement(MarginHorizontal, null, /*#__PURE__*/React.createElement(Row, null, euro && (isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0) && /*#__PURE__*/React.createElement(Row, {
|
|
1480
1547
|
style: {
|
|
1481
1548
|
minHeight: 40,
|
|
1482
1549
|
alignItems: "center"
|
|
@@ -1492,7 +1559,7 @@ var Input = function Input(_ref) {
|
|
|
1492
1559
|
onChangeText: function onChangeText(text) {
|
|
1493
1560
|
return setTextValue(text);
|
|
1494
1561
|
},
|
|
1495
|
-
defaultValue: defaultValue,
|
|
1562
|
+
defaultValue: defaultValue && String(defaultValue),
|
|
1496
1563
|
value: value,
|
|
1497
1564
|
multiline: multiline,
|
|
1498
1565
|
numberOfLines: numberOfLines,
|
|
@@ -1835,7 +1902,17 @@ var RoundedBtn$1 = function RoundedBtn(_ref) {
|
|
|
1835
1902
|
|
|
1836
1903
|
var _templateObject$e, _templateObject2$5;
|
|
1837
1904
|
styled.View(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral([""])));
|
|
1838
|
-
var ButtonStyle$3 = styled.Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1905
|
+
var ButtonStyle$3 = styled.Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n min-width: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1906
|
+
if (props.size === "big") {
|
|
1907
|
+
return "70px";
|
|
1908
|
+
} else if (props.size === "small") {
|
|
1909
|
+
return "56px";
|
|
1910
|
+
} else if (props.size === "xsmall") {
|
|
1911
|
+
return "40px";
|
|
1912
|
+
} else {
|
|
1913
|
+
return "70px";
|
|
1914
|
+
}
|
|
1915
|
+
}, function (props) {
|
|
1839
1916
|
if (props.size === "big") {
|
|
1840
1917
|
return "70px";
|
|
1841
1918
|
} else if (props.size === "small") {
|
package/dist/bundle.umd.js
CHANGED
|
@@ -196,60 +196,121 @@
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
var colors = {
|
|
199
|
+
// Whites & Grays
|
|
199
200
|
color1: "#FFFFFF",
|
|
201
|
+
// Pure white
|
|
202
|
+
color7: "#dfe6e9",
|
|
203
|
+
// Light gray
|
|
204
|
+
color8: "#F8F9FB",
|
|
205
|
+
// Very light gray
|
|
206
|
+
color10: "#F2F3F7",
|
|
207
|
+
// Another light gray
|
|
208
|
+
color16: "#636e72",
|
|
209
|
+
// Dark gray
|
|
210
|
+
greyText: "#b2bec3",
|
|
211
|
+
// Gray for text
|
|
212
|
+
greyButton: "#94A3A9",
|
|
213
|
+
// Gray for buttons
|
|
200
214
|
color2: "#2d3436",
|
|
215
|
+
// Almost black
|
|
216
|
+
// Blues
|
|
201
217
|
color3: "#74b9ff",
|
|
218
|
+
// Light blue
|
|
202
219
|
color3light: "#E1F0FF",
|
|
220
|
+
// Very light blue
|
|
203
221
|
color4: "#0984e3",
|
|
222
|
+
// Medium blue
|
|
223
|
+
blue: "#74b9ff",
|
|
224
|
+
// Light blue (duplicate)
|
|
225
|
+
blueLight: "#E1F0FF",
|
|
226
|
+
// Very light blue (duplicate)
|
|
227
|
+
darkBlue: "#0984e3",
|
|
228
|
+
// Medium blue (duplicate)
|
|
229
|
+
darkBlueLight: "#CFEAFF",
|
|
230
|
+
// Pale blue
|
|
231
|
+
color15: "#00cec9",
|
|
232
|
+
// Cyan
|
|
233
|
+
color18: "#81ecec",
|
|
234
|
+
// Light cyan
|
|
235
|
+
// Yellows
|
|
204
236
|
color5: "#ffeaa7",
|
|
237
|
+
// Light yellow
|
|
205
238
|
color5light: "#FFF9E5",
|
|
239
|
+
// Very light yellow
|
|
206
240
|
color5border: "#E4E0D2",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
241
|
+
// Yellow border
|
|
242
|
+
darkYellow: "#fdcb6e",
|
|
243
|
+
// Dark yellow
|
|
244
|
+
darkYellowLight: "#FFF7E8",
|
|
245
|
+
// Light yellow
|
|
246
|
+
darkYellowDark: "#8C6F39",
|
|
247
|
+
// Brown yellow
|
|
248
|
+
darkYellowGray: "#ECE5D8",
|
|
249
|
+
// Grayish yellow
|
|
250
|
+
// Oranges & Browns
|
|
211
251
|
color9: "#FFA15F",
|
|
252
|
+
// Orange
|
|
212
253
|
color9light: "#F9F0EA",
|
|
254
|
+
// Light orange
|
|
213
255
|
color9dark: "#804F2D",
|
|
256
|
+
// Dark brown
|
|
214
257
|
color9border: "#DDD1C9",
|
|
215
|
-
|
|
258
|
+
// Orange border
|
|
259
|
+
color13: "#fab1a0",
|
|
260
|
+
// Peach
|
|
261
|
+
orange: "#FFA15F",
|
|
262
|
+
// Orange (duplicate)
|
|
263
|
+
orangeLight: "#FFFAF6",
|
|
264
|
+
// Light orange
|
|
265
|
+
orangeDark: "#3D1901",
|
|
266
|
+
// Very dark brown
|
|
267
|
+
orangeGray: "#EEE5DE",
|
|
268
|
+
// Grayish orange
|
|
269
|
+
// Reds
|
|
270
|
+
color6: "#ff7675",
|
|
271
|
+
// Red
|
|
272
|
+
color6light: "#FFDCDB",
|
|
273
|
+
// Light red
|
|
274
|
+
red: "#ff7675",
|
|
275
|
+
// Red (duplicate)
|
|
276
|
+
redlight: "#fff0ed",
|
|
277
|
+
// Very light red
|
|
278
|
+
redDark: "#9C4140",
|
|
279
|
+
// Dark red
|
|
280
|
+
redBorder: "#D2BBBB",
|
|
281
|
+
// Red border
|
|
282
|
+
// Greens
|
|
216
283
|
color11: "#00b894",
|
|
284
|
+
// Green
|
|
217
285
|
color11light: "#EEFFFC",
|
|
286
|
+
// Light green
|
|
218
287
|
color11border: "#D2E3E0",
|
|
288
|
+
// Green border
|
|
289
|
+
color14: "#00b894",
|
|
290
|
+
// Green (duplicate)
|
|
291
|
+
green: "#55efc4",
|
|
292
|
+
// Light green
|
|
293
|
+
greenLight: "#F3FFFC",
|
|
294
|
+
// Very light green
|
|
295
|
+
greenDark: "#236A56",
|
|
296
|
+
// Dark green
|
|
297
|
+
// Purples
|
|
219
298
|
color12: "#6c5ce7",
|
|
299
|
+
// Purple
|
|
220
300
|
color12light: "#F5F4FF",
|
|
301
|
+
// Light purple
|
|
221
302
|
color12border: "#DFDDEA",
|
|
303
|
+
// Purple border
|
|
222
304
|
color12dark: "#584E74",
|
|
223
|
-
|
|
224
|
-
color14: "#00b894",
|
|
225
|
-
color15: "#00cec9",
|
|
226
|
-
color16: "#636e72",
|
|
305
|
+
// Dark purple
|
|
227
306
|
color17: "#6c5ce7",
|
|
228
|
-
|
|
229
|
-
darkYellow: "#fdcb6e",
|
|
230
|
-
darkYellowLight: "#FFF7E8",
|
|
231
|
-
darkYellowDark: "#8C6F39",
|
|
232
|
-
darkYellowGray: "#ECE5D8",
|
|
233
|
-
green: "#55efc4",
|
|
234
|
-
greenLight: "#F3FFFC",
|
|
235
|
-
greenDark: "#236A56",
|
|
236
|
-
greyText: "#b2bec3",
|
|
237
|
-
greyButton: "#94A3A9",
|
|
238
|
-
red: "#ff7675",
|
|
239
|
-
redlight: "#FFFAF9",
|
|
240
|
-
redDark: "#9C4140",
|
|
241
|
-
redBorder: "#D2BBBB",
|
|
242
|
-
blue: "#74b9ff",
|
|
243
|
-
blueLight: "#E1F0FF",
|
|
244
|
-
darkBlue: "#0984e3",
|
|
245
|
-
darkBlueLight: "#CFEAFF",
|
|
307
|
+
// Purple (duplicate)
|
|
246
308
|
purple: "#6c5ce7",
|
|
309
|
+
// Purple (duplicate)
|
|
247
310
|
purpleLight: "#F9F8FF",
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
orangeDark: "#3D1901",
|
|
252
|
-
orangeGray: "#EEE5DE"
|
|
311
|
+
// Light purple
|
|
312
|
+
purpleDark: "#372E78" // Dark purple
|
|
313
|
+
|
|
253
314
|
};
|
|
254
315
|
|
|
255
316
|
var fonts = {
|
|
@@ -388,7 +449,7 @@
|
|
|
388
449
|
return props.style;
|
|
389
450
|
});
|
|
390
451
|
|
|
391
|
-
var _excluded$
|
|
452
|
+
var _excluded$7 = ["children", "style", "align", "color", "fontFamily"];
|
|
392
453
|
|
|
393
454
|
var H1Text = function H1Text(_ref) {
|
|
394
455
|
var children = _ref.children,
|
|
@@ -397,7 +458,7 @@
|
|
|
397
458
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
398
459
|
color = _ref.color,
|
|
399
460
|
fontFamily = _ref.fontFamily,
|
|
400
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
461
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
401
462
|
|
|
402
463
|
return /*#__PURE__*/React__default["default"].createElement(H1, _extends({}, rest, {
|
|
403
464
|
style: style,
|
|
@@ -411,7 +472,7 @@
|
|
|
411
472
|
style: PropTypes__default["default"].object
|
|
412
473
|
};
|
|
413
474
|
|
|
414
|
-
var _excluded$
|
|
475
|
+
var _excluded$6 = ["children", "style", "align", "color", "fontFamily"];
|
|
415
476
|
|
|
416
477
|
var H2Text = function H2Text(_ref) {
|
|
417
478
|
var children = _ref.children,
|
|
@@ -420,7 +481,7 @@
|
|
|
420
481
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
421
482
|
color = _ref.color,
|
|
422
483
|
fontFamily = _ref.fontFamily,
|
|
423
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
484
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
424
485
|
|
|
425
486
|
return /*#__PURE__*/React__default["default"].createElement(H2, _extends({}, rest, {
|
|
426
487
|
style: style,
|
|
@@ -434,7 +495,7 @@
|
|
|
434
495
|
style: PropTypes__default["default"].object
|
|
435
496
|
};
|
|
436
497
|
|
|
437
|
-
var _excluded$
|
|
498
|
+
var _excluded$5 = ["children", "style", "align", "color", "fontFamily"];
|
|
438
499
|
|
|
439
500
|
var H3Text = function H3Text(_ref) {
|
|
440
501
|
var children = _ref.children,
|
|
@@ -443,7 +504,7 @@
|
|
|
443
504
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
444
505
|
color = _ref.color,
|
|
445
506
|
fontFamily = _ref.fontFamily,
|
|
446
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
507
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
447
508
|
|
|
448
509
|
return /*#__PURE__*/React__default["default"].createElement(H3, _extends({}, rest, {
|
|
449
510
|
style: style,
|
|
@@ -457,7 +518,7 @@
|
|
|
457
518
|
style: PropTypes__default["default"].object
|
|
458
519
|
};
|
|
459
520
|
|
|
460
|
-
var _excluded$
|
|
521
|
+
var _excluded$4 = ["children", "style", "align", "color", "fontFamily"];
|
|
461
522
|
|
|
462
523
|
var H4Text = function H4Text(_ref) {
|
|
463
524
|
var children = _ref.children,
|
|
@@ -466,7 +527,7 @@
|
|
|
466
527
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
467
528
|
color = _ref.color,
|
|
468
529
|
fontFamily = _ref.fontFamily,
|
|
469
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
530
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
470
531
|
|
|
471
532
|
return /*#__PURE__*/React__default["default"].createElement(H4, _extends({}, rest, {
|
|
472
533
|
style: style,
|
|
@@ -480,7 +541,7 @@
|
|
|
480
541
|
style: PropTypes__default["default"].object
|
|
481
542
|
};
|
|
482
543
|
|
|
483
|
-
var _excluded$
|
|
544
|
+
var _excluded$3 = ["children", "style", "align", "color", "fontFamily"];
|
|
484
545
|
|
|
485
546
|
var H5Text = function H5Text(_ref) {
|
|
486
547
|
var children = _ref.children,
|
|
@@ -489,7 +550,7 @@
|
|
|
489
550
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
490
551
|
color = _ref.color,
|
|
491
552
|
fontFamily = _ref.fontFamily,
|
|
492
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
553
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
493
554
|
|
|
494
555
|
return /*#__PURE__*/React__default["default"].createElement(H5, _extends({}, rest, {
|
|
495
556
|
style: style,
|
|
@@ -503,7 +564,7 @@
|
|
|
503
564
|
style: PropTypes__default["default"].object
|
|
504
565
|
};
|
|
505
566
|
|
|
506
|
-
var _excluded$
|
|
567
|
+
var _excluded$2 = ["children", "style", "align", "color", "fontFamily"];
|
|
507
568
|
|
|
508
569
|
var pText = function pText(_ref) {
|
|
509
570
|
var children = _ref.children,
|
|
@@ -512,7 +573,7 @@
|
|
|
512
573
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
513
574
|
color = _ref.color,
|
|
514
575
|
fontFamily = _ref.fontFamily,
|
|
515
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
576
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
516
577
|
|
|
517
578
|
return /*#__PURE__*/React__default["default"].createElement(P, _extends({}, rest, {
|
|
518
579
|
style: style,
|
|
@@ -526,7 +587,7 @@
|
|
|
526
587
|
style: PropTypes__default["default"].object
|
|
527
588
|
};
|
|
528
589
|
|
|
529
|
-
var _excluded = ["children", "style", "align", "color", "fontFamily"];
|
|
590
|
+
var _excluded$1 = ["children", "style", "align", "color", "fontFamily"];
|
|
530
591
|
|
|
531
592
|
var SpanText = function SpanText(_ref) {
|
|
532
593
|
var children = _ref.children,
|
|
@@ -535,7 +596,7 @@
|
|
|
535
596
|
align = _ref$align === void 0 ? "left" : _ref$align,
|
|
536
597
|
color = _ref.color,
|
|
537
598
|
fontFamily = _ref.fontFamily,
|
|
538
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
599
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
539
600
|
|
|
540
601
|
return /*#__PURE__*/React__default["default"].createElement(Span, _extends({}, rest, {
|
|
541
602
|
style: style,
|
|
@@ -945,19 +1006,23 @@
|
|
|
945
1006
|
}, children);
|
|
946
1007
|
};
|
|
947
1008
|
|
|
1009
|
+
var _excluded = ["children", "color", "style", "direction"];
|
|
1010
|
+
|
|
948
1011
|
var Box = function Box(_ref) {
|
|
949
1012
|
var children = _ref.children,
|
|
950
1013
|
_ref$color = _ref.color,
|
|
951
1014
|
color = _ref$color === void 0 ? "" : _ref$color,
|
|
952
1015
|
style = _ref.style,
|
|
953
1016
|
_ref$direction = _ref.direction,
|
|
954
|
-
direction = _ref$direction === void 0 ? false : _ref$direction
|
|
955
|
-
|
|
1017
|
+
direction = _ref$direction === void 0 ? false : _ref$direction,
|
|
1018
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
1019
|
+
|
|
1020
|
+
return /*#__PURE__*/React__default["default"].createElement(BoxElement, _extends({
|
|
956
1021
|
style: _objectSpread2({
|
|
957
1022
|
backgroundColor: color
|
|
958
1023
|
}, style),
|
|
959
1024
|
direction: direction
|
|
960
|
-
}, children);
|
|
1025
|
+
}, rest), children);
|
|
961
1026
|
};
|
|
962
1027
|
|
|
963
1028
|
var RoundedTopBox = function RoundedTopBox(_ref) {
|
|
@@ -1437,7 +1502,9 @@
|
|
|
1437
1502
|
focused();
|
|
1438
1503
|
}, [isFocused]);
|
|
1439
1504
|
React.useEffect(function () {
|
|
1440
|
-
|
|
1505
|
+
if (textValue !== undefined) {
|
|
1506
|
+
textChange(textValue);
|
|
1507
|
+
}
|
|
1441
1508
|
}, [textValue]);
|
|
1442
1509
|
React.useEffect(function () {
|
|
1443
1510
|
defaultValue && setTextValue(defaultValue);
|
|
@@ -1478,10 +1545,10 @@
|
|
|
1478
1545
|
active: isFocused,
|
|
1479
1546
|
color: !hasError ? isFocused ? borderColorActive : borderColorIdle : borderColorError
|
|
1480
1547
|
}, /*#__PURE__*/React__default["default"].createElement(PlaceholderElement$1, {
|
|
1481
|
-
active: isFocused || textValue && textValue.length > 0 || value && value.length > 0
|
|
1548
|
+
active: isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0
|
|
1482
1549
|
}, /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, !hasError ? children : /*#__PURE__*/React__default["default"].createElement(H4Text, {
|
|
1483
1550
|
color: borderColorError
|
|
1484
|
-
}, 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, {
|
|
1551
|
+
}, error || hasError))), /*#__PURE__*/React__default["default"].createElement(MarginHorizontal, null, /*#__PURE__*/React__default["default"].createElement(Row, null, euro && (isFocused || textValue !== null && String(textValue).trim().length > 0 || value !== null && String(value).trim().length > 0) && /*#__PURE__*/React__default["default"].createElement(Row, {
|
|
1485
1552
|
style: {
|
|
1486
1553
|
minHeight: 40,
|
|
1487
1554
|
alignItems: "center"
|
|
@@ -1497,7 +1564,7 @@
|
|
|
1497
1564
|
onChangeText: function onChangeText(text) {
|
|
1498
1565
|
return setTextValue(text);
|
|
1499
1566
|
},
|
|
1500
|
-
defaultValue: defaultValue,
|
|
1567
|
+
defaultValue: defaultValue && String(defaultValue),
|
|
1501
1568
|
value: value,
|
|
1502
1569
|
multiline: multiline,
|
|
1503
1570
|
numberOfLines: numberOfLines,
|
|
@@ -1840,7 +1907,17 @@
|
|
|
1840
1907
|
|
|
1841
1908
|
var _templateObject$e, _templateObject2$5;
|
|
1842
1909
|
styled__default["default"].View(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral([""])));
|
|
1843
|
-
var ButtonStyle$3 = styled__default["default"].Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1910
|
+
var ButtonStyle$3 = styled__default["default"].Pressable(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n min-height: ", ";\n min-width: ", ";\n border-radius: 50px;\n background-color: ", ";\n opacity: ", ";\n ", ";\n"])), function (props) {
|
|
1911
|
+
if (props.size === "big") {
|
|
1912
|
+
return "70px";
|
|
1913
|
+
} else if (props.size === "small") {
|
|
1914
|
+
return "56px";
|
|
1915
|
+
} else if (props.size === "xsmall") {
|
|
1916
|
+
return "40px";
|
|
1917
|
+
} else {
|
|
1918
|
+
return "70px";
|
|
1919
|
+
}
|
|
1920
|
+
}, function (props) {
|
|
1844
1921
|
if (props.size === "big") {
|
|
1845
1922
|
return "70px";
|
|
1846
1923
|
} else if (props.size === "small") {
|
package/package.json
CHANGED
|
@@ -14,6 +14,17 @@ export const ButtonStyle = styled.Pressable`
|
|
|
14
14
|
return "70px";
|
|
15
15
|
}
|
|
16
16
|
}};
|
|
17
|
+
min-width: ${(props) => {
|
|
18
|
+
if (props.size === "big") {
|
|
19
|
+
return "70px";
|
|
20
|
+
} else if (props.size === "small") {
|
|
21
|
+
return "56px";
|
|
22
|
+
} else if (props.size === "xsmall") {
|
|
23
|
+
return "40px";
|
|
24
|
+
} else {
|
|
25
|
+
return "70px";
|
|
26
|
+
}
|
|
27
|
+
}};
|
|
17
28
|
border-radius: 50px;
|
|
18
29
|
background-color: ${(props) => props.color};
|
|
19
30
|
opacity: ${(props) => (props.active ? 1 : 0.7)};
|
|
@@ -38,7 +38,9 @@ const Input = ({
|
|
|
38
38
|
}, [isFocused]);
|
|
39
39
|
|
|
40
40
|
useEffect(() => {
|
|
41
|
-
|
|
41
|
+
if (textValue !== undefined) {
|
|
42
|
+
textChange(textValue);
|
|
43
|
+
}
|
|
42
44
|
}, [textValue]);
|
|
43
45
|
|
|
44
46
|
useEffect(() => {
|
|
@@ -91,8 +93,8 @@ const Input = ({
|
|
|
91
93
|
<Placeholder
|
|
92
94
|
active={
|
|
93
95
|
isFocused ||
|
|
94
|
-
(textValue && textValue.length > 0) ||
|
|
95
|
-
(value && value.length > 0)
|
|
96
|
+
(textValue !== null && String(textValue).trim().length > 0) ||
|
|
97
|
+
(value !== null && String(value).trim().length > 0)
|
|
96
98
|
}
|
|
97
99
|
>
|
|
98
100
|
<MarginHorizontal>
|
|
@@ -108,18 +110,19 @@ const Input = ({
|
|
|
108
110
|
<Row>
|
|
109
111
|
{euro &&
|
|
110
112
|
(isFocused ||
|
|
111
|
-
(textValue && textValue.length > 0) ||
|
|
112
|
-
(value && value.length > 0)) && (
|
|
113
|
+
(textValue !== null && String(textValue).trim().length > 0) ||
|
|
114
|
+
(value !== null && String(value).trim().length > 0)) && (
|
|
113
115
|
<Row style={{ minHeight: 40, alignItems: "center" }}>
|
|
114
116
|
{euro}
|
|
115
117
|
</Row>
|
|
116
118
|
)}
|
|
119
|
+
|
|
117
120
|
<InputElement
|
|
118
121
|
ref={inputRef}
|
|
119
122
|
onFocus={() => setIsFocused(true)}
|
|
120
123
|
onBlur={() => setIsFocused(false)}
|
|
121
124
|
onChangeText={(text) => setTextValue(text)}
|
|
122
|
-
defaultValue={defaultValue}
|
|
125
|
+
defaultValue={defaultValue && String(defaultValue)}
|
|
123
126
|
value={value}
|
|
124
127
|
multiline={multiline}
|
|
125
128
|
numberOfLines={numberOfLines}
|
package/src/Layout/Box.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BoxElement } from "./Layout.style";
|
|
3
3
|
|
|
4
|
-
const Box = ({ children, color = "", style, direction = false }) => {
|
|
4
|
+
const Box = ({ children, color = "", style, direction = false, ...rest }) => {
|
|
5
5
|
return (
|
|
6
6
|
<BoxElement
|
|
7
7
|
style={{ backgroundColor: color, ...style }}
|
|
8
8
|
direction={direction}
|
|
9
|
+
{...rest}
|
|
9
10
|
>
|
|
10
11
|
{children}
|
|
11
12
|
</BoxElement>
|
|
@@ -1,57 +1,70 @@
|
|
|
1
1
|
const colors = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
2
|
+
// Whites & Grays
|
|
3
|
+
color1: "#FFFFFF", // Pure white
|
|
4
|
+
color7: "#dfe6e9", // Light gray
|
|
5
|
+
color8: "#F8F9FB", // Very light gray
|
|
6
|
+
color10: "#F2F3F7", // Another light gray
|
|
7
|
+
color16: "#636e72", // Dark gray
|
|
8
|
+
greyText: "#b2bec3", // Gray for text
|
|
9
|
+
greyButton: "#94A3A9", // Gray for buttons
|
|
10
|
+
color2: "#2d3436", // Almost black
|
|
11
|
+
|
|
12
|
+
// Blues
|
|
13
|
+
color3: "#74b9ff", // Light blue
|
|
14
|
+
color3light: "#E1F0FF", // Very light blue
|
|
15
|
+
color4: "#0984e3", // Medium blue
|
|
16
|
+
blue: "#74b9ff", // Light blue (duplicate)
|
|
17
|
+
blueLight: "#E1F0FF", // Very light blue (duplicate)
|
|
18
|
+
darkBlue: "#0984e3", // Medium blue (duplicate)
|
|
19
|
+
darkBlueLight: "#CFEAFF", // Pale blue
|
|
20
|
+
color15: "#00cec9", // Cyan
|
|
21
|
+
color18: "#81ecec", // Light cyan
|
|
22
|
+
|
|
23
|
+
// Yellows
|
|
24
|
+
color5: "#ffeaa7", // Light yellow
|
|
25
|
+
color5light: "#FFF9E5", // Very light yellow
|
|
26
|
+
color5border: "#E4E0D2", // Yellow border
|
|
27
|
+
darkYellow: "#fdcb6e", // Dark yellow
|
|
28
|
+
darkYellowLight: "#FFF7E8", // Light yellow
|
|
29
|
+
darkYellowDark: "#8C6F39", // Brown yellow
|
|
30
|
+
darkYellowGray: "#ECE5D8", // Grayish yellow
|
|
31
|
+
|
|
32
|
+
// Oranges & Browns
|
|
33
|
+
color9: "#FFA15F", // Orange
|
|
34
|
+
color9light: "#F9F0EA", // Light orange
|
|
35
|
+
color9dark: "#804F2D", // Dark brown
|
|
36
|
+
color9border: "#DDD1C9", // Orange border
|
|
37
|
+
color13: "#fab1a0", // Peach
|
|
38
|
+
orange: "#FFA15F", // Orange (duplicate)
|
|
39
|
+
orangeLight: "#FFFAF6", // Light orange
|
|
40
|
+
orangeDark: "#3D1901", // Very dark brown
|
|
41
|
+
orangeGray: "#EEE5DE", // Grayish orange
|
|
42
|
+
|
|
43
|
+
// Reds
|
|
44
|
+
color6: "#ff7675", // Red
|
|
45
|
+
color6light: "#FFDCDB", // Light red
|
|
46
|
+
red: "#ff7675", // Red (duplicate)
|
|
47
|
+
redlight: "#fff0ed", // Very light red
|
|
48
|
+
redDark: "#9C4140", // Dark red
|
|
49
|
+
redBorder: "#D2BBBB", // Red border
|
|
50
|
+
|
|
51
|
+
// Greens
|
|
52
|
+
color11: "#00b894", // Green
|
|
53
|
+
color11light: "#EEFFFC", // Light green
|
|
54
|
+
color11border: "#D2E3E0", // Green border
|
|
55
|
+
color14: "#00b894", // Green (duplicate)
|
|
56
|
+
green: "#55efc4", // Light green
|
|
57
|
+
greenLight: "#F3FFFC", // Very light green
|
|
58
|
+
greenDark: "#236A56", // Dark green
|
|
59
|
+
|
|
60
|
+
// Purples
|
|
61
|
+
color12: "#6c5ce7", // Purple
|
|
62
|
+
color12light: "#F5F4FF", // Light purple
|
|
63
|
+
color12border: "#DFDDEA", // Purple border
|
|
64
|
+
color12dark: "#584E74", // Dark purple
|
|
65
|
+
color17: "#6c5ce7", // Purple (duplicate)
|
|
66
|
+
purple: "#6c5ce7", // Purple (duplicate)
|
|
67
|
+
purpleLight: "#F9F8FF", // Light purple
|
|
68
|
+
purpleDark: "#372E78", // Dark purple
|
|
56
69
|
};
|
|
57
70
|
export default colors;
|