@expo/styleguide 8.0.0-alpha.9 → 8.0.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/dist/index.js +1 -881
- package/dist/src/logos/RouterLogo.d.ts +2 -0
- package/dist/src/logos/index.d.ts +1 -0
- package/package.json +7 -14
- package/tailwind.js +39 -0
package/dist/index.js
CHANGED
|
@@ -1,881 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var Link$1 = require('next/link');
|
|
6
|
-
var styleguideBase = require('@expo/styleguide-base');
|
|
7
|
-
|
|
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 (_a) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function getInitialColorMode() {
|
|
25
|
-
if (isLocalStorageAvailable()) {
|
|
26
|
-
var preference = window.localStorage.getItem('data-expo-theme');
|
|
27
|
-
var hasPreference = typeof preference === 'string';
|
|
28
|
-
if (hasPreference) {
|
|
29
|
-
return preference;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
var mql = window.matchMedia('(prefers-color-scheme: dark)');
|
|
33
|
-
var systemPreference = typeof mql.matches === 'boolean';
|
|
34
|
-
if (systemPreference) {
|
|
35
|
-
return mql.matches ? 'dark' : 'light';
|
|
36
|
-
}
|
|
37
|
-
return 'light';
|
|
38
|
-
}
|
|
39
|
-
function setInitialColorMode() {
|
|
40
|
-
var colorMode = getInitialColorMode();
|
|
41
|
-
// add HTML attribute if dark mode
|
|
42
|
-
if (colorMode === 'dark') {
|
|
43
|
-
document.documentElement.classList.add('dark-theme');
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
document.documentElement.classList.remove('dark-theme');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// our function needs to be a string so that we can call it
|
|
50
|
-
var blockingSetInitialColorMode = "(function() {\n ".concat(isLocalStorageAvailable.toString(), "\n ").concat(getInitialColorMode.toString(), "\n ").concat(setInitialColorMode.toString(), "\n setInitialColorMode();\n})()\n");
|
|
51
|
-
function BlockingSetInitialColorMode() {
|
|
52
|
-
return (React.createElement("script", { dangerouslySetInnerHTML: {
|
|
53
|
-
__html: blockingSetInitialColorMode
|
|
54
|
-
} }));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
exports.Themes = void 0;
|
|
58
|
-
(function (Themes) {
|
|
59
|
-
Themes["AUTO"] = "auto";
|
|
60
|
-
Themes["DARK"] = "dark";
|
|
61
|
-
Themes["LIGHT"] = "light";
|
|
62
|
-
})(exports.Themes || (exports.Themes = {}));
|
|
63
|
-
var ThemeContext = React.createContext({
|
|
64
|
-
setDarkMode: function () { },
|
|
65
|
-
setLightMode: function () { },
|
|
66
|
-
setAutoMode: function () { },
|
|
67
|
-
themeName: exports.Themes.AUTO
|
|
68
|
-
});
|
|
69
|
-
function ThemeProvider(props) {
|
|
70
|
-
var children = props.children, _a = props.disabled, disabled = _a === void 0 ? false : _a;
|
|
71
|
-
var initialTheme = process.browser ? document.documentElement.dataset.expoTheme : exports.Themes.AUTO;
|
|
72
|
-
var _b = React.useState(disabled ? exports.Themes.LIGHT : initialTheme), themeName = _b[0], setThemeName = _b[1];
|
|
73
|
-
React.useEffect(function didMount() {
|
|
74
|
-
if (disabled)
|
|
75
|
-
return;
|
|
76
|
-
var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
77
|
-
try {
|
|
78
|
-
mediaQuery.addEventListener('change', onThemeChange);
|
|
79
|
-
}
|
|
80
|
-
catch (_a) {
|
|
81
|
-
// Fallback to old-style listening for changes, for Safari and IE
|
|
82
|
-
mediaQuery.addListener(onThemeChange);
|
|
83
|
-
}
|
|
84
|
-
if (isLocalStorageAvailable()) {
|
|
85
|
-
var themePreference = window.localStorage.getItem('data-expo-theme');
|
|
86
|
-
if (themePreference === exports.Themes.LIGHT || themePreference === exports.Themes.DARK) {
|
|
87
|
-
setThemeName(themePreference);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
setThemeName(exports.Themes.AUTO);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
setThemeName(exports.Themes.AUTO);
|
|
95
|
-
}
|
|
96
|
-
return function unMount() {
|
|
97
|
-
try {
|
|
98
|
-
mediaQuery.removeEventListener('change', onThemeChange);
|
|
99
|
-
}
|
|
100
|
-
catch (_a) {
|
|
101
|
-
// Fallback to old-style listening for changes, for Safari and IE
|
|
102
|
-
mediaQuery.removeListener(onThemeChange);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}, []);
|
|
106
|
-
function setDocumentTheme(themeName) {
|
|
107
|
-
if (disabled)
|
|
108
|
-
return;
|
|
109
|
-
if (themeName === exports.Themes.DARK) {
|
|
110
|
-
document.documentElement.classList.add('dark-theme');
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
document.documentElement.classList.remove('dark-theme');
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function onThemeChange(event) {
|
|
117
|
-
if (isLocalStorageAvailable()) {
|
|
118
|
-
var themePreference = window.localStorage.getItem('data-expo-theme');
|
|
119
|
-
if (!themePreference) {
|
|
120
|
-
if (event.matches) {
|
|
121
|
-
setDocumentTheme(exports.Themes.DARK);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
setDocumentTheme(exports.Themes.LIGHT);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
setDocumentTheme(exports.Themes.AUTO);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function setDarkMode() {
|
|
133
|
-
if (isLocalStorageAvailable()) {
|
|
134
|
-
window.localStorage.setItem('data-expo-theme', exports.Themes.DARK);
|
|
135
|
-
}
|
|
136
|
-
setDocumentTheme(exports.Themes.DARK);
|
|
137
|
-
setThemeName(exports.Themes.DARK);
|
|
138
|
-
}
|
|
139
|
-
function setLightMode() {
|
|
140
|
-
if (isLocalStorageAvailable()) {
|
|
141
|
-
window.localStorage.setItem('data-expo-theme', exports.Themes.LIGHT);
|
|
142
|
-
}
|
|
143
|
-
setDocumentTheme(exports.Themes.LIGHT);
|
|
144
|
-
setThemeName(exports.Themes.LIGHT);
|
|
145
|
-
}
|
|
146
|
-
function setAutoMode() {
|
|
147
|
-
if (isLocalStorageAvailable()) {
|
|
148
|
-
window.localStorage.removeItem('data-expo-theme');
|
|
149
|
-
}
|
|
150
|
-
var themeName = getInitialColorMode();
|
|
151
|
-
setDocumentTheme(themeName);
|
|
152
|
-
setThemeName(exports.Themes.AUTO);
|
|
153
|
-
}
|
|
154
|
-
return (React.createElement(ThemeContext.Provider, { value: {
|
|
155
|
-
setDarkMode: setDarkMode,
|
|
156
|
-
setLightMode: setLightMode,
|
|
157
|
-
setAutoMode: setAutoMode,
|
|
158
|
-
themeName: themeName
|
|
159
|
-
} }, children));
|
|
160
|
-
}
|
|
161
|
-
function useTheme() {
|
|
162
|
-
var context = React.useContext(ThemeContext);
|
|
163
|
-
if (context === undefined) {
|
|
164
|
-
throw new Error('useTheme must be used within a ThemeProvider');
|
|
165
|
-
}
|
|
166
|
-
return context;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/******************************************************************************
|
|
170
|
-
Copyright (c) Microsoft Corporation.
|
|
171
|
-
|
|
172
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
173
|
-
purpose with or without fee is hereby granted.
|
|
174
|
-
|
|
175
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
176
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
177
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
178
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
179
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
180
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
181
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
182
|
-
***************************************************************************** */
|
|
183
|
-
/* global Reflect, Promise */
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
var __assign = function() {
|
|
187
|
-
__assign = Object.assign || function __assign(t) {
|
|
188
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
189
|
-
s = arguments[i];
|
|
190
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
191
|
-
}
|
|
192
|
-
return t;
|
|
193
|
-
};
|
|
194
|
-
return __assign.apply(this, arguments);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
function __rest(s, e) {
|
|
198
|
-
var t = {};
|
|
199
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
200
|
-
t[p] = s[p];
|
|
201
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
202
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
203
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
204
|
-
t[p[i]] = s[p[i]];
|
|
205
|
-
}
|
|
206
|
-
return t;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
var mergeClasses = tailwindMerge.extendTailwindMerge({
|
|
210
|
-
classGroups: {
|
|
211
|
-
icon: [{ icon: ['xs', 'sm', 'md', 'lg', 'xl', '2xl'] }]
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
var ButtonBase = React.forwardRef(function (_a, ref) {
|
|
216
|
-
var children = _a.children, testID = _a.testID, className = _a.className, onClick = _a.onClick, _b = _a.type, type = _b === void 0 ? 'button' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, rest = __rest(_a, ["children", "testID", "className", "onClick", "type", "disabled"]);
|
|
217
|
-
return (React.createElement("button", __assign({ className: mergeClasses('flex cursor-pointer', className), "data-testid": testID, disabled: disabled, ref: ref, type: type, onClick: disabled ? undefined : onClick }, rest), children));
|
|
218
|
-
});
|
|
219
|
-
ButtonBase.displayName = 'ButtonBase';
|
|
220
|
-
|
|
221
|
-
var STOPWORDS = 'a an and at but by for in nor of on or out so the to up with yet'.split(' ');
|
|
222
|
-
function titleCase(value, options) {
|
|
223
|
-
var _a;
|
|
224
|
-
if (options === void 0) { options = {}; }
|
|
225
|
-
if (!value)
|
|
226
|
-
return '';
|
|
227
|
-
var stop = (_a = options.stopwords) !== null && _a !== void 0 ? _a : STOPWORDS;
|
|
228
|
-
var keep = options.keepSpaces;
|
|
229
|
-
var splitter = /(\s+|[-‑–—,:;!?()])/;
|
|
230
|
-
return value
|
|
231
|
-
.split(splitter)
|
|
232
|
-
.map(function (word, index, all) {
|
|
233
|
-
if (index % 2) {
|
|
234
|
-
if (/\s+/.test(word))
|
|
235
|
-
return keep ? word : ' ';
|
|
236
|
-
return word;
|
|
237
|
-
}
|
|
238
|
-
var lower = word.toLocaleLowerCase();
|
|
239
|
-
if (index !== 0 && index !== all.length - 1 && stop.includes(lower)) {
|
|
240
|
-
return lower;
|
|
241
|
-
}
|
|
242
|
-
return capitalize(word);
|
|
243
|
-
})
|
|
244
|
-
.join('');
|
|
245
|
-
}
|
|
246
|
-
function capitalize(text) {
|
|
247
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
var LinkBase = React.forwardRef(function (_a, ref) {
|
|
251
|
-
var children = _a.children, testID = _a.testID, href = _a.href, openInNewTab = _a.openInNewTab, onClick = _a.onClick, target = _a.target, disabled = _a.disabled, rel = _a.rel, rest = __rest(_a, ["children", "testID", "href", "openInNewTab", "onClick", "target", "disabled", "rel"]);
|
|
252
|
-
if (disabled) {
|
|
253
|
-
return (React.createElement("a", __assign({ ref: ref, "data-testid": testID }, rest), children));
|
|
254
|
-
}
|
|
255
|
-
if (!href || href.startsWith('#')) {
|
|
256
|
-
return (React.createElement("a", __assign({ href: href, ref: ref, onClick: onClick, "data-testid": testID }, rest), children));
|
|
257
|
-
}
|
|
258
|
-
return (React.createElement(Link$1, __assign({ href: href, ref: ref, onClick: onClick, target: openInNewTab ? '_blank' : target, rel: openInNewTab ? 'noopener noreferrer' : rel, "data-testid": testID }, rest), children));
|
|
259
|
-
});
|
|
260
|
-
LinkBase.displayName = 'LinkBase';
|
|
261
|
-
|
|
262
|
-
var Link = React.forwardRef(function (_a, ref) {
|
|
263
|
-
var className = _a.className, disabled = _a.disabled, rest = __rest(_a, ["className", "disabled"]);
|
|
264
|
-
return (React.createElement(LinkBase, __assign({ className: mergeClasses('text-link transition-opacity', !disabled && 'hocus:opacity-80', className), ref: ref }, rest)));
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
function getSizeClasses(size) {
|
|
268
|
-
switch (size) {
|
|
269
|
-
case 'xs':
|
|
270
|
-
return 'h-8 px-3 text-3xs';
|
|
271
|
-
case 'sm':
|
|
272
|
-
return 'h-9 px-4 text-xs';
|
|
273
|
-
case 'md':
|
|
274
|
-
return 'h-10 px-4 text-xs';
|
|
275
|
-
case 'lg':
|
|
276
|
-
return 'h-11 px-6 text-base';
|
|
277
|
-
case 'xl':
|
|
278
|
-
return 'h-12 px-6 text-base';
|
|
279
|
-
case '2xl':
|
|
280
|
-
return 'h-15 px-6 text-lg';
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
function getThemeClasses(theme, disabled) {
|
|
284
|
-
if (disabled === void 0) { disabled = false; }
|
|
285
|
-
switch (theme) {
|
|
286
|
-
case 'primary':
|
|
287
|
-
return mergeClasses('border-button-primary bg-button-primary text-button-primary shadow-xs', !disabled && 'hocus:bg-button-primary-hover active:scale-98', disabled && 'bg-button-primary-disabled border-button-primary-disabled text-button-primary-disabled');
|
|
288
|
-
case 'primary-destructive':
|
|
289
|
-
return mergeClasses('border-button-primary-destructive bg-button-primary-destructive text-button-primary-destructive shadow-xs', !disabled && 'hocus:bg-button-primary-destructive-hover active:scale-98', disabled &&
|
|
290
|
-
'bg-button-primary-destructive-disabled border-button-primary-destructive-disabled text-button-primary-destructive-disabled');
|
|
291
|
-
case 'secondary':
|
|
292
|
-
return mergeClasses('border-button-secondary bg-button-secondary text-button-secondary shadow-xs', !disabled && 'hocus:bg-button-secondary-hover active:scale-98', disabled && 'bg-button-secondary-disabled border-button-secondary-disabled text-button-secondary-disabled');
|
|
293
|
-
case 'secondary-destructive':
|
|
294
|
-
return mergeClasses('border-button-secondary-destructive bg-button-secondary-destructive text-button-secondary-destructive shadow-xs', !disabled && 'hocus:bg-button-secondary-destructive-hover active:scale-98', disabled &&
|
|
295
|
-
'bg-button-secondary-destructive-disabled border-button-secondary-destructive-disabled text-button-secondary-destructive-disabled');
|
|
296
|
-
case 'tertiary':
|
|
297
|
-
return mergeClasses('border-button-tertiary bg-button-tertiary text-button-tertiary shadow-none', !disabled && 'hocus:bg-button-tertiary-hover active:scale-98', disabled && 'bg-button-tertiary-disabled border-button-tertiary-disabled text-button-tertiary-disabled');
|
|
298
|
-
case 'quaternary':
|
|
299
|
-
return mergeClasses('border-button-quaternary bg-button-quaternary text-button-quaternary shadow-none', !disabled && 'hocus:bg-button-quaternary-hover active:scale-98', disabled && 'bg-button-quaternary-disabled border-button-quaternary-disabled text-button-quaternary-disabled');
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
function getIconSizeClasses(size) {
|
|
303
|
-
switch (size) {
|
|
304
|
-
case 'xs':
|
|
305
|
-
return 'icon-xs';
|
|
306
|
-
case 'sm':
|
|
307
|
-
return 'icon-sm';
|
|
308
|
-
case 'md':
|
|
309
|
-
return 'icon-md';
|
|
310
|
-
case 'lg':
|
|
311
|
-
return 'icon-md';
|
|
312
|
-
case 'xl':
|
|
313
|
-
return 'icon-lg';
|
|
314
|
-
case '2xl':
|
|
315
|
-
return 'icon-lg';
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function getThemedIconClasses(theme) {
|
|
319
|
-
switch (theme) {
|
|
320
|
-
case 'primary':
|
|
321
|
-
return 'text-button-primary-icon';
|
|
322
|
-
case 'primary-destructive':
|
|
323
|
-
return 'text-button-primary-destructive-icon';
|
|
324
|
-
case 'secondary':
|
|
325
|
-
return 'text-button-secondary-icon';
|
|
326
|
-
case 'secondary-destructive':
|
|
327
|
-
return 'text-button-secondary-destructive-icon';
|
|
328
|
-
case 'tertiary':
|
|
329
|
-
return 'text-button-tertiary-icon';
|
|
330
|
-
case 'quaternary':
|
|
331
|
-
return 'text-button-quaternary-icon';
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
function getButtonIconClasses(size) {
|
|
335
|
-
switch (size) {
|
|
336
|
-
case 'xs':
|
|
337
|
-
return 'px-0 w-8 justify-center items-center';
|
|
338
|
-
case 'sm':
|
|
339
|
-
return 'px-0 w-9 justify-center items-center';
|
|
340
|
-
case 'md':
|
|
341
|
-
return 'px-0 w-10 justify-center items-center';
|
|
342
|
-
case 'lg':
|
|
343
|
-
return 'px-0 w-11 justify-center items-center';
|
|
344
|
-
case 'xl':
|
|
345
|
-
return 'px-0 w-12 justify-center items-center';
|
|
346
|
-
case '2xl':
|
|
347
|
-
return 'px-0 w-15 justify-center items-center';
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
function isIconElement(element) {
|
|
351
|
-
var _a, _b, _c;
|
|
352
|
-
if (React.isValidElement(element)) {
|
|
353
|
-
// @ts-ignore React Portal did not have `displayName` prop, but it is a valid element
|
|
354
|
-
return (_c = (_b = (_a = element.type) === null || _a === void 0 ? void 0 : _a.displayName) === null || _b === void 0 ? void 0 : _b.endsWith('Icon')) !== null && _c !== void 0 ? _c : false;
|
|
355
|
-
}
|
|
356
|
-
return false;
|
|
357
|
-
}
|
|
358
|
-
function getIconProps(element, classNames) {
|
|
359
|
-
return __assign(__assign({}, element.props), { className: mergeClasses(classNames, element.props.className) });
|
|
360
|
-
}
|
|
361
|
-
var Button = React.forwardRef(function (_a, ref) {
|
|
362
|
-
var children = _a.children, _b = _a.size, size = _b === void 0 ? 'sm' : _b, _c = _a.theme, theme = _c === void 0 ? 'primary' : _c, _d = _a.skipCapitalization, skipCapitalization = _d === void 0 ? false : _d, href = _a.href, disabled = _a.disabled, className = _a.className, leftSlot = _a.leftSlot, rightSlot = _a.rightSlot, openInNewTab = _a.openInNewTab, rest = __rest(_a, ["children", "size", "theme", "skipCapitalization", "href", "disabled", "className", "leftSlot", "rightSlot", "openInNewTab"]);
|
|
363
|
-
var isLeftSlotIcon = leftSlot && isIconElement(leftSlot);
|
|
364
|
-
var isRightSlotIcon = rightSlot && isIconElement(rightSlot);
|
|
365
|
-
var iconClasses = (isLeftSlotIcon || isRightSlotIcon) &&
|
|
366
|
-
mergeClasses("".concat(getIconSizeClasses(size)), getThemedIconClasses(theme), disabled && 'opacity-60');
|
|
367
|
-
var isSingleIconButton = (leftSlot || rightSlot) && !children;
|
|
368
|
-
var twClasses = mergeClasses("inline-flex border border-solid rounded-md font-medium gap-2 items-center whitespace-nowrap transition", getSizeClasses(size), getThemeClasses(theme, disabled), isSingleIconButton && getButtonIconClasses(size), disabled && 'cursor-default opacity-80 pointer-event-none', className);
|
|
369
|
-
var content = (React.createElement(React.Fragment, null,
|
|
370
|
-
isLeftSlotIcon ? React.cloneElement(leftSlot, getIconProps(leftSlot, iconClasses)) : leftSlot,
|
|
371
|
-
children && (React.createElement("span", { className: mergeClasses('flex self-center text-inherit leading-none', href && 'select-none') }, typeof children === 'string' && !skipCapitalization ? titleCase(children) : children)),
|
|
372
|
-
isRightSlotIcon ? React.cloneElement(rightSlot, getIconProps(rightSlot, iconClasses)) : rightSlot));
|
|
373
|
-
if (href) {
|
|
374
|
-
return (React.createElement(LinkBase, __assign({ href: href, className: twClasses, disabled: disabled, ref: ref, openInNewTab: openInNewTab }, rest), content));
|
|
375
|
-
}
|
|
376
|
-
else {
|
|
377
|
-
return (React.createElement(ButtonBase, __assign({ className: twClasses, disabled: disabled, ref: ref }, rest), content));
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
Button.displayName = 'Button';
|
|
381
|
-
|
|
382
|
-
function DocsLogo(_a) {
|
|
383
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
384
|
-
var _className = mergeClasses('icon-md text-icon-default', className);
|
|
385
|
-
return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", className: _className }, rest),
|
|
386
|
-
React.createElement("path", { d: "M12.07 8a.157.157 0 01.166.015l5.374 4.141a.16.16 0 01.055.168l-.37 1.298a.157.157 0 01-.234.09l-4.416-2.768-.846 5.47a.157.157 0 01-.219.12l-1.158-.518a.157.157 0 01-.093-.154l.477-7.132a.157.157 0 01.085-.129L12.069 8z", fill: "currentColor" }),
|
|
387
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.584.02a.157.157 0 00-.157.001L.708 5.071l-.003.001a.157.157 0 00-.079.135V15.31c0 .056.03.108.079.136l1.71.984.004.003a.157.157 0 00.157 0l1.054-.61v1.183c0 .056.03.108.078.136l1.715.987a.157.157 0 00.156 0l.003-.002 2.024-1.172.91 2.934a.157.157 0 00.198.102l1.815-.594a.156.156 0 00.03-.013l8.732-4.666a.157.157 0 00.075-.186L16.06 4.258a.157.157 0 00-.205-.098l-1.473.529v-1.85a.157.157 0 00-.079-.135l-.002-.001-1.713-.986a.157.157 0 00-.156 0l-1.054.61V1.144a.157.157 0 00-.078-.136L9.584.02zM5.33 9.56l-.003-1.578-1.383-.805v9.74l1.4.806-.014-8.119a.156.156 0 010-.045zM.94 5.48l1.384.805.017 9.741-1.4-.806V5.48zm9.968-4.336l-1.4-.806-8.412 4.87 1.385.806 8.427-4.87zM5.483 7.71l8.427-4.87-1.4-.806-8.411 4.87 1.384.806zm5.09 11.313l-3.21-9.971 8.455-4.519 3.21 9.97-8.456 4.52zM5.678 9.678l3.09 9.967 1.514-.496-3.21-9.972-1.394.501z", fill: "currentColor" })));
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function ExpoGoLogo(_a) {
|
|
391
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
392
|
-
var _className = mergeClasses('icon-md text-icon-default', className);
|
|
393
|
-
return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", className: _className }, rest),
|
|
394
|
-
React.createElement("path", { d: "M18.072 7.75a1.749 1.749 0 00-1.56-.732 1.763 1.763 0 00-1.436.946 1.55 1.55 0 00.302 1.75 2.57 2.57 0 001.716-.484 2.53 2.53 0 00.978-1.48zM12.866 1L11.751.394 6.897 3.072l.387.207.736.383 1.332-.733L12.867.987 12.866 1zm.449-.184a.173.173 0 01.124.115l1.626 4.755a.158.158 0 01-.077.207 3.126 3.126 0 00-1.384 1.519 3.09 3.09 0 00-.134 2.042 3.29 3.29 0 001.35 1.793 3.343 3.343 0 002.195.524.208.208 0 01.202.123l1.68 4.88a.196.196 0 01-.078.215l-5.163 2.992a.195.195 0 01-.078.015.208.208 0 01-.14-.022l-1.81-1.129a.18.18 0 01-.078-.076l-3.538-8.065-5.388 3.039a.25.25 0 01-.21.008l-1.224-.69a.177.177 0 01-.077-.23l5.234-9.847c.02-.033.05-.06.085-.076L11.65.023a.2.2 0 01.186 0l1.479.793zM6.843 3.46l-.256-.13-5.044 9.523.92.514 4.352-5.643a.212.212 0 01.178-.077.217.217 0 01.155.115l4.738 10.82 1.266.775L8.066 4.62l-.216-.614-1.014-.552.007.007zm7.804 5.679a1.932 1.932 0 01.092-1.28c.176-.404.484-.737.875-.945a2.152 2.152 0 012.509.307 1.934 1.934 0 01.056 2.745l-.056.056a2.118 2.118 0 01-1.986.516 2.118 2.118 0 01-.928-.508 2.091 2.091 0 01-.562-.891z", fill: "currentColor" })));
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
function Logo(_a) {
|
|
398
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
399
|
-
var _className = mergeClasses('icon-md text-icon-default', className);
|
|
400
|
-
return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", className: _className }, rest),
|
|
401
|
-
React.createElement("path", { d: "M9.477 7.638c.164-.24.343-.27.488-.27.145 0 .387.03.551.27 2.13 2.901 6.55 10.56 6.959 10.976.605.618 1.436.233 1.918-.468.475-.69.607-1.174.607-1.69 0-.352-6.883-13.05-7.576-14.106-.667-1.017-.884-1.274-2.025-1.274h-.854c-1.138 0-1.302.257-1.969 1.274C6.883 3.406 0 16.104 0 16.456c0 .517.132 1 .607 1.69.482.7 1.313 1.086 1.918.468.41-.417 4.822-8.075 6.952-10.977z", fill: "currentColor" })));
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
function SnackLogo(_a) {
|
|
405
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
406
|
-
var _className = mergeClasses('icon-md text-icon-default', className);
|
|
407
|
-
return (React.createElement("svg", __assign({ viewBox: "0 0 20 20", fill: "none", role: "img", className: _className }, rest),
|
|
408
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.168 1.152a2.752 2.752 0 100 5.504 2.752 2.752 0 000-5.504zm-2.43 2.752a2.429 2.429 0 014.608-1.075 3.805 3.805 0 01-3.701 2.925h-.051a2.423 2.423 0 01-.855-1.85zm-1.755-1.422a.16.16 0 01.081.14v4.825L17.23 9.86c.05.029.081.082.082.14l.026 4.92a.16.16 0 01-.081.14l-8.52 4.92a.161.161 0 01-.242-.14V10c0-.057.03-.11.08-.14l4.006-2.319-4.005-2.32a.161.161 0 010-.28l4.246-2.458a.161.161 0 01.162 0zm3.845 7.517L13.064 7.82v4.36L16.828 10zM8.978 5.08l3.764 2.18V2.901l-3.763 2.18z", fill: "currentColor" }),
|
|
409
|
-
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.75.022a.161.161 0 00-.162 0l-4.242 2.46a.16.16 0 00-.019.01L.11 4.94l-.003.001a.161.161 0 00-.081.136v.004l-.013 4.994a.161.161 0 000 .125L0 14.92c0 .058.03.111.08.14l4.24 2.455.03.018 4.226 2.446a.161.161 0 00.242-.14v-9.746l4.166-2.412a.162.162 0 000-.28l-.081-.046V2.808l.08-.047a.162.162 0 000-.28L8.75.022zm3.828 2.597L8.67.35 4.74 2.626l3.917 2.267 3.922-2.275zM8.656 5.268L4.74 7.538l3.916 2.275L12.58 7.54 8.656 5.268zM4.419 7.352l3.915-2.27-3.916-2.268L.508 5.08 4.42 7.35zm-.165.277v4.692L.336 10.05l.012-4.69 3.906 2.268zm.323 4.879V7.817l3.918 2.275v4.685l-3.918-2.27zm-.323.186l-3.92-2.27-.01 4.403 3.93 2.276v-4.41zm.323 4.596v-4.41l3.918 2.27v4.408L4.577 17.29z", fill: "currentColor" })));
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
function WordMarkLogo(_a) {
|
|
413
|
-
var className = _a.className, rest = __rest(_a, ["className"]);
|
|
414
|
-
var _className = mergeClasses('icon-md text-icon-default', className);
|
|
415
|
-
return (React.createElement("svg", __assign({ viewBox: "0 0 71 20", fill: "none", role: "img", className: _className }, rest),
|
|
416
|
-
React.createElement("path", { d: "M9.258 6.342c.158-.23.331-.26.472-.26.14 0 .374.03.532.26 2.06 2.806 6.332 10.208 6.727 10.611.585.597 1.388.225 1.854-.452.46-.667.587-1.135.587-1.634 0-.34-6.653-12.614-7.324-13.636C11.462.248 11.252 0 10.15 0h-.825c-1.1 0-1.259.248-1.903 1.23C6.75 2.254.097 14.528.097 14.868c0 .5.127.967.587 1.634.466.677 1.269 1.05 1.854.452.395-.403 4.661-7.805 6.72-10.61zm14.941-5.237v15.344h9.35v-3.113h-6.125v-3.244h5.45V6.98h-5.45V4.218h6.125V1.105h-9.35zM46.25 16.449l-3.88-5.568 3.619-5.195h-3.662L40.54 8.23l-1.765-2.543h-3.706l3.618 5.217-3.857 5.546h3.661l2.027-2.915 2.027 2.915h3.705zm7.572-10.982c-1.482 0-2.637.614-3.378 1.732V5.686H47.37V20h3.073v-5.063c.74 1.117 1.896 1.731 3.378 1.731 2.768 0 4.97-2.52 4.97-5.611 0-3.091-2.202-5.59-4.97-5.59zm-.697 8.242c-1.504 0-2.681-1.14-2.681-2.652 0-1.49 1.177-2.653 2.68-2.653 1.483 0 2.681 1.184 2.681 2.653 0 1.49-1.198 2.652-2.68 2.652zm12.188-8.242c-3.16 0-5.558 2.411-5.558 5.612 0 3.2 2.397 5.59 5.557 5.59 3.139 0 5.558-2.39 5.558-5.59 0-3.2-2.42-5.612-5.558-5.612zm0 2.96c1.438 0 2.55 1.117 2.55 2.652 0 1.49-1.112 2.63-2.55 2.63-1.46 0-2.55-1.14-2.55-2.63 0-1.535 1.09-2.653 2.55-2.653z", fill: "currentColor" })));
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
var shadows = {
|
|
420
|
-
none: 'var(--expo-theme-shadows-none)',
|
|
421
|
-
xs: 'var(--expo-theme-shadows-xs)',
|
|
422
|
-
sm: 'var(--expo-theme-shadows-sm)',
|
|
423
|
-
md: 'var(--expo-theme-shadows-md)',
|
|
424
|
-
lg: 'var(--expo-theme-shadows-lg)',
|
|
425
|
-
xl: 'var(--expo-theme-shadows-xl)'
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
var theme = {
|
|
429
|
-
background: {
|
|
430
|
-
"default": 'var(--expo-theme-background-default)',
|
|
431
|
-
screen: 'var(--expo-theme-background-screen)',
|
|
432
|
-
subtle: 'var(--expo-theme-background-subtle)',
|
|
433
|
-
element: 'var(--expo-theme-background-element)',
|
|
434
|
-
hover: 'var(--expo-theme-background-hover)',
|
|
435
|
-
selected: 'var(--expo-theme-background-selected)',
|
|
436
|
-
overlay: 'var(--expo-theme-background-overlay)',
|
|
437
|
-
success: 'var(--expo-theme-background-success)',
|
|
438
|
-
warning: 'var(--expo-theme-background-warning)',
|
|
439
|
-
danger: 'var(--expo-theme-background-danger)',
|
|
440
|
-
info: 'var(--expo-theme-background-info)'
|
|
441
|
-
},
|
|
442
|
-
icon: {
|
|
443
|
-
"default": 'var(--expo-theme-icon-default)',
|
|
444
|
-
secondary: 'var(--expo-theme-icon-secondary)',
|
|
445
|
-
tertiary: 'var(--expo-theme-icon-tertiary)',
|
|
446
|
-
quaternary: 'var(--expo-theme-icon-quaternary)',
|
|
447
|
-
success: 'var(--expo-theme-icon-success)',
|
|
448
|
-
warning: 'var(--expo-theme-icon-warning)',
|
|
449
|
-
danger: 'var(--expo-theme-icon-danger)',
|
|
450
|
-
info: 'var(--expo-theme-icon-info)'
|
|
451
|
-
},
|
|
452
|
-
text: {
|
|
453
|
-
"default": 'var(--expo-theme-text-default)',
|
|
454
|
-
secondary: 'var(--expo-theme-text-secondary)',
|
|
455
|
-
tertiary: 'var(--expo-theme-text-tertiary)',
|
|
456
|
-
quaternary: 'var(--expo-theme-text-quaternary)',
|
|
457
|
-
link: 'var(--expo-theme-text-link)',
|
|
458
|
-
success: 'var(--expo-theme-text-success)',
|
|
459
|
-
warning: 'var(--expo-theme-text-warning)',
|
|
460
|
-
danger: 'var(--expo-theme-text-danger)',
|
|
461
|
-
info: 'var(--expo-theme-text-info)'
|
|
462
|
-
},
|
|
463
|
-
border: {
|
|
464
|
-
"default": 'var(--expo-theme-border-default)',
|
|
465
|
-
secondary: 'var(--expo-theme-border-secondary)',
|
|
466
|
-
success: 'var(--expo-theme-border-success)',
|
|
467
|
-
warning: 'var(--expo-theme-border-warning)',
|
|
468
|
-
danger: 'var(--expo-theme-border-danger)',
|
|
469
|
-
info: 'var(--expo-theme-border-info)'
|
|
470
|
-
},
|
|
471
|
-
button: {
|
|
472
|
-
primary: {
|
|
473
|
-
background: 'var(--expo-theme-button-primary-background)',
|
|
474
|
-
border: 'var(--expo-theme-button-primary-border)',
|
|
475
|
-
hover: 'var(--expo-theme-button-primary-hover)',
|
|
476
|
-
icon: 'var(--expo-theme-button-primary-icon)',
|
|
477
|
-
text: 'var(--expo-theme-button-primary-text)',
|
|
478
|
-
disabled: {
|
|
479
|
-
background: 'var(--expo-theme-button-primary-disabled-background)',
|
|
480
|
-
border: 'var(--expo-theme-button-primary-disabled-border)',
|
|
481
|
-
text: 'var(--expo-theme-button-primary-disabled-text)'
|
|
482
|
-
},
|
|
483
|
-
destructive: {
|
|
484
|
-
background: 'var(--expo-theme-button-primary-destructive-background)',
|
|
485
|
-
border: 'var(--expo-theme-button-primary-destructive-border)',
|
|
486
|
-
hover: 'var(--expo-theme-button-primary-destructive-hover)',
|
|
487
|
-
icon: 'var(--expo-theme-button-primary-destructive-icon)',
|
|
488
|
-
text: 'var(--expo-theme-button-primary-destructive-text)',
|
|
489
|
-
disabled: {
|
|
490
|
-
background: 'var(--expo-theme-button-primary-destructive-disabled-background)',
|
|
491
|
-
border: 'var(--expo-theme-button-primary-destructive-disabled-border)',
|
|
492
|
-
text: 'var(--expo-theme-button-primary-destructive-disabled-text)'
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
secondary: {
|
|
497
|
-
background: 'var(--expo-theme-button-secondary-background)',
|
|
498
|
-
border: 'var(--expo-theme-button-secondary-border)',
|
|
499
|
-
hover: 'var(--expo-theme-button-secondary-hover)',
|
|
500
|
-
icon: 'var(--expo-theme-button-secondary-icon)',
|
|
501
|
-
text: 'var(--expo-theme-button-secondary-text)',
|
|
502
|
-
disabled: {
|
|
503
|
-
background: 'var(--expo-theme-button-secondary-disabled-background)',
|
|
504
|
-
border: 'var(--expo-theme-button-secondary-disabled-border)',
|
|
505
|
-
text: 'var(--expo-theme-button-secondary-disabled-text)'
|
|
506
|
-
},
|
|
507
|
-
destructive: {
|
|
508
|
-
background: 'var(--expo-theme-button-secondary-destructive-background)',
|
|
509
|
-
border: 'var(--expo-theme-button-secondary-destructive-border)',
|
|
510
|
-
hover: 'var(--expo-theme-button-secondary-destructive-hover)',
|
|
511
|
-
icon: 'var(--expo-theme-button-secondary-destructive-icon)',
|
|
512
|
-
text: 'var(--expo-theme-button-secondary-destructive-text)',
|
|
513
|
-
disabled: {
|
|
514
|
-
background: 'var(--expo-theme-button-secondary-destructive-disabled-background)',
|
|
515
|
-
border: 'var(--expo-theme-button-secondary-destructive-disabled-border)',
|
|
516
|
-
text: 'var(--expo-theme-button-secondary-destructive-disabled-text)'
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
tertiary: {
|
|
521
|
-
background: 'var(--expo-theme-button-tertiary-background)',
|
|
522
|
-
border: 'var(--expo-theme-button-tertiary-border)',
|
|
523
|
-
hover: 'var(--expo-theme-button-tertiary-hover)',
|
|
524
|
-
icon: 'var(--expo-theme-button-tertiary-icon)',
|
|
525
|
-
text: 'var(--expo-theme-button-tertiary-text)',
|
|
526
|
-
disabled: {
|
|
527
|
-
background: 'var(--expo-theme-button-tertiary-disabled-background)',
|
|
528
|
-
border: 'var(--expo-theme-button-tertiary-disabled-border)',
|
|
529
|
-
text: 'var(--expo-theme-button-tertiary-disabled-text)'
|
|
530
|
-
}
|
|
531
|
-
},
|
|
532
|
-
quaternary: {
|
|
533
|
-
background: 'var(--expo-theme-button-quaternary-background)',
|
|
534
|
-
border: 'var(--expo-theme-button-quaternary-border)',
|
|
535
|
-
hover: 'var(--expo-theme-button-quaternary-hover)',
|
|
536
|
-
icon: 'var(--expo-theme-button-quaternary-icon)',
|
|
537
|
-
text: 'var(--expo-theme-button-quaternary-text)',
|
|
538
|
-
disabled: {
|
|
539
|
-
background: 'var(--expo-theme-button-quaternary-disabled-background)',
|
|
540
|
-
border: 'var(--expo-theme-button-quaternary-disabled-border)',
|
|
541
|
-
text: 'var(--expo-theme-button-quaternary-disabled-text)'
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
},
|
|
545
|
-
palette: {
|
|
546
|
-
white: 'var(--expo-color-white)',
|
|
547
|
-
black: 'var(--expo-color-black)',
|
|
548
|
-
green1: 'var(--green1)',
|
|
549
|
-
green2: 'var(--green2)',
|
|
550
|
-
green3: 'var(--green3)',
|
|
551
|
-
green4: 'var(--green4)',
|
|
552
|
-
green5: 'var(--green5)',
|
|
553
|
-
green6: 'var(--green6)',
|
|
554
|
-
green7: 'var(--green7)',
|
|
555
|
-
green8: 'var(--green8)',
|
|
556
|
-
green9: 'var(--green9)',
|
|
557
|
-
green10: 'var(--green10)',
|
|
558
|
-
green11: 'var(--green11)',
|
|
559
|
-
green12: 'var(--green12)',
|
|
560
|
-
purple1: 'var(--purple1)',
|
|
561
|
-
purple2: 'var(--purple2)',
|
|
562
|
-
purple3: 'var(--purple3)',
|
|
563
|
-
purple4: 'var(--purple4)',
|
|
564
|
-
purple5: 'var(--purple5)',
|
|
565
|
-
purple6: 'var(--purple6)',
|
|
566
|
-
purple7: 'var(--purple7)',
|
|
567
|
-
purple8: 'var(--purple8)',
|
|
568
|
-
purple9: 'var(--purple9)',
|
|
569
|
-
purple10: 'var(--purple10)',
|
|
570
|
-
purple11: 'var(--purple11)',
|
|
571
|
-
purple12: 'var(--purple12)',
|
|
572
|
-
pink1: 'var(--pink1)',
|
|
573
|
-
pink2: 'var(--pink2)',
|
|
574
|
-
pink3: 'var(--pink3)',
|
|
575
|
-
pink4: 'var(--pink4)',
|
|
576
|
-
pink5: 'var(--pink5)',
|
|
577
|
-
pink6: 'var(--pink6)',
|
|
578
|
-
pink7: 'var(--pink7)',
|
|
579
|
-
pink8: 'var(--pink8)',
|
|
580
|
-
pink9: 'var(--pink9)',
|
|
581
|
-
pink10: 'var(--pink10)',
|
|
582
|
-
pink11: 'var(--pink11)',
|
|
583
|
-
pink12: 'var(--pink12)',
|
|
584
|
-
orange1: 'var(--orange1)',
|
|
585
|
-
orange2: 'var(--orange2)',
|
|
586
|
-
orange3: 'var(--orange3)',
|
|
587
|
-
orange4: 'var(--orange4)',
|
|
588
|
-
orange5: 'var(--orange5)',
|
|
589
|
-
orange6: 'var(--orange6)',
|
|
590
|
-
orange7: 'var(--orange7)',
|
|
591
|
-
orange8: 'var(--orange8)',
|
|
592
|
-
orange9: 'var(--orange9)',
|
|
593
|
-
orange10: 'var(--orange10)',
|
|
594
|
-
orange11: 'var(--orange11)',
|
|
595
|
-
orange12: 'var(--orange12)',
|
|
596
|
-
yellow1: 'var(--yellow1)',
|
|
597
|
-
yellow2: 'var(--yellow2)',
|
|
598
|
-
yellow3: 'var(--yellow3)',
|
|
599
|
-
yellow4: 'var(--yellow4)',
|
|
600
|
-
yellow5: 'var(--yellow5)',
|
|
601
|
-
yellow6: 'var(--yellow6)',
|
|
602
|
-
yellow7: 'var(--yellow7)',
|
|
603
|
-
yellow8: 'var(--yellow8)',
|
|
604
|
-
yellow9: 'var(--yellow9)',
|
|
605
|
-
yellow10: 'var(--yellow10)',
|
|
606
|
-
yellow11: 'var(--yellow11)',
|
|
607
|
-
yellow12: 'var(--yellow12)',
|
|
608
|
-
blue1: 'var(--blue1)',
|
|
609
|
-
blue2: 'var(--blue2)',
|
|
610
|
-
blue3: 'var(--blue3)',
|
|
611
|
-
blue4: 'var(--blue4)',
|
|
612
|
-
blue5: 'var(--blue5)',
|
|
613
|
-
blue6: 'var(--blue6)',
|
|
614
|
-
blue7: 'var(--blue7)',
|
|
615
|
-
blue8: 'var(--blue8)',
|
|
616
|
-
blue9: 'var(--blue9)',
|
|
617
|
-
blue10: 'var(--blue10)',
|
|
618
|
-
blue11: 'var(--blue11)',
|
|
619
|
-
blue12: 'var(--blue12)',
|
|
620
|
-
red1: 'var(--red1)',
|
|
621
|
-
red2: 'var(--red2)',
|
|
622
|
-
red3: 'var(--red3)',
|
|
623
|
-
red4: 'var(--red4)',
|
|
624
|
-
red5: 'var(--red5)',
|
|
625
|
-
red6: 'var(--red6)',
|
|
626
|
-
red7: 'var(--red7)',
|
|
627
|
-
red8: 'var(--red8)',
|
|
628
|
-
red9: 'var(--red9)',
|
|
629
|
-
red10: 'var(--red10)',
|
|
630
|
-
red11: 'var(--red11)',
|
|
631
|
-
red12: 'var(--red12)',
|
|
632
|
-
gray1: 'var(--slate1)',
|
|
633
|
-
gray2: 'var(--slate2)',
|
|
634
|
-
gray3: 'var(--slate3)',
|
|
635
|
-
gray4: 'var(--slate4)',
|
|
636
|
-
gray5: 'var(--slate5)',
|
|
637
|
-
gray6: 'var(--slate6)',
|
|
638
|
-
gray7: 'var(--slate7)',
|
|
639
|
-
gray8: 'var(--slate8)',
|
|
640
|
-
gray9: 'var(--slate9)',
|
|
641
|
-
gray10: 'var(--slate10)',
|
|
642
|
-
gray11: 'var(--slate11)',
|
|
643
|
-
gray12: 'var(--slate12)'
|
|
644
|
-
}
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
648
|
-
var baseFontSize = 16;
|
|
649
|
-
function round(value) {
|
|
650
|
-
return value
|
|
651
|
-
.toFixed(7)
|
|
652
|
-
.replace(/(\.[0-9]+?)0+$/, '$1') // remove trailing zeroes after decimals
|
|
653
|
-
.replace(/\.0$/, ''); // remove any remaining zeroes
|
|
654
|
-
}
|
|
655
|
-
function rem(px) {
|
|
656
|
-
return "".concat(round(px / baseFontSize), "rem");
|
|
657
|
-
}
|
|
658
|
-
var fontSizes = {
|
|
659
|
-
61: {
|
|
660
|
-
fontSize: rem(61),
|
|
661
|
-
lineHeight: round(73 / 61),
|
|
662
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
663
|
-
},
|
|
664
|
-
53: {
|
|
665
|
-
fontSize: rem(53),
|
|
666
|
-
lineHeight: round(64 / 53),
|
|
667
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
668
|
-
},
|
|
669
|
-
49: {
|
|
670
|
-
fontSize: rem(49),
|
|
671
|
-
lineHeight: round(59 / 49),
|
|
672
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
673
|
-
},
|
|
674
|
-
46: {
|
|
675
|
-
fontSize: rem(46),
|
|
676
|
-
lineHeight: round(55 / 46),
|
|
677
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
678
|
-
},
|
|
679
|
-
43: {
|
|
680
|
-
fontSize: rem(43),
|
|
681
|
-
lineHeight: round(52 / 43),
|
|
682
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
683
|
-
},
|
|
684
|
-
39: {
|
|
685
|
-
fontSize: rem(39),
|
|
686
|
-
lineHeight: round(51 / 39),
|
|
687
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
688
|
-
},
|
|
689
|
-
37: {
|
|
690
|
-
fontSize: rem(37),
|
|
691
|
-
lineHeight: round(48 / 37),
|
|
692
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
693
|
-
},
|
|
694
|
-
34: {
|
|
695
|
-
fontSize: rem(34),
|
|
696
|
-
lineHeight: round(44 / 34),
|
|
697
|
-
letterSpacing: rem(-0.022 * baseFontSize)
|
|
698
|
-
},
|
|
699
|
-
31: {
|
|
700
|
-
fontSize: rem(31),
|
|
701
|
-
lineHeight: round(40 / 31),
|
|
702
|
-
letterSpacing: rem(-0.021 * baseFontSize)
|
|
703
|
-
},
|
|
704
|
-
29: {
|
|
705
|
-
fontSize: rem(29),
|
|
706
|
-
lineHeight: round(38 / 29),
|
|
707
|
-
letterSpacing: rem(-0.021 * baseFontSize)
|
|
708
|
-
},
|
|
709
|
-
27: {
|
|
710
|
-
fontSize: rem(27),
|
|
711
|
-
lineHeight: round(36 / 27),
|
|
712
|
-
letterSpacing: rem(-0.021 * baseFontSize)
|
|
713
|
-
},
|
|
714
|
-
25: {
|
|
715
|
-
fontSize: rem(25),
|
|
716
|
-
lineHeight: round(35 / 25),
|
|
717
|
-
letterSpacing: rem(-0.021 * baseFontSize)
|
|
718
|
-
},
|
|
719
|
-
23: {
|
|
720
|
-
fontSize: rem(23),
|
|
721
|
-
lineHeight: round(32 / 23),
|
|
722
|
-
letterSpacing: rem(-0.019 * baseFontSize)
|
|
723
|
-
},
|
|
724
|
-
22: {
|
|
725
|
-
fontSize: rem(22),
|
|
726
|
-
lineHeight: round(31 / 22),
|
|
727
|
-
letterSpacing: rem(-0.018 * baseFontSize)
|
|
728
|
-
},
|
|
729
|
-
20: {
|
|
730
|
-
fontSize: rem(20),
|
|
731
|
-
lineHeight: round(30 / 20),
|
|
732
|
-
letterSpacing: rem(-0.017 * baseFontSize)
|
|
733
|
-
},
|
|
734
|
-
19: {
|
|
735
|
-
fontSize: rem(19),
|
|
736
|
-
lineHeight: round(29 / 19),
|
|
737
|
-
letterSpacing: rem(-0.015 * baseFontSize)
|
|
738
|
-
},
|
|
739
|
-
18: {
|
|
740
|
-
fontSize: rem(18),
|
|
741
|
-
lineHeight: round(28 / 18),
|
|
742
|
-
letterSpacing: rem(-0.014 * baseFontSize)
|
|
743
|
-
},
|
|
744
|
-
16: {
|
|
745
|
-
fontSize: rem(16),
|
|
746
|
-
lineHeight: round(26 / 16),
|
|
747
|
-
letterSpacing: rem(-0.011 * baseFontSize)
|
|
748
|
-
},
|
|
749
|
-
15: {
|
|
750
|
-
fontSize: rem(15),
|
|
751
|
-
lineHeight: round(24 / 15),
|
|
752
|
-
letterSpacing: rem(-0.009 * baseFontSize)
|
|
753
|
-
},
|
|
754
|
-
14: {
|
|
755
|
-
fontSize: rem(14),
|
|
756
|
-
lineHeight: round(22 / 14),
|
|
757
|
-
letterSpacing: rem(-0.006 * baseFontSize)
|
|
758
|
-
},
|
|
759
|
-
13: {
|
|
760
|
-
fontSize: rem(13),
|
|
761
|
-
lineHeight: round(21 / 13),
|
|
762
|
-
letterSpacing: rem(-0.003 * baseFontSize)
|
|
763
|
-
},
|
|
764
|
-
12: { fontSize: rem(12), lineHeight: round(19 / 12) }
|
|
765
|
-
};
|
|
766
|
-
var headers = {
|
|
767
|
-
xl: {
|
|
768
|
-
huge: __assign(__assign({ fontWeight: 900 }, fontSizes[61]), (_a = {}, _a["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[53], _a["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[46], _a)),
|
|
769
|
-
h1: __assign(__assign({ fontWeight: 600 }, fontSizes[49]), (_b = {}, _b["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[43], _b["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[37], _b)),
|
|
770
|
-
h2: __assign(__assign({ fontWeight: 600 }, fontSizes[39]), (_c = {}, _c["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[34], _c["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[29], _c)),
|
|
771
|
-
h3: __assign(__assign({ fontWeight: 600 }, fontSizes[31]), (_d = {}, _d["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[27], _d["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[23], _d)),
|
|
772
|
-
h4: __assign(__assign({ fontWeight: 500 }, fontSizes[25]), (_e = {}, _e["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[22], _e["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[19], _e)),
|
|
773
|
-
h5: __assign(__assign({ fontWeight: 500 }, fontSizes[20]), (_f = {}, _f["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[18], _f["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[16], _f)),
|
|
774
|
-
h6: __assign({ fontWeight: 500 }, fontSizes[16])
|
|
775
|
-
},
|
|
776
|
-
"default": {
|
|
777
|
-
huge: __assign(__assign({ fontWeight: 900 }, fontSizes[39]), (_g = {}, _g["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[34], _g["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[29], _g)),
|
|
778
|
-
h1: __assign(__assign({ fontWeight: 600 }, fontSizes[31]), (_h = {}, _h["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[27], _h["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[23], _h)),
|
|
779
|
-
h2: __assign(__assign({ fontWeight: 600 }, fontSizes[25]), (_j = {}, _j["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[22], _j["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[19], _j)),
|
|
780
|
-
h3: __assign(__assign({ fontWeight: 600 }, fontSizes[20]), (_k = {}, _k["@media (max-width: ".concat(styleguideBase.breakpoints.medium, "px)")] = fontSizes[18], _k["@media (max-width: ".concat(styleguideBase.breakpoints.small, "px)")] = fontSizes[16], _k)),
|
|
781
|
-
h4: __assign({ fontWeight: 600 }, fontSizes[16]),
|
|
782
|
-
h5: __assign({ fontWeight: 600 }, fontSizes[13]),
|
|
783
|
-
h6: __assign({ fontWeight: 600 }, fontSizes[12])
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
var baseStyle = __assign({ fontWeight: 400 }, fontSizes[16]);
|
|
787
|
-
var body = {
|
|
788
|
-
headline: __assign({ fontWeight: 500 }, fontSizes[16]),
|
|
789
|
-
paragraph: baseStyle,
|
|
790
|
-
label: __assign({ fontWeight: 500 }, fontSizes[15]),
|
|
791
|
-
callout: __assign({ fontWeight: 400 }, fontSizes[14]),
|
|
792
|
-
footnote: __assign({ fontWeight: 400 }, fontSizes[13]),
|
|
793
|
-
caption: __assign({ fontWeight: 400 }, fontSizes[12]),
|
|
794
|
-
code: __assign({ fontWeight: 400 }, fontSizes[13]),
|
|
795
|
-
ul: {
|
|
796
|
-
marginLeft: '1.5rem',
|
|
797
|
-
'ol, ul': {
|
|
798
|
-
marginTop: '0.5rem',
|
|
799
|
-
marginBottom: '1rem'
|
|
800
|
-
}
|
|
801
|
-
},
|
|
802
|
-
ol: {
|
|
803
|
-
marginLeft: '1.5rem',
|
|
804
|
-
'ol, ul': {
|
|
805
|
-
marginTop: '0.5rem',
|
|
806
|
-
marginBottom: '1rem'
|
|
807
|
-
}
|
|
808
|
-
},
|
|
809
|
-
li: __assign(__assign({}, baseStyle), { marginBottom: '0.5rem' }),
|
|
810
|
-
blockquote: __assign(__assign({}, baseStyle), { color: theme.text.secondary, paddingLeft: styleguideBase.spacing[4], borderLeft: "".concat(styleguideBase.spacing[1], "px solid ").concat(theme.border["default"]) })
|
|
811
|
-
};
|
|
812
|
-
var utility = {
|
|
813
|
-
anchor: {
|
|
814
|
-
color: theme.text.link,
|
|
815
|
-
fontWeight: 400,
|
|
816
|
-
textDecoration: 'none',
|
|
817
|
-
cursor: 'pointer',
|
|
818
|
-
transition: '200ms',
|
|
819
|
-
// transform prevents a 1px shift on hover on Safari
|
|
820
|
-
transform: 'translate3d(0,0,0)',
|
|
821
|
-
':visited': {
|
|
822
|
-
color: theme.text.link
|
|
823
|
-
},
|
|
824
|
-
':hover': {
|
|
825
|
-
opacity: 0.8
|
|
826
|
-
}
|
|
827
|
-
},
|
|
828
|
-
inlineCode: __assign(__assign({}, body.code), { display: 'inline-block', backgroundColor: theme.background.subtle, border: "1px solid ".concat(theme.border["default"]), borderRadius: styleguideBase.borderRadius.md, padding: '2px 4px', lineHeight: '130%' }),
|
|
829
|
-
terminalCode: __assign(__assign({}, body.code), { display: 'inline-block', backgroundColor: styleguideBase.darkTheme.background.subtle, color: styleguideBase.darkTheme.text["default"], border: "1px solid ".concat(styleguideBase.darkTheme.border["default"]), borderRadius: styleguideBase.borderRadius.md, padding: '2px 4px', lineHeight: '130%' }),
|
|
830
|
-
pre: __assign(__assign({}, body.code), { backgroundColor: theme.background.subtle, borderRadius: styleguideBase.borderRadius.md, border: "1px solid ".concat(theme.border["default"]), padding: styleguideBase.spacing[4], whiteSpace: 'pre-wrap', margin: "".concat(styleguideBase.spacing[4], "px 0") }),
|
|
831
|
-
terminalPre: __assign(__assign({}, body.code), { backgroundColor: styleguideBase.darkTheme.background.subtle, color: styleguideBase.darkTheme.text["default"], borderRadius: styleguideBase.borderRadius.md, border: "1px solid ".concat(styleguideBase.darkTheme.border["default"]), padding: styleguideBase.spacing[4], margin: "".concat(styleguideBase.spacing[4], "px 0"), whiteSpace: 'pre-wrap', '&:before': {
|
|
832
|
-
content: '"➜ "'
|
|
833
|
-
} }),
|
|
834
|
-
hr: {
|
|
835
|
-
backgroundColor: theme.border["default"],
|
|
836
|
-
border: 0,
|
|
837
|
-
height: 1,
|
|
838
|
-
display: 'block',
|
|
839
|
-
width: '100%'
|
|
840
|
-
},
|
|
841
|
-
weight: {
|
|
842
|
-
black: {
|
|
843
|
-
fontWeight: 900
|
|
844
|
-
},
|
|
845
|
-
semiBold: {
|
|
846
|
-
fontWeight: 600
|
|
847
|
-
},
|
|
848
|
-
medium: {
|
|
849
|
-
fontWeight: 500
|
|
850
|
-
},
|
|
851
|
-
regular: {
|
|
852
|
-
fontWeight: 400
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
};
|
|
856
|
-
var typography = {
|
|
857
|
-
baseFontSize: baseFontSize,
|
|
858
|
-
headers: headers,
|
|
859
|
-
body: body,
|
|
860
|
-
utility: utility,
|
|
861
|
-
fontSizes: fontSizes
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
exports.BlockingSetInitialColorMode = BlockingSetInitialColorMode;
|
|
865
|
-
exports.Button = Button;
|
|
866
|
-
exports.ButtonBase = ButtonBase;
|
|
867
|
-
exports.DocsLogo = DocsLogo;
|
|
868
|
-
exports.ExpoGoLogo = ExpoGoLogo;
|
|
869
|
-
exports.Link = Link;
|
|
870
|
-
exports.LinkBase = LinkBase;
|
|
871
|
-
exports.Logo = Logo;
|
|
872
|
-
exports.SnackLogo = SnackLogo;
|
|
873
|
-
exports.ThemeProvider = ThemeProvider;
|
|
874
|
-
exports.WordMarkLogo = WordMarkLogo;
|
|
875
|
-
exports.getInitialColorMode = getInitialColorMode;
|
|
876
|
-
exports.isLocalStorageAvailable = isLocalStorageAvailable;
|
|
877
|
-
exports.mergeClasses = mergeClasses;
|
|
878
|
-
exports.shadows = shadows;
|
|
879
|
-
exports.theme = theme;
|
|
880
|
-
exports.typography = typography;
|
|
881
|
-
exports.useTheme = useTheme;
|
|
1
|
+
"use strict";var e=require("react"),t=require("tailwind-merge"),r=require("next/link"),a=require("@expo/styleguide-base");function o(){try{return!(!window.localStorage||void 0===window.localStorage)&&(window.localStorage.setItem("localStorage:test","value"),"value"===window.localStorage.getItem("localStorage:test")&&(window.localStorage.removeItem("localStorage:test"),!0))}catch(e){return!1}}function n(){if(o()){var e=window.localStorage.getItem("data-expo-theme");if("string"==typeof e)return e}var t=window.matchMedia("(prefers-color-scheme: dark)");return"boolean"==typeof t.matches&&t.matches?"dark":"light"}var i,l="(function() {\n ".concat(o.toString(),"\n ").concat(n.toString(),"\n ").concat(function(){"dark"===n()?document.documentElement.classList.add("dark-theme"):document.documentElement.classList.remove("dark-theme")}.toString(),"\n setInitialColorMode();\n})()\n");exports.Themes=void 0,(i=exports.Themes||(exports.Themes={})).AUTO="auto",i.DARK="dark",i.LIGHT="light";var d=e.createContext({setDarkMode:function(){},setLightMode:function(){},setAutoMode:function(){},themeName:exports.Themes.AUTO});var c=function(){return c=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)};function s(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]])}return r}var u=t.extendTailwindMerge({classGroups:{icon:[{icon:["xs","sm","md","lg","xl","2xl"]}]}}),p=e.forwardRef((function(t,r){var a=t.children,o=t.testID,n=t.className,i=t.onClick,l=t.type,d=void 0===l?"button":l,p=t.disabled,m=void 0!==p&&p,b=s(t,["children","testID","className","onClick","type","disabled"]);return e.createElement("button",c({className:u("flex cursor-pointer",n),"data-testid":o,disabled:m,ref:r,type:d,onClick:m?void 0:i},b),a)}));p.displayName="ButtonBase";var m="a an and at but by for in nor of on or out so the to up with yet".split(" ");var b=e.forwardRef((function(t,a){var o=t.children,n=t.testID,i=t.href,l=t.openInNewTab,d=t.onClick,u=t.target,p=t.disabled,m=t.rel,b=s(t,["children","testID","href","openInNewTab","onClick","target","disabled","rel"]);return p?e.createElement("a",c({ref:a,"data-testid":n},b),o):!i||i.startsWith("#")?e.createElement("a",c({href:i,ref:a,onClick:d,"data-testid":n},b),o):e.createElement(r,c({href:i,ref:a,onClick:d,target:l?"_blank":u,rel:l?"noopener noreferrer":m,"data-testid":n},b),o)}));b.displayName="LinkBase";var v=e.forwardRef((function(t,r){var a=t.className,o=t.disabled,n=s(t,["className","disabled"]);return e.createElement(b,c({className:u("text-link transition-opacity",!o&&"hocus:opacity-80",a),ref:r},n))}));function h(t){var r,a,o;return!!e.isValidElement(t)&&(null!==(o=null===(a=null===(r=t.type)||void 0===r?void 0:r.displayName)||void 0===a?void 0:a.endsWith("Icon"))&&void 0!==o&&o)}function x(e,t){return c(c({},e.props),{className:u(t,e.props.className)})}var g=e.forwardRef((function(t,r){var a=t.children,o=t.size,n=void 0===o?"sm":o,i=t.theme,l=void 0===i?"primary":i,d=t.skipCapitalization,v=void 0!==d&&d,g=t.href,y=t.disabled,f=t.className,w=t.leftSlot,k=t.rightSlot,C=t.openInNewTab,L=s(t,["children","size","theme","skipCapitalization","href","disabled","className","leftSlot","rightSlot","openInNewTab"]),S=w&&h(w),z=k&&h(k),T=(S||z)&&u("".concat(function(e){switch(e){case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":case"lg":return"icon-md";case"xl":case"2xl":return"icon-lg"}}(n)),function(e){switch(e){case"primary":return"text-button-primary-icon";case"primary-destructive":return"text-button-primary-destructive-icon";case"secondary":return"text-button-secondary-icon";case"secondary-destructive":return"text-button-secondary-destructive-icon";case"tertiary":return"text-button-tertiary-icon";case"quaternary":return"text-button-quaternary-icon"}}(l),y&&"opacity-60"),N=(w||k)&&!a,E=u("inline-flex border border-solid rounded-md font-medium gap-2 items-center whitespace-nowrap transition",function(e){switch(e){case"xs":return"h-8 px-3 text-3xs";case"sm":return"h-9 px-4 text-xs";case"md":return"h-10 px-4 text-xs";case"lg":return"h-11 px-6 text-base";case"xl":return"h-12 px-6 text-base";case"2xl":return"h-15 px-6 text-lg"}}(n),function(e,t){switch(void 0===t&&(t=!1),e){case"primary":return u("border-button-primary bg-button-primary text-button-primary shadow-xs",!t&&"hocus:bg-button-primary-hover active:scale-98",t&&"bg-button-primary-disabled border-button-primary-disabled text-button-primary-disabled");case"primary-destructive":return u("border-button-primary-destructive bg-button-primary-destructive text-button-primary-destructive shadow-xs",!t&&"hocus:bg-button-primary-destructive-hover active:scale-98",t&&"bg-button-primary-destructive-disabled border-button-primary-destructive-disabled text-button-primary-destructive-disabled");case"secondary":return u("border-button-secondary bg-button-secondary text-button-secondary shadow-xs",!t&&"hocus:bg-button-secondary-hover active:scale-98",t&&"bg-button-secondary-disabled border-button-secondary-disabled text-button-secondary-disabled");case"secondary-destructive":return u("border-button-secondary-destructive bg-button-secondary-destructive text-button-secondary-destructive shadow-xs",!t&&"hocus:bg-button-secondary-destructive-hover active:scale-98",t&&"bg-button-secondary-destructive-disabled border-button-secondary-destructive-disabled text-button-secondary-destructive-disabled");case"tertiary":return u("border-button-tertiary bg-button-tertiary text-button-tertiary shadow-none",!t&&"hocus:bg-button-tertiary-hover active:scale-98",t&&"bg-button-tertiary-disabled border-button-tertiary-disabled text-button-tertiary-disabled");case"quaternary":return u("border-button-quaternary bg-button-quaternary text-button-quaternary shadow-none",!t&&"hocus:bg-button-quaternary-hover active:scale-98",t&&"bg-button-quaternary-disabled border-button-quaternary-disabled text-button-quaternary-disabled")}}(l,y),N&&function(e){switch(e){case"xs":return"px-0 w-8 justify-center items-center";case"sm":return"px-0 w-9 justify-center items-center";case"md":return"px-0 w-10 justify-center items-center";case"lg":return"px-0 w-11 justify-center items-center";case"xl":return"px-0 w-12 justify-center items-center";case"2xl":return"px-0 w-15 justify-center items-center"}}(n),y&&"cursor-default opacity-80 pointer-event-none",f),M=e.createElement(e.Fragment,null,S?e.cloneElement(w,x(w,T)):w,a&&e.createElement("span",{className:u("flex self-center text-inherit leading-none",g&&"select-none")},"string"!=typeof a||v?a:function(e,t){var r;if(void 0===t&&(t={}),!e)return"";var a=null!==(r=t.stopwords)&&void 0!==r?r:m,o=t.keepSpaces;return e.split(/(\s+|[-‑–—,:;!?()])/).map((function(e,t,r){if(t%2)return/\s+/.test(e)?o?e:" ":e;var n,i=e.toLocaleLowerCase();return 0!==t&&t!==r.length-1&&a.includes(i)?i:(n=e).charAt(0).toUpperCase()+n.slice(1)})).join("")}(a)),z?e.cloneElement(k,x(k,T)):k);return g?e.createElement(b,c({href:g,className:E,disabled:y,ref:r,openInNewTab:C},L),M):e.createElement(p,c({className:E,disabled:y,ref:r},L),M)}));g.displayName="Button";var y,f,w,k,C,L,S,z,T,N,E={background:{default:"var(--expo-theme-background-default)",screen:"var(--expo-theme-background-screen)",subtle:"var(--expo-theme-background-subtle)",element:"var(--expo-theme-background-element)",hover:"var(--expo-theme-background-hover)",selected:"var(--expo-theme-background-selected)",overlay:"var(--expo-theme-background-overlay)",success:"var(--expo-theme-background-success)",warning:"var(--expo-theme-background-warning)",danger:"var(--expo-theme-background-danger)",info:"var(--expo-theme-background-info)"},icon:{default:"var(--expo-theme-icon-default)",secondary:"var(--expo-theme-icon-secondary)",tertiary:"var(--expo-theme-icon-tertiary)",quaternary:"var(--expo-theme-icon-quaternary)",success:"var(--expo-theme-icon-success)",warning:"var(--expo-theme-icon-warning)",danger:"var(--expo-theme-icon-danger)",info:"var(--expo-theme-icon-info)"},text:{default:"var(--expo-theme-text-default)",secondary:"var(--expo-theme-text-secondary)",tertiary:"var(--expo-theme-text-tertiary)",quaternary:"var(--expo-theme-text-quaternary)",link:"var(--expo-theme-text-link)",success:"var(--expo-theme-text-success)",warning:"var(--expo-theme-text-warning)",danger:"var(--expo-theme-text-danger)",info:"var(--expo-theme-text-info)"},border:{default:"var(--expo-theme-border-default)",secondary:"var(--expo-theme-border-secondary)",success:"var(--expo-theme-border-success)",warning:"var(--expo-theme-border-warning)",danger:"var(--expo-theme-border-danger)",info:"var(--expo-theme-border-info)"},button:{primary:{background:"var(--expo-theme-button-primary-background)",border:"var(--expo-theme-button-primary-border)",hover:"var(--expo-theme-button-primary-hover)",icon:"var(--expo-theme-button-primary-icon)",text:"var(--expo-theme-button-primary-text)",disabled:{background:"var(--expo-theme-button-primary-disabled-background)",border:"var(--expo-theme-button-primary-disabled-border)",text:"var(--expo-theme-button-primary-disabled-text)"},destructive:{background:"var(--expo-theme-button-primary-destructive-background)",border:"var(--expo-theme-button-primary-destructive-border)",hover:"var(--expo-theme-button-primary-destructive-hover)",icon:"var(--expo-theme-button-primary-destructive-icon)",text:"var(--expo-theme-button-primary-destructive-text)",disabled:{background:"var(--expo-theme-button-primary-destructive-disabled-background)",border:"var(--expo-theme-button-primary-destructive-disabled-border)",text:"var(--expo-theme-button-primary-destructive-disabled-text)"}}},secondary:{background:"var(--expo-theme-button-secondary-background)",border:"var(--expo-theme-button-secondary-border)",hover:"var(--expo-theme-button-secondary-hover)",icon:"var(--expo-theme-button-secondary-icon)",text:"var(--expo-theme-button-secondary-text)",disabled:{background:"var(--expo-theme-button-secondary-disabled-background)",border:"var(--expo-theme-button-secondary-disabled-border)",text:"var(--expo-theme-button-secondary-disabled-text)"},destructive:{background:"var(--expo-theme-button-secondary-destructive-background)",border:"var(--expo-theme-button-secondary-destructive-border)",hover:"var(--expo-theme-button-secondary-destructive-hover)",icon:"var(--expo-theme-button-secondary-destructive-icon)",text:"var(--expo-theme-button-secondary-destructive-text)",disabled:{background:"var(--expo-theme-button-secondary-destructive-disabled-background)",border:"var(--expo-theme-button-secondary-destructive-disabled-border)",text:"var(--expo-theme-button-secondary-destructive-disabled-text)"}}},tertiary:{background:"var(--expo-theme-button-tertiary-background)",border:"var(--expo-theme-button-tertiary-border)",hover:"var(--expo-theme-button-tertiary-hover)",icon:"var(--expo-theme-button-tertiary-icon)",text:"var(--expo-theme-button-tertiary-text)",disabled:{background:"var(--expo-theme-button-tertiary-disabled-background)",border:"var(--expo-theme-button-tertiary-disabled-border)",text:"var(--expo-theme-button-tertiary-disabled-text)"}},quaternary:{background:"var(--expo-theme-button-quaternary-background)",border:"var(--expo-theme-button-quaternary-border)",hover:"var(--expo-theme-button-quaternary-hover)",icon:"var(--expo-theme-button-quaternary-icon)",text:"var(--expo-theme-button-quaternary-text)",disabled:{background:"var(--expo-theme-button-quaternary-disabled-background)",border:"var(--expo-theme-button-quaternary-disabled-border)",text:"var(--expo-theme-button-quaternary-disabled-text)"}}},palette:{white:"var(--expo-color-white)",black:"var(--expo-color-black)",green1:"var(--green1)",green2:"var(--green2)",green3:"var(--green3)",green4:"var(--green4)",green5:"var(--green5)",green6:"var(--green6)",green7:"var(--green7)",green8:"var(--green8)",green9:"var(--green9)",green10:"var(--green10)",green11:"var(--green11)",green12:"var(--green12)",purple1:"var(--purple1)",purple2:"var(--purple2)",purple3:"var(--purple3)",purple4:"var(--purple4)",purple5:"var(--purple5)",purple6:"var(--purple6)",purple7:"var(--purple7)",purple8:"var(--purple8)",purple9:"var(--purple9)",purple10:"var(--purple10)",purple11:"var(--purple11)",purple12:"var(--purple12)",pink1:"var(--pink1)",pink2:"var(--pink2)",pink3:"var(--pink3)",pink4:"var(--pink4)",pink5:"var(--pink5)",pink6:"var(--pink6)",pink7:"var(--pink7)",pink8:"var(--pink8)",pink9:"var(--pink9)",pink10:"var(--pink10)",pink11:"var(--pink11)",pink12:"var(--pink12)",orange1:"var(--orange1)",orange2:"var(--orange2)",orange3:"var(--orange3)",orange4:"var(--orange4)",orange5:"var(--orange5)",orange6:"var(--orange6)",orange7:"var(--orange7)",orange8:"var(--orange8)",orange9:"var(--orange9)",orange10:"var(--orange10)",orange11:"var(--orange11)",orange12:"var(--orange12)",yellow1:"var(--yellow1)",yellow2:"var(--yellow2)",yellow3:"var(--yellow3)",yellow4:"var(--yellow4)",yellow5:"var(--yellow5)",yellow6:"var(--yellow6)",yellow7:"var(--yellow7)",yellow8:"var(--yellow8)",yellow9:"var(--yellow9)",yellow10:"var(--yellow10)",yellow11:"var(--yellow11)",yellow12:"var(--yellow12)",blue1:"var(--blue1)",blue2:"var(--blue2)",blue3:"var(--blue3)",blue4:"var(--blue4)",blue5:"var(--blue5)",blue6:"var(--blue6)",blue7:"var(--blue7)",blue8:"var(--blue8)",blue9:"var(--blue9)",blue10:"var(--blue10)",blue11:"var(--blue11)",blue12:"var(--blue12)",red1:"var(--red1)",red2:"var(--red2)",red3:"var(--red3)",red4:"var(--red4)",red5:"var(--red5)",red6:"var(--red6)",red7:"var(--red7)",red8:"var(--red8)",red9:"var(--red9)",red10:"var(--red10)",red11:"var(--red11)",red12:"var(--red12)",gray1:"var(--slate1)",gray2:"var(--slate2)",gray3:"var(--slate3)",gray4:"var(--slate4)",gray5:"var(--slate5)",gray6:"var(--slate6)",gray7:"var(--slate7)",gray8:"var(--slate8)",gray9:"var(--slate9)",gray10:"var(--slate10)",gray11:"var(--slate11)",gray12:"var(--slate12)"}},M=16;function H(e){return e.toFixed(7).replace(/(\.[0-9]+?)0+$/,"$1").replace(/\.0$/,"")}function I(e){return"".concat(H(e/M),"rem")}var R={61:{fontSize:I(61),lineHeight:H(73/61),letterSpacing:I(-.352)},53:{fontSize:I(53),lineHeight:H(64/53),letterSpacing:I(-.352)},49:{fontSize:I(49),lineHeight:H(59/49),letterSpacing:I(-.352)},46:{fontSize:I(46),lineHeight:H(55/46),letterSpacing:I(-.352)},43:{fontSize:I(43),lineHeight:H(52/43),letterSpacing:I(-.352)},39:{fontSize:I(39),lineHeight:H(51/39),letterSpacing:I(-.352)},37:{fontSize:I(37),lineHeight:H(48/37),letterSpacing:I(-.352)},34:{fontSize:I(34),lineHeight:H(44/34),letterSpacing:I(-.352)},31:{fontSize:I(31),lineHeight:H(40/31),letterSpacing:I(-.336)},29:{fontSize:I(29),lineHeight:H(38/29),letterSpacing:I(-.336)},27:{fontSize:I(27),lineHeight:H(36/27),letterSpacing:I(-.336)},25:{fontSize:I(25),lineHeight:H(1.4),letterSpacing:I(-.336)},23:{fontSize:I(23),lineHeight:H(32/23),letterSpacing:I(-.304)},22:{fontSize:I(22),lineHeight:H(31/22),letterSpacing:I(-.288)},20:{fontSize:I(20),lineHeight:H(1.5),letterSpacing:I(-.272)},19:{fontSize:I(19),lineHeight:H(29/19),letterSpacing:I(-.24)},18:{fontSize:I(18),lineHeight:H(28/18),letterSpacing:I(-.224)},16:{fontSize:I(16),lineHeight:H(1.625),letterSpacing:I(-.176)},15:{fontSize:I(15),lineHeight:H(1.6),letterSpacing:I(-.144)},14:{fontSize:I(14),lineHeight:H(22/14),letterSpacing:I(-.096)},13:{fontSize:I(13),lineHeight:H(21/13),letterSpacing:I(-.048)},12:{fontSize:I(12),lineHeight:H(19/12)}},W={xl:{huge:c(c({fontWeight:900},R[61]),(y={},y["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[53],y["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[46],y)),h1:c(c({fontWeight:600},R[49]),(f={},f["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[43],f["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[37],f)),h2:c(c({fontWeight:600},R[39]),(w={},w["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[34],w["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[29],w)),h3:c(c({fontWeight:600},R[31]),(k={},k["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[27],k["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[23],k)),h4:c(c({fontWeight:500},R[25]),(C={},C["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[22],C["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[19],C)),h5:c(c({fontWeight:500},R[20]),(L={},L["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[18],L["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[16],L)),h6:c({fontWeight:500},R[16])},default:{huge:c(c({fontWeight:900},R[39]),(S={},S["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[34],S["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[29],S)),h1:c(c({fontWeight:600},R[31]),(z={},z["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[27],z["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[23],z)),h2:c(c({fontWeight:600},R[25]),(T={},T["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[22],T["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[19],T)),h3:c(c({fontWeight:600},R[20]),(N={},N["@media (max-width: ".concat(a.breakpoints.medium,"px)")]=R[18],N["@media (max-width: ".concat(a.breakpoints.small,"px)")]=R[16],N)),h4:c({fontWeight:600},R[16]),h5:c({fontWeight:600},R[13]),h6:c({fontWeight:600},R[12])}},q=c({fontWeight:400},R[16]),B={headline:c({fontWeight:500},R[16]),paragraph:q,label:c({fontWeight:500},R[15]),callout:c({fontWeight:400},R[14]),footnote:c({fontWeight:400},R[13]),caption:c({fontWeight:400},R[12]),code:c({fontWeight:400},R[13]),ul:{marginLeft:"1.5rem","ol, ul":{marginTop:"0.5rem",marginBottom:"1rem"}},ol:{marginLeft:"1.5rem","ol, ul":{marginTop:"0.5rem",marginBottom:"1rem"}},li:c(c({},q),{marginBottom:"0.5rem"}),blockquote:c(c({},q),{color:E.text.secondary,paddingLeft:a.spacing[4],borderLeft:"".concat(a.spacing[1],"px solid ").concat(E.border.default)})},O={anchor:{color:E.text.link,fontWeight:400,textDecoration:"none",cursor:"pointer",transition:"200ms",transform:"translate3d(0,0,0)",":visited":{color:E.text.link},":hover":{opacity:.8}},inlineCode:c(c({},B.code),{display:"inline-block",backgroundColor:E.background.subtle,border:"1px solid ".concat(E.border.default),borderRadius:a.borderRadius.md,padding:"2px 4px",lineHeight:"130%"}),terminalCode:c(c({},B.code),{display:"inline-block",backgroundColor:a.darkTheme.background.subtle,color:a.darkTheme.text.default,border:"1px solid ".concat(a.darkTheme.border.default),borderRadius:a.borderRadius.md,padding:"2px 4px",lineHeight:"130%"}),pre:c(c({},B.code),{backgroundColor:E.background.subtle,borderRadius:a.borderRadius.md,border:"1px solid ".concat(E.border.default),padding:a.spacing[4],whiteSpace:"pre-wrap",margin:"".concat(a.spacing[4],"px 0")}),terminalPre:c(c({},B.code),{backgroundColor:a.darkTheme.background.subtle,color:a.darkTheme.text.default,borderRadius:a.borderRadius.md,border:"1px solid ".concat(a.darkTheme.border.default),padding:a.spacing[4],margin:"".concat(a.spacing[4],"px 0"),whiteSpace:"pre-wrap","&:before":{content:'"➜ "'}}),hr:{backgroundColor:E.border.default,border:0,height:1,display:"block",width:"100%"},weight:{black:{fontWeight:900},semiBold:{fontWeight:600},medium:{fontWeight:500},regular:{fontWeight:400}}},A={baseFontSize:M,headers:W,body:B,utility:O,fontSizes:R};exports.BlockingSetInitialColorMode=function(){return e.createElement("script",{dangerouslySetInnerHTML:{__html:l}})},exports.Button=g,exports.ButtonBase=p,exports.DocsLogo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 20 20",fill:"none",role:"img",className:o},a),e.createElement("path",{d:"M12.07 8a.157.157 0 01.166.015l5.374 4.141a.16.16 0 01.055.168l-.37 1.298a.157.157 0 01-.234.09l-4.416-2.768-.846 5.47a.157.157 0 01-.219.12l-1.158-.518a.157.157 0 01-.093-.154l.477-7.132a.157.157 0 01.085-.129L12.069 8z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.584.02a.157.157 0 00-.157.001L.708 5.071l-.003.001a.157.157 0 00-.079.135V15.31c0 .056.03.108.079.136l1.71.984.004.003a.157.157 0 00.157 0l1.054-.61v1.183c0 .056.03.108.078.136l1.715.987a.157.157 0 00.156 0l.003-.002 2.024-1.172.91 2.934a.157.157 0 00.198.102l1.815-.594a.156.156 0 00.03-.013l8.732-4.666a.157.157 0 00.075-.186L16.06 4.258a.157.157 0 00-.205-.098l-1.473.529v-1.85a.157.157 0 00-.079-.135l-.002-.001-1.713-.986a.157.157 0 00-.156 0l-1.054.61V1.144a.157.157 0 00-.078-.136L9.584.02zM5.33 9.56l-.003-1.578-1.383-.805v9.74l1.4.806-.014-8.119a.156.156 0 010-.045zM.94 5.48l1.384.805.017 9.741-1.4-.806V5.48zm9.968-4.336l-1.4-.806-8.412 4.87 1.385.806 8.427-4.87zM5.483 7.71l8.427-4.87-1.4-.806-8.411 4.87 1.384.806zm5.09 11.313l-3.21-9.971 8.455-4.519 3.21 9.97-8.456 4.52zM5.678 9.678l3.09 9.967 1.514-.496-3.21-9.972-1.394.501z",fill:"currentColor"}))},exports.ExpoGoLogo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 20 20",fill:"none",role:"img",className:o},a),e.createElement("path",{d:"M18.072 7.75a1.749 1.749 0 00-1.56-.732 1.763 1.763 0 00-1.436.946 1.55 1.55 0 00.302 1.75 2.57 2.57 0 001.716-.484 2.53 2.53 0 00.978-1.48zM12.866 1L11.751.394 6.897 3.072l.387.207.736.383 1.332-.733L12.867.987 12.866 1zm.449-.184a.173.173 0 01.124.115l1.626 4.755a.158.158 0 01-.077.207 3.126 3.126 0 00-1.384 1.519 3.09 3.09 0 00-.134 2.042 3.29 3.29 0 001.35 1.793 3.343 3.343 0 002.195.524.208.208 0 01.202.123l1.68 4.88a.196.196 0 01-.078.215l-5.163 2.992a.195.195 0 01-.078.015.208.208 0 01-.14-.022l-1.81-1.129a.18.18 0 01-.078-.076l-3.538-8.065-5.388 3.039a.25.25 0 01-.21.008l-1.224-.69a.177.177 0 01-.077-.23l5.234-9.847c.02-.033.05-.06.085-.076L11.65.023a.2.2 0 01.186 0l1.479.793zM6.843 3.46l-.256-.13-5.044 9.523.92.514 4.352-5.643a.212.212 0 01.178-.077.217.217 0 01.155.115l4.738 10.82 1.266.775L8.066 4.62l-.216-.614-1.014-.552.007.007zm7.804 5.679a1.932 1.932 0 01.092-1.28c.176-.404.484-.737.875-.945a2.152 2.152 0 012.509.307 1.934 1.934 0 01.056 2.745l-.056.056a2.118 2.118 0 01-1.986.516 2.118 2.118 0 01-.928-.508 2.091 2.091 0 01-.562-.891z",fill:"currentColor"}))},exports.Link=v,exports.LinkBase=b,exports.Logo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 20 20",fill:"none",role:"img",className:o},a),e.createElement("path",{d:"M9.477 7.638c.164-.24.343-.27.488-.27.145 0 .387.03.551.27 2.13 2.901 6.55 10.56 6.959 10.976.605.618 1.436.233 1.918-.468.475-.69.607-1.174.607-1.69 0-.352-6.883-13.05-7.576-14.106-.667-1.017-.884-1.274-2.025-1.274h-.854c-1.138 0-1.302.257-1.969 1.274C6.883 3.406 0 16.104 0 16.456c0 .517.132 1 .607 1.69.482.7 1.313 1.086 1.918.468.41-.417 4.822-8.075 6.952-10.977z",fill:"currentColor"}))},exports.RouterLogo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 20 20",fill:"none",role:"img",className:o},a),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.51006 18.8434L9.53354 18.4134L9.56067 17.9149C9.70602 17.9228 9.85252 17.9268 10 17.9268C10.1475 17.9268 10.294 17.9228 10.4393 17.9149L10.4665 18.4134L10.4899 18.8434C12.5668 18.7302 14.4532 17.9014 15.9069 16.5994L15.6195 16.2786L15.2864 15.9067C15.5044 15.7115 15.7115 15.5044 15.9067 15.2864L16.2786 15.6195L16.5994 15.9069C17.9014 14.4532 18.7302 12.5668 18.8434 10.4899L18.4134 10.4665L17.9149 10.4393C17.9228 10.294 17.9268 10.1475 17.9268 10C17.9268 9.85252 17.9228 9.70602 17.9149 9.56067L18.4134 9.53354L18.8434 9.51006C18.7302 7.43323 17.9014 5.54683 16.5994 4.09314L16.2786 4.38046L15.9067 4.71354C15.7115 4.49559 15.5044 4.2885 15.2864 4.09328L15.6195 3.7214L15.9069 3.40062C14.4532 2.0986 12.5668 1.26984 10.4899 1.15662L10.4665 1.58662L10.4393 2.08511C10.294 2.07719 10.1475 2.07317 10 2.07317C9.85252 2.07317 9.70602 2.07719 9.56067 2.08511L9.53354 1.58662L9.51006 1.15662C7.43323 1.26984 5.54683 2.0986 4.09315 3.40062L4.38046 3.7214L4.71354 4.09328C4.49559 4.2885 4.2885 4.49559 4.09328 4.71354L3.7214 4.38046L3.40062 4.09315C2.0986 5.54683 1.26984 7.43323 1.15662 9.51006L1.58662 9.53354L2.08511 9.56067C2.07719 9.70602 2.07317 9.85252 2.07317 10C2.07317 10.1475 2.07719 10.294 2.08511 10.4393L1.58662 10.4665L1.15662 10.4899C1.26984 12.5668 2.0986 14.4532 3.40062 15.9069L3.7214 15.6195L4.09328 15.2864C4.2885 15.5044 4.49559 15.7115 4.71354 15.9067L4.38046 16.2786L4.09315 16.5994C5.54683 17.9014 7.43323 18.7302 9.51006 18.8434ZM20 10C20 15.5229 15.5229 20 10 20C4.47715 20 0 15.5229 0 10C0 4.47715 4.47715 0 10 0C15.5229 0 20 4.47715 20 10Z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.14777 10.3622L4.25351 10.0373L4.36101 9.89014C4.4513 9.76651 4.61944 9.59563 4.73245 9.48084C4.8812 9.3297 5.07742 9.13496 5.30312 8.91362C5.75546 8.46994 6.33928 7.9063 6.92723 7.3437C8.07319 6.24703 9.31976 5.07196 9.57814 4.86363L9.57852 4.86336L9.57883 4.8631C9.58828 4.85547 9.59834 4.84736 9.60886 4.83883C9.77654 4.70296 10.0755 4.46077 10.4509 4.35111C10.9203 4.21397 11.3363 4.31708 11.6086 4.39604L11.6264 4.4012L12.0156 4.52791L12.0331 4.53422C12.3001 4.63079 12.697 4.79248 12.9957 5.17984C13.2343 5.48938 13.3333 5.86098 13.3888 6.06927C13.3923 6.0824 13.3956 6.09487 13.3988 6.10665L13.3989 6.10696C13.4868 6.43352 13.8146 8.18115 14.1008 9.77459C14.2475 10.5917 14.3889 11.4 14.4909 12.0152C14.5417 12.3218 14.5838 12.5867 14.6121 12.783C14.6259 12.8795 14.638 12.9701 14.6459 13.0447C14.6496 13.0803 14.6541 13.1276 14.6564 13.1766C14.6575 13.2001 14.6589 13.2404 14.6573 13.2883C14.6572 13.289 14.6572 13.2898 14.6572 13.2909C14.6564 13.3158 14.6525 13.4542 14.6004 13.6142C14.4473 14.0847 14.1704 14.4484 13.7328 14.785L13.7326 14.7851L13.7324 14.7852C13.4428 15.0078 13.0273 15.2071 12.5475 15.2013C11.9922 15.1946 11.4437 14.9025 11.157 14.3211L11.1566 14.3202C11.1032 14.2117 11.0698 14.0985 11.0594 14.0635C11.0589 14.0619 11.0585 14.0604 11.058 14.0591C11.0406 14.0002 11.0223 13.9329 11.0043 13.8638C10.9679 13.7241 10.9239 13.5431 10.8749 13.3377C10.8185 13.1007 10.7521 12.8164 10.6802 12.5083C10.6282 12.2853 10.5733 12.0498 10.517 11.8108C10.3651 11.1648 10.2034 10.4912 10.0513 9.90165C9.58127 10.2887 9.05413 10.7382 8.55108 11.1709C8.36495 11.3311 8.18195 11.4891 8.00855 11.6388C7.76915 11.8454 7.54816 12.0362 7.363 12.1946C7.20255 12.3318 7.06034 12.4523 6.94877 12.5437C6.89353 12.589 6.83913 12.6327 6.79033 12.67C6.78925 12.6709 6.78803 12.6718 6.78665 12.6728C6.75768 12.695 6.66397 12.7668 6.55695 12.8231L6.5561 12.8235C5.98215 13.1248 5.36684 13.0381 4.91395 12.7167C4.52261 12.4389 4.30403 12.0333 4.20092 11.6828L4.20078 11.6824C4.07271 11.2463 4.03529 10.8352 4.13703 10.4074L4.14777 10.3622ZM9.71351 8.70279C9.71358 8.70272 9.71366 8.70272 9.71366 8.70264C9.72136 8.69647 9.72905 8.69037 9.73668 8.68427C9.75207 8.67192 9.76747 8.65965 9.78271 8.64753C9.99986 8.47452 10.1986 8.32154 10.3689 8.19852C10.4041 8.172 10.4453 8.15432 10.4889 8.14708C10.5325 8.13984 10.5771 8.14327 10.6192 8.15691C10.6612 8.17063 10.6993 8.19418 10.7304 8.22566C10.7613 8.25721 10.7842 8.2957 10.797 8.33785C10.8623 8.53755 10.9329 8.77825 11.0067 9.04593C11.0119 9.06468 11.0171 9.08366 11.0223 9.10272C11.0249 9.11209 11.0275 9.12162 11.03 9.13107C11.03 9.13115 11.03 9.13122 11.03 9.1313C11.2833 10.0616 11.5694 11.2874 11.7947 12.2532C11.9891 13.0862 12.1384 13.7258 12.1825 13.8154C12.3486 14.1525 12.7422 14.1043 13.0357 13.8787C13.3243 13.6568 13.4435 13.4744 13.5132 13.2603C13.5607 13.1146 12.4379 6.93503 12.2949 6.40437C12.1574 5.89438 12.1035 5.77547 11.6442 5.60933L11.2901 5.49409C10.8211 5.35805 10.7076 5.42211 10.2957 5.75366C9.877 6.09129 5.51013 10.2552 5.28426 10.5645L5.24931 10.6718C5.20506 10.8579 5.20989 11.0611 5.29773 11.3601C5.40221 11.7152 5.69205 11.9859 6.02474 11.8112C6.11321 11.7647 6.61032 11.3355 7.25778 10.7765C8.00848 10.1284 8.96122 9.30577 9.71351 8.70279Z",fill:"currentColor"}))},exports.SnackLogo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 20 20",fill:"none",role:"img",className:o},a),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.168 1.152a2.752 2.752 0 100 5.504 2.752 2.752 0 000-5.504zm-2.43 2.752a2.429 2.429 0 014.608-1.075 3.805 3.805 0 01-3.701 2.925h-.051a2.423 2.423 0 01-.855-1.85zm-1.755-1.422a.16.16 0 01.081.14v4.825L17.23 9.86c.05.029.081.082.082.14l.026 4.92a.16.16 0 01-.081.14l-8.52 4.92a.161.161 0 01-.242-.14V10c0-.057.03-.11.08-.14l4.006-2.319-4.005-2.32a.161.161 0 010-.28l4.246-2.458a.161.161 0 01.162 0zm3.845 7.517L13.064 7.82v4.36L16.828 10zM8.978 5.08l3.764 2.18V2.901l-3.763 2.18z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.75.022a.161.161 0 00-.162 0l-4.242 2.46a.16.16 0 00-.019.01L.11 4.94l-.003.001a.161.161 0 00-.081.136v.004l-.013 4.994a.161.161 0 000 .125L0 14.92c0 .058.03.111.08.14l4.24 2.455.03.018 4.226 2.446a.161.161 0 00.242-.14v-9.746l4.166-2.412a.162.162 0 000-.28l-.081-.046V2.808l.08-.047a.162.162 0 000-.28L8.75.022zm3.828 2.597L8.67.35 4.74 2.626l3.917 2.267 3.922-2.275zM8.656 5.268L4.74 7.538l3.916 2.275L12.58 7.54 8.656 5.268zM4.419 7.352l3.915-2.27-3.916-2.268L.508 5.08 4.42 7.35zm-.165.277v4.692L.336 10.05l.012-4.69 3.906 2.268zm.323 4.879V7.817l3.918 2.275v4.685l-3.918-2.27zm-.323.186l-3.92-2.27-.01 4.403 3.93 2.276v-4.41zm.323 4.596v-4.41l3.918 2.27v4.408L4.577 17.29z",fill:"currentColor"}))},exports.ThemeProvider=function(t){var r=t.children,a=t.disabled,i=void 0!==a&&a,l=process.browser?document.documentElement.dataset.expoTheme:exports.Themes.AUTO,c=e.useState(i?exports.Themes.LIGHT:l),s=c[0],u=c[1];function p(e){i||(e===exports.Themes.DARK?document.documentElement.classList.add("dark-theme"):document.documentElement.classList.remove("dark-theme"))}function m(e){o()?window.localStorage.getItem("data-expo-theme")||(e.matches?p(exports.Themes.DARK):p(exports.Themes.LIGHT)):p(exports.Themes.AUTO)}return e.useEffect((function(){if(!i){var e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",m)}catch(t){e.addListener(m)}if(o()){var t=window.localStorage.getItem("data-expo-theme");t===exports.Themes.LIGHT||t===exports.Themes.DARK?u(t):u(exports.Themes.AUTO)}else u(exports.Themes.AUTO);return function(){try{e.removeEventListener("change",m)}catch(t){e.removeListener(m)}}}}),[]),e.createElement(d.Provider,{value:{setDarkMode:function(){o()&&window.localStorage.setItem("data-expo-theme",exports.Themes.DARK),p(exports.Themes.DARK),u(exports.Themes.DARK)},setLightMode:function(){o()&&window.localStorage.setItem("data-expo-theme",exports.Themes.LIGHT),p(exports.Themes.LIGHT),u(exports.Themes.LIGHT)},setAutoMode:function(){o()&&window.localStorage.removeItem("data-expo-theme"),p(n()),u(exports.Themes.AUTO)},themeName:s}},r)},exports.WordMarkLogo=function(t){var r=t.className,a=s(t,["className"]),o=u("icon-md text-icon-default",r);return e.createElement("svg",c({viewBox:"0 0 71 20",fill:"none",role:"img",className:o},a),e.createElement("path",{d:"M9.258 6.342c.158-.23.331-.26.472-.26.14 0 .374.03.532.26 2.06 2.806 6.332 10.208 6.727 10.611.585.597 1.388.225 1.854-.452.46-.667.587-1.135.587-1.634 0-.34-6.653-12.614-7.324-13.636C11.462.248 11.252 0 10.15 0h-.825c-1.1 0-1.259.248-1.903 1.23C6.75 2.254.097 14.528.097 14.868c0 .5.127.967.587 1.634.466.677 1.269 1.05 1.854.452.395-.403 4.661-7.805 6.72-10.61zm14.941-5.237v15.344h9.35v-3.113h-6.125v-3.244h5.45V6.98h-5.45V4.218h6.125V1.105h-9.35zM46.25 16.449l-3.88-5.568 3.619-5.195h-3.662L40.54 8.23l-1.765-2.543h-3.706l3.618 5.217-3.857 5.546h3.661l2.027-2.915 2.027 2.915h3.705zm7.572-10.982c-1.482 0-2.637.614-3.378 1.732V5.686H47.37V20h3.073v-5.063c.74 1.117 1.896 1.731 3.378 1.731 2.768 0 4.97-2.52 4.97-5.611 0-3.091-2.202-5.59-4.97-5.59zm-.697 8.242c-1.504 0-2.681-1.14-2.681-2.652 0-1.49 1.177-2.653 2.68-2.653 1.483 0 2.681 1.184 2.681 2.653 0 1.49-1.198 2.652-2.68 2.652zm12.188-8.242c-3.16 0-5.558 2.411-5.558 5.612 0 3.2 2.397 5.59 5.557 5.59 3.139 0 5.558-2.39 5.558-5.59 0-3.2-2.42-5.612-5.558-5.612zm0 2.96c1.438 0 2.55 1.117 2.55 2.652 0 1.49-1.112 2.63-2.55 2.63-1.46 0-2.55-1.14-2.55-2.63 0-1.535 1.09-2.653 2.55-2.653z",fill:"currentColor"}))},exports.getInitialColorMode=n,exports.isLocalStorageAvailable=o,exports.mergeClasses=u,exports.shadows={none:"var(--expo-theme-shadows-none)",xs:"var(--expo-theme-shadows-xs)",sm:"var(--expo-theme-shadows-sm)",md:"var(--expo-theme-shadows-md)",lg:"var(--expo-theme-shadows-lg)",xl:"var(--expo-theme-shadows-xl)"},exports.theme=E,exports.typography=A,exports.useTheme=function(){var t=e.useContext(d);if(void 0===t)throw new Error("useTheme must be used within a ThemeProvider");return t};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/styleguide",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Expo's styleguide components for use on the web.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,27 +28,20 @@
|
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/expo/styleguide/issues"
|
|
30
30
|
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@expo/styleguide-base": "^1.0.1",
|
|
33
|
+
"tailwind-merge": "^1.13.2"
|
|
34
|
+
},
|
|
31
35
|
"devDependencies": {
|
|
32
|
-
"@rollup/plugin-typescript": "^11.0.0",
|
|
33
36
|
"@tailwindcss/typography": "^0.5.9",
|
|
34
|
-
"
|
|
35
|
-
"npm-run-all": "^4.1.5",
|
|
36
|
-
"rimraf": "^4.1.2",
|
|
37
|
-
"rollup": "^3.21.5",
|
|
38
|
-
"rollup-plugin-copy": "^3.4.0",
|
|
39
|
-
"tailwindcss": "^3.3.2",
|
|
40
|
-
"typescript": "^4.9.5"
|
|
37
|
+
"tailwindcss": "^3.3.2"
|
|
41
38
|
},
|
|
42
39
|
"peerDependencies": {
|
|
43
40
|
"next": ">= 13",
|
|
44
41
|
"react": ">= 16"
|
|
45
42
|
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@expo/styleguide-base": "^1.0.0-alpha.3",
|
|
48
|
-
"tailwind-merge": "^1.12.0"
|
|
49
|
-
},
|
|
50
43
|
"eslintConfig": {
|
|
51
44
|
"extends": "universe/web"
|
|
52
45
|
},
|
|
53
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "7931cef5c7f32736a3651f5b8bd64ea97de184fc"
|
|
54
47
|
}
|
package/tailwind.js
CHANGED
|
@@ -102,6 +102,8 @@ const palette = {
|
|
|
102
102
|
};
|
|
103
103
|
|
|
104
104
|
const expoTailwindConfig = {
|
|
105
|
+
safelist: ['icon-md', 'text-icon-default'],
|
|
106
|
+
darkMode: ['class', '[class="dark-theme"]'],
|
|
105
107
|
theme: {
|
|
106
108
|
borderRadius: {
|
|
107
109
|
none: 0,
|
|
@@ -332,6 +334,34 @@ const expoTailwindConfig = {
|
|
|
332
334
|
'xl-gutters': '1248px',
|
|
333
335
|
},
|
|
334
336
|
extend: {
|
|
337
|
+
stroke: {
|
|
338
|
+
'bg-default': 'var(--expo-theme-background-default)',
|
|
339
|
+
'bg-screen': 'var(--expo-theme-background-screen)',
|
|
340
|
+
'bg-subtle': 'var(--expo-theme-background-subtle)',
|
|
341
|
+
'bg-element': 'var(--expo-theme-background-element)',
|
|
342
|
+
'bg-hover': 'var(--expo-theme-background-hover)',
|
|
343
|
+
'bg-selected': 'var(--expo-theme-background-selected)',
|
|
344
|
+
'bg-overlay': 'var(--expo-theme-background-overlay)',
|
|
345
|
+
'bg-success': 'var(--expo-theme-background-success)',
|
|
346
|
+
'bg-warning': 'var(--expo-theme-background-warning)',
|
|
347
|
+
'bg-danger': 'var(--expo-theme-background-danger)',
|
|
348
|
+
'bg-info': 'var(--expo-theme-background-info)',
|
|
349
|
+
},
|
|
350
|
+
backgroundColor: {
|
|
351
|
+
'app-cyan': '#07c0cb',
|
|
352
|
+
'app-light-blue': '#1e92c4',
|
|
353
|
+
'app-dark-blue': '#0b67af',
|
|
354
|
+
'app-indigo': '#4b50b2',
|
|
355
|
+
'app-purple': '#8945a3',
|
|
356
|
+
'app-pink': '#c04891',
|
|
357
|
+
'app-orange': '#e96d3c',
|
|
358
|
+
'app-gold': '#f38f2f',
|
|
359
|
+
'app-yellow': '#eebc01',
|
|
360
|
+
'app-lime': '#aabd04',
|
|
361
|
+
'app-light-green': '#6aa72a',
|
|
362
|
+
'app-dark-green': '#3a8e39',
|
|
363
|
+
transparent: 'transparent',
|
|
364
|
+
},
|
|
335
365
|
height: {
|
|
336
366
|
15: '3.75rem',
|
|
337
367
|
},
|
|
@@ -343,6 +373,9 @@ const expoTailwindConfig = {
|
|
|
343
373
|
},
|
|
344
374
|
scale: {
|
|
345
375
|
98: '.98',
|
|
376
|
+
1025: '1.025',
|
|
377
|
+
175: '1.75',
|
|
378
|
+
200: '2.0',
|
|
346
379
|
},
|
|
347
380
|
gridTemplateColumns: {
|
|
348
381
|
'auto-min-1': 'auto',
|
|
@@ -408,6 +441,12 @@ const expoTailwindConfig = {
|
|
|
408
441
|
height: theme('height.10'),
|
|
409
442
|
width: theme('width.10'),
|
|
410
443
|
},
|
|
444
|
+
'.break-words': { 'word-break': 'break-word' },
|
|
445
|
+
'.pause-animation': { 'animation-play-state': 'paused' },
|
|
446
|
+
'.transform-box': { 'transform-box': 'fill-box' },
|
|
447
|
+
'.backface-hidden': {
|
|
448
|
+
'backface-visibility': 'hidden',
|
|
449
|
+
},
|
|
411
450
|
});
|
|
412
451
|
}),
|
|
413
452
|
require('@tailwindcss/typography'),
|