@expo/styleguide 4.0.2 → 4.0.5
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/dist/{src/components → components}/BlockingSetInitialColorMode.d.ts +1 -0
- package/dist/{src/components → components}/BlockingSetInitialColorMode.js +20 -3
- package/dist/{src/components → components}/ThemeProvider.d.ts +0 -0
- package/dist/{src/components → components}/ThemeProvider.js +5 -6
- package/dist/{src/icons → icons}/ActivityIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ActivityIcon.js +0 -0
- package/dist/{src/icons → icons}/AddPhotoIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AddPhotoIcon.js +0 -0
- package/dist/{src/icons → icons}/AndroidIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AndroidIcon.js +0 -0
- package/dist/{src/icons → icons}/AppleAppStoreIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AppleAppStoreIcon.js +0 -0
- package/dist/{src/icons → icons}/AppleIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AppleIcon.js +0 -0
- package/dist/{src/icons → icons}/AppleSimulatorIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AppleSimulatorIcon.js +0 -0
- package/dist/{src/icons → icons}/ArrowLeftIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ArrowLeftIcon.js +0 -0
- package/dist/{src/icons → icons}/ArrowRightIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ArrowRightIcon.js +0 -0
- package/dist/{src/icons → icons}/AtSignIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/AtSignIcon.js +0 -0
- package/dist/{src/icons → icons}/BadgeIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BadgeIcon.js +0 -0
- package/dist/{src/icons → icons}/BellIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BellIcon.js +0 -0
- package/dist/{src/icons → icons}/BranchIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BranchIcon.js +0 -0
- package/dist/{src/icons → icons}/BuildIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BuildIcon.js +0 -0
- package/dist/{src/icons → icons}/BuildNumberIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BuildNumberIcon.js +0 -0
- package/dist/{src/icons → icons}/BuildProfileIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/BuildProfileIcon.js +0 -0
- package/dist/{src/icons → icons}/ChannelIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ChannelIcon.js +0 -0
- package/dist/{src/icons → icons}/CheckIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/CheckIcon.js +0 -0
- package/dist/{src/icons → icons}/ChevronDownIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ChevronDownIcon.js +0 -0
- package/dist/{src/icons → icons}/CloudSlashIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/CloudSlashIcon.js +0 -0
- package/dist/{src/icons → icons}/CommitIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/CommitIcon.js +0 -0
- package/dist/{src/icons → icons}/CredentialIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/CredentialIcon.js +0 -0
- package/dist/{src/icons → icons}/DebugIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DebugIcon.js +0 -0
- package/dist/{src/icons → icons}/DeploymentIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DeploymentIcon.js +0 -0
- package/dist/{src/icons → icons}/DeploymentsIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DeploymentsIcon.js +0 -0
- package/dist/{src/icons → icons}/DiscordIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DiscordIcon.js +0 -0
- package/dist/{src/icons → icons}/DiscourseIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DiscourseIcon.js +0 -0
- package/dist/{src/icons → icons}/DownloadIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/DownloadIcon.js +0 -0
- package/dist/{src/icons → icons}/ErrorIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ErrorIcon.js +0 -0
- package/dist/{src/icons → icons}/FacebookIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/FacebookIcon.js +0 -0
- package/dist/{src/icons → icons}/GeneralIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/GeneralIcon.js +0 -0
- package/dist/{src/icons → icons}/GithubIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/GithubIcon.js +0 -0
- package/dist/{src/icons → icons}/GoogleAppStoreIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/GoogleAppStoreIcon.js +0 -0
- package/dist/{src/icons → icons}/HomeFilledIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/HomeFilledIcon.js +0 -0
- package/dist/{src/icons → icons}/HomeIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/HomeIcon.js +0 -0
- package/dist/{src/icons → icons}/InfoIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/InfoIcon.js +0 -0
- package/dist/{src/icons → icons}/InspectElementIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/InspectElementIcon.js +0 -0
- package/dist/{src/icons → icons}/InstagramIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/InstagramIcon.js +0 -0
- package/dist/{src/icons → icons}/InvoicesIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/InvoicesIcon.js +2 -2
- package/dist/{src/icons → icons}/LifebuoyIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/LifebuoyIcon.js +0 -0
- package/dist/{src/icons → icons}/LockIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/LockIcon.js +0 -0
- package/dist/{src/icons → icons}/LogoutMobileIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/LogoutMobileIcon.js +0 -0
- package/dist/{src/icons → icons}/LogsIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/LogsIcon.js +0 -0
- package/dist/{src/icons → icons}/MailIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/MailIcon.js +0 -0
- package/dist/{src/icons → icons}/MegaphoneIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/MegaphoneIcon.js +0 -0
- package/dist/{src/icons → icons}/MessageIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/MessageIcon.js +0 -0
- package/dist/{src/icons → icons}/OneTimePasswordIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/OneTimePasswordIcon.js +0 -0
- package/dist/{src/icons → icons}/OpenInternalIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/OpenInternalIcon.js +0 -0
- package/dist/{src/icons → icons}/OverviewIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/OverviewIcon.js +0 -0
- package/dist/{src/icons → icons}/PerformanceIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PerformanceIcon.js +0 -0
- package/dist/{src/icons → icons}/PinIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PinIcon.js +0 -0
- package/dist/{src/icons → icons}/PlanEnterpriseIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PlanEnterpriseIcon.js +0 -0
- package/dist/{src/icons → icons}/PlanFreeIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PlanFreeIcon.js +0 -0
- package/dist/{src/icons → icons}/PlanProductionIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PlanProductionIcon.js +0 -0
- package/dist/{src/icons → icons}/PlansIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PlansIcon.js +0 -0
- package/dist/{src/icons → icons}/ProjectTransferIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ProjectTransferIcon.js +0 -0
- package/dist/{src/icons → icons}/PushToDeviceIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/PushToDeviceIcon.js +0 -0
- package/dist/{src/icons → icons}/QrCodeIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/QrCodeIcon.js +0 -0
- package/dist/{src/icons → icons}/QuestionIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/QuestionIcon.js +0 -0
- package/dist/{src/icons → icons}/QuestionMarkIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/QuestionMarkIcon.js +0 -0
- package/dist/{src/icons → icons}/RefreshIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/RefreshIcon.js +0 -0
- package/dist/{src/icons → icons}/RolloutIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/RolloutIcon.js +0 -0
- package/dist/{src/icons → icons}/RunIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/RunIcon.js +0 -0
- package/dist/{src/icons → icons}/RuntimeVersionIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/RuntimeVersionIcon.js +0 -0
- package/dist/{src/icons → icons}/ScanIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ScanIcon.js +0 -0
- package/dist/{src/icons → icons}/SearchIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/SearchIcon.js +0 -0
- package/dist/{src/icons → icons}/SecretsIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/SecretsIcon.js +0 -0
- package/dist/{src/icons → icons}/SettingsFilledIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/SettingsFilledIcon.js +0 -0
- package/dist/{src/icons → icons}/SettingsIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/SettingsIcon.js +0 -0
- package/dist/{src/icons → icons}/SparklesIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/SparklesIcon.js +0 -0
- package/dist/{src/icons → icons}/StoreIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/StoreIcon.js +0 -0
- package/dist/{src/icons → icons}/ThemeAutoIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ThemeAutoIcon.js +0 -0
- package/dist/{src/icons → icons}/ThemeDarkIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ThemeDarkIcon.js +0 -0
- package/dist/{src/icons → icons}/ThemeLightIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/ThemeLightIcon.js +0 -0
- package/dist/{src/icons → icons}/TokensIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TokensIcon.js +0 -0
- package/dist/{src/icons → icons}/TrashIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TrashIcon.js +0 -0
- package/dist/{src/icons → icons}/TriangleDownIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TriangleDownIcon.js +0 -0
- package/dist/{src/icons → icons}/TriangleRightIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TriangleRightIcon.js +0 -0
- package/dist/{src/icons → icons}/TwitchIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TwitchIcon.js +0 -0
- package/dist/{src/icons → icons}/TwitterIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/TwitterIcon.js +0 -0
- package/dist/{src/icons → icons}/UndoIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UndoIcon.js +0 -0
- package/dist/{src/icons → icons}/UpdateIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UpdateIcon.js +0 -0
- package/dist/{src/icons → icons}/UploadIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UploadIcon.js +0 -0
- package/dist/{src/icons → icons}/UserFilledIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UserFilledIcon.js +0 -0
- package/dist/{src/icons → icons}/UserIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UserIcon.js +0 -0
- package/dist/{src/icons → icons}/UsersFilledIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UsersFilledIcon.js +0 -0
- package/dist/{src/icons → icons}/UsersIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/UsersIcon.js +0 -0
- package/dist/{src/icons → icons}/VersionIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/VersionIcon.js +0 -0
- package/dist/{src/icons → icons}/WarningIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/WarningIcon.js +0 -0
- package/dist/{src/icons → icons}/XIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/XIcon.js +0 -0
- package/dist/{src/icons → icons}/YoutubeIcon.d.ts +1 -1
- package/dist/{src/icons → icons}/YoutubeIcon.js +0 -0
- package/dist/{src/icons → icons}/index.d.ts +0 -0
- package/dist/{src/icons → icons}/index.js +0 -0
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/{src/styles → styles}/breakpoints.d.ts +0 -0
- package/dist/{src/styles → styles}/breakpoints.js +0 -0
- package/dist/{src/styles → styles}/legacy-colors.d.ts +0 -0
- package/dist/{src/styles → styles}/legacy-colors.js +0 -0
- package/dist/{src/styles → styles}/palette.d.ts +0 -0
- package/dist/{src/styles → styles}/palette.js +0 -0
- package/dist/{src/styles → styles}/shadows.d.ts +0 -0
- package/dist/{src/styles → styles}/shadows.js +0 -0
- package/dist/{src/styles → styles}/sizing.d.ts +0 -0
- package/dist/{src/styles → styles}/sizing.js +0 -0
- package/dist/{src/styles → styles}/spacing.d.ts +0 -0
- package/dist/{src/styles → styles}/spacing.js +0 -0
- package/dist/{src/styles → styles}/themes.d.ts +0 -0
- package/dist/{src/styles → styles}/themes.js +0 -0
- package/dist/{src/styles → styles}/typography.d.ts +0 -0
- package/dist/{src/styles → styles}/typography.js +0 -0
- package/package.json +7 -5
- package/dist/src/utils/helpers.d.ts +0 -1
- package/dist/src/utils/helpers.js +0 -21
|
@@ -3,11 +3,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BlockingSetInitialColorMode = exports.getInitialColorMode = void 0;
|
|
6
|
+
exports.BlockingSetInitialColorMode = exports.getInitialColorMode = exports.isLocalStorageAvailable = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
|
|
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;
|
|
9
25
|
function getInitialColorMode() {
|
|
10
|
-
if (
|
|
26
|
+
if (isLocalStorageAvailable()) {
|
|
11
27
|
const preference = window.localStorage.getItem('data-expo-theme');
|
|
12
28
|
let hasPreference = typeof preference === 'string';
|
|
13
29
|
if (hasPreference) {
|
|
@@ -34,6 +50,7 @@ function setInitialColorMode() {
|
|
|
34
50
|
}
|
|
35
51
|
// our function needs to be a string so that we can call it
|
|
36
52
|
const blockingSetInitialColorMode = `(function() {
|
|
53
|
+
${isLocalStorageAvailable.toString()}
|
|
37
54
|
${getInitialColorMode.toString()}
|
|
38
55
|
${setInitialColorMode.toString()}
|
|
39
56
|
setInitialColorMode();
|
|
File without changes
|
|
@@ -22,7 +22,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
exports.useTheme = exports.ThemeProvider = exports.Themes = void 0;
|
|
23
23
|
const react_1 = __importStar(require("react"));
|
|
24
24
|
const BlockingSetInitialColorMode_1 = require("./BlockingSetInitialColorMode");
|
|
25
|
-
const helpers_1 = require("../utils/helpers");
|
|
26
25
|
var Themes;
|
|
27
26
|
(function (Themes) {
|
|
28
27
|
Themes["AUTO"] = "auto";
|
|
@@ -52,7 +51,7 @@ function ThemeProvider(props) {
|
|
|
52
51
|
// Fallback to old-style listening for changes, for Safari and IE
|
|
53
52
|
mediaQuery.addListener(onThemeChange);
|
|
54
53
|
}
|
|
55
|
-
if (
|
|
54
|
+
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
56
55
|
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
57
56
|
if (themePreference === Themes.LIGHT || themePreference === Themes.DARK) {
|
|
58
57
|
setThemeName(themePreference);
|
|
@@ -85,7 +84,7 @@ function ThemeProvider(props) {
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
function onThemeChange(event) {
|
|
88
|
-
if (
|
|
87
|
+
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
89
88
|
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
90
89
|
if (!themePreference) {
|
|
91
90
|
if (event.matches) {
|
|
@@ -101,21 +100,21 @@ function ThemeProvider(props) {
|
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
function setDarkMode() {
|
|
104
|
-
if (
|
|
103
|
+
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
105
104
|
window.localStorage.setItem('data-expo-theme', Themes.DARK);
|
|
106
105
|
}
|
|
107
106
|
setDocumentTheme(Themes.DARK);
|
|
108
107
|
setThemeName(Themes.DARK);
|
|
109
108
|
}
|
|
110
109
|
function setLightMode() {
|
|
111
|
-
if (
|
|
110
|
+
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
112
111
|
window.localStorage.setItem('data-expo-theme', Themes.LIGHT);
|
|
113
112
|
}
|
|
114
113
|
setDocumentTheme(Themes.LIGHT);
|
|
115
114
|
setThemeName(Themes.LIGHT);
|
|
116
115
|
}
|
|
117
116
|
function setAutoMode() {
|
|
118
|
-
if (
|
|
117
|
+
if (BlockingSetInitialColorMode_1.isLocalStorageAvailable()) {
|
|
119
118
|
window.localStorage.removeItem('data-expo-theme');
|
|
120
119
|
}
|
|
121
120
|
const themeName = BlockingSetInitialColorMode_1.getInitialColorMode();
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ function InvoicesIcon(props) {
|
|
|
8
8
|
const { title = "Invoices-icon", size, color, width, height, titleId, } = props;
|
|
9
9
|
return (react_1.default.createElement("svg", Object.assign({ width: size || width || "20px", height: size || height || "20px", viewBox: "0 0 20 20", fill: "none", role: "img", "aria-labelledby": titleId }, props),
|
|
10
10
|
title ? react_1.default.createElement("title", { id: titleId }, title) : null,
|
|
11
|
-
react_1.default.createElement("path", { d: "
|
|
12
|
-
react_1.default.createElement("path", { d: "
|
|
11
|
+
react_1.default.createElement("path", { d: "M1.657 19.125H.875V.875h18.25v18.25h-.68l-1.589-1.302-.526-.43-.547.402-1.515 1.115-1.48-1.11-.526-.394-.524.394-1.476 1.106L8.788 17.8l-.525-.394-.525.394-1.475 1.106L4.788 17.8l-.485-.364-.511.326-2.135 1.363z", stroke: color || "var(--expo-theme-icon-default)", strokeWidth: 1.75 }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M15 5.75h.75v-1.5H15v1.5zm-11 0h11v-1.5H4v1.5zm11 3h.75v-1.5H15v1.5zm-11 0h11v-1.5H4v1.5zm7 3h.75v-1.5H11v1.5zm-7 0h7v-1.5H4v1.5z", fill: color || "var(--expo-theme-icon-default)" })));
|
|
13
13
|
}
|
|
14
14
|
exports.default = InvoicesIcon;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|