@swan-io/lake 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 (288) hide show
  1. package/HISTORY.md +3 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -0
  4. package/package.json +60 -0
  5. package/src/components/Alert.d.ts +10 -0
  6. package/src/components/Alert.js +36 -0
  7. package/src/components/AppOpeningAnimation.d.ts +10 -0
  8. package/src/components/AppOpeningAnimation.js +50 -0
  9. package/src/components/AutoWidthImage.d.ts +8 -0
  10. package/src/components/AutoWidthImage.js +26 -0
  11. package/src/components/Avatar.d.ts +7 -0
  12. package/src/components/Avatar.js +42 -0
  13. package/src/components/BorderedButton.d.ts +16 -0
  14. package/src/components/BorderedButton.js +98 -0
  15. package/src/components/BorderedIcon.d.ts +12 -0
  16. package/src/components/BorderedIcon.js +25 -0
  17. package/src/components/BottomPanel.d.ts +9 -0
  18. package/src/components/BottomPanel.js +94 -0
  19. package/src/components/Box.d.ts +65 -0
  20. package/src/components/Box.js +31 -0
  21. package/src/components/Breadcrumbs.d.ts +18 -0
  22. package/src/components/Breadcrumbs.js +362 -0
  23. package/src/components/Button.d.ts +15 -0
  24. package/src/components/Button.js +83 -0
  25. package/src/components/Caption.d.ts +6 -0
  26. package/src/components/Caption.js +11 -0
  27. package/src/components/Checkbox.d.ts +12 -0
  28. package/src/components/Checkbox.js +83 -0
  29. package/src/components/ChoicePicker.d.ts +11 -0
  30. package/src/components/ChoicePicker.js +99 -0
  31. package/src/components/Combobox.d.ts +29 -0
  32. package/src/components/Combobox.js +182 -0
  33. package/src/components/FailureIcon.d.ts +8 -0
  34. package/src/components/FailureIcon.js +4 -0
  35. package/src/components/FileTile.d.ts +11 -0
  36. package/src/components/FileTile.js +37 -0
  37. package/src/components/Fill.d.ts +8 -0
  38. package/src/components/Fill.js +24 -0
  39. package/src/components/FilterChooser.d.ts +15 -0
  40. package/src/components/FilterChooser.js +52 -0
  41. package/src/components/Filters.d.ts +57 -0
  42. package/src/components/Filters.js +229 -0
  43. package/src/components/FixedListView.d.ts +104 -0
  44. package/src/components/FixedListView.js +821 -0
  45. package/src/components/FixedListViewCells.d.ts +55 -0
  46. package/src/components/FixedListViewCells.js +157 -0
  47. package/src/components/Flag.d.ts +8 -0
  48. package/src/components/Flag.js +36 -0
  49. package/src/components/FlowPresentation.d.ts +12 -0
  50. package/src/components/FlowPresentation.js +70 -0
  51. package/src/components/FocusTrap.d.ts +16 -0
  52. package/src/components/FocusTrap.js +90 -0
  53. package/src/components/Form.d.ts +8 -0
  54. package/src/components/Form.js +17 -0
  55. package/src/components/FullViewportLayer.d.ts +7 -0
  56. package/src/components/FullViewportLayer.js +91 -0
  57. package/src/components/Grid.d.ts +13 -0
  58. package/src/components/Grid.js +33 -0
  59. package/src/components/Heading.d.ts +61 -0
  60. package/src/components/Heading.js +27 -0
  61. package/src/components/Icon.d.ts +191 -0
  62. package/src/components/Icon.js +11 -0
  63. package/src/components/Input.d.ts +34 -0
  64. package/src/components/Input.js +115 -0
  65. package/src/components/InputError.d.ts +8 -0
  66. package/src/components/InputError.js +16 -0
  67. package/src/components/Label.d.ts +10 -0
  68. package/src/components/Label.js +19 -0
  69. package/src/components/LakeAlert.d.ts +14 -0
  70. package/src/components/LakeAlert.js +75 -0
  71. package/src/components/LakeButton.d.ts +36 -0
  72. package/src/components/LakeButton.js +171 -0
  73. package/src/components/LakeCheckbox.d.ts +16 -0
  74. package/src/components/LakeCheckbox.js +54 -0
  75. package/src/components/LakeCombobox.d.ts +28 -0
  76. package/src/components/LakeCombobox.js +166 -0
  77. package/src/components/LakeCopyButton.d.ts +10 -0
  78. package/src/components/LakeCopyButton.js +16 -0
  79. package/src/components/LakeDownloadButton.d.ts +8 -0
  80. package/src/components/LakeDownloadButton.js +6 -0
  81. package/src/components/LakeHeading.d.ts +10 -0
  82. package/src/components/LakeHeading.js +19 -0
  83. package/src/components/LakeLabel.d.ts +19 -0
  84. package/src/components/LakeLabel.js +43 -0
  85. package/src/components/LakeModal.d.ts +14 -0
  86. package/src/components/LakeModal.js +132 -0
  87. package/src/components/LakeRadio.d.ts +9 -0
  88. package/src/components/LakeRadio.js +44 -0
  89. package/src/components/LakeScrollView.d.ts +10 -0
  90. package/src/components/LakeScrollView.js +35 -0
  91. package/src/components/LakeSearchField.d.ts +10 -0
  92. package/src/components/LakeSearchField.js +111 -0
  93. package/src/components/LakeSelect.d.ts +30 -0
  94. package/src/components/LakeSelect.js +183 -0
  95. package/src/components/LakeSlider.d.ts +12 -0
  96. package/src/components/LakeSlider.js +31 -0
  97. package/src/components/LakeStepper.d.ts +21 -0
  98. package/src/components/LakeStepper.js +134 -0
  99. package/src/components/LakeText.d.ts +19 -0
  100. package/src/components/LakeText.js +20 -0
  101. package/src/components/LakeTextInput.d.ts +36 -0
  102. package/src/components/LakeTextInput.js +154 -0
  103. package/src/components/LakeTooltip.d.ts +24 -0
  104. package/src/components/LakeTooltip.js +188 -0
  105. package/src/components/Link.d.ts +138 -0
  106. package/src/components/Link.js +23 -0
  107. package/src/components/ListRightPanel.d.ts +17 -0
  108. package/src/components/ListRightPanel.js +79 -0
  109. package/src/components/LoadingView.d.ts +9 -0
  110. package/src/components/LoadingView.js +24 -0
  111. package/src/components/Modal.d.ts +12 -0
  112. package/src/components/Modal.js +80 -0
  113. package/src/components/MultiSelect.d.ts +27 -0
  114. package/src/components/MultiSelect.js +223 -0
  115. package/src/components/MultilineInput.d.ts +15 -0
  116. package/src/components/MultilineInput.js +55 -0
  117. package/src/components/Picker.d.ts +26 -0
  118. package/src/components/Picker.js +116 -0
  119. package/src/components/PlainListView.d.ts +36 -0
  120. package/src/components/PlainListView.js +208 -0
  121. package/src/components/Popover.d.ts +23 -0
  122. package/src/components/Popover.js +147 -0
  123. package/src/components/PopoverContent.d.ts +8 -0
  124. package/src/components/PopoverContent.js +9 -0
  125. package/src/components/Portal.d.ts +7 -0
  126. package/src/components/Portal.js +9 -0
  127. package/src/components/Pressable.d.ts +348 -0
  128. package/src/components/Pressable.js +91 -0
  129. package/src/components/ProgressBar.d.ts +11 -0
  130. package/src/components/ProgressBar.js +46 -0
  131. package/src/components/ProjectEnvTag.d.ts +7 -0
  132. package/src/components/ProjectEnvTag.js +12 -0
  133. package/src/components/QuickActions.d.ts +15 -0
  134. package/src/components/QuickActions.js +38 -0
  135. package/src/components/RadioGroup.d.ts +16 -0
  136. package/src/components/RadioGroup.js +34 -0
  137. package/src/components/ReadOnlyFieldList.d.ts +6 -0
  138. package/src/components/ReadOnlyFieldList.js +8 -0
  139. package/src/components/ResponsiveContainer.d.ts +13 -0
  140. package/src/components/ResponsiveContainer.js +23 -0
  141. package/src/components/RightPanel.d.ts +10 -0
  142. package/src/components/RightPanel.js +102 -0
  143. package/src/components/SegmentedControl.d.ts +19 -0
  144. package/src/components/SegmentedControl.js +74 -0
  145. package/src/components/Separator.d.ts +10 -0
  146. package/src/components/Separator.js +19 -0
  147. package/src/components/SidebarNavigationTracker.d.ts +13 -0
  148. package/src/components/SidebarNavigationTracker.js +93 -0
  149. package/src/components/Slider.d.ts +11 -0
  150. package/src/components/Slider.js +119 -0
  151. package/src/components/SmsOpeningAnimation.d.ts +8 -0
  152. package/src/components/SmsOpeningAnimation.js +52 -0
  153. package/src/components/Space.d.ts +10 -0
  154. package/src/components/Space.js +23 -0
  155. package/src/components/Stack.d.ts +12 -0
  156. package/src/components/Stack.js +23 -0
  157. package/src/components/StepDots.d.ts +7 -0
  158. package/src/components/StepDots.js +24 -0
  159. package/src/components/Stepper.d.ts +9 -0
  160. package/src/components/Stepper.js +67 -0
  161. package/src/components/SuccessIcon.d.ts +8 -0
  162. package/src/components/SuccessIcon.js +4 -0
  163. package/src/components/Svg.d.ts +145 -0
  164. package/src/components/Svg.js +24 -0
  165. package/src/components/SwanLogo.d.ts +8 -0
  166. package/src/components/SwanLogo.js +11 -0
  167. package/src/components/Switch.d.ts +9 -0
  168. package/src/components/Switch.js +74 -0
  169. package/src/components/TabView.d.ts +16 -0
  170. package/src/components/TabView.js +398 -0
  171. package/src/components/Table.d.ts +34 -0
  172. package/src/components/Table.js +79 -0
  173. package/src/components/Tag.d.ts +17 -0
  174. package/src/components/Tag.js +76 -0
  175. package/src/components/Tile.d.ts +34 -0
  176. package/src/components/Tile.js +130 -0
  177. package/src/components/TilePlaceholder.d.ts +6 -0
  178. package/src/components/TilePlaceholder.js +51 -0
  179. package/src/components/ToastStack.d.ts +2 -0
  180. package/src/components/ToastStack.js +96 -0
  181. package/src/components/Tooltip.d.ts +18 -0
  182. package/src/components/Tooltip.js +162 -0
  183. package/src/components/TransitionGroupView.d.ts +12 -0
  184. package/src/components/TransitionGroupView.js +43 -0
  185. package/src/components/TransitionView.d.ts +12 -0
  186. package/src/components/TransitionView.js +43 -0
  187. package/src/components/WithCurrentColor.d.ts +12 -0
  188. package/src/components/WithCurrentColor.js +65 -0
  189. package/src/components/WithPartnerAccentColor.d.ts +7 -0
  190. package/src/components/WithPartnerAccentColor.js +91 -0
  191. package/src/constants/colors.d.ts +42 -0
  192. package/src/constants/colors.js +42 -0
  193. package/src/constants/commonStyles.d.ts +66 -0
  194. package/src/constants/commonStyles.js +45 -0
  195. package/src/constants/design.d.ts +168 -0
  196. package/src/constants/design.js +564 -0
  197. package/src/constants/insets.d.ts +10 -0
  198. package/src/constants/insets.js +22 -0
  199. package/src/constants/typography.d.ts +26 -0
  200. package/src/constants/typography.js +54 -0
  201. package/src/hooks/useAnimatedValue.d.ts +2 -0
  202. package/src/hooks/useAnimatedValue.js +3 -0
  203. package/src/hooks/useBodyClassName.d.ts +3 -0
  204. package/src/hooks/useBodyClassName.js +14 -0
  205. package/src/hooks/useBoolean.d.ts +8 -0
  206. package/src/hooks/useBoolean.js +12 -0
  207. package/src/hooks/useComputedColors.d.ts +10 -0
  208. package/src/hooks/useComputedColors.js +42 -0
  209. package/src/hooks/useDebounce.d.ts +1 -0
  210. package/src/hooks/useDebounce.js +12 -0
  211. package/src/hooks/useDisclosure.d.ts +8 -0
  212. package/src/hooks/useDisclosure.js +12 -0
  213. package/src/hooks/useFirstMountState.d.ts +1 -0
  214. package/src/hooks/useFirstMountState.js +9 -0
  215. package/src/hooks/useForceableState.d.ts +1 -0
  216. package/src/hooks/useForceableState.js +6 -0
  217. package/src/hooks/useHover.d.ts +11 -0
  218. package/src/hooks/useHover.js +4 -0
  219. package/src/hooks/useInterval.d.ts +1 -0
  220. package/src/hooks/useInterval.js +11 -0
  221. package/src/hooks/useLazyRef.d.ts +2 -0
  222. package/src/hooks/useLazyRef.js +9 -0
  223. package/src/hooks/useMergeRefs.d.ts +2 -0
  224. package/src/hooks/useMergeRefs.js +5 -0
  225. package/src/hooks/useNativeProp.d.ts +2 -0
  226. package/src/hooks/useNativeProp.js +9 -0
  227. package/src/hooks/useOutsideClick.d.ts +8 -0
  228. package/src/hooks/useOutsideClick.js +54 -0
  229. package/src/hooks/usePersistedState.d.ts +1 -0
  230. package/src/hooks/usePersistedState.js +21 -0
  231. package/src/hooks/usePressEvents.d.ts +31 -0
  232. package/src/hooks/usePressEvents.js +4 -0
  233. package/src/hooks/usePreviousValue.d.ts +1 -0
  234. package/src/hooks/usePreviousValue.js +8 -0
  235. package/src/hooks/useResponsive.d.ts +7 -0
  236. package/src/hooks/useResponsive.js +20 -0
  237. package/src/hooks/useUpdateEffect.d.ts +2 -0
  238. package/src/hooks/useUpdateEffect.js +10 -0
  239. package/src/hooks/useUrqlMutation.d.ts +4 -0
  240. package/src/hooks/useUrqlMutation.js +30 -0
  241. package/src/hooks/useUrqlQuery.d.ts +19 -0
  242. package/src/hooks/useUrqlQuery.js +73 -0
  243. package/src/state/toasts.d.ts +21 -0
  244. package/src/state/toasts.js +61 -0
  245. package/src/utils/__tests__/array.test.d.ts +1 -0
  246. package/src/utils/__tests__/array.test.js +127 -0
  247. package/src/utils/__tests__/base64.test.d.ts +1 -0
  248. package/src/utils/__tests__/base64.test.js +27 -0
  249. package/src/utils/__tests__/function.test.d.ts +1 -0
  250. package/src/utils/__tests__/function.test.js +36 -0
  251. package/src/utils/__tests__/object.test.d.ts +1 -0
  252. package/src/utils/__tests__/object.test.js +17 -0
  253. package/src/utils/__tests__/rifm.test.d.ts +1 -0
  254. package/src/utils/__tests__/rifm.test.js +124 -0
  255. package/src/utils/__tests__/string.test.d.ts +1 -0
  256. package/src/utils/__tests__/string.test.js +16 -0
  257. package/src/utils/a11y.d.ts +1 -0
  258. package/src/utils/a11y.js +18 -0
  259. package/src/utils/array.d.ts +6 -0
  260. package/src/utils/array.js +71 -0
  261. package/src/utils/base64.d.ts +2 -0
  262. package/src/utils/base64.js +20 -0
  263. package/src/utils/file.d.ts +2 -0
  264. package/src/utils/file.js +10 -0
  265. package/src/utils/flagCountry.d.ts +1 -0
  266. package/src/utils/flagCountry.js +1 -0
  267. package/src/utils/function.d.ts +4 -0
  268. package/src/utils/function.js +19 -0
  269. package/src/utils/math.d.ts +16 -0
  270. package/src/utils/math.js +47 -0
  271. package/src/utils/nullish.d.ts +10 -0
  272. package/src/utils/nullish.js +8 -0
  273. package/src/utils/object.d.ts +2 -0
  274. package/src/utils/object.js +7 -0
  275. package/src/utils/popper.d.ts +3 -0
  276. package/src/utils/popper.js +30 -0
  277. package/src/utils/rifm.d.ts +14 -0
  278. package/src/utils/rifm.js +53 -0
  279. package/src/utils/string.d.ts +4 -0
  280. package/src/utils/string.js +233 -0
  281. package/src/utils/timer.d.ts +11 -0
  282. package/src/utils/timer.js +46 -0
  283. package/src/utils/types.d.ts +8 -0
  284. package/src/utils/types.js +1 -0
  285. package/src/utils/userAgent.d.ts +4 -0
  286. package/src/utils/userAgent.js +9 -0
  287. package/src/utils/viewport.d.ts +1 -0
  288. package/src/utils/viewport.js +12 -0
