@expo/styleguide 3.5.1 → 4.0.2
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/expo-theme.css +63 -55
- package/dist/src/components/BlockingSetInitialColorMode.js +7 -4
- package/dist/src/components/ThemeProvider.js +29 -15
- package/dist/src/icons/BuildIcon.js +1 -1
- package/dist/src/icons/InvoicesIcon.js +2 -2
- package/dist/src/styles/themes.d.ts +0 -3
- package/dist/src/styles/themes.js +0 -3
- package/dist/src/styles/typography.d.ts +99 -47
- package/dist/src/styles/typography.js +92 -45
- package/dist/src/utils/helpers.d.ts +1 -0
- package/dist/src/utils/helpers.js +21 -0
- package/package.json +2 -2
package/dist/expo-theme.css
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* Light palette */
|
|
3
3
|
--expo-color-base-light-gray-000: #fdfdfe;
|
|
4
|
-
--expo-color-base-light-gray-100: #
|
|
4
|
+
--expo-color-base-light-gray-100: #f8f9fa;
|
|
5
5
|
--expo-color-base-light-gray-200: #f0f1f2;
|
|
6
6
|
--expo-color-base-light-gray-300: #e1e4e8;
|
|
7
7
|
--expo-color-base-light-gray-400: #d1d5da;
|
|
8
|
-
--expo-color-base-light-gray-500: #
|
|
8
|
+
--expo-color-base-light-gray-500: #9b9ea3;
|
|
9
9
|
--expo-color-base-light-gray-600: #6c737c;
|
|
10
|
-
--expo-color-base-light-gray-700: #
|
|
11
|
-
--expo-color-base-light-gray-800: #
|
|
12
|
-
--expo-color-base-light-gray-900: #
|
|
10
|
+
--expo-color-base-light-gray-700: #595f68;
|
|
11
|
+
--expo-color-base-light-gray-800: #464c55;
|
|
12
|
+
--expo-color-base-light-gray-900: #30353c;
|
|
13
13
|
--expo-color-base-light-gray-1000: #25292e;
|
|
14
14
|
--expo-color-base-light-primary-000: #f9f7ff;
|
|
15
15
|
--expo-color-base-light-primary-100: #ede9ff;
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
--expo-color-base-light-black: #1b1f23;
|
|
96
96
|
|
|
97
97
|
/* Dark palette */
|
|
98
|
-
--expo-color-base-dark-gray-000: #
|
|
99
|
-
--expo-color-base-dark-gray-100: #
|
|
100
|
-
--expo-color-base-dark-gray-200: #
|
|
101
|
-
--expo-color-base-dark-gray-300: #
|
|
102
|
-
--expo-color-base-dark-gray-400: #
|
|
103
|
-
--expo-color-base-dark-gray-500: #
|
|
104
|
-
--expo-color-base-dark-gray-600: #
|
|
105
|
-
--expo-color-base-dark-gray-700: #
|
|
106
|
-
--expo-color-base-dark-gray-800: #
|
|
107
|
-
--expo-color-base-dark-gray-900: #
|
|
108
|
-
--expo-color-base-dark-gray-1000: #
|
|
98
|
+
--expo-color-base-dark-gray-000: #0b0f13;
|
|
99
|
+
--expo-color-base-dark-gray-100: #14191f;
|
|
100
|
+
--expo-color-base-dark-gray-200: #1c2026;
|
|
101
|
+
--expo-color-base-dark-gray-300: #262a31;
|
|
102
|
+
--expo-color-base-dark-gray-400: #32373e;
|
|
103
|
+
--expo-color-base-dark-gray-500: #49505a;
|
|
104
|
+
--expo-color-base-dark-gray-600: #737b87;
|
|
105
|
+
--expo-color-base-dark-gray-700: #9ba4b0;
|
|
106
|
+
--expo-color-base-dark-gray-800: #bcc3cd;
|
|
107
|
+
--expo-color-base-dark-gray-900: #e0e4eb;
|
|
108
|
+
--expo-color-base-dark-gray-1000: #f0f2f5;
|
|
109
109
|
--expo-color-base-dark-primary-000: #1b183d;
|
|
110
110
|
--expo-color-base-dark-primary-100: #201d52;
|
|
111
111
|
--expo-color-base-dark-primary-200: #2a2375;
|
|
@@ -191,15 +191,15 @@
|
|
|
191
191
|
|
|
192
192
|
/* Light theme */
|
|
193
193
|
--expo-theme-palette-gray-000: #fdfdfe;
|
|
194
|
-
--expo-theme-palette-gray-100: #
|
|
194
|
+
--expo-theme-palette-gray-100: #f8f9fa;
|
|
195
195
|
--expo-theme-palette-gray-200: #f0f1f2;
|
|
196
196
|
--expo-theme-palette-gray-300: #e1e4e8;
|
|
197
197
|
--expo-theme-palette-gray-400: #d1d5da;
|
|
198
|
-
--expo-theme-palette-gray-500: #
|
|
198
|
+
--expo-theme-palette-gray-500: #9b9ea3;
|
|
199
199
|
--expo-theme-palette-gray-600: #6c737c;
|
|
200
|
-
--expo-theme-palette-gray-700: #
|
|
201
|
-
--expo-theme-palette-gray-800: #
|
|
202
|
-
--expo-theme-palette-gray-900: #
|
|
200
|
+
--expo-theme-palette-gray-700: #595f68;
|
|
201
|
+
--expo-theme-palette-gray-800: #464c55;
|
|
202
|
+
--expo-theme-palette-gray-900: #30353c;
|
|
203
203
|
--expo-theme-palette-gray-1000: #25292e;
|
|
204
204
|
--expo-theme-palette-primary-000: #f9f7ff;
|
|
205
205
|
--expo-theme-palette-primary-100: #ede9ff;
|
|
@@ -284,7 +284,6 @@
|
|
|
284
284
|
--expo-theme-palette-white: #ffffff;
|
|
285
285
|
--expo-theme-palette-black: #1b1f23;
|
|
286
286
|
--expo-theme-background-default: var(--expo-color-base-light-white);
|
|
287
|
-
--expo-theme-background-canvas: var(--expo-color-base-light-gray-000);
|
|
288
287
|
--expo-theme-background-screen: var(--expo-color-base-light-gray-100);
|
|
289
288
|
--expo-theme-background-secondary: var(--expo-color-base-light-gray-100);
|
|
290
289
|
--expo-theme-background-tertiary: var(--expo-color-base-light-gray-200);
|
|
@@ -304,12 +303,18 @@
|
|
|
304
303
|
--expo-theme-button-secondary-background: var(
|
|
305
304
|
--expo-color-base-light-gray-200
|
|
306
305
|
);
|
|
307
|
-
--expo-theme-button-secondary-foreground: var(
|
|
308
|
-
|
|
309
|
-
|
|
306
|
+
--expo-theme-button-secondary-foreground: var(
|
|
307
|
+
--expo-color-base-light-gray-1000
|
|
308
|
+
);
|
|
309
|
+
--expo-theme-button-tertiary-background: var(
|
|
310
|
+
--expo-color-base-light-gray-1000
|
|
311
|
+
);
|
|
312
|
+
--expo-theme-button-tertiary-foreground: var(
|
|
313
|
+
--expo-color-base-light-gray-000
|
|
314
|
+
);
|
|
310
315
|
--expo-theme-button-transparent-background: transparent;
|
|
311
316
|
--expo-theme-button-transparent-foreground: var(
|
|
312
|
-
--expo-color-base-light-
|
|
317
|
+
--expo-color-base-light-gray-1000
|
|
313
318
|
);
|
|
314
319
|
--expo-theme-button-ghost-background: transparent;
|
|
315
320
|
--expo-theme-button-ghost-foreground: var(--expo-color-base-light-gray-800);
|
|
@@ -322,7 +327,7 @@
|
|
|
322
327
|
--expo-theme-status-warning: var(--expo-color-base-light-yellow-500);
|
|
323
328
|
--expo-theme-status-success: var(--expo-color-base-light-green-500);
|
|
324
329
|
--expo-theme-status-info: var(--expo-color-base-light-blue-500);
|
|
325
|
-
--expo-theme-text-default: var(--expo-color-base-light-
|
|
330
|
+
--expo-theme-text-default: var(--expo-color-base-light-gray-1000);
|
|
326
331
|
--expo-theme-text-secondary: var(--expo-color-base-light-gray-700);
|
|
327
332
|
--expo-theme-text-error: var(--expo-color-base-light-red-600);
|
|
328
333
|
--expo-theme-text-warning: var(--expo-color-base-light-yellow-900);
|
|
@@ -363,17 +368,17 @@
|
|
|
363
368
|
|
|
364
369
|
[data-expo-theme='dark'] {
|
|
365
370
|
/* Dark theme */
|
|
366
|
-
--expo-theme-palette-gray-000: #
|
|
367
|
-
--expo-theme-palette-gray-100: #
|
|
368
|
-
--expo-theme-palette-gray-200: #
|
|
369
|
-
--expo-theme-palette-gray-300: #
|
|
370
|
-
--expo-theme-palette-gray-400: #
|
|
371
|
-
--expo-theme-palette-gray-500: #
|
|
372
|
-
--expo-theme-palette-gray-600: #
|
|
373
|
-
--expo-theme-palette-gray-700: #
|
|
374
|
-
--expo-theme-palette-gray-800: #
|
|
375
|
-
--expo-theme-palette-gray-900: #
|
|
376
|
-
--expo-theme-palette-gray-1000: #
|
|
371
|
+
--expo-theme-palette-gray-000: #0b0f13;
|
|
372
|
+
--expo-theme-palette-gray-100: #14191f;
|
|
373
|
+
--expo-theme-palette-gray-200: #1c2026;
|
|
374
|
+
--expo-theme-palette-gray-300: #262a31;
|
|
375
|
+
--expo-theme-palette-gray-400: #32373e;
|
|
376
|
+
--expo-theme-palette-gray-500: #49505a;
|
|
377
|
+
--expo-theme-palette-gray-600: #737b87;
|
|
378
|
+
--expo-theme-palette-gray-700: #9ba4b0;
|
|
379
|
+
--expo-theme-palette-gray-800: #bcc3cd;
|
|
380
|
+
--expo-theme-palette-gray-900: #e0e4eb;
|
|
381
|
+
--expo-theme-palette-gray-1000: #f0f2f5;
|
|
377
382
|
--expo-theme-palette-primary-000: #1b183d;
|
|
378
383
|
--expo-theme-palette-primary-100: #201d52;
|
|
379
384
|
--expo-theme-palette-primary-200: #2a2375;
|
|
@@ -455,9 +460,8 @@
|
|
|
455
460
|
--expo-theme-palette-purple-800: #e2c5ff;
|
|
456
461
|
--expo-theme-palette-purple-900: #e9d6ff;
|
|
457
462
|
--expo-theme-palette-white: #ffffff;
|
|
458
|
-
--expo-theme-palette-black:
|
|
463
|
+
--expo-theme-palette-black: var(--expo-color-base-dark-gray-000);
|
|
459
464
|
--expo-theme-background-default: var(--expo-color-base-dark-gray-100);
|
|
460
|
-
--expo-theme-background-canvas: var(--expo-color-base-dark-gray-100);
|
|
461
465
|
--expo-theme-background-screen: var(--expo-color-base-dark-gray-000);
|
|
462
466
|
--expo-theme-background-secondary: var(--expo-color-base-dark-gray-200);
|
|
463
467
|
--expo-theme-background-tertiary: var(--expo-color-base-dark-gray-300);
|
|
@@ -465,7 +469,7 @@
|
|
|
465
469
|
--expo-theme-background-error: var(--expo-color-base-dark-red-000);
|
|
466
470
|
--expo-theme-background-warning: var(--expo-color-base-dark-yellow-000);
|
|
467
471
|
--expo-theme-background-success: var(--expo-color-base-dark-green-000);
|
|
468
|
-
--expo-theme-background-overlay: var(--expo-color-base-dark-gray-
|
|
472
|
+
--expo-theme-background-overlay: var(--expo-color-base-dark-gray-200);
|
|
469
473
|
--expo-theme-border-default: var(--expo-color-base-dark-gray-400);
|
|
470
474
|
--expo-theme-border-error: var(--expo-color-base-dark-red-200);
|
|
471
475
|
--expo-theme-border-warning: var(--expo-color-base-dark-yellow-300);
|
|
@@ -477,9 +481,13 @@
|
|
|
477
481
|
--expo-theme-button-secondary-background: var(
|
|
478
482
|
--expo-color-base-dark-gray-300
|
|
479
483
|
);
|
|
480
|
-
--expo-theme-button-secondary-foreground: var(
|
|
481
|
-
|
|
482
|
-
|
|
484
|
+
--expo-theme-button-secondary-foreground: var(
|
|
485
|
+
--expo-color-base-dark-gray-800
|
|
486
|
+
);
|
|
487
|
+
--expo-theme-button-tertiary-foreground: var(
|
|
488
|
+
--expo-color-base-dark-gray-1000
|
|
489
|
+
);
|
|
490
|
+
--expo-theme-button-tertiary-background: var(--expo-color-base-dark-gray-500);
|
|
483
491
|
--expo-theme-button-transparent-background: transparent;
|
|
484
492
|
--expo-theme-button-transparent-foreground: var(
|
|
485
493
|
--expo-color-base-dark-gray-800
|
|
@@ -487,7 +495,7 @@
|
|
|
487
495
|
--expo-theme-button-ghost-background: transparent;
|
|
488
496
|
--expo-theme-button-ghost-foreground: var(--expo-color-base-dark-gray-800);
|
|
489
497
|
--expo-theme-button-ghost-border: var(--expo-color-base-dark-gray-400);
|
|
490
|
-
--expo-theme-icon-default: var(--expo-color-base-dark-gray-
|
|
498
|
+
--expo-theme-icon-default: var(--expo-color-base-dark-gray-700);
|
|
491
499
|
--expo-theme-icon-secondary: var(--expo-color-base-dark-gray-600);
|
|
492
500
|
--expo-theme-link-default: var(--expo-color-base-dark-primary-700);
|
|
493
501
|
--expo-theme-status-default: var(--expo-color-base-dark-gray-400);
|
|
@@ -496,7 +504,7 @@
|
|
|
496
504
|
--expo-theme-status-success: var(--expo-color-base-dark-green-500);
|
|
497
505
|
--expo-theme-status-info: var(--expo-color-base-dark-blue-500);
|
|
498
506
|
--expo-theme-text-default: var(--expo-color-base-dark-gray-800);
|
|
499
|
-
--expo-theme-text-secondary: var(--expo-color-base-dark-gray-
|
|
507
|
+
--expo-theme-text-secondary: var(--expo-color-base-dark-gray-700);
|
|
500
508
|
--expo-theme-text-error: var(--expo-color-base-dark-red-600);
|
|
501
509
|
--expo-theme-text-warning: var(--expo-color-base-dark-yellow-900);
|
|
502
510
|
--expo-theme-text-success: var(--expo-color-base-dark-green-700);
|
|
@@ -520,13 +528,13 @@
|
|
|
520
528
|
--expo-theme-project-purple: linear-gradient(#715c99, #4e3973);
|
|
521
529
|
|
|
522
530
|
/* Dark shadows */
|
|
523
|
-
--expo-theme-shadows-micro: 0 1px 3px rgba(0, 0, 0, 0.
|
|
524
|
-
0 1px 2px rgba(0, 0, 0, 0.
|
|
525
|
-
--expo-theme-shadows-tiny: 0 3px 6px rgba(0, 0, 0, 0.
|
|
526
|
-
0 2px 4px rgba(0, 0, 0, 0.
|
|
527
|
-
--expo-theme-shadows-small: 0 10px 20px rgba(0, 0, 0, 0.
|
|
528
|
-
0 3px 6px rgba(0, 0, 0, 0.
|
|
529
|
-
--expo-theme-shadows-medium: 0 15px 25px rgba(0, 0, 0, 0.
|
|
530
|
-
0 5px 10px rgba(0, 0, 0, 0.
|
|
531
|
-
--expo-theme-shadows-large: 0 20px 40px rgba(0, 0, 0,
|
|
531
|
+
--expo-theme-shadows-micro: 0 1px 3px rgba(0, 0, 0, 0.3),
|
|
532
|
+
0 1px 2px rgba(0, 0, 0, 0.3);
|
|
533
|
+
--expo-theme-shadows-tiny: 0 3px 6px rgba(0, 0, 0, 0.4),
|
|
534
|
+
0 2px 4px rgba(0, 0, 0, 0.25);
|
|
535
|
+
--expo-theme-shadows-small: 0 10px 20px rgba(0, 0, 0, 0.25),
|
|
536
|
+
0 3px 6px rgba(0, 0, 0, 0.25);
|
|
537
|
+
--expo-theme-shadows-medium: 0 15px 25px rgba(0, 0, 0, 0.5),
|
|
538
|
+
0 5px 10px rgba(0, 0, 0, 0.25);
|
|
539
|
+
--expo-theme-shadows-large: 0 20px 40px rgba(0, 0, 0, 0.5);
|
|
532
540
|
}
|
|
@@ -5,11 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BlockingSetInitialColorMode = exports.getInitialColorMode = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const helpers_1 = require("../utils/helpers");
|
|
8
9
|
function getInitialColorMode() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
11
|
+
const preference = window.localStorage.getItem('data-expo-theme');
|
|
12
|
+
let hasPreference = typeof preference === 'string';
|
|
13
|
+
if (hasPreference) {
|
|
14
|
+
return preference;
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
const mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
15
18
|
const systemPreference = typeof mql.matches === 'boolean';
|
|
@@ -22,6 +22,7 @@ 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");
|
|
25
26
|
var Themes;
|
|
26
27
|
(function (Themes) {
|
|
27
28
|
Themes["AUTO"] = "auto";
|
|
@@ -48,12 +49,17 @@ function ThemeProvider(props) {
|
|
|
48
49
|
mediaQuery.addEventListener('change', onThemeChange);
|
|
49
50
|
}
|
|
50
51
|
catch {
|
|
51
|
-
// Fallback to old-style
|
|
52
|
+
// Fallback to old-style listening for changes, for Safari and IE
|
|
52
53
|
mediaQuery.addListener(onThemeChange);
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
56
|
+
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
57
|
+
if (themePreference === Themes.LIGHT || themePreference === Themes.DARK) {
|
|
58
|
+
setThemeName(themePreference);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
setThemeName(Themes.AUTO);
|
|
62
|
+
}
|
|
57
63
|
}
|
|
58
64
|
else {
|
|
59
65
|
setThemeName(Themes.AUTO);
|
|
@@ -63,7 +69,7 @@ function ThemeProvider(props) {
|
|
|
63
69
|
mediaQuery.removeEventListener('change', onThemeChange);
|
|
64
70
|
}
|
|
65
71
|
catch {
|
|
66
|
-
// Fallback to old-style
|
|
72
|
+
// Fallback to old-style listening for changes, for Safari and IE
|
|
67
73
|
mediaQuery.removeListener(onThemeChange);
|
|
68
74
|
}
|
|
69
75
|
};
|
|
@@ -79,31 +85,39 @@ function ThemeProvider(props) {
|
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
87
|
function onThemeChange(event) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
89
|
+
const themePreference = window.localStorage.getItem('data-expo-theme');
|
|
90
|
+
if (!themePreference) {
|
|
91
|
+
if (event.matches) {
|
|
92
|
+
setDocumentTheme(Themes.DARK);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
setDocumentTheme(Themes.LIGHT);
|
|
96
|
+
}
|
|
89
97
|
}
|
|
90
98
|
}
|
|
99
|
+
else {
|
|
100
|
+
setDocumentTheme(Themes.AUTO);
|
|
101
|
+
}
|
|
91
102
|
}
|
|
92
103
|
function setDarkMode() {
|
|
93
|
-
|
|
104
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
94
105
|
window.localStorage.setItem('data-expo-theme', Themes.DARK);
|
|
106
|
+
}
|
|
95
107
|
setDocumentTheme(Themes.DARK);
|
|
96
108
|
setThemeName(Themes.DARK);
|
|
97
109
|
}
|
|
98
110
|
function setLightMode() {
|
|
99
|
-
|
|
111
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
100
112
|
window.localStorage.setItem('data-expo-theme', Themes.LIGHT);
|
|
113
|
+
}
|
|
101
114
|
setDocumentTheme(Themes.LIGHT);
|
|
102
115
|
setThemeName(Themes.LIGHT);
|
|
103
116
|
}
|
|
104
117
|
function setAutoMode() {
|
|
105
|
-
|
|
118
|
+
if (helpers_1.isLocalStorageAvailable()) {
|
|
106
119
|
window.localStorage.removeItem('data-expo-theme');
|
|
120
|
+
}
|
|
107
121
|
const themeName = BlockingSetInitialColorMode_1.getInitialColorMode();
|
|
108
122
|
setDocumentTheme(themeName);
|
|
109
123
|
setThemeName(Themes.AUTO);
|
|
@@ -8,6 +8,6 @@ function BuildIcon(props) {
|
|
|
8
8
|
const { title = "Build-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: "M10
|
|
11
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 .023l8.962 4.485v10.984L10 19.977l-8.96-4.485V4.508L10 .023zM2.89 6.576v7.773l6.186 3.096V9.67L2.89 6.576zm8.036 3.093v7.776l6.186-3.096V6.576L10.925 9.67zm5.044-4.59L10 8.064 4.031 5.079l5.97-2.987 5.968 2.987z", fill: color || "var(--expo-theme-icon-default)" })));
|
|
12
12
|
}
|
|
13
13
|
exports.default = BuildIcon;
|
|
@@ -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: "M.875 18.673V3C.875 1.826 1.826.875 3 .875h14c1.174 0 2.125.951 2.125 2.125v15.673l-2.28-.977-.373-.16-.363.181-2.637 1.319-3.127-1.34-.345-.148-.345.148-3.127 1.34-2.637-1.319-.363-.181-.373.16-2.28.977z", stroke: color || "var(--expo-theme-icon-default)", strokeWidth: 1.75 }),
|
|
12
|
+
react_1.default.createElement("path", { d: "M5.265 5.732h9.47M5.265 8.43h9.47m-9.47 2.933h6.123", stroke: color || "var(--expo-theme-icon-default)", strokeWidth: 1.5, strokeLinecap: "round" })));
|
|
13
13
|
}
|
|
14
14
|
exports.default = InvoicesIcon;
|
|
@@ -2,7 +2,6 @@ export declare const theme: {
|
|
|
2
2
|
background: {
|
|
3
3
|
default: string;
|
|
4
4
|
screen: string;
|
|
5
|
-
canvas: string;
|
|
6
5
|
secondary: string;
|
|
7
6
|
tertiary: string;
|
|
8
7
|
quaternary: string;
|
|
@@ -202,7 +201,6 @@ export declare const theme: {
|
|
|
202
201
|
export declare const lightTheme: {
|
|
203
202
|
background: {
|
|
204
203
|
default: string;
|
|
205
|
-
canvas: string;
|
|
206
204
|
secondary: string;
|
|
207
205
|
tertiary: string;
|
|
208
206
|
quaternary: string;
|
|
@@ -280,7 +278,6 @@ export declare const lightTheme: {
|
|
|
280
278
|
export declare const darkTheme: {
|
|
281
279
|
background: {
|
|
282
280
|
default: string;
|
|
283
|
-
canvas: string;
|
|
284
281
|
secondary: string;
|
|
285
282
|
tertiary: string;
|
|
286
283
|
quaternary: string;
|
|
@@ -5,7 +5,6 @@ exports.theme = {
|
|
|
5
5
|
background: {
|
|
6
6
|
default: 'var(--expo-theme-background-default)',
|
|
7
7
|
screen: 'var(--expo-theme-background-screen)',
|
|
8
|
-
canvas: 'var(--expo-theme-background-canvas)',
|
|
9
8
|
secondary: 'var(--expo-theme-background-secondary)',
|
|
10
9
|
tertiary: 'var(--expo-theme-background-tertiary)',
|
|
11
10
|
quaternary: 'var(--expo-theme-background-quaternary)',
|
|
@@ -203,7 +202,6 @@ exports.theme = {
|
|
|
203
202
|
exports.lightTheme = {
|
|
204
203
|
background: {
|
|
205
204
|
default: 'var(--expo-color-base-light-white)',
|
|
206
|
-
canvas: 'var(--expo-color-base-light-gray-000)',
|
|
207
205
|
secondary: 'var(--expo-color-base-light-gray-100)',
|
|
208
206
|
tertiary: 'var(--expo-color-base-light-gray-200)',
|
|
209
207
|
quaternary: 'var(--expo-color-base-light-gray-300)',
|
|
@@ -281,7 +279,6 @@ exports.lightTheme = {
|
|
|
281
279
|
exports.darkTheme = {
|
|
282
280
|
background: {
|
|
283
281
|
default: 'var(--expo-color-base-dark-gray-000)',
|
|
284
|
-
canvas: 'var(--expo-color-base-dark-gray-100)',
|
|
285
282
|
secondary: 'var(--expo-color-base-dark-gray-200)',
|
|
286
283
|
tertiary: 'var(--expo-color-base-dark-gray-300)',
|
|
287
284
|
quaternary: 'var(--expo-color-base-dark-gray-400)',
|
|
@@ -1,54 +1,106 @@
|
|
|
1
1
|
export declare const typography: {
|
|
2
2
|
baseFontSize: number;
|
|
3
3
|
headers: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
4
|
+
xl: {
|
|
5
|
+
huge: {
|
|
6
|
+
fontSize: string;
|
|
7
|
+
lineHeight: string;
|
|
8
|
+
letterSpacing: string;
|
|
9
|
+
fontFamily: string;
|
|
10
|
+
fontWeight: number;
|
|
11
|
+
};
|
|
12
|
+
h1: {
|
|
13
|
+
fontSize: string;
|
|
14
|
+
lineHeight: string;
|
|
15
|
+
letterSpacing: string;
|
|
16
|
+
fontFamily: string;
|
|
17
|
+
fontWeight: number;
|
|
18
|
+
};
|
|
19
|
+
h2: {
|
|
20
|
+
fontSize: string;
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
letterSpacing: string;
|
|
23
|
+
fontFamily: string;
|
|
24
|
+
fontWeight: number;
|
|
25
|
+
};
|
|
26
|
+
h3: {
|
|
27
|
+
fontSize: string;
|
|
28
|
+
lineHeight: string;
|
|
29
|
+
letterSpacing: string;
|
|
30
|
+
fontFamily: string;
|
|
31
|
+
fontWeight: number;
|
|
32
|
+
};
|
|
33
|
+
h4: {
|
|
34
|
+
fontSize: string;
|
|
35
|
+
lineHeight: string;
|
|
36
|
+
letterSpacing: string;
|
|
37
|
+
fontFamily: string;
|
|
38
|
+
fontWeight: number;
|
|
39
|
+
};
|
|
40
|
+
h5: {
|
|
41
|
+
fontSize: string;
|
|
42
|
+
lineHeight: string;
|
|
43
|
+
letterSpacing: string;
|
|
44
|
+
fontFamily: string;
|
|
45
|
+
fontWeight: number;
|
|
46
|
+
};
|
|
47
|
+
h6: {
|
|
48
|
+
fontSize: string;
|
|
49
|
+
lineHeight: string;
|
|
50
|
+
letterSpacing: string;
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontWeight: number;
|
|
53
|
+
};
|
|
45
54
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
default: {
|
|
56
|
+
huge: {
|
|
57
|
+
fontSize: string;
|
|
58
|
+
lineHeight: string;
|
|
59
|
+
letterSpacing: string;
|
|
60
|
+
fontFamily: string;
|
|
61
|
+
fontWeight: number;
|
|
62
|
+
};
|
|
63
|
+
h1: {
|
|
64
|
+
fontSize: string;
|
|
65
|
+
lineHeight: string;
|
|
66
|
+
letterSpacing: string;
|
|
67
|
+
fontFamily: string;
|
|
68
|
+
fontWeight: number;
|
|
69
|
+
};
|
|
70
|
+
h2: {
|
|
71
|
+
fontSize: string;
|
|
72
|
+
lineHeight: string;
|
|
73
|
+
letterSpacing: string;
|
|
74
|
+
fontFamily: string;
|
|
75
|
+
fontWeight: number;
|
|
76
|
+
};
|
|
77
|
+
h3: {
|
|
78
|
+
fontSize: string;
|
|
79
|
+
lineHeight: string;
|
|
80
|
+
letterSpacing: string;
|
|
81
|
+
fontFamily: string;
|
|
82
|
+
fontWeight: number;
|
|
83
|
+
};
|
|
84
|
+
h4: {
|
|
85
|
+
fontSize: string;
|
|
86
|
+
lineHeight: string;
|
|
87
|
+
letterSpacing: string;
|
|
88
|
+
fontFamily: string;
|
|
89
|
+
fontWeight: number;
|
|
90
|
+
};
|
|
91
|
+
h5: {
|
|
92
|
+
fontSize: string;
|
|
93
|
+
lineHeight: string;
|
|
94
|
+
letterSpacing: string;
|
|
95
|
+
fontFamily: string;
|
|
96
|
+
fontWeight: number;
|
|
97
|
+
};
|
|
98
|
+
h6: {
|
|
99
|
+
fontSize: string;
|
|
100
|
+
lineHeight: string;
|
|
101
|
+
fontFamily: string;
|
|
102
|
+
fontWeight: number;
|
|
103
|
+
};
|
|
52
104
|
};
|
|
53
105
|
};
|
|
54
106
|
body: {
|
|
@@ -140,52 +140,99 @@ const fontSizes = {
|
|
|
140
140
|
12: { fontSize: rem(12), lineHeight: round(19 / 12) },
|
|
141
141
|
};
|
|
142
142
|
const headers = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
143
|
+
xl: {
|
|
144
|
+
huge: {
|
|
145
|
+
fontFamily: fontStacks.black,
|
|
146
|
+
fontWeight: 900,
|
|
147
|
+
...fontSizes[61],
|
|
148
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[53],
|
|
149
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[46],
|
|
150
|
+
},
|
|
151
|
+
h1: {
|
|
152
|
+
fontFamily: fontStacks.semiBold,
|
|
153
|
+
fontWeight: 500,
|
|
154
|
+
...fontSizes[49],
|
|
155
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[43],
|
|
156
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[37],
|
|
157
|
+
},
|
|
158
|
+
h2: {
|
|
159
|
+
fontFamily: fontStacks.semiBold,
|
|
160
|
+
fontWeight: 500,
|
|
161
|
+
...fontSizes[39],
|
|
162
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[34],
|
|
163
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[29],
|
|
164
|
+
},
|
|
165
|
+
h3: {
|
|
166
|
+
fontFamily: fontStacks.semiBold,
|
|
167
|
+
fontWeight: 500,
|
|
168
|
+
...fontSizes[31],
|
|
169
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[27],
|
|
170
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[23],
|
|
171
|
+
},
|
|
172
|
+
h4: {
|
|
173
|
+
fontFamily: fontStacks.medium,
|
|
174
|
+
fontWeight: 500,
|
|
175
|
+
...fontSizes[25],
|
|
176
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[22],
|
|
177
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[19],
|
|
178
|
+
},
|
|
179
|
+
h5: {
|
|
180
|
+
fontFamily: fontStacks.medium,
|
|
181
|
+
fontWeight: 500,
|
|
182
|
+
...fontSizes[20],
|
|
183
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[18],
|
|
184
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[16],
|
|
185
|
+
},
|
|
186
|
+
h6: {
|
|
187
|
+
fontFamily: fontStacks.medium,
|
|
188
|
+
fontWeight: 500,
|
|
189
|
+
...fontSizes[16],
|
|
190
|
+
},
|
|
184
191
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
192
|
+
default: {
|
|
193
|
+
huge: {
|
|
194
|
+
fontFamily: fontStacks.black,
|
|
195
|
+
fontWeight: 500,
|
|
196
|
+
...fontSizes[39],
|
|
197
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[34],
|
|
198
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[29],
|
|
199
|
+
},
|
|
200
|
+
h1: {
|
|
201
|
+
fontFamily: fontStacks.semiBold,
|
|
202
|
+
fontWeight: 500,
|
|
203
|
+
...fontSizes[31],
|
|
204
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[27],
|
|
205
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[23],
|
|
206
|
+
},
|
|
207
|
+
h2: {
|
|
208
|
+
fontFamily: fontStacks.semiBold,
|
|
209
|
+
fontWeight: 500,
|
|
210
|
+
...fontSizes[25],
|
|
211
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[22],
|
|
212
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[19],
|
|
213
|
+
},
|
|
214
|
+
h3: {
|
|
215
|
+
fontFamily: fontStacks.semiBold,
|
|
216
|
+
fontWeight: 500,
|
|
217
|
+
...fontSizes[20],
|
|
218
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.medium}px)`]: fontSizes[18],
|
|
219
|
+
[`@media (max-width: ${breakpoints_1.breakpoints.small}px)`]: fontSizes[16],
|
|
220
|
+
},
|
|
221
|
+
h4: {
|
|
222
|
+
fontFamily: fontStacks.semiBold,
|
|
223
|
+
fontWeight: 500,
|
|
224
|
+
...fontSizes[16],
|
|
225
|
+
},
|
|
226
|
+
h5: {
|
|
227
|
+
fontFamily: fontStacks.semiBold,
|
|
228
|
+
fontWeight: 500,
|
|
229
|
+
...fontSizes[13],
|
|
230
|
+
},
|
|
231
|
+
h6: {
|
|
232
|
+
fontFamily: fontStacks.semiBold,
|
|
233
|
+
fontWeight: 500,
|
|
234
|
+
...fontSizes[12],
|
|
235
|
+
},
|
|
189
236
|
},
|
|
190
237
|
};
|
|
191
238
|
const baseStyle = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isLocalStorageAvailable: () => boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLocalStorageAvailable = void 0;
|
|
4
|
+
// https://gist.github.com/paulirish/5558557
|
|
5
|
+
const 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 {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.isLocalStorageAvailable = isLocalStorageAvailable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/styleguide",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "Foundational styles for Expo interfaces.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "*"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "8bc8fee4c0708453a5f6345e6a346385d0f98c4e"
|
|
41
41
|
}
|