grep-components 1.17.0 → 1.17.1-grepf-1864.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 +570 -1756
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import LocalizedFormatPlugin from 'dayjs/plugin/localizedFormat';
|
|
|
4
4
|
import isBetweenPlugin from 'dayjs/plugin/isBetween';
|
|
5
5
|
import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey } from '@mui/material/colors';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import React__default, { useContext,
|
|
7
|
+
import React__default, { useRef, useContext, createContext, createElement, Fragment, forwardRef, useMemo as useMemo$1, useState, useCallback as useCallback$1, useEffect, useLayoutEffect } from 'react';
|
|
8
8
|
import AccountCircle from '@mui/icons-material/AccountCircle';
|
|
9
9
|
import ArrowDropdown from '@mui/icons-material/ArrowDropDown';
|
|
10
10
|
import { Button, Box, Typography, IconButton, Menu, MenuItem, Tabs, Tab, Collapse, MenuList, Tooltip, Container, List, ListItem, ListItemText, ListItemIcon, Divider, styled, TableCell, TableRow, TableSortLabel, TableHead, TablePagination, TableContainer, Table, TableBody, TableFooter, CircularProgress, Link, TextField, FormControl, InputLabel, Select, OutlinedInput, Input, Checkbox, FormHelperText, Grid, ToggleButtonGroup, AppBar as AppBar$1, Toolbar as Toolbar$1, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions } from '@mui/material';
|
|
11
|
-
import { useTheme
|
|
11
|
+
import { useTheme } from '@mui/material/styles';
|
|
12
12
|
import { useHistory, NavLink, Prompt } from 'react-router-dom';
|
|
13
13
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
14
14
|
import IconExpand from '@mui/icons-material/ExpandMore';
|
|
@@ -128,27 +128,6 @@ var getExcelDateTime = function (datetime, options) { return parseDate(datetime,
|
|
|
128
128
|
|
|
129
129
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
130
130
|
|
|
131
|
-
function getAugmentedNamespace(n) {
|
|
132
|
-
var f = n.default;
|
|
133
|
-
if (typeof f == "function") {
|
|
134
|
-
var a = function () {
|
|
135
|
-
return f.apply(this, arguments);
|
|
136
|
-
};
|
|
137
|
-
a.prototype = f.prototype;
|
|
138
|
-
} else a = {};
|
|
139
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
140
|
-
Object.keys(n).forEach(function (k) {
|
|
141
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
142
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
143
|
-
enumerable: true,
|
|
144
|
-
get: function () {
|
|
145
|
-
return n[k];
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
return a;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
131
|
var Key_enum = {};
|
|
153
132
|
|
|
154
133
|
(function (exports) {
|
|
@@ -433,16 +412,28 @@ var convertToRgba = function (color, alpha) {
|
|
|
433
412
|
return value ? "rgba(".concat(value, ", ").concat(alpha, ")") : color;
|
|
434
413
|
};
|
|
435
414
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
415
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
416
|
+
const objectFromEntries = !Object
|
|
417
|
+
.fromEntries
|
|
418
|
+
? (entries) => {
|
|
419
|
+
if (!entries || !entries[Symbol.iterator]) {
|
|
420
|
+
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
421
|
+
}
|
|
422
|
+
const o = {};
|
|
423
|
+
Object.keys(entries).forEach(key => {
|
|
424
|
+
const [k, v] = entries[key];
|
|
425
|
+
o[k] = v;
|
|
426
|
+
});
|
|
427
|
+
return o;
|
|
428
|
+
}
|
|
429
|
+
: Object.fromEntries;
|
|
441
430
|
|
|
442
|
-
|
|
431
|
+
/** Object.keys() with types */
|
|
432
|
+
function objectKeys(o) {
|
|
433
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
434
|
+
return Object.keys(o);
|
|
435
|
+
}
|
|
443
436
|
|
|
444
|
-
Object.defineProperty(assert$1, "__esModule", { value: true });
|
|
445
|
-
assert$1.assert = void 0;
|
|
446
437
|
/** https://docs.tsafe.dev/assert */
|
|
447
438
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
448
439
|
function assert(condition, msg) {
|
|
@@ -450,74 +441,61 @@ function assert(condition, msg) {
|
|
|
450
441
|
throw new Error(msg);
|
|
451
442
|
}
|
|
452
443
|
}
|
|
453
|
-
assert$1.assert = assert;
|
|
454
|
-
|
|
455
|
-
var typeGuard$1 = {};
|
|
456
444
|
|
|
457
445
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
458
|
-
Object.defineProperty(typeGuard$1, "__esModule", { value: true });
|
|
459
|
-
typeGuard$1.typeGuard = void 0;
|
|
460
446
|
/** https://docs.tsafe.dev/typeguard */
|
|
461
447
|
function typeGuard(_value, isMatched) {
|
|
462
448
|
return isMatched;
|
|
463
449
|
}
|
|
464
|
-
typeGuard$1.typeGuard = typeGuard;
|
|
465
450
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
cls += toAdd;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
return cls;
|
|
518
|
-
};
|
|
519
|
-
exports.classnames = classnames;
|
|
520
|
-
} (classnames$1));
|
|
451
|
+
/** Copy pasted from
|
|
452
|
+
* https://github.com/emotion-js/emotion/blob/23f43ab9f24d44219b0b007a00f4ac681fe8712e/packages/react/src/class-names.js#L17-L63
|
|
453
|
+
**/
|
|
454
|
+
const classnames = (args) => {
|
|
455
|
+
const len = args.length;
|
|
456
|
+
let i = 0;
|
|
457
|
+
let cls = "";
|
|
458
|
+
for (; i < len; i++) {
|
|
459
|
+
const arg = args[i];
|
|
460
|
+
if (arg == null)
|
|
461
|
+
continue;
|
|
462
|
+
let toAdd;
|
|
463
|
+
switch (typeof arg) {
|
|
464
|
+
case "boolean":
|
|
465
|
+
break;
|
|
466
|
+
case "object": {
|
|
467
|
+
if (Array.isArray(arg)) {
|
|
468
|
+
toAdd = classnames(arg);
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
assert(!typeGuard(arg, false));
|
|
472
|
+
if (process.env.NODE_ENV !== "production" &&
|
|
473
|
+
arg.styles !== undefined &&
|
|
474
|
+
arg.name !== undefined) {
|
|
475
|
+
console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n" +
|
|
476
|
+
"`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.");
|
|
477
|
+
}
|
|
478
|
+
toAdd = "";
|
|
479
|
+
for (const k in arg) {
|
|
480
|
+
if (arg[k] && k) {
|
|
481
|
+
toAdd && (toAdd += " ");
|
|
482
|
+
toAdd += k;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
break;
|
|
487
|
+
}
|
|
488
|
+
default: {
|
|
489
|
+
toAdd = arg;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (toAdd) {
|
|
493
|
+
cls && (cls += " ");
|
|
494
|
+
cls += toAdd;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return cls;
|
|
498
|
+
};
|
|
521
499
|
|
|
522
500
|
/* eslint-disable */
|
|
523
501
|
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
@@ -941,13 +919,6 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
941
919
|
};
|
|
942
920
|
};
|
|
943
921
|
|
|
944
|
-
var emotionSerialize_esm = /*#__PURE__*/Object.freeze({
|
|
945
|
-
__proto__: null,
|
|
946
|
-
serializeStyles: serializeStyles
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(emotionSerialize_esm);
|
|
950
|
-
|
|
951
922
|
var isBrowser$3 = typeof document !== 'undefined';
|
|
952
923
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
953
924
|
var rawClassName = '';
|
|
@@ -1000,24 +971,10 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
1000
971
|
}
|
|
1001
972
|
};
|
|
1002
973
|
|
|
1003
|
-
var emotionUtils_esm = /*#__PURE__*/Object.freeze({
|
|
1004
|
-
__proto__: null,
|
|
1005
|
-
getRegisteredStyles: getRegisteredStyles,
|
|
1006
|
-
insertStyles: insertStyles,
|
|
1007
|
-
registerStyles: registerStyles
|
|
1008
|
-
});
|
|
1009
|
-
|
|
1010
|
-
var require$$2 = /*@__PURE__*/getAugmentedNamespace(emotionUtils_esm);
|
|
1011
|
-
|
|
1012
|
-
var useGuaranteedMemo$1 = {};
|
|
1013
|
-
|
|
1014
|
-
Object.defineProperty(useGuaranteedMemo$1, "__esModule", { value: true });
|
|
1015
|
-
useGuaranteedMemo$1.useGuaranteedMemo = void 0;
|
|
1016
|
-
const react_1$5 = React__default;
|
|
1017
974
|
/** Like react's useMemo but with guarantee that the fn
|
|
1018
975
|
* won't be invoked again if deps hasn't change */
|
|
1019
976
|
function useGuaranteedMemo(fn, deps) {
|
|
1020
|
-
const ref =
|
|
977
|
+
const ref = useRef();
|
|
1021
978
|
if (!ref.current ||
|
|
1022
979
|
deps.length !== ref.current.prevDeps.length ||
|
|
1023
980
|
ref.current.prevDeps.map((v, i) => v === deps[i]).indexOf(false) >= 0) {
|
|
@@ -1028,9 +985,169 @@ function useGuaranteedMemo(fn, deps) {
|
|
|
1028
985
|
}
|
|
1029
986
|
return ref.current.v;
|
|
1030
987
|
}
|
|
1031
|
-
useGuaranteedMemo$1.useGuaranteedMemo = useGuaranteedMemo;
|
|
1032
988
|
|
|
1033
|
-
|
|
989
|
+
function matchCSSObject(arg) {
|
|
990
|
+
return (arg instanceof Object &&
|
|
991
|
+
!("styles" in arg) &&
|
|
992
|
+
!("length" in arg) &&
|
|
993
|
+
!("__emotion_styles" in arg));
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
const { createCssAndCx } = (() => {
|
|
997
|
+
function merge(registered, css, className) {
|
|
998
|
+
const registeredStyles = [];
|
|
999
|
+
const rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
1000
|
+
if (registeredStyles.length < 2) {
|
|
1001
|
+
return className;
|
|
1002
|
+
}
|
|
1003
|
+
return rawClassName + css(registeredStyles);
|
|
1004
|
+
}
|
|
1005
|
+
function createCssAndCx(params) {
|
|
1006
|
+
const { cache } = params;
|
|
1007
|
+
const css = (...args) => {
|
|
1008
|
+
const serialized = serializeStyles(args, cache.registered);
|
|
1009
|
+
insertStyles(cache, serialized, false);
|
|
1010
|
+
const className = `${cache.key}-${serialized.name}`;
|
|
1011
|
+
scope: {
|
|
1012
|
+
const arg = args[0];
|
|
1013
|
+
if (!matchCSSObject(arg)) {
|
|
1014
|
+
break scope;
|
|
1015
|
+
}
|
|
1016
|
+
increaseSpecificityToTakePrecedenceOverMediaQueries.saveClassNameCSSObjectMapping(cache, className, arg);
|
|
1017
|
+
}
|
|
1018
|
+
return className;
|
|
1019
|
+
};
|
|
1020
|
+
const cx = (...args) => {
|
|
1021
|
+
const className = classnames(args);
|
|
1022
|
+
const feat27FixedClassnames = increaseSpecificityToTakePrecedenceOverMediaQueries.fixClassName(cache, className, css);
|
|
1023
|
+
return merge(cache.registered, css, feat27FixedClassnames);
|
|
1024
|
+
//return merge(cache.registered, css, className);
|
|
1025
|
+
};
|
|
1026
|
+
return { css, cx };
|
|
1027
|
+
}
|
|
1028
|
+
return { createCssAndCx };
|
|
1029
|
+
})();
|
|
1030
|
+
function createUseCssAndCx(params) {
|
|
1031
|
+
const { useCache } = params;
|
|
1032
|
+
function useCssAndCx() {
|
|
1033
|
+
const cache = useCache();
|
|
1034
|
+
const { css, cx } = useGuaranteedMemo(() => createCssAndCx({ cache }), [cache]);
|
|
1035
|
+
return { css, cx };
|
|
1036
|
+
}
|
|
1037
|
+
return { useCssAndCx };
|
|
1038
|
+
}
|
|
1039
|
+
// https://github.com/garronej/tss-react/issues/27
|
|
1040
|
+
const increaseSpecificityToTakePrecedenceOverMediaQueries = (() => {
|
|
1041
|
+
const cssObjectMapByCache = new WeakMap();
|
|
1042
|
+
return {
|
|
1043
|
+
"saveClassNameCSSObjectMapping": (cache, className, cssObject) => {
|
|
1044
|
+
let cssObjectMap = cssObjectMapByCache.get(cache);
|
|
1045
|
+
if (cssObjectMap === undefined) {
|
|
1046
|
+
cssObjectMap = new Map();
|
|
1047
|
+
cssObjectMapByCache.set(cache, cssObjectMap);
|
|
1048
|
+
}
|
|
1049
|
+
cssObjectMap.set(className, cssObject);
|
|
1050
|
+
},
|
|
1051
|
+
"fixClassName": (() => {
|
|
1052
|
+
function fix(classNameCSSObjects) {
|
|
1053
|
+
let isThereAnyMediaQueriesInPreviousClasses = false;
|
|
1054
|
+
return classNameCSSObjects.map(([className, cssObject]) => {
|
|
1055
|
+
if (cssObject === undefined) {
|
|
1056
|
+
return className;
|
|
1057
|
+
}
|
|
1058
|
+
let out;
|
|
1059
|
+
if (!isThereAnyMediaQueriesInPreviousClasses) {
|
|
1060
|
+
out = className;
|
|
1061
|
+
for (const key in cssObject) {
|
|
1062
|
+
if (key.startsWith("@media")) {
|
|
1063
|
+
isThereAnyMediaQueriesInPreviousClasses = true;
|
|
1064
|
+
break;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
out = {
|
|
1070
|
+
"&&": cssObject,
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
return out;
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
return (cache, className, css) => {
|
|
1077
|
+
const cssObjectMap = cssObjectMapByCache.get(cache);
|
|
1078
|
+
return classnames(fix(className
|
|
1079
|
+
.split(" ")
|
|
1080
|
+
.map(className => [
|
|
1081
|
+
className,
|
|
1082
|
+
cssObjectMap === null || cssObjectMap === void 0 ? void 0 : cssObjectMap.get(className),
|
|
1083
|
+
])).map(classNameOrCSSObject => typeof classNameOrCSSObject === "string"
|
|
1084
|
+
? classNameOrCSSObject
|
|
1085
|
+
: css(classNameOrCSSObject)));
|
|
1086
|
+
};
|
|
1087
|
+
})(),
|
|
1088
|
+
};
|
|
1089
|
+
})();
|
|
1090
|
+
|
|
1091
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1092
|
+
/**
|
|
1093
|
+
* useEffect(
|
|
1094
|
+
* ()=> { ... },
|
|
1095
|
+
* [ { "foo": "bar" } ]
|
|
1096
|
+
* )
|
|
1097
|
+
* => The callback will be invoked every render.
|
|
1098
|
+
* because { "foo": "bar" } is a new instance every render.
|
|
1099
|
+
*
|
|
1100
|
+
* useEffect(
|
|
1101
|
+
* ()=> { ... },
|
|
1102
|
+
* [ getDependencyArrayRef({ "foo": "bar" }) ]
|
|
1103
|
+
* );
|
|
1104
|
+
* => The callback will only be invoked once.
|
|
1105
|
+
*
|
|
1106
|
+
* The optimization will be enabled only if obj is
|
|
1107
|
+
* of the form Record<string, string | number | undefined | null>
|
|
1108
|
+
* overwise the object is returned (the function is the identity function).
|
|
1109
|
+
*/
|
|
1110
|
+
function getDependencyArrayRef(obj) {
|
|
1111
|
+
if (!(obj instanceof Object) || typeof obj === "function") {
|
|
1112
|
+
return obj;
|
|
1113
|
+
}
|
|
1114
|
+
const arr = [];
|
|
1115
|
+
for (const key in obj) {
|
|
1116
|
+
const value = obj[key];
|
|
1117
|
+
const typeofValue = typeof value;
|
|
1118
|
+
if (!(typeofValue === "string" ||
|
|
1119
|
+
(typeofValue === "number" && !isNaN(value)) ||
|
|
1120
|
+
typeofValue === "boolean" ||
|
|
1121
|
+
value === undefined ||
|
|
1122
|
+
value === null)) {
|
|
1123
|
+
return obj;
|
|
1124
|
+
}
|
|
1125
|
+
arr.push(`${key}:${typeofValue}_${value}`);
|
|
1126
|
+
}
|
|
1127
|
+
return "xSqLiJdLMd9s" + arr.join("|");
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
1131
|
+
function mergeClasses(classesFromUseStyles, classesFromProps, cx) {
|
|
1132
|
+
//NOTE: We use this test to be resilient in case classesFromProps is not of the expected type.
|
|
1133
|
+
if (!(classesFromProps instanceof Object)) {
|
|
1134
|
+
return classesFromUseStyles;
|
|
1135
|
+
}
|
|
1136
|
+
const out = {};
|
|
1137
|
+
objectKeys(classesFromUseStyles).forEach(ruleName => (out[ruleName] = cx(classesFromUseStyles[ruleName], classesFromProps[ruleName])));
|
|
1138
|
+
objectKeys(classesFromProps).forEach(ruleName => {
|
|
1139
|
+
if (ruleName in classesFromUseStyles) {
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
const className = classesFromProps[ruleName];
|
|
1143
|
+
//...Same here, that why we don't do className === undefined
|
|
1144
|
+
if (typeof className !== "string") {
|
|
1145
|
+
return;
|
|
1146
|
+
}
|
|
1147
|
+
out[ruleName] = className;
|
|
1148
|
+
});
|
|
1149
|
+
return out;
|
|
1150
|
+
}
|
|
1034
1151
|
|
|
1035
1152
|
/*
|
|
1036
1153
|
|
|
@@ -2338,948 +2455,55 @@ var createCache = function createCache(options) {
|
|
|
2338
2455
|
return cache;
|
|
2339
2456
|
};
|
|
2340
2457
|
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2458
|
+
function _extends() {
|
|
2459
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
2460
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2461
|
+
var source = arguments[i];
|
|
2345
2462
|
|
|
2346
|
-
var
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2352
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
2353
|
-
}
|
|
2354
|
-
Object.defineProperty(o, k2, desc);
|
|
2355
|
-
}) : (function(o, m, k, k2) {
|
|
2356
|
-
if (k2 === undefined) k2 = k;
|
|
2357
|
-
o[k2] = m[k];
|
|
2358
|
-
}));
|
|
2359
|
-
var __setModuleDefault$2 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2360
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2361
|
-
}) : function(o, v) {
|
|
2362
|
-
o["default"] = v;
|
|
2363
|
-
});
|
|
2364
|
-
var __importStar$2 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
2365
|
-
if (mod && mod.__esModule) return mod;
|
|
2366
|
-
var result = {};
|
|
2367
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$2(result, mod, k);
|
|
2368
|
-
__setModuleDefault$2(result, mod);
|
|
2369
|
-
return result;
|
|
2370
|
-
};
|
|
2371
|
-
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
2372
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2373
|
-
};
|
|
2374
|
-
Object.defineProperty(cache, "__esModule", { value: true });
|
|
2375
|
-
cache.TssCacheProvider = cache.useTssEmotionCache = cache.getTssDefaultEmotionCache = cache.getDoExistsTssDefaultEmotionCacheMemoizedValue = void 0;
|
|
2376
|
-
const react_1$4 = __importStar$2(React__default);
|
|
2377
|
-
const cache_1$1 = __importDefault$1(require$$1);
|
|
2378
|
-
const { getDoExistsTssDefaultEmotionCacheMemoizedValue, getTssDefaultEmotionCache, reactContext, } = (() => {
|
|
2379
|
-
const propertyKey = "__tss-react_context";
|
|
2380
|
-
const peerDepObj =
|
|
2381
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2382
|
-
react_1$4.createContext;
|
|
2383
|
-
let sharedContext = peerDepObj["__tss-react_context"];
|
|
2384
|
-
if (sharedContext === undefined) {
|
|
2385
|
-
const { getTssDefaultEmotionCache, getDoExistsTssDefaultEmotionCacheMemoizedValue, } = (() => {
|
|
2386
|
-
let cache = undefined;
|
|
2387
|
-
/**
|
|
2388
|
-
* Lazily initialized singleton
|
|
2389
|
-
* If doReset is set to true the memoized instance will be
|
|
2390
|
-
* discarded and a new one created.
|
|
2391
|
-
* */
|
|
2392
|
-
function getTssDefaultEmotionCache(params) {
|
|
2393
|
-
const { doReset = false } = params !== null && params !== void 0 ? params : {};
|
|
2394
|
-
if (doReset) {
|
|
2395
|
-
cache = undefined;
|
|
2396
|
-
}
|
|
2397
|
-
if (cache === undefined) {
|
|
2398
|
-
cache = (0, cache_1$1.default)({ "key": "tss" });
|
|
2399
|
-
}
|
|
2400
|
-
return cache;
|
|
2401
|
-
}
|
|
2402
|
-
return {
|
|
2403
|
-
getTssDefaultEmotionCache,
|
|
2404
|
-
"getDoExistsTssDefaultEmotionCacheMemoizedValue": () => cache !== undefined,
|
|
2405
|
-
};
|
|
2406
|
-
})();
|
|
2407
|
-
sharedContext = {
|
|
2408
|
-
getTssDefaultEmotionCache,
|
|
2409
|
-
getDoExistsTssDefaultEmotionCacheMemoizedValue,
|
|
2410
|
-
"reactContext": (0, react_1$4.createContext)(undefined),
|
|
2411
|
-
};
|
|
2412
|
-
Object.defineProperty(peerDepObj, propertyKey, {
|
|
2413
|
-
"configurable": false,
|
|
2414
|
-
"enumerable": false,
|
|
2415
|
-
"writable": false,
|
|
2416
|
-
"value": sharedContext,
|
|
2417
|
-
});
|
|
2463
|
+
for (var key in source) {
|
|
2464
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2465
|
+
target[key] = source[key];
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2418
2468
|
}
|
|
2419
|
-
return sharedContext;
|
|
2420
|
-
})();
|
|
2421
|
-
cache.getDoExistsTssDefaultEmotionCacheMemoizedValue = getDoExistsTssDefaultEmotionCacheMemoizedValue;
|
|
2422
|
-
cache.getTssDefaultEmotionCache = getTssDefaultEmotionCache;
|
|
2423
|
-
function useTssEmotionCache() {
|
|
2424
|
-
const cacheExplicitlyProvidedForTss = (0, react_1$4.useContext)(reactContext);
|
|
2425
|
-
return cacheExplicitlyProvidedForTss !== null && cacheExplicitlyProvidedForTss !== void 0 ? cacheExplicitlyProvidedForTss : getTssDefaultEmotionCache();
|
|
2426
|
-
}
|
|
2427
|
-
cache.useTssEmotionCache = useTssEmotionCache;
|
|
2428
|
-
function TssCacheProvider(props) {
|
|
2429
|
-
const { children, value } = props;
|
|
2430
|
-
return (react_1$4.default.createElement(reactContext.Provider, { value: value }, children));
|
|
2431
|
-
}
|
|
2432
|
-
cache.TssCacheProvider = TssCacheProvider;
|
|
2433
|
-
|
|
2434
|
-
var types = {};
|
|
2435
2469
|
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
return (arg instanceof Object &&
|
|
2440
|
-
!("styles" in arg) &&
|
|
2441
|
-
!("length" in arg) &&
|
|
2442
|
-
!("__emotion_styles" in arg));
|
|
2470
|
+
return target;
|
|
2471
|
+
};
|
|
2472
|
+
return _extends.apply(this, arguments);
|
|
2443
2473
|
}
|
|
2444
|
-
types.matchCSSObject = matchCSSObject;
|
|
2445
2474
|
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
exports.useCssAndCx = exports.createCssAndCx = void 0;
|
|
2449
|
-
const classnames_1 = classnames$1;
|
|
2450
|
-
const serialize_1 = require$$1$1;
|
|
2451
|
-
const utils_1 = require$$2;
|
|
2452
|
-
const useGuaranteedMemo_1 = useGuaranteedMemo$1;
|
|
2453
|
-
const cache_1 = cache;
|
|
2454
|
-
const types_1 = types;
|
|
2455
|
-
exports.createCssAndCx = (() => {
|
|
2456
|
-
function merge(registered, css, className) {
|
|
2457
|
-
const registeredStyles = [];
|
|
2458
|
-
const rawClassName = (0, utils_1.getRegisteredStyles)(registered, registeredStyles, className);
|
|
2459
|
-
if (registeredStyles.length < 2) {
|
|
2460
|
-
return className;
|
|
2461
|
-
}
|
|
2462
|
-
return rawClassName + css(registeredStyles);
|
|
2463
|
-
}
|
|
2464
|
-
function createCssAndCx(params) {
|
|
2465
|
-
const { cache } = params;
|
|
2466
|
-
const css = (...args) => {
|
|
2467
|
-
const serialized = (0, serialize_1.serializeStyles)(args, cache.registered);
|
|
2468
|
-
(0, utils_1.insertStyles)(cache, serialized, false);
|
|
2469
|
-
const className = `${cache.key}-${serialized.name}`;
|
|
2470
|
-
scope: {
|
|
2471
|
-
const arg = args[0];
|
|
2472
|
-
if (!(0, types_1.matchCSSObject)(arg)) {
|
|
2473
|
-
break scope;
|
|
2474
|
-
}
|
|
2475
|
-
increaseSpecificityToTakePrecedenceOverMediaQuerries.saveClassNameCSSObjectMapping(cache, className, arg);
|
|
2476
|
-
}
|
|
2477
|
-
return className;
|
|
2478
|
-
};
|
|
2479
|
-
const cx = (...args) => {
|
|
2480
|
-
const className = (0, classnames_1.classnames)(args);
|
|
2481
|
-
const feat27FixedClassnames = increaseSpecificityToTakePrecedenceOverMediaQuerries.fixClassName(cache, className, css);
|
|
2482
|
-
return merge(cache.registered, css, feat27FixedClassnames);
|
|
2483
|
-
//return merge(cache.registered, css, className);
|
|
2484
|
-
};
|
|
2485
|
-
return { css, cx };
|
|
2486
|
-
}
|
|
2487
|
-
return { createCssAndCx };
|
|
2488
|
-
})().createCssAndCx;
|
|
2489
|
-
/** Will pickup the contextual cache if any */
|
|
2490
|
-
function useCssAndCx() {
|
|
2491
|
-
const cache = (0, cache_1.useTssEmotionCache)();
|
|
2492
|
-
const { css, cx } = (0, useGuaranteedMemo_1.useGuaranteedMemo)(() => (0, exports.createCssAndCx)({ cache }), [cache]);
|
|
2493
|
-
return { css, cx };
|
|
2494
|
-
}
|
|
2495
|
-
exports.useCssAndCx = useCssAndCx;
|
|
2496
|
-
// https://github.com/garronej/tss-react/issues/27
|
|
2497
|
-
const increaseSpecificityToTakePrecedenceOverMediaQuerries = (() => {
|
|
2498
|
-
const cssObjectMapByCache = new WeakMap();
|
|
2499
|
-
return {
|
|
2500
|
-
"saveClassNameCSSObjectMapping": (cache, className, cssObject) => {
|
|
2501
|
-
let cssObjectMap = cssObjectMapByCache.get(cache);
|
|
2502
|
-
if (cssObjectMap === undefined) {
|
|
2503
|
-
cssObjectMap = new Map();
|
|
2504
|
-
cssObjectMapByCache.set(cache, cssObjectMap);
|
|
2505
|
-
}
|
|
2506
|
-
cssObjectMap.set(className, cssObject);
|
|
2507
|
-
},
|
|
2508
|
-
"fixClassName": (() => {
|
|
2509
|
-
function fix(classNameCSSObjects) {
|
|
2510
|
-
let isThereAnyMediaQueriesInPreviousClasses = false;
|
|
2511
|
-
return classNameCSSObjects.map(([className, cssObject]) => {
|
|
2512
|
-
if (cssObject === undefined) {
|
|
2513
|
-
return className;
|
|
2514
|
-
}
|
|
2515
|
-
let out;
|
|
2516
|
-
if (!isThereAnyMediaQueriesInPreviousClasses) {
|
|
2517
|
-
out = className;
|
|
2518
|
-
for (const key in cssObject) {
|
|
2519
|
-
if (key.startsWith("@media")) {
|
|
2520
|
-
isThereAnyMediaQueriesInPreviousClasses = true;
|
|
2521
|
-
break;
|
|
2522
|
-
}
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
else {
|
|
2526
|
-
out = {
|
|
2527
|
-
"&&": cssObject,
|
|
2528
|
-
};
|
|
2529
|
-
}
|
|
2530
|
-
return out;
|
|
2531
|
-
});
|
|
2532
|
-
}
|
|
2533
|
-
return (cache, className, css) => {
|
|
2534
|
-
const cssObjectMap = cssObjectMapByCache.get(cache);
|
|
2535
|
-
return (0, classnames_1.classnames)(fix(className
|
|
2536
|
-
.split(" ")
|
|
2537
|
-
.map(className => [
|
|
2538
|
-
className,
|
|
2539
|
-
cssObjectMap === null || cssObjectMap === void 0 ? void 0 : cssObjectMap.get(className),
|
|
2540
|
-
])).map(classNameOrCSSObject => typeof classNameOrCSSObject === "string"
|
|
2541
|
-
? classNameOrCSSObject
|
|
2542
|
-
: css(classNameOrCSSObject)));
|
|
2543
|
-
};
|
|
2544
|
-
})(),
|
|
2545
|
-
};
|
|
2546
|
-
})();
|
|
2547
|
-
} (cssAndCx));
|
|
2548
|
-
|
|
2549
|
-
var mergeClasses$1 = {};
|
|
2475
|
+
var isBrowser = typeof document !== 'undefined';
|
|
2476
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
2550
2477
|
|
|
2551
|
-
var
|
|
2478
|
+
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2479
|
+
// because this module is primarily intended for the browser and node
|
|
2480
|
+
// but it's also required in react native and similar environments sometimes
|
|
2481
|
+
// and we could have a special build just for that
|
|
2482
|
+
// but this is much easier and the native packages
|
|
2483
|
+
// might use a different theme context in the future anyway
|
|
2484
|
+
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
2485
|
+
key: 'css'
|
|
2486
|
+
}) : null);
|
|
2552
2487
|
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
/** Object.keys() with types */
|
|
2556
|
-
function objectKeys(o) {
|
|
2557
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2558
|
-
return Object.keys(o);
|
|
2488
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2489
|
+
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
2559
2490
|
}
|
|
2560
|
-
objectKeys$1.objectKeys = objectKeys;
|
|
2561
2491
|
|
|
2562
|
-
|
|
2492
|
+
EmotionCacheContext.Provider;
|
|
2493
|
+
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
2494
|
+
return useContext(EmotionCacheContext);
|
|
2495
|
+
};
|
|
2563
2496
|
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
* => The callback will be invoked every render.
|
|
2573
|
-
* because { "foo": "bar" } is a new instance every render.
|
|
2574
|
-
*
|
|
2575
|
-
* useEffect(
|
|
2576
|
-
* ()=> { ... },
|
|
2577
|
-
* [ getDependencyArrayRef({ "foo": "bar" }) ]
|
|
2578
|
-
* );
|
|
2579
|
-
* => The callback will only be invoked once.
|
|
2580
|
-
*
|
|
2581
|
-
* The optimization will be enabled only if obj is
|
|
2582
|
-
* of the form Record<string, string | number | undefined | null>
|
|
2583
|
-
* overwise the object is returned (the function is the identity function).
|
|
2584
|
-
*/
|
|
2585
|
-
function getDependencyArrayRef(obj) {
|
|
2586
|
-
if (!(obj instanceof Object) || typeof obj === "function") {
|
|
2587
|
-
return obj;
|
|
2588
|
-
}
|
|
2589
|
-
const arr = [];
|
|
2590
|
-
for (const key in obj) {
|
|
2591
|
-
const value = obj[key];
|
|
2592
|
-
const typeofValue = typeof value;
|
|
2593
|
-
if (!(typeofValue === "string" ||
|
|
2594
|
-
(typeofValue === "number" && !isNaN(value)) ||
|
|
2595
|
-
typeofValue === "boolean" ||
|
|
2596
|
-
value === undefined ||
|
|
2597
|
-
value === null)) {
|
|
2598
|
-
return obj;
|
|
2599
|
-
}
|
|
2600
|
-
arr.push(`${key}:${typeofValue}_${value}`);
|
|
2601
|
-
}
|
|
2602
|
-
return "xSqLiJdLMd9s" + arr.join("|");
|
|
2603
|
-
}
|
|
2604
|
-
getDependencyArrayRef$1.getDependencyArrayRef = getDependencyArrayRef;
|
|
2497
|
+
var withEmotionCache = function withEmotionCache(func) {
|
|
2498
|
+
// $FlowFixMe
|
|
2499
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2500
|
+
// the cache will never be null in the browser
|
|
2501
|
+
var cache = useContext(EmotionCacheContext);
|
|
2502
|
+
return func(props, cache, ref);
|
|
2503
|
+
});
|
|
2504
|
+
};
|
|
2605
2505
|
|
|
2606
|
-
|
|
2607
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2608
|
-
Object.defineProperty(mergeClasses$1, "__esModule", { value: true });
|
|
2609
|
-
mergeClasses$1.useMergedClasses = mergeClasses$1.mergeClasses = void 0;
|
|
2610
|
-
const objectKeys_1$1 = objectKeys$1;
|
|
2611
|
-
const getDependencyArrayRef_1$1 = getDependencyArrayRef$1;
|
|
2612
|
-
const cssAndCx_1$1 = cssAndCx;
|
|
2613
|
-
const react_1$3 = React__default;
|
|
2614
|
-
function mergeClasses(classesFromUseStyles, classesFromProps, cx) {
|
|
2615
|
-
//NOTE: We use this test to be resilient in case classesFromProps is not of the expected type.
|
|
2616
|
-
if (!(classesFromProps instanceof Object)) {
|
|
2617
|
-
return classesFromUseStyles;
|
|
2618
|
-
}
|
|
2619
|
-
const out = {};
|
|
2620
|
-
(0, objectKeys_1$1.objectKeys)(classesFromUseStyles).forEach(ruleName => (out[ruleName] = cx(classesFromUseStyles[ruleName], classesFromProps[ruleName])));
|
|
2621
|
-
(0, objectKeys_1$1.objectKeys)(classesFromProps).forEach(ruleName => {
|
|
2622
|
-
if (ruleName in classesFromUseStyles) {
|
|
2623
|
-
return;
|
|
2624
|
-
}
|
|
2625
|
-
const className = classesFromProps[ruleName];
|
|
2626
|
-
//...Same here, that why we don't do className === undefined
|
|
2627
|
-
if (typeof className !== "string") {
|
|
2628
|
-
return;
|
|
2629
|
-
}
|
|
2630
|
-
out[ruleName] = className;
|
|
2631
|
-
});
|
|
2632
|
-
return out;
|
|
2633
|
-
}
|
|
2634
|
-
mergeClasses$1.mergeClasses = mergeClasses;
|
|
2635
|
-
function useMergedClasses(classes, classesOv) {
|
|
2636
|
-
const { cx } = (0, cssAndCx_1$1.useCssAndCx)();
|
|
2637
|
-
return (0, react_1$3.useMemo)(() => mergeClasses(classes, classesOv, cx), [classes, (0, getDependencyArrayRef_1$1.getDependencyArrayRef)(classesOv), cx]);
|
|
2638
|
-
}
|
|
2639
|
-
mergeClasses$1.useMergedClasses = useMergedClasses;
|
|
2640
|
-
|
|
2641
|
-
var makeStyles$1 = {};
|
|
2642
|
-
|
|
2643
|
-
var Object_fromEntries = {};
|
|
2644
|
-
|
|
2645
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2646
|
-
Object.defineProperty(Object_fromEntries, "__esModule", { value: true });
|
|
2647
|
-
Object_fromEntries.objectFromEntries = void 0;
|
|
2648
|
-
Object_fromEntries.objectFromEntries = !Object
|
|
2649
|
-
.fromEntries
|
|
2650
|
-
? (entries) => {
|
|
2651
|
-
if (!entries || !entries[Symbol.iterator]) {
|
|
2652
|
-
throw new Error("Object.fromEntries() requires a single iterable argument");
|
|
2653
|
-
}
|
|
2654
|
-
const o = {};
|
|
2655
|
-
Object.keys(entries).forEach(key => {
|
|
2656
|
-
const [k, v] = entries[key];
|
|
2657
|
-
o[k] = v;
|
|
2658
|
-
});
|
|
2659
|
-
return o;
|
|
2660
|
-
}
|
|
2661
|
-
: Object.fromEntries;
|
|
2662
|
-
|
|
2663
|
-
Object.defineProperty(makeStyles$1, "__esModule", { value: true });
|
|
2664
|
-
makeStyles$1.createMakeStyles = void 0;
|
|
2665
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2666
|
-
const react_1$2 = React__default;
|
|
2667
|
-
const Object_fromEntries_1 = Object_fromEntries;
|
|
2668
|
-
const objectKeys_1 = objectKeys$1;
|
|
2669
|
-
const cssAndCx_1 = cssAndCx;
|
|
2670
|
-
const getDependencyArrayRef_1 = getDependencyArrayRef$1;
|
|
2671
|
-
const typeGuard_1 = typeGuard$1;
|
|
2672
|
-
const cache_1 = cache;
|
|
2673
|
-
const assert_1 = assert$1;
|
|
2674
|
-
const mergeClasses_1 = mergeClasses$1;
|
|
2675
|
-
let counter = 0;
|
|
2676
|
-
function createMakeStyles(params) {
|
|
2677
|
-
const { useTheme } = params;
|
|
2678
|
-
/** returns useStyle. */
|
|
2679
|
-
function makeStyles(params) {
|
|
2680
|
-
const { name: nameOrWrappedName, uniqId = counter++ } = params !== null && params !== void 0 ? params : {};
|
|
2681
|
-
const name = typeof nameOrWrappedName !== "object"
|
|
2682
|
-
? nameOrWrappedName
|
|
2683
|
-
: Object.keys(nameOrWrappedName)[0];
|
|
2684
|
-
return function (cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2685
|
-
const getCssObjectByRuleName = typeof cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2686
|
-
"function"
|
|
2687
|
-
? cssObjectByRuleNameOrGetCssObjectByRuleName
|
|
2688
|
-
: () => cssObjectByRuleNameOrGetCssObjectByRuleName;
|
|
2689
|
-
return function useStyles(params, styleOverrides) {
|
|
2690
|
-
var _a, _b;
|
|
2691
|
-
const theme = useTheme();
|
|
2692
|
-
const { css, cx } = (0, cssAndCx_1.useCssAndCx)();
|
|
2693
|
-
const cache = (0, cache_1.useTssEmotionCache)();
|
|
2694
|
-
let classes = (0, react_1$2.useMemo)(() => {
|
|
2695
|
-
const refClassesCache = {};
|
|
2696
|
-
const refClasses = typeof Proxy !== "undefined" &&
|
|
2697
|
-
new Proxy({}, {
|
|
2698
|
-
"get": (_target, propertyKey) => {
|
|
2699
|
-
if (typeof propertyKey === "symbol") {
|
|
2700
|
-
(0, assert_1.assert)(false);
|
|
2701
|
-
}
|
|
2702
|
-
return (refClassesCache[propertyKey] = `${cache.key}-${uniqId}${name !== undefined ? `-${name}` : ""}-${propertyKey}-ref`);
|
|
2703
|
-
},
|
|
2704
|
-
});
|
|
2705
|
-
const cssObjectByRuleName = getCssObjectByRuleName(theme, params, refClasses || {});
|
|
2706
|
-
const classes = (0, Object_fromEntries_1.objectFromEntries)((0, objectKeys_1.objectKeys)(cssObjectByRuleName).map(ruleName => {
|
|
2707
|
-
const cssObject = cssObjectByRuleName[ruleName];
|
|
2708
|
-
if (!cssObject.label) {
|
|
2709
|
-
cssObject.label = `${name !== undefined ? `${name}-` : ""}${ruleName}`;
|
|
2710
|
-
}
|
|
2711
|
-
return [
|
|
2712
|
-
ruleName,
|
|
2713
|
-
`${css(cssObject)}${(0, typeGuard_1.typeGuard)(ruleName, ruleName in refClassesCache)
|
|
2714
|
-
? ` ${refClassesCache[ruleName]}`
|
|
2715
|
-
: ""}`,
|
|
2716
|
-
];
|
|
2717
|
-
}));
|
|
2718
|
-
(0, objectKeys_1.objectKeys)(refClassesCache).forEach(ruleName => {
|
|
2719
|
-
if (ruleName in classes) {
|
|
2720
|
-
return;
|
|
2721
|
-
}
|
|
2722
|
-
classes[ruleName] =
|
|
2723
|
-
refClassesCache[ruleName];
|
|
2724
|
-
});
|
|
2725
|
-
return classes;
|
|
2726
|
-
}, [cache, css, cx, theme, (0, getDependencyArrayRef_1.getDependencyArrayRef)(params)]);
|
|
2727
|
-
const propsClasses = styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props.classes;
|
|
2728
|
-
{
|
|
2729
|
-
classes = (0, react_1$2.useMemo)(() => (0, mergeClasses_1.mergeClasses)(classes, propsClasses, cx), [classes, (0, getDependencyArrayRef_1.getDependencyArrayRef)(propsClasses), cx]);
|
|
2730
|
-
}
|
|
2731
|
-
{
|
|
2732
|
-
let cssObjectByRuleNameOrGetCssObjectByRuleName = undefined;
|
|
2733
|
-
try {
|
|
2734
|
-
cssObjectByRuleNameOrGetCssObjectByRuleName =
|
|
2735
|
-
name !== undefined
|
|
2736
|
-
? (_b = (_a = theme.components) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.styleOverrides
|
|
2737
|
-
: undefined;
|
|
2738
|
-
// eslint-disable-next-line no-empty
|
|
2739
|
-
}
|
|
2740
|
-
catch (_c) { }
|
|
2741
|
-
const themeClasses = (0, react_1$2.useMemo)(() => {
|
|
2742
|
-
if (!cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2743
|
-
return undefined;
|
|
2744
|
-
}
|
|
2745
|
-
const themeClasses = {};
|
|
2746
|
-
for (const ruleName in cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2747
|
-
const cssObjectOrGetCssObject = cssObjectByRuleNameOrGetCssObjectByRuleName[ruleName];
|
|
2748
|
-
if (!(cssObjectOrGetCssObject instanceof Object)) {
|
|
2749
|
-
continue;
|
|
2750
|
-
}
|
|
2751
|
-
themeClasses[ruleName] = css(typeof cssObjectOrGetCssObject === "function"
|
|
2752
|
-
? cssObjectOrGetCssObject(Object.assign({ theme, "ownerState": styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState }, styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props))
|
|
2753
|
-
: cssObjectOrGetCssObject);
|
|
2754
|
-
}
|
|
2755
|
-
return themeClasses;
|
|
2756
|
-
}, [
|
|
2757
|
-
cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2758
|
-
undefined
|
|
2759
|
-
? undefined
|
|
2760
|
-
: JSON.stringify(cssObjectByRuleNameOrGetCssObjectByRuleName),
|
|
2761
|
-
(0, getDependencyArrayRef_1.getDependencyArrayRef)(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props),
|
|
2762
|
-
(0, getDependencyArrayRef_1.getDependencyArrayRef)(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState),
|
|
2763
|
-
css,
|
|
2764
|
-
]);
|
|
2765
|
-
classes = (0, react_1$2.useMemo)(() => (0, mergeClasses_1.mergeClasses)(classes, themeClasses, cx), [classes, themeClasses, cx]);
|
|
2766
|
-
}
|
|
2767
|
-
return {
|
|
2768
|
-
classes,
|
|
2769
|
-
theme,
|
|
2770
|
-
css,
|
|
2771
|
-
cx,
|
|
2772
|
-
};
|
|
2773
|
-
};
|
|
2774
|
-
};
|
|
2775
|
-
}
|
|
2776
|
-
function useStyles() {
|
|
2777
|
-
const theme = useTheme();
|
|
2778
|
-
const { css, cx } = (0, cssAndCx_1.useCssAndCx)();
|
|
2779
|
-
return { theme, css, cx };
|
|
2780
|
-
}
|
|
2781
|
-
return { makeStyles, useStyles };
|
|
2782
|
-
}
|
|
2783
|
-
makeStyles$1.createMakeStyles = createMakeStyles;
|
|
2784
|
-
|
|
2785
|
-
var withStyles$1 = {};
|
|
2786
|
-
|
|
2787
|
-
var capitalize$1 = {};
|
|
2788
|
-
|
|
2789
|
-
Object.defineProperty(capitalize$1, "__esModule", { value: true });
|
|
2790
|
-
capitalize$1.capitalize = void 0;
|
|
2791
|
-
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
2792
|
-
function capitalize(str) {
|
|
2793
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2794
|
-
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
2795
|
-
}
|
|
2796
|
-
capitalize$1.capitalize = capitalize;
|
|
2797
|
-
|
|
2798
|
-
var __createBinding$1 = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2799
|
-
if (k2 === undefined) k2 = k;
|
|
2800
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
2801
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
2802
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
2803
|
-
}
|
|
2804
|
-
Object.defineProperty(o, k2, desc);
|
|
2805
|
-
}) : (function(o, m, k, k2) {
|
|
2806
|
-
if (k2 === undefined) k2 = k;
|
|
2807
|
-
o[k2] = m[k];
|
|
2808
|
-
}));
|
|
2809
|
-
var __setModuleDefault$1 = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
2810
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
2811
|
-
}) : function(o, v) {
|
|
2812
|
-
o["default"] = v;
|
|
2813
|
-
});
|
|
2814
|
-
var __importStar$1 = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
2815
|
-
if (mod && mod.__esModule) return mod;
|
|
2816
|
-
var result = {};
|
|
2817
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k);
|
|
2818
|
-
__setModuleDefault$1(result, mod);
|
|
2819
|
-
return result;
|
|
2820
|
-
};
|
|
2821
|
-
var __rest = (commonjsGlobal && commonjsGlobal.__rest) || function (s, e) {
|
|
2822
|
-
var t = {};
|
|
2823
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2824
|
-
t[p] = s[p];
|
|
2825
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2826
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2827
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2828
|
-
t[p[i]] = s[p[i]];
|
|
2829
|
-
}
|
|
2830
|
-
return t;
|
|
2831
|
-
};
|
|
2832
|
-
Object.defineProperty(withStyles$1, "__esModule", { value: true });
|
|
2833
|
-
withStyles$1.createWithStyles = void 0;
|
|
2834
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2835
|
-
const react_1$1 = __importStar$1(React__default);
|
|
2836
|
-
const makeStyles_1 = makeStyles$1;
|
|
2837
|
-
const capitalize_1 = capitalize$1;
|
|
2838
|
-
function createWithStyles(params) {
|
|
2839
|
-
const { useTheme } = params;
|
|
2840
|
-
const { makeStyles } = (0, makeStyles_1.createMakeStyles)({ useTheme });
|
|
2841
|
-
function withStyles(Component, cssObjectByRuleNameOrGetCssObjectByRuleName, params) {
|
|
2842
|
-
const Component_ = typeof Component === "string"
|
|
2843
|
-
? (() => {
|
|
2844
|
-
const tag = Component;
|
|
2845
|
-
const Out = function (_a) {
|
|
2846
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
2847
|
-
return (0, react_1$1.createElement)(tag, props, children);
|
|
2848
|
-
};
|
|
2849
|
-
Object.defineProperty(Out, "name", {
|
|
2850
|
-
"value": (0, capitalize_1.capitalize)(tag),
|
|
2851
|
-
});
|
|
2852
|
-
return Out;
|
|
2853
|
-
})()
|
|
2854
|
-
: Component;
|
|
2855
|
-
const name = (() => {
|
|
2856
|
-
const { name } = Component_;
|
|
2857
|
-
return typeof name === "string" ? name : undefined;
|
|
2858
|
-
})();
|
|
2859
|
-
const useStyles = makeStyles(params)(typeof cssObjectByRuleNameOrGetCssObjectByRuleName === "function"
|
|
2860
|
-
? (theme, props, classes) => incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName(theme, props, classes))
|
|
2861
|
-
: incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName));
|
|
2862
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2863
|
-
const Out = (0, react_1$1.forwardRef)(function (props, ref) {
|
|
2864
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2865
|
-
const { className, classes: _classes } = props, rest = __rest(props, ["className", "classes"]);
|
|
2866
|
-
const { classes, cx } = useStyles(props, { props });
|
|
2867
|
-
return (react_1$1.default.createElement(Component_, Object.assign({ ref: ref, className: cx(classes.root, className) }, (typeof Component === "string" ? {} : { classes }), rest)));
|
|
2868
|
-
});
|
|
2869
|
-
if (name !== undefined) {
|
|
2870
|
-
Object.defineProperty(Out, "name", {
|
|
2871
|
-
"value": `${name}WithStyles`,
|
|
2872
|
-
});
|
|
2873
|
-
}
|
|
2874
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2875
|
-
return Out;
|
|
2876
|
-
}
|
|
2877
|
-
return { withStyles };
|
|
2878
|
-
}
|
|
2879
|
-
withStyles$1.createWithStyles = createWithStyles;
|
|
2880
|
-
function incorporateMediaQueries(cssObjectByRuleNameWithMediaQueries) {
|
|
2881
|
-
const cssObjectByRuleName = {};
|
|
2882
|
-
const cssObjectByRuleNameWithMediaQueriesByMediaQuery = {};
|
|
2883
|
-
Object.keys(cssObjectByRuleNameWithMediaQueries).forEach(ruleNameOrMediaQuery => ((ruleNameOrMediaQuery.startsWith("@media")
|
|
2884
|
-
? cssObjectByRuleNameWithMediaQueriesByMediaQuery
|
|
2885
|
-
: cssObjectByRuleName)[ruleNameOrMediaQuery] =
|
|
2886
|
-
cssObjectByRuleNameWithMediaQueries[ruleNameOrMediaQuery]));
|
|
2887
|
-
Object.keys(cssObjectByRuleNameWithMediaQueriesByMediaQuery).forEach(mediaQuery => {
|
|
2888
|
-
const cssObjectByRuleNameBis = cssObjectByRuleNameWithMediaQueriesByMediaQuery[mediaQuery];
|
|
2889
|
-
Object.keys(cssObjectByRuleNameBis).forEach(ruleName => {
|
|
2890
|
-
var _a;
|
|
2891
|
-
return (cssObjectByRuleName[ruleName] = Object.assign(Object.assign({}, ((_a = cssObjectByRuleName[ruleName]) !== null && _a !== void 0 ? _a : {})), { [mediaQuery]: cssObjectByRuleNameBis[ruleName] }));
|
|
2892
|
-
});
|
|
2893
|
-
});
|
|
2894
|
-
return cssObjectByRuleName;
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
function _extends() {
|
|
2898
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
2899
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2900
|
-
var source = arguments[i];
|
|
2901
|
-
|
|
2902
|
-
for (var key in source) {
|
|
2903
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2904
|
-
target[key] = source[key];
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
|
|
2909
|
-
return target;
|
|
2910
|
-
};
|
|
2911
|
-
return _extends.apply(this, arguments);
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
var reactIs$1 = {exports: {}};
|
|
2915
|
-
|
|
2916
|
-
var reactIs_production_min = {};
|
|
2917
|
-
|
|
2918
|
-
/** @license React v16.13.1
|
|
2919
|
-
* react-is.production.min.js
|
|
2920
|
-
*
|
|
2921
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2922
|
-
*
|
|
2923
|
-
* This source code is licensed under the MIT license found in the
|
|
2924
|
-
* LICENSE file in the root directory of this source tree.
|
|
2925
|
-
*/
|
|
2926
|
-
|
|
2927
|
-
var hasRequiredReactIs_production_min;
|
|
2928
|
-
|
|
2929
|
-
function requireReactIs_production_min () {
|
|
2930
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
2931
|
-
hasRequiredReactIs_production_min = 1;
|
|
2932
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
2933
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
2934
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
2935
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
2936
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
2937
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
2938
|
-
return reactIs_production_min;
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
var reactIs_development = {};
|
|
2942
|
-
|
|
2943
|
-
/** @license React v16.13.1
|
|
2944
|
-
* react-is.development.js
|
|
2945
|
-
*
|
|
2946
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2947
|
-
*
|
|
2948
|
-
* This source code is licensed under the MIT license found in the
|
|
2949
|
-
* LICENSE file in the root directory of this source tree.
|
|
2950
|
-
*/
|
|
2951
|
-
|
|
2952
|
-
var hasRequiredReactIs_development;
|
|
2953
|
-
|
|
2954
|
-
function requireReactIs_development () {
|
|
2955
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
2956
|
-
hasRequiredReactIs_development = 1;
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2961
|
-
(function() {
|
|
2962
|
-
|
|
2963
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
2964
|
-
// nor polyfill, then a plain number is used for performance.
|
|
2965
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
2966
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
2967
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
2968
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
2969
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
2970
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
2971
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
2972
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
2973
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
2974
|
-
|
|
2975
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
2976
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
2977
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
2978
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
2979
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
2980
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
2981
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
2982
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
2983
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
2984
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
2985
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
2986
|
-
|
|
2987
|
-
function isValidElementType(type) {
|
|
2988
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2989
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
2990
|
-
}
|
|
2991
|
-
|
|
2992
|
-
function typeOf(object) {
|
|
2993
|
-
if (typeof object === 'object' && object !== null) {
|
|
2994
|
-
var $$typeof = object.$$typeof;
|
|
2995
|
-
|
|
2996
|
-
switch ($$typeof) {
|
|
2997
|
-
case REACT_ELEMENT_TYPE:
|
|
2998
|
-
var type = object.type;
|
|
2999
|
-
|
|
3000
|
-
switch (type) {
|
|
3001
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
3002
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
3003
|
-
case REACT_FRAGMENT_TYPE:
|
|
3004
|
-
case REACT_PROFILER_TYPE:
|
|
3005
|
-
case REACT_STRICT_MODE_TYPE:
|
|
3006
|
-
case REACT_SUSPENSE_TYPE:
|
|
3007
|
-
return type;
|
|
3008
|
-
|
|
3009
|
-
default:
|
|
3010
|
-
var $$typeofType = type && type.$$typeof;
|
|
3011
|
-
|
|
3012
|
-
switch ($$typeofType) {
|
|
3013
|
-
case REACT_CONTEXT_TYPE:
|
|
3014
|
-
case REACT_FORWARD_REF_TYPE:
|
|
3015
|
-
case REACT_LAZY_TYPE:
|
|
3016
|
-
case REACT_MEMO_TYPE:
|
|
3017
|
-
case REACT_PROVIDER_TYPE:
|
|
3018
|
-
return $$typeofType;
|
|
3019
|
-
|
|
3020
|
-
default:
|
|
3021
|
-
return $$typeof;
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
case REACT_PORTAL_TYPE:
|
|
3027
|
-
return $$typeof;
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
|
|
3031
|
-
return undefined;
|
|
3032
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
3033
|
-
|
|
3034
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
3035
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
3036
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
3037
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
3038
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
3039
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
3040
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
3041
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
3042
|
-
var Memo = REACT_MEMO_TYPE;
|
|
3043
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
3044
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
3045
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
3046
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
3047
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
3048
|
-
|
|
3049
|
-
function isAsyncMode(object) {
|
|
3050
|
-
{
|
|
3051
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
3052
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
3053
|
-
|
|
3054
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
3055
|
-
}
|
|
3056
|
-
}
|
|
3057
|
-
|
|
3058
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
3059
|
-
}
|
|
3060
|
-
function isConcurrentMode(object) {
|
|
3061
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
3062
|
-
}
|
|
3063
|
-
function isContextConsumer(object) {
|
|
3064
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
3065
|
-
}
|
|
3066
|
-
function isContextProvider(object) {
|
|
3067
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
3068
|
-
}
|
|
3069
|
-
function isElement(object) {
|
|
3070
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3071
|
-
}
|
|
3072
|
-
function isForwardRef(object) {
|
|
3073
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
3074
|
-
}
|
|
3075
|
-
function isFragment(object) {
|
|
3076
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
3077
|
-
}
|
|
3078
|
-
function isLazy(object) {
|
|
3079
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
3080
|
-
}
|
|
3081
|
-
function isMemo(object) {
|
|
3082
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
3083
|
-
}
|
|
3084
|
-
function isPortal(object) {
|
|
3085
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
3086
|
-
}
|
|
3087
|
-
function isProfiler(object) {
|
|
3088
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
3089
|
-
}
|
|
3090
|
-
function isStrictMode(object) {
|
|
3091
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
3092
|
-
}
|
|
3093
|
-
function isSuspense(object) {
|
|
3094
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
3098
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
3099
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
3100
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
3101
|
-
reactIs_development.Element = Element;
|
|
3102
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
3103
|
-
reactIs_development.Fragment = Fragment;
|
|
3104
|
-
reactIs_development.Lazy = Lazy;
|
|
3105
|
-
reactIs_development.Memo = Memo;
|
|
3106
|
-
reactIs_development.Portal = Portal;
|
|
3107
|
-
reactIs_development.Profiler = Profiler;
|
|
3108
|
-
reactIs_development.StrictMode = StrictMode;
|
|
3109
|
-
reactIs_development.Suspense = Suspense;
|
|
3110
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
3111
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
3112
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
3113
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
3114
|
-
reactIs_development.isElement = isElement;
|
|
3115
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
3116
|
-
reactIs_development.isFragment = isFragment;
|
|
3117
|
-
reactIs_development.isLazy = isLazy;
|
|
3118
|
-
reactIs_development.isMemo = isMemo;
|
|
3119
|
-
reactIs_development.isPortal = isPortal;
|
|
3120
|
-
reactIs_development.isProfiler = isProfiler;
|
|
3121
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
3122
|
-
reactIs_development.isSuspense = isSuspense;
|
|
3123
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
3124
|
-
reactIs_development.typeOf = typeOf;
|
|
3125
|
-
})();
|
|
3126
|
-
}
|
|
3127
|
-
return reactIs_development;
|
|
3128
|
-
}
|
|
3129
|
-
|
|
3130
|
-
(function (module) {
|
|
3131
|
-
|
|
3132
|
-
if (process.env.NODE_ENV === 'production') {
|
|
3133
|
-
module.exports = requireReactIs_production_min();
|
|
3134
|
-
} else {
|
|
3135
|
-
module.exports = requireReactIs_development();
|
|
3136
|
-
}
|
|
3137
|
-
} (reactIs$1));
|
|
3138
|
-
|
|
3139
|
-
var reactIs = reactIs$1.exports;
|
|
3140
|
-
|
|
3141
|
-
/**
|
|
3142
|
-
* Copyright 2015, Yahoo! Inc.
|
|
3143
|
-
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
|
3144
|
-
*/
|
|
3145
|
-
var REACT_STATICS = {
|
|
3146
|
-
childContextTypes: true,
|
|
3147
|
-
contextType: true,
|
|
3148
|
-
contextTypes: true,
|
|
3149
|
-
defaultProps: true,
|
|
3150
|
-
displayName: true,
|
|
3151
|
-
getDefaultProps: true,
|
|
3152
|
-
getDerivedStateFromError: true,
|
|
3153
|
-
getDerivedStateFromProps: true,
|
|
3154
|
-
mixins: true,
|
|
3155
|
-
propTypes: true,
|
|
3156
|
-
type: true
|
|
3157
|
-
};
|
|
3158
|
-
var KNOWN_STATICS = {
|
|
3159
|
-
name: true,
|
|
3160
|
-
length: true,
|
|
3161
|
-
prototype: true,
|
|
3162
|
-
caller: true,
|
|
3163
|
-
callee: true,
|
|
3164
|
-
arguments: true,
|
|
3165
|
-
arity: true
|
|
3166
|
-
};
|
|
3167
|
-
var FORWARD_REF_STATICS = {
|
|
3168
|
-
'$$typeof': true,
|
|
3169
|
-
render: true,
|
|
3170
|
-
defaultProps: true,
|
|
3171
|
-
displayName: true,
|
|
3172
|
-
propTypes: true
|
|
3173
|
-
};
|
|
3174
|
-
var MEMO_STATICS = {
|
|
3175
|
-
'$$typeof': true,
|
|
3176
|
-
compare: true,
|
|
3177
|
-
defaultProps: true,
|
|
3178
|
-
displayName: true,
|
|
3179
|
-
propTypes: true,
|
|
3180
|
-
type: true
|
|
3181
|
-
};
|
|
3182
|
-
var TYPE_STATICS = {};
|
|
3183
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
3184
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
3185
|
-
|
|
3186
|
-
function getStatics(component) {
|
|
3187
|
-
// React v16.11 and below
|
|
3188
|
-
if (reactIs.isMemo(component)) {
|
|
3189
|
-
return MEMO_STATICS;
|
|
3190
|
-
} // React v16.12 and above
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
|
3194
|
-
}
|
|
3195
|
-
|
|
3196
|
-
var defineProperty = Object.defineProperty;
|
|
3197
|
-
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
3198
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
3199
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
3200
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
3201
|
-
var objectPrototype = Object.prototype;
|
|
3202
|
-
function hoistNonReactStatics$2(targetComponent, sourceComponent, blacklist) {
|
|
3203
|
-
if (typeof sourceComponent !== 'string') {
|
|
3204
|
-
// don't hoist over string (html) components
|
|
3205
|
-
if (objectPrototype) {
|
|
3206
|
-
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
3207
|
-
|
|
3208
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
3209
|
-
hoistNonReactStatics$2(targetComponent, inheritedComponent, blacklist);
|
|
3210
|
-
}
|
|
3211
|
-
}
|
|
3212
|
-
|
|
3213
|
-
var keys = getOwnPropertyNames(sourceComponent);
|
|
3214
|
-
|
|
3215
|
-
if (getOwnPropertySymbols) {
|
|
3216
|
-
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
|
-
var targetStatics = getStatics(targetComponent);
|
|
3220
|
-
var sourceStatics = getStatics(sourceComponent);
|
|
3221
|
-
|
|
3222
|
-
for (var i = 0; i < keys.length; ++i) {
|
|
3223
|
-
var key = keys[i];
|
|
3224
|
-
|
|
3225
|
-
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
3226
|
-
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
3227
|
-
|
|
3228
|
-
try {
|
|
3229
|
-
// Avoid failures from read-only properties
|
|
3230
|
-
defineProperty(targetComponent, key, descriptor);
|
|
3231
|
-
} catch (e) {}
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3236
|
-
return targetComponent;
|
|
3237
|
-
}
|
|
3238
|
-
|
|
3239
|
-
var hoistNonReactStatics_cjs = hoistNonReactStatics$2;
|
|
3240
|
-
|
|
3241
|
-
// this file isolates this package that is not tree-shakeable
|
|
3242
|
-
// and if this module doesn't actually contain any logic of its own
|
|
3243
|
-
// then Rollup just use 'hoist-non-react-statics' directly in other chunks
|
|
3244
|
-
|
|
3245
|
-
var hoistNonReactStatics = (function (targetComponent, sourceComponent) {
|
|
3246
|
-
return hoistNonReactStatics_cjs(targetComponent, sourceComponent);
|
|
3247
|
-
});
|
|
3248
|
-
|
|
3249
|
-
var hoistNonReactStatics$1 = hoistNonReactStatics;
|
|
3250
|
-
|
|
3251
|
-
var isBrowser$1 = typeof document !== 'undefined';
|
|
3252
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
3253
|
-
|
|
3254
|
-
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
3255
|
-
// because this module is primarily intended for the browser and node
|
|
3256
|
-
// but it's also required in react native and similar environments sometimes
|
|
3257
|
-
// and we could have a special build just for that
|
|
3258
|
-
// but this is much easier and the native packages
|
|
3259
|
-
// might use a different theme context in the future anyway
|
|
3260
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
3261
|
-
key: 'css'
|
|
3262
|
-
}) : null);
|
|
3263
|
-
|
|
3264
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3265
|
-
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
3266
|
-
}
|
|
3267
|
-
|
|
3268
|
-
var CacheProvider = EmotionCacheContext.Provider;
|
|
3269
|
-
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
3270
|
-
return useContext(EmotionCacheContext);
|
|
3271
|
-
};
|
|
3272
|
-
|
|
3273
|
-
var withEmotionCache = function withEmotionCache(func) {
|
|
3274
|
-
// $FlowFixMe
|
|
3275
|
-
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
3276
|
-
// the cache will never be null in the browser
|
|
3277
|
-
var cache = useContext(EmotionCacheContext);
|
|
3278
|
-
return func(props, cache, ref);
|
|
3279
|
-
});
|
|
3280
|
-
};
|
|
3281
|
-
|
|
3282
|
-
if (!isBrowser$1) {
|
|
2506
|
+
if (!isBrowser) {
|
|
3283
2507
|
withEmotionCache = function withEmotionCache(func) {
|
|
3284
2508
|
return function (props) {
|
|
3285
2509
|
var cache = useContext(EmotionCacheContext);
|
|
@@ -3301,593 +2525,50 @@ if (!isBrowser$1) {
|
|
|
3301
2525
|
}
|
|
3302
2526
|
};
|
|
3303
2527
|
};
|
|
3304
|
-
}
|
|
3305
|
-
|
|
3306
|
-
var ThemeContext = /* #__PURE__ */createContext({});
|
|
3307
|
-
|
|
3308
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3309
|
-
ThemeContext.displayName = 'EmotionThemeContext';
|
|
3310
|
-
}
|
|
3311
|
-
|
|
3312
|
-
var useTheme = function useTheme() {
|
|
3313
|
-
return useContext(ThemeContext);
|
|
3314
|
-
};
|
|
3315
|
-
|
|
3316
|
-
var getTheme = function getTheme(outerTheme, theme) {
|
|
3317
|
-
if (typeof theme === 'function') {
|
|
3318
|
-
var mergedTheme = theme(outerTheme);
|
|
3319
|
-
|
|
3320
|
-
if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
|
|
3321
|
-
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
|
|
3322
|
-
}
|
|
3323
|
-
|
|
3324
|
-
return mergedTheme;
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
|
-
if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
|
|
3328
|
-
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
return _extends({}, outerTheme, theme);
|
|
3332
|
-
};
|
|
3333
|
-
|
|
3334
|
-
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
|
|
3335
|
-
return weakMemoize(function (theme) {
|
|
3336
|
-
return getTheme(outerTheme, theme);
|
|
3337
|
-
});
|
|
3338
|
-
});
|
|
3339
|
-
var ThemeProvider = function ThemeProvider(props) {
|
|
3340
|
-
var theme = useContext(ThemeContext);
|
|
3341
|
-
|
|
3342
|
-
if (props.theme !== theme) {
|
|
3343
|
-
theme = createCacheWithTheme(theme)(props.theme);
|
|
3344
|
-
}
|
|
3345
|
-
|
|
3346
|
-
return /*#__PURE__*/createElement(ThemeContext.Provider, {
|
|
3347
|
-
value: theme
|
|
3348
|
-
}, props.children);
|
|
3349
|
-
};
|
|
3350
|
-
function withTheme(Component) {
|
|
3351
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
3352
|
-
|
|
3353
|
-
var render = function render(props, ref) {
|
|
3354
|
-
var theme = useContext(ThemeContext);
|
|
3355
|
-
return /*#__PURE__*/createElement(Component, _extends({
|
|
3356
|
-
theme: theme,
|
|
3357
|
-
ref: ref
|
|
3358
|
-
}, props));
|
|
3359
|
-
}; // $FlowFixMe
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
var WithTheme = /*#__PURE__*/forwardRef(render);
|
|
3363
|
-
WithTheme.displayName = "WithTheme(" + componentName + ")";
|
|
3364
|
-
return hoistNonReactStatics$1(WithTheme, Component);
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
var getLastPart = function getLastPart(functionName) {
|
|
3368
|
-
// The match may be something like 'Object.createEmotionProps' or
|
|
3369
|
-
// 'Loader.prototype.render'
|
|
3370
|
-
var parts = functionName.split('.');
|
|
3371
|
-
return parts[parts.length - 1];
|
|
3372
|
-
};
|
|
3373
|
-
|
|
3374
|
-
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
|
|
3375
|
-
// V8
|
|
3376
|
-
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
|
|
3377
|
-
if (match) return getLastPart(match[1]); // Safari / Firefox
|
|
3378
|
-
|
|
3379
|
-
match = /^([A-Za-z0-9$.]+)@/.exec(line);
|
|
3380
|
-
if (match) return getLastPart(match[1]);
|
|
3381
|
-
return undefined;
|
|
3382
|
-
};
|
|
3383
|
-
|
|
3384
|
-
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
|
|
3385
|
-
// identifiers, thus we only need to replace what is a valid character for JS,
|
|
3386
|
-
// but not for CSS.
|
|
3387
|
-
|
|
3388
|
-
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
3389
|
-
return identifier.replace(/\$/g, '-');
|
|
3390
|
-
};
|
|
3391
|
-
|
|
3392
|
-
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
|
|
3393
|
-
if (!stackTrace) return undefined;
|
|
3394
|
-
var lines = stackTrace.split('\n');
|
|
3395
|
-
|
|
3396
|
-
for (var i = 0; i < lines.length; i++) {
|
|
3397
|
-
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
|
|
3398
|
-
|
|
3399
|
-
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
|
|
3400
|
-
|
|
3401
|
-
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
|
|
3402
|
-
// uppercase letter
|
|
3403
|
-
|
|
3404
|
-
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
return undefined;
|
|
3408
|
-
};
|
|
3409
|
-
|
|
3410
|
-
var isBrowser$1$1 = typeof document !== 'undefined';
|
|
3411
|
-
var useInsertionEffect$1 = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {
|
|
3412
|
-
create();
|
|
3413
|
-
};
|
|
3414
|
-
function useInsertionEffectMaybe(create) {
|
|
3415
|
-
if (!isBrowser$1$1) {
|
|
3416
|
-
return create();
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
useInsertionEffect$1(create);
|
|
3420
|
-
}
|
|
3421
|
-
|
|
3422
|
-
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
3423
|
-
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
3424
|
-
var createEmotionProps = function createEmotionProps(type, props) {
|
|
3425
|
-
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
|
|
3426
|
-
props.css.indexOf(':') !== -1) {
|
|
3427
|
-
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
var newProps = {};
|
|
3431
|
-
|
|
3432
|
-
for (var key in props) {
|
|
3433
|
-
if (hasOwnProperty.call(props, key)) {
|
|
3434
|
-
newProps[key] = props[key];
|
|
3435
|
-
}
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
|
|
3439
|
-
// the label hasn't already been computed
|
|
3440
|
-
|
|
3441
|
-
if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
|
|
3442
|
-
var label = getLabelFromStackTrace(new Error().stack);
|
|
3443
|
-
if (label) newProps[labelPropName] = label;
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
return newProps;
|
|
3447
|
-
};
|
|
3448
|
-
|
|
3449
|
-
var Insertion$1 = function Insertion(_ref) {
|
|
3450
|
-
var cache = _ref.cache,
|
|
3451
|
-
serialized = _ref.serialized,
|
|
3452
|
-
isStringTag = _ref.isStringTag;
|
|
3453
|
-
registerStyles(cache, serialized, isStringTag);
|
|
3454
|
-
var rules = useInsertionEffectMaybe(function () {
|
|
3455
|
-
return insertStyles(cache, serialized, isStringTag);
|
|
3456
|
-
});
|
|
3457
|
-
|
|
3458
|
-
if (!isBrowser$1 && rules !== undefined) {
|
|
3459
|
-
var _ref2;
|
|
3460
|
-
|
|
3461
|
-
var serializedNames = serialized.name;
|
|
3462
|
-
var next = serialized.next;
|
|
3463
|
-
|
|
3464
|
-
while (next !== undefined) {
|
|
3465
|
-
serializedNames += ' ' + next.name;
|
|
3466
|
-
next = next.next;
|
|
3467
|
-
}
|
|
3468
|
-
|
|
3469
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
3470
|
-
__html: rules
|
|
3471
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
3472
|
-
}
|
|
3473
|
-
|
|
3474
|
-
return null;
|
|
3475
|
-
};
|
|
3476
|
-
|
|
3477
|
-
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
3478
|
-
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
3479
|
-
// not passing the registered cache to serializeStyles because it would
|
|
3480
|
-
// make certain babel optimisations not possible
|
|
3481
|
-
|
|
3482
|
-
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
3483
|
-
cssProp = cache.registered[cssProp];
|
|
3484
|
-
}
|
|
3485
|
-
|
|
3486
|
-
var WrappedComponent = props[typePropName];
|
|
3487
|
-
var registeredStyles = [cssProp];
|
|
3488
|
-
var className = '';
|
|
3489
|
-
|
|
3490
|
-
if (typeof props.className === 'string') {
|
|
3491
|
-
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
3492
|
-
} else if (props.className != null) {
|
|
3493
|
-
className = props.className + " ";
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
3497
|
-
|
|
3498
|
-
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
3499
|
-
var labelFromStack = props[labelPropName];
|
|
3500
|
-
|
|
3501
|
-
if (labelFromStack) {
|
|
3502
|
-
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
className += cache.key + "-" + serialized.name;
|
|
3507
|
-
var newProps = {};
|
|
3508
|
-
|
|
3509
|
-
for (var key in props) {
|
|
3510
|
-
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
3511
|
-
newProps[key] = props[key];
|
|
3512
|
-
}
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
newProps.ref = ref;
|
|
3516
|
-
newProps.className = className;
|
|
3517
|
-
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion$1, {
|
|
3518
|
-
cache: cache,
|
|
3519
|
-
serialized: serialized,
|
|
3520
|
-
isStringTag: typeof WrappedComponent === 'string'
|
|
3521
|
-
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
3522
|
-
});
|
|
3523
|
-
|
|
3524
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3525
|
-
Emotion.displayName = 'EmotionCssPropInternal';
|
|
3526
|
-
}
|
|
3527
|
-
|
|
3528
|
-
var pkg = {
|
|
3529
|
-
name: "@emotion/react",
|
|
3530
|
-
version: "11.10.0",
|
|
3531
|
-
main: "dist/emotion-react.cjs.js",
|
|
3532
|
-
module: "dist/emotion-react.esm.js",
|
|
3533
|
-
browser: {
|
|
3534
|
-
"./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js"
|
|
3535
|
-
},
|
|
3536
|
-
exports: {
|
|
3537
|
-
".": {
|
|
3538
|
-
module: {
|
|
3539
|
-
worker: "./dist/emotion-react.worker.esm.js",
|
|
3540
|
-
browser: "./dist/emotion-react.browser.esm.js",
|
|
3541
|
-
"default": "./dist/emotion-react.esm.js"
|
|
3542
|
-
},
|
|
3543
|
-
"default": "./dist/emotion-react.cjs.js"
|
|
3544
|
-
},
|
|
3545
|
-
"./jsx-runtime": {
|
|
3546
|
-
module: {
|
|
3547
|
-
worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",
|
|
3548
|
-
browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
|
|
3549
|
-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"
|
|
3550
|
-
},
|
|
3551
|
-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
|
|
3552
|
-
},
|
|
3553
|
-
"./_isolated-hnrs": {
|
|
3554
|
-
module: {
|
|
3555
|
-
worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",
|
|
3556
|
-
browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
|
|
3557
|
-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"
|
|
3558
|
-
},
|
|
3559
|
-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
|
|
3560
|
-
},
|
|
3561
|
-
"./jsx-dev-runtime": {
|
|
3562
|
-
module: {
|
|
3563
|
-
worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",
|
|
3564
|
-
browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
|
|
3565
|
-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"
|
|
3566
|
-
},
|
|
3567
|
-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
|
|
3568
|
-
},
|
|
3569
|
-
"./package.json": "./package.json",
|
|
3570
|
-
"./types/css-prop": "./types/css-prop.d.ts",
|
|
3571
|
-
"./macro": "./macro.js"
|
|
3572
|
-
},
|
|
3573
|
-
types: "types/index.d.ts",
|
|
3574
|
-
files: [
|
|
3575
|
-
"src",
|
|
3576
|
-
"dist",
|
|
3577
|
-
"jsx-runtime",
|
|
3578
|
-
"jsx-dev-runtime",
|
|
3579
|
-
"_isolated-hnrs",
|
|
3580
|
-
"types/*.d.ts",
|
|
3581
|
-
"macro.js",
|
|
3582
|
-
"macro.d.ts",
|
|
3583
|
-
"macro.js.flow"
|
|
3584
|
-
],
|
|
3585
|
-
sideEffects: false,
|
|
3586
|
-
author: "Emotion Contributors",
|
|
3587
|
-
license: "MIT",
|
|
3588
|
-
scripts: {
|
|
3589
|
-
"test:typescript": "dtslint types"
|
|
3590
|
-
},
|
|
3591
|
-
dependencies: {
|
|
3592
|
-
"@babel/runtime": "^7.18.3",
|
|
3593
|
-
"@emotion/babel-plugin": "^11.10.0",
|
|
3594
|
-
"@emotion/cache": "^11.10.0",
|
|
3595
|
-
"@emotion/serialize": "^1.1.0",
|
|
3596
|
-
"@emotion/utils": "^1.2.0",
|
|
3597
|
-
"@emotion/weak-memoize": "^0.3.0",
|
|
3598
|
-
"hoist-non-react-statics": "^3.3.1"
|
|
3599
|
-
},
|
|
3600
|
-
peerDependencies: {
|
|
3601
|
-
"@babel/core": "^7.0.0",
|
|
3602
|
-
react: ">=16.8.0"
|
|
3603
|
-
},
|
|
3604
|
-
peerDependenciesMeta: {
|
|
3605
|
-
"@babel/core": {
|
|
3606
|
-
optional: true
|
|
3607
|
-
},
|
|
3608
|
-
"@types/react": {
|
|
3609
|
-
optional: true
|
|
3610
|
-
}
|
|
3611
|
-
},
|
|
3612
|
-
devDependencies: {
|
|
3613
|
-
"@babel/core": "^7.18.5",
|
|
3614
|
-
"@definitelytyped/dtslint": "0.0.112",
|
|
3615
|
-
"@emotion/css": "11.10.0",
|
|
3616
|
-
"@emotion/css-prettifier": "1.1.0",
|
|
3617
|
-
"@emotion/server": "11.10.0",
|
|
3618
|
-
"@emotion/styled": "11.10.0",
|
|
3619
|
-
"html-tag-names": "^1.1.2",
|
|
3620
|
-
react: "16.14.0",
|
|
3621
|
-
"svg-tag-names": "^1.1.1",
|
|
3622
|
-
typescript: "^4.5.5"
|
|
3623
|
-
},
|
|
3624
|
-
repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
|
|
3625
|
-
publishConfig: {
|
|
3626
|
-
access: "public"
|
|
3627
|
-
},
|
|
3628
|
-
"umd:main": "dist/emotion-react.umd.min.js",
|
|
3629
|
-
preconstruct: {
|
|
3630
|
-
entrypoints: [
|
|
3631
|
-
"./index.js",
|
|
3632
|
-
"./jsx-runtime.js",
|
|
3633
|
-
"./jsx-dev-runtime.js",
|
|
3634
|
-
"./_isolated-hnrs.js"
|
|
3635
|
-
],
|
|
3636
|
-
umdName: "emotionReact",
|
|
3637
|
-
exports: {
|
|
3638
|
-
envConditions: [
|
|
3639
|
-
"browser",
|
|
3640
|
-
"worker"
|
|
3641
|
-
],
|
|
3642
|
-
extra: {
|
|
3643
|
-
"./types/css-prop": "./types/css-prop.d.ts",
|
|
3644
|
-
"./macro": "./macro.js"
|
|
3645
|
-
}
|
|
3646
|
-
}
|
|
3647
|
-
}
|
|
3648
|
-
};
|
|
3649
|
-
|
|
3650
|
-
var jsx = function jsx(type, props) {
|
|
3651
|
-
var args = arguments;
|
|
3652
|
-
|
|
3653
|
-
if (props == null || !hasOwnProperty.call(props, 'css')) {
|
|
3654
|
-
// $FlowFixMe
|
|
3655
|
-
return createElement.apply(undefined, args);
|
|
3656
|
-
}
|
|
3657
|
-
|
|
3658
|
-
var argsLength = args.length;
|
|
3659
|
-
var createElementArgArray = new Array(argsLength);
|
|
3660
|
-
createElementArgArray[0] = Emotion;
|
|
3661
|
-
createElementArgArray[1] = createEmotionProps(type, props);
|
|
3662
|
-
|
|
3663
|
-
for (var i = 2; i < argsLength; i++) {
|
|
3664
|
-
createElementArgArray[i] = args[i];
|
|
3665
|
-
} // $FlowFixMe
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
return createElement.apply(null, createElementArgArray);
|
|
3669
|
-
};
|
|
3670
|
-
|
|
3671
|
-
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : useLayoutEffect;
|
|
3672
|
-
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
3673
|
-
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
3674
|
-
// initial client-side render from SSR, use place of hydrating tag
|
|
3675
|
-
|
|
3676
|
-
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
3677
|
-
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
|
|
3678
|
-
// probably using the custom createElement which
|
|
3679
|
-
// means it will be turned into a className prop
|
|
3680
|
-
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
3681
|
-
props.className || props.css)) {
|
|
3682
|
-
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
3683
|
-
warnedAboutCssPropForGlobal = true;
|
|
3684
|
-
}
|
|
3685
|
-
|
|
3686
|
-
var styles = props.styles;
|
|
3687
|
-
var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));
|
|
3688
|
-
|
|
3689
|
-
if (!isBrowser$1) {
|
|
3690
|
-
var _ref;
|
|
3691
|
-
|
|
3692
|
-
var serializedNames = serialized.name;
|
|
3693
|
-
var serializedStyles = serialized.styles;
|
|
3694
|
-
var next = serialized.next;
|
|
3695
|
-
|
|
3696
|
-
while (next !== undefined) {
|
|
3697
|
-
serializedNames += ' ' + next.name;
|
|
3698
|
-
serializedStyles += next.styles;
|
|
3699
|
-
next = next.next;
|
|
3700
|
-
}
|
|
3701
|
-
|
|
3702
|
-
var shouldCache = cache.compat === true;
|
|
3703
|
-
var rules = cache.insert("", {
|
|
3704
|
-
name: serializedNames,
|
|
3705
|
-
styles: serializedStyles
|
|
3706
|
-
}, cache.sheet, shouldCache);
|
|
3707
|
-
|
|
3708
|
-
if (shouldCache) {
|
|
3709
|
-
return null;
|
|
3710
|
-
}
|
|
3711
|
-
|
|
3712
|
-
return /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
3713
|
-
__html: rules
|
|
3714
|
-
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
3715
|
-
} // yes, i know these hooks are used conditionally
|
|
3716
|
-
// but it is based on a constant that will never change at runtime
|
|
3717
|
-
// it's effectively like having two implementations and switching them out
|
|
3718
|
-
// so it's not actually breaking anything
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
var sheetRef = useRef();
|
|
3722
|
-
useInsertionEffect(function () {
|
|
3723
|
-
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
3724
|
-
|
|
3725
|
-
var sheet = new cache.sheet.constructor({
|
|
3726
|
-
key: key,
|
|
3727
|
-
nonce: cache.sheet.nonce,
|
|
3728
|
-
container: cache.sheet.container,
|
|
3729
|
-
speedy: cache.sheet.isSpeedy
|
|
3730
|
-
});
|
|
3731
|
-
var rehydrating = false; // $FlowFixMe
|
|
3732
|
-
|
|
3733
|
-
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
|
|
3734
|
-
|
|
3735
|
-
if (cache.sheet.tags.length) {
|
|
3736
|
-
sheet.before = cache.sheet.tags[0];
|
|
3737
|
-
}
|
|
3738
|
-
|
|
3739
|
-
if (node !== null) {
|
|
3740
|
-
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
|
|
3741
|
-
|
|
3742
|
-
node.setAttribute('data-emotion', key);
|
|
3743
|
-
sheet.hydrate([node]);
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
|
-
sheetRef.current = [sheet, rehydrating];
|
|
3747
|
-
return function () {
|
|
3748
|
-
sheet.flush();
|
|
3749
|
-
};
|
|
3750
|
-
}, [cache]);
|
|
3751
|
-
useInsertionEffect(function () {
|
|
3752
|
-
var sheetRefCurrent = sheetRef.current;
|
|
3753
|
-
var sheet = sheetRefCurrent[0],
|
|
3754
|
-
rehydrating = sheetRefCurrent[1];
|
|
3755
|
-
|
|
3756
|
-
if (rehydrating) {
|
|
3757
|
-
sheetRefCurrent[1] = false;
|
|
3758
|
-
return;
|
|
3759
|
-
}
|
|
3760
|
-
|
|
3761
|
-
if (serialized.next !== undefined) {
|
|
3762
|
-
// insert keyframes
|
|
3763
|
-
insertStyles(cache, serialized.next, true);
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
if (sheet.tags.length) {
|
|
3767
|
-
// if this doesn't exist then it will be null so the style element will be appended
|
|
3768
|
-
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
|
|
3769
|
-
sheet.before = element;
|
|
3770
|
-
sheet.flush();
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
|
-
cache.insert("", serialized, sheet, false);
|
|
3774
|
-
}, [cache, serialized.name]);
|
|
3775
|
-
return null;
|
|
3776
|
-
});
|
|
3777
|
-
|
|
3778
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3779
|
-
Global.displayName = 'EmotionGlobal';
|
|
3780
|
-
}
|
|
3781
|
-
|
|
3782
|
-
function css() {
|
|
3783
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3784
|
-
args[_key] = arguments[_key];
|
|
3785
|
-
}
|
|
3786
|
-
|
|
3787
|
-
return serializeStyles(args);
|
|
3788
|
-
}
|
|
3789
|
-
|
|
3790
|
-
var keyframes = function keyframes() {
|
|
3791
|
-
var insertable = css.apply(void 0, arguments);
|
|
3792
|
-
var name = "animation-" + insertable.name; // $FlowFixMe
|
|
3793
|
-
|
|
3794
|
-
return {
|
|
3795
|
-
name: name,
|
|
3796
|
-
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
3797
|
-
anim: 1,
|
|
3798
|
-
toString: function toString() {
|
|
3799
|
-
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
3800
|
-
}
|
|
3801
|
-
};
|
|
3802
|
-
};
|
|
3803
|
-
|
|
3804
|
-
var classnames = function classnames(args) {
|
|
3805
|
-
var len = args.length;
|
|
3806
|
-
var i = 0;
|
|
3807
|
-
var cls = '';
|
|
3808
|
-
|
|
3809
|
-
for (; i < len; i++) {
|
|
3810
|
-
var arg = args[i];
|
|
3811
|
-
if (arg == null) continue;
|
|
3812
|
-
var toAdd = void 0;
|
|
3813
|
-
|
|
3814
|
-
switch (typeof arg) {
|
|
3815
|
-
case 'boolean':
|
|
3816
|
-
break;
|
|
3817
|
-
|
|
3818
|
-
case 'object':
|
|
3819
|
-
{
|
|
3820
|
-
if (Array.isArray(arg)) {
|
|
3821
|
-
toAdd = classnames(arg);
|
|
3822
|
-
} else {
|
|
3823
|
-
if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
|
|
3824
|
-
console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
|
|
3825
|
-
}
|
|
3826
|
-
|
|
3827
|
-
toAdd = '';
|
|
3828
|
-
|
|
3829
|
-
for (var k in arg) {
|
|
3830
|
-
if (arg[k] && k) {
|
|
3831
|
-
toAdd && (toAdd += ' ');
|
|
3832
|
-
toAdd += k;
|
|
3833
|
-
}
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
|
|
3837
|
-
break;
|
|
3838
|
-
}
|
|
2528
|
+
}
|
|
3839
2529
|
|
|
3840
|
-
|
|
3841
|
-
{
|
|
3842
|
-
toAdd = arg;
|
|
3843
|
-
}
|
|
3844
|
-
}
|
|
2530
|
+
var ThemeContext = /* #__PURE__ */createContext({});
|
|
3845
2531
|
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
}
|
|
3850
|
-
}
|
|
2532
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2533
|
+
ThemeContext.displayName = 'EmotionThemeContext';
|
|
2534
|
+
}
|
|
3851
2535
|
|
|
3852
|
-
|
|
2536
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
2537
|
+
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : function useInsertionEffect(create) {
|
|
2538
|
+
create();
|
|
3853
2539
|
};
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
3858
|
-
|
|
3859
|
-
if (registeredStyles.length < 2) {
|
|
3860
|
-
return className;
|
|
2540
|
+
function useInsertionEffectMaybe(create) {
|
|
2541
|
+
if (!isBrowser$1) {
|
|
2542
|
+
return create();
|
|
3861
2543
|
}
|
|
3862
2544
|
|
|
3863
|
-
|
|
2545
|
+
useInsertionEffect(create);
|
|
3864
2546
|
}
|
|
3865
2547
|
|
|
2548
|
+
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
2549
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
2550
|
+
|
|
3866
2551
|
var Insertion = function Insertion(_ref) {
|
|
3867
2552
|
var cache = _ref.cache,
|
|
3868
|
-
|
|
2553
|
+
serialized = _ref.serialized,
|
|
2554
|
+
isStringTag = _ref.isStringTag;
|
|
2555
|
+
registerStyles(cache, serialized, isStringTag);
|
|
3869
2556
|
var rules = useInsertionEffectMaybe(function () {
|
|
3870
|
-
|
|
2557
|
+
return insertStyles(cache, serialized, isStringTag);
|
|
2558
|
+
});
|
|
3871
2559
|
|
|
3872
|
-
|
|
3873
|
-
|
|
2560
|
+
if (!isBrowser && rules !== undefined) {
|
|
2561
|
+
var _ref2;
|
|
3874
2562
|
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
2563
|
+
var serializedNames = serialized.name;
|
|
2564
|
+
var next = serialized.next;
|
|
3879
2565
|
|
|
3880
|
-
|
|
3881
|
-
|
|
2566
|
+
while (next !== undefined) {
|
|
2567
|
+
serializedNames += ' ' + next.name;
|
|
2568
|
+
next = next.next;
|
|
3882
2569
|
}
|
|
3883
|
-
});
|
|
3884
|
-
|
|
3885
|
-
if (!isBrowser$1 && rules.length !== 0) {
|
|
3886
|
-
var _ref2;
|
|
3887
2570
|
|
|
3888
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " +
|
|
3889
|
-
return serialized.name;
|
|
3890
|
-
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2571
|
+
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
3891
2572
|
__html: rules
|
|
3892
2573
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
3893
2574
|
}
|
|
@@ -3895,164 +2576,295 @@ var Insertion = function Insertion(_ref) {
|
|
|
3895
2576
|
return null;
|
|
3896
2577
|
};
|
|
3897
2578
|
|
|
3898
|
-
var
|
|
3899
|
-
var
|
|
3900
|
-
|
|
2579
|
+
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
2580
|
+
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2581
|
+
// not passing the registered cache to serializeStyles because it would
|
|
2582
|
+
// make certain babel optimisations not possible
|
|
3901
2583
|
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
}
|
|
2584
|
+
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
2585
|
+
cssProp = cache.registered[cssProp];
|
|
2586
|
+
}
|
|
3906
2587
|
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
2588
|
+
var WrappedComponent = props[typePropName];
|
|
2589
|
+
var registeredStyles = [cssProp];
|
|
2590
|
+
var className = '';
|
|
3910
2591
|
|
|
3911
|
-
|
|
3912
|
-
|
|
2592
|
+
if (typeof props.className === 'string') {
|
|
2593
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
2594
|
+
} else if (props.className != null) {
|
|
2595
|
+
className = props.className + " ";
|
|
2596
|
+
}
|
|
3913
2597
|
|
|
3914
|
-
|
|
3915
|
-
return cache.key + "-" + serialized.name;
|
|
3916
|
-
};
|
|
2598
|
+
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
3917
2599
|
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
throw new Error('cx can only be used during render');
|
|
3921
|
-
}
|
|
2600
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
2601
|
+
var labelFromStack = props[labelPropName];
|
|
3922
2602
|
|
|
3923
|
-
|
|
3924
|
-
|
|
2603
|
+
if (labelFromStack) {
|
|
2604
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
3925
2605
|
}
|
|
2606
|
+
}
|
|
3926
2607
|
|
|
3927
|
-
|
|
3928
|
-
};
|
|
2608
|
+
className += cache.key + "-" + serialized.name;
|
|
2609
|
+
var newProps = {};
|
|
3929
2610
|
|
|
3930
|
-
var
|
|
3931
|
-
css
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
}
|
|
3935
|
-
|
|
3936
|
-
|
|
2611
|
+
for (var key in props) {
|
|
2612
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2613
|
+
newProps[key] = props[key];
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
newProps.ref = ref;
|
|
2618
|
+
newProps.className = className;
|
|
3937
2619
|
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {
|
|
3938
2620
|
cache: cache,
|
|
3939
|
-
|
|
3940
|
-
|
|
2621
|
+
serialized: serialized,
|
|
2622
|
+
isStringTag: typeof WrappedComponent === 'string'
|
|
2623
|
+
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
3941
2624
|
});
|
|
3942
2625
|
|
|
3943
2626
|
if (process.env.NODE_ENV !== 'production') {
|
|
3944
|
-
|
|
2627
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
|
3945
2628
|
}
|
|
3946
2629
|
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
2630
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2631
|
+
let counter = 0;
|
|
2632
|
+
function createMakeStyles(params) {
|
|
2633
|
+
const { useTheme, cache: cacheProvidedAtInception } = params;
|
|
2634
|
+
function useCache() {
|
|
2635
|
+
var _a;
|
|
2636
|
+
const contextualCache = __unsafe_useEmotionCache();
|
|
2637
|
+
const cacheExplicitlyProvidedForTss = useCacheProvidedByProvider();
|
|
2638
|
+
const cacheToBeUsed = (_a = cacheProvidedAtInception !== null && cacheProvidedAtInception !== void 0 ? cacheProvidedAtInception : cacheExplicitlyProvidedForTss) !== null && _a !== void 0 ? _a : contextualCache;
|
|
2639
|
+
if (cacheToBeUsed === null) {
|
|
2640
|
+
throw new Error([
|
|
2641
|
+
"In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.",
|
|
2642
|
+
"MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,",
|
|
2643
|
+
"MUI needs an Emotion cache to be provided for SSR to work.",
|
|
2644
|
+
"Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/",
|
|
2645
|
+
"TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr",
|
|
2646
|
+
].join("\n"));
|
|
2647
|
+
}
|
|
2648
|
+
return cacheToBeUsed;
|
|
3961
2649
|
}
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
2650
|
+
const { useCssAndCx } = createUseCssAndCx({ useCache });
|
|
2651
|
+
/** returns useStyle. */
|
|
2652
|
+
function makeStyles(params) {
|
|
2653
|
+
const { name: nameOrWrappedName, uniqId = counter++ } = params !== null && params !== void 0 ? params : {};
|
|
2654
|
+
const name = typeof nameOrWrappedName !== "object"
|
|
2655
|
+
? nameOrWrappedName
|
|
2656
|
+
: Object.keys(nameOrWrappedName)[0];
|
|
2657
|
+
return function (cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2658
|
+
const getCssObjectByRuleName = typeof cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2659
|
+
"function"
|
|
2660
|
+
? cssObjectByRuleNameOrGetCssObjectByRuleName
|
|
2661
|
+
: () => cssObjectByRuleNameOrGetCssObjectByRuleName;
|
|
2662
|
+
return function useStyles(params, styleOverrides) {
|
|
2663
|
+
var _a, _b;
|
|
2664
|
+
const theme = useTheme();
|
|
2665
|
+
const { css, cx } = useCssAndCx();
|
|
2666
|
+
const cache = useCache();
|
|
2667
|
+
let classes = useMemo$1(() => {
|
|
2668
|
+
const refClassesCache = {};
|
|
2669
|
+
const refClasses = typeof Proxy !== "undefined" &&
|
|
2670
|
+
new Proxy({}, {
|
|
2671
|
+
"get": (_target, propertyKey) => {
|
|
2672
|
+
if (typeof propertyKey === "symbol") {
|
|
2673
|
+
assert(false);
|
|
2674
|
+
}
|
|
2675
|
+
return (refClassesCache[propertyKey] = `${cache.key}-${uniqId}${name !== undefined ? `-${name}` : ""}-${propertyKey}-ref`);
|
|
2676
|
+
},
|
|
2677
|
+
});
|
|
2678
|
+
const cssObjectByRuleName = getCssObjectByRuleName(theme, params, refClasses || {});
|
|
2679
|
+
const classes = objectFromEntries(objectKeys(cssObjectByRuleName).map(ruleName => {
|
|
2680
|
+
const cssObject = cssObjectByRuleName[ruleName];
|
|
2681
|
+
if (!cssObject.label) {
|
|
2682
|
+
cssObject.label = `${name !== undefined ? `${name}-` : ""}${ruleName}`;
|
|
2683
|
+
}
|
|
2684
|
+
return [
|
|
2685
|
+
ruleName,
|
|
2686
|
+
`${css(cssObject)}${typeGuard(ruleName, ruleName in refClassesCache)
|
|
2687
|
+
? ` ${refClassesCache[ruleName]}`
|
|
2688
|
+
: ""}`,
|
|
2689
|
+
];
|
|
2690
|
+
}));
|
|
2691
|
+
objectKeys(refClassesCache).forEach(ruleName => {
|
|
2692
|
+
if (ruleName in classes) {
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
classes[ruleName] =
|
|
2696
|
+
refClassesCache[ruleName];
|
|
2697
|
+
});
|
|
2698
|
+
return classes;
|
|
2699
|
+
}, [cache, css, cx, theme, getDependencyArrayRef(params)]);
|
|
2700
|
+
const propsClasses = styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props.classes;
|
|
2701
|
+
classes = useMemo$1(() => mergeClasses(classes, propsClasses, cx), [classes, getDependencyArrayRef(propsClasses), cx]);
|
|
2702
|
+
{
|
|
2703
|
+
let cssObjectByRuleNameOrGetCssObjectByRuleName = undefined;
|
|
2704
|
+
try {
|
|
2705
|
+
cssObjectByRuleNameOrGetCssObjectByRuleName =
|
|
2706
|
+
name !== undefined
|
|
2707
|
+
? (_b = (_a = theme.components) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.styleOverrides
|
|
2708
|
+
: undefined;
|
|
2709
|
+
// eslint-disable-next-line no-empty
|
|
2710
|
+
}
|
|
2711
|
+
catch (_c) { }
|
|
2712
|
+
const themeClasses = useMemo$1(() => {
|
|
2713
|
+
if (!cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2714
|
+
return undefined;
|
|
2715
|
+
}
|
|
2716
|
+
const themeClasses = {};
|
|
2717
|
+
for (const ruleName in cssObjectByRuleNameOrGetCssObjectByRuleName) {
|
|
2718
|
+
const cssObjectOrGetCssObject = cssObjectByRuleNameOrGetCssObjectByRuleName[ruleName];
|
|
2719
|
+
if (!(cssObjectOrGetCssObject instanceof Object)) {
|
|
2720
|
+
continue;
|
|
2721
|
+
}
|
|
2722
|
+
themeClasses[ruleName] = css(typeof cssObjectOrGetCssObject === "function"
|
|
2723
|
+
? cssObjectOrGetCssObject(Object.assign({ theme, "ownerState": styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState }, styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props))
|
|
2724
|
+
: cssObjectOrGetCssObject);
|
|
2725
|
+
}
|
|
2726
|
+
return themeClasses;
|
|
2727
|
+
}, [
|
|
2728
|
+
cssObjectByRuleNameOrGetCssObjectByRuleName ===
|
|
2729
|
+
undefined
|
|
2730
|
+
? undefined
|
|
2731
|
+
: JSON.stringify(cssObjectByRuleNameOrGetCssObjectByRuleName),
|
|
2732
|
+
getDependencyArrayRef(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.props),
|
|
2733
|
+
getDependencyArrayRef(styleOverrides === null || styleOverrides === void 0 ? void 0 : styleOverrides.ownerState),
|
|
2734
|
+
css,
|
|
2735
|
+
]);
|
|
2736
|
+
classes = useMemo$1(() => mergeClasses(classes, themeClasses, cx), [classes, themeClasses, cx]);
|
|
2737
|
+
}
|
|
2738
|
+
return {
|
|
2739
|
+
classes,
|
|
2740
|
+
theme,
|
|
2741
|
+
css,
|
|
2742
|
+
cx,
|
|
2743
|
+
};
|
|
2744
|
+
};
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2747
|
+
function useStyles() {
|
|
2748
|
+
const theme = useTheme();
|
|
2749
|
+
const { css, cx } = useCssAndCx();
|
|
2750
|
+
return { theme, css, cx };
|
|
2751
|
+
}
|
|
2752
|
+
return { makeStyles, useStyles };
|
|
2753
|
+
}
|
|
2754
|
+
const reactContext = createContext(undefined);
|
|
2755
|
+
function useCacheProvidedByProvider() {
|
|
2756
|
+
const cacheExplicitlyProvidedForTss = useContext(reactContext);
|
|
2757
|
+
return cacheExplicitlyProvidedForTss;
|
|
3965
2758
|
}
|
|
3966
2759
|
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
css: css,
|
|
3973
|
-
jsx: jsx,
|
|
3974
|
-
keyframes: keyframes,
|
|
3975
|
-
CacheProvider: CacheProvider,
|
|
3976
|
-
ThemeContext: ThemeContext,
|
|
3977
|
-
ThemeProvider: ThemeProvider,
|
|
3978
|
-
__unsafe_useEmotionCache: __unsafe_useEmotionCache,
|
|
3979
|
-
useTheme: useTheme,
|
|
3980
|
-
get withEmotionCache () { return withEmotionCache; },
|
|
3981
|
-
withTheme: withTheme
|
|
3982
|
-
});
|
|
2760
|
+
/** @see <https://docs.tsafe.dev/capitalize> */
|
|
2761
|
+
function capitalize(str) {
|
|
2762
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2763
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
2764
|
+
}
|
|
3983
2765
|
|
|
3984
|
-
var
|
|
3985
|
-
|
|
3986
|
-
var
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
Object.defineProperty(o, k2, desc);
|
|
3995
|
-
}) : (function(o, m, k, k2) {
|
|
3996
|
-
if (k2 === undefined) k2 = k;
|
|
3997
|
-
o[k2] = m[k];
|
|
3998
|
-
}));
|
|
3999
|
-
var __setModuleDefault = (commonjsGlobal && commonjsGlobal.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
4000
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
4001
|
-
}) : function(o, v) {
|
|
4002
|
-
o["default"] = v;
|
|
4003
|
-
});
|
|
4004
|
-
var __importStar = (commonjsGlobal && commonjsGlobal.__importStar) || function (mod) {
|
|
4005
|
-
if (mod && mod.__esModule) return mod;
|
|
4006
|
-
var result = {};
|
|
4007
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
4008
|
-
__setModuleDefault(result, mod);
|
|
4009
|
-
return result;
|
|
4010
|
-
};
|
|
4011
|
-
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
4012
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2766
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
2767
|
+
var t = {};
|
|
2768
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2769
|
+
t[p] = s[p];
|
|
2770
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2771
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2772
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2773
|
+
t[p[i]] = s[p[i]];
|
|
2774
|
+
}
|
|
2775
|
+
return t;
|
|
4013
2776
|
};
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
const
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
2777
|
+
function createWithStyles(params) {
|
|
2778
|
+
const { useTheme, cache } = params;
|
|
2779
|
+
const { makeStyles } = createMakeStyles({ useTheme, cache });
|
|
2780
|
+
function withStyles(Component, cssObjectByRuleNameOrGetCssObjectByRuleName, params) {
|
|
2781
|
+
const Component_ = typeof Component === "string"
|
|
2782
|
+
? (() => {
|
|
2783
|
+
const tag = Component;
|
|
2784
|
+
const Out = function (_a) {
|
|
2785
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
2786
|
+
return createElement(tag, props, children);
|
|
2787
|
+
};
|
|
2788
|
+
Object.defineProperty(Out, "name", {
|
|
2789
|
+
"value": capitalize(tag),
|
|
2790
|
+
});
|
|
2791
|
+
return Out;
|
|
2792
|
+
})()
|
|
2793
|
+
: Component;
|
|
2794
|
+
/**
|
|
2795
|
+
* Get component name for wrapping
|
|
2796
|
+
* @see https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging
|
|
2797
|
+
*/
|
|
2798
|
+
const name = (() => {
|
|
2799
|
+
{
|
|
2800
|
+
const displayName = Component_.displayName;
|
|
2801
|
+
if (displayName) {
|
|
2802
|
+
return displayName;
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
{
|
|
2806
|
+
const { name } = Component_;
|
|
2807
|
+
if (name) {
|
|
2808
|
+
return name;
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
return params === null || params === void 0 ? void 0 : params.name;
|
|
2812
|
+
})();
|
|
2813
|
+
const useStyles = makeStyles(Object.assign(Object.assign({}, params), { name }))(typeof cssObjectByRuleNameOrGetCssObjectByRuleName === "function"
|
|
2814
|
+
? (theme, props, classes) => incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName(theme, props, classes))
|
|
2815
|
+
: incorporateMediaQueries(cssObjectByRuleNameOrGetCssObjectByRuleName));
|
|
2816
|
+
function getHasNonRootClasses(classes) {
|
|
2817
|
+
for (const name in classes) {
|
|
2818
|
+
if (name === "root") {
|
|
2819
|
+
continue;
|
|
2820
|
+
}
|
|
2821
|
+
return true;
|
|
2822
|
+
}
|
|
2823
|
+
return false;
|
|
2824
|
+
}
|
|
2825
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2826
|
+
const Out = forwardRef(function (props, ref) {
|
|
2827
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2828
|
+
const { className, classes: _classes } = props, rest = __rest(props, ["className", "classes"]);
|
|
2829
|
+
const { classes, cx } = useStyles(props, { props });
|
|
2830
|
+
return (React__default.createElement(Component_, Object.assign({ ref: ref, className: getHasNonRootClasses(classes)
|
|
2831
|
+
? className
|
|
2832
|
+
: cx(classes.root, className) }, (typeof Component === "string" ? {} : { classes }), rest)));
|
|
2833
|
+
});
|
|
2834
|
+
if (name !== undefined) {
|
|
2835
|
+
Out.displayName = `${capitalize(name)}WithStyles`;
|
|
2836
|
+
Object.defineProperty(Out, "name", { "value": Out.displayName });
|
|
2837
|
+
}
|
|
2838
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2839
|
+
return Out;
|
|
2840
|
+
}
|
|
2841
|
+
return { withStyles };
|
|
2842
|
+
}
|
|
2843
|
+
function incorporateMediaQueries(cssObjectByRuleNameWithMediaQueries) {
|
|
2844
|
+
const cssObjectByRuleName = {};
|
|
2845
|
+
const cssObjectByRuleNameWithMediaQueriesByMediaQuery = {};
|
|
2846
|
+
Object.keys(cssObjectByRuleNameWithMediaQueries).forEach(ruleNameOrMediaQuery => ((ruleNameOrMediaQuery.startsWith("@media")
|
|
2847
|
+
? cssObjectByRuleNameWithMediaQueriesByMediaQuery
|
|
2848
|
+
: cssObjectByRuleName)[ruleNameOrMediaQuery] =
|
|
2849
|
+
cssObjectByRuleNameWithMediaQueries[ruleNameOrMediaQuery]));
|
|
2850
|
+
Object.keys(cssObjectByRuleNameWithMediaQueriesByMediaQuery).forEach(mediaQuery => {
|
|
2851
|
+
const cssObjectByRuleNameBis = cssObjectByRuleNameWithMediaQueriesByMediaQuery[mediaQuery];
|
|
2852
|
+
Object.keys(cssObjectByRuleNameBis).forEach(ruleName => {
|
|
2853
|
+
var _a;
|
|
2854
|
+
return (cssObjectByRuleName[ruleName] = Object.assign(Object.assign({}, ((_a = cssObjectByRuleName[ruleName]) !== null && _a !== void 0 ? _a : {})), { [mediaQuery]: cssObjectByRuleNameBis[ruleName] }));
|
|
2855
|
+
});
|
|
2856
|
+
});
|
|
2857
|
+
return cssObjectByRuleName;
|
|
4021
2858
|
}
|
|
4022
|
-
GlobalStyles$1.GlobalStyles = GlobalStyles;
|
|
4023
2859
|
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
var cssAndCx_1 = cssAndCx;
|
|
4029
|
-
Object.defineProperty(exports, "useCssAndCx", { enumerable: true, get: function () { return cssAndCx_1.useCssAndCx; } });
|
|
4030
|
-
var mergeClasses_1 = mergeClasses$1;
|
|
4031
|
-
Object.defineProperty(exports, "useMergedClasses", { enumerable: true, get: function () { return mergeClasses_1.useMergedClasses; } });
|
|
4032
|
-
const makeStyles_1 = makeStyles$1;
|
|
4033
|
-
Object.defineProperty(exports, "createMakeStyles", { enumerable: true, get: function () { return makeStyles_1.createMakeStyles; } });
|
|
4034
|
-
const withStyles_1 = withStyles$1;
|
|
4035
|
-
Object.defineProperty(exports, "createWithStyles", { enumerable: true, get: function () { return withStyles_1.createWithStyles; } });
|
|
4036
|
-
/** @see <https://docs.tss-react.dev/api-references/keyframes> */
|
|
4037
|
-
var react_1 = require$$4;
|
|
4038
|
-
Object.defineProperty(exports, "keyframes", { enumerable: true, get: function () { return react_1.keyframes; } });
|
|
4039
|
-
/** @see <https://docs.tss-react.dev/api-references/globalstyles> */
|
|
4040
|
-
var GlobalStyles_1 = GlobalStyles$1;
|
|
4041
|
-
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return GlobalStyles_1.GlobalStyles; } });
|
|
4042
|
-
/** @see <https://docs.tss-react.dev/cache> */
|
|
4043
|
-
var cache_1 = cache;
|
|
4044
|
-
Object.defineProperty(exports, "getTssDefaultEmotionCache", { enumerable: true, get: function () { return cache_1.getTssDefaultEmotionCache; } });
|
|
4045
|
-
Object.defineProperty(exports, "TssCacheProvider", { enumerable: true, get: function () { return cache_1.TssCacheProvider; } });
|
|
4046
|
-
/** @see <https://docs.tss-react.dev/api-references/makestyles-usestyles> */
|
|
4047
|
-
function createMakeAndWithStyles(params) {
|
|
4048
|
-
return Object.assign(Object.assign({}, (0, makeStyles_1.createMakeStyles)(params)), (0, withStyles_1.createWithStyles)(params));
|
|
4049
|
-
}
|
|
4050
|
-
exports.createMakeAndWithStyles = createMakeAndWithStyles;
|
|
4051
|
-
} (tssReact));
|
|
2860
|
+
/** @see <https://docs.tss-react.dev/api/makestyles> */
|
|
2861
|
+
function createMakeAndWithStyles(params) {
|
|
2862
|
+
return Object.assign(Object.assign({}, createMakeStyles(params)), createWithStyles(params));
|
|
2863
|
+
}
|
|
4052
2864
|
|
|
4053
2865
|
var _a;
|
|
4054
|
-
var makeStyles = (_a =
|
|
4055
|
-
useTheme: useTheme
|
|
2866
|
+
var makeStyles = (_a = createMakeAndWithStyles({
|
|
2867
|
+
useTheme: useTheme,
|
|
4056
2868
|
/*
|
|
4057
2869
|
OR, if you have extended the default mui theme adding your own custom properties:
|
|
4058
2870
|
Let's assume the myTheme object that you provide to the <ThemeProvider /> is of
|
|
@@ -6133,6 +4945,8 @@ var rafSchd = function rafSchd(fn) {
|
|
|
6133
4945
|
return wrapperFn;
|
|
6134
4946
|
};
|
|
6135
4947
|
|
|
4948
|
+
var rafSchd$1 = rafSchd;
|
|
4949
|
+
|
|
6136
4950
|
var isProduction = process.env.NODE_ENV === 'production';
|
|
6137
4951
|
var spacesAndTabs = /[ \t]{2,}/g;
|
|
6138
4952
|
var lineStartWithSpaces = /^[ \t]*/gm;
|
|
@@ -9461,7 +8275,7 @@ function getScrollListener(_ref) {
|
|
|
9461
8275
|
onWindowScroll(getWindowScroll());
|
|
9462
8276
|
}
|
|
9463
8277
|
|
|
9464
|
-
var scheduled = rafSchd(updateScroll);
|
|
8278
|
+
var scheduled = rafSchd$1(updateScroll);
|
|
9465
8279
|
var binding = getWindowScrollBinding(scheduled);
|
|
9466
8280
|
var unbind = noop;
|
|
9467
8281
|
|
|
@@ -10807,8 +9621,8 @@ var scroll$1 = (function (_ref) {
|
|
|
10807
9621
|
var createFluidScroller = (function (_ref) {
|
|
10808
9622
|
var scrollWindow = _ref.scrollWindow,
|
|
10809
9623
|
scrollDroppable = _ref.scrollDroppable;
|
|
10810
|
-
var scheduleWindowScroll = rafSchd(scrollWindow);
|
|
10811
|
-
var scheduleDroppableScroll = rafSchd(scrollDroppable);
|
|
9624
|
+
var scheduleWindowScroll = rafSchd$1(scrollWindow);
|
|
9625
|
+
var scheduleDroppableScroll = rafSchd$1(scrollDroppable);
|
|
10812
9626
|
var dragging = null;
|
|
10813
9627
|
|
|
10814
9628
|
var tryScroll = function tryScroll(state) {
|
|
@@ -12772,7 +11586,7 @@ function tryStart(_ref3) {
|
|
|
12772
11586
|
}
|
|
12773
11587
|
|
|
12774
11588
|
function fluidLift(clientSelection) {
|
|
12775
|
-
var move$1 = rafSchd(function (client) {
|
|
11589
|
+
var move$1 = rafSchd$1(function (client) {
|
|
12776
11590
|
tryDispatchWhenDragging(function () {
|
|
12777
11591
|
return move({
|
|
12778
11592
|
client: client
|
|
@@ -13406,7 +12220,7 @@ function useDroppablePublisher(args) {
|
|
|
13406
12220
|
memoizedUpdateScroll(scroll.x, scroll.y);
|
|
13407
12221
|
}, [getClosestScroll, memoizedUpdateScroll]);
|
|
13408
12222
|
var scheduleScrollUpdate = useMemo(function () {
|
|
13409
|
-
return rafSchd(updateScroll);
|
|
12223
|
+
return rafSchd$1(updateScroll);
|
|
13410
12224
|
}, [updateScroll]);
|
|
13411
12225
|
var onClosestScroll = useCallback(function () {
|
|
13412
12226
|
var dragging = whileDraggingRef.current;
|