@servesall/atoms 1.0.55 → 1.0.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servesall/atoms",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "Atoms for react-native",
5
5
  "main": "dist/bundle.cjs.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -72,6 +72,8 @@ import sportsResources from "./sportsResources.json";
72
72
  import toursResources from "./toursResources.json";
73
73
  import plus from "./plus.json";
74
74
  import minus from "./minus.json";
75
+ import visible from "./visible.json";
76
+ import nonVisible from "./non-visible.json";
75
77
 
76
78
  const allCategories = {
77
79
  restaurants,
@@ -147,6 +149,8 @@ const allCategories = {
147
149
  toursResources,
148
150
  plus,
149
151
  minus,
152
+ visible,
153
+ nonVisible,
150
154
  };
151
155
 
152
156
  export default allCategories;
@@ -0,0 +1 @@
1
+ {"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"not-visible","ip":0,"st":0,"ind":1,"hix":1,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[11,11,0]},"p":{"s":true,"x":{"a":0,"k":49.99999870020041},"y":{"a":0,"k":49.99999870020041}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[459.70000000000005,459.70000000000005]}},"shapes":[{"ty":"gr","nm":"not-visible shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[11.3699694,4.71196842],[10.0009689,4.61196876],[1.5779686,9.94596863],[3.33296847,12.4649687]],"i":[[0,0],[0.46499999999999986,0],[1.4989999500000002,-3.1510000199999997],[-0.7139999800000001,-0.7330000000000005]],"o":[[-0.44700000000000095,-0.06599999999999984],[-3.7209999200000006,0],[0.4449999900000001,0.935999970000001],[0,0]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[8.6669693,15.184968],[10.0009689,15.2799692],[18.4239693,9.94596863],[16.6679688,7.42596817]],"i":[[0,0],[-0.4529999799999995,0],[-1.4989999999999988,3.1510000700000003],[0.7149998999999987,0.7329999799999998]],"o":[[0.4350000000000005,0.062000000000001165],[3.721,0],[-0.4450000000000003,-0.9359999899999991],[0,0]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[7.38896847,9.40796852],[9.45996857,7.33396816]],"i":[[0,0],[-1.0399999599999994,0.21399999999999952]],"o":[[0.21300000000000008,-1.0399999600000012],[0,0]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[19.3329697,0.66796875],[0.66796875,19.3329697]],"i":[[0,0],[0,0]],"o":[[0,0],[0,0]]}}},{"ty":"st","o":{"a":0,"k":100},"c":{"a":0,"k":[0,0,0,1]},"lc":2,"lj":2,"ml":1,"w":{"a":0,"k":1.5},"d":[{"n":"d","v":{"a":0,"k":0},"nm":"0"},{"n":"g","v":{"a":0,"k":0},"nm":"1"}]},{"ty":"fl","o":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"r":1},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[1,1]},"r":{"a":0,"k":0}}]}],"op":1}],"op":1,"w":100,"h":100}
@@ -0,0 +1 @@
1
+ {"ip":0,"fr":60,"v":"5.1.20","assets":[],"layers":[{"ty":4,"nm":"visible","ip":0,"st":0,"ind":1,"hix":1,"ks":{"o":{"a":0,"k":100},"or":{"a":0,"k":[0,0,0]},"a":{"a":0,"k":[9,6.5,0]},"p":{"s":true,"x":{"a":0,"k":49.999999524764874},"y":{"a":0,"k":50.00049965677462}},"rx":{"a":0,"k":0},"ry":{"a":0,"k":0},"rz":{"a":0,"k":0},"s":{"a":0,"k":[499.09999999999997,499.09999999999997]}},"shapes":[{"ty":"gr","nm":"visible shape group","it":[{"ty":"sh","ks":{"a":0,"k":{"c":false,"v":[[11.6667023,5.9460001],[8.99970245,8.61299992],[6.33270264,5.9460001],[8.99970245,3.27900028]],"i":[[0,0],[1.4730000500000013,0],[0,1.4730000499999996],[-1.4730000499999996,0]],"o":[[0,1.4730000499999996],[-1.4730000499999996,0],[0,-1.4730000500000004],[0,0]]}}},{"ty":"sh","ks":{"a":0,"k":{"c":true,"v":[[8.99970245,0.61328125],[17.2494068,5.94653273],[8.99970245,11.2797823],[0.75,5.94653273]],"i":[[-3.6723422999999995,0],[-1.4162720999999987,-3.1443119100000003],[3.672342350000001,0],[1.41627145,3.14431142]],"o":[[3.672342350000001,0],[-1.4162720999999987,3.14431142],[-3.6723422999999995,0],[1.41627145,-3.1443119100000003]]}}},{"ty":"st","o":{"a":0,"k":100},"c":{"a":0,"k":[0,0,0,1]},"lc":2,"lj":2,"ml":1,"w":{"a":0,"k":1.5},"d":[{"n":"d","v":{"a":0,"k":0},"nm":"0"},{"n":"g","v":{"a":0,"k":0},"nm":"1"}]},{"ty":"fl","o":{"a":0,"k":0},"c":{"a":0,"k":[0,0,0,0]},"r":1},{"ty":"tr","o":{"a":0,"k":100},"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"p":{"a":0,"k":[0,1]},"r":{"a":0,"k":0}}]}],"op":1}],"op":1,"w":100,"h":100}
@@ -1,4 +1,4 @@
1
- import styled from 'styled-components/native';
1
+ import styled from "styled-components/native";
2
2
 
3
3
  export const InputWrapper = styled.Pressable`
4
4
  min-height: 80px;
@@ -7,8 +7,9 @@ export const InputWrapper = styled.Pressable`
7
7
  export const InputElement = styled.TextInput`
8
8
  margin-top: 26px;
9
9
  min-height: 50px;
10
- font-family: ${props => props.theme.fontFamily2};
11
- font-size: ${props => props.theme.small};
10
+ font-family: ${(props) => props.theme.fontFamily2};
11
+ font-size: ${(props) => props.theme.small};
12
+ color: ${(props) => props.theme.color2};
12
13
  `;
13
14
  export const BorderWrapper = styled.View`
14
15
  height: 4px;
@@ -1,80 +1,84 @@
1
- import React, {useEffect, useState, useRef} from 'react';
2
- import {H3} from '../../Text';
3
- import {KeyboardAvoidingView, Platform} from 'react-native';
4
- import {InputWrapper, InputElement, BorderWrapper} from './Animated.style';
5
- import LineAnimation from './LineAnimation';
6
- import Placeholder from './Placeholder';
1
+ import React, { useEffect, useState, useRef } from "react";
2
+ import { H3 } from "../../Text";
3
+ import { KeyboardAvoidingView, Platform } from "react-native";
4
+ import { InputWrapper, InputElement, BorderWrapper } from "./Animated.style";
5
+ import LineAnimation from "./LineAnimation";
6
+ import Placeholder from "./Placeholder";
7
7
 
8
8
  const Input = ({
9
- children,
10
- style,
11
- borderColorIdle,
12
- borderColorActive,
13
- borderColorError,
14
- textChange = () => {},
15
- value,
16
- multiline = false,
17
- numberOfLines = 1,
18
- maxLength = 1000,
19
- autoFocus = false,
20
- keyboardType,
21
- editable = true,
22
- keyboardVerticalOffset = 0,
23
- hasError = false,
24
- error,
25
- }) => {
26
- const [isFocused, setIsFocused] = useState(false);
27
- const [textValue, setTextValue] = useState(value);
28
- const inputRef = useRef();
9
+ children,
10
+ style,
11
+ borderColorIdle,
12
+ borderColorActive,
13
+ borderColorError,
14
+ textChange = () => {},
15
+ value,
16
+ multiline = false,
17
+ numberOfLines = 1,
18
+ maxLength = 1000,
19
+ autoFocus = false,
20
+ keyboardType,
21
+ editable = true,
22
+ keyboardVerticalOffset = 0,
23
+ hasError = false,
24
+ error,
25
+ }) => {
26
+ const [isFocused, setIsFocused] = useState(false);
27
+ const [textValue, setTextValue] = useState(value);
28
+ const inputRef = useRef();
29
29
 
30
- useEffect(() => {
31
- textChange(textValue);
32
- }, [textValue]);
30
+ useEffect(() => {
31
+ textChange(textValue);
32
+ }, [textValue]);
33
33
 
34
- useEffect(() => {
35
- autoFocus && inputRef.current?.focus();
36
- }, [autoFocus]);
34
+ useEffect(() => {
35
+ autoFocus && inputRef.current?.focus();
36
+ }, [autoFocus]);
37
37
 
38
- return (
39
- <KeyboardAvoidingView
40
- behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
41
- keyboardVerticalOffset={keyboardVerticalOffset}>
42
- <InputWrapper
43
- onPress={() => {
44
- setIsFocused(true);
45
- inputRef.current?.focus();
46
- }}>
47
- <Placeholder active={isFocused || (textValue && textValue.length > 0)}>
48
- {!hasError ? children : (
49
- <H3 color={borderColorError}>{error || hasError}</H3>
50
- )}
51
- </Placeholder>
52
- <InputElement
53
- ref={inputRef}
54
- onFocus={() => setIsFocused(true)}
55
- onBlur={() => setIsFocused(false)}
56
- onChangeText={(text) => setTextValue(text)}
57
- value={value}
58
- multiline={multiline}
59
- numberOfLines={numberOfLines}
60
- maxLength={maxLength}
61
- autoFocus={autoFocus}
62
- keyboardType={keyboardType}
63
- editable={editable}
64
- style={style}
65
- />
66
- <BorderWrapper>
67
- <LineAnimation
68
- active={isFocused}
69
- borderColorActive={borderColorActive}
70
- borderColorIdle={borderColorIdle}
71
- borderColorError={borderColorError}
72
- hasError={hasError}
73
- />
74
- </BorderWrapper>
75
- </InputWrapper>
76
- </KeyboardAvoidingView>
77
- );
38
+ return (
39
+ <KeyboardAvoidingView
40
+ behavior={Platform.OS === "ios" ? "padding" : "height"}
41
+ keyboardVerticalOffset={keyboardVerticalOffset}
42
+ >
43
+ <InputWrapper
44
+ onPress={() => {
45
+ setIsFocused(true);
46
+ inputRef.current?.focus();
47
+ }}
48
+ >
49
+ <Placeholder active={isFocused || (textValue && textValue.length > 0)}>
50
+ {!hasError ? (
51
+ children
52
+ ) : (
53
+ <H3 color={borderColorError}>{error || hasError}</H3>
54
+ )}
55
+ </Placeholder>
56
+ <InputElement
57
+ ref={inputRef}
58
+ onFocus={() => setIsFocused(true)}
59
+ onBlur={() => setIsFocused(false)}
60
+ onChangeText={(text) => setTextValue(text)}
61
+ value={value}
62
+ multiline={multiline}
63
+ numberOfLines={numberOfLines}
64
+ maxLength={maxLength}
65
+ autoFocus={autoFocus}
66
+ keyboardType={keyboardType}
67
+ editable={editable}
68
+ style={style}
69
+ />
70
+ <BorderWrapper>
71
+ <LineAnimation
72
+ active={isFocused}
73
+ borderColorActive={borderColorActive}
74
+ borderColorIdle={borderColorIdle}
75
+ borderColorError={borderColorError}
76
+ hasError={hasError}
77
+ />
78
+ </BorderWrapper>
79
+ </InputWrapper>
80
+ </KeyboardAvoidingView>
81
+ );
78
82
  };
79
83
 
80
84
  export default Input;
@@ -46,6 +46,7 @@ export default function Switch({
46
46
  value = false,
47
47
  onValueChange = () => {},
48
48
  micro = false,
49
+ style,
49
50
  }) {
50
51
  const [isEnabled, setIsEnabled] = useState(value);
51
52
  const toggleSwitch = () => {
@@ -66,6 +67,7 @@ export default function Switch({
66
67
  borderWidth: 1,
67
68
  borderColor: isEnabled ? colors.color15 : colors.color10,
68
69
  opacity: enabled ? 1 : 0.6,
70
+ ...style,
69
71
  }}
70
72
  color={colors.color1}
71
73
  onClick={toggleSwitch}
@@ -26,5 +26,6 @@ const colors = {
26
26
  color15: "#00cec9",
27
27
  color16: "#636e72",
28
28
  color17: "#6c5ce7",
29
+ color18: "#81ecec",
29
30
  };
30
31
  export default colors;