@@ -0,0 +1,564 @@
1
+ import { StyleSheet } from "react-native";
2
+ const swan = {
3
+ 900: "var(--color-swan-900)",
4
+ 800: "var(--color-swan-800)",
5
+ 700: "var(--color-swan-700)",
6
+ 600: "var(--color-swan-600)",
7
+ 500: "var(--color-swan-500)",
8
+ 400: "var(--color-swan-400)",
9
+ 300: "var(--color-swan-300)",
10
+ 200: "var(--color-swan-200)",
11
+ 100: "var(--color-swan-100)",
12
+ 50: "var(--color-swan-50)",
13
+ 0: "var(--color-swan-0)",
14
+ primary: "var(--color-swan-primary)",
15
+ secondary: "var(--color-swan-secondary)",
16
+ contrast: "var(--color-swan-contrast)",
17
+ };
18
+ export const gray75 = "var(--color-gray-75)";
19
+ const gray = {
20
+ 900: "var(--color-gray-900)",
21
+ 800: "var(--color-gray-800)",
22
+ 700: "var(--color-gray-700)",
23
+ 600: "var(--color-gray-600)",
24
+ 500: "var(--color-gray-500)",
25
+ 400: "var(--color-gray-400)",
26
+ 300: "var(--color-gray-300)",
27
+ 200: "var(--color-gray-200)",
28
+ 100: "var(--color-gray-100)",
29
+ 50: "var(--color-gray-50)",
30
+ 0: "var(--color-gray-0)",
31
+ primary: "var(--color-gray-primary)",
32
+ secondary: "var(--color-gray-secondary)",
33
+ contrast: "var(--color-gray-contrast)",
34
+ };
35
+ const darkPink = {
36
+ 900: "var(--color-dark-pink-900)",
37
+ 800: "var(--color-dark-pink-800)",
38
+ 700: "var(--color-dark-pink-700)",
39
+ 600: "var(--color-dark-pink-600)",
40
+ 500: "var(--color-dark-pink-500)",
41
+ 400: "var(--color-dark-pink-400)",
42
+ 300: "var(--color-dark-pink-300)",
43
+ 200: "var(--color-dark-pink-200)",
44
+ 100: "var(--color-dark-pink-100)",
45
+ 50: "var(--color-dark-pink-50)",
46
+ 0: "var(--color-dark-pink-0)",
47
+ primary: "var(--color-dark-pink-primary)",
48
+ secondary: "var(--color-dark-pink-secondary)",
49
+ contrast: "var(--color-dark-pink-contrast)",
50
+ };
51
+ const mediumSladeBlue = {
52
+ 900: "var(--color-medium-slade-blue-900)",
53
+ 800: "var(--color-medium-slade-blue-800)",
54
+ 700: "var(--color-medium-slade-blue-700)",
55
+ 600: "var(--color-medium-slade-blue-600)",
56
+ 500: "var(--color-medium-slade-blue-500)",
57
+ 400: "var(--color-medium-slade-blue-400)",
58
+ 300: "var(--color-medium-slade-blue-300)",
59
+ 200: "var(--color-medium-slade-blue-200)",
60
+ 100: "var(--color-medium-slade-blue-100)",
61
+ 50: "var(--color-medium-slade-blue-50)",
62
+ 0: "var(--color-medium-slade-blue-0)",
63
+ primary: "var(--color-medium-slade-blue-primary)",
64
+ secondary: "var(--color-medium-slade-blue-secondary)",
65
+ contrast: "var(--color-medium-slade-blue-contrast)",
66
+ };
67
+ const live = {
68
+ 900: "var(--color-live-900)",
69
+ 800: "var(--color-live-800)",
70
+ 700: "var(--color-live-700)",
71
+ 600: "var(--color-live-600)",
72
+ 500: "var(--color-live-500)",
73
+ 400: "var(--color-live-400)",
74
+ 300: "var(--color-live-300)",
75
+ 200: "var(--color-live-200)",
76
+ 100: "var(--color-live-100)",
77
+ 50: "var(--color-live-50)",
78
+ 0: "var(--color-live-0)",
79
+ primary: "var(--color-live-primary)",
80
+ secondary: "var(--color-live-secondary)",
81
+ contrast: "var(--color-live-contrast)",
82
+ };
83
+ const sandbox = {
84
+ 900: "var(--color-sandbox-900)",
85
+ 800: "var(--color-sandbox-800)",
86
+ 700: "var(--color-sandbox-700)",
87
+ 600: "var(--color-sandbox-600)",
88
+ 500: "var(--color-sandbox-500)",
89
+ 400: "var(--color-sandbox-400)",
90
+ 300: "var(--color-sandbox-300)",
91
+ 200: "var(--color-sandbox-200)",
92
+ 100: "var(--color-sandbox-100)",
93
+ 50: "var(--color-sandbox-50)",
94
+ 0: "var(--color-sandbox-0)",
95
+ primary: "var(--color-sandbox-primary)",
96
+ secondary: "var(--color-sandbox-secondary)",
97
+ contrast: "var(--color-sandbox-contrast)",
98
+ };
99
+ const positive = {
100
+ 900: "var(--color-positive-900)",
101
+ 800: "var(--color-positive-800)",
102
+ 700: "var(--color-positive-700)",
103
+ 600: "var(--color-positive-600)",
104
+ 500: "var(--color-positive-500)",
105
+ 400: "var(--color-positive-400)",
106
+ 300: "var(--color-positive-300)",
107
+ 200: "var(--color-positive-200)",
108
+ 100: "var(--color-positive-100)",
109
+ 50: "var(--color-positive-50)",
110
+ 0: "var(--color-positive-0)",
111
+ primary: "var(--color-positive-primary)",
112
+ secondary: "var(--color-positive-secondary)",
113
+ contrast: "var(--color-positive-contrast)",
114
+ };
115
+ const warning = {
116
+ 900: "var(--color-warning-900)",
117
+ 800: "var(--color-warning-800)",
118
+ 700: "var(--color-warning-700)",
119
+ 600: "var(--color-warning-600)",
120
+ 500: "var(--color-warning-500)",
121
+ 400: "var(--color-warning-400)",
122
+ 300: "var(--color-warning-300)",
123
+ 200: "var(--color-warning-200)",
124
+ 100: "var(--color-warning-100)",
125
+ 50: "var(--color-warning-50)",
126
+ 0: "var(--color-warning-0)",
127
+ primary: "var(--color-warning-primary)",
128
+ secondary: "var(--color-warning-secondary)",
129
+ contrast: "var(--color-warning-contrast)",
130
+ };
131
+ const negative = {
132
+ 900: "var(--color-negative-900)",
133
+ 800: "var(--color-negative-800)",
134
+ 700: "var(--color-negative-700)",
135
+ 600: "var(--color-negative-600)",
136
+ 500: "var(--color-negative-500)",
137
+ 400: "var(--color-negative-400)",
138
+ 300: "var(--color-negative-300)",
139
+ 200: "var(--color-negative-200)",
140
+ 100: "var(--color-negative-100)",
141
+ 50: "var(--color-negative-50)",
142
+ 0: "var(--color-negative-0)",
143
+ primary: "var(--color-negative-primary)",
144
+ secondary: "var(--color-negative-secondary)",
145
+ contrast: "var(--color-negative-contrast)",
146
+ };
147
+ const partner = {
148
+ 900: "var(--color-partner-900)",
149
+ 800: "var(--color-partner-800)",
150
+ 700: "var(--color-partner-700)",
151
+ 600: "var(--color-partner-600)",
152
+ 500: "var(--color-partner-500)",
153
+ 400: "var(--color-partner-400)",
154
+ 300: "var(--color-partner-300)",
155
+ 200: "var(--color-partner-200)",
156
+ 100: "var(--color-partner-100)",
157
+ 50: "var(--color-partner-50)",
158
+ 0: "var(--color-partner-0)",
159
+ primary: "var(--color-partner-primary)",
160
+ secondary: "var(--color-partner-secondary)",
161
+ contrast: "var(--color-partner-contrast)",
162
+ };
163
+ const shakespear = {
164
+ 900: "var(--color-shakespear-900)",
165
+ 800: "var(--color-shakespear-800)",
166
+ 700: "var(--color-shakespear-700)",
167
+ 600: "var(--color-shakespear-600)",
168
+ 500: "var(--color-shakespear-500)",
169
+ 400: "var(--color-shakespear-400)",
170
+ 300: "var(--color-shakespear-300)",
171
+ 200: "var(--color-shakespear-200)",
172
+ 100: "var(--color-shakespear-100)",
173
+ 50: "var(--color-shakespear-50)",
174
+ 0: "var(--color-shakespear-0)",
175
+ primary: "var(--color-shakespear-primary)",
176
+ secondary: "var(--color-shakespear-secondary)",
177
+ contrast: "var(--color-shakespear-contrast)",
178
+ };
179
+ const sunglow = {
180
+ 900: "var(--color-sunglow-900)",
181
+ 800: "var(--color-sunglow-800)",
182
+ 700: "var(--color-sunglow-700)",
183
+ 600: "var(--color-sunglow-600)",
184
+ 500: "var(--color-sunglow-500)",
185
+ 400: "var(--color-sunglow-400)",
186
+ 300: "var(--color-sunglow-300)",
187
+ 200: "var(--color-sunglow-200)",
188
+ 100: "var(--color-sunglow-100)",
189
+ 50: "var(--color-sunglow-50)",
190
+ 0: "var(--color-sunglow-0)",
191
+ primary: "var(--color-sunglow-primary)",
192
+ secondary: "var(--color-sunglow-secondary)",
193
+ contrast: "var(--color-sunglow-contrast)",
194
+ };
195
+ const current = {
196
+ 900: "var(--color-current-900)",
197
+ 800: "var(--color-current-800)",
198
+ 700: "var(--color-current-700)",
199
+ 600: "var(--color-current-600)",
200
+ 500: "var(--color-current-500)",
201
+ 400: "var(--color-current-400)",
202
+ 300: "var(--color-current-300)",
203
+ 200: "var(--color-current-200)",
204
+ 100: "var(--color-current-100)",
205
+ 50: "var(--color-current-50)",
206
+ 0: "var(--color-current-50)",
207
+ primary: "var(--color-current-primary)",
208
+ secondary: "var(--color-current-secondary)",
209
+ contrast: "var(--color-current-contrast)",
210
+ };
211
+ export const colors = {
212
+ gray,
213
+ live,
214
+ sandbox,
215
+ positive,
216
+ warning,
217
+ negative,
218
+ current,
219
+ partner,
220
+ swan,
221
+ shakespear,
222
+ darkPink,
223
+ sunglow,
224
+ mediumSladeBlue,
225
+ };
226
+ // Those are used in special cases were the black mode
227
+ // shouln't invert colors (ex: shadows, credit card text)
228
+ export const invariantColors = {
229
+ black: "#000",
230
+ white: "#fff",
231
+ transparent: "transparent",
232
+ gray: "#16141a",
233
+ };
234
+ export const backgroundColor = {
235
+ default: "var(--color-background-default)",
236
+ defaultTransparent: "var(--color-background-default-transparent)",
237
+ default50Transparency: "var(--color-background-default-50-transparency)",
238
+ default75Transparency: "var(--color-background-default-75-transparency)",
239
+ default90Transparency: "var(--color-background-default-90-transparency)",
240
+ accented: "var(--color-background-default-accented)",
241
+ accentedTransparent: "var(--color-background-default-accented-transparent)",
242
+ accented50Transparency: "var(--color-background-default-accented-50-transparency)",
243
+ accented75Transparency: "var(--color-background-default-accented-75-transparency)",
244
+ accented90Transparency: "var(--color-background-default-accented-90-transparency)",
245
+ };
246
+ export const gradients = {
247
+ vertical: "var(--gradient-vertical)",
248
+ oblique: "var(--gradient-oblique)",
249
+ };
250
+ export const interFontStyle = {
251
+ fontFamily: [
252
+ "Inter",
253
+ "-apple-system",
254
+ "system-ui",
255
+ "BlinkMacSystemFont",
256
+ "Segoe UI",
257
+ "Helvetica",
258
+ "Arial",
259
+ "sans-serif",
260
+ "Apple Color Emoji",
261
+ "Segoe UI Emoji",
262
+ "Segoe UI Symbol",
263
+ "Noto Color Emoji",
264
+ ].join(","),
265
+ // Computed by Inter dynamic metrics tool
266
+ letterSpacing: "-0.011em",
267
+ };
268
+ const asTextStyle = (x) => {
269
+ return x;
270
+ };
271
+ const h1 = asTextStyle({
272
+ ...interFontStyle,
273
+ color: "var(--heading-color)",
274
+ fontWeight: "var(--heading-1-font-weight)",
275
+ fontSize: "var(--heading-1-font-size)",
276
+ lineHeight: "var(--heading-line-height)",
277
+ });
278
+ const h2 = asTextStyle({
279
+ ...interFontStyle,
280
+ color: "var(--heading-color)",
281
+ fontWeight: "var(--heading-2-font-weight)",
282
+ fontSize: "var(--heading-2-font-size)",
283
+ lineHeight: "var(--heading-line-height)",
284
+ });
285
+ const h3 = asTextStyle({
286
+ ...interFontStyle,
287
+ color: "var(--heading-color)",
288
+ fontWeight: "var(--heading-3-font-weight)",
289
+ fontSize: "var(--heading-3-font-size)",
290
+ lineHeight: "var(--heading-line-height)",
291
+ });
292
+ const h4 = asTextStyle({
293
+ ...interFontStyle,
294
+ color: "var(--heading-color)",
295
+ fontWeight: "var(--heading-4-font-weight)",
296
+ fontSize: "var(--heading-4-font-size)",
297
+ lineHeight: "var(--heading-line-height)",
298
+ });
299
+ const h5 = asTextStyle({
300
+ ...interFontStyle,
301
+ color: "var(--heading-color)",
302
+ fontWeight: "var(--heading-5-font-weight)",
303
+ fontSize: "var(--heading-5-font-size)",
304
+ lineHeight: "var(--heading-line-height)",
305
+ });
306
+ const h6 = asTextStyle({
307
+ ...interFontStyle,
308
+ color: "var(--heading-color)",
309
+ fontWeight: "var(--heading-6-font-weight)",
310
+ fontSize: "var(--heading-6-font-size)",
311
+ lineHeight: "var(--heading-line-height)",
312
+ });
313
+ const semibold = asTextStyle({
314
+ ...interFontStyle,
315
+ color: "var(--text-color)",
316
+ fontWeight: "var(--text-semibold-font-weight)",
317
+ fontSize: "var(--text-semibold-font-size)",
318
+ lineHeight: "var(--text-line-height)",
319
+ });
320
+ const medium = asTextStyle({
321
+ ...interFontStyle,
322
+ color: "var(--text-color)",
323
+ fontWeight: "var(--text-medium-font-weight)",
324
+ fontSize: "var(--text-medium-font-size)",
325
+ lineHeight: "var(--text-line-height)",
326
+ });
327
+ const regular = asTextStyle({
328
+ ...interFontStyle,
329
+ color: "var(--text-color)",
330
+ fontWeight: "var(--text-regular-font-weight)",
331
+ fontSize: "var(--text-regular-font-size)",
332
+ lineHeight: "var(--text-line-height)",
333
+ });
334
+ const light = asTextStyle({
335
+ ...interFontStyle,
336
+ color: "var(--text-color)",
337
+ fontWeight: "var(--text-light-font-weight)",
338
+ fontSize: "var(--text-light-font-size)",
339
+ lineHeight: "var(--text-line-height)",
340
+ });
341
+ const smallSemibold = asTextStyle({
342
+ ...interFontStyle,
343
+ color: "var(--text-color)",
344
+ fontWeight: "var(--text-small-semibold-font-weight)",
345
+ fontSize: "var(--text-small-semibold-font-size)",
346
+ lineHeight: "var(--text-line-height)",
347
+ });
348
+ const smallMedium = asTextStyle({
349
+ ...interFontStyle,
350
+ color: "var(--text-color)",
351
+ fontWeight: "var(--text-small-medium-font-weight)",
352
+ fontSize: "var(--text-small-medium-font-size)",
353
+ lineHeight: "var(--text-line-height)",
354
+ });
355
+ const smallRegular = asTextStyle({
356
+ ...interFontStyle,
357
+ color: "var(--text-color)",
358
+ fontWeight: "var(--text-small-regular-font-weight)",
359
+ fontSize: "var(--text-small-regular-font-size)",
360
+ lineHeight: "var(--text-line-height)",
361
+ });
362
+ const placeholder = asTextStyle({
363
+ ...interFontStyle,
364
+ color: "var(--placeholder-color)",
365
+ fontStyle: "italic",
366
+ fontWeight: "var(--placeholder-font-weight)",
367
+ fontSize: "var(--placeholder-font-size)",
368
+ lineHeight: "var(--placeholder-line-height)",
369
+ });
370
+ const smallPlaceholder = asTextStyle({
371
+ ...interFontStyle,
372
+ color: "var(--placeholder-color)",
373
+ fontStyle: "italic",
374
+ fontWeight: "var(--placeholder-small-font-weight)",
375
+ fontSize: "var(--placeholder-small-font-size)",
376
+ lineHeight: "var(--placeholder-line-height)",
377
+ });
378
+ export const texts = {
379
+ h1,
380
+ h2,
381
+ h3,
382
+ h4,
383
+ h5,
384
+ h6,
385
+ semibold,
386
+ medium,
387
+ regular,
388
+ light,
389
+ smallSemibold,
390
+ smallMedium,
391
+ smallRegular,
392
+ placeholder,
393
+ smallPlaceholder,
394
+ };
395
+ export const shadows = {
396
+ tile: "var(--shadow-tile)",
397
+ tileHover: "var(--shadow-tile-hover)",
398
+ modal: "var(--shadow-modal)",
399
+ };
400
+ export const spacings = {
401
+ 4: "var(--spacing-4)",
402
+ 8: "var(--spacing-8)",
403
+ 12: "var(--spacing-12)",
404
+ 16: "var(--spacing-16)",
405
+ 20: "var(--spacing-20)",
406
+ 24: "var(--spacing-24)",
407
+ 32: "var(--spacing-32)",
408
+ 40: "var(--spacing-40)",
409
+ 48: "var(--spacing-48)",
410
+ 72: "var(--spacing-72)",
411
+ 96: "var(--spacing-96)",
412
+ };
413
+ export const negativeSpacings = {
414
+ 4: "var(--spacing-negative-4)",
415
+ 8: "var(--spacing-negative-8)",
416
+ 12: "var(--spacing-negative-12)",
417
+ 16: "var(--spacing-negative-16)",
418
+ 20: "var(--spacing-negative-20)",
419
+ 24: "var(--spacing-negative-24)",
420
+ 32: "var(--spacing-negative-32)",
421
+ 40: "var(--spacing-negative-40)",
422
+ 48: "var(--spacing-negative-48)",
423
+ 72: "var(--spacing-negative-72)",
424
+ 96: "var(--spacing-negative-96)",
425
+ };
426
+ export const radii = {
427
+ 4: "var(--radius-4)",
428
+ 6: "var(--radius-6)",
429
+ 8: "var(--radius-8)",
430
+ };
431
+ export const fonts = {
432
+ primary: "var(--font-family-primary)",
433
+ card: "var( --font-family-card-font)",
434
+ code: "var(--font-family-code)",
435
+ };
436
+ const easeInOutQuad = "cubic-bezier(0.45, 0, 0.55, 1)";
437
+ const fadeAndSlideInFromTop = StyleSheet.create({
438
+ enter: {
439
+ animationKeyframes: {
440
+ from: {
441
+ opacity: 0,
442
+ transform: [{ translateY: -10 }],
443
+ },
444
+ },
445
+ animationDuration: "300ms",
446
+ animationTimingFunction: easeInOutQuad,
447
+ },
448
+ leave: {
449
+ animationKeyframes: {
450
+ to: {
451
+ opacity: 0,
452
+ transform: [{ translateY: -10 }],
453
+ },
454
+ },
455
+ animationDuration: "300ms",
456
+ animationTimingFunction: easeInOutQuad,
457
+ animationFillMode: "forwards",
458
+ },
459
+ });
460
+ const fadeAndSlideInFromLeft = StyleSheet.create({
461
+ enter: {
462
+ animationKeyframes: {
463
+ from: {
464
+ opacity: 0,
465
+ transform: [{ translateX: -10 }],
466
+ },
467
+ },
468
+ animationDuration: "300ms",
469
+ animationTimingFunction: easeInOutQuad,
470
+ },
471
+ leave: {
472
+ animationKeyframes: {
473
+ to: {
474
+ opacity: 0,
475
+ transform: [{ translateX: -10 }],
476
+ },
477
+ },
478
+ animationDuration: "300ms",
479
+ animationTimingFunction: easeInOutQuad,
480
+ animationFillMode: "forwards",
481
+ },
482
+ });
483
+ const fadeAndSlideInFromBottom = StyleSheet.create({
484
+ enter: {
485
+ animationKeyframes: {
486
+ from: {
487
+ opacity: 0,
488
+ transform: [{ translateY: 10 }],
489
+ },
490
+ },
491
+ animationDuration: "300ms",
492
+ animationTimingFunction: easeInOutQuad,
493
+ },
494
+ leave: {
495
+ animationKeyframes: {
496
+ to: {
497
+ opacity: 0,
498
+ transform: [{ translateY: 10 }],
499
+ },
500
+ },
501
+ animationDuration: "300ms",
502
+ animationTimingFunction: easeInOutQuad,
503
+ animationFillMode: "forwards",
504
+ },
505
+ });
506
+ const fadeAndSlideInFromRight = StyleSheet.create({
507
+ enter: {
508
+ animationKeyframes: {
509
+ from: {
510
+ opacity: 0,
511
+ transform: [{ translateZ: 0 }, { translateX: 10 }],
512
+ },
513
+ },
514
+ animationDuration: "300ms",
515
+ animationTimingFunction: easeInOutQuad,
516
+ },
517
+ leave: {
518
+ animationKeyframes: {
519
+ to: {
520
+ opacity: 0,
521
+ transform: [{ translateZ: 0 }, { translateX: 10 }],
522
+ },
523
+ },
524
+ animationDuration: "300ms",
525
+ animationTimingFunction: easeInOutQuad,
526
+ animationFillMode: "forwards",
527
+ },
528
+ });
529
+ const shake = StyleSheet.create({
530
+ enter: {
531
+ // animation copied from https://codepen.io/sdras/pen/aOgMON
532
+ animationKeyframes: [
533
+ {
534
+ "10%, 90%": {
535
+ transform: [{ translateX: -1 }],
536
+ },
537
+ "20%, 80%": {
538
+ transform: [{ translateX: 2 }],
539
+ },
540
+ "30%, 50%, 70%": {
541
+ transform: [{ translateX: -4 }],
542
+ },
543
+ "40%, 60%": {
544
+ transform: [{ translateX: 4 }],
545
+ },
546
+ },
547
+ ],
548
+ animationDuration: "800ms",
549
+ animationTimingFunction: "cubic-bezier(.36,.07,.19,.97)",
550
+ },
551
+ });
552
+ export const animations = {
553
+ fadeAndSlideInFromTop,
554
+ fadeAndSlideInFromLeft,
555
+ fadeAndSlideInFromBottom,
556
+ fadeAndSlideInFromRight,
557
+ shake,
558
+ };
559
+ export const breakpoints = {
560
+ large: 950,
561
+ medium: 800,
562
+ small: 600,
563
+ tiny: 500,
564
+ };
@@ -0,0 +1,10 @@
1
+ export declare const insets: {
2
+ top: string | number;
3
+ bottom: string | number;
4
+ left: string | number;
5
+ right: string | number;
6
+ addToTop: (value: number | string) => string | number;
7
+ addToBottom: (value: number | string) => string | number;
8
+ addToLeft: (value: number | string) => string | number;
9
+ addToRight: (value: number | string) => string | number;
10
+ };
@@ -0,0 +1,22 @@
1
+ const canUseSupports = "CSS" in window && "supports" in window.CSS;
2
+ const canUseConstant = canUseSupports && window.CSS.supports("top: constant(safe-area-inset-top)");
3
+ const canUseEnv = canUseSupports && window.CSS.supports("top: env(safe-area-inset-top)");
4
+ const cssFn = canUseConstant ? "constant" : "env";
5
+ const isAvailable = canUseConstant || canUseEnv;
6
+ const top = `${cssFn}(safe-area-inset-top)`;
7
+ const bottom = `${cssFn}(safe-area-inset-bottom)`;
8
+ const left = `${cssFn}(safe-area-inset-left)`;
9
+ const right = `${cssFn}(safe-area-inset-right)`;
10
+ const addToX = (value, to) => isAvailable && (value > 0 || typeof value === "string")
11
+ ? `calc(${to} + ${typeof value === "string" ? value : `${value}px`})`
12
+ : value;
13
+ export const insets = {
14
+ top: isAvailable ? top : 0,
15
+ bottom: isAvailable ? bottom : 0,
16
+ left: isAvailable ? left : 0,
17
+ right: isAvailable ? right : 0,
18
+ addToTop: (value) => addToX(value, top),
19
+ addToBottom: (value) => addToX(value, bottom),
20
+ addToLeft: (value) => addToX(value, left),
21
+ addToRight: (value) => addToX(value, right),
22
+ };
@@ -0,0 +1,26 @@
1
+ import { TextStyle } from "react-native";
2
+ export declare const typography: {
3
+ fontWeights: {
4
+ book: "400";
5
+ demi: "600";
6
+ };
7
+ lineHeights: {
8
+ title: number;
9
+ body: number;
10
+ input: number;
11
+ };
12
+ interFont: {
13
+ fontFamily: string;
14
+ letterSpacing: number;
15
+ };
16
+ baseStyle: {
17
+ color: string;
18
+ fontWeight: "400";
19
+ lineHeight: number;
20
+ fontFamily: string;
21
+ letterSpacing: number;
22
+ };
23
+ bodyLarge: TextStyle;
24
+ bodySmall: TextStyle;
25
+ caption: TextStyle;
26
+ };
@@ -0,0 +1,54 @@
1
+ import { colors } from "./colors";
2
+ const fontWeights = {
3
+ book: "400",
4
+ demi: "600",
5
+ };
6
+ const lineHeights = {
7
+ title: "1.25",
8
+ body: "1.65",
9
+ input: "1.25",
10
+ };
11
+ const interFont = {
12
+ fontFamily: [
13
+ "Inter",
14
+ "-apple-system",
15
+ "system-ui",
16
+ "BlinkMacSystemFont",
17
+ "Segoe UI",
18
+ "Helvetica",
19
+ "Arial",
20
+ "sans-serif",
21
+ "Apple Color Emoji",
22
+ "Segoe UI Emoji",
23
+ "Segoe UI Symbol",
24
+ "Noto Color Emoji",
25
+ ].join(","),
26
+ // Computed by Inter dynamic metrics tool
27
+ letterSpacing: "-0.011em",
28
+ };
29
+ // TODO: Create a styled <Text /> component with size: "small" | "large"
30
+ const baseStyle = {
31
+ ...interFont,
32
+ color: colors.gray[90],
33
+ fontWeight: fontWeights.book,
34
+ lineHeight: lineHeights.body,
35
+ };
36
+ const bodyLarge = { ...baseStyle, fontSize: 16 };
37
+ const bodySmall = { ...baseStyle, fontSize: 14 };
38
+ const caption = {
39
+ ...baseStyle,
40
+ fontSize: 13,
41
+ fontWeight: fontWeights.demi,
42
+ letterSpacing: "0.011em",
43
+ textTransform: "uppercase",
44
+ };
45
+ export const typography = {
46
+ fontWeights,
47
+ lineHeights,
48
+ interFont,
49
+ // TODO: Delete all this exports
50
+ baseStyle,
51
+ bodyLarge,
52
+ bodySmall,
53
+ caption,
54
+ };
@@ -0,0 +1,2 @@
1
+ import { Animated } from "react-native";
2
+ export declare const useAnimatedValue: (value: number) => Animated.Value;
@@ -0,0 +1,3 @@
1
+ import { Animated } from "react-native";
2
+ import { useLazyRef } from "./useLazyRef";
3
+ export const useAnimatedValue = (value) => useLazyRef(() => new Animated.Value(value)).current;
@@ -0,0 +1,3 @@
1
+ export declare const useBodyClassName: (className: string, { enabled }?: {
2
+ enabled?: boolean | undefined;
3
+ }) => void;