@expo/styleguide 7.0.0 → 8.0.0-alpha.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 (304) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +9 -22
  3. package/dist/index.d.ts +5 -13
  4. package/dist/index.js +701 -36
  5. package/dist/{components → src/components}/BlockingSetInitialColorMode.d.ts +0 -0
  6. package/dist/src/components/ButtonBase.d.ts +9 -0
  7. package/dist/{components → src/components}/ThemeProvider.d.ts +1 -1
  8. package/dist/src/components/index.d.ts +3 -0
  9. package/dist/{logos → src/logos}/DocsLogo.d.ts +0 -0
  10. package/dist/{logos → src/logos}/ExpoGoLogo.d.ts +0 -0
  11. package/dist/{logos → src/logos}/Logo.d.ts +0 -0
  12. package/dist/{logos → src/logos}/SnackLogo.d.ts +0 -0
  13. package/dist/{logos → src/logos}/WordMarkLogo.d.ts +0 -0
  14. package/dist/{logos → src/logos}/index.d.ts +0 -0
  15. package/dist/{styles → src/styles}/shadows.d.ts +0 -0
  16. package/dist/src/styles/themes.d.ts +227 -0
  17. package/dist/{styles → src/styles}/typography.d.ts +0 -0
  18. package/dist/{types → src/types}/index.d.ts +1 -1
  19. package/dist/tailwind.js +396 -0
  20. package/package.json +21 -19
  21. package/tailwind.js +325 -64
  22. package/dist/components/BlockingSetInitialColorMode.js +0 -64
  23. package/dist/components/ThemeProvider.js +0 -139
  24. package/dist/icons/ActivityIcon.d.ts +0 -3
  25. package/dist/icons/ActivityIcon.js +0 -14
  26. package/dist/icons/AddPhotoIcon.d.ts +0 -3
  27. package/dist/icons/AddPhotoIcon.js +0 -14
  28. package/dist/icons/AndroidIcon.d.ts +0 -3
  29. package/dist/icons/AndroidIcon.js +0 -14
  30. package/dist/icons/AppleAppStoreIcon.d.ts +0 -3
  31. package/dist/icons/AppleAppStoreIcon.js +0 -16
  32. package/dist/icons/AppleIcon.d.ts +0 -3
  33. package/dist/icons/AppleIcon.js +0 -14
  34. package/dist/icons/AppleSimulatorIcon.d.ts +0 -3
  35. package/dist/icons/AppleSimulatorIcon.js +0 -18
  36. package/dist/icons/ArrowDownIcon.d.ts +0 -3
  37. package/dist/icons/ArrowDownIcon.js +0 -14
  38. package/dist/icons/ArrowLeftIcon.d.ts +0 -3
  39. package/dist/icons/ArrowLeftIcon.js +0 -14
  40. package/dist/icons/ArrowRightIcon.d.ts +0 -3
  41. package/dist/icons/ArrowRightIcon.js +0 -14
  42. package/dist/icons/ArrowUpIcon.d.ts +0 -3
  43. package/dist/icons/ArrowUpIcon.js +0 -14
  44. package/dist/icons/ArrowUpRightIcon.d.ts +0 -3
  45. package/dist/icons/ArrowUpRightIcon.js +0 -14
  46. package/dist/icons/AtSignIcon.d.ts +0 -3
  47. package/dist/icons/AtSignIcon.js +0 -14
  48. package/dist/icons/BadgeIcon.d.ts +0 -3
  49. package/dist/icons/BadgeIcon.js +0 -15
  50. package/dist/icons/BellIcon.d.ts +0 -3
  51. package/dist/icons/BellIcon.js +0 -14
  52. package/dist/icons/BranchIcon.d.ts +0 -3
  53. package/dist/icons/BranchIcon.js +0 -14
  54. package/dist/icons/BugInspectIcon.d.ts +0 -3
  55. package/dist/icons/BugInspectIcon.js +0 -16
  56. package/dist/icons/BuildIcon.d.ts +0 -3
  57. package/dist/icons/BuildIcon.js +0 -14
  58. package/dist/icons/BuildNumberIcon.d.ts +0 -3
  59. package/dist/icons/BuildNumberIcon.js +0 -14
  60. package/dist/icons/BuildProfileIcon.d.ts +0 -3
  61. package/dist/icons/BuildProfileIcon.js +0 -14
  62. package/dist/icons/ChangelogIcon.d.ts +0 -3
  63. package/dist/icons/ChangelogIcon.js +0 -15
  64. package/dist/icons/ChannelIcon.d.ts +0 -3
  65. package/dist/icons/ChannelIcon.js +0 -15
  66. package/dist/icons/ChartIcon.d.ts +0 -3
  67. package/dist/icons/ChartIcon.js +0 -15
  68. package/dist/icons/CheckIcon.d.ts +0 -3
  69. package/dist/icons/CheckIcon.js +0 -14
  70. package/dist/icons/ChevronDownIcon.d.ts +0 -3
  71. package/dist/icons/ChevronDownIcon.js +0 -14
  72. package/dist/icons/ChevronLeftIcon.d.ts +0 -3
  73. package/dist/icons/ChevronLeftIcon.js +0 -14
  74. package/dist/icons/ChevronRightIcon.d.ts +0 -3
  75. package/dist/icons/ChevronRightIcon.js +0 -14
  76. package/dist/icons/ChevronUpIcon.d.ts +0 -3
  77. package/dist/icons/ChevronUpIcon.js +0 -14
  78. package/dist/icons/ClipboardIcon.d.ts +0 -3
  79. package/dist/icons/ClipboardIcon.js +0 -16
  80. package/dist/icons/CloudSlashIcon.d.ts +0 -3
  81. package/dist/icons/CloudSlashIcon.js +0 -14
  82. package/dist/icons/CodeIcon.d.ts +0 -3
  83. package/dist/icons/CodeIcon.js +0 -14
  84. package/dist/icons/CommandLineIcon.d.ts +0 -3
  85. package/dist/icons/CommandLineIcon.js +0 -14
  86. package/dist/icons/CommitIcon.d.ts +0 -3
  87. package/dist/icons/CommitIcon.js +0 -14
  88. package/dist/icons/CredentialIcon.d.ts +0 -3
  89. package/dist/icons/CredentialIcon.js +0 -16
  90. package/dist/icons/CreditCardIcon.d.ts +0 -3
  91. package/dist/icons/CreditCardIcon.js +0 -15
  92. package/dist/icons/DatabaseIcon.d.ts +0 -3
  93. package/dist/icons/DatabaseIcon.js +0 -15
  94. package/dist/icons/DebugIcon.d.ts +0 -3
  95. package/dist/icons/DebugIcon.js +0 -15
  96. package/dist/icons/DeploymentIcon.d.ts +0 -3
  97. package/dist/icons/DeploymentIcon.js +0 -14
  98. package/dist/icons/DeploymentsIcon.d.ts +0 -3
  99. package/dist/icons/DeploymentsIcon.js +0 -17
  100. package/dist/icons/DiscordIcon.d.ts +0 -3
  101. package/dist/icons/DiscordIcon.js +0 -14
  102. package/dist/icons/DiscourseIcon.d.ts +0 -3
  103. package/dist/icons/DiscourseIcon.js +0 -14
  104. package/dist/icons/DownloadIcon.d.ts +0 -3
  105. package/dist/icons/DownloadIcon.js +0 -15
  106. package/dist/icons/EasMetadataIcon.d.ts +0 -3
  107. package/dist/icons/EasMetadataIcon.js +0 -21
  108. package/dist/icons/EasSubmitIcon.d.ts +0 -3
  109. package/dist/icons/EasSubmitIcon.js +0 -21
  110. package/dist/icons/EditIcon.d.ts +0 -3
  111. package/dist/icons/EditIcon.js +0 -19
  112. package/dist/icons/ErrorIcon.d.ts +0 -3
  113. package/dist/icons/ErrorIcon.js +0 -14
  114. package/dist/icons/FacebookIcon.d.ts +0 -3
  115. package/dist/icons/FacebookIcon.js +0 -14
  116. package/dist/icons/GeneralIcon.d.ts +0 -3
  117. package/dist/icons/GeneralIcon.js +0 -25
  118. package/dist/icons/GithubIcon.d.ts +0 -3
  119. package/dist/icons/GithubIcon.js +0 -14
  120. package/dist/icons/GoogleAppStoreIcon.d.ts +0 -3
  121. package/dist/icons/GoogleAppStoreIcon.js +0 -14
  122. package/dist/icons/HamburgerIcon.d.ts +0 -3
  123. package/dist/icons/HamburgerIcon.js +0 -14
  124. package/dist/icons/HeadsetIcon.d.ts +0 -3
  125. package/dist/icons/HeadsetIcon.js +0 -18
  126. package/dist/icons/HomeFilledIcon.d.ts +0 -3
  127. package/dist/icons/HomeFilledIcon.js +0 -14
  128. package/dist/icons/HomeIcon.d.ts +0 -3
  129. package/dist/icons/HomeIcon.js +0 -14
  130. package/dist/icons/InfoIcon.d.ts +0 -3
  131. package/dist/icons/InfoIcon.js +0 -14
  132. package/dist/icons/InspectElementIcon.d.ts +0 -3
  133. package/dist/icons/InspectElementIcon.js +0 -15
  134. package/dist/icons/InstagramIcon.d.ts +0 -3
  135. package/dist/icons/InstagramIcon.js +0 -14
  136. package/dist/icons/InvoicesIcon.d.ts +0 -3
  137. package/dist/icons/InvoicesIcon.js +0 -15
  138. package/dist/icons/LifebuoyIcon.d.ts +0 -3
  139. package/dist/icons/LifebuoyIcon.js +0 -14
  140. package/dist/icons/LockIcon.d.ts +0 -3
  141. package/dist/icons/LockIcon.js +0 -14
  142. package/dist/icons/LogoutMobileIcon.d.ts +0 -3
  143. package/dist/icons/LogoutMobileIcon.js +0 -15
  144. package/dist/icons/LogsIcon.d.ts +0 -3
  145. package/dist/icons/LogsIcon.js +0 -16
  146. package/dist/icons/MailIcon.d.ts +0 -3
  147. package/dist/icons/MailIcon.js +0 -14
  148. package/dist/icons/MegaphoneIcon.d.ts +0 -3
  149. package/dist/icons/MegaphoneIcon.js +0 -15
  150. package/dist/icons/MessageIcon.d.ts +0 -3
  151. package/dist/icons/MessageIcon.js +0 -14
  152. package/dist/icons/MoreHorizontalIcon.d.ts +0 -3
  153. package/dist/icons/MoreHorizontalIcon.js +0 -16
  154. package/dist/icons/MoreVerticalIcon.d.ts +0 -3
  155. package/dist/icons/MoreVerticalIcon.js +0 -16
  156. package/dist/icons/OneTimePasswordIcon.d.ts +0 -3
  157. package/dist/icons/OneTimePasswordIcon.js +0 -16
  158. package/dist/icons/OpenInternalIcon.d.ts +0 -3
  159. package/dist/icons/OpenInternalIcon.js +0 -15
  160. package/dist/icons/OrganizationIcon.d.ts +0 -3
  161. package/dist/icons/OrganizationIcon.js +0 -15
  162. package/dist/icons/OverviewIcon.d.ts +0 -3
  163. package/dist/icons/OverviewIcon.js +0 -14
  164. package/dist/icons/PerformanceIcon.d.ts +0 -3
  165. package/dist/icons/PerformanceIcon.js +0 -15
  166. package/dist/icons/PersonalTrainerIcon.d.ts +0 -3
  167. package/dist/icons/PersonalTrainerIcon.js +0 -14
  168. package/dist/icons/PinIcon.d.ts +0 -3
  169. package/dist/icons/PinIcon.js +0 -14
  170. package/dist/icons/PlanEnterpriseIcon.d.ts +0 -3
  171. package/dist/icons/PlanEnterpriseIcon.js +0 -14
  172. package/dist/icons/PlanFreeIcon.d.ts +0 -3
  173. package/dist/icons/PlanFreeIcon.js +0 -14
  174. package/dist/icons/PlanProductionIcon.d.ts +0 -3
  175. package/dist/icons/PlanProductionIcon.js +0 -15
  176. package/dist/icons/PlansIcon.d.ts +0 -3
  177. package/dist/icons/PlansIcon.js +0 -15
  178. package/dist/icons/PlusIcon.d.ts +0 -3
  179. package/dist/icons/PlusIcon.js +0 -14
  180. package/dist/icons/PrivacyIcon.d.ts +0 -3
  181. package/dist/icons/PrivacyIcon.js +0 -14
  182. package/dist/icons/ProjectTransferIcon.d.ts +0 -3
  183. package/dist/icons/ProjectTransferIcon.js +0 -15
  184. package/dist/icons/PushToDeviceIcon.d.ts +0 -3
  185. package/dist/icons/PushToDeviceIcon.js +0 -17
  186. package/dist/icons/QrCodeIcon.d.ts +0 -3
  187. package/dist/icons/QrCodeIcon.js +0 -18
  188. package/dist/icons/QuestionIcon.d.ts +0 -3
  189. package/dist/icons/QuestionIcon.js +0 -14
  190. package/dist/icons/QuestionMarkIcon.d.ts +0 -3
  191. package/dist/icons/QuestionMarkIcon.js +0 -14
  192. package/dist/icons/ReceiptIcon.d.ts +0 -3
  193. package/dist/icons/ReceiptIcon.js +0 -15
  194. package/dist/icons/RedditIcon.d.ts +0 -3
  195. package/dist/icons/RedditIcon.js +0 -14
  196. package/dist/icons/RefreshIcon.d.ts +0 -3
  197. package/dist/icons/RefreshIcon.js +0 -17
  198. package/dist/icons/RolloutIcon.d.ts +0 -3
  199. package/dist/icons/RolloutIcon.js +0 -15
  200. package/dist/icons/RunIcon.d.ts +0 -3
  201. package/dist/icons/RunIcon.js +0 -15
  202. package/dist/icons/RuntimeVersionIcon.d.ts +0 -3
  203. package/dist/icons/RuntimeVersionIcon.js +0 -14
  204. package/dist/icons/ScanIcon.d.ts +0 -3
  205. package/dist/icons/ScanIcon.js +0 -15
  206. package/dist/icons/SearchIcon.d.ts +0 -3
  207. package/dist/icons/SearchIcon.js +0 -15
  208. package/dist/icons/SecretsIcon.d.ts +0 -3
  209. package/dist/icons/SecretsIcon.js +0 -14
  210. package/dist/icons/SettingsFilledIcon.d.ts +0 -3
  211. package/dist/icons/SettingsFilledIcon.js +0 -14
  212. package/dist/icons/SettingsIcon.d.ts +0 -3
  213. package/dist/icons/SettingsIcon.js +0 -14
  214. package/dist/icons/SlashShortcutIcon.d.ts +0 -3
  215. package/dist/icons/SlashShortcutIcon.js +0 -14
  216. package/dist/icons/SparklesIcon.d.ts +0 -3
  217. package/dist/icons/SparklesIcon.js +0 -14
  218. package/dist/icons/StatusCanceledIcon.d.ts +0 -3
  219. package/dist/icons/StatusCanceledIcon.js +0 -14
  220. package/dist/icons/StatusFailedIcon.d.ts +0 -3
  221. package/dist/icons/StatusFailedIcon.js +0 -14
  222. package/dist/icons/StatusNewIcon.d.ts +0 -3
  223. package/dist/icons/StatusNewIcon.js +0 -15
  224. package/dist/icons/StatusSuccessIcon.d.ts +0 -3
  225. package/dist/icons/StatusSuccessIcon.js +0 -14
  226. package/dist/icons/StatusWaitingIcon.d.ts +0 -3
  227. package/dist/icons/StatusWaitingIcon.js +0 -14
  228. package/dist/icons/StoreIcon.d.ts +0 -3
  229. package/dist/icons/StoreIcon.js +0 -21
  230. package/dist/icons/ThemeAutoIcon.d.ts +0 -3
  231. package/dist/icons/ThemeAutoIcon.js +0 -15
  232. package/dist/icons/ThemeDarkIcon.d.ts +0 -3
  233. package/dist/icons/ThemeDarkIcon.js +0 -14
  234. package/dist/icons/ThemeIcon.d.ts +0 -3
  235. package/dist/icons/ThemeIcon.js +0 -14
  236. package/dist/icons/ThemeLightIcon.d.ts +0 -3
  237. package/dist/icons/ThemeLightIcon.js +0 -15
  238. package/dist/icons/ThumbsDownIcon.d.ts +0 -3
  239. package/dist/icons/ThumbsDownIcon.js +0 -14
  240. package/dist/icons/ThumbsUpIcon.d.ts +0 -3
  241. package/dist/icons/ThumbsUpIcon.js +0 -14
  242. package/dist/icons/TokensIcon.d.ts +0 -3
  243. package/dist/icons/TokensIcon.js +0 -16
  244. package/dist/icons/TrashIcon.d.ts +0 -3
  245. package/dist/icons/TrashIcon.js +0 -14
  246. package/dist/icons/TriangleDownIcon.d.ts +0 -3
  247. package/dist/icons/TriangleDownIcon.js +0 -14
  248. package/dist/icons/TriangleLeftIcon.d.ts +0 -3
  249. package/dist/icons/TriangleLeftIcon.js +0 -14
  250. package/dist/icons/TriangleRightIcon.d.ts +0 -3
  251. package/dist/icons/TriangleRightIcon.js +0 -14
  252. package/dist/icons/TriangleUpIcon.d.ts +0 -3
  253. package/dist/icons/TriangleUpIcon.js +0 -14
  254. package/dist/icons/TwitchIcon.d.ts +0 -3
  255. package/dist/icons/TwitchIcon.js +0 -15
  256. package/dist/icons/TwitterIcon.d.ts +0 -3
  257. package/dist/icons/TwitterIcon.js +0 -14
  258. package/dist/icons/UndoIcon.d.ts +0 -3
  259. package/dist/icons/UndoIcon.js +0 -14
  260. package/dist/icons/UpdateIcon.d.ts +0 -3
  261. package/dist/icons/UpdateIcon.js +0 -15
  262. package/dist/icons/UpgradeIcon.d.ts +0 -3
  263. package/dist/icons/UpgradeIcon.js +0 -14
  264. package/dist/icons/UploadIcon.d.ts +0 -3
  265. package/dist/icons/UploadIcon.js +0 -15
  266. package/dist/icons/UserFilledIcon.d.ts +0 -3
  267. package/dist/icons/UserFilledIcon.js +0 -14
  268. package/dist/icons/UserIcon.d.ts +0 -3
  269. package/dist/icons/UserIcon.js +0 -14
  270. package/dist/icons/UsersFilledIcon.d.ts +0 -3
  271. package/dist/icons/UsersFilledIcon.js +0 -15
  272. package/dist/icons/UsersIcon.d.ts +0 -3
  273. package/dist/icons/UsersIcon.js +0 -15
  274. package/dist/icons/VersionIcon.d.ts +0 -3
  275. package/dist/icons/VersionIcon.js +0 -15
  276. package/dist/icons/WarningIcon.d.ts +0 -3
  277. package/dist/icons/WarningIcon.js +0 -14
  278. package/dist/icons/WrapLinesIcon.d.ts +0 -3
  279. package/dist/icons/WrapLinesIcon.js +0 -15
  280. package/dist/icons/XIcon.d.ts +0 -3
  281. package/dist/icons/XIcon.js +0 -14
  282. package/dist/icons/YoutubeIcon.d.ts +0 -3
  283. package/dist/icons/YoutubeIcon.js +0 -14
  284. package/dist/icons/index.d.ts +0 -130
  285. package/dist/icons/index.js +0 -265
  286. package/dist/logos/DocsLogo.js +0 -15
  287. package/dist/logos/ExpoGoLogo.js +0 -14
  288. package/dist/logos/Logo.js +0 -14
  289. package/dist/logos/SnackLogo.js +0 -15
  290. package/dist/logos/WordMarkLogo.js +0 -14
  291. package/dist/logos/index.js +0 -13
  292. package/dist/styles/breakpoints.d.ts +0 -5
  293. package/dist/styles/breakpoints.js +0 -8
  294. package/dist/styles/palette.d.ts +0 -200
  295. package/dist/styles/palette.js +0 -50
  296. package/dist/styles/shadows.js +0 -11
  297. package/dist/styles/sizing.d.ts +0 -19
  298. package/dist/styles/sizing.js +0 -22
  299. package/dist/styles/spacing.d.ts +0 -36
  300. package/dist/styles/spacing.js +0 -40
  301. package/dist/styles/themes.d.ts +0 -463
  302. package/dist/styles/themes.js +0 -467
  303. package/dist/styles/typography.js +0 -348
  304. package/dist/types/index.js +0 -2
package/dist/index.js CHANGED
@@ -1,37 +1,702 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1
+ import React, { createContext, useState, useEffect, useContext, forwardRef } from 'react';
2
+ import { twMerge } from 'tailwind-merge';
3
+ import { breakpoints, spacing, borderRadius, darkTheme } from '@expo/styleguide-base';
4
+
5
+ function isLocalStorageAvailable() {
6
+ try {
7
+ if (!window.localStorage || typeof window.localStorage === 'undefined') {
8
+ return false;
9
+ }
10
+ window.localStorage.setItem('localStorage:test', 'value');
11
+ if (window.localStorage.getItem('localStorage:test') !== 'value') {
12
+ return false;
13
+ }
14
+ window.localStorage.removeItem('localStorage:test');
15
+ return true;
16
+ }
17
+ catch (_a) {
18
+ return false;
19
+ }
20
+ }
21
+ function getInitialColorMode() {
22
+ if (isLocalStorageAvailable()) {
23
+ var preference = window.localStorage.getItem('data-expo-theme');
24
+ var hasPreference = typeof preference === 'string';
25
+ if (hasPreference) {
26
+ return preference;
27
+ }
28
+ }
29
+ var mql = window.matchMedia('(prefers-color-scheme: dark)');
30
+ var systemPreference = typeof mql.matches === 'boolean';
31
+ if (systemPreference) {
32
+ return mql.matches ? 'dark' : 'light';
33
+ }
34
+ return 'light';
35
+ }
36
+ function setInitialColorMode() {
37
+ var colorMode = getInitialColorMode();
38
+ // add HTML attribute if dark mode
39
+ if (colorMode === 'dark') {
40
+ document.documentElement.classList.add('dark-theme');
41
+ }
42
+ else {
43
+ document.documentElement.classList.remove('dark-theme');
44
+ }
45
+ }
46
+ // our function needs to be a string so that we can call it
47
+ var blockingSetInitialColorMode = "(function() {\n ".concat(isLocalStorageAvailable.toString(), "\n ").concat(getInitialColorMode.toString(), "\n ").concat(setInitialColorMode.toString(), "\n setInitialColorMode();\n})()\n");
48
+ function BlockingSetInitialColorMode() {
49
+ return (React.createElement("script", { dangerouslySetInnerHTML: {
50
+ __html: blockingSetInitialColorMode
51
+ } }));
52
+ }
53
+
54
+ var Themes;
55
+ (function (Themes) {
56
+ Themes["AUTO"] = "auto";
57
+ Themes["DARK"] = "dark";
58
+ Themes["LIGHT"] = "light";
59
+ })(Themes || (Themes = {}));
60
+ var ThemeContext = createContext({
61
+ setDarkMode: function () { },
62
+ setLightMode: function () { },
63
+ setAutoMode: function () { },
64
+ themeName: Themes.AUTO
65
+ });
66
+ function ThemeProvider(props) {
67
+ var children = props.children, _a = props.disabled, disabled = _a === void 0 ? false : _a;
68
+ var initialTheme = process.browser
69
+ ? document.documentElement.dataset.expoTheme
70
+ : Themes.AUTO;
71
+ var _b = useState(disabled ? Themes.LIGHT : initialTheme), themeName = _b[0], setThemeName = _b[1];
72
+ useEffect(function didMount() {
73
+ if (disabled)
74
+ return;
75
+ var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
76
+ try {
77
+ mediaQuery.addEventListener('change', onThemeChange);
78
+ }
79
+ catch (_a) {
80
+ // Fallback to old-style listening for changes, for Safari and IE
81
+ mediaQuery.addListener(onThemeChange);
82
+ }
83
+ if (isLocalStorageAvailable()) {
84
+ var themePreference = window.localStorage.getItem('data-expo-theme');
85
+ if (themePreference === Themes.LIGHT || themePreference === Themes.DARK) {
86
+ setThemeName(themePreference);
87
+ }
88
+ else {
89
+ setThemeName(Themes.AUTO);
90
+ }
91
+ }
92
+ else {
93
+ setThemeName(Themes.AUTO);
94
+ }
95
+ return function unMount() {
96
+ try {
97
+ mediaQuery.removeEventListener('change', onThemeChange);
98
+ }
99
+ catch (_a) {
100
+ // Fallback to old-style listening for changes, for Safari and IE
101
+ mediaQuery.removeListener(onThemeChange);
102
+ }
103
+ };
104
+ }, []);
105
+ function setDocumentTheme(themeName) {
106
+ if (disabled)
107
+ return;
108
+ if (themeName === Themes.DARK) {
109
+ document.documentElement.classList.add('dark-theme');
110
+ }
111
+ else {
112
+ document.documentElement.classList.remove('dark-theme');
113
+ }
114
+ }
115
+ function onThemeChange(event) {
116
+ if (isLocalStorageAvailable()) {
117
+ var themePreference = window.localStorage.getItem('data-expo-theme');
118
+ if (!themePreference) {
119
+ if (event.matches) {
120
+ setDocumentTheme(Themes.DARK);
121
+ }
122
+ else {
123
+ setDocumentTheme(Themes.LIGHT);
124
+ }
125
+ }
126
+ }
127
+ else {
128
+ setDocumentTheme(Themes.AUTO);
129
+ }
130
+ }
131
+ function setDarkMode() {
132
+ if (isLocalStorageAvailable()) {
133
+ window.localStorage.setItem('data-expo-theme', Themes.DARK);
134
+ }
135
+ setDocumentTheme(Themes.DARK);
136
+ setThemeName(Themes.DARK);
137
+ }
138
+ function setLightMode() {
139
+ if (isLocalStorageAvailable()) {
140
+ window.localStorage.setItem('data-expo-theme', Themes.LIGHT);
141
+ }
142
+ setDocumentTheme(Themes.LIGHT);
143
+ setThemeName(Themes.LIGHT);
144
+ }
145
+ function setAutoMode() {
146
+ if (isLocalStorageAvailable()) {
147
+ window.localStorage.removeItem('data-expo-theme');
148
+ }
149
+ var themeName = getInitialColorMode();
150
+ setDocumentTheme(themeName);
151
+ setThemeName(Themes.AUTO);
152
+ }
153
+ return (React.createElement(ThemeContext.Provider, { value: {
154
+ setDarkMode: setDarkMode,
155
+ setLightMode: setLightMode,
156
+ setAutoMode: setAutoMode,
157
+ themeName: themeName
158
+ } }, children));
159
+ }
160
+ function useTheme() {
161
+ var context = useContext(ThemeContext);
162
+ if (context === undefined) {
163
+ throw new Error('useTheme must be used within a ThemeProvider');
164
+ }
165
+ return context;
166
+ }
167
+
168
+ /******************************************************************************
169
+ Copyright (c) Microsoft Corporation.
170
+
171
+ Permission to use, copy, modify, and/or distribute this software for any
172
+ purpose with or without fee is hereby granted.
173
+
174
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
175
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
176
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
177
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
178
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
179
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
180
+ PERFORMANCE OF THIS SOFTWARE.
181
+ ***************************************************************************** */
182
+
183
+ var __assign = function() {
184
+ __assign = Object.assign || function __assign(t) {
185
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
186
+ s = arguments[i];
187
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
188
+ }
189
+ return t;
190
+ };
191
+ return __assign.apply(this, arguments);
192
+ };
193
+
194
+ function __rest(s, e) {
195
+ var t = {};
196
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
197
+ t[p] = s[p];
198
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
199
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
200
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
201
+ t[p[i]] = s[p[i]];
202
+ }
203
+ return t;
204
+ }
205
+
206
+ var ButtonBase = forwardRef(function (_a, ref) {
207
+ var children = _a.children, testID = _a.testID, className = _a.className, _b = _a.type, type = _b === void 0 ? 'button' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, rest = __rest(_a, ["children", "testID", "className", "type", "disabled"]);
208
+ return (React.createElement("button", __assign({ className: twMerge("flex text-left border-0, p-0 cursor-pointer", className), "data-testid": testID, disabled: disabled, ref: ref, type: type }, rest), children));
209
+ });
210
+
211
+ function DocsLogo(props) {
212
+ var _a = props.title, title = _a === void 0 ? "Docs-logo" : _a, color = props.color, titleId = props.titleId;
213
+ return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
214
+ title ? React.createElement("title", { id: titleId }, title) : null,
215
+ React.createElement("path", { d: "M12.07 8a.157.157 0 01.166.015l5.374 4.141a.16.16 0 01.055.168l-.37 1.298a.157.157 0 01-.234.09l-4.416-2.768-.846 5.47a.157.157 0 01-.219.12l-1.158-.518a.157.157 0 01-.093-.154l.477-7.132a.157.157 0 01.085-.129L12.069 8z", fill: color || "var(--expo-theme-icon-default)" }),
216
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.584.02a.157.157 0 00-.157.001L.708 5.071l-.003.001a.157.157 0 00-.079.135V15.31c0 .056.03.108.079.136l1.71.984.004.003a.157.157 0 00.157 0l1.054-.61v1.183c0 .056.03.108.078.136l1.715.987a.157.157 0 00.156 0l.003-.002 2.024-1.172.91 2.934a.157.157 0 00.198.102l1.815-.594a.156.156 0 00.03-.013l8.732-4.666a.157.157 0 00.075-.186L16.06 4.258a.157.157 0 00-.205-.098l-1.473.529v-1.85a.157.157 0 00-.079-.135l-.002-.001-1.713-.986a.157.157 0 00-.156 0l-1.054.61V1.144a.157.157 0 00-.078-.136L9.584.02zM5.33 9.56l-.003-1.578-1.383-.805v9.74l1.4.806-.014-8.119a.156.156 0 010-.045zM.94 5.48l1.384.805.017 9.741-1.4-.806V5.48zm9.968-4.336l-1.4-.806-8.412 4.87 1.385.806 8.427-4.87zM5.483 7.71l8.427-4.87-1.4-.806-8.411 4.87 1.384.806zm5.09 11.313l-3.21-9.971 8.455-4.519 3.21 9.97-8.456 4.52zM5.678 9.678l3.09 9.967 1.514-.496-3.21-9.972-1.394.501z", fill: color || "var(--expo-theme-icon-default)" })));
217
+ }
218
+
219
+ function ExpoGoLogo(props) {
220
+ var _a = props.title, title = _a === void 0 ? "Expo-go-logo" : _a, color = props.color, titleId = props.titleId;
221
+ return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
222
+ title ? React.createElement("title", { id: titleId }, title) : null,
223
+ React.createElement("path", { d: "M18.072 7.75a1.749 1.749 0 00-1.56-.732 1.763 1.763 0 00-1.436.946 1.55 1.55 0 00.302 1.75 2.57 2.57 0 001.716-.484 2.53 2.53 0 00.978-1.48zM12.866 1L11.751.394 6.897 3.072l.387.207.736.383 1.332-.733L12.867.987 12.866 1zm.449-.184a.173.173 0 01.124.115l1.626 4.755a.158.158 0 01-.077.207 3.126 3.126 0 00-1.384 1.519 3.09 3.09 0 00-.134 2.042 3.29 3.29 0 001.35 1.793 3.343 3.343 0 002.195.524.208.208 0 01.202.123l1.68 4.88a.196.196 0 01-.078.215l-5.163 2.992a.195.195 0 01-.078.015.208.208 0 01-.14-.022l-1.81-1.129a.18.18 0 01-.078-.076l-3.538-8.065-5.388 3.039a.25.25 0 01-.21.008l-1.224-.69a.177.177 0 01-.077-.23l5.234-9.847c.02-.033.05-.06.085-.076L11.65.023a.2.2 0 01.186 0l1.479.793zM6.843 3.46l-.256-.13-5.044 9.523.92.514 4.352-5.643a.212.212 0 01.178-.077.217.217 0 01.155.115l4.738 10.82 1.266.775L8.066 4.62l-.216-.614-1.014-.552.007.007zm7.804 5.679a1.932 1.932 0 01.092-1.28c.176-.404.484-.737.875-.945a2.152 2.152 0 012.509.307 1.934 1.934 0 01.056 2.745l-.056.056a2.118 2.118 0 01-1.986.516 2.118 2.118 0 01-.928-.508 2.091 2.091 0 01-.562-.891z", fill: color || "var(--expo-theme-icon-default)" })));
224
+ }
225
+
226
+ function Logo(props) {
227
+ var _a = props.title, title = _a === void 0 ? "Logo" : _a, color = props.color, titleId = props.titleId;
228
+ return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
229
+ title ? React.createElement("title", { id: titleId }, title) : null,
230
+ React.createElement("path", { d: "M9.477 7.638c.164-.24.343-.27.488-.27.145 0 .387.03.551.27 2.13 2.901 6.55 10.56 6.959 10.976.605.618 1.436.233 1.918-.468.475-.69.607-1.174.607-1.69 0-.352-6.883-13.05-7.576-14.106-.667-1.017-.884-1.274-2.025-1.274h-.854c-1.138 0-1.302.257-1.969 1.274C6.883 3.406 0 16.104 0 16.456c0 .517.132 1 .607 1.69.482.7 1.313 1.086 1.918.468.41-.417 4.822-8.075 6.952-10.977z", fill: color || "var(--expo-theme-icon-default)" })));
231
+ }
232
+
233
+ function SnackLogo(props) {
234
+ var _a = props.title, title = _a === void 0 ? "Snack-logo" : _a, color = props.color, titleId = props.titleId;
235
+ return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
236
+ title ? React.createElement("title", { id: titleId }, title) : null,
237
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.168 1.152a2.752 2.752 0 100 5.504 2.752 2.752 0 000-5.504zm-2.43 2.752a2.429 2.429 0 014.608-1.075 3.805 3.805 0 01-3.701 2.925h-.051a2.423 2.423 0 01-.855-1.85zm-1.755-1.422a.16.16 0 01.081.14v4.825L17.23 9.86c.05.029.081.082.082.14l.026 4.92a.16.16 0 01-.081.14l-8.52 4.92a.161.161 0 01-.242-.14V10c0-.057.03-.11.08-.14l4.006-2.319-4.005-2.32a.161.161 0 010-.28l4.246-2.458a.161.161 0 01.162 0zm3.845 7.517L13.064 7.82v4.36L16.828 10zM8.978 5.08l3.764 2.18V2.901l-3.763 2.18z", fill: color || "var(--expo-theme-icon-default)" }),
238
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.75.022a.161.161 0 00-.162 0l-4.242 2.46a.16.16 0 00-.019.01L.11 4.94l-.003.001a.161.161 0 00-.081.136v.004l-.013 4.994a.161.161 0 000 .125L0 14.92c0 .058.03.111.08.14l4.24 2.455.03.018 4.226 2.446a.161.161 0 00.242-.14v-9.746l4.166-2.412a.162.162 0 000-.28l-.081-.046V2.808l.08-.047a.162.162 0 000-.28L8.75.022zm3.828 2.597L8.67.35 4.74 2.626l3.917 2.267 3.922-2.275zM8.656 5.268L4.74 7.538l3.916 2.275L12.58 7.54 8.656 5.268zM4.419 7.352l3.915-2.27-3.916-2.268L.508 5.08 4.42 7.35zm-.165.277v4.692L.336 10.05l.012-4.69 3.906 2.268zm.323 4.879V7.817l3.918 2.275v4.685l-3.918-2.27zm-.323.186l-3.92-2.27-.01 4.403 3.93 2.276v-4.41zm.323 4.596v-4.41l3.918 2.27v4.408L4.577 17.29z", fill: color || "var(--expo-theme-icon-default)" })));
239
+ }
240
+
241
+ function WordMarkLogo(props) {
242
+ var _a = props.title, title = _a === void 0 ? "Word-mark-logo" : _a, color = props.color, titleId = props.titleId;
243
+ return (React.createElement("svg", __assign({ viewBox: "0 0 71 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
244
+ title ? React.createElement("title", { id: titleId }, title) : null,
245
+ React.createElement("path", { d: "M9.258 6.342c.158-.23.331-.26.472-.26.14 0 .374.03.532.26 2.06 2.806 6.332 10.208 6.727 10.611.585.597 1.388.225 1.854-.452.46-.667.587-1.135.587-1.634 0-.34-6.653-12.614-7.324-13.636C11.462.248 11.252 0 10.15 0h-.825c-1.1 0-1.259.248-1.903 1.23C6.75 2.254.097 14.528.097 14.868c0 .5.127.967.587 1.634.466.677 1.269 1.05 1.854.452.395-.403 4.661-7.805 6.72-10.61zm14.941-5.237v15.344h9.35v-3.113h-6.125v-3.244h5.45V6.98h-5.45V4.218h6.125V1.105h-9.35zM46.25 16.449l-3.88-5.568 3.619-5.195h-3.662L40.54 8.23l-1.765-2.543h-3.706l3.618 5.217-3.857 5.546h3.661l2.027-2.915 2.027 2.915h3.705zm7.572-10.982c-1.482 0-2.637.614-3.378 1.732V5.686H47.37V20h3.073v-5.063c.74 1.117 1.896 1.731 3.378 1.731 2.768 0 4.97-2.52 4.97-5.611 0-3.091-2.202-5.59-4.97-5.59zm-.697 8.242c-1.504 0-2.681-1.14-2.681-2.652 0-1.49 1.177-2.653 2.68-2.653 1.483 0 2.681 1.184 2.681 2.653 0 1.49-1.198 2.652-2.68 2.652zm12.188-8.242c-3.16 0-5.558 2.411-5.558 5.612 0 3.2 2.397 5.59 5.557 5.59 3.139 0 5.558-2.39 5.558-5.59 0-3.2-2.42-5.612-5.558-5.612zm0 2.96c1.438 0 2.55 1.117 2.55 2.652 0 1.49-1.112 2.63-2.55 2.63-1.46 0-2.55-1.14-2.55-2.63 0-1.535 1.09-2.653 2.55-2.653z", fill: color || "var(--expo-theme-icon-default)" })));
246
+ }
247
+
248
+ var shadows = {
249
+ none: 'var(--expo-theme-shadows-none)',
250
+ xs: 'var(--expo-theme-shadows-xs)',
251
+ sm: 'var(--expo-theme-shadows-sm)',
252
+ md: 'var(--expo-theme-shadows-md)',
253
+ lg: 'var(--expo-theme-shadows-lg)',
254
+ xl: 'var(--expo-theme-shadows-xl)'
11
255
  };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.useTheme = exports.typography = exports.ThemeProvider = exports.theme = exports.spacing = exports.shadows = exports.palette = exports.lightTheme = exports.iconSize = exports.darkTheme = exports.breakpoints = exports.BlockingSetInitialColorMode = exports.borderRadius = void 0;
14
- const palette_1 = require("./styles/palette");
15
- Object.defineProperty(exports, "palette", { enumerable: true, get: function () { return palette_1.palette; } });
16
- const shadows_1 = require("./styles/shadows");
17
- Object.defineProperty(exports, "shadows", { enumerable: true, get: function () { return shadows_1.shadows; } });
18
- const sizing_1 = require("./styles/sizing");
19
- Object.defineProperty(exports, "borderRadius", { enumerable: true, get: function () { return sizing_1.borderRadius; } });
20
- Object.defineProperty(exports, "iconSize", { enumerable: true, get: function () { return sizing_1.iconSize; } });
21
- const themes_1 = require("./styles/themes");
22
- Object.defineProperty(exports, "theme", { enumerable: true, get: function () { return themes_1.theme; } });
23
- Object.defineProperty(exports, "lightTheme", { enumerable: true, get: function () { return themes_1.lightTheme; } });
24
- Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return themes_1.darkTheme; } });
25
- const BlockingSetInitialColorMode_1 = require("./components/BlockingSetInitialColorMode");
26
- Object.defineProperty(exports, "BlockingSetInitialColorMode", { enumerable: true, get: function () { return BlockingSetInitialColorMode_1.BlockingSetInitialColorMode; } });
27
- const ThemeProvider_1 = require("./components/ThemeProvider");
28
- Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
29
- Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeProvider_1.useTheme; } });
30
- const spacing_1 = require("./styles/spacing");
31
- Object.defineProperty(exports, "spacing", { enumerable: true, get: function () { return spacing_1.spacing; } });
32
- const breakpoints_1 = require("./styles/breakpoints");
33
- Object.defineProperty(exports, "breakpoints", { enumerable: true, get: function () { return breakpoints_1.breakpoints; } });
34
- const typography_1 = require("./styles/typography");
35
- Object.defineProperty(exports, "typography", { enumerable: true, get: function () { return typography_1.typography; } });
36
- __exportStar(require("./icons"), exports);
37
- __exportStar(require("./logos"), exports);
256
+
257
+ var theme = {
258
+ background: {
259
+ "default": 'var(--expo-theme-background-default)',
260
+ screen: 'var(--expo-theme-background-screen)',
261
+ subtle: 'var(--expo-theme-background-subtle)',
262
+ element: 'var(--expo-theme-background-element)',
263
+ hover: 'var(--expo-theme-background-hover)',
264
+ selected: 'var(--expo-theme-background-selected)',
265
+ overlay: 'var(--expo-theme-background-overlay)',
266
+ success: 'var(--expo-theme-background-success)',
267
+ warning: 'var(--expo-theme-background-warning)',
268
+ danger: 'var(--expo-theme-background-danger)',
269
+ info: 'var(--expo-theme-background-info)'
270
+ },
271
+ icon: {
272
+ "default": 'var(--expo-theme-icon-default)',
273
+ secondary: 'var(--expo-theme-icon-secondary)',
274
+ tertiary: 'var(--expo-theme-icon-tertiary)',
275
+ quaternary: 'var(--expo-theme-icon-quaternary)',
276
+ success: 'var(--expo-theme-icon-success)',
277
+ warning: 'var(--expo-theme-icon-warning)',
278
+ danger: 'var(--expo-theme-icon-danger)',
279
+ info: 'var(--expo-theme-icon-info)'
280
+ },
281
+ text: {
282
+ "default": 'var(--expo-theme-text-default)',
283
+ secondary: 'var(--expo-theme-text-secondary)',
284
+ tertiary: 'var(--expo-theme-text-tertiary)',
285
+ quaternary: 'var(--expo-theme-text-quaternary)',
286
+ link: 'var(--expo-theme-text-link)',
287
+ success: 'var(--expo-theme-text-success)',
288
+ warning: 'var(--expo-theme-text-warning)',
289
+ danger: 'var(--expo-theme-text-danger)',
290
+ info: 'var(--expo-theme-text-info)'
291
+ },
292
+ border: {
293
+ "default": 'var(--expo-theme-border-default)',
294
+ secondary: 'var(--expo-theme-border-secondary)',
295
+ success: 'var(--expo-theme-border-success)',
296
+ warning: 'var(--expo-theme-border-warning)',
297
+ danger: 'var(--expo-theme-border-danger)',
298
+ info: 'var(--expo-theme-border-info)'
299
+ },
300
+ button: {
301
+ primary: {
302
+ background: 'var(--expo-theme-button-primary-background)',
303
+ border: 'var(--expo-theme-button-primary-border)',
304
+ hover: 'var(--expo-theme-button-primary-hover)',
305
+ icon: 'var(--expo-theme-button-primary-icon)',
306
+ text: 'var(--expo-theme-button-primary-text)',
307
+ disabled: {
308
+ background: 'var(--expo-theme-button-primary-disabled-background)',
309
+ border: 'var(--expo-theme-button-primary-disabled-border)',
310
+ text: 'var(--expo-theme-button-primary-disabled-text)'
311
+ },
312
+ destructive: {
313
+ background: 'var(--expo-theme-button-primary-destructive-background)',
314
+ border: 'var(--expo-theme-button-primary-destructive-border)',
315
+ hover: 'var(--expo-theme-button-primary-destructive-hover)',
316
+ icon: 'var(--expo-theme-button-primary-destructive-icon)',
317
+ text: 'var(--expo-theme-button-primary-destructive-text)',
318
+ disabled: {
319
+ background: 'var(--expo-theme-button-primary-destructive-disabled-background)',
320
+ border: 'var(--expo-theme-button-primary-destructive-disabled-border)',
321
+ text: 'var(--expo-theme-button-primary-destructive-disabled-text)'
322
+ }
323
+ }
324
+ },
325
+ secondary: {
326
+ background: 'var(--expo-theme-button-secondary-background)',
327
+ border: 'var(--expo-theme-button-secondary-border)',
328
+ hover: 'var(--expo-theme-button-secondary-hover)',
329
+ icon: 'var(--expo-theme-button-secondary-icon)',
330
+ text: 'var(--expo-theme-button-secondary-text)',
331
+ disabled: {
332
+ background: 'var(--expo-theme-button-secondary-disabled-background)',
333
+ border: 'var(--expo-theme-button-secondary-disabled-border)',
334
+ text: 'var(--expo-theme-button-secondary-disabled-text)'
335
+ },
336
+ destructive: {
337
+ background: 'var(--expo-theme-button-secondary-destructive-background)',
338
+ border: 'var(--expo-theme-button-secondary-destructive-border)',
339
+ hover: 'var(--expo-theme-button-secondary-destructive-hover)',
340
+ icon: 'var(--expo-theme-button-secondary-destructive-icon)',
341
+ text: 'var(--expo-theme-button-secondary-destructive-text)',
342
+ disabled: {
343
+ background: 'var(--expo-theme-button-secondary-destructive-disabled-background)',
344
+ border: 'var(--expo-theme-button-secondary-destructive-disabled-border)',
345
+ text: 'var(--expo-theme-button-secondary-destructive-disabled-text)'
346
+ }
347
+ }
348
+ },
349
+ tertiary: {
350
+ background: 'var(--expo-theme-button-tertiary-background)',
351
+ border: 'var(--expo-theme-button-tertiary-border)',
352
+ hover: 'var(--expo-theme-button-tertiary-hover)',
353
+ icon: 'var(--expo-theme-button-tertiary-icon)',
354
+ text: 'var(--expo-theme-button-tertiary-text)',
355
+ disabled: {
356
+ background: 'var(--expo-theme-button-tertiary-disabled-background)',
357
+ border: 'var(--expo-theme-button-tertiary-disabled-border)',
358
+ text: 'var(--expo-theme-button-tertiary-disabled-text)'
359
+ }
360
+ },
361
+ quaternary: {
362
+ background: 'var(--expo-theme-button-quaternary-background)',
363
+ border: 'var(--expo-theme-button-quaternary-border)',
364
+ hover: 'var(--expo-theme-button-quaternary-hover)',
365
+ icon: 'var(--expo-theme-button-quaternary-icon)',
366
+ text: 'var(--expo-theme-button-quaternary-text)',
367
+ disabled: {
368
+ background: 'var(--expo-theme-button-quaternary-disabled-background)',
369
+ border: 'var(--expo-theme-button-quaternary-disabled-border)',
370
+ text: 'var(--expo-theme-button-quaternary-disabled-text)'
371
+ }
372
+ }
373
+ },
374
+ project: {
375
+ blue: 'var(--expo-theme-project-blue)',
376
+ green: 'var(--expo-theme-project-green)',
377
+ yellow: 'var(--expo-theme-project-yellow)',
378
+ orange: 'var(--expo-theme-project-orange)',
379
+ red: 'var(--expo-theme-project-red)',
380
+ pink: 'var(--expo-theme-project-pink)',
381
+ purple: 'var(--expo-theme-project-purple)'
382
+ },
383
+ palette: {
384
+ white: 'var(--expo-color-white)',
385
+ black: 'var(--expo-color-black)',
386
+ green1: 'var(--green1)',
387
+ green2: 'var(--green2)',
388
+ green3: 'var(--green3)',
389
+ green4: 'var(--green4)',
390
+ green5: 'var(--green5)',
391
+ green6: 'var(--green6)',
392
+ green7: 'var(--green7)',
393
+ green8: 'var(--green8)',
394
+ green9: 'var(--green9)',
395
+ green10: 'var(--green10)',
396
+ green11: 'var(--green11)',
397
+ green12: 'var(--green12)',
398
+ purple1: 'var(--purple1)',
399
+ purple2: 'var(--purple2)',
400
+ purple3: 'var(--purple3)',
401
+ purple4: 'var(--purple4)',
402
+ purple5: 'var(--purple5)',
403
+ purple6: 'var(--purple6)',
404
+ purple7: 'var(--purple7)',
405
+ purple8: 'var(--purple8)',
406
+ purple9: 'var(--purple9)',
407
+ purple10: 'var(--purple10)',
408
+ purple11: 'var(--purple11)',
409
+ purple12: 'var(--purple12)',
410
+ pink1: 'var(--pink1)',
411
+ pink2: 'var(--pink2)',
412
+ pink3: 'var(--pink3)',
413
+ pink4: 'var(--pink4)',
414
+ pink5: 'var(--pink5)',
415
+ pink6: 'var(--pink6)',
416
+ pink7: 'var(--pink7)',
417
+ pink8: 'var(--pink8)',
418
+ pink9: 'var(--pink9)',
419
+ pink10: 'var(--pink10)',
420
+ pink11: 'var(--pink11)',
421
+ pink12: 'var(--pink12)',
422
+ orange1: 'var(--orange1)',
423
+ orange2: 'var(--orange2)',
424
+ orange3: 'var(--orange3)',
425
+ orange4: 'var(--orange4)',
426
+ orange5: 'var(--orange5)',
427
+ orange6: 'var(--orange6)',
428
+ orange7: 'var(--orange7)',
429
+ orange8: 'var(--orange8)',
430
+ orange9: 'var(--orange9)',
431
+ orange10: 'var(--orange10)',
432
+ orange11: 'var(--orange11)',
433
+ orange12: 'var(--orange12)',
434
+ yellow1: 'var(--yellow1)',
435
+ yellow2: 'var(--yellow2)',
436
+ yellow3: 'var(--yellow3)',
437
+ yellow4: 'var(--yellow4)',
438
+ yellow5: 'var(--yellow5)',
439
+ yellow6: 'var(--yellow6)',
440
+ yellow7: 'var(--yellow7)',
441
+ yellow8: 'var(--yellow8)',
442
+ yellow9: 'var(--yellow9)',
443
+ yellow10: 'var(--yellow10)',
444
+ yellow11: 'var(--yellow11)',
445
+ yellow12: 'var(--yellow12)',
446
+ blue1: 'var(--blue1)',
447
+ blue2: 'var(--blue2)',
448
+ blue3: 'var(--blue3)',
449
+ blue4: 'var(--blue4)',
450
+ blue5: 'var(--blue5)',
451
+ blue6: 'var(--blue6)',
452
+ blue7: 'var(--blue7)',
453
+ blue8: 'var(--blue8)',
454
+ blue9: 'var(--blue9)',
455
+ blue10: 'var(--blue10)',
456
+ blue11: 'var(--blue11)',
457
+ blue12: 'var(--blue12)',
458
+ red1: 'var(--red1)',
459
+ red2: 'var(--red2)',
460
+ red3: 'var(--red3)',
461
+ red4: 'var(--red4)',
462
+ red5: 'var(--red5)',
463
+ red6: 'var(--red6)',
464
+ red7: 'var(--red7)',
465
+ red8: 'var(--red8)',
466
+ red9: 'var(--red9)',
467
+ red10: 'var(--red10)',
468
+ red11: 'var(--red11)',
469
+ red12: 'var(--red12)',
470
+ gray1: 'var(--slate1)',
471
+ gray2: 'var(--slate2)',
472
+ gray3: 'var(--slate3)',
473
+ gray4: 'var(--slate4)',
474
+ gray5: 'var(--slate5)',
475
+ gray6: 'var(--slate6)',
476
+ gray7: 'var(--slate7)',
477
+ gray8: 'var(--slate8)',
478
+ gray9: 'var(--slate9)',
479
+ gray10: 'var(--slate10)',
480
+ gray11: 'var(--slate11)',
481
+ gray12: 'var(--slate12)'
482
+ }
483
+ };
484
+
485
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
486
+ var baseFontSize = 16;
487
+ function round(value) {
488
+ return value
489
+ .toFixed(7)
490
+ .replace(/(\.[0-9]+?)0+$/, '$1') // remove trailing zeroes after decimals
491
+ .replace(/\.0$/, ''); // remove any remaining zeroes
492
+ }
493
+ function rem(px) {
494
+ return "".concat(round(px / baseFontSize), "rem");
495
+ }
496
+ var fontSizes = {
497
+ 61: {
498
+ fontSize: rem(61),
499
+ lineHeight: round(73 / 61),
500
+ letterSpacing: rem(-0.022 * baseFontSize)
501
+ },
502
+ 53: {
503
+ fontSize: rem(53),
504
+ lineHeight: round(64 / 53),
505
+ letterSpacing: rem(-0.022 * baseFontSize)
506
+ },
507
+ 49: {
508
+ fontSize: rem(49),
509
+ lineHeight: round(59 / 49),
510
+ letterSpacing: rem(-0.022 * baseFontSize)
511
+ },
512
+ 46: {
513
+ fontSize: rem(46),
514
+ lineHeight: round(55 / 46),
515
+ letterSpacing: rem(-0.022 * baseFontSize)
516
+ },
517
+ 43: {
518
+ fontSize: rem(43),
519
+ lineHeight: round(52 / 43),
520
+ letterSpacing: rem(-0.022 * baseFontSize)
521
+ },
522
+ 39: {
523
+ fontSize: rem(39),
524
+ lineHeight: round(51 / 39),
525
+ letterSpacing: rem(-0.022 * baseFontSize)
526
+ },
527
+ 37: {
528
+ fontSize: rem(37),
529
+ lineHeight: round(48 / 37),
530
+ letterSpacing: rem(-0.022 * baseFontSize)
531
+ },
532
+ 34: {
533
+ fontSize: rem(34),
534
+ lineHeight: round(44 / 34),
535
+ letterSpacing: rem(-0.022 * baseFontSize)
536
+ },
537
+ 31: {
538
+ fontSize: rem(31),
539
+ lineHeight: round(40 / 31),
540
+ letterSpacing: rem(-0.021 * baseFontSize)
541
+ },
542
+ 29: {
543
+ fontSize: rem(29),
544
+ lineHeight: round(38 / 29),
545
+ letterSpacing: rem(-0.021 * baseFontSize)
546
+ },
547
+ 27: {
548
+ fontSize: rem(27),
549
+ lineHeight: round(36 / 27),
550
+ letterSpacing: rem(-0.021 * baseFontSize)
551
+ },
552
+ 25: {
553
+ fontSize: rem(25),
554
+ lineHeight: round(35 / 25),
555
+ letterSpacing: rem(-0.021 * baseFontSize)
556
+ },
557
+ 23: {
558
+ fontSize: rem(23),
559
+ lineHeight: round(32 / 23),
560
+ letterSpacing: rem(-0.019 * baseFontSize)
561
+ },
562
+ 22: {
563
+ fontSize: rem(22),
564
+ lineHeight: round(31 / 22),
565
+ letterSpacing: rem(-0.018 * baseFontSize)
566
+ },
567
+ 20: {
568
+ fontSize: rem(20),
569
+ lineHeight: round(30 / 20),
570
+ letterSpacing: rem(-0.017 * baseFontSize)
571
+ },
572
+ 19: {
573
+ fontSize: rem(19),
574
+ lineHeight: round(29 / 19),
575
+ letterSpacing: rem(-0.015 * baseFontSize)
576
+ },
577
+ 18: {
578
+ fontSize: rem(18),
579
+ lineHeight: round(28 / 18),
580
+ letterSpacing: rem(-0.014 * baseFontSize)
581
+ },
582
+ 16: {
583
+ fontSize: rem(16),
584
+ lineHeight: round(26 / 16),
585
+ letterSpacing: rem(-0.011 * baseFontSize)
586
+ },
587
+ 15: {
588
+ fontSize: rem(15),
589
+ lineHeight: round(24 / 15),
590
+ letterSpacing: rem(-0.009 * baseFontSize)
591
+ },
592
+ 14: {
593
+ fontSize: rem(14),
594
+ lineHeight: round(22 / 14),
595
+ letterSpacing: rem(-0.006 * baseFontSize)
596
+ },
597
+ 13: {
598
+ fontSize: rem(13),
599
+ lineHeight: round(21 / 13),
600
+ letterSpacing: rem(-0.003 * baseFontSize)
601
+ },
602
+ 12: { fontSize: rem(12), lineHeight: round(19 / 12) }
603
+ };
604
+ var headers = {
605
+ xl: {
606
+ huge: __assign(__assign({ fontWeight: 900 }, fontSizes[61]), (_a = {}, _a["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[53], _a["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[46], _a)),
607
+ h1: __assign(__assign({ fontWeight: 600 }, fontSizes[49]), (_b = {}, _b["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[43], _b["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[37], _b)),
608
+ h2: __assign(__assign({ fontWeight: 600 }, fontSizes[39]), (_c = {}, _c["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[34], _c["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[29], _c)),
609
+ h3: __assign(__assign({ fontWeight: 600 }, fontSizes[31]), (_d = {}, _d["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[27], _d["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[23], _d)),
610
+ h4: __assign(__assign({ fontWeight: 500 }, fontSizes[25]), (_e = {}, _e["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[22], _e["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[19], _e)),
611
+ h5: __assign(__assign({ fontWeight: 500 }, fontSizes[20]), (_f = {}, _f["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[18], _f["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[16], _f)),
612
+ h6: __assign({ fontWeight: 500 }, fontSizes[16])
613
+ },
614
+ "default": {
615
+ huge: __assign(__assign({ fontWeight: 900 }, fontSizes[39]), (_g = {}, _g["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[34], _g["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[29], _g)),
616
+ h1: __assign(__assign({ fontWeight: 600 }, fontSizes[31]), (_h = {}, _h["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[27], _h["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[23], _h)),
617
+ h2: __assign(__assign({ fontWeight: 600 }, fontSizes[25]), (_j = {}, _j["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[22], _j["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[19], _j)),
618
+ h3: __assign(__assign({ fontWeight: 600 }, fontSizes[20]), (_k = {}, _k["@media (max-width: ".concat(breakpoints.medium, "px)")] = fontSizes[18], _k["@media (max-width: ".concat(breakpoints.small, "px)")] = fontSizes[16], _k)),
619
+ h4: __assign({ fontWeight: 600 }, fontSizes[16]),
620
+ h5: __assign({ fontWeight: 600 }, fontSizes[13]),
621
+ h6: __assign({ fontWeight: 600 }, fontSizes[12])
622
+ }
623
+ };
624
+ var baseStyle = __assign({ fontWeight: 400 }, fontSizes[16]);
625
+ var body = {
626
+ headline: __assign({ fontWeight: 500 }, fontSizes[16]),
627
+ paragraph: baseStyle,
628
+ label: __assign({ fontWeight: 500 }, fontSizes[15]),
629
+ callout: __assign({ fontWeight: 400 }, fontSizes[14]),
630
+ footnote: __assign({ fontWeight: 400 }, fontSizes[13]),
631
+ caption: __assign({ fontWeight: 400 }, fontSizes[12]),
632
+ code: __assign({ fontWeight: 400 }, fontSizes[13]),
633
+ ul: {
634
+ marginLeft: '1.5rem',
635
+ 'ol, ul': {
636
+ marginTop: '0.5rem',
637
+ marginBottom: '1rem'
638
+ }
639
+ },
640
+ ol: {
641
+ marginLeft: '1.5rem',
642
+ 'ol, ul': {
643
+ marginTop: '0.5rem',
644
+ marginBottom: '1rem'
645
+ }
646
+ },
647
+ li: __assign(__assign({}, baseStyle), { marginBottom: '0.5rem' }),
648
+ blockquote: __assign(__assign({}, baseStyle), { color: theme.text.secondary, paddingLeft: spacing[4], borderLeft: "".concat(spacing[1], "px solid ").concat(theme.border["default"]) })
649
+ };
650
+ var utility = {
651
+ anchor: {
652
+ color: theme.text.link,
653
+ fontWeight: 400,
654
+ textDecoration: 'none',
655
+ cursor: 'pointer',
656
+ transition: '200ms',
657
+ // transform prevents a 1px shift on hover on Safari
658
+ transform: 'translate3d(0,0,0)',
659
+ ':visited': {
660
+ color: theme.text.link
661
+ },
662
+ ':hover': {
663
+ opacity: 0.8
664
+ }
665
+ },
666
+ inlineCode: __assign(__assign({}, body.code), { display: 'inline-block', backgroundColor: theme.background.subtle, border: "1px solid ".concat(theme.border["default"]), borderRadius: borderRadius.md, padding: '2px 4px', lineHeight: '130%' }),
667
+ terminalCode: __assign(__assign({}, body.code), { display: 'inline-block', backgroundColor: darkTheme.background.subtle, color: darkTheme.text["default"], border: "1px solid ".concat(darkTheme.border["default"]), borderRadius: borderRadius.md, padding: '2px 4px', lineHeight: '130%' }),
668
+ pre: __assign(__assign({}, body.code), { backgroundColor: theme.background.subtle, borderRadius: borderRadius.md, border: "1px solid ".concat(theme.border["default"]), padding: spacing[4], whiteSpace: 'pre-wrap', margin: "".concat(spacing[4], "px 0") }),
669
+ terminalPre: __assign(__assign({}, body.code), { backgroundColor: darkTheme.background.subtle, color: darkTheme.text["default"], borderRadius: borderRadius.md, border: "1px solid ".concat(darkTheme.border["default"]), padding: spacing[4], margin: "".concat(spacing[4], "px 0"), whiteSpace: 'pre-wrap', '&:before': {
670
+ content: '"➜ "'
671
+ } }),
672
+ hr: {
673
+ backgroundColor: theme.border["default"],
674
+ border: 0,
675
+ height: 1,
676
+ display: 'block',
677
+ width: '100%'
678
+ },
679
+ weight: {
680
+ black: {
681
+ fontWeight: 900
682
+ },
683
+ semiBold: {
684
+ fontWeight: 600
685
+ },
686
+ medium: {
687
+ fontWeight: 500
688
+ },
689
+ regular: {
690
+ fontWeight: 400
691
+ }
692
+ }
693
+ };
694
+ var typography = {
695
+ baseFontSize: baseFontSize,
696
+ headers: headers,
697
+ body: body,
698
+ utility: utility,
699
+ fontSizes: fontSizes
700
+ };
701
+
702
+ export { BlockingSetInitialColorMode, ButtonBase, DocsLogo, ExpoGoLogo, Logo, SnackLogo, ThemeProvider, WordMarkLogo, shadows, theme, typography, useTheme };