sapo-components-ui-rn 1.0.0

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 (215) hide show
  1. package/README.md +69 -0
  2. package/dist/assets/error.png +0 -0
  3. package/dist/assets/icon-checkbox-active.svg +4 -0
  4. package/dist/assets/icon-checkbox.svg +3 -0
  5. package/dist/assets/image_default.png +0 -0
  6. package/dist/assets/images/error.png +0 -0
  7. package/dist/assets/images/image_default.png +0 -0
  8. package/dist/assets/images/info.png +0 -0
  9. package/dist/assets/images/success.png +0 -0
  10. package/dist/assets/images/warning.png +0 -0
  11. package/dist/assets/info.png +0 -0
  12. package/dist/assets/success.png +0 -0
  13. package/dist/assets/svg/icon-checkbox-active.svg +4 -0
  14. package/dist/assets/svg/icon-checkbox.svg +3 -0
  15. package/dist/assets/warning.png +0 -0
  16. package/dist/components/ActivityIndicator.d.ts +28 -0
  17. package/dist/components/Avatar/index.d.ts +17 -0
  18. package/dist/components/Badge/index.d.ts +13 -0
  19. package/dist/components/Button/index.d.ts +23 -0
  20. package/dist/components/ButtonIcon/index.d.ts +18 -0
  21. package/dist/components/Checkbox/index.d.ts +14 -0
  22. package/dist/components/ChipBar/index.d.ts +16 -0
  23. package/dist/components/CountingDot/index.d.ts +13 -0
  24. package/dist/components/FloatingButton/index.d.ts +17 -0
  25. package/dist/components/Icon/index.d.ts +17 -0
  26. package/dist/components/IconSvg/index.d.ts +12 -0
  27. package/dist/components/Image/index.d.ts +14 -0
  28. package/dist/components/ProgressBar.d.ts +42 -0
  29. package/dist/components/RadioButton/index.d.ts +13 -0
  30. package/dist/components/ScaleButton/index.d.ts +4 -0
  31. package/dist/components/SelectionField/index.d.ts +24 -0
  32. package/dist/components/Spacer/index.d.ts +9 -0
  33. package/dist/components/Switch/Switch.d.ts +47 -0
  34. package/dist/components/Switch/utils.d.ts +14 -0
  35. package/dist/components/Text/index.d.ts +14 -0
  36. package/dist/components/TextInput/Addons/Outline.d.ts +15 -0
  37. package/dist/components/TextInput/Addons/Underline.d.ts +19 -0
  38. package/dist/components/TextInput/Adornment/TextInputAdornment.d.ts +43 -0
  39. package/dist/components/TextInput/Adornment/TextInputAffix.d.ts +72 -0
  40. package/dist/components/TextInput/Adornment/enums.d.ts +12 -0
  41. package/dist/components/TextInput/Adornment/types.d.ts +11 -0
  42. package/dist/components/TextInput/Adornment/utils.d.ts +11 -0
  43. package/dist/components/TextInput/Label/InputLabel.d.ts +4 -0
  44. package/dist/components/TextInput/Label/LabelBackground.d.ts +4 -0
  45. package/dist/components/TextInput/TextInput.d.ts +171 -0
  46. package/dist/components/TextInput/TextInputDefault.d.ts +4 -0
  47. package/dist/components/TextInput/TextInputFlat.d.ts +4 -0
  48. package/dist/components/TextInput/constants.d.ts +31 -0
  49. package/dist/components/TextInput/helpers.d.ts +95 -0
  50. package/dist/components/TextInput/types.d.ts +154 -0
  51. package/dist/components/Toast/ToastProvider.d.ts +21 -0
  52. package/dist/components/Toast/index.d.ts +3 -0
  53. package/dist/components/Typography/AnimatedText.d.ts +34 -0
  54. package/dist/components/Typography/StyledText.d.ts +12 -0
  55. package/dist/components/Typography/Text.d.ts +35 -0
  56. package/dist/components/Typography/types.d.ts +2 -0
  57. package/dist/components/View/index.d.ts +38 -0
  58. package/dist/components/ViewVisibleAnimated/index.d.ts +25 -0
  59. package/dist/constants.d.ts +1 -0
  60. package/dist/core/theming.d.ts +43 -0
  61. package/dist/icons/IconArrowDown.d.ts +4 -0
  62. package/dist/icons/IconCheckbox.d.ts +4 -0
  63. package/dist/icons/IconCheckboxActive.d.ts +4 -0
  64. package/dist/icons/IconClearText.d.ts +4 -0
  65. package/dist/icons/IconRadio.d.ts +4 -0
  66. package/dist/icons/IconRadioActive.d.ts +4 -0
  67. package/dist/icons/IconRadioDisable.d.ts +4 -0
  68. package/dist/index.d.ts +33 -0
  69. package/dist/index.esm.js +6758 -0
  70. package/dist/index.esm.js.map +1 -0
  71. package/dist/index.js +6823 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/styles/fonts.d.ts +78 -0
  74. package/dist/styles/overlay.d.ts +3 -0
  75. package/dist/styles/shadow.d.ts +18 -0
  76. package/dist/styles/themes/DarkTheme.d.ts +2 -0
  77. package/dist/styles/themes/LightTheme.d.ts +2 -0
  78. package/dist/styles/themes/index.d.ts +2 -0
  79. package/dist/styles/themes/tokens.d.ts +830 -0
  80. package/dist/theme/blue.d.ts +14 -0
  81. package/dist/theme/colors.d.ts +99 -0
  82. package/dist/theme/container-styles.d.ts +124 -0
  83. package/dist/theme/dimensions.d.ts +36 -0
  84. package/dist/theme/green.d.ts +15 -0
  85. package/dist/theme/icon.d.ts +5 -0
  86. package/dist/theme/ink.d.ts +11 -0
  87. package/dist/theme/orange.d.ts +14 -0
  88. package/dist/theme/purple.d.ts +6 -0
  89. package/dist/theme/red.d.ts +15 -0
  90. package/dist/theme/themes.d.ts +277 -0
  91. package/dist/theme/white.d.ts +10 -0
  92. package/dist/theme/yellow.d.ts +15 -0
  93. package/dist/types/index.d.ts +65 -0
  94. package/dist/types.d.ts +220 -0
  95. package/dist/utils/BackHandler/BackHandler.d.ts +9 -0
  96. package/dist/utils/BackHandler/BackHandler.native.d.ts +2 -0
  97. package/dist/utils/addEventListener.d.ts +12 -0
  98. package/dist/utils/forwardRef.d.ts +11 -0
  99. package/dist/utils/function-utils.d.ts +12 -0
  100. package/dist/utils/getContrastingColor.d.ts +2 -0
  101. package/dist/utils/hasTouchHandler.d.ts +5 -0
  102. package/dist/utils/roundLayoutSize.d.ts +1 -0
  103. package/dist/utils/splitStyles.d.ts +19 -0
  104. package/dist/utils/toast-manager.d.ts +21 -0
  105. package/dist/utils/useAnimatedValue.d.ts +2 -0
  106. package/dist/utils/useAnimatedValueArray.d.ts +2 -0
  107. package/dist/utils/useIsKeyboardShown.d.ts +6 -0
  108. package/dist/utils/useLayout.d.ts +6 -0
  109. package/dist/utils/useLazyRef.d.ts +2 -0
  110. package/package.json +104 -0
  111. package/src/.DS_Store +0 -0
  112. package/src/assets/images/error.png +0 -0
  113. package/src/assets/images/image_default.png +0 -0
  114. package/src/assets/images/info.png +0 -0
  115. package/src/assets/images/success.png +0 -0
  116. package/src/assets/images/warning.png +0 -0
  117. package/src/assets/svg/icon-checkbox-active.svg +4 -0
  118. package/src/assets/svg/icon-checkbox.svg +3 -0
  119. package/src/babel/.eslintrc +7 -0
  120. package/src/babel/index.js +63 -0
  121. package/src/components/.DS_Store +0 -0
  122. package/src/components/ActivityIndicator.tsx +238 -0
  123. package/src/components/Avatar/index.tsx +102 -0
  124. package/src/components/Badge/index.tsx +55 -0
  125. package/src/components/Button/index.tsx +162 -0
  126. package/src/components/ButtonIcon/index.tsx +98 -0
  127. package/src/components/Checkbox/index.tsx +107 -0
  128. package/src/components/ChipBar/index.tsx +112 -0
  129. package/src/components/CountingDot/index.tsx +63 -0
  130. package/src/components/FloatingButton/index.tsx +99 -0
  131. package/src/components/Icon/index.tsx +135 -0
  132. package/src/components/IconSvg/index.tsx +42 -0
  133. package/src/components/Image/index.tsx +127 -0
  134. package/src/components/ProgressBar.tsx +272 -0
  135. package/src/components/RadioButton/index.tsx +105 -0
  136. package/src/components/ScaleButton/index.tsx +17 -0
  137. package/src/components/SelectionField/index.tsx +166 -0
  138. package/src/components/Spacer/index.tsx +19 -0
  139. package/src/components/Switch/Switch.tsx +110 -0
  140. package/src/components/Switch/utils.ts +96 -0
  141. package/src/components/Text/index.tsx +69 -0
  142. package/src/components/TextInput/.DS_Store +0 -0
  143. package/src/components/TextInput/Addons/Outline.tsx +62 -0
  144. package/src/components/TextInput/Addons/Underline.tsx +71 -0
  145. package/src/components/TextInput/Adornment/TextInputAdornment.tsx +191 -0
  146. package/src/components/TextInput/Adornment/TextInputAffix.tsx +212 -0
  147. package/src/components/TextInput/Adornment/enums.tsx +12 -0
  148. package/src/components/TextInput/Adornment/types.tsx +11 -0
  149. package/src/components/TextInput/Adornment/utils.ts +39 -0
  150. package/src/components/TextInput/Label/InputLabel.tsx +216 -0
  151. package/src/components/TextInput/Label/LabelBackground.tsx +100 -0
  152. package/src/components/TextInput/TextInput.tsx +564 -0
  153. package/src/components/TextInput/TextInputDefault.tsx +187 -0
  154. package/src/components/TextInput/TextInputFlat.tsx +452 -0
  155. package/src/components/TextInput/constants.tsx +48 -0
  156. package/src/components/TextInput/helpers.tsx +546 -0
  157. package/src/components/TextInput/types.tsx +155 -0
  158. package/src/components/Toast/ToastProvider.tsx +69 -0
  159. package/src/components/Toast/index.tsx +239 -0
  160. package/src/components/Typography/AnimatedText.tsx +84 -0
  161. package/src/components/Typography/StyledText.tsx +53 -0
  162. package/src/components/Typography/Text.tsx +189 -0
  163. package/src/components/Typography/types.tsx +5 -0
  164. package/src/components/View/index.tsx +175 -0
  165. package/src/components/ViewVisibleAnimated/index.tsx +199 -0
  166. package/src/constants.tsx +16 -0
  167. package/src/core/theming.tsx +144 -0
  168. package/src/icons/IconArrowDown.tsx +14 -0
  169. package/src/icons/IconCheckbox.tsx +20 -0
  170. package/src/icons/IconCheckboxActive.tsx +18 -0
  171. package/src/icons/IconClearText.tsx +14 -0
  172. package/src/icons/IconRadio.tsx +11 -0
  173. package/src/icons/IconRadioActive.tsx +12 -0
  174. package/src/icons/IconRadioDisable.tsx +12 -0
  175. package/src/index.ts +51 -0
  176. package/src/index.tsx +50 -0
  177. package/src/styles/fonts.tsx +89 -0
  178. package/src/styles/overlay.tsx +69 -0
  179. package/src/styles/shadow.tsx +47 -0
  180. package/src/styles/themes/DarkTheme.tsx +157 -0
  181. package/src/styles/themes/LightTheme.tsx +160 -0
  182. package/src/styles/themes/index.ts +3 -0
  183. package/src/styles/themes/tokens.tsx +481 -0
  184. package/src/theme/blue.ts +25 -0
  185. package/src/theme/colors.ts +21 -0
  186. package/src/theme/container-styles.tsx +126 -0
  187. package/src/theme/dimensions.ts +44 -0
  188. package/src/theme/green.ts +27 -0
  189. package/src/theme/icon.ts +7 -0
  190. package/src/theme/ink.ts +18 -0
  191. package/src/theme/orange.ts +24 -0
  192. package/src/theme/purple.ts +8 -0
  193. package/src/theme/red.ts +26 -0
  194. package/src/theme/themes.tsx +287 -0
  195. package/src/theme/white.ts +16 -0
  196. package/src/theme/yellow.ts +26 -0
  197. package/src/types/index.ts +71 -0
  198. package/src/types/svg.d.ts +5 -0
  199. package/src/types.ts +259 -0
  200. package/src/types.tsx +284 -0
  201. package/src/utils/BackHandler/BackHandler.native.tsx +3 -0
  202. package/src/utils/BackHandler/BackHandler.tsx +11 -0
  203. package/src/utils/addEventListener.tsx +56 -0
  204. package/src/utils/forwardRef.tsx +23 -0
  205. package/src/utils/function-utils.tsx +108 -0
  206. package/src/utils/getContrastingColor.tsx +15 -0
  207. package/src/utils/hasTouchHandler.tsx +23 -0
  208. package/src/utils/roundLayoutSize.ts +2 -0
  209. package/src/utils/splitStyles.ts +60 -0
  210. package/src/utils/toast-manager.tsx +46 -0
  211. package/src/utils/useAnimatedValue.tsx +9 -0
  212. package/src/utils/useAnimatedValueArray.tsx +13 -0
  213. package/src/utils/useIsKeyboardShown.tsx +55 -0
  214. package/src/utils/useLayout.tsx +29 -0
  215. package/src/utils/useLazyRef.tsx +11 -0
@@ -0,0 +1,27 @@
1
+ const GREEN180 = "#002C22";
2
+ const GREEN160 = "#004F3B";
3
+ const GREEN140 = "#006045";
4
+ const GREEN120 = "#0DB473";
5
+ const GREEN100 = "#009966";
6
+ const GREEN80 = "#00BC7D";
7
+ const GREEN60 = "#00D492";
8
+ const GREEN40 = "#5EE9B5";
9
+ const GREEN20 = "#A4F4CF";
10
+ const GREEN10 = "#D0FAE5";
11
+ const GREEN5 = "#ECFDF5";
12
+ const GREEN_STATUS = "#0DB473";
13
+
14
+ export default {
15
+ GREEN180,
16
+ GREEN160,
17
+ GREEN140,
18
+ GREEN120,
19
+ GREEN100,
20
+ GREEN80,
21
+ GREEN60,
22
+ GREEN40,
23
+ GREEN20,
24
+ GREEN10,
25
+ GREEN5,
26
+ GREEN_STATUS,
27
+ };
@@ -0,0 +1,7 @@
1
+ const ICON100 = "#46515F"
2
+ const ICON50 = "#A1A5AB";
3
+
4
+ export default {
5
+ ICON100,
6
+ ICON50,
7
+ };
@@ -0,0 +1,18 @@
1
+ const INK100 = "#09090B";
2
+ const INK90 = "#27272A";
3
+ const INK80 = "#27272A";
4
+ const INK60 = "#696A6E";
5
+ const INK40 = "#84868A";
6
+ const INK20 = "#C8C9CC";
7
+ const INK10 = "#EAEBED";
8
+ const INK5 = "#F4F5F7";
9
+ export default {
10
+ INK100,
11
+ INK90,
12
+ INK80,
13
+ INK60,
14
+ INK40,
15
+ INK20,
16
+ INK10,
17
+ INK5,
18
+ };
@@ -0,0 +1,24 @@
1
+ const ORANGE180 = "#441306";
2
+ const ORANGE160 = "#7E2A0C";
3
+ const ORANGE140 = "#9F2D00";
4
+ const ORANGE120 = "#CA3500";
5
+ const ORANGE100 = "#F54900";
6
+ const ORANGE80 = "#FF6900";
7
+ const ORANGE60 = "#FF8904";
8
+ const ORANGE40 = "#FFB86A";
9
+ const ORANGE20 = "#FFD6A7";
10
+ const ORANGE10 = "#FFEDD4";
11
+ const ORANGE5 = "#FFF7ED";
12
+ export default {
13
+ ORANGE180,
14
+ ORANGE160,
15
+ ORANGE140,
16
+ ORANGE120,
17
+ ORANGE100,
18
+ ORANGE80,
19
+ ORANGE60,
20
+ ORANGE40,
21
+ ORANGE20,
22
+ ORANGE10,
23
+ ORANGE5,
24
+ };
@@ -0,0 +1,8 @@
1
+ const PURPLE100 = "#5364FE";
2
+ const PURPLE5 = "#EEF2FD";
3
+ const PURPLE_BG = "##BAC1FF";
4
+ export default {
5
+ PURPLE100,
6
+ PURPLE5,
7
+ PURPLE_BG,
8
+ };
@@ -0,0 +1,26 @@
1
+ const RED180 = "#460809";
2
+ const RED160 = "#82181A";
3
+ const RED140 = "#9F0712";
4
+ const RED120 = "#C10007";
5
+ const RED100 = "#E7000B";
6
+ const RED80 = "#FB2C36";
7
+ const RED60 = "#FF6467";
8
+ const RED40 = "#FFA2A2";
9
+ const RED20 = "#FFC9C9";
10
+ const RED10 = "#FFE2E2";
11
+ const RED5 = "#FFF3F2";
12
+ const RED_STATUS = "#EE4747";
13
+ export default {
14
+ RED180,
15
+ RED160,
16
+ RED140,
17
+ RED120,
18
+ RED100,
19
+ RED80,
20
+ RED60,
21
+ RED40,
22
+ RED20,
23
+ RED10,
24
+ RED5,
25
+ RED_STATUS,
26
+ };
@@ -0,0 +1,287 @@
1
+ import blue from "./blue";
2
+ import green from "./green";
3
+ import ink from "./ink";
4
+ import purple from "./purple";
5
+ import red from "./red";
6
+ import white from "./white";
7
+ import yellow from "./yellow";
8
+
9
+ export const THEME_SUPPORT = {
10
+ LIGHT: "light",
11
+ DARK: "dark",
12
+ };
13
+
14
+ export default {
15
+ dark: {
16
+ dark: true,
17
+ colors: {
18
+ primary: blue.BLUE100,
19
+ background: ink.INK100,
20
+ card: white.WHITE100,
21
+ text: white.WHITE100,
22
+ border: ink.INK10,
23
+ gray: ink.INK60,
24
+ backgroundLight: ink.INK80,
25
+ //new theme colors
26
+ backgroundPrimary: ink.INK5,
27
+ backgroundSecondary: white.WHITE100,
28
+ borderBrandDefault: blue.BLUE100,
29
+ borderCriticalDefault: red.RED100,
30
+ borderCriticalHover: red.RED80,
31
+ borderCriticalPressed: red.RED120,
32
+ borderErrorDefault: red.RED100,
33
+ borderInfoDefault: blue.BLUE100,
34
+ borderPrimaryDefault: ink.INK10,
35
+ borderPrimaryDisabled: ink.INK10,
36
+ borderPrimaryHovered: ink.INK20,
37
+ borderPrimaryInverseDefault: blue.BLUE100,
38
+ borderPrimaryPressed: blue.BLUE100,
39
+ borderSuccessDefault: green.GREEN100,
40
+ borderWarningDefault: yellow.YELLOW100,
41
+ iconBrandDefault: blue.BLUE100,
42
+ iconCriticalDefault: red.RED100,
43
+ iconErrorDefault: red.RED100,
44
+ iconInfoDefault: blue.BLUE100,
45
+ iconPrimaryDefault: ink.INK40,
46
+ iconPrimaryHover: ink.INK60,
47
+ iconPrimaryDisabled: ink.INK60,
48
+ iconPrimaryInverseDefault: white.WHITE100,
49
+ iconPrimaryInverseHover: white.WHITE80,
50
+ iconPrimaryInversePressed: white.WHITE80,
51
+ iconPrimaryPressed: ink.INK60,
52
+ iconSuccessDefault: green.GREEN100,
53
+ iconWarningDefault: yellow.YELLOW100,
54
+ surfaceBrandDefault: blue.BLUE100,
55
+ surfaceBrandDisabled: ink.INK10,
56
+ surfaceBrandHover: blue.BLUE80,
57
+ surfaceBrandInverseDefault: blue.BLUE10,
58
+ surfaceBrandInverseHover: blue.BLUE20,
59
+ surfaceBrandInversePressed: blue.BLUE40,
60
+ surfaceBrandPressed: blue.BLUE120,
61
+ surfaceCriticalDefault: red.RED100,
62
+ surfaceCriticalDisabled: ink.INK10,
63
+ surfaceCriticalHover: red.RED80,
64
+ surfaceCriticalInverseDefault: red.RED10,
65
+ surfaceCriticalInverseHover: red.RED20,
66
+ surfaceCriticalInversePressed: red.RED40,
67
+ surfaceCriticalPressed: red.RED120,
68
+ surfaceErrorDefault: red.RED100,
69
+ surfaceErrorDisabled: ink.INK10,
70
+ surfaceErrorHover: red.RED80,
71
+ surfaceErrorInverseDefault: red.RED10,
72
+ surfaceErrorInverseHover: red.RED20,
73
+ surfaceErrorInversePressed: red.RED40,
74
+ surfaceErrorPressed: red.RED_STATUS,
75
+ surfaceInfoDefault: blue.BLUE100,
76
+ surfaceInfoDisabled: ink.INK10,
77
+ surfaceInfoHover: blue.BLUE80,
78
+ surfaceInfoInverseDefault: blue.BLUE10,
79
+ surfaceInfoInverseHover: blue.BLUE20,
80
+ surfaceInfoInversePressed: blue.BLUE40,
81
+ surfaceInfoPressed: blue.BLUE120,
82
+ surfacePrimaryDefault: white.WHITE100,
83
+ surfacePrimaryDisabled: ink.INK10,
84
+ surfacePrimaryHover: ink.INK5,
85
+ surfacePrimaryInverseDefault: ink.INK80,
86
+ surfacePrimaryInverseHover: ink.INK60,
87
+ surfacePrimaryInversePressed: ink.INK40,
88
+ surfacePrimaryPressed: ink.INK10,
89
+ surfaceSecondaryDefault: ink.INK5,
90
+ surfaceSecondaryDisabled: ink.INK10,
91
+ surfaceSecondaryHover: ink.INK10,
92
+ surfaceSecondaryPressed: ink.INK20,
93
+ surfaceSuccessDefault: green.GREEN100,
94
+ surfaceSuccessDisabled: ink.INK10,
95
+ surfaceSuccessHover: green.GREEN80,
96
+ surfaceSuccessInverseDefault: green.GREEN10,
97
+ surfaceSuccessInverseHover: green.GREEN20,
98
+ surfaceSuccessInversePressed: green.GREEN40,
99
+ surfaceSuccessPressed: green.GREEN_STATUS,
100
+ surfaceWarningDefault: yellow.YELLOW100,
101
+ surfaceWarningDisabled: ink.INK10,
102
+ surfaceWarningHover: yellow.YELLOW80,
103
+ surfaceWarningInverseDefault: yellow.YELLOW10,
104
+ surfaceWarningInverseHover: yellow.YELLOW20,
105
+ surfaceWarningInversePressed: yellow.YELLOW40,
106
+ surfaceWarningPressed: yellow.YELLOW120,
107
+ textDefault: ink.INK100,
108
+ textDisabled: ink.INK20,
109
+ textPlaceholder: ink.INK40,
110
+ textSecondary: ink.INK60,
111
+ textBrandDefault: blue.BLUE100,
112
+ textBrandDisabled: ink.INK20,
113
+ textBrandHovered: blue.BLUE80,
114
+ textBrandPressed: blue.BLUE120,
115
+ textCriticalDefault: red.RED100,
116
+ textCriticalDisabled: ink.INK20,
117
+ textCriticalHovered: red.RED80,
118
+ textCriticalPressed: red.RED_STATUS,
119
+ textErrorDefault: red.RED100,
120
+ textErrorDisabled: ink.INK20,
121
+ textErrorHovered: red.RED80,
122
+ textErrorPressed: red.RED_STATUS,
123
+ textInfoDefault: blue.BLUE100,
124
+ textInfoDisabled: ink.INK20,
125
+ textInfoHovered: blue.BLUE80,
126
+ textInfoPressed: blue.BLUE120,
127
+ textLinkDefault: blue.BLUE100,
128
+ textLinkDisabled: ink.INK20,
129
+ textLinkHovered: blue.BLUE80,
130
+ textLinkPressed: blue.BLUE120,
131
+ textLinkVisitedDefault: purple.PURPLE100,
132
+ textLinkVisitedDisabled: purple.PURPLE_BG,
133
+ textLinkVisitedHovered: purple.PURPLE_BG,
134
+ textLinkVisitedPressed: purple.PURPLE_BG,
135
+ textOnFillDefault: white.WHITE100,
136
+ textOnFillDisabled: white.WHITE20,
137
+ textOnFillHovered: white.WHITE80,
138
+ textOnFillPressed: white.WHITE80,
139
+ textSuccessDefault: green.GREEN100,
140
+ textSuccessDisabled: ink.INK20,
141
+ textSuccessHovered: green.GREEN80,
142
+ textSuccessPressed: green.GREEN_STATUS,
143
+ textWarningDefault: yellow.YELLOW100,
144
+ textWarningDisabled: ink.INK20,
145
+ textWarningHovered: yellow.YELLOW80,
146
+ textWarningPressed: yellow.YELLOW_STATUS,
147
+ selectBackgroundDisabled: white.WHITE40,
148
+ selectIconDisabled: white.WHITE40,
149
+ },
150
+ },
151
+ light: {
152
+ dark: false,
153
+ colors: {
154
+ primary: blue.BLUE100,
155
+ background: white.WHITE100,
156
+ card: ink.INK100,
157
+ text: ink.INK100,
158
+ border: ink.INK40,
159
+ gray: ink.INK60,
160
+ backgroundLight: ink.INK10,
161
+ //new theme colors
162
+ backgroundPrimary: ink.INK5,
163
+ backgroundSecondary: white.WHITE100,
164
+ borderBrandDefault: blue.BLUE100,
165
+ borderCriticalDefault: red.RED100,
166
+ borderCriticalHover: red.RED80,
167
+ borderCriticalPressed: red.RED120,
168
+ borderErrorDefault: red.RED100,
169
+ borderInfoDefault: blue.BLUE100,
170
+ borderPrimaryDefault: ink.INK10,
171
+ borderPrimaryDisabled: ink.INK10,
172
+ borderPrimaryHovered: ink.INK20,
173
+ borderPrimaryInverseDefault: blue.BLUE100,
174
+ borderPrimaryPressed: blue.BLUE100,
175
+ borderSuccessDefault: green.GREEN100,
176
+ borderWarningDefault: yellow.YELLOW100,
177
+ iconBrandDefault: blue.BLUE100,
178
+ iconCriticalDefault: red.RED100,
179
+ iconErrorDefault: red.RED100,
180
+ iconInfoDefault: blue.BLUE100,
181
+ iconPrimaryDefault: ink.INK40,
182
+ iconPrimaryHover: ink.INK60,
183
+ iconPrimaryDisabled: ink.INK60,
184
+ iconPrimaryInverseDefault: white.WHITE100,
185
+ iconPrimaryInverseHover: white.WHITE80,
186
+ iconPrimaryInversePressed: white.WHITE80,
187
+ iconPrimaryPressed: ink.INK60,
188
+ iconSuccessDefault: green.GREEN100,
189
+ iconWarningDefault: yellow.YELLOW100,
190
+ surfaceBrandDefault: blue.BLUE100,
191
+ surfaceBrandDisabled: ink.INK10,
192
+ surfaceBrandHover: blue.BLUE80,
193
+ surfaceBrandInverseDefault: blue.BLUE10,
194
+ surfaceBrandInverseHover: blue.BLUE20,
195
+ surfaceBrandInversePressed: blue.BLUE40,
196
+ surfaceBrandPressed: blue.BLUE120,
197
+ surfaceCriticalDefault: red.RED100,
198
+ surfaceCriticalDisabled: ink.INK10,
199
+ surfaceCriticalHover: red.RED80,
200
+ surfaceCriticalInverseDefault: red.RED10,
201
+ surfaceCriticalInverseHover: red.RED20,
202
+ surfaceCriticalInversePressed: red.RED40,
203
+ surfaceCriticalPressed: red.RED120,
204
+ surfaceErrorDefault: red.RED100,
205
+ surfaceErrorDisabled: ink.INK10,
206
+ surfaceErrorHover: red.RED80,
207
+ surfaceErrorInverseDefault: red.RED10,
208
+ surfaceErrorInverseHover: red.RED20,
209
+ surfaceErrorInversePressed: red.RED40,
210
+ surfaceErrorPressed: red.RED_STATUS,
211
+ surfaceInfoDefault: blue.BLUE100,
212
+ surfaceInfoDisabled: ink.INK10,
213
+ surfaceInfoHover: blue.BLUE80,
214
+ surfaceInfoInverseDefault: blue.BLUE10,
215
+ surfaceInfoInverseHover: blue.BLUE20,
216
+ surfaceInfoInversePressed: blue.BLUE40,
217
+ surfaceInfoPressed: blue.BLUE120,
218
+ surfacePrimaryDefault: white.WHITE100,
219
+ surfacePrimaryDisabled: ink.INK5,
220
+ surfacePrimaryHover: ink.INK5,
221
+ surfacePrimaryInverseDefault: ink.INK80,
222
+ surfacePrimaryInverseHover: ink.INK60,
223
+ surfacePrimaryInversePressed: ink.INK40,
224
+ surfacePrimaryPressed: ink.INK10,
225
+ surfaceSecondaryDefault: ink.INK5,
226
+ surfaceSecondaryDisabled: ink.INK5,
227
+ surfaceSecondaryHover: ink.INK10,
228
+ surfaceSecondaryPressed: ink.INK20,
229
+ surfaceSuccessDefault: green.GREEN100,
230
+ surfaceSuccessDisabled: ink.INK10,
231
+ surfaceSuccessHover: green.GREEN80,
232
+ surfaceSuccessInverseDefault: green.GREEN10,
233
+ surfaceSuccessInverseHover: green.GREEN20,
234
+ surfaceSuccessInversePressed: green.GREEN40,
235
+ surfaceSuccessPressed: green.GREEN_STATUS,
236
+ surfaceWarningDefault: yellow.YELLOW100,
237
+ surfaceWarningDisabled: ink.INK10,
238
+ surfaceWarningHover: yellow.YELLOW80,
239
+ surfaceWarningInverseDefault: yellow.YELLOW10,
240
+ surfaceWarningInverseHover: yellow.YELLOW20,
241
+ surfaceWarningInversePressed: yellow.YELLOW40,
242
+ surfaceWarningPressed: yellow.YELLOW120,
243
+ textDefault: ink.INK100,
244
+ textDisabled: ink.INK20,
245
+ textPlaceholder: ink.INK40,
246
+ textSecondary: ink.INK60,
247
+ textBrandDefault: blue.BLUE100,
248
+ textBrandDisabled: ink.INK20,
249
+ textBrandHovered: blue.BLUE80,
250
+ textBrandPressed: blue.BLUE120,
251
+ textCriticalDefault: red.RED100,
252
+ textCriticalDisabled: ink.INK20,
253
+ textCriticalHovered: red.RED80,
254
+ textCriticalPressed: red.RED_STATUS,
255
+ textErrorDefault: red.RED100,
256
+ textErrorDisabled: ink.INK20,
257
+ textErrorHovered: red.RED80,
258
+ textErrorPressed: red.RED_STATUS,
259
+ textInfoDefault: blue.BLUE100,
260
+ textInfoDisabled: ink.INK20,
261
+ textInfoHovered: blue.BLUE80,
262
+ textInfoPressed: blue.BLUE120,
263
+ textLinkDefault: blue.BLUE100,
264
+ textLinkDisabled: ink.INK20,
265
+ textLinkHovered: blue.BLUE80,
266
+ textLinkPressed: blue.BLUE120,
267
+ textLinkVisitedDefault: purple.PURPLE100,
268
+ textLinkVisitedDisabled: purple.PURPLE_BG,
269
+ textLinkVisitedHovered: purple.PURPLE_BG,
270
+ textLinkVisitedPressed: purple.PURPLE_BG,
271
+ textOnFillDefault: white.WHITE100,
272
+ textOnFillDisabled: white.WHITE20,
273
+ textOnFillHovered: white.WHITE80,
274
+ textOnFillPressed: white.WHITE80,
275
+ textSuccessDefault: green.GREEN100,
276
+ textSuccessDisabled: ink.INK20,
277
+ textSuccessHovered: green.GREEN80,
278
+ textSuccessPressed: green.GREEN_STATUS,
279
+ textWarningDefault: yellow.YELLOW100,
280
+ textWarningDisabled: ink.INK20,
281
+ textWarningHovered: yellow.YELLOW80,
282
+ textWarningPressed: yellow.YELLOW_STATUS,
283
+ selectBackgroundDisabled: white.WHITE40,
284
+ selectIconDisabled: white.WHITE40,
285
+ },
286
+ },
287
+ };
@@ -0,0 +1,16 @@
1
+ const WHITE100 = "rgba(255, 255, 255, 1)";
2
+ const WHITE80 = "rgba(255, 255, 255, 0.8)";
3
+ const WHITE60 = "rgba(255, 255, 255, 0.6)";
4
+ const WHITE40 = "rgba(255, 255, 255, 0.4)";
5
+ const WHITE20 = "rgba(255, 255, 255, 0.2)";
6
+ const WHITE10 = "rgba(255, 255, 255, 0.1)";
7
+ const WHITE5 = "rgba(255, 255, 255, 0.05)";
8
+ export default {
9
+ WHITE100,
10
+ WHITE80,
11
+ WHITE60,
12
+ WHITE40,
13
+ WHITE20,
14
+ WHITE10,
15
+ WHITE5,
16
+ };
@@ -0,0 +1,26 @@
1
+ const YELLOW180 = "#432004";
2
+ const YELLOW160 = "#733E0A";
3
+ const YELLOW140 = "#894B00";
4
+ const YELLOW120 = "#A65F00";
5
+ const YELLOW100 = "#D08700";
6
+ const YELLOW80 = "#F0B100";
7
+ const YELLOW60 = "#FDC700";
8
+ const YELLOW40 = "#FFDF20";
9
+ const YELLOW20 = "#FFF085";
10
+ const YELLOW10 = "#FEF9C2";
11
+ const YELLOW5 = "#FEFCE8";
12
+ const YELLOW_STATUS = "#E49C06";
13
+ export default {
14
+ YELLOW180,
15
+ YELLOW160,
16
+ YELLOW140,
17
+ YELLOW120,
18
+ YELLOW100,
19
+ YELLOW80,
20
+ YELLOW60,
21
+ YELLOW40,
22
+ YELLOW20,
23
+ YELLOW10,
24
+ YELLOW5,
25
+ YELLOW_STATUS,
26
+ };
@@ -0,0 +1,71 @@
1
+ import { ColorValue, TextStyle, ViewStyle } from 'react-native';
2
+
3
+ export interface Theme {
4
+ dark: boolean;
5
+ colors: {
6
+ primary: string;
7
+ background: string;
8
+ surface: string;
9
+ accent: string;
10
+ error: string;
11
+ text: string;
12
+ disabled: string;
13
+ placeholder: string;
14
+ backdrop: string;
15
+ notification: string;
16
+ };
17
+ fonts: {
18
+ regular: TextStyle;
19
+ medium: TextStyle;
20
+ light: TextStyle;
21
+ thin: TextStyle;
22
+ };
23
+ animation: {
24
+ scale: number;
25
+ };
26
+ }
27
+
28
+ export interface ComponentProps {
29
+ style?: ViewStyle;
30
+ theme?: Theme;
31
+ }
32
+
33
+ export interface TextProps extends ComponentProps {
34
+ color?: ColorValue;
35
+ size?: number;
36
+ weight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
37
+ align?: 'auto' | 'left' | 'right' | 'center' | 'justify';
38
+ }
39
+
40
+ export interface ButtonProps extends ComponentProps {
41
+ onPress?: () => void;
42
+ disabled?: boolean;
43
+ loading?: boolean;
44
+ mode?: 'text' | 'outlined' | 'contained';
45
+ color?: string;
46
+ dark?: boolean;
47
+ compact?: boolean;
48
+ contentStyle?: ViewStyle;
49
+ labelStyle?: TextStyle;
50
+ }
51
+
52
+ export interface CardProps extends ComponentProps {
53
+ onPress?: () => void;
54
+ elevation?: number;
55
+ }
56
+
57
+ export interface TextInputProps extends ComponentProps {
58
+ value: string;
59
+ onChangeText?: (text: string) => void;
60
+ placeholder?: string;
61
+ secureTextEntry?: boolean;
62
+ keyboardType?: 'default' | 'number-pad' | 'decimal-pad' | 'numeric' | 'email-address' | 'phone-pad';
63
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
64
+ autoCorrect?: boolean;
65
+ disabled?: boolean;
66
+ error?: boolean;
67
+ multiline?: boolean;
68
+ numberOfLines?: number;
69
+ maxLength?: number;
70
+ label?: string;
71
+ }
@@ -0,0 +1,5 @@
1
+ declare module '*.svg' {
2
+ import { SvgProps } from 'react-native-svg';
3
+ const content: React.FC<SvgProps>;
4
+ export default content;
5
+ }