@expo/styleguide 7.0.0 → 8.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +32 -18
- package/dist/expo-theme.css +3 -3
- package/dist/global.css +13 -0
- package/dist/index.d.ts +5 -13
- package/dist/index.js +856 -37
- package/dist/src/components/Button/Button.d.ts +12 -0
- package/dist/src/components/Button/ButtonBase.d.ts +8 -0
- package/dist/src/components/Button/helpers.d.ts +6 -0
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/Link/Link.d.ts +2 -0
- package/dist/src/components/Link/LinkBase.d.ts +12 -0
- package/dist/src/components/Link/index.d.ts +2 -0
- package/dist/{components → src/components/Theme}/BlockingSetInitialColorMode.d.ts +0 -1
- package/dist/{components → src/components/Theme}/ThemeProvider.d.ts +1 -1
- package/dist/src/components/Theme/index.d.ts +2 -0
- package/dist/src/components/index.d.ts +3 -0
- package/dist/src/logos/DocsLogo.d.ts +2 -0
- package/dist/src/logos/ExpoGoLogo.d.ts +2 -0
- package/dist/src/logos/Logo.d.ts +2 -0
- package/dist/src/logos/SnackLogo.d.ts +2 -0
- package/dist/src/logos/WordMarkLogo.d.ts +2 -0
- package/dist/src/styles/themes.d.ts +227 -0
- package/dist/{types → src/types}/index.d.ts +1 -1
- package/dist/tailwind.js +360 -0
- package/package.json +26 -21
- package/tailwind.js +322 -97
- package/dist/components/BlockingSetInitialColorMode.js +0 -64
- package/dist/components/ThemeProvider.js +0 -139
- package/dist/icons/ActivityIcon.d.ts +0 -3
- package/dist/icons/ActivityIcon.js +0 -14
- package/dist/icons/AddPhotoIcon.d.ts +0 -3
- package/dist/icons/AddPhotoIcon.js +0 -14
- package/dist/icons/AndroidIcon.d.ts +0 -3
- package/dist/icons/AndroidIcon.js +0 -14
- package/dist/icons/AppleAppStoreIcon.d.ts +0 -3
- package/dist/icons/AppleAppStoreIcon.js +0 -16
- package/dist/icons/AppleIcon.d.ts +0 -3
- package/dist/icons/AppleIcon.js +0 -14
- package/dist/icons/AppleSimulatorIcon.d.ts +0 -3
- package/dist/icons/AppleSimulatorIcon.js +0 -18
- package/dist/icons/ArrowDownIcon.d.ts +0 -3
- package/dist/icons/ArrowDownIcon.js +0 -14
- package/dist/icons/ArrowLeftIcon.d.ts +0 -3
- package/dist/icons/ArrowLeftIcon.js +0 -14
- package/dist/icons/ArrowRightIcon.d.ts +0 -3
- package/dist/icons/ArrowRightIcon.js +0 -14
- package/dist/icons/ArrowUpIcon.d.ts +0 -3
- package/dist/icons/ArrowUpIcon.js +0 -14
- package/dist/icons/ArrowUpRightIcon.d.ts +0 -3
- package/dist/icons/ArrowUpRightIcon.js +0 -14
- package/dist/icons/AtSignIcon.d.ts +0 -3
- package/dist/icons/AtSignIcon.js +0 -14
- package/dist/icons/BadgeIcon.d.ts +0 -3
- package/dist/icons/BadgeIcon.js +0 -15
- package/dist/icons/BellIcon.d.ts +0 -3
- package/dist/icons/BellIcon.js +0 -14
- package/dist/icons/BranchIcon.d.ts +0 -3
- package/dist/icons/BranchIcon.js +0 -14
- package/dist/icons/BugInspectIcon.d.ts +0 -3
- package/dist/icons/BugInspectIcon.js +0 -16
- package/dist/icons/BuildIcon.d.ts +0 -3
- package/dist/icons/BuildIcon.js +0 -14
- package/dist/icons/BuildNumberIcon.d.ts +0 -3
- package/dist/icons/BuildNumberIcon.js +0 -14
- package/dist/icons/BuildProfileIcon.d.ts +0 -3
- package/dist/icons/BuildProfileIcon.js +0 -14
- package/dist/icons/ChangelogIcon.d.ts +0 -3
- package/dist/icons/ChangelogIcon.js +0 -15
- package/dist/icons/ChannelIcon.d.ts +0 -3
- package/dist/icons/ChannelIcon.js +0 -15
- package/dist/icons/ChartIcon.d.ts +0 -3
- package/dist/icons/ChartIcon.js +0 -15
- package/dist/icons/CheckIcon.d.ts +0 -3
- package/dist/icons/CheckIcon.js +0 -14
- package/dist/icons/ChevronDownIcon.d.ts +0 -3
- package/dist/icons/ChevronDownIcon.js +0 -14
- package/dist/icons/ChevronLeftIcon.d.ts +0 -3
- package/dist/icons/ChevronLeftIcon.js +0 -14
- package/dist/icons/ChevronRightIcon.d.ts +0 -3
- package/dist/icons/ChevronRightIcon.js +0 -14
- package/dist/icons/ChevronUpIcon.d.ts +0 -3
- package/dist/icons/ChevronUpIcon.js +0 -14
- package/dist/icons/ClipboardIcon.d.ts +0 -3
- package/dist/icons/ClipboardIcon.js +0 -16
- package/dist/icons/CloudSlashIcon.d.ts +0 -3
- package/dist/icons/CloudSlashIcon.js +0 -14
- package/dist/icons/CodeIcon.d.ts +0 -3
- package/dist/icons/CodeIcon.js +0 -14
- package/dist/icons/CommandLineIcon.d.ts +0 -3
- package/dist/icons/CommandLineIcon.js +0 -14
- package/dist/icons/CommitIcon.d.ts +0 -3
- package/dist/icons/CommitIcon.js +0 -14
- package/dist/icons/CredentialIcon.d.ts +0 -3
- package/dist/icons/CredentialIcon.js +0 -16
- package/dist/icons/CreditCardIcon.d.ts +0 -3
- package/dist/icons/CreditCardIcon.js +0 -15
- package/dist/icons/DatabaseIcon.d.ts +0 -3
- package/dist/icons/DatabaseIcon.js +0 -15
- package/dist/icons/DebugIcon.d.ts +0 -3
- package/dist/icons/DebugIcon.js +0 -15
- package/dist/icons/DeploymentIcon.d.ts +0 -3
- package/dist/icons/DeploymentIcon.js +0 -14
- package/dist/icons/DeploymentsIcon.d.ts +0 -3
- package/dist/icons/DeploymentsIcon.js +0 -17
- package/dist/icons/DiscordIcon.d.ts +0 -3
- package/dist/icons/DiscordIcon.js +0 -14
- package/dist/icons/DiscourseIcon.d.ts +0 -3
- package/dist/icons/DiscourseIcon.js +0 -14
- package/dist/icons/DownloadIcon.d.ts +0 -3
- package/dist/icons/DownloadIcon.js +0 -15
- package/dist/icons/EasMetadataIcon.d.ts +0 -3
- package/dist/icons/EasMetadataIcon.js +0 -21
- package/dist/icons/EasSubmitIcon.d.ts +0 -3
- package/dist/icons/EasSubmitIcon.js +0 -21
- package/dist/icons/EditIcon.d.ts +0 -3
- package/dist/icons/EditIcon.js +0 -19
- package/dist/icons/ErrorIcon.d.ts +0 -3
- package/dist/icons/ErrorIcon.js +0 -14
- package/dist/icons/FacebookIcon.d.ts +0 -3
- package/dist/icons/FacebookIcon.js +0 -14
- package/dist/icons/GeneralIcon.d.ts +0 -3
- package/dist/icons/GeneralIcon.js +0 -25
- package/dist/icons/GithubIcon.d.ts +0 -3
- package/dist/icons/GithubIcon.js +0 -14
- package/dist/icons/GoogleAppStoreIcon.d.ts +0 -3
- package/dist/icons/GoogleAppStoreIcon.js +0 -14
- package/dist/icons/HamburgerIcon.d.ts +0 -3
- package/dist/icons/HamburgerIcon.js +0 -14
- package/dist/icons/HeadsetIcon.d.ts +0 -3
- package/dist/icons/HeadsetIcon.js +0 -18
- package/dist/icons/HomeFilledIcon.d.ts +0 -3
- package/dist/icons/HomeFilledIcon.js +0 -14
- package/dist/icons/HomeIcon.d.ts +0 -3
- package/dist/icons/HomeIcon.js +0 -14
- package/dist/icons/InfoIcon.d.ts +0 -3
- package/dist/icons/InfoIcon.js +0 -14
- package/dist/icons/InspectElementIcon.d.ts +0 -3
- package/dist/icons/InspectElementIcon.js +0 -15
- package/dist/icons/InstagramIcon.d.ts +0 -3
- package/dist/icons/InstagramIcon.js +0 -14
- package/dist/icons/InvoicesIcon.d.ts +0 -3
- package/dist/icons/InvoicesIcon.js +0 -15
- package/dist/icons/LifebuoyIcon.d.ts +0 -3
- package/dist/icons/LifebuoyIcon.js +0 -14
- package/dist/icons/LockIcon.d.ts +0 -3
- package/dist/icons/LockIcon.js +0 -14
- package/dist/icons/LogoutMobileIcon.d.ts +0 -3
- package/dist/icons/LogoutMobileIcon.js +0 -15
- package/dist/icons/LogsIcon.d.ts +0 -3
- package/dist/icons/LogsIcon.js +0 -16
- package/dist/icons/MailIcon.d.ts +0 -3
- package/dist/icons/MailIcon.js +0 -14
- package/dist/icons/MegaphoneIcon.d.ts +0 -3
- package/dist/icons/MegaphoneIcon.js +0 -15
- package/dist/icons/MessageIcon.d.ts +0 -3
- package/dist/icons/MessageIcon.js +0 -14
- package/dist/icons/MoreHorizontalIcon.d.ts +0 -3
- package/dist/icons/MoreHorizontalIcon.js +0 -16
- package/dist/icons/MoreVerticalIcon.d.ts +0 -3
- package/dist/icons/MoreVerticalIcon.js +0 -16
- package/dist/icons/OneTimePasswordIcon.d.ts +0 -3
- package/dist/icons/OneTimePasswordIcon.js +0 -16
- package/dist/icons/OpenInternalIcon.d.ts +0 -3
- package/dist/icons/OpenInternalIcon.js +0 -15
- package/dist/icons/OrganizationIcon.d.ts +0 -3
- package/dist/icons/OrganizationIcon.js +0 -15
- package/dist/icons/OverviewIcon.d.ts +0 -3
- package/dist/icons/OverviewIcon.js +0 -14
- package/dist/icons/PerformanceIcon.d.ts +0 -3
- package/dist/icons/PerformanceIcon.js +0 -15
- package/dist/icons/PersonalTrainerIcon.d.ts +0 -3
- package/dist/icons/PersonalTrainerIcon.js +0 -14
- package/dist/icons/PinIcon.d.ts +0 -3
- package/dist/icons/PinIcon.js +0 -14
- package/dist/icons/PlanEnterpriseIcon.d.ts +0 -3
- package/dist/icons/PlanEnterpriseIcon.js +0 -14
- package/dist/icons/PlanFreeIcon.d.ts +0 -3
- package/dist/icons/PlanFreeIcon.js +0 -14
- package/dist/icons/PlanProductionIcon.d.ts +0 -3
- package/dist/icons/PlanProductionIcon.js +0 -15
- package/dist/icons/PlansIcon.d.ts +0 -3
- package/dist/icons/PlansIcon.js +0 -15
- package/dist/icons/PlusIcon.d.ts +0 -3
- package/dist/icons/PlusIcon.js +0 -14
- package/dist/icons/PrivacyIcon.d.ts +0 -3
- package/dist/icons/PrivacyIcon.js +0 -14
- package/dist/icons/ProjectTransferIcon.d.ts +0 -3
- package/dist/icons/ProjectTransferIcon.js +0 -15
- package/dist/icons/PushToDeviceIcon.d.ts +0 -3
- package/dist/icons/PushToDeviceIcon.js +0 -17
- package/dist/icons/QrCodeIcon.d.ts +0 -3
- package/dist/icons/QrCodeIcon.js +0 -18
- package/dist/icons/QuestionIcon.d.ts +0 -3
- package/dist/icons/QuestionIcon.js +0 -14
- package/dist/icons/QuestionMarkIcon.d.ts +0 -3
- package/dist/icons/QuestionMarkIcon.js +0 -14
- package/dist/icons/ReceiptIcon.d.ts +0 -3
- package/dist/icons/ReceiptIcon.js +0 -15
- package/dist/icons/RedditIcon.d.ts +0 -3
- package/dist/icons/RedditIcon.js +0 -14
- package/dist/icons/RefreshIcon.d.ts +0 -3
- package/dist/icons/RefreshIcon.js +0 -17
- package/dist/icons/RolloutIcon.d.ts +0 -3
- package/dist/icons/RolloutIcon.js +0 -15
- package/dist/icons/RunIcon.d.ts +0 -3
- package/dist/icons/RunIcon.js +0 -15
- package/dist/icons/RuntimeVersionIcon.d.ts +0 -3
- package/dist/icons/RuntimeVersionIcon.js +0 -14
- package/dist/icons/ScanIcon.d.ts +0 -3
- package/dist/icons/ScanIcon.js +0 -15
- package/dist/icons/SearchIcon.d.ts +0 -3
- package/dist/icons/SearchIcon.js +0 -15
- package/dist/icons/SecretsIcon.d.ts +0 -3
- package/dist/icons/SecretsIcon.js +0 -14
- package/dist/icons/SettingsFilledIcon.d.ts +0 -3
- package/dist/icons/SettingsFilledIcon.js +0 -14
- package/dist/icons/SettingsIcon.d.ts +0 -3
- package/dist/icons/SettingsIcon.js +0 -14
- package/dist/icons/SlashShortcutIcon.d.ts +0 -3
- package/dist/icons/SlashShortcutIcon.js +0 -14
- package/dist/icons/SparklesIcon.d.ts +0 -3
- package/dist/icons/SparklesIcon.js +0 -14
- package/dist/icons/StatusCanceledIcon.d.ts +0 -3
- package/dist/icons/StatusCanceledIcon.js +0 -14
- package/dist/icons/StatusFailedIcon.d.ts +0 -3
- package/dist/icons/StatusFailedIcon.js +0 -14
- package/dist/icons/StatusNewIcon.d.ts +0 -3
- package/dist/icons/StatusNewIcon.js +0 -15
- package/dist/icons/StatusSuccessIcon.d.ts +0 -3
- package/dist/icons/StatusSuccessIcon.js +0 -14
- package/dist/icons/StatusWaitingIcon.d.ts +0 -3
- package/dist/icons/StatusWaitingIcon.js +0 -14
- package/dist/icons/StoreIcon.d.ts +0 -3
- package/dist/icons/StoreIcon.js +0 -21
- package/dist/icons/ThemeAutoIcon.d.ts +0 -3
- package/dist/icons/ThemeAutoIcon.js +0 -15
- package/dist/icons/ThemeDarkIcon.d.ts +0 -3
- package/dist/icons/ThemeDarkIcon.js +0 -14
- package/dist/icons/ThemeIcon.d.ts +0 -3
- package/dist/icons/ThemeIcon.js +0 -14
- package/dist/icons/ThemeLightIcon.d.ts +0 -3
- package/dist/icons/ThemeLightIcon.js +0 -15
- package/dist/icons/ThumbsDownIcon.d.ts +0 -3
- package/dist/icons/ThumbsDownIcon.js +0 -14
- package/dist/icons/ThumbsUpIcon.d.ts +0 -3
- package/dist/icons/ThumbsUpIcon.js +0 -14
- package/dist/icons/TokensIcon.d.ts +0 -3
- package/dist/icons/TokensIcon.js +0 -16
- package/dist/icons/TrashIcon.d.ts +0 -3
- package/dist/icons/TrashIcon.js +0 -14
- package/dist/icons/TriangleDownIcon.d.ts +0 -3
- package/dist/icons/TriangleDownIcon.js +0 -14
- package/dist/icons/TriangleLeftIcon.d.ts +0 -3
- package/dist/icons/TriangleLeftIcon.js +0 -14
- package/dist/icons/TriangleRightIcon.d.ts +0 -3
- package/dist/icons/TriangleRightIcon.js +0 -14
- package/dist/icons/TriangleUpIcon.d.ts +0 -3
- package/dist/icons/TriangleUpIcon.js +0 -14
- package/dist/icons/TwitchIcon.d.ts +0 -3
- package/dist/icons/TwitchIcon.js +0 -15
- package/dist/icons/TwitterIcon.d.ts +0 -3
- package/dist/icons/TwitterIcon.js +0 -14
- package/dist/icons/UndoIcon.d.ts +0 -3
- package/dist/icons/UndoIcon.js +0 -14
- package/dist/icons/UpdateIcon.d.ts +0 -3
- package/dist/icons/UpdateIcon.js +0 -15
- package/dist/icons/UpgradeIcon.d.ts +0 -3
- package/dist/icons/UpgradeIcon.js +0 -14
- package/dist/icons/UploadIcon.d.ts +0 -3
- package/dist/icons/UploadIcon.js +0 -15
- package/dist/icons/UserFilledIcon.d.ts +0 -3
- package/dist/icons/UserFilledIcon.js +0 -14
- package/dist/icons/UserIcon.d.ts +0 -3
- package/dist/icons/UserIcon.js +0 -14
- package/dist/icons/UsersFilledIcon.d.ts +0 -3
- package/dist/icons/UsersFilledIcon.js +0 -15
- package/dist/icons/UsersIcon.d.ts +0 -3
- package/dist/icons/UsersIcon.js +0 -15
- package/dist/icons/VersionIcon.d.ts +0 -3
- package/dist/icons/VersionIcon.js +0 -15
- package/dist/icons/WarningIcon.d.ts +0 -3
- package/dist/icons/WarningIcon.js +0 -14
- package/dist/icons/WrapLinesIcon.d.ts +0 -3
- package/dist/icons/WrapLinesIcon.js +0 -15
- package/dist/icons/XIcon.d.ts +0 -3
- package/dist/icons/XIcon.js +0 -14
- package/dist/icons/YoutubeIcon.d.ts +0 -3
- package/dist/icons/YoutubeIcon.js +0 -14
- package/dist/icons/index.d.ts +0 -130
- package/dist/icons/index.js +0 -265
- package/dist/logos/DocsLogo.d.ts +0 -3
- package/dist/logos/DocsLogo.js +0 -15
- package/dist/logos/ExpoGoLogo.d.ts +0 -3
- package/dist/logos/ExpoGoLogo.js +0 -14
- package/dist/logos/Logo.d.ts +0 -3
- package/dist/logos/Logo.js +0 -14
- package/dist/logos/SnackLogo.d.ts +0 -3
- package/dist/logos/SnackLogo.js +0 -15
- package/dist/logos/WordMarkLogo.d.ts +0 -3
- package/dist/logos/WordMarkLogo.js +0 -14
- package/dist/logos/index.js +0 -13
- package/dist/styles/breakpoints.d.ts +0 -5
- package/dist/styles/breakpoints.js +0 -8
- package/dist/styles/palette.d.ts +0 -200
- package/dist/styles/palette.js +0 -50
- package/dist/styles/shadows.js +0 -11
- package/dist/styles/sizing.d.ts +0 -19
- package/dist/styles/sizing.js +0 -22
- package/dist/styles/spacing.d.ts +0 -36
- package/dist/styles/spacing.js +0 -40
- package/dist/styles/themes.d.ts +0 -463
- package/dist/styles/themes.js +0 -467
- package/dist/styles/typography.js +0 -348
- package/dist/types/index.js +0 -2
- /package/dist/{logos → src/logos}/index.d.ts +0 -0
- /package/dist/{styles → src/styles}/shadows.d.ts +0 -0
- /package/dist/{styles → src/styles}/typography.d.ts +0 -0
package/tailwind.js
CHANGED
|
@@ -1,135 +1,360 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
const plugin = require('tailwindcss/plugin');
|
|
2
|
+
|
|
3
|
+
const palette = {
|
|
4
|
+
'palette-white': 'var(--expo-color-white)',
|
|
5
|
+
'palette-black': 'var(--expo-color-black)',
|
|
6
|
+
'palette-green1': 'var(--green1)',
|
|
7
|
+
'palette-green2': 'var(--green2)',
|
|
8
|
+
'palette-green3': 'var(--green3)',
|
|
9
|
+
'palette-green4': 'var(--green4)',
|
|
10
|
+
'palette-green5': 'var(--green5)',
|
|
11
|
+
'palette-green6': 'var(--green6)',
|
|
12
|
+
'palette-green7': 'var(--green7)',
|
|
13
|
+
'palette-green8': 'var(--green8)',
|
|
14
|
+
'palette-green9': 'var(--green9)',
|
|
15
|
+
'palette-green10': 'var(--green10)',
|
|
16
|
+
'palette-green11': 'var(--green11)',
|
|
17
|
+
'palette-green12': 'var(--green12)',
|
|
18
|
+
'palette-purple1': 'var(--purple1)',
|
|
19
|
+
'palette-purple2': 'var(--purple2)',
|
|
20
|
+
'palette-purple3': 'var(--purple3)',
|
|
21
|
+
'palette-purple4': 'var(--purple4)',
|
|
22
|
+
'palette-purple5': 'var(--purple5)',
|
|
23
|
+
'palette-purple6': 'var(--purple6)',
|
|
24
|
+
'palette-purple7': 'var(--purple7)',
|
|
25
|
+
'palette-purple8': 'var(--purple8)',
|
|
26
|
+
'palette-purple9': 'var(--purple9)',
|
|
27
|
+
'palette-purple10': 'var(--purple10)',
|
|
28
|
+
'palette-purple11': 'var(--purple11)',
|
|
29
|
+
'palette-purple12': 'var(--purple12)',
|
|
30
|
+
'palette-pink1': 'var(--pink1)',
|
|
31
|
+
'palette-pink2': 'var(--pink2)',
|
|
32
|
+
'palette-pink3': 'var(--pink3)',
|
|
33
|
+
'palette-pink4': 'var(--pink4)',
|
|
34
|
+
'palette-pink5': 'var(--pink5)',
|
|
35
|
+
'palette-pink6': 'var(--pink6)',
|
|
36
|
+
'palette-pink7': 'var(--pink7)',
|
|
37
|
+
'palette-pink8': 'var(--pink8)',
|
|
38
|
+
'palette-pink9': 'var(--pink9)',
|
|
39
|
+
'palette-pink10': 'var(--pink10)',
|
|
40
|
+
'palette-pink11': 'var(--pink11)',
|
|
41
|
+
'palette-pink12': 'var(--pink12)',
|
|
42
|
+
'palette-orange1': 'var(--orange1)',
|
|
43
|
+
'palette-orange2': 'var(--orange2)',
|
|
44
|
+
'palette-orange3': 'var(--orange3)',
|
|
45
|
+
'palette-orange4': 'var(--orange4)',
|
|
46
|
+
'palette-orange5': 'var(--orange5)',
|
|
47
|
+
'palette-orange6': 'var(--orange6)',
|
|
48
|
+
'palette-orange7': 'var(--orange7)',
|
|
49
|
+
'palette-orange8': 'var(--orange8)',
|
|
50
|
+
'palette-orange9': 'var(--orange9)',
|
|
51
|
+
'palette-orange10': 'var(--orange10)',
|
|
52
|
+
'palette-orange11': 'var(--orange11)',
|
|
53
|
+
'palette-orange12': 'var(--orange12)',
|
|
54
|
+
'palette-yellow1': 'var(--yellow1)',
|
|
55
|
+
'palette-yellow2': 'var(--yellow2)',
|
|
56
|
+
'palette-yellow3': 'var(--yellow3)',
|
|
57
|
+
'palette-yellow4': 'var(--yellow4)',
|
|
58
|
+
'palette-yellow5': 'var(--yellow5)',
|
|
59
|
+
'palette-yellow6': 'var(--yellow6)',
|
|
60
|
+
'palette-yellow7': 'var(--yellow7)',
|
|
61
|
+
'palette-yellow8': 'var(--yellow8)',
|
|
62
|
+
'palette-yellow9': 'var(--yellow9)',
|
|
63
|
+
'palette-yellow10': 'var(--yellow10)',
|
|
64
|
+
'palette-yellow11': 'var(--yellow11)',
|
|
65
|
+
'palette-yellow12': 'var(--yellow12)',
|
|
66
|
+
'palette-blue1': 'var(--blue1)',
|
|
67
|
+
'palette-blue2': 'var(--blue2)',
|
|
68
|
+
'palette-blue3': 'var(--blue3)',
|
|
69
|
+
'palette-blue4': 'var(--blue4)',
|
|
70
|
+
'palette-blue5': 'var(--blue5)',
|
|
71
|
+
'palette-blue6': 'var(--blue6)',
|
|
72
|
+
'palette-blue7': 'var(--blue7)',
|
|
73
|
+
'palette-blue8': 'var(--blue8)',
|
|
74
|
+
'palette-blue9': 'var(--blue9)',
|
|
75
|
+
'palette-blue10': 'var(--blue10)',
|
|
76
|
+
'palette-blue11': 'var(--blue11)',
|
|
77
|
+
'palette-blue12': 'var(--blue12)',
|
|
78
|
+
'palette-red1': 'var(--red1)',
|
|
79
|
+
'palette-red2': 'var(--red2)',
|
|
80
|
+
'palette-red3': 'var(--red3)',
|
|
81
|
+
'palette-red4': 'var(--red4)',
|
|
82
|
+
'palette-red5': 'var(--red5)',
|
|
83
|
+
'palette-red6': 'var(--red6)',
|
|
84
|
+
'palette-red7': 'var(--red7)',
|
|
85
|
+
'palette-red8': 'var(--red8)',
|
|
86
|
+
'palette-red9': 'var(--red9)',
|
|
87
|
+
'palette-red10': 'var(--red10)',
|
|
88
|
+
'palette-red11': 'var(--red11)',
|
|
89
|
+
'palette-red12': 'var(--red12)',
|
|
90
|
+
'palette-gray1': 'var(--slate1)',
|
|
91
|
+
'palette-gray2': 'var(--slate2)',
|
|
92
|
+
'palette-gray3': 'var(--slate3)',
|
|
93
|
+
'palette-gray4': 'var(--slate4)',
|
|
94
|
+
'palette-gray5': 'var(--slate5)',
|
|
95
|
+
'palette-gray6': 'var(--slate6)',
|
|
96
|
+
'palette-gray7': 'var(--slate7)',
|
|
97
|
+
'palette-gray8': 'var(--slate8)',
|
|
98
|
+
'palette-gray9': 'var(--slate9)',
|
|
99
|
+
'palette-gray10': 'var(--slate10)',
|
|
100
|
+
'palette-gray11': 'var(--slate11)',
|
|
101
|
+
'palette-gray12': 'var(--slate12)',
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const expoTailwindConfig = {
|
|
10
105
|
theme: {
|
|
11
106
|
borderRadius: {
|
|
12
|
-
|
|
13
|
-
|
|
107
|
+
none: 0,
|
|
108
|
+
xs: 2,
|
|
109
|
+
sm: 4,
|
|
110
|
+
md: 6,
|
|
111
|
+
lg: 10,
|
|
112
|
+
xl: 16,
|
|
113
|
+
'2xl': 20,
|
|
114
|
+
'3xl': 24,
|
|
115
|
+
full: 9999,
|
|
116
|
+
},
|
|
117
|
+
backgroundColor: {
|
|
118
|
+
default: 'var(--expo-theme-background-default)',
|
|
119
|
+
screen: 'var(--expo-theme-background-screen)',
|
|
120
|
+
subtle: 'var(--expo-theme-background-subtle)',
|
|
121
|
+
element: 'var(--expo-theme-background-element)',
|
|
122
|
+
hover: 'var(--expo-theme-background-hover)',
|
|
123
|
+
selected: 'var(--expo-theme-background-selected)',
|
|
124
|
+
overlay: 'var(--expo-theme-background-overlay)',
|
|
125
|
+
success: 'var(--expo-theme-background-success)',
|
|
126
|
+
warning: 'var(--expo-theme-background-warning)',
|
|
127
|
+
danger: 'var(--expo-theme-background-danger)',
|
|
128
|
+
info: 'var(--expo-theme-background-info)',
|
|
129
|
+
|
|
130
|
+
'button-primary': 'var(--expo-theme-button-primary-background)',
|
|
131
|
+
'button-primary-hover': 'var(--expo-theme-button-primary-hover)',
|
|
132
|
+
'button-primary-disabled': 'var(--expo-theme-button-primary-disabled-background)',
|
|
133
|
+
'button-primary-destructive': 'var(--expo-theme-button-primary-destructive-background)',
|
|
134
|
+
'button-primary-destructive-hover': 'var(--expo-theme-button-primary-destructive-hover)',
|
|
135
|
+
'button-primary-destructive-disabled': 'var(--expo-theme-button-primary-destructive-disabled-background)',
|
|
136
|
+
|
|
137
|
+
'button-secondary': 'var(--expo-theme-button-secondary-background)',
|
|
138
|
+
'button-secondary-hover': 'var(--expo-theme-button-secondary-hover)',
|
|
139
|
+
'button-secondary-disabled': 'var(--expo-theme-button-secondary-disabled-background)',
|
|
140
|
+
'button-secondary-destructive': 'var(--expo-theme-button-secondary-destructive-background)',
|
|
141
|
+
'button-secondary-destructive-hover': 'var(--expo-theme-button-secondary-destructive-hover)',
|
|
142
|
+
'button-secondary-destructive-disabled': 'var(--expo-theme-button-secondary-destructive-disabled-background)',
|
|
143
|
+
|
|
144
|
+
'button-tertiary': 'var(--expo-theme-button-tertiary-background)',
|
|
145
|
+
'button-tertiary-hover': 'var(--expo-theme-button-tertiary-hover)',
|
|
146
|
+
'button-tertiary-disabled': 'var(--expo-theme-button-tertiary-disabled-background)',
|
|
147
|
+
|
|
148
|
+
'button-quaternary': 'var(--expo-theme-button-quaternary-background)',
|
|
149
|
+
'button-quaternary-hover': 'var(--expo-theme-button-quaternary-hover)',
|
|
150
|
+
'button-quaternary-disabled': 'var(--expo-theme-button-quaternary-disabled-background)',
|
|
151
|
+
|
|
152
|
+
...palette,
|
|
153
|
+
},
|
|
154
|
+
backgroundImage: {
|
|
155
|
+
'project-blue': 'var(--expo-theme-project-blue)',
|
|
156
|
+
'project-green': 'var(--expo-theme-project-green)',
|
|
157
|
+
'project-yellow': 'var(--expo-theme-project-yellow)',
|
|
158
|
+
'project-orange': 'var(--expo-theme-project-orange)',
|
|
159
|
+
'project-red': 'var(--expo-theme-project-red)',
|
|
160
|
+
'project-pink': 'var(--expo-theme-project-pink)',
|
|
161
|
+
'project-purple': 'var(--expo-theme-project-purple)',
|
|
162
|
+
},
|
|
163
|
+
borderColor: {
|
|
164
|
+
default: 'var(--expo-theme-border-default)',
|
|
165
|
+
secondary: 'var(--expo-theme-border-secondary)',
|
|
166
|
+
success: 'var(--expo-theme-border-success)',
|
|
167
|
+
warning: 'var(--expo-theme-border-warning)',
|
|
168
|
+
danger: 'var(--expo-theme-border-danger)',
|
|
169
|
+
info: 'var(--expo-theme-border-info)',
|
|
170
|
+
transparent: 'transparent',
|
|
171
|
+
|
|
172
|
+
'button-primary': 'var(--expo-theme-button-primary-border)',
|
|
173
|
+
'button-primary-disabled': 'var(--expo-theme-button-primary-disabled-border)',
|
|
174
|
+
'button-primary-destructive': 'var(--expo-theme-button-primary-destructive-border)',
|
|
175
|
+
'button-primary-destructive-disabled': 'var(--expo-theme-button-primary-destructive-disabled-border)',
|
|
176
|
+
|
|
177
|
+
'button-secondary': 'var(--expo-theme-button-secondary-border)',
|
|
178
|
+
'button-secondary-disabled': 'var(--expo-theme-button-secondary-disabled-border)',
|
|
179
|
+
'button-secondary-destructive': 'var(--expo-theme-button-secondary-destructive-border)',
|
|
180
|
+
'button-secondary-destructive-disabled': 'var(--expo-theme-button-secondary-destructive-disabled-border)',
|
|
181
|
+
|
|
182
|
+
'button-tertiary': 'var(--expo-theme-button-tertiary-border)',
|
|
183
|
+
'button-tertiary-disabled': 'var(--expo-theme-button-tertiary-disabled-border)',
|
|
184
|
+
|
|
185
|
+
'button-quaternary': 'var(--expo-theme-button-quaternary-border)',
|
|
186
|
+
'button-quaternary-disabled': 'var(--expo-theme-button-quaternary-disabled-border)',
|
|
187
|
+
|
|
188
|
+
...palette,
|
|
14
189
|
},
|
|
15
|
-
backgroundColor: theme.background,
|
|
16
|
-
borderColor: theme.border,
|
|
17
190
|
colors: {
|
|
18
|
-
transparent:
|
|
19
|
-
current:
|
|
20
|
-
|
|
21
|
-
|
|
191
|
+
transparent: 'transparent',
|
|
192
|
+
current: 'currentColor',
|
|
193
|
+
default: 'var(--expo-theme-text-default)',
|
|
194
|
+
secondary: 'var(--expo-theme-text-secondary)',
|
|
195
|
+
tertiary: 'var(--expo-theme-text-tertiary)',
|
|
196
|
+
quaternary: 'var(--expo-theme-text-quaternary)',
|
|
197
|
+
link: 'var(--expo-theme-text-link)',
|
|
198
|
+
success: 'var(--expo-theme-text-success)',
|
|
199
|
+
warning: 'var(--expo-theme-text-warning)',
|
|
200
|
+
danger: 'var(--expo-theme-text-danger)',
|
|
201
|
+
info: 'var(--expo-theme-text-info)',
|
|
202
|
+
|
|
203
|
+
'icon-default': 'var(--expo-theme-icon-default)',
|
|
204
|
+
'icon-secondary': 'var(--expo-theme-icon-secondary)',
|
|
205
|
+
'icon-tertiary': 'var(--expo-theme-icon-tertiary)',
|
|
206
|
+
'icon-quaternary': 'var(--expo-theme-icon-quaternary)',
|
|
207
|
+
'icon-success': 'var(--expo-theme-icon-success)',
|
|
208
|
+
'icon-warning': 'var(--expo-theme-icon-warning)',
|
|
209
|
+
'icon-danger': 'var(--expo-theme-icon-danger)',
|
|
210
|
+
'icon-info': 'var(--expo-theme-icon-info)',
|
|
211
|
+
|
|
212
|
+
'button-primary': 'var(--expo-theme-button-primary-text)',
|
|
213
|
+
'button-primary-icon': 'var(--expo-theme-button-primary-icon)',
|
|
214
|
+
'button-primary-disabled': 'var(--expo-theme-button-primary-disabled-text)',
|
|
215
|
+
'button-primary-destructive': 'var(--expo-theme-button-primary-destructive-text)',
|
|
216
|
+
'button-primary-destructive-icon': 'var(--expo-theme-button-primary-destructive-icon)',
|
|
217
|
+
'button-primary-destructive-disabled': 'var(--expo-theme-button-primary-destructive-disabled-text)',
|
|
218
|
+
|
|
219
|
+
'button-secondary': 'var(--expo-theme-button-secondary-text)',
|
|
220
|
+
'button-secondary-icon': 'var(--expo-theme-button-secondary-icon)',
|
|
221
|
+
'button-secondary-disabled': 'var(--expo-theme-button-secondary-disabled-text)',
|
|
222
|
+
'button-secondary-destructive': 'var(--expo-theme-button-secondary-destructive-text)',
|
|
223
|
+
'button-secondary-destructive-icon': 'var(--expo-theme-button-secondary-destructive-icon)',
|
|
224
|
+
'button-secondary-destructive-disabled': 'var(--expo-theme-button-secondary-destructive-disabled-text)',
|
|
225
|
+
|
|
226
|
+
'button-tertiary': 'var(--expo-theme-button-tertiary-text)',
|
|
227
|
+
'button-tertiary-icon': 'var(--expo-theme-button-tertiary-icon)',
|
|
228
|
+
'button-tertiary-disabled': 'var(--expo-theme-button-tertiary-disabled-text)',
|
|
229
|
+
|
|
230
|
+
'button-quaternary': 'var(--expo-theme-button-quaternary-text)',
|
|
231
|
+
'button-quaternary-icon': 'var(--expo-theme-button-quaternary-icon)',
|
|
232
|
+
'button-quaternary-disabled': 'var(--expo-theme-button-quaternary-disabled-text)',
|
|
233
|
+
|
|
234
|
+
...palette,
|
|
22
235
|
},
|
|
23
|
-
boxShadow:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
236
|
+
boxShadow: {
|
|
237
|
+
none: 'var(--expo-theme-shadows-none)',
|
|
238
|
+
xs: 'var(--expo-theme-shadows-xs)',
|
|
239
|
+
sm: 'var(--expo-theme-shadows-sm)',
|
|
240
|
+
md: 'var(--expo-theme-shadows-md)',
|
|
241
|
+
lg: 'var(--expo-theme-shadows-lg)',
|
|
242
|
+
xl: 'var(--expo-theme-shadows-xl)',
|
|
28
243
|
},
|
|
29
|
-
// Based on Major Third (1.250) type scale.
|
|
30
|
-
// Sizes calculated at: https://type-scale.com
|
|
31
244
|
fontSize: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
lineHeight: 1.2,
|
|
36
|
-
letterSpacing: "-0.022rem",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
"heading-4xl": [
|
|
40
|
-
"calc(var(--expo-theme-heading-base-font-size) * 3.052)",
|
|
41
|
-
{
|
|
42
|
-
lineHeight: 1.2,
|
|
43
|
-
letterSpacing: "-0.022rem",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
"heading-3xl": [
|
|
47
|
-
"calc(var(--expo-theme-heading-base-font-size) * 2.441)",
|
|
48
|
-
{
|
|
49
|
-
lineHeight: 1.3,
|
|
50
|
-
letterSpacing: "-0.022rem",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
"heading-2xl": [
|
|
54
|
-
"calc(var(--expo-theme-heading-base-font-size) * 1.953)",
|
|
55
|
-
{
|
|
56
|
-
lineHeight: 1.4,
|
|
57
|
-
letterSpacing: "-0.021rem",
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
"heading-xl": [
|
|
61
|
-
"calc(var(--expo-theme-heading-base-font-size) * 1.563)",
|
|
245
|
+
lg: [
|
|
246
|
+
'18px',
|
|
62
247
|
{
|
|
63
248
|
lineHeight: 1.5,
|
|
64
|
-
letterSpacing: "-0.017rem",
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
"heading-lg": [
|
|
68
|
-
"calc(var(--expo-theme-heading-base-font-size) * 1.25)",
|
|
69
|
-
{
|
|
70
|
-
lineHeight: 1.5,
|
|
71
|
-
letterSpacing: "-0.017rem",
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
"heading-base": [
|
|
75
|
-
"calc(var(--expo-theme-heading-base-font-size) * 1)",
|
|
76
|
-
{
|
|
77
|
-
lineHeight: 1.625,
|
|
78
|
-
letterSpacing: "-0.011rem",
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
"heading-sm": [
|
|
82
|
-
"calc(var(--expo-theme-heading-base-font-size) * 0.8)",
|
|
83
|
-
{
|
|
84
|
-
lineHeight: 1.615,
|
|
85
|
-
letterSpacing: "-0.003rem",
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
"heading-xs": [
|
|
89
|
-
"calc(var(--expo-theme-heading-base-font-size) * 0.64)",
|
|
90
|
-
{
|
|
91
|
-
lineHeight: 1.58,
|
|
92
249
|
},
|
|
93
250
|
],
|
|
94
251
|
base: [
|
|
95
|
-
|
|
252
|
+
'16px',
|
|
96
253
|
{
|
|
97
254
|
lineHeight: 1.625,
|
|
98
|
-
letterSpacing:
|
|
255
|
+
letterSpacing: '-0.011rem',
|
|
99
256
|
},
|
|
100
257
|
],
|
|
101
258
|
sm: [
|
|
102
|
-
|
|
259
|
+
'15px',
|
|
103
260
|
{
|
|
104
261
|
lineHeight: 1.6,
|
|
105
|
-
letterSpacing:
|
|
262
|
+
letterSpacing: '-0.009rem',
|
|
106
263
|
},
|
|
107
264
|
],
|
|
108
265
|
xs: [
|
|
109
|
-
|
|
266
|
+
'14px',
|
|
110
267
|
{
|
|
111
268
|
lineHeight: 1.57,
|
|
112
|
-
letterSpacing:
|
|
269
|
+
letterSpacing: '-0.006rem',
|
|
113
270
|
},
|
|
114
271
|
],
|
|
115
|
-
|
|
116
|
-
|
|
272
|
+
'2xs': [
|
|
273
|
+
'13px',
|
|
117
274
|
{
|
|
118
275
|
lineHeight: 1.61,
|
|
119
|
-
letterSpacing:
|
|
276
|
+
letterSpacing: '-0.003rem',
|
|
120
277
|
},
|
|
121
278
|
],
|
|
122
|
-
|
|
123
|
-
|
|
279
|
+
'3xs': [
|
|
280
|
+
'12px',
|
|
124
281
|
{
|
|
125
282
|
lineHeight: 1.58,
|
|
126
283
|
},
|
|
127
284
|
],
|
|
128
285
|
},
|
|
286
|
+
heading: {
|
|
287
|
+
'5xl': {
|
|
288
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 3.815)',
|
|
289
|
+
lineHeight: 1.2,
|
|
290
|
+
letterSpacing: '-0.022rem',
|
|
291
|
+
},
|
|
292
|
+
'4xl': {
|
|
293
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 3.052)',
|
|
294
|
+
lineHeight: 1.2,
|
|
295
|
+
letterSpacing: '-0.022rem',
|
|
296
|
+
},
|
|
297
|
+
'3xl': {
|
|
298
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 2.441)',
|
|
299
|
+
lineHeight: 1.3,
|
|
300
|
+
letterSpacing: '-0.022rem',
|
|
301
|
+
},
|
|
302
|
+
'2xl': {
|
|
303
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 1.953)',
|
|
304
|
+
lineHeight: 1.4,
|
|
305
|
+
letterSpacing: '-0.021rem',
|
|
306
|
+
},
|
|
307
|
+
xl: {
|
|
308
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 1.563)',
|
|
309
|
+
lineHeight: 1.5,
|
|
310
|
+
letterSpacing: '-0.017rem',
|
|
311
|
+
},
|
|
312
|
+
lg: {
|
|
313
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 1.25)',
|
|
314
|
+
lineHeight: 1.5,
|
|
315
|
+
letterSpacing: '-0.017rem',
|
|
316
|
+
},
|
|
317
|
+
base: {
|
|
318
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 1)',
|
|
319
|
+
lineHeight: 1.625,
|
|
320
|
+
letterSpacing: '-0.011rem',
|
|
321
|
+
},
|
|
322
|
+
sm: {
|
|
323
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 0.8)',
|
|
324
|
+
lineHeight: 1.615,
|
|
325
|
+
letterSpacing: '-0.003rem',
|
|
326
|
+
},
|
|
327
|
+
xs: {
|
|
328
|
+
fontSize: 'calc(var(--expo-theme-heading-base-font-size) * 0.64)',
|
|
329
|
+
lineHeight: 1.58,
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
screens: {
|
|
333
|
+
small: '400px',
|
|
334
|
+
medium: '900px',
|
|
335
|
+
large: '1200px',
|
|
336
|
+
},
|
|
337
|
+
extend: {
|
|
338
|
+
height: {
|
|
339
|
+
15: '3.75rem',
|
|
340
|
+
},
|
|
341
|
+
opacity: {
|
|
342
|
+
inherit: 'inherit',
|
|
343
|
+
},
|
|
344
|
+
scale: {
|
|
345
|
+
97.5: '.975',
|
|
346
|
+
},
|
|
347
|
+
},
|
|
129
348
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
md: `${breakpoints.medium}px`,
|
|
133
|
-
lg: `${breakpoints.large}px`,
|
|
349
|
+
corePlugins: {
|
|
350
|
+
fontFamily: false,
|
|
134
351
|
},
|
|
352
|
+
plugins: [
|
|
353
|
+
plugin(({ addVariant, matchUtilities, theme }) => {
|
|
354
|
+
addVariant('hocus', ['&:hover', '&:focus']);
|
|
355
|
+
matchUtilities({ heading: (value) => value }, { values: theme('heading') });
|
|
356
|
+
}),
|
|
357
|
+
],
|
|
135
358
|
};
|
|
359
|
+
|
|
360
|
+
module.exports = expoTailwindConfig;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BlockingSetInitialColorMode = exports.getInitialColorMode = exports.isLocalStorageAvailable = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
function isLocalStorageAvailable() {
|
|
9
|
-
try {
|
|
10
|
-
if (!window.localStorage || typeof window.localStorage === 'undefined') {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
window.localStorage.setItem('localStorage:test', 'value');
|
|
14
|
-
if (window.localStorage.getItem('localStorage:test') !== 'value') {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
window.localStorage.removeItem('localStorage:test');
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
exports.isLocalStorageAvailable = isLocalStorageAvailable;
|
|
25
|
-
function getInitialColorMode() {
|
|
26
|
-
if (isLocalStorageAvailable()) {
|
|
27
|
-
const preference = window.localStorage.getItem('data-expo-theme');
|
|
28
|
-
let hasPreference = typeof preference === 'string';
|
|
29
|
-
if (hasPreference) {
|
|
30
|
-
return preference;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
34
|
-
const systemPreference = typeof mql.matches === 'boolean';
|
|
35
|
-
if (systemPreference) {
|
|
36
|
-
return mql.matches ? 'dark' : 'light';
|
|
37
|
-
}
|
|
38
|
-
return 'light';
|
|
39
|
-
}
|
|
40
|
-
exports.getInitialColorMode = getInitialColorMode;
|
|
41
|
-
function setInitialColorMode() {
|
|
42
|
-
const colorMode = getInitialColorMode();
|
|
43
|
-
// add HTML attribute if dark mode
|
|
44
|
-
if (colorMode === 'dark') {
|
|
45
|
-
document.documentElement.classList.add('dark-theme');
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
document.documentElement.classList.remove('dark-theme');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// our function needs to be a string so that we can call it
|
|
52
|
-
const blockingSetInitialColorMode = `(function() {
|
|
53
|
-
${isLocalStorageAvailable.toString()}
|
|
54
|
-
${getInitialColorMode.toString()}
|
|
55
|
-
${setInitialColorMode.toString()}
|
|
56
|
-
setInitialColorMode();
|
|
57
|
-
})()
|
|
58
|
-
`;
|
|
59
|
-
function BlockingSetInitialColorMode() {
|
|
60
|
-
return (react_1.default.createElement("script", { dangerouslySetInnerHTML: {
|
|
61
|
-
__html: blockingSetInitialColorMode,
|
|
62
|
-
} }));
|
|
63
|
-
}
|
|
64
|
-
exports.BlockingSetInitialColorMode = BlockingSetInitialColorMode;
|
|
@@ -1,139 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.useTheme = exports.ThemeProvider = exports.Themes = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
const BlockingSetInitialColorMode_1 = require("./BlockingSetInitialColorMode");
|
|
25
|
-
var Themes;
|
|
26
|
-
(function (Themes) {
|
|
27
|
-
Themes["AUTO"] = "auto";
|
|
28
|
-
Themes["DARK"] = "dark";
|
|
29
|
-
Themes["LIGHT"] = "light";
|
|
30
|
-
})(Themes = exports.Themes || (exports.Themes = {}));
|
|
31
|
-
const ThemeContext = react_1.createContext({
|
|
32
|
-
setDarkMode: () => { },
|
|
33
|
-
setLightMode: () => { },
|
|
34
|
-
setAutoMode: () => { },
|
|
35
|
-
themeName: Themes.AUTO,
|
|
36
|
-
});
|
|
37
|
-
function ThemeProvider(props) {
|
|
38
|
-
const { children, disabled = false } = props;
|
|
39
|
-
const initialTheme = process.browser
|
|
40
|
-
? document.documentElement.dataset.expoTheme
|
|
41
|
-
: Themes.AUTO;
|
|
42
|
-
const [themeName, setThemeName] = react_1.useState(disabled ? Themes.LIGHT : initialTheme);
|
|
43
|
-
react_1.useEffect(function didMount() {
|
|
44
|
-
if (disabled)
|
|
45
|
-
return;
|
|
46
|
-
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
47
|
-
try {
|
|
48
|
-
mediaQuery.addEventListener('change', onThemeChange);
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
// Fallback to old-style listening for changes, for Safari and IE
|
|
52
|
-
mediaQuery.addListener(onThemeChange);
|
|
53
|
-
}
|
|
54
|
-
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
55
|
-
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
56
|
-
if (themePreference === Themes.LIGHT || themePreference === Themes.DARK) {
|
|
57
|
-
setThemeName(themePreference);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
setThemeName(Themes.AUTO);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
setThemeName(Themes.AUTO);
|
|
65
|
-
}
|
|
66
|
-
return function unMount() {
|
|
67
|
-
try {
|
|
68
|
-
mediaQuery.removeEventListener('change', onThemeChange);
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
// Fallback to old-style listening for changes, for Safari and IE
|
|
72
|
-
mediaQuery.removeListener(onThemeChange);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}, []);
|
|
76
|
-
function setDocumentTheme(themeName) {
|
|
77
|
-
if (disabled)
|
|
78
|
-
return;
|
|
79
|
-
if (themeName === Themes.DARK) {
|
|
80
|
-
document.documentElement.classList.add('dark-theme');
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
document.documentElement.classList.remove('dark-theme');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function onThemeChange(event) {
|
|
87
|
-
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
88
|
-
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
89
|
-
if (!themePreference) {
|
|
90
|
-
if (event.matches) {
|
|
91
|
-
setDocumentTheme(Themes.DARK);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
setDocumentTheme(Themes.LIGHT);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
setDocumentTheme(Themes.AUTO);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function setDarkMode() {
|
|
103
|
-
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
104
|
-
window.localStorage.setItem('data-expo-theme', Themes.DARK);
|
|
105
|
-
}
|
|
106
|
-
setDocumentTheme(Themes.DARK);
|
|
107
|
-
setThemeName(Themes.DARK);
|
|
108
|
-
}
|
|
109
|
-
function setLightMode() {
|
|
110
|
-
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
111
|
-
window.localStorage.setItem('data-expo-theme', Themes.LIGHT);
|
|
112
|
-
}
|
|
113
|
-
setDocumentTheme(Themes.LIGHT);
|
|
114
|
-
setThemeName(Themes.LIGHT);
|
|
115
|
-
}
|
|
116
|
-
function setAutoMode() {
|
|
117
|
-
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
118
|
-
window.localStorage.removeItem('data-expo-theme');
|
|
119
|
-
}
|
|
120
|
-
const themeName = BlockingSetInitialColorMode_1.getInitialColorMode();
|
|
121
|
-
setDocumentTheme(themeName);
|
|
122
|
-
setThemeName(Themes.AUTO);
|
|
123
|
-
}
|
|
124
|
-
return (react_1.default.createElement(ThemeContext.Provider, { value: {
|
|
125
|
-
setDarkMode,
|
|
126
|
-
setLightMode,
|
|
127
|
-
setAutoMode,
|
|
128
|
-
themeName,
|
|
129
|
-
} }, children));
|
|
130
|
-
}
|
|
131
|
-
exports.ThemeProvider = ThemeProvider;
|
|
132
|
-
function useTheme() {
|
|
133
|
-
const context = react_1.useContext(ThemeContext);
|
|
134
|
-
if (context === undefined) {
|
|
135
|
-
throw new Error('useTheme must be used within a ThemeProvider');
|
|
136
|
-
}
|
|
137
|
-
return context;
|
|
138
|
-
}
|
|
139
|
-
exports.useTheme = useTheme;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ActivityIcon = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
function ActivityIcon(props) {
|
|
9
|
-
const { title = "Activity-icon", size, color, width, height, titleId, } = props;
|
|
10
|
-
return (react_1.default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", width: size || width || "20px", height: size || height || "20px", role: "img", "aria-labelledby": titleId }, props),
|
|
11
|
-
title ? react_1.default.createElement("title", { id: titleId }, title) : null,
|
|
12
|
-
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.706.163c.342.24.479.683.332 1.077L11.69 7.52l5.638 1.53a.922.922 0 01.363 1.573l-10.286 9.15a.896.896 0 01-1.112.064.922.922 0 01-.332-1.077l2.347-6.28-5.638-1.53a.91.91 0 01-.647-.676.923.923 0 01.284-.896L12.594.228a.896.896 0 011.112-.065zM4.772 9.624l4.97 1.348a.907.907 0 01.572.467c.116.23.131.5.04.742L8.94 15.97l6.289-5.594-4.97-1.348a.907.907 0 01-.572-.467.926.926 0 01-.04-.742L11.06 4.03 4.772 9.624z", fill: color || "var(--expo-theme-icon-default)" })));
|
|
13
|
-
}
|
|
14
|
-
exports.ActivityIcon = ActivityIcon;
|