@spothero/ui 24.0.0 → 24.0.4
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.cjs.js +1077 -380
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1077 -380
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -35,7 +35,7 @@ function _construct(t, e, r) {
|
|
|
35
35
|
function _defineProperties$1(e, r) {
|
|
36
36
|
for (var t = 0; t < r.length; t++) {
|
|
37
37
|
var o = r[t];
|
|
38
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
38
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
function _createClass$1(e, r, t) {
|
|
@@ -92,7 +92,7 @@ function _createForOfIteratorHelper(r, e) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
function _defineProperty$3(e, r, t) {
|
|
95
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
95
|
+
return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
|
|
96
96
|
value: t,
|
|
97
97
|
enumerable: !0,
|
|
98
98
|
configurable: !0,
|
|
@@ -215,8 +215,8 @@ function _objectWithoutProperties$1(e, t) {
|
|
|
215
215
|
r,
|
|
216
216
|
i = _objectWithoutPropertiesLoose$1(e, t);
|
|
217
217
|
if (Object.getOwnPropertySymbols) {
|
|
218
|
-
var
|
|
219
|
-
for (r = 0; r <
|
|
218
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
219
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
220
220
|
}
|
|
221
221
|
return i;
|
|
222
222
|
}
|
|
@@ -224,7 +224,7 @@ function _objectWithoutPropertiesLoose$1(r, e) {
|
|
|
224
224
|
if (null == r) return {};
|
|
225
225
|
var t = {};
|
|
226
226
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
227
|
-
if (
|
|
227
|
+
if (e.includes(n)) continue;
|
|
228
228
|
t[n] = r[n];
|
|
229
229
|
}
|
|
230
230
|
return t;
|
|
@@ -265,7 +265,7 @@ function _toArray(r) {
|
|
|
265
265
|
function _toConsumableArray$1(r) {
|
|
266
266
|
return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1();
|
|
267
267
|
}
|
|
268
|
-
function _toPrimitive(t, r) {
|
|
268
|
+
function _toPrimitive$1(t, r) {
|
|
269
269
|
if ("object" != typeof t || !t) return t;
|
|
270
270
|
var e = t[Symbol.toPrimitive];
|
|
271
271
|
if (void 0 !== e) {
|
|
@@ -275,8 +275,8 @@ function _toPrimitive(t, r) {
|
|
|
275
275
|
}
|
|
276
276
|
return ("string" === r ? String : Number)(t);
|
|
277
277
|
}
|
|
278
|
-
function _toPropertyKey(t) {
|
|
279
|
-
var i = _toPrimitive(t, "string");
|
|
278
|
+
function _toPropertyKey$1(t) {
|
|
279
|
+
var i = _toPrimitive$1(t, "string");
|
|
280
280
|
return "symbol" == typeof i ? i : i + "";
|
|
281
281
|
}
|
|
282
282
|
function _typeof$1(o) {
|
|
@@ -318,8 +318,6 @@ function _wrapNativeSuper(t) {
|
|
|
318
318
|
}, _wrapNativeSuper(t);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
-
var isDevelopment$2 = false;
|
|
322
|
-
|
|
323
321
|
/*
|
|
324
322
|
|
|
325
323
|
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
@@ -342,9 +340,10 @@ styleSheet.flush()
|
|
|
342
340
|
- empties the stylesheet of all its contents
|
|
343
341
|
|
|
344
342
|
*/
|
|
345
|
-
|
|
343
|
+
// $FlowFixMe
|
|
346
344
|
function sheetForTag(tag) {
|
|
347
345
|
if (tag.sheet) {
|
|
346
|
+
// $FlowFixMe
|
|
348
347
|
return tag.sheet;
|
|
349
348
|
} // this weirdness brought to you by firefox
|
|
350
349
|
|
|
@@ -352,12 +351,10 @@ function sheetForTag(tag) {
|
|
|
352
351
|
|
|
353
352
|
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
354
353
|
if (document.styleSheets[i].ownerNode === tag) {
|
|
354
|
+
// $FlowFixMe
|
|
355
355
|
return document.styleSheets[i];
|
|
356
356
|
}
|
|
357
|
-
}
|
|
358
|
-
// TS can't understand it though so we make it stop complaining here
|
|
359
|
-
|
|
360
|
-
return undefined;
|
|
357
|
+
}
|
|
361
358
|
}
|
|
362
359
|
function createStyleElement(options) {
|
|
363
360
|
var tag = document.createElement('style');
|
|
@@ -389,7 +386,7 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
389
386
|
_this.container.insertBefore(tag, before);
|
|
390
387
|
_this.tags.push(tag);
|
|
391
388
|
};
|
|
392
|
-
this.isSpeedy = options.speedy === undefined ?
|
|
389
|
+
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
|
393
390
|
this.tags = [];
|
|
394
391
|
this.ctr = 0;
|
|
395
392
|
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
@@ -412,25 +409,42 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
412
409
|
this._insertTag(createStyleElement(this));
|
|
413
410
|
}
|
|
414
411
|
var tag = this.tags[this.tags.length - 1];
|
|
412
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
413
|
+
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
|
414
|
+
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
|
415
|
+
// this would only cause problem in speedy mode
|
|
416
|
+
// but we don't want enabling speedy to affect the observable behavior
|
|
417
|
+
// so we report this error at all times
|
|
418
|
+
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
|
|
419
|
+
}
|
|
420
|
+
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
|
421
|
+
}
|
|
415
422
|
if (this.isSpeedy) {
|
|
416
423
|
var sheet = sheetForTag(tag);
|
|
417
424
|
try {
|
|
418
425
|
// this is the ultrafast version, works across browsers
|
|
419
426
|
// the big drawback is that the css won't be editable in devtools
|
|
420
427
|
sheet.insertRule(rule, sheet.cssRules.length);
|
|
421
|
-
} catch (e) {
|
|
428
|
+
} catch (e) {
|
|
429
|
+
if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
|
|
430
|
+
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
422
433
|
} else {
|
|
423
434
|
tag.appendChild(document.createTextNode(rule));
|
|
424
435
|
}
|
|
425
436
|
this.ctr++;
|
|
426
437
|
};
|
|
427
438
|
_proto.flush = function flush() {
|
|
439
|
+
// $FlowFixMe
|
|
428
440
|
this.tags.forEach(function (tag) {
|
|
429
|
-
|
|
430
|
-
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
441
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
431
442
|
});
|
|
432
443
|
this.tags = [];
|
|
433
444
|
this.ctr = 0;
|
|
445
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
446
|
+
this._alreadyInsertedOrderInsensitiveRule = false;
|
|
447
|
+
}
|
|
434
448
|
};
|
|
435
449
|
return StyleSheet;
|
|
436
450
|
}();
|
|
@@ -443,7 +457,6 @@ var RULESET = 'rule';
|
|
|
443
457
|
var DECLARATION = 'decl';
|
|
444
458
|
var IMPORT = '@import';
|
|
445
459
|
var KEYFRAMES = '@keyframes';
|
|
446
|
-
var LAYER = '@layer';
|
|
447
460
|
|
|
448
461
|
/**
|
|
449
462
|
* @param {number}
|
|
@@ -869,7 +882,6 @@ function parse$1(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
869
882
|
scanning = 0;
|
|
870
883
|
// ;
|
|
871
884
|
case 59 + offset:
|
|
872
|
-
if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
873
885
|
if (property > 0 && strlen(characters) - length) append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
874
886
|
break;
|
|
875
887
|
// @ ;
|
|
@@ -879,9 +891,8 @@ function parse$1(value, root, parent, rule, rules, rulesets, pseudo, points, dec
|
|
|
879
891
|
default:
|
|
880
892
|
append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
|
|
881
893
|
if (character === 123) if (offset === 0) parse$1(characters, root, reference, reference, props, rulesets, length, points, children);else switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
882
|
-
// d
|
|
894
|
+
// d m s
|
|
883
895
|
case 100:
|
|
884
|
-
case 108:
|
|
885
896
|
case 109:
|
|
886
897
|
case 115:
|
|
887
898
|
parse$1(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
@@ -984,8 +995,6 @@ function serialize(children, callback) {
|
|
|
984
995
|
*/
|
|
985
996
|
function stringify(element, index, children, callback) {
|
|
986
997
|
switch (element.type) {
|
|
987
|
-
case LAYER:
|
|
988
|
-
if (element.children.length) break;
|
|
989
998
|
case IMPORT:
|
|
990
999
|
case DECLARATION:
|
|
991
1000
|
return element["return"] = element["return"] || element.value;
|
|
@@ -1023,11 +1032,11 @@ function rulesheet(callback) {
|
|
|
1023
1032
|
}
|
|
1024
1033
|
|
|
1025
1034
|
var weakMemoize$1 = function weakMemoize(func) {
|
|
1035
|
+
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
1026
1036
|
var cache = new WeakMap();
|
|
1027
1037
|
return function (arg) {
|
|
1028
1038
|
if (cache.has(arg)) {
|
|
1029
|
-
//
|
|
1030
|
-
// This allows us to remove `undefined` from the return value
|
|
1039
|
+
// $FlowFixMe
|
|
1031
1040
|
return cache.get(arg);
|
|
1032
1041
|
}
|
|
1033
1042
|
var ret = func(arg);
|
|
@@ -1036,7 +1045,7 @@ var weakMemoize$1 = function weakMemoize(func) {
|
|
|
1036
1045
|
};
|
|
1037
1046
|
};
|
|
1038
1047
|
|
|
1039
|
-
function memoize$
|
|
1048
|
+
function memoize$3(fn) {
|
|
1040
1049
|
var cache = Object.create(null);
|
|
1041
1050
|
return function (arg) {
|
|
1042
1051
|
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
@@ -1044,7 +1053,6 @@ function memoize$2(fn) {
|
|
|
1044
1053
|
};
|
|
1045
1054
|
}
|
|
1046
1055
|
|
|
1047
|
-
var isBrowser$8 = typeof document !== 'undefined';
|
|
1048
1056
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
1049
1057
|
var previous = 0;
|
|
1050
1058
|
var character = 0;
|
|
@@ -1111,8 +1119,8 @@ var compat = function compat(element) {
|
|
|
1111
1119
|
element.length < 1) {
|
|
1112
1120
|
return;
|
|
1113
1121
|
}
|
|
1114
|
-
var value = element.value
|
|
1115
|
-
|
|
1122
|
+
var value = element.value,
|
|
1123
|
+
parent = element.parent;
|
|
1116
1124
|
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
1117
1125
|
while (parent.type !== 'rule') {
|
|
1118
1126
|
parent = parent.parent;
|
|
@@ -1152,6 +1160,101 @@ var removeLabel = function removeLabel(element) {
|
|
|
1152
1160
|
}
|
|
1153
1161
|
}
|
|
1154
1162
|
};
|
|
1163
|
+
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
1164
|
+
var isIgnoringComment = function isIgnoringComment(element) {
|
|
1165
|
+
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
|
1166
|
+
};
|
|
1167
|
+
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
|
1168
|
+
return function (element, index, children) {
|
|
1169
|
+
if (element.type !== 'rule' || cache.compat) return;
|
|
1170
|
+
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
1171
|
+
if (unsafePseudoClasses) {
|
|
1172
|
+
var isNested = element.parent === children[0]; // in nested rules comments become children of the "auto-inserted" rule
|
|
1173
|
+
//
|
|
1174
|
+
// considering this input:
|
|
1175
|
+
// .a {
|
|
1176
|
+
// .b /* comm */ {}
|
|
1177
|
+
// color: hotpink;
|
|
1178
|
+
// }
|
|
1179
|
+
// we get output corresponding to this:
|
|
1180
|
+
// .a {
|
|
1181
|
+
// & {
|
|
1182
|
+
// /* comm */
|
|
1183
|
+
// color: hotpink;
|
|
1184
|
+
// }
|
|
1185
|
+
// .b {}
|
|
1186
|
+
// }
|
|
1187
|
+
|
|
1188
|
+
var commentContainer = isNested ? children[0].children :
|
|
1189
|
+
// global rule at the root level
|
|
1190
|
+
children;
|
|
1191
|
+
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
1192
|
+
var node = commentContainer[i];
|
|
1193
|
+
if (node.line < element.line) {
|
|
1194
|
+
break;
|
|
1195
|
+
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
|
1196
|
+
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
|
1197
|
+
// this will also match inputs like this:
|
|
1198
|
+
// .a {
|
|
1199
|
+
// /* comm */
|
|
1200
|
+
// .b {}
|
|
1201
|
+
// }
|
|
1202
|
+
//
|
|
1203
|
+
// but that is fine
|
|
1204
|
+
//
|
|
1205
|
+
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
|
1206
|
+
// .a {
|
|
1207
|
+
// .b { /* comm */ }
|
|
1208
|
+
// }
|
|
1209
|
+
// with such inputs we wouldn't have to search for the comment at all
|
|
1210
|
+
// TODO: consider changing this comment placement in the next major version
|
|
1211
|
+
|
|
1212
|
+
if (node.column < element.column) {
|
|
1213
|
+
if (isIgnoringComment(node)) {
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
break;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
1220
|
+
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
1225
|
+
var isImportRule = function isImportRule(element) {
|
|
1226
|
+
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
|
1227
|
+
};
|
|
1228
|
+
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
|
|
1229
|
+
for (var i = index - 1; i >= 0; i--) {
|
|
1230
|
+
if (!isImportRule(children[i])) {
|
|
1231
|
+
return true;
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
return false;
|
|
1235
|
+
}; // use this to remove incorrect elements from further processing
|
|
1236
|
+
// so they don't get handed to the `sheet` (or anything else)
|
|
1237
|
+
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
|
1238
|
+
|
|
1239
|
+
var nullifyElement = function nullifyElement(element) {
|
|
1240
|
+
element.type = '';
|
|
1241
|
+
element.value = '';
|
|
1242
|
+
element["return"] = '';
|
|
1243
|
+
element.children = '';
|
|
1244
|
+
element.props = '';
|
|
1245
|
+
};
|
|
1246
|
+
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
|
|
1247
|
+
if (!isImportRule(element)) {
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
if (element.parent) {
|
|
1251
|
+
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
|
|
1252
|
+
nullifyElement(element);
|
|
1253
|
+
} else if (isPrependedWithRegularRules(index, children)) {
|
|
1254
|
+
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
|
1255
|
+
nullifyElement(element);
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1155
1258
|
|
|
1156
1259
|
/* eslint-disable no-fallthrough */
|
|
1157
1260
|
|
|
@@ -1357,15 +1460,22 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
1357
1460
|
});
|
|
1358
1461
|
}
|
|
1359
1462
|
};
|
|
1360
|
-
var
|
|
1361
|
-
|
|
1362
|
-
|
|
1463
|
+
var isBrowser$9 = typeof document !== 'undefined';
|
|
1464
|
+
var getServerStylisCache = isBrowser$9 ? undefined : weakMemoize$1(function () {
|
|
1465
|
+
return memoize$3(function () {
|
|
1466
|
+
var cache = {};
|
|
1467
|
+
return function (name) {
|
|
1468
|
+
return cache[name];
|
|
1469
|
+
};
|
|
1363
1470
|
});
|
|
1364
1471
|
});
|
|
1365
1472
|
var defaultStylisPlugins = [prefixer];
|
|
1366
1473
|
var createCache = function createCache(options) {
|
|
1367
1474
|
var key = options.key;
|
|
1368
|
-
if (
|
|
1475
|
+
if (process.env.NODE_ENV !== 'production' && !key) {
|
|
1476
|
+
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
|
1477
|
+
}
|
|
1478
|
+
if (isBrowser$9 && key === 'css') {
|
|
1369
1479
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
1370
1480
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
1371
1481
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
@@ -1387,16 +1497,23 @@ var createCache = function createCache(options) {
|
|
|
1387
1497
|
});
|
|
1388
1498
|
}
|
|
1389
1499
|
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1500
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1501
|
+
// $FlowFixMe
|
|
1502
|
+
if (/[^a-z-]/.test(key)) {
|
|
1503
|
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1390
1506
|
var inserted = {};
|
|
1391
1507
|
var container;
|
|
1392
1508
|
var nodesToHydrate = [];
|
|
1393
|
-
if (isBrowser$
|
|
1509
|
+
if (isBrowser$9) {
|
|
1394
1510
|
container = options.container || document.head;
|
|
1395
1511
|
Array.prototype.forEach.call(
|
|
1396
1512
|
// this means we will ignore elements which don't have a space in them which
|
|
1397
1513
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1398
1514
|
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1399
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1515
|
+
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
|
|
1516
|
+
|
|
1400
1517
|
for (var i = 1; i < attrib.length; i++) {
|
|
1401
1518
|
inserted[attrib[i]] = true;
|
|
1402
1519
|
}
|
|
@@ -1405,9 +1522,26 @@ var createCache = function createCache(options) {
|
|
|
1405
1522
|
}
|
|
1406
1523
|
var _insert;
|
|
1407
1524
|
var omnipresentPlugins = [compat, removeLabel];
|
|
1408
|
-
if (
|
|
1525
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1526
|
+
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
|
|
1527
|
+
get compat() {
|
|
1528
|
+
return cache.compat;
|
|
1529
|
+
}
|
|
1530
|
+
}), incorrectImportAlarm);
|
|
1531
|
+
}
|
|
1532
|
+
if (isBrowser$9) {
|
|
1409
1533
|
var currentSheet;
|
|
1410
|
-
var finalizingPlugins = [stringify,
|
|
1534
|
+
var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {
|
|
1535
|
+
if (!element.root) {
|
|
1536
|
+
if (element["return"]) {
|
|
1537
|
+
currentSheet.insert(element["return"]);
|
|
1538
|
+
} else if (element.value && element.type !== COMMENT) {
|
|
1539
|
+
// insert empty rule in non-production environments
|
|
1540
|
+
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
|
1541
|
+
currentSheet.insert(element.value + "{}");
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
} : rulesheet(function (rule) {
|
|
1411
1545
|
currentSheet.insert(rule);
|
|
1412
1546
|
})];
|
|
1413
1547
|
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
@@ -1416,6 +1550,13 @@ var createCache = function createCache(options) {
|
|
|
1416
1550
|
};
|
|
1417
1551
|
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1418
1552
|
currentSheet = sheet;
|
|
1553
|
+
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
|
1554
|
+
currentSheet = {
|
|
1555
|
+
insert: function insert(rule) {
|
|
1556
|
+
sheet.insert(rule + serialized.map);
|
|
1557
|
+
}
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1419
1560
|
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1420
1561
|
if (shouldCache) {
|
|
1421
1562
|
cache.inserted[serialized.name] = true;
|
|
@@ -1426,7 +1567,8 @@ var createCache = function createCache(options) {
|
|
|
1426
1567
|
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1427
1568
|
var _stylis = function _stylis(styles) {
|
|
1428
1569
|
return serialize(compile(styles), _serializer);
|
|
1429
|
-
};
|
|
1570
|
+
}; // $FlowFixMe
|
|
1571
|
+
|
|
1430
1572
|
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1431
1573
|
var getRules = function getRules(selector, serialized) {
|
|
1432
1574
|
var name = serialized.name;
|
|
@@ -1445,6 +1587,12 @@ var createCache = function createCache(options) {
|
|
|
1445
1587
|
if (shouldCache) {
|
|
1446
1588
|
cache.inserted[name] = true;
|
|
1447
1589
|
}
|
|
1590
|
+
if (
|
|
1591
|
+
// using === development instead of !== production
|
|
1592
|
+
// because if people do ssr in tests, the source maps showing up would be annoying
|
|
1593
|
+
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
|
1594
|
+
return rules + serialized.map;
|
|
1595
|
+
}
|
|
1448
1596
|
return rules;
|
|
1449
1597
|
} else {
|
|
1450
1598
|
// in compat mode, we put the styles on the inserted cache so
|
|
@@ -1482,13 +1630,18 @@ var createCache = function createCache(options) {
|
|
|
1482
1630
|
};
|
|
1483
1631
|
|
|
1484
1632
|
function _extends$6() {
|
|
1485
|
-
|
|
1486
|
-
for (var
|
|
1487
|
-
var
|
|
1488
|
-
for (var
|
|
1633
|
+
_extends$6 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1634
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1635
|
+
var source = arguments[i];
|
|
1636
|
+
for (var key in source) {
|
|
1637
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1638
|
+
target[key] = source[key];
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1489
1641
|
}
|
|
1490
|
-
return
|
|
1491
|
-
}
|
|
1642
|
+
return target;
|
|
1643
|
+
};
|
|
1644
|
+
return _extends$6.apply(this, arguments);
|
|
1492
1645
|
}
|
|
1493
1646
|
|
|
1494
1647
|
var weakMemoize = function weakMemoize(func) {
|
|
@@ -1904,13 +2057,13 @@ function requireHoistNonReactStatics_cjs() {
|
|
|
1904
2057
|
|
|
1905
2058
|
requireHoistNonReactStatics_cjs();
|
|
1906
2059
|
|
|
1907
|
-
var isBrowser$
|
|
2060
|
+
var isBrowser$8 = typeof document !== 'undefined';
|
|
1908
2061
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1909
2062
|
var rawClassName = '';
|
|
1910
2063
|
classNames.split(' ').forEach(function (className) {
|
|
1911
2064
|
if (registered[className] !== undefined) {
|
|
1912
2065
|
registeredStyles.push(registered[className] + ";");
|
|
1913
|
-
} else
|
|
2066
|
+
} else {
|
|
1914
2067
|
rawClassName += className + " ";
|
|
1915
2068
|
}
|
|
1916
2069
|
});
|
|
@@ -1929,7 +2082,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
|
1929
2082
|
// in node since emotion-server relies on whether a style is in
|
|
1930
2083
|
// the registered cache to know whether a style is global or not
|
|
1931
2084
|
// also, note that this check will be dead code eliminated in the browser
|
|
1932
|
-
isBrowser$
|
|
2085
|
+
isBrowser$8 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
1933
2086
|
cache.registered[className] = serialized.styles;
|
|
1934
2087
|
}
|
|
1935
2088
|
};
|
|
@@ -1941,12 +2094,12 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
1941
2094
|
var current = serialized;
|
|
1942
2095
|
do {
|
|
1943
2096
|
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
1944
|
-
if (!isBrowser$
|
|
2097
|
+
if (!isBrowser$8 && maybeStyles !== undefined) {
|
|
1945
2098
|
stylesForSSR += maybeStyles;
|
|
1946
2099
|
}
|
|
1947
2100
|
current = current.next;
|
|
1948
2101
|
} while (current !== undefined);
|
|
1949
|
-
if (!isBrowser$
|
|
2102
|
+
if (!isBrowser$8 && stylesForSSR.length !== 0) {
|
|
1950
2103
|
return stylesForSSR;
|
|
1951
2104
|
}
|
|
1952
2105
|
}
|
|
@@ -1997,7 +2150,6 @@ function murmur2(str) {
|
|
|
1997
2150
|
|
|
1998
2151
|
var unitlessKeys = {
|
|
1999
2152
|
animationIterationCount: 1,
|
|
2000
|
-
aspectRatio: 1,
|
|
2001
2153
|
borderImageOutset: 1,
|
|
2002
2154
|
borderImageSlice: 1,
|
|
2003
2155
|
borderImageWidth: 1,
|
|
@@ -2029,7 +2181,6 @@ var unitlessKeys = {
|
|
|
2029
2181
|
opacity: 1,
|
|
2030
2182
|
order: 1,
|
|
2031
2183
|
orphans: 1,
|
|
2032
|
-
scale: 1,
|
|
2033
2184
|
tabSize: 1,
|
|
2034
2185
|
widows: 1,
|
|
2035
2186
|
zIndex: 1,
|
|
@@ -2046,7 +2197,8 @@ var unitlessKeys = {
|
|
|
2046
2197
|
strokeWidth: 1
|
|
2047
2198
|
};
|
|
2048
2199
|
|
|
2049
|
-
var
|
|
2200
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$1 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
2201
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
2050
2202
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
2051
2203
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
2052
2204
|
var isCustomProperty = function isCustomProperty(property) {
|
|
@@ -2055,7 +2207,7 @@ var isCustomProperty = function isCustomProperty(property) {
|
|
|
2055
2207
|
var isProcessableValue = function isProcessableValue(value) {
|
|
2056
2208
|
return value != null && typeof value !== 'boolean';
|
|
2057
2209
|
};
|
|
2058
|
-
var processStyleName = /* #__PURE__ */memoize$
|
|
2210
|
+
var processStyleName = /* #__PURE__ */memoize$3(function (styleName) {
|
|
2059
2211
|
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
2060
2212
|
});
|
|
2061
2213
|
var processStyleValue = function processStyleValue(key, value) {
|
|
@@ -2080,14 +2232,39 @@ var processStyleValue = function processStyleValue(key, value) {
|
|
|
2080
2232
|
}
|
|
2081
2233
|
return value;
|
|
2082
2234
|
};
|
|
2235
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2236
|
+
var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
2237
|
+
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
2238
|
+
var oldProcessStyleValue = processStyleValue;
|
|
2239
|
+
var msPattern = /^-ms-/;
|
|
2240
|
+
var hyphenPattern = /-(.)/g;
|
|
2241
|
+
var hyphenatedCache = {};
|
|
2242
|
+
processStyleValue = function processStyleValue(key, value) {
|
|
2243
|
+
if (key === 'content') {
|
|
2244
|
+
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
2245
|
+
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
var processed = oldProcessStyleValue(key, value);
|
|
2249
|
+
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
2250
|
+
hyphenatedCache[key] = true;
|
|
2251
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
|
2252
|
+
return _char.toUpperCase();
|
|
2253
|
+
}) + "?");
|
|
2254
|
+
}
|
|
2255
|
+
return processed;
|
|
2256
|
+
};
|
|
2257
|
+
}
|
|
2083
2258
|
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
2084
2259
|
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
2085
2260
|
if (interpolation == null) {
|
|
2086
2261
|
return '';
|
|
2087
2262
|
}
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2263
|
+
if (interpolation.__emotion_styles !== undefined) {
|
|
2264
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
|
2265
|
+
throw new Error(noComponentSelectorMessage);
|
|
2266
|
+
}
|
|
2267
|
+
return interpolation;
|
|
2091
2268
|
}
|
|
2092
2269
|
switch (_typeof$1(interpolation)) {
|
|
2093
2270
|
case 'boolean':
|
|
@@ -2096,18 +2273,16 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
2096
2273
|
}
|
|
2097
2274
|
case 'object':
|
|
2098
2275
|
{
|
|
2099
|
-
|
|
2100
|
-
if (keyframes.anim === 1) {
|
|
2276
|
+
if (interpolation.anim === 1) {
|
|
2101
2277
|
cursor = {
|
|
2102
|
-
name:
|
|
2103
|
-
styles:
|
|
2278
|
+
name: interpolation.name,
|
|
2279
|
+
styles: interpolation.styles,
|
|
2104
2280
|
next: cursor
|
|
2105
2281
|
};
|
|
2106
|
-
return
|
|
2282
|
+
return interpolation.name;
|
|
2107
2283
|
}
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
var next = serializedStyles.next;
|
|
2284
|
+
if (interpolation.styles !== undefined) {
|
|
2285
|
+
var next = interpolation.next;
|
|
2111
2286
|
if (next !== undefined) {
|
|
2112
2287
|
// not the most efficient thing ever but this is a pretty rare case
|
|
2113
2288
|
// and there will be very few iterations of this generally
|
|
@@ -2120,7 +2295,10 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
2120
2295
|
next = next.next;
|
|
2121
2296
|
}
|
|
2122
2297
|
}
|
|
2123
|
-
var styles =
|
|
2298
|
+
var styles = interpolation.styles + ";";
|
|
2299
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
|
2300
|
+
styles += interpolation.map;
|
|
2301
|
+
}
|
|
2124
2302
|
return styles;
|
|
2125
2303
|
}
|
|
2126
2304
|
return createStringFromObject(mergedProps, registered, interpolation);
|
|
@@ -2132,17 +2310,31 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
2132
2310
|
var result = interpolation(mergedProps);
|
|
2133
2311
|
cursor = previousCursor;
|
|
2134
2312
|
return handleInterpolation(mergedProps, registered, result);
|
|
2313
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
2314
|
+
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
2135
2315
|
}
|
|
2136
2316
|
break;
|
|
2137
2317
|
}
|
|
2318
|
+
case 'string':
|
|
2319
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2320
|
+
var matched = [];
|
|
2321
|
+
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
2322
|
+
var fakeVarName = "animation" + matched.length;
|
|
2323
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
2324
|
+
return "${" + fakeVarName + "}";
|
|
2325
|
+
});
|
|
2326
|
+
if (matched.length) {
|
|
2327
|
+
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
break;
|
|
2138
2331
|
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
2139
2332
|
|
|
2140
|
-
var asString = interpolation;
|
|
2141
2333
|
if (registered == null) {
|
|
2142
|
-
return
|
|
2334
|
+
return interpolation;
|
|
2143
2335
|
}
|
|
2144
|
-
var cached = registered[
|
|
2145
|
-
return cached !== undefined ? cached :
|
|
2336
|
+
var cached = registered[interpolation];
|
|
2337
|
+
return cached !== undefined ? cached : interpolation;
|
|
2146
2338
|
}
|
|
2147
2339
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
2148
2340
|
var string = '';
|
|
@@ -2151,37 +2343,39 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
2151
2343
|
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
2152
2344
|
}
|
|
2153
2345
|
} else {
|
|
2154
|
-
for (var
|
|
2155
|
-
var value = obj[
|
|
2346
|
+
for (var _key in obj) {
|
|
2347
|
+
var value = obj[_key];
|
|
2156
2348
|
if (_typeof$1(value) !== 'object') {
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
2349
|
+
if (registered != null && registered[value] !== undefined) {
|
|
2350
|
+
string += _key + "{" + registered[value] + "}";
|
|
2351
|
+
} else if (isProcessableValue(value)) {
|
|
2352
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
|
2162
2353
|
}
|
|
2163
2354
|
} else {
|
|
2164
|
-
if (
|
|
2355
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
|
2165
2356
|
throw new Error(noComponentSelectorMessage);
|
|
2166
2357
|
}
|
|
2167
2358
|
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
2168
2359
|
for (var _i = 0; _i < value.length; _i++) {
|
|
2169
2360
|
if (isProcessableValue(value[_i])) {
|
|
2170
|
-
string += processStyleName(
|
|
2361
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
|
2171
2362
|
}
|
|
2172
2363
|
}
|
|
2173
2364
|
} else {
|
|
2174
2365
|
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
2175
|
-
switch (
|
|
2366
|
+
switch (_key) {
|
|
2176
2367
|
case 'animation':
|
|
2177
2368
|
case 'animationName':
|
|
2178
2369
|
{
|
|
2179
|
-
string += processStyleName(
|
|
2370
|
+
string += processStyleName(_key) + ":" + interpolated + ";";
|
|
2180
2371
|
break;
|
|
2181
2372
|
}
|
|
2182
2373
|
default:
|
|
2183
2374
|
{
|
|
2184
|
-
|
|
2375
|
+
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
|
2376
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
2377
|
+
}
|
|
2378
|
+
string += _key + "{" + interpolated + "}";
|
|
2185
2379
|
}
|
|
2186
2380
|
}
|
|
2187
2381
|
}
|
|
@@ -2190,11 +2384,15 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
2190
2384
|
}
|
|
2191
2385
|
return string;
|
|
2192
2386
|
}
|
|
2193
|
-
var labelPattern = /label:\s*([^\s
|
|
2387
|
+
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
2388
|
+
var sourceMapPattern;
|
|
2389
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2390
|
+
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
2391
|
+
} // this is the cursor for keyframes
|
|
2194
2392
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
2195
2393
|
|
|
2196
2394
|
var cursor;
|
|
2197
|
-
function serializeStyles(args, registered, mergedProps) {
|
|
2395
|
+
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
2198
2396
|
if (args.length === 1 && _typeof$1(args[0]) === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
2199
2397
|
return args[0];
|
|
2200
2398
|
}
|
|
@@ -2206,16 +2404,27 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
2206
2404
|
stringMode = false;
|
|
2207
2405
|
styles += handleInterpolation(mergedProps, registered, strings);
|
|
2208
2406
|
} else {
|
|
2209
|
-
|
|
2210
|
-
|
|
2407
|
+
if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
|
|
2408
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
|
2409
|
+
}
|
|
2410
|
+
styles += strings[0];
|
|
2211
2411
|
} // we start at 1 since we've already handled the first arg
|
|
2212
2412
|
|
|
2213
2413
|
for (var i = 1; i < args.length; i++) {
|
|
2214
2414
|
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
2215
2415
|
if (stringMode) {
|
|
2216
|
-
|
|
2217
|
-
|
|
2416
|
+
if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
|
|
2417
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$1);
|
|
2418
|
+
}
|
|
2419
|
+
styles += strings[i];
|
|
2218
2420
|
}
|
|
2421
|
+
}
|
|
2422
|
+
var sourceMap;
|
|
2423
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2424
|
+
styles = styles.replace(sourceMapPattern, function (match) {
|
|
2425
|
+
sourceMap = match;
|
|
2426
|
+
return '';
|
|
2427
|
+
});
|
|
2219
2428
|
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
2220
2429
|
|
|
2221
2430
|
labelPattern.lastIndex = 0;
|
|
@@ -2223,18 +2432,32 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
2223
2432
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
2224
2433
|
|
|
2225
2434
|
while ((match = labelPattern.exec(styles)) !== null) {
|
|
2226
|
-
identifierName += '-' +
|
|
2435
|
+
identifierName += '-' +
|
|
2436
|
+
// $FlowFixMe we know it's not null
|
|
2437
|
+
match[1];
|
|
2227
2438
|
}
|
|
2228
2439
|
var name = murmur2(styles) + identifierName;
|
|
2440
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2441
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
2442
|
+
return {
|
|
2443
|
+
name: name,
|
|
2444
|
+
styles: styles,
|
|
2445
|
+
map: sourceMap,
|
|
2446
|
+
next: cursor,
|
|
2447
|
+
toString: function toString() {
|
|
2448
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
2449
|
+
}
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2229
2452
|
return {
|
|
2230
2453
|
name: name,
|
|
2231
2454
|
styles: styles,
|
|
2232
2455
|
next: cursor
|
|
2233
2456
|
};
|
|
2234
|
-
}
|
|
2457
|
+
};
|
|
2235
2458
|
|
|
2236
|
-
var isBrowser$
|
|
2237
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2459
|
+
var isBrowser$7 = typeof document !== 'undefined';
|
|
2460
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
2238
2461
|
var EmotionCacheContext$1 = /* #__PURE__ */createContext$2(
|
|
2239
2462
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2240
2463
|
// because this module is primarily intended for the browser and node
|
|
@@ -2254,7 +2477,7 @@ var withEmotionCache$1 = function withEmotionCache(func) {
|
|
|
2254
2477
|
return func(props, cache, ref);
|
|
2255
2478
|
});
|
|
2256
2479
|
};
|
|
2257
|
-
if (!isBrowser$
|
|
2480
|
+
if (!isBrowser$7) {
|
|
2258
2481
|
withEmotionCache$1 = function withEmotionCache(func) {
|
|
2259
2482
|
return function (props) {
|
|
2260
2483
|
var cache = useContext(EmotionCacheContext$1);
|
|
@@ -2305,8 +2528,8 @@ var ThemeProvider$2 = function ThemeProvider(props) {
|
|
|
2305
2528
|
}, props.children);
|
|
2306
2529
|
};
|
|
2307
2530
|
var typePropName$1 = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
2308
|
-
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
2309
|
-
var Emotion$
|
|
2531
|
+
var labelPropName$1 = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
2532
|
+
var Emotion$1 = /* #__PURE__ */withEmotionCache$1(function (props, cache, ref) {
|
|
2310
2533
|
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2311
2534
|
// not passing the registered cache to serializeStyles because it would
|
|
2312
2535
|
// make certain babel optimisations not possible
|
|
@@ -2324,7 +2547,7 @@ var Emotion$2 = /* #__PURE__ */withEmotionCache$1(function (props, cache, ref) {
|
|
|
2324
2547
|
}
|
|
2325
2548
|
var serialized = serializeStyles(registeredStyles, undefined, typeof cssProp === 'function' || Array.isArray(cssProp) ? useContext(ThemeContext$1) : undefined);
|
|
2326
2549
|
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
2327
|
-
var labelFromStack = props[labelPropName];
|
|
2550
|
+
var labelFromStack = props[labelPropName$1];
|
|
2328
2551
|
if (labelFromStack) {
|
|
2329
2552
|
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
2330
2553
|
}
|
|
@@ -2333,14 +2556,14 @@ var Emotion$2 = /* #__PURE__ */withEmotionCache$1(function (props, cache, ref) {
|
|
|
2333
2556
|
className += cache.key + "-" + serialized.name;
|
|
2334
2557
|
var newProps = {};
|
|
2335
2558
|
for (var key in props) {
|
|
2336
|
-
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName$1 && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2559
|
+
if (hasOwnProperty$1.call(props, key) && key !== 'css' && key !== typePropName$1 && (process.env.NODE_ENV === 'production' || key !== labelPropName$1)) {
|
|
2337
2560
|
newProps[key] = props[key];
|
|
2338
2561
|
}
|
|
2339
2562
|
}
|
|
2340
2563
|
newProps.ref = ref;
|
|
2341
2564
|
newProps.className = className;
|
|
2342
2565
|
var ele = /*#__PURE__*/createElement(type, newProps);
|
|
2343
|
-
if (!isBrowser$
|
|
2566
|
+
if (!isBrowser$7 && rules !== undefined) {
|
|
2344
2567
|
var _ref;
|
|
2345
2568
|
var serializedNames = serialized.name;
|
|
2346
2569
|
var next = serialized.next;
|
|
@@ -2355,10 +2578,10 @@ var Emotion$2 = /* #__PURE__ */withEmotionCache$1(function (props, cache, ref) {
|
|
|
2355
2578
|
return ele;
|
|
2356
2579
|
});
|
|
2357
2580
|
if (process.env.NODE_ENV !== 'production') {
|
|
2358
|
-
Emotion$
|
|
2581
|
+
Emotion$1.displayName = 'EmotionCssPropInternal';
|
|
2359
2582
|
}
|
|
2360
2583
|
|
|
2361
|
-
var pkg = {
|
|
2584
|
+
var pkg$1 = {
|
|
2362
2585
|
name: "@emotion/react",
|
|
2363
2586
|
version: "11.1.5",
|
|
2364
2587
|
main: "dist/emotion-react.cjs.js",
|
|
@@ -2418,23 +2641,23 @@ var pkg = {
|
|
|
2418
2641
|
umdName: "emotionReact"
|
|
2419
2642
|
}
|
|
2420
2643
|
};
|
|
2421
|
-
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
2644
|
+
var warnedAboutCssPropForGlobal$1 = false; // maintain place over rerenders.
|
|
2422
2645
|
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
2423
2646
|
// initial client-side render from SSR, use place of hydrating tag
|
|
2424
2647
|
|
|
2425
|
-
var Global = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
2426
|
-
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && (
|
|
2648
|
+
var Global$1 = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
2649
|
+
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal$1 && (
|
|
2427
2650
|
// check for className as well since the user is
|
|
2428
2651
|
// probably using the custom createElement which
|
|
2429
2652
|
// means it will be turned into a className prop
|
|
2430
2653
|
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
2431
2654
|
props.className || props.css)) {
|
|
2432
2655
|
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
2433
|
-
warnedAboutCssPropForGlobal = true;
|
|
2656
|
+
warnedAboutCssPropForGlobal$1 = true;
|
|
2434
2657
|
}
|
|
2435
2658
|
var styles = props.styles;
|
|
2436
2659
|
var serialized = serializeStyles([styles], undefined, typeof styles === 'function' || Array.isArray(styles) ? useContext(ThemeContext$1) : undefined);
|
|
2437
|
-
if (!isBrowser$
|
|
2660
|
+
if (!isBrowser$7) {
|
|
2438
2661
|
var _ref;
|
|
2439
2662
|
var serializedNames = serialized.name;
|
|
2440
2663
|
var serializedStyles = serialized.styles;
|
|
@@ -2499,7 +2722,7 @@ var Global = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
|
2499
2722
|
return null;
|
|
2500
2723
|
});
|
|
2501
2724
|
if (process.env.NODE_ENV !== 'production') {
|
|
2502
|
-
Global.displayName = 'EmotionGlobal';
|
|
2725
|
+
Global$1.displayName = 'EmotionGlobal';
|
|
2503
2726
|
}
|
|
2504
2727
|
function css$5() {
|
|
2505
2728
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2581,7 +2804,7 @@ var ClassNames$1 = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
|
2581
2804
|
args[_key] = arguments[_key];
|
|
2582
2805
|
}
|
|
2583
2806
|
var serialized = serializeStyles(args, cache.registered);
|
|
2584
|
-
if (isBrowser$
|
|
2807
|
+
if (isBrowser$7) {
|
|
2585
2808
|
insertStyles(cache, serialized, false);
|
|
2586
2809
|
} else {
|
|
2587
2810
|
var res = insertStyles(cache, serialized, false);
|
|
@@ -2589,7 +2812,7 @@ var ClassNames$1 = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
|
2589
2812
|
rules += res;
|
|
2590
2813
|
}
|
|
2591
2814
|
}
|
|
2592
|
-
if (!isBrowser$
|
|
2815
|
+
if (!isBrowser$7) {
|
|
2593
2816
|
serializedHashes += " " + serialized.name;
|
|
2594
2817
|
}
|
|
2595
2818
|
return cache.key + "-" + serialized.name;
|
|
@@ -2610,7 +2833,7 @@ var ClassNames$1 = /* #__PURE__ */withEmotionCache$1(function (props, cache) {
|
|
|
2610
2833
|
};
|
|
2611
2834
|
var ele = props.children(content);
|
|
2612
2835
|
hasRendered = true;
|
|
2613
|
-
if (!isBrowser$
|
|
2836
|
+
if (!isBrowser$7 && rules.length !== 0) {
|
|
2614
2837
|
var _ref;
|
|
2615
2838
|
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + " " + serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
|
|
2616
2839
|
__html: rules
|
|
@@ -2622,16 +2845,16 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
2622
2845
|
ClassNames$1.displayName = 'EmotionClassNames';
|
|
2623
2846
|
}
|
|
2624
2847
|
if (process.env.NODE_ENV !== 'production') {
|
|
2625
|
-
var isBrowser$
|
|
2848
|
+
var isBrowser$6 = typeof document !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock
|
|
2626
2849
|
|
|
2627
2850
|
var isJest = typeof jest !== 'undefined';
|
|
2628
|
-
if (isBrowser$
|
|
2629
|
-
var globalContext = isBrowser$
|
|
2630
|
-
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
|
|
2631
|
-
if (globalContext[globalKey]) {
|
|
2851
|
+
if (isBrowser$6 && !isJest) {
|
|
2852
|
+
var globalContext$1 = isBrowser$6 ? window : global;
|
|
2853
|
+
var globalKey$1 = "__EMOTION_REACT_" + pkg$1.version.split('.')[0] + "__";
|
|
2854
|
+
if (globalContext$1[globalKey$1]) {
|
|
2632
2855
|
console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
|
|
2633
2856
|
}
|
|
2634
|
-
globalContext[globalKey] = true;
|
|
2857
|
+
globalContext$1[globalKey$1] = true;
|
|
2635
2858
|
}
|
|
2636
2859
|
}
|
|
2637
2860
|
|
|
@@ -3826,14 +4049,14 @@ var _templateObject$2, _templateObject2$1;
|
|
|
3826
4049
|
var css$4 = String.raw;
|
|
3827
4050
|
var vhPolyfill = css$4(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral$1(["\n :root,\n :host {\n --chakra-vh: 100vh;\n }\n\n @supports (height: -webkit-fill-available) {\n :root,\n :host {\n --chakra-vh: -webkit-fill-available;\n }\n }\n\n @supports (height: -moz-fill-available) {\n :root,\n :host {\n --chakra-vh: -moz-fill-available;\n }\n }\n\n @supports (height: 100dvh) {\n :root,\n :host {\n --chakra-vh: 100dvh;\n }\n }\n"])));
|
|
3828
4051
|
var CSSPolyfill = function CSSPolyfill() {
|
|
3829
|
-
return /* @__PURE__ */jsxRuntimeExports.jsx(Global, {
|
|
4052
|
+
return /* @__PURE__ */jsxRuntimeExports.jsx(Global$1, {
|
|
3830
4053
|
styles: vhPolyfill
|
|
3831
4054
|
});
|
|
3832
4055
|
};
|
|
3833
4056
|
var CSSReset = function CSSReset(_ref) {
|
|
3834
4057
|
var _ref$scope = _ref.scope,
|
|
3835
4058
|
scope = _ref$scope === void 0 ? "" : _ref$scope;
|
|
3836
|
-
return /* @__PURE__ */jsxRuntimeExports.jsx(Global, {
|
|
4059
|
+
return /* @__PURE__ */jsxRuntimeExports.jsx(Global$1, {
|
|
3837
4060
|
styles: css$4(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral$1(["\n html {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n font-family: system-ui, sans-serif;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n -moz-osx-font-smoothing: grayscale;\n touch-action: manipulation;\n }\n\n body {\n position: relative;\n min-height: 100%;\n margin: 0;\n font-feature-settings: \"kern\";\n }\n\n ", " :where(*, *::before, *::after) {\n border-width: 0;\n border-style: solid;\n box-sizing: border-box;\n word-wrap: break-word;\n }\n\n main {\n display: block;\n }\n\n ", " hr {\n border-top-width: 1px;\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n ", " :where(pre, code, kbd,samp) {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 1em;\n }\n\n ", " a {\n background-color: transparent;\n color: inherit;\n text-decoration: inherit;\n }\n\n ", " abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n\n ", " :where(b, strong) {\n font-weight: bold;\n }\n\n ", " small {\n font-size: 80%;\n }\n\n ", " :where(sub,sup) {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n\n ", " sub {\n bottom: -0.25em;\n }\n\n ", " sup {\n top: -0.5em;\n }\n\n ", " img {\n border-style: none;\n }\n\n ", " :where(button, input, optgroup, select, textarea) {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n\n ", " :where(button, input) {\n overflow: visible;\n }\n\n ", " :where(button, select) {\n text-transform: none;\n }\n\n ", " :where(\n button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner\n ) {\n border-style: none;\n padding: 0;\n }\n\n ", " fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n\n ", " legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n\n ", " progress {\n vertical-align: baseline;\n }\n\n ", " textarea {\n overflow: auto;\n }\n\n ", " :where([type=\"checkbox\"], [type=\"radio\"]) {\n box-sizing: border-box;\n padding: 0;\n }\n\n ", " input[type=\"number\"]::-webkit-inner-spin-button,\n ", " input[type=\"number\"]::-webkit-outer-spin-button {\n -webkit-appearance: none !important;\n }\n\n ", " input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n ", " input[type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n\n ", " input[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none !important;\n }\n\n ", " ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n\n ", " details {\n display: block;\n }\n\n ", " summary {\n display: list-item;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n ", " :where(\n blockquote,\n dl,\n dd,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n hr,\n figure,\n p,\n pre\n ) {\n margin: 0;\n }\n\n ", " button {\n background: transparent;\n padding: 0;\n }\n\n ", " fieldset {\n margin: 0;\n padding: 0;\n }\n\n ", " :where(ol, ul) {\n margin: 0;\n padding: 0;\n }\n\n ", " textarea {\n resize: vertical;\n }\n\n ", " :where(button, [role=\"button\"]) {\n cursor: pointer;\n }\n\n ", " button::-moz-focus-inner {\n border: 0 !important;\n }\n\n ", " table {\n border-collapse: collapse;\n }\n\n ", " :where(h1, h2, h3, h4, h5, h6) {\n font-size: inherit;\n font-weight: inherit;\n }\n\n ", " :where(button, input, optgroup, select, textarea) {\n padding: 0;\n line-height: inherit;\n color: inherit;\n }\n\n ", " :where(img, svg, video, canvas, audio, iframe, embed, object) {\n display: block;\n }\n\n ", " :where(img, video) {\n max-width: 100%;\n height: auto;\n }\n\n [data-js-focus-visible]\n :focus:not([data-focus-visible-added]):not(\n [data-focus-visible-disabled]\n ) {\n outline: none;\n box-shadow: none;\n }\n\n ", " select::-ms-expand {\n display: none;\n }\n\n ", "\n "])), scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, scope, vhPolyfill)
|
|
3838
4061
|
});
|
|
3839
4062
|
};
|
|
@@ -6867,7 +7090,7 @@ function get$1(obj, path, fallback, index) {
|
|
|
6867
7090
|
}
|
|
6868
7091
|
return obj === void 0 ? fallback : obj;
|
|
6869
7092
|
}
|
|
6870
|
-
var memoize$
|
|
7093
|
+
var memoize$2 = function memoize(fn) {
|
|
6871
7094
|
var cache = /* @__PURE__ */new WeakMap();
|
|
6872
7095
|
var memoizedFn = function memoizedFn(obj, path, fallback, index) {
|
|
6873
7096
|
if (typeof obj === "undefined") {
|
|
@@ -6886,7 +7109,7 @@ var memoize$1 = function memoize(fn) {
|
|
|
6886
7109
|
};
|
|
6887
7110
|
return memoizedFn;
|
|
6888
7111
|
};
|
|
6889
|
-
var memoizedGet$1 = memoize$
|
|
7112
|
+
var memoizedGet$1 = memoize$2(get$1);
|
|
6890
7113
|
|
|
6891
7114
|
// src/config/others.ts
|
|
6892
7115
|
var srOnly = {
|
|
@@ -12100,7 +12323,7 @@ function mergeThemeCustomizer(source, override, key, object) {
|
|
|
12100
12323
|
function canUseDOM$1() {
|
|
12101
12324
|
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
12102
12325
|
}
|
|
12103
|
-
var isBrowser$
|
|
12326
|
+
var isBrowser$5 = /* @__PURE__ */canUseDOM$1();
|
|
12104
12327
|
|
|
12105
12328
|
function omit$4(object, keys) {
|
|
12106
12329
|
var result = {};
|
|
@@ -12118,7 +12341,7 @@ function get(obj, path, fallback, index) {
|
|
|
12118
12341
|
}
|
|
12119
12342
|
return obj === void 0 ? fallback : obj;
|
|
12120
12343
|
}
|
|
12121
|
-
var memoize = function memoize(fn) {
|
|
12344
|
+
var memoize$1 = function memoize(fn) {
|
|
12122
12345
|
var cache = /* @__PURE__ */new WeakMap();
|
|
12123
12346
|
var memoizedFn = function memoizedFn(obj, path, fallback, index) {
|
|
12124
12347
|
if (typeof obj === "undefined") {
|
|
@@ -12137,7 +12360,7 @@ var memoize = function memoize(fn) {
|
|
|
12137
12360
|
};
|
|
12138
12361
|
return memoizedFn;
|
|
12139
12362
|
};
|
|
12140
|
-
var memoizedGet = memoize(get);
|
|
12363
|
+
var memoizedGet = memoize$1(get);
|
|
12141
12364
|
function objectFilter(object, fn) {
|
|
12142
12365
|
var result = {};
|
|
12143
12366
|
Object.keys(object).forEach(function (key) {
|
|
@@ -12387,10 +12610,18 @@ function compact(object) {
|
|
|
12387
12610
|
return clone;
|
|
12388
12611
|
}
|
|
12389
12612
|
|
|
12613
|
+
function memoize(fn) {
|
|
12614
|
+
var cache = Object.create(null);
|
|
12615
|
+
return function (arg) {
|
|
12616
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
12617
|
+
return cache[arg];
|
|
12618
|
+
};
|
|
12619
|
+
}
|
|
12620
|
+
|
|
12390
12621
|
// eslint-disable-next-line no-undef
|
|
12391
12622
|
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
12392
12623
|
|
|
12393
|
-
var isPropValid = /* #__PURE__ */memoize
|
|
12624
|
+
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
12394
12625
|
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
12395
12626
|
/* o */ && prop.charCodeAt(1) === 110
|
|
12396
12627
|
/* n */ && prop.charCodeAt(2) < 91;
|
|
@@ -12422,7 +12653,7 @@ var composeShouldForwardProps = function composeShouldForwardProps(tag, options,
|
|
|
12422
12653
|
return shouldForwardProp;
|
|
12423
12654
|
};
|
|
12424
12655
|
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
12425
|
-
var isBrowser$
|
|
12656
|
+
var isBrowser$4 = typeof document !== 'undefined';
|
|
12426
12657
|
var createStyled = function createStyled(tag, options) {
|
|
12427
12658
|
if (process.env.NODE_ENV !== 'production') {
|
|
12428
12659
|
if (tag === undefined) {
|
|
@@ -12499,7 +12730,7 @@ var createStyled = function createStyled(tag, options) {
|
|
|
12499
12730
|
newProps.className = className;
|
|
12500
12731
|
newProps.ref = ref;
|
|
12501
12732
|
var ele = /*#__PURE__*/createElement(finalTag, newProps);
|
|
12502
|
-
if (!isBrowser$
|
|
12733
|
+
if (!isBrowser$4 && rules !== undefined) {
|
|
12503
12734
|
var _ref;
|
|
12504
12735
|
var serializedNames = serialized.name;
|
|
12505
12736
|
var next = serialized.next;
|
|
@@ -12662,7 +12893,7 @@ function CSSVars(_ref) {
|
|
|
12662
12893
|
var _ref$root = _ref.root,
|
|
12663
12894
|
root = _ref$root === void 0 ? ":host, :root" : _ref$root;
|
|
12664
12895
|
var selector = [root, "[data-theme]"].join(",");
|
|
12665
|
-
return /* @__PURE__ */jsxRuntimeExports.jsx(Global, {
|
|
12896
|
+
return /* @__PURE__ */jsxRuntimeExports.jsx(Global$1, {
|
|
12666
12897
|
styles: function styles(theme) {
|
|
12667
12898
|
return _defineProperty$3({}, selector, theme.__cssVars);
|
|
12668
12899
|
}
|
|
@@ -12678,7 +12909,7 @@ var _createContext$m = createContext({
|
|
|
12678
12909
|
function GlobalStyle() {
|
|
12679
12910
|
var _useColorMode = useColorMode(),
|
|
12680
12911
|
colorMode = _useColorMode.colorMode;
|
|
12681
|
-
return /* @__PURE__ */jsxRuntimeExports.jsx(Global, {
|
|
12912
|
+
return /* @__PURE__ */jsxRuntimeExports.jsx(Global$1, {
|
|
12682
12913
|
styles: function styles(theme) {
|
|
12683
12914
|
var styleObjectOrFn = memoizedGet(theme, "styles.global");
|
|
12684
12915
|
var globalStyles = runIfFn(styleObjectOrFn, {
|
|
@@ -12837,7 +13068,7 @@ function getToastListStyle(position) {
|
|
|
12837
13068
|
};
|
|
12838
13069
|
}
|
|
12839
13070
|
|
|
12840
|
-
function useCallbackRef$
|
|
13071
|
+
function useCallbackRef$3(callback) {
|
|
12841
13072
|
var deps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
12842
13073
|
var callbackRef = useRef(callback);
|
|
12843
13074
|
useEffect(function () {
|
|
@@ -12854,7 +13085,7 @@ function useCallbackRef$2(callback) {
|
|
|
12854
13085
|
}
|
|
12855
13086
|
|
|
12856
13087
|
function useTimeout(callback, delay) {
|
|
12857
|
-
var fn = useCallbackRef$
|
|
13088
|
+
var fn = useCallbackRef$3(callback);
|
|
12858
13089
|
useEffect(function () {
|
|
12859
13090
|
if (delay == null) return void 0;
|
|
12860
13091
|
var timeoutId = null;
|
|
@@ -12906,9 +13137,9 @@ var MotionContext = /*#__PURE__*/createContext$2({});
|
|
|
12906
13137
|
*/
|
|
12907
13138
|
var PresenceContext = /*#__PURE__*/createContext$2(null);
|
|
12908
13139
|
|
|
12909
|
-
var isBrowser$
|
|
13140
|
+
var isBrowser$3 = typeof document !== "undefined";
|
|
12910
13141
|
|
|
12911
|
-
var useIsomorphicLayoutEffect$1 = isBrowser$
|
|
13142
|
+
var useIsomorphicLayoutEffect$1 = isBrowser$3 ? useLayoutEffect : useEffect;
|
|
12912
13143
|
|
|
12913
13144
|
var LazyContext = /*#__PURE__*/createContext$2({
|
|
12914
13145
|
strict: false
|
|
@@ -13134,7 +13365,7 @@ function createMotionComponent(_ref) {
|
|
|
13134
13365
|
var isStatic = configAndProps.isStatic;
|
|
13135
13366
|
var context = useCreateMotionContext(props);
|
|
13136
13367
|
var visualState = useVisualState(props, isStatic);
|
|
13137
|
-
if (!isStatic && isBrowser$
|
|
13368
|
+
if (!isStatic && isBrowser$3) {
|
|
13138
13369
|
/**
|
|
13139
13370
|
* Create a VisualElement for this component. A VisualElement provides a common
|
|
13140
13371
|
* interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
|
|
@@ -21694,7 +21925,7 @@ var checkAndConvertChangedValueTypes = function checkAndConvertChangedValueTypes
|
|
|
21694
21925
|
// Reapply original values
|
|
21695
21926
|
visualElement.render();
|
|
21696
21927
|
// Restore scroll position
|
|
21697
|
-
if (isBrowser$
|
|
21928
|
+
if (isBrowser$3 && scrollY !== null) {
|
|
21698
21929
|
window.scrollTo({
|
|
21699
21930
|
top: scrollY
|
|
21700
21931
|
});
|
|
@@ -21745,7 +21976,7 @@ var hasReducedMotionListener = {
|
|
|
21745
21976
|
|
|
21746
21977
|
function initPrefersReducedMotion() {
|
|
21747
21978
|
hasReducedMotionListener.current = true;
|
|
21748
|
-
if (!isBrowser$
|
|
21979
|
+
if (!isBrowser$3) return;
|
|
21749
21980
|
if (window.matchMedia) {
|
|
21750
21981
|
var motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
|
|
21751
21982
|
var setReducedMotionPreferences = function setReducedMotionPreferences() {
|
|
@@ -23888,7 +24119,7 @@ var DescendantsManager = /*#__PURE__*/_createClass$1(function DescendantsManager
|
|
|
23888
24119
|
});
|
|
23889
24120
|
});
|
|
23890
24121
|
|
|
23891
|
-
function assignRef$
|
|
24122
|
+
function assignRef$2(ref, value) {
|
|
23892
24123
|
if (ref == null) return;
|
|
23893
24124
|
if (typeof ref === "function") {
|
|
23894
24125
|
ref(value);
|
|
@@ -23906,11 +24137,11 @@ function mergeRefs() {
|
|
|
23906
24137
|
}
|
|
23907
24138
|
return function (node) {
|
|
23908
24139
|
refs.forEach(function (ref) {
|
|
23909
|
-
assignRef$
|
|
24140
|
+
assignRef$2(ref, node);
|
|
23910
24141
|
});
|
|
23911
24142
|
};
|
|
23912
24143
|
}
|
|
23913
|
-
function useMergeRefs$
|
|
24144
|
+
function useMergeRefs$2() {
|
|
23914
24145
|
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
23915
24146
|
refs[_key2] = arguments[_key2];
|
|
23916
24147
|
}
|
|
@@ -24034,15 +24265,15 @@ function useControllableState$1(props) {
|
|
|
24034
24265
|
shouldUpdate = _props$shouldUpdate === void 0 ? function (prev, next) {
|
|
24035
24266
|
return prev !== next;
|
|
24036
24267
|
} : _props$shouldUpdate;
|
|
24037
|
-
var onChangeProp = useCallbackRef$
|
|
24038
|
-
var shouldUpdateProp = useCallbackRef$
|
|
24268
|
+
var onChangeProp = useCallbackRef$3(onChange);
|
|
24269
|
+
var shouldUpdateProp = useCallbackRef$3(shouldUpdate);
|
|
24039
24270
|
var _useState = useState(defaultValue),
|
|
24040
24271
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
24041
24272
|
uncontrolledState = _useState2[0],
|
|
24042
24273
|
setUncontrolledState = _useState2[1];
|
|
24043
24274
|
var controlled = valueProp !== void 0;
|
|
24044
24275
|
var value = controlled ? valueProp : uncontrolledState;
|
|
24045
|
-
var setValue = useCallbackRef$
|
|
24276
|
+
var setValue = useCallbackRef$3(function (next) {
|
|
24046
24277
|
var setter = next;
|
|
24047
24278
|
var nextValue = typeof next === "function" ? setter(value) : next;
|
|
24048
24279
|
if (!shouldUpdateProp(value, nextValue)) {
|
|
@@ -25496,7 +25727,7 @@ var Button$2 = forwardRef(function (props, ref) {
|
|
|
25496
25727
|
children: children
|
|
25497
25728
|
};
|
|
25498
25729
|
return /* @__PURE__ */jsxRuntimeExports.jsxs(chakra.button, _objectSpread2$1(_objectSpread2$1({
|
|
25499
|
-
ref: useMergeRefs$
|
|
25730
|
+
ref: useMergeRefs$2(ref, _ref),
|
|
25500
25731
|
as: as,
|
|
25501
25732
|
type: type != null ? type : defaultType,
|
|
25502
25733
|
"data-active": dataAttr(isActive),
|
|
@@ -25558,7 +25789,7 @@ function useCheckboxGroup() {
|
|
|
25558
25789
|
onChange = props.onChange,
|
|
25559
25790
|
isDisabled = props.isDisabled,
|
|
25560
25791
|
isNative = props.isNative;
|
|
25561
|
-
var onChangeProp = useCallbackRef$
|
|
25792
|
+
var onChangeProp = useCallbackRef$3(onChange);
|
|
25562
25793
|
var _useControllableState = useControllableState$1({
|
|
25563
25794
|
value: valueProp,
|
|
25564
25795
|
defaultValue: defaultValue || [],
|
|
@@ -26151,9 +26382,9 @@ function useCheckbox() {
|
|
|
26151
26382
|
ariaInvalid = props["aria-invalid"],
|
|
26152
26383
|
rest = _objectWithoutProperties$1(props, _excluded$1H);
|
|
26153
26384
|
var htmlProps = omit$2(rest, ["isDisabled", "isReadOnly", "isRequired", "isInvalid", "id", "onBlur", "onFocus", "aria-describedby"]);
|
|
26154
|
-
var onChangeProp = useCallbackRef$
|
|
26155
|
-
var onBlurProp = useCallbackRef$
|
|
26156
|
-
var onFocusProp = useCallbackRef$
|
|
26385
|
+
var onChangeProp = useCallbackRef$3(onChange);
|
|
26386
|
+
var onBlurProp = useCallbackRef$3(onBlur);
|
|
26387
|
+
var onFocusProp = useCallbackRef$3(onFocus);
|
|
26157
26388
|
var _useState = useState(false),
|
|
26158
26389
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
26159
26390
|
isFocusVisible = _useState2[0],
|
|
@@ -26498,7 +26729,7 @@ var Checkbox$1 = forwardRef(function Checkbox2(props, ref) {
|
|
|
26498
26729
|
Checkbox$1.displayName = "Checkbox";
|
|
26499
26730
|
|
|
26500
26731
|
function useEventListener(target, event, handler, options) {
|
|
26501
|
-
var listener = useCallbackRef$
|
|
26732
|
+
var listener = useCallbackRef$3(handler);
|
|
26502
26733
|
useEffect(function () {
|
|
26503
26734
|
var node = typeof target === "function" ? target() : target != null ? target : document;
|
|
26504
26735
|
if (!handler || !node) return;
|
|
@@ -26559,14 +26790,17 @@ function useFocusOnPointerDown(props) {
|
|
|
26559
26790
|
});
|
|
26560
26791
|
}
|
|
26561
26792
|
|
|
26562
|
-
function _objectWithoutPropertiesLoose(
|
|
26563
|
-
if (
|
|
26564
|
-
var
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26793
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
26794
|
+
if (source == null) return {};
|
|
26795
|
+
var target = {};
|
|
26796
|
+
var sourceKeys = Object.keys(source);
|
|
26797
|
+
var key, i;
|
|
26798
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
26799
|
+
key = sourceKeys[i];
|
|
26800
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26801
|
+
target[key] = source[key];
|
|
26568
26802
|
}
|
|
26569
|
-
return
|
|
26803
|
+
return target;
|
|
26570
26804
|
}
|
|
26571
26805
|
|
|
26572
26806
|
/**
|
|
@@ -26605,7 +26839,7 @@ var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';
|
|
|
26605
26839
|
* assignRef(refObject, "refValue");
|
|
26606
26840
|
* assignRef(refFn, "refValue");
|
|
26607
26841
|
*/
|
|
26608
|
-
function assignRef(ref, value) {
|
|
26842
|
+
function assignRef$1(ref, value) {
|
|
26609
26843
|
if (typeof ref === 'function') {
|
|
26610
26844
|
ref(value);
|
|
26611
26845
|
} else if (ref) {
|
|
@@ -26628,7 +26862,7 @@ function assignRef(ref, value) {
|
|
|
26628
26862
|
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
26629
26863
|
* @returns {MutableRefObject}
|
|
26630
26864
|
*/
|
|
26631
|
-
function useCallbackRef$
|
|
26865
|
+
function useCallbackRef$2(initialValue, callback) {
|
|
26632
26866
|
var ref = useState(function () {
|
|
26633
26867
|
return {
|
|
26634
26868
|
// value
|
|
@@ -26671,10 +26905,10 @@ var currentValues = new WeakMap();
|
|
|
26671
26905
|
* return <div ref={domRef}>...</div>
|
|
26672
26906
|
* }
|
|
26673
26907
|
*/
|
|
26674
|
-
function useMergeRefs(refs, defaultValue) {
|
|
26675
|
-
var callbackRef = useCallbackRef$
|
|
26908
|
+
function useMergeRefs$1(refs, defaultValue) {
|
|
26909
|
+
var callbackRef = useCallbackRef$2(null, function (newValue) {
|
|
26676
26910
|
return refs.forEach(function (ref) {
|
|
26677
|
-
return assignRef(ref, newValue);
|
|
26911
|
+
return assignRef$1(ref, newValue);
|
|
26678
26912
|
});
|
|
26679
26913
|
});
|
|
26680
26914
|
// handle refs changes - added or removed
|
|
@@ -26686,12 +26920,12 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
26686
26920
|
var current_1 = callbackRef.current;
|
|
26687
26921
|
prevRefs_1.forEach(function (ref) {
|
|
26688
26922
|
if (!nextRefs_1.has(ref)) {
|
|
26689
|
-
assignRef(ref, null);
|
|
26923
|
+
assignRef$1(ref, null);
|
|
26690
26924
|
}
|
|
26691
26925
|
});
|
|
26692
26926
|
nextRefs_1.forEach(function (ref) {
|
|
26693
26927
|
if (!prevRefs_1.has(ref)) {
|
|
26694
|
-
assignRef(ref, current_1);
|
|
26928
|
+
assignRef$1(ref, current_1);
|
|
26695
26929
|
}
|
|
26696
26930
|
});
|
|
26697
26931
|
}
|
|
@@ -26745,12 +26979,12 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
26745
26979
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
26746
26980
|
};
|
|
26747
26981
|
|
|
26748
|
-
function ItoI(a) {
|
|
26982
|
+
function ItoI$1(a) {
|
|
26749
26983
|
return a;
|
|
26750
26984
|
}
|
|
26751
|
-
function innerCreateMedium(defaults, middleware) {
|
|
26985
|
+
function innerCreateMedium$1(defaults, middleware) {
|
|
26752
26986
|
if (middleware === void 0) {
|
|
26753
|
-
middleware = ItoI;
|
|
26987
|
+
middleware = ItoI$1;
|
|
26754
26988
|
}
|
|
26755
26989
|
var buffer = [];
|
|
26756
26990
|
var assigned = false;
|
|
@@ -26823,16 +27057,16 @@ function innerCreateMedium(defaults, middleware) {
|
|
|
26823
27057
|
}
|
|
26824
27058
|
function createMedium(defaults, middleware) {
|
|
26825
27059
|
if (middleware === void 0) {
|
|
26826
|
-
middleware = ItoI;
|
|
27060
|
+
middleware = ItoI$1;
|
|
26827
27061
|
}
|
|
26828
|
-
return innerCreateMedium(defaults, middleware);
|
|
27062
|
+
return innerCreateMedium$1(defaults, middleware);
|
|
26829
27063
|
}
|
|
26830
27064
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
26831
|
-
function createSidecarMedium(options) {
|
|
27065
|
+
function createSidecarMedium$1(options) {
|
|
26832
27066
|
if (options === void 0) {
|
|
26833
27067
|
options = {};
|
|
26834
27068
|
}
|
|
26835
|
-
var medium = innerCreateMedium(null);
|
|
27069
|
+
var medium = innerCreateMedium$1(null);
|
|
26836
27070
|
medium.options = _assign({
|
|
26837
27071
|
async: true,
|
|
26838
27072
|
ssr: false
|
|
@@ -26840,24 +27074,6 @@ function createSidecarMedium(options) {
|
|
|
26840
27074
|
return medium;
|
|
26841
27075
|
}
|
|
26842
27076
|
|
|
26843
|
-
var SideCar$1 = function SideCar(_a) {
|
|
26844
|
-
var sideCar = _a.sideCar,
|
|
26845
|
-
rest = __rest(_a, ["sideCar"]);
|
|
26846
|
-
if (!sideCar) {
|
|
26847
|
-
throw new Error('Sidecar: please provide `sideCar` property to import the right car');
|
|
26848
|
-
}
|
|
26849
|
-
var Target = sideCar.read();
|
|
26850
|
-
if (!Target) {
|
|
26851
|
-
throw new Error('Sidecar medium not found');
|
|
26852
|
-
}
|
|
26853
|
-
return /*#__PURE__*/React.createElement(Target, _assign({}, rest));
|
|
26854
|
-
};
|
|
26855
|
-
SideCar$1.isSideCarExport = true;
|
|
26856
|
-
function exportSidecar(medium, exported) {
|
|
26857
|
-
medium.useMedium(exported);
|
|
26858
|
-
return SideCar$1;
|
|
26859
|
-
}
|
|
26860
|
-
|
|
26861
27077
|
var mediumFocus = createMedium({}, function (_ref) {
|
|
26862
27078
|
var target = _ref.target,
|
|
26863
27079
|
currentTarget = _ref.currentTarget;
|
|
@@ -26868,7 +27084,7 @@ var mediumFocus = createMedium({}, function (_ref) {
|
|
|
26868
27084
|
});
|
|
26869
27085
|
var mediumBlur = createMedium();
|
|
26870
27086
|
var mediumEffect = createMedium();
|
|
26871
|
-
var mediumSidecar = createSidecarMedium({
|
|
27087
|
+
var mediumSidecar = createSidecarMedium$1({
|
|
26872
27088
|
async: true,
|
|
26873
27089
|
ssr: typeof document !== 'undefined'
|
|
26874
27090
|
});
|
|
@@ -26982,7 +27198,7 @@ var FocusLock$1 = /*#__PURE__*/forwardRef$1(function FocusLockUI(props, parentRe
|
|
|
26982
27198
|
var lockProps = _extends$6((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled && 'disabled', _extends2[FOCUS_GROUP] = group, _extends2), containerProps);
|
|
26983
27199
|
var hasLeadingGuards = noFocusGuards !== true;
|
|
26984
27200
|
var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';
|
|
26985
|
-
var mergedRef = useMergeRefs([parentRef, setObserveNode]);
|
|
27201
|
+
var mergedRef = useMergeRefs$1([parentRef, setObserveNode]);
|
|
26986
27202
|
var focusScopeValue = useMemo(function () {
|
|
26987
27203
|
return {
|
|
26988
27204
|
observed: observed,
|
|
@@ -27053,14 +27269,18 @@ FocusLock$1.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
27053
27269
|
sideCar: any.isRequired
|
|
27054
27270
|
} : {};
|
|
27055
27271
|
|
|
27056
|
-
function _setPrototypeOf(
|
|
27057
|
-
|
|
27058
|
-
|
|
27059
|
-
|
|
27272
|
+
function _setPrototypeOf(o, p) {
|
|
27273
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
27274
|
+
o.__proto__ = p;
|
|
27275
|
+
return o;
|
|
27276
|
+
};
|
|
27277
|
+
return _setPrototypeOf(o, p);
|
|
27060
27278
|
}
|
|
27061
27279
|
|
|
27062
|
-
function _inheritsLoose(
|
|
27063
|
-
|
|
27280
|
+
function _inheritsLoose(subClass, superClass) {
|
|
27281
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
27282
|
+
subClass.prototype.constructor = subClass;
|
|
27283
|
+
_setPrototypeOf(subClass, superClass);
|
|
27064
27284
|
}
|
|
27065
27285
|
|
|
27066
27286
|
function _typeof(o) {
|
|
@@ -27073,29 +27293,35 @@ function _typeof(o) {
|
|
|
27073
27293
|
}, _typeof(o);
|
|
27074
27294
|
}
|
|
27075
27295
|
|
|
27076
|
-
function
|
|
27077
|
-
if ("object"
|
|
27078
|
-
var
|
|
27079
|
-
if (
|
|
27080
|
-
var
|
|
27081
|
-
if ("object"
|
|
27296
|
+
function _toPrimitive(input, hint) {
|
|
27297
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
27298
|
+
var prim = input[Symbol.toPrimitive];
|
|
27299
|
+
if (prim !== undefined) {
|
|
27300
|
+
var res = prim.call(input, hint);
|
|
27301
|
+
if (_typeof(res) !== "object") return res;
|
|
27082
27302
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
27083
27303
|
}
|
|
27084
|
-
return (
|
|
27304
|
+
return (String )(input);
|
|
27085
27305
|
}
|
|
27086
27306
|
|
|
27087
|
-
function
|
|
27088
|
-
var
|
|
27089
|
-
return "symbol"
|
|
27307
|
+
function _toPropertyKey(arg) {
|
|
27308
|
+
var key = _toPrimitive(arg, "string");
|
|
27309
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
27090
27310
|
}
|
|
27091
27311
|
|
|
27092
|
-
function _defineProperty$2(
|
|
27093
|
-
|
|
27094
|
-
|
|
27095
|
-
|
|
27096
|
-
|
|
27097
|
-
|
|
27098
|
-
|
|
27312
|
+
function _defineProperty$2(obj, key, value) {
|
|
27313
|
+
key = _toPropertyKey(key);
|
|
27314
|
+
if (key in obj) {
|
|
27315
|
+
Object.defineProperty(obj, key, {
|
|
27316
|
+
value: value,
|
|
27317
|
+
enumerable: true,
|
|
27318
|
+
configurable: true,
|
|
27319
|
+
writable: true
|
|
27320
|
+
});
|
|
27321
|
+
} else {
|
|
27322
|
+
obj[key] = value;
|
|
27323
|
+
}
|
|
27324
|
+
return obj;
|
|
27099
27325
|
}
|
|
27100
27326
|
|
|
27101
27327
|
function withSideEffect(reducePropsToState, handleStateChangeOnClient) {
|
|
@@ -28545,9 +28771,9 @@ var FocusLock = function FocusLock(props) {
|
|
|
28545
28771
|
};
|
|
28546
28772
|
FocusLock.displayName = "FocusLock";
|
|
28547
28773
|
|
|
28548
|
-
var useSafeLayoutEffect = isBrowser$
|
|
28774
|
+
var useSafeLayoutEffect = isBrowser$5 ? useLayoutEffect : useEffect;
|
|
28549
28775
|
|
|
28550
|
-
function useCallbackRef(fn) {
|
|
28776
|
+
function useCallbackRef$1(fn) {
|
|
28551
28777
|
var deps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
28552
28778
|
var ref = useRef(fn);
|
|
28553
28779
|
useSafeLayoutEffect(function () {
|
|
@@ -28583,8 +28809,8 @@ function useControllableState(props) {
|
|
|
28583
28809
|
shouldUpdate = _props$shouldUpdate === void 0 ? function (prev, next) {
|
|
28584
28810
|
return prev !== next;
|
|
28585
28811
|
} : _props$shouldUpdate;
|
|
28586
|
-
var onChangeProp = useCallbackRef(onChange);
|
|
28587
|
-
var shouldUpdateProp = useCallbackRef(shouldUpdate);
|
|
28812
|
+
var onChangeProp = useCallbackRef$1(onChange);
|
|
28813
|
+
var shouldUpdateProp = useCallbackRef$1(shouldUpdate);
|
|
28588
28814
|
var _useState = useState(defaultValue),
|
|
28589
28815
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
28590
28816
|
valueState = _useState2[0],
|
|
@@ -28610,8 +28836,8 @@ function useDisclosure$1() {
|
|
|
28610
28836
|
onOpenProp = props.onOpen,
|
|
28611
28837
|
isOpenProp = props.isOpen,
|
|
28612
28838
|
idProp = props.id;
|
|
28613
|
-
var onOpenPropCallbackRef = useCallbackRef(onOpenProp);
|
|
28614
|
-
var onClosePropCallbackRef = useCallbackRef(onCloseProp);
|
|
28839
|
+
var onOpenPropCallbackRef = useCallbackRef$1(onOpenProp);
|
|
28840
|
+
var onClosePropCallbackRef = useCallbackRef$1(onCloseProp);
|
|
28615
28841
|
var _useState = useState(props.defaultIsOpen || false),
|
|
28616
28842
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
28617
28843
|
isOpenState = _useState2[0],
|
|
@@ -32238,8 +32464,8 @@ function useDisclosure() {
|
|
|
32238
32464
|
onOpenProp = props.onOpen,
|
|
32239
32465
|
isOpenProp = props.isOpen,
|
|
32240
32466
|
idProp = props.id;
|
|
32241
|
-
var handleOpen = useCallbackRef$
|
|
32242
|
-
var handleClose = useCallbackRef$
|
|
32467
|
+
var handleOpen = useCallbackRef$3(onOpenProp);
|
|
32468
|
+
var handleClose = useCallbackRef$3(onCloseProp);
|
|
32243
32469
|
var _useState = useState(props.defaultIsOpen || false),
|
|
32244
32470
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
32245
32471
|
isOpenState = _useState2[0],
|
|
@@ -32302,7 +32528,7 @@ function useOutsideClick(props) {
|
|
|
32302
32528
|
handler = props.handler,
|
|
32303
32529
|
_props$enabled = props.enabled,
|
|
32304
32530
|
enabled = _props$enabled === void 0 ? true : _props$enabled;
|
|
32305
|
-
var savedHandler = useCallbackRef$
|
|
32531
|
+
var savedHandler = useCallbackRef$3(handler);
|
|
32306
32532
|
var stateRef = useRef({
|
|
32307
32533
|
isPointerDown: false,
|
|
32308
32534
|
ignoreEmulatedMouseEvents: false
|
|
@@ -33664,6 +33890,198 @@ var noScrollbarsClassName = 'with-scroll-bars-hidden';
|
|
|
33664
33890
|
*/
|
|
33665
33891
|
var removedBarSizeVariable = '--removed-body-scroll-bar-size';
|
|
33666
33892
|
|
|
33893
|
+
/**
|
|
33894
|
+
* Assigns a value for a given ref, no matter of the ref format
|
|
33895
|
+
* @param {RefObject} ref - a callback function or ref object
|
|
33896
|
+
* @param value - a new value
|
|
33897
|
+
*
|
|
33898
|
+
* @see https://github.com/theKashey/use-callback-ref#assignref
|
|
33899
|
+
* @example
|
|
33900
|
+
* const refObject = useRef();
|
|
33901
|
+
* const refFn = (ref) => {....}
|
|
33902
|
+
*
|
|
33903
|
+
* assignRef(refObject, "refValue");
|
|
33904
|
+
* assignRef(refFn, "refValue");
|
|
33905
|
+
*/
|
|
33906
|
+
function assignRef(ref, value) {
|
|
33907
|
+
if (typeof ref === 'function') {
|
|
33908
|
+
ref(value);
|
|
33909
|
+
} else if (ref) {
|
|
33910
|
+
ref.current = value;
|
|
33911
|
+
}
|
|
33912
|
+
return ref;
|
|
33913
|
+
}
|
|
33914
|
+
|
|
33915
|
+
/**
|
|
33916
|
+
* creates a MutableRef with ref change callback
|
|
33917
|
+
* @param initialValue - initial ref value
|
|
33918
|
+
* @param {Function} callback - a callback to run when value changes
|
|
33919
|
+
*
|
|
33920
|
+
* @example
|
|
33921
|
+
* const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
|
|
33922
|
+
* ref.current = 1;
|
|
33923
|
+
* // prints 0 -> 1
|
|
33924
|
+
*
|
|
33925
|
+
* @see https://reactjs.org/docs/hooks-reference.html#useref
|
|
33926
|
+
* @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
|
|
33927
|
+
* @returns {MutableRefObject}
|
|
33928
|
+
*/
|
|
33929
|
+
function useCallbackRef(initialValue, callback) {
|
|
33930
|
+
var ref = useState(function () {
|
|
33931
|
+
return {
|
|
33932
|
+
// value
|
|
33933
|
+
value: initialValue,
|
|
33934
|
+
// last callback
|
|
33935
|
+
callback: callback,
|
|
33936
|
+
// "memoized" public interface
|
|
33937
|
+
facade: {
|
|
33938
|
+
get current() {
|
|
33939
|
+
return ref.value;
|
|
33940
|
+
},
|
|
33941
|
+
set current(value) {
|
|
33942
|
+
var last = ref.value;
|
|
33943
|
+
if (last !== value) {
|
|
33944
|
+
ref.value = value;
|
|
33945
|
+
ref.callback(value, last);
|
|
33946
|
+
}
|
|
33947
|
+
}
|
|
33948
|
+
}
|
|
33949
|
+
};
|
|
33950
|
+
})[0];
|
|
33951
|
+
// update callback
|
|
33952
|
+
ref.callback = callback;
|
|
33953
|
+
return ref.facade;
|
|
33954
|
+
}
|
|
33955
|
+
|
|
33956
|
+
/**
|
|
33957
|
+
* Merges two or more refs together providing a single interface to set their value
|
|
33958
|
+
* @param {RefObject|Ref} refs
|
|
33959
|
+
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
|
|
33960
|
+
*
|
|
33961
|
+
* @see {@link mergeRefs} a version without buit-in memoization
|
|
33962
|
+
* @see https://github.com/theKashey/use-callback-ref#usemergerefs
|
|
33963
|
+
* @example
|
|
33964
|
+
* const Component = React.forwardRef((props, ref) => {
|
|
33965
|
+
* const ownRef = useRef();
|
|
33966
|
+
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
|
|
33967
|
+
* return <div ref={domRef}>...</div>
|
|
33968
|
+
* }
|
|
33969
|
+
*/
|
|
33970
|
+
function useMergeRefs(refs, defaultValue) {
|
|
33971
|
+
return useCallbackRef(null, function (newValue) {
|
|
33972
|
+
return refs.forEach(function (ref) {
|
|
33973
|
+
return assignRef(ref, newValue);
|
|
33974
|
+
});
|
|
33975
|
+
});
|
|
33976
|
+
}
|
|
33977
|
+
|
|
33978
|
+
function ItoI(a) {
|
|
33979
|
+
return a;
|
|
33980
|
+
}
|
|
33981
|
+
function innerCreateMedium(defaults, middleware) {
|
|
33982
|
+
if (middleware === void 0) {
|
|
33983
|
+
middleware = ItoI;
|
|
33984
|
+
}
|
|
33985
|
+
var buffer = [];
|
|
33986
|
+
var assigned = false;
|
|
33987
|
+
var medium = {
|
|
33988
|
+
read: function read() {
|
|
33989
|
+
if (assigned) {
|
|
33990
|
+
throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
|
|
33991
|
+
}
|
|
33992
|
+
if (buffer.length) {
|
|
33993
|
+
return buffer[buffer.length - 1];
|
|
33994
|
+
}
|
|
33995
|
+
return defaults;
|
|
33996
|
+
},
|
|
33997
|
+
useMedium: function useMedium(data) {
|
|
33998
|
+
var item = middleware(data, assigned);
|
|
33999
|
+
buffer.push(item);
|
|
34000
|
+
return function () {
|
|
34001
|
+
buffer = buffer.filter(function (x) {
|
|
34002
|
+
return x !== item;
|
|
34003
|
+
});
|
|
34004
|
+
};
|
|
34005
|
+
},
|
|
34006
|
+
assignSyncMedium: function assignSyncMedium(cb) {
|
|
34007
|
+
assigned = true;
|
|
34008
|
+
while (buffer.length) {
|
|
34009
|
+
var cbs = buffer;
|
|
34010
|
+
buffer = [];
|
|
34011
|
+
cbs.forEach(cb);
|
|
34012
|
+
}
|
|
34013
|
+
buffer = {
|
|
34014
|
+
push: function push(x) {
|
|
34015
|
+
return cb(x);
|
|
34016
|
+
},
|
|
34017
|
+
filter: function filter() {
|
|
34018
|
+
return buffer;
|
|
34019
|
+
}
|
|
34020
|
+
};
|
|
34021
|
+
},
|
|
34022
|
+
assignMedium: function assignMedium(cb) {
|
|
34023
|
+
assigned = true;
|
|
34024
|
+
var pendingQueue = [];
|
|
34025
|
+
if (buffer.length) {
|
|
34026
|
+
var cbs = buffer;
|
|
34027
|
+
buffer = [];
|
|
34028
|
+
cbs.forEach(cb);
|
|
34029
|
+
pendingQueue = buffer;
|
|
34030
|
+
}
|
|
34031
|
+
var executeQueue = function executeQueue() {
|
|
34032
|
+
var cbs = pendingQueue;
|
|
34033
|
+
pendingQueue = [];
|
|
34034
|
+
cbs.forEach(cb);
|
|
34035
|
+
};
|
|
34036
|
+
var cycle = function cycle() {
|
|
34037
|
+
return Promise.resolve().then(executeQueue);
|
|
34038
|
+
};
|
|
34039
|
+
cycle();
|
|
34040
|
+
buffer = {
|
|
34041
|
+
push: function push(x) {
|
|
34042
|
+
pendingQueue.push(x);
|
|
34043
|
+
cycle();
|
|
34044
|
+
},
|
|
34045
|
+
filter: function filter(_filter) {
|
|
34046
|
+
pendingQueue = pendingQueue.filter(_filter);
|
|
34047
|
+
return buffer;
|
|
34048
|
+
}
|
|
34049
|
+
};
|
|
34050
|
+
}
|
|
34051
|
+
};
|
|
34052
|
+
return medium;
|
|
34053
|
+
}
|
|
34054
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
34055
|
+
function createSidecarMedium(options) {
|
|
34056
|
+
if (options === void 0) {
|
|
34057
|
+
options = {};
|
|
34058
|
+
}
|
|
34059
|
+
var medium = innerCreateMedium(null);
|
|
34060
|
+
medium.options = _assign({
|
|
34061
|
+
async: true,
|
|
34062
|
+
ssr: false
|
|
34063
|
+
}, options);
|
|
34064
|
+
return medium;
|
|
34065
|
+
}
|
|
34066
|
+
|
|
34067
|
+
var SideCar$1 = function SideCar(_a) {
|
|
34068
|
+
var sideCar = _a.sideCar,
|
|
34069
|
+
rest = __rest(_a, ["sideCar"]);
|
|
34070
|
+
if (!sideCar) {
|
|
34071
|
+
throw new Error('Sidecar: please provide `sideCar` property to import the right car');
|
|
34072
|
+
}
|
|
34073
|
+
var Target = sideCar.read();
|
|
34074
|
+
if (!Target) {
|
|
34075
|
+
throw new Error('Sidecar medium not found');
|
|
34076
|
+
}
|
|
34077
|
+
return /*#__PURE__*/React.createElement(Target, _assign({}, rest));
|
|
34078
|
+
};
|
|
34079
|
+
SideCar$1.isSideCarExport = true;
|
|
34080
|
+
function exportSidecar(medium, exported) {
|
|
34081
|
+
medium.useMedium(exported);
|
|
34082
|
+
return SideCar$1;
|
|
34083
|
+
}
|
|
34084
|
+
|
|
33667
34085
|
var effectCar = createSidecarMedium();
|
|
33668
34086
|
|
|
33669
34087
|
var nothing = function nothing() {
|
|
@@ -33851,7 +34269,6 @@ var getGapWidth = function getGapWidth(gapMode) {
|
|
|
33851
34269
|
};
|
|
33852
34270
|
|
|
33853
34271
|
var Style = styleSingleton();
|
|
33854
|
-
var lockAttribute = 'data-scroll-locked';
|
|
33855
34272
|
// important tip - once we measure scrollBar width and remove them
|
|
33856
34273
|
// we could not repeat this operation
|
|
33857
34274
|
// thus we are using style-singleton - only the first "yet correct" style will be applied.
|
|
@@ -33863,34 +34280,16 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
33863
34280
|
if (gapMode === void 0) {
|
|
33864
34281
|
gapMode = 'margin';
|
|
33865
34282
|
}
|
|
33866
|
-
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body
|
|
33867
|
-
};
|
|
33868
|
-
var getCurrentUseCounter = function getCurrentUseCounter() {
|
|
33869
|
-
var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
|
|
33870
|
-
return isFinite(counter) ? counter : 0;
|
|
33871
|
-
};
|
|
33872
|
-
var useLockAttribute = function useLockAttribute() {
|
|
33873
|
-
React.useEffect(function () {
|
|
33874
|
-
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
33875
|
-
return function () {
|
|
33876
|
-
var newCounter = getCurrentUseCounter() - 1;
|
|
33877
|
-
if (newCounter <= 0) {
|
|
33878
|
-
document.body.removeAttribute(lockAttribute);
|
|
33879
|
-
} else {
|
|
33880
|
-
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
33881
|
-
}
|
|
33882
|
-
};
|
|
33883
|
-
}, []);
|
|
34283
|
+
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([allowRelative && "position: relative ".concat(important, ";"), gapMode === 'margin' && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";")].filter(Boolean).join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
33884
34284
|
};
|
|
33885
34285
|
/**
|
|
33886
34286
|
* Removes page scrollbar and blocks page scroll when mounted
|
|
33887
34287
|
*/
|
|
33888
|
-
var RemoveScrollBar = function RemoveScrollBar(
|
|
33889
|
-
var noRelative =
|
|
33890
|
-
noImportant =
|
|
33891
|
-
|
|
33892
|
-
gapMode =
|
|
33893
|
-
useLockAttribute();
|
|
34288
|
+
var RemoveScrollBar = function RemoveScrollBar(props) {
|
|
34289
|
+
var noRelative = props.noRelative,
|
|
34290
|
+
noImportant = props.noImportant,
|
|
34291
|
+
_a = props.gapMode,
|
|
34292
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
33894
34293
|
/*
|
|
33895
34294
|
gap will be measured on every component mount
|
|
33896
34295
|
however it will be used only by the "first" invocation
|
|
@@ -33930,9 +34329,6 @@ var alwaysContainsScroll = function alwaysContainsScroll(node) {
|
|
|
33930
34329
|
return node.tagName === 'TEXTAREA';
|
|
33931
34330
|
};
|
|
33932
34331
|
var elementCanBeScrolled = function elementCanBeScrolled(node, overflow) {
|
|
33933
|
-
if (!(node instanceof Element)) {
|
|
33934
|
-
return false;
|
|
33935
|
-
}
|
|
33936
34332
|
var styles = window.getComputedStyle(node);
|
|
33937
34333
|
return (
|
|
33938
34334
|
// not-not-scrollable
|
|
@@ -33958,9 +34354,9 @@ var locationCouldBeScrolled = function locationCouldBeScrolled(axis, node) {
|
|
|
33958
34354
|
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
33959
34355
|
if (isScrollable) {
|
|
33960
34356
|
var _a = getScrollVariables(axis, current),
|
|
33961
|
-
|
|
33962
|
-
|
|
33963
|
-
if (
|
|
34357
|
+
s = _a[1],
|
|
34358
|
+
d = _a[2];
|
|
34359
|
+
if (s > d) {
|
|
33964
34360
|
return true;
|
|
33965
34361
|
}
|
|
33966
34362
|
}
|
|
@@ -34016,20 +34412,15 @@ var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, no
|
|
|
34016
34412
|
availableScrollTop += position;
|
|
34017
34413
|
}
|
|
34018
34414
|
}
|
|
34019
|
-
|
|
34020
|
-
target = target.host;
|
|
34021
|
-
} else {
|
|
34022
|
-
target = target.parentNode;
|
|
34023
|
-
}
|
|
34415
|
+
target = target.parentNode;
|
|
34024
34416
|
} while (
|
|
34025
34417
|
// portaled content
|
|
34026
34418
|
!targetInLock && target !== document.body ||
|
|
34027
34419
|
// self content
|
|
34028
34420
|
targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
34029
|
-
|
|
34030
|
-
if (isDeltaPositive && (Math.abs(availableScroll) < 1 || !noOverscroll)) {
|
|
34421
|
+
if (isDeltaPositive && (availableScroll === 0 || !noOverscroll)) {
|
|
34031
34422
|
shouldCancelScroll = true;
|
|
34032
|
-
} else if (!isDeltaPositive && (
|
|
34423
|
+
} else if (!isDeltaPositive && (availableScrollTop === 0 || !noOverscroll)) {
|
|
34033
34424
|
shouldCancelScroll = true;
|
|
34034
34425
|
}
|
|
34035
34426
|
return shouldCancelScroll;
|
|
@@ -34079,7 +34470,7 @@ function RemoveScrollSideCar(props) {
|
|
|
34079
34470
|
return;
|
|
34080
34471
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
34081
34472
|
var shouldCancelEvent = React.useCallback(function (event, parent) {
|
|
34082
|
-
if ('touches' in event && event.touches.length === 2
|
|
34473
|
+
if ('touches' in event && event.touches.length === 2) {
|
|
34083
34474
|
return !lastProps.current.allowPinchZoom;
|
|
34084
34475
|
}
|
|
34085
34476
|
var touch = getTouchXY(event);
|
|
@@ -34124,7 +34515,7 @@ function RemoveScrollSideCar(props) {
|
|
|
34124
34515
|
}
|
|
34125
34516
|
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
34126
34517
|
var sourceEvent = shouldPreventQueue.current.filter(function (e) {
|
|
34127
|
-
return e.name === event.type &&
|
|
34518
|
+
return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
|
|
34128
34519
|
})[0];
|
|
34129
34520
|
// self event, and should be canceled
|
|
34130
34521
|
if (sourceEvent && sourceEvent.should) {
|
|
@@ -34151,8 +34542,7 @@ function RemoveScrollSideCar(props) {
|
|
|
34151
34542
|
name: name,
|
|
34152
34543
|
delta: delta,
|
|
34153
34544
|
target: target,
|
|
34154
|
-
should: should
|
|
34155
|
-
shadowParent: getOutermostShadowParent(target)
|
|
34545
|
+
should: should
|
|
34156
34546
|
};
|
|
34157
34547
|
shouldPreventQueue.current.push(event);
|
|
34158
34548
|
setTimeout(function () {
|
|
@@ -34198,17 +34588,6 @@ function RemoveScrollSideCar(props) {
|
|
|
34198
34588
|
gapMode: props.gapMode
|
|
34199
34589
|
}) : null);
|
|
34200
34590
|
}
|
|
34201
|
-
function getOutermostShadowParent(node) {
|
|
34202
|
-
var shadowParent = null;
|
|
34203
|
-
while (node !== null) {
|
|
34204
|
-
if (node instanceof ShadowRoot) {
|
|
34205
|
-
shadowParent = node.host;
|
|
34206
|
-
node = node.host;
|
|
34207
|
-
}
|
|
34208
|
-
node = node.parentNode;
|
|
34209
|
-
}
|
|
34210
|
-
return shadowParent;
|
|
34211
|
-
}
|
|
34212
34591
|
|
|
34213
34592
|
var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
34214
34593
|
|
|
@@ -36934,9 +37313,10 @@ var header$1 = (function (_ref) {
|
|
|
36934
37313
|
*/
|
|
36935
37314
|
var Modal = /*#__PURE__*/forwardRef$1(function (props, ref) {
|
|
36936
37315
|
var children = props.children,
|
|
36937
|
-
isMobile = props.isMobile,
|
|
36938
37316
|
hideCloseButton = props.hideCloseButton,
|
|
36939
37317
|
hasHeader = props.hasHeader,
|
|
37318
|
+
_props$isMobile = props.isMobile,
|
|
37319
|
+
isMobile = _props$isMobile === void 0 ? false : _props$isMobile,
|
|
36940
37320
|
_props$contentStyling = props.contentStyling,
|
|
36941
37321
|
contentStyling = _props$contentStyling === void 0 ? {} : _props$contentStyling,
|
|
36942
37322
|
_props$overlayProps = props.overlayProps,
|
|
@@ -36945,11 +37325,15 @@ var Modal = /*#__PURE__*/forwardRef$1(function (props, ref) {
|
|
|
36945
37325
|
motionPreset: isMobile ? 'slideInBottom' : 'scale'
|
|
36946
37326
|
}, props, {
|
|
36947
37327
|
ref: ref
|
|
36948
|
-
}), /*#__PURE__*/React__default.createElement(ModalOverlay, overlayProps), /*#__PURE__*/React__default.createElement(ModalContent,
|
|
37328
|
+
}), /*#__PURE__*/React__default.createElement(ModalOverlay, overlayProps), /*#__PURE__*/React__default.createElement(ModalContent, _extends$7({
|
|
37329
|
+
"data-testid": "ModalContent"
|
|
37330
|
+
}, contentStyling), !hasHeader ? /*#__PURE__*/React__default.createElement(Box, header$1(props)) : null, hideCloseButton ? null : /*#__PURE__*/React__default.createElement(ModalCloseButton, {
|
|
37331
|
+
"data-testid": "ModalClose-button"
|
|
37332
|
+
}), children));
|
|
36949
37333
|
});
|
|
36950
37334
|
Modal.propTypes = {
|
|
36951
37335
|
/** Whether or not the Modal is opened in a mobile viewport */
|
|
36952
|
-
isMobile: PropTypes.bool
|
|
37336
|
+
isMobile: PropTypes.bool,
|
|
36953
37337
|
/** Whether or not the Modal is open */
|
|
36954
37338
|
isOpen: PropTypes.bool.isRequired,
|
|
36955
37339
|
/** React children. Body of the Modal. */
|
|
@@ -41680,13 +42064,13 @@ var global$1 = {
|
|
|
41680
42064
|
}
|
|
41681
42065
|
};
|
|
41682
42066
|
var Fonts = function Fonts() {
|
|
41683
|
-
return /*#__PURE__*/React__default.createElement(Global, {
|
|
42067
|
+
return /*#__PURE__*/React__default.createElement(Global$1, {
|
|
41684
42068
|
styles: "\n @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 700;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 600;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 400;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n /* latin-ext */\n @font-face {\n font-family: \"Plus Jakarta Sans\", sans-serif;\n font-style: normal;\n font-weight: 300;\n unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;\n }\n "
|
|
41685
42069
|
});
|
|
41686
42070
|
};
|
|
41687
42071
|
var LegacyOverrides = function LegacyOverrides(_ref) {
|
|
41688
42072
|
var useLegacyOverrides = _ref.useLegacyOverrides;
|
|
41689
|
-
return useLegacyOverrides ? /*#__PURE__*/React__default.createElement(Global, {
|
|
42073
|
+
return useLegacyOverrides ? /*#__PURE__*/React__default.createElement(Global$1, {
|
|
41690
42074
|
styles: "\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n font-weight: ".concat(fontWeights.semibold, ";\n }\n\n .heading-sm {\n font-size: ").concat(fontSizes.base, ";\n }\n .heading-md {\n font-size: ").concat(fontSizes.md, ";\n }\n .heading-lg {\n font-size: ").concat(fontSizes['5xl'], ";\n }\n\n p {\n line-height: 1.5;\n }\n\n a {\n outline: none;\n text-align: left;\n color: ").concat(colors$1.primary["default"], ";\n text-decoration: none;\n\n &:active,\n &:focus {\n outline: none;\n }\n\n &:hover {\n color: ").concat(colors$1.primary['700'], ";\n }\n }\n\n small {\n font-size: ").concat(fontSizes.xs, ";\n }\n\n ")
|
|
41691
42075
|
}) : null;
|
|
41692
42076
|
};
|
|
@@ -41995,7 +42379,7 @@ var sizes$4 = {
|
|
|
41995
42379
|
},
|
|
41996
42380
|
icon: {
|
|
41997
42381
|
width: 2.5,
|
|
41998
|
-
height: 2
|
|
42382
|
+
height: 2
|
|
41999
42383
|
}
|
|
42000
42384
|
},
|
|
42001
42385
|
md: {
|
|
@@ -42006,7 +42390,7 @@ var sizes$4 = {
|
|
|
42006
42390
|
},
|
|
42007
42391
|
icon: {
|
|
42008
42392
|
width: 3,
|
|
42009
|
-
height:
|
|
42393
|
+
height: 2.5
|
|
42010
42394
|
},
|
|
42011
42395
|
label: {
|
|
42012
42396
|
fontSize: 'base'
|
|
@@ -44159,6 +44543,9 @@ var controlStyles = {
|
|
|
44159
44543
|
paddingLeft: 10,
|
|
44160
44544
|
paddingRight: 8 //This should be only when there is a right element - DOM order made this a headache
|
|
44161
44545
|
},
|
|
44546
|
+
'.chakra-input__group:not(:has(.fe-ui-async-select__control)) > .chakra-input__left-element ~ span input': {
|
|
44547
|
+
minHeight: 14 // same height as the button
|
|
44548
|
+
},
|
|
44162
44549
|
'.chakra-input__group > .chakra-input__left-element ~ span select': {
|
|
44163
44550
|
paddingLeft: 10,
|
|
44164
44551
|
paddingRight: 8 //This should be only when there is a right element - DOM order made this a headache
|
|
@@ -44299,6 +44686,7 @@ var Input$1 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
44299
44686
|
paddingTop: 'var(--chakra-sizes-5-5)' // Design requires 5.5
|
|
44300
44687
|
,
|
|
44301
44688
|
paddingBottom: "2",
|
|
44689
|
+
lineHeight: "base",
|
|
44302
44690
|
variant: "refreshed"
|
|
44303
44691
|
}, props)));
|
|
44304
44692
|
});
|
|
@@ -44448,16 +44836,17 @@ Button.propTypes = {
|
|
|
44448
44836
|
buttonValue: PropTypes.string
|
|
44449
44837
|
};
|
|
44450
44838
|
|
|
44451
|
-
var isBrowser$
|
|
44839
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
|
44452
44840
|
var syncFallback = function syncFallback(create) {
|
|
44453
44841
|
return create();
|
|
44454
44842
|
};
|
|
44455
44843
|
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
|
44456
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$
|
|
44844
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
|
44845
|
+
var useInsertionEffectWithLayoutFallback = useInsertionEffect || useLayoutEffect;
|
|
44457
44846
|
|
|
44458
|
-
var
|
|
44459
|
-
var
|
|
44460
|
-
var EmotionCacheContext = /* #__PURE__ */
|
|
44847
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
44848
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
44849
|
+
var EmotionCacheContext = /* #__PURE__ */createContext$2(
|
|
44461
44850
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
44462
44851
|
// because this module is primarily intended for the browser and node
|
|
44463
44852
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -44467,15 +44856,19 @@ var EmotionCacheContext = /* #__PURE__ */React.createContext(
|
|
|
44467
44856
|
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
44468
44857
|
key: 'css'
|
|
44469
44858
|
}) : null);
|
|
44859
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
44860
|
+
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
44861
|
+
}
|
|
44470
44862
|
EmotionCacheContext.Provider;
|
|
44471
44863
|
var withEmotionCache = function withEmotionCache(func) {
|
|
44864
|
+
// $FlowFixMe
|
|
44472
44865
|
return /*#__PURE__*/forwardRef$1(function (props, ref) {
|
|
44473
44866
|
// the cache will never be null in the browser
|
|
44474
44867
|
var cache = useContext(EmotionCacheContext);
|
|
44475
44868
|
return func(props, cache, ref);
|
|
44476
44869
|
});
|
|
44477
44870
|
};
|
|
44478
|
-
if (!isBrowser) {
|
|
44871
|
+
if (!isBrowser$1) {
|
|
44479
44872
|
withEmotionCache = function withEmotionCache(func) {
|
|
44480
44873
|
return function (props) {
|
|
44481
44874
|
var cache = useContext(EmotionCacheContext);
|
|
@@ -44488,7 +44881,7 @@ if (!isBrowser) {
|
|
|
44488
44881
|
cache = createCache({
|
|
44489
44882
|
key: 'css'
|
|
44490
44883
|
});
|
|
44491
|
-
return /*#__PURE__*/
|
|
44884
|
+
return /*#__PURE__*/createElement(EmotionCacheContext.Provider, {
|
|
44492
44885
|
value: cache
|
|
44493
44886
|
}, func(props, cache));
|
|
44494
44887
|
} else {
|
|
@@ -44497,18 +44890,68 @@ if (!isBrowser) {
|
|
|
44497
44890
|
};
|
|
44498
44891
|
};
|
|
44499
44892
|
}
|
|
44500
|
-
var ThemeContext = /* #__PURE__ */
|
|
44501
|
-
|
|
44893
|
+
var ThemeContext = /* #__PURE__ */createContext$2({});
|
|
44894
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
44895
|
+
ThemeContext.displayName = 'EmotionThemeContext';
|
|
44896
|
+
}
|
|
44897
|
+
var getLastPart = function getLastPart(functionName) {
|
|
44898
|
+
// The match may be something like 'Object.createEmotionProps' or
|
|
44899
|
+
// 'Loader.prototype.render'
|
|
44900
|
+
var parts = functionName.split('.');
|
|
44901
|
+
return parts[parts.length - 1];
|
|
44902
|
+
};
|
|
44903
|
+
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
|
|
44904
|
+
// V8
|
|
44905
|
+
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
|
|
44906
|
+
if (match) return getLastPart(match[1]); // Safari / Firefox
|
|
44907
|
+
|
|
44908
|
+
match = /^([A-Za-z0-9$.]+)@/.exec(line);
|
|
44909
|
+
if (match) return getLastPart(match[1]);
|
|
44910
|
+
return undefined;
|
|
44911
|
+
};
|
|
44912
|
+
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
|
|
44913
|
+
// identifiers, thus we only need to replace what is a valid character for JS,
|
|
44914
|
+
// but not for CSS.
|
|
44915
|
+
|
|
44916
|
+
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
44917
|
+
return identifier.replace(/\$/g, '-');
|
|
44918
|
+
};
|
|
44919
|
+
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
|
|
44920
|
+
if (!stackTrace) return undefined;
|
|
44921
|
+
var lines = stackTrace.split('\n');
|
|
44922
|
+
for (var i = 0; i < lines.length; i++) {
|
|
44923
|
+
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
|
|
44924
|
+
|
|
44925
|
+
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
|
|
44926
|
+
|
|
44927
|
+
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
|
|
44928
|
+
// uppercase letter
|
|
44929
|
+
|
|
44930
|
+
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
|
|
44931
|
+
}
|
|
44932
|
+
return undefined;
|
|
44933
|
+
};
|
|
44502
44934
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
44935
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
44503
44936
|
var createEmotionProps = function createEmotionProps(type, props) {
|
|
44937
|
+
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
|
|
44938
|
+
// check if there is a css declaration
|
|
44939
|
+
props.css.indexOf(':') !== -1) {
|
|
44940
|
+
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 + "`");
|
|
44941
|
+
}
|
|
44504
44942
|
var newProps = {};
|
|
44505
|
-
for (var
|
|
44506
|
-
if (
|
|
44507
|
-
newProps[
|
|
44943
|
+
for (var key in props) {
|
|
44944
|
+
if (hasOwnProperty.call(props, key)) {
|
|
44945
|
+
newProps[key] = props[key];
|
|
44508
44946
|
}
|
|
44509
44947
|
}
|
|
44510
|
-
newProps[typePropName] = type; //
|
|
44948
|
+
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
|
|
44949
|
+
// the label hasn't already been computed
|
|
44511
44950
|
|
|
44951
|
+
if (process.env.NODE_ENV !== 'production' && !!props.css && (_typeof$1(props.css) !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
|
|
44952
|
+
var label = getLabelFromStackTrace(new Error().stack);
|
|
44953
|
+
if (label) newProps[labelPropName] = label;
|
|
44954
|
+
}
|
|
44512
44955
|
return newProps;
|
|
44513
44956
|
};
|
|
44514
44957
|
var Insertion$1 = function Insertion(_ref) {
|
|
@@ -44519,7 +44962,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
44519
44962
|
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
44520
44963
|
return insertStyles(cache, serialized, isStringTag);
|
|
44521
44964
|
});
|
|
44522
|
-
if (!isBrowser && rules !== undefined) {
|
|
44965
|
+
if (!isBrowser$1 && rules !== undefined) {
|
|
44523
44966
|
var _ref2;
|
|
44524
44967
|
var serializedNames = serialized.name;
|
|
44525
44968
|
var next = serialized.next;
|
|
@@ -44527,7 +44970,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
44527
44970
|
serializedNames += ' ' + next.name;
|
|
44528
44971
|
next = next.next;
|
|
44529
44972
|
}
|
|
44530
|
-
return /*#__PURE__*/
|
|
44973
|
+
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
44531
44974
|
__html: rules
|
|
44532
44975
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
44533
44976
|
}
|
|
@@ -44549,54 +44992,251 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
44549
44992
|
} else if (props.className != null) {
|
|
44550
44993
|
className = props.className + " ";
|
|
44551
44994
|
}
|
|
44552
|
-
var serialized = serializeStyles(registeredStyles, undefined,
|
|
44995
|
+
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
44996
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
44997
|
+
var labelFromStack = props[labelPropName];
|
|
44998
|
+
if (labelFromStack) {
|
|
44999
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
45000
|
+
}
|
|
45001
|
+
}
|
|
44553
45002
|
className += cache.key + "-" + serialized.name;
|
|
44554
45003
|
var newProps = {};
|
|
44555
|
-
for (var
|
|
44556
|
-
if (
|
|
44557
|
-
newProps[
|
|
45004
|
+
for (var key in props) {
|
|
45005
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
45006
|
+
newProps[key] = props[key];
|
|
44558
45007
|
}
|
|
44559
45008
|
}
|
|
45009
|
+
newProps.ref = ref;
|
|
44560
45010
|
newProps.className = className;
|
|
44561
|
-
|
|
44562
|
-
newProps.ref = ref;
|
|
44563
|
-
}
|
|
44564
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
|
45011
|
+
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion$1, {
|
|
44565
45012
|
cache: cache,
|
|
44566
45013
|
serialized: serialized,
|
|
44567
45014
|
isStringTag: typeof WrappedComponent === 'string'
|
|
44568
|
-
}), /*#__PURE__*/
|
|
45015
|
+
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
44569
45016
|
});
|
|
44570
|
-
|
|
45017
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
45018
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
|
45019
|
+
}
|
|
44571
45020
|
|
|
45021
|
+
var pkg = {
|
|
45022
|
+
name: "@emotion/react",
|
|
45023
|
+
version: "11.10.6",
|
|
45024
|
+
main: "dist/emotion-react.cjs.js",
|
|
45025
|
+
module: "dist/emotion-react.esm.js",
|
|
45026
|
+
browser: {
|
|
45027
|
+
"./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js"
|
|
45028
|
+
},
|
|
45029
|
+
exports: {
|
|
45030
|
+
".": {
|
|
45031
|
+
module: {
|
|
45032
|
+
worker: "./dist/emotion-react.worker.esm.js",
|
|
45033
|
+
browser: "./dist/emotion-react.browser.esm.js",
|
|
45034
|
+
"default": "./dist/emotion-react.esm.js"
|
|
45035
|
+
},
|
|
45036
|
+
"default": "./dist/emotion-react.cjs.js"
|
|
45037
|
+
},
|
|
45038
|
+
"./jsx-runtime": {
|
|
45039
|
+
module: {
|
|
45040
|
+
worker: "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",
|
|
45041
|
+
browser: "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
|
|
45042
|
+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js"
|
|
45043
|
+
},
|
|
45044
|
+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
|
|
45045
|
+
},
|
|
45046
|
+
"./_isolated-hnrs": {
|
|
45047
|
+
module: {
|
|
45048
|
+
worker: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",
|
|
45049
|
+
browser: "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
|
|
45050
|
+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js"
|
|
45051
|
+
},
|
|
45052
|
+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
|
|
45053
|
+
},
|
|
45054
|
+
"./jsx-dev-runtime": {
|
|
45055
|
+
module: {
|
|
45056
|
+
worker: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",
|
|
45057
|
+
browser: "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
|
|
45058
|
+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js"
|
|
45059
|
+
},
|
|
45060
|
+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
|
|
45061
|
+
},
|
|
45062
|
+
"./package.json": "./package.json",
|
|
45063
|
+
"./types/css-prop": "./types/css-prop.d.ts",
|
|
45064
|
+
"./macro": "./macro.js"
|
|
45065
|
+
},
|
|
45066
|
+
types: "types/index.d.ts",
|
|
45067
|
+
files: ["src", "dist", "jsx-runtime", "jsx-dev-runtime", "_isolated-hnrs", "types/*.d.ts", "macro.js", "macro.d.ts", "macro.js.flow"],
|
|
45068
|
+
sideEffects: false,
|
|
45069
|
+
author: "Emotion Contributors",
|
|
45070
|
+
license: "MIT",
|
|
45071
|
+
scripts: {
|
|
45072
|
+
"test:typescript": "dtslint types"
|
|
45073
|
+
},
|
|
45074
|
+
dependencies: {
|
|
45075
|
+
"@babel/runtime": "^7.18.3",
|
|
45076
|
+
"@emotion/babel-plugin": "^11.10.6",
|
|
45077
|
+
"@emotion/cache": "^11.10.5",
|
|
45078
|
+
"@emotion/serialize": "^1.1.1",
|
|
45079
|
+
"@emotion/use-insertion-effect-with-fallbacks": "^1.0.0",
|
|
45080
|
+
"@emotion/utils": "^1.2.0",
|
|
45081
|
+
"@emotion/weak-memoize": "^0.3.0",
|
|
45082
|
+
"hoist-non-react-statics": "^3.3.1"
|
|
45083
|
+
},
|
|
45084
|
+
peerDependencies: {
|
|
45085
|
+
react: ">=16.8.0"
|
|
45086
|
+
},
|
|
45087
|
+
peerDependenciesMeta: {
|
|
45088
|
+
"@types/react": {
|
|
45089
|
+
optional: true
|
|
45090
|
+
}
|
|
45091
|
+
},
|
|
45092
|
+
devDependencies: {
|
|
45093
|
+
"@definitelytyped/dtslint": "0.0.112",
|
|
45094
|
+
"@emotion/css": "11.10.6",
|
|
45095
|
+
"@emotion/css-prettifier": "1.1.1",
|
|
45096
|
+
"@emotion/server": "11.10.0",
|
|
45097
|
+
"@emotion/styled": "11.10.6",
|
|
45098
|
+
"html-tag-names": "^1.1.2",
|
|
45099
|
+
react: "16.14.0",
|
|
45100
|
+
"svg-tag-names": "^1.1.1",
|
|
45101
|
+
typescript: "^4.5.5"
|
|
45102
|
+
},
|
|
45103
|
+
repository: "https://github.com/emotion-js/emotion/tree/main/packages/react",
|
|
45104
|
+
publishConfig: {
|
|
45105
|
+
access: "public"
|
|
45106
|
+
},
|
|
45107
|
+
"umd:main": "dist/emotion-react.umd.min.js",
|
|
45108
|
+
preconstruct: {
|
|
45109
|
+
entrypoints: ["./index.js", "./jsx-runtime.js", "./jsx-dev-runtime.js", "./_isolated-hnrs.js"],
|
|
45110
|
+
umdName: "emotionReact",
|
|
45111
|
+
exports: {
|
|
45112
|
+
envConditions: ["browser", "worker"],
|
|
45113
|
+
extra: {
|
|
45114
|
+
"./types/css-prop": "./types/css-prop.d.ts",
|
|
45115
|
+
"./macro": "./macro.js"
|
|
45116
|
+
}
|
|
45117
|
+
}
|
|
45118
|
+
}
|
|
45119
|
+
};
|
|
44572
45120
|
var jsx = function jsx(type, props) {
|
|
44573
|
-
// eslint-disable-next-line prefer-rest-params
|
|
44574
45121
|
var args = arguments;
|
|
44575
|
-
if (props == null || !
|
|
44576
|
-
|
|
45122
|
+
if (props == null || !hasOwnProperty.call(props, 'css')) {
|
|
45123
|
+
// $FlowFixMe
|
|
45124
|
+
return createElement.apply(undefined, args);
|
|
44577
45125
|
}
|
|
44578
45126
|
var argsLength = args.length;
|
|
44579
45127
|
var createElementArgArray = new Array(argsLength);
|
|
44580
|
-
createElementArgArray[0] = Emotion
|
|
45128
|
+
createElementArgArray[0] = Emotion;
|
|
44581
45129
|
createElementArgArray[1] = createEmotionProps(type, props);
|
|
44582
45130
|
for (var i = 2; i < argsLength; i++) {
|
|
44583
45131
|
createElementArgArray[i] = args[i];
|
|
44584
|
-
}
|
|
44585
|
-
|
|
45132
|
+
} // $FlowFixMe
|
|
45133
|
+
|
|
45134
|
+
return createElement.apply(null, createElementArgArray);
|
|
44586
45135
|
};
|
|
44587
|
-
|
|
44588
|
-
|
|
44589
|
-
|
|
44590
|
-
|
|
45136
|
+
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
45137
|
+
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
45138
|
+
// initial client-side render from SSR, use place of hydrating tag
|
|
45139
|
+
|
|
45140
|
+
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
45141
|
+
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && (
|
|
45142
|
+
// check for className as well since the user is
|
|
45143
|
+
// probably using the custom createElement which
|
|
45144
|
+
// means it will be turned into a className prop
|
|
45145
|
+
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
45146
|
+
props.className || props.css)) {
|
|
45147
|
+
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
45148
|
+
warnedAboutCssPropForGlobal = true;
|
|
45149
|
+
}
|
|
45150
|
+
var styles = props.styles;
|
|
45151
|
+
var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));
|
|
45152
|
+
if (!isBrowser$1) {
|
|
45153
|
+
var _ref;
|
|
45154
|
+
var serializedNames = serialized.name;
|
|
45155
|
+
var serializedStyles = serialized.styles;
|
|
45156
|
+
var next = serialized.next;
|
|
45157
|
+
while (next !== undefined) {
|
|
45158
|
+
serializedNames += ' ' + next.name;
|
|
45159
|
+
serializedStyles += next.styles;
|
|
45160
|
+
next = next.next;
|
|
45161
|
+
}
|
|
45162
|
+
var shouldCache = cache.compat === true;
|
|
45163
|
+
var rules = cache.insert("", {
|
|
45164
|
+
name: serializedNames,
|
|
45165
|
+
styles: serializedStyles
|
|
45166
|
+
}, cache.sheet, shouldCache);
|
|
45167
|
+
if (shouldCache) {
|
|
45168
|
+
return null;
|
|
45169
|
+
}
|
|
45170
|
+
return /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
45171
|
+
__html: rules
|
|
45172
|
+
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
45173
|
+
} // yes, i know these hooks are used conditionally
|
|
45174
|
+
// but it is based on a constant that will never change at runtime
|
|
45175
|
+
// it's effectively like having two implementations and switching them out
|
|
45176
|
+
// so it's not actually breaking anything
|
|
45177
|
+
|
|
45178
|
+
var sheetRef = useRef();
|
|
45179
|
+
useInsertionEffectWithLayoutFallback(function () {
|
|
45180
|
+
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
45181
|
+
|
|
45182
|
+
var sheet = new cache.sheet.constructor({
|
|
45183
|
+
key: key,
|
|
45184
|
+
nonce: cache.sheet.nonce,
|
|
45185
|
+
container: cache.sheet.container,
|
|
45186
|
+
speedy: cache.sheet.isSpeedy
|
|
45187
|
+
});
|
|
45188
|
+
var rehydrating = false; // $FlowFixMe
|
|
45189
|
+
|
|
45190
|
+
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
|
|
45191
|
+
if (cache.sheet.tags.length) {
|
|
45192
|
+
sheet.before = cache.sheet.tags[0];
|
|
45193
|
+
}
|
|
45194
|
+
if (node !== null) {
|
|
45195
|
+
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
|
|
45196
|
+
|
|
45197
|
+
node.setAttribute('data-emotion', key);
|
|
45198
|
+
sheet.hydrate([node]);
|
|
45199
|
+
}
|
|
45200
|
+
sheetRef.current = [sheet, rehydrating];
|
|
45201
|
+
return function () {
|
|
45202
|
+
sheet.flush();
|
|
45203
|
+
};
|
|
45204
|
+
}, [cache]);
|
|
45205
|
+
useInsertionEffectWithLayoutFallback(function () {
|
|
45206
|
+
var sheetRefCurrent = sheetRef.current;
|
|
45207
|
+
var sheet = sheetRefCurrent[0],
|
|
45208
|
+
rehydrating = sheetRefCurrent[1];
|
|
45209
|
+
if (rehydrating) {
|
|
45210
|
+
sheetRefCurrent[1] = false;
|
|
45211
|
+
return;
|
|
45212
|
+
}
|
|
45213
|
+
if (serialized.next !== undefined) {
|
|
45214
|
+
// insert keyframes
|
|
45215
|
+
insertStyles(cache, serialized.next, true);
|
|
45216
|
+
}
|
|
45217
|
+
if (sheet.tags.length) {
|
|
45218
|
+
// if this doesn't exist then it will be null so the style element will be appended
|
|
45219
|
+
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
|
|
45220
|
+
sheet.before = element;
|
|
45221
|
+
sheet.flush();
|
|
45222
|
+
}
|
|
45223
|
+
cache.insert("", serialized, sheet, false);
|
|
45224
|
+
}, [cache, serialized.name]);
|
|
45225
|
+
return null;
|
|
45226
|
+
});
|
|
45227
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
45228
|
+
Global.displayName = 'EmotionGlobal';
|
|
45229
|
+
}
|
|
44591
45230
|
function css$2() {
|
|
44592
45231
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44593
45232
|
args[_key] = arguments[_key];
|
|
44594
45233
|
}
|
|
44595
45234
|
return serializeStyles(args);
|
|
44596
45235
|
}
|
|
44597
|
-
function keyframes() {
|
|
45236
|
+
var keyframes = function keyframes() {
|
|
44598
45237
|
var insertable = css$2.apply(void 0, arguments);
|
|
44599
|
-
var name = "animation-" + insertable.name;
|
|
45238
|
+
var name = "animation-" + insertable.name; // $FlowFixMe
|
|
45239
|
+
|
|
44600
45240
|
return {
|
|
44601
45241
|
name: name,
|
|
44602
45242
|
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
@@ -44605,7 +45245,7 @@ function keyframes() {
|
|
|
44605
45245
|
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
44606
45246
|
}
|
|
44607
45247
|
};
|
|
44608
|
-
}
|
|
45248
|
+
};
|
|
44609
45249
|
var classnames = function classnames(args) {
|
|
44610
45250
|
var len = args.length;
|
|
44611
45251
|
var i = 0;
|
|
@@ -44622,6 +45262,9 @@ var classnames = function classnames(args) {
|
|
|
44622
45262
|
if (Array.isArray(arg)) {
|
|
44623
45263
|
toAdd = classnames(arg);
|
|
44624
45264
|
} else {
|
|
45265
|
+
if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
|
|
45266
|
+
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.');
|
|
45267
|
+
}
|
|
44625
45268
|
toAdd = '';
|
|
44626
45269
|
for (var k in arg) {
|
|
44627
45270
|
if (arg[k] && k) {
|
|
@@ -44659,17 +45302,17 @@ var Insertion = function Insertion(_ref) {
|
|
|
44659
45302
|
var rules = '';
|
|
44660
45303
|
for (var i = 0; i < serializedArr.length; i++) {
|
|
44661
45304
|
var res = insertStyles(cache, serializedArr[i], false);
|
|
44662
|
-
if (!isBrowser && res !== undefined) {
|
|
45305
|
+
if (!isBrowser$1 && res !== undefined) {
|
|
44663
45306
|
rules += res;
|
|
44664
45307
|
}
|
|
44665
45308
|
}
|
|
44666
|
-
if (!isBrowser) {
|
|
45309
|
+
if (!isBrowser$1) {
|
|
44667
45310
|
return rules;
|
|
44668
45311
|
}
|
|
44669
45312
|
});
|
|
44670
|
-
if (!isBrowser && rules.length !== 0) {
|
|
45313
|
+
if (!isBrowser$1 && rules.length !== 0) {
|
|
44671
45314
|
var _ref2;
|
|
44672
|
-
return /*#__PURE__*/
|
|
45315
|
+
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
44673
45316
|
return serialized.name;
|
|
44674
45317
|
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
44675
45318
|
__html: rules
|
|
@@ -44681,7 +45324,7 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
44681
45324
|
var hasRendered = false;
|
|
44682
45325
|
var serializedArr = [];
|
|
44683
45326
|
var css = function css() {
|
|
44684
|
-
if (hasRendered &&
|
|
45327
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
44685
45328
|
throw new Error('css can only be used during render');
|
|
44686
45329
|
}
|
|
44687
45330
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -44694,7 +45337,7 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
44694
45337
|
return cache.key + "-" + serialized.name;
|
|
44695
45338
|
};
|
|
44696
45339
|
var cx = function cx() {
|
|
44697
|
-
if (hasRendered &&
|
|
45340
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
44698
45341
|
throw new Error('cx can only be used during render');
|
|
44699
45342
|
}
|
|
44700
45343
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
@@ -44705,38 +45348,65 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
44705
45348
|
var content = {
|
|
44706
45349
|
css: css,
|
|
44707
45350
|
cx: cx,
|
|
44708
|
-
theme:
|
|
45351
|
+
theme: useContext(ThemeContext)
|
|
44709
45352
|
};
|
|
44710
45353
|
var ele = props.children(content);
|
|
44711
45354
|
hasRendered = true;
|
|
44712
|
-
return /*#__PURE__*/
|
|
45355
|
+
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {
|
|
44713
45356
|
cache: cache,
|
|
44714
45357
|
serializedArr: serializedArr
|
|
44715
45358
|
}), ele);
|
|
44716
45359
|
});
|
|
45360
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
45361
|
+
ClassNames.displayName = 'EmotionClassNames';
|
|
45362
|
+
}
|
|
45363
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
45364
|
+
var isBrowser = typeof document !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
|
|
45365
|
+
|
|
45366
|
+
var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';
|
|
45367
|
+
if (isBrowser && !isTestEnv) {
|
|
45368
|
+
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
|
|
45369
|
+
var globalContext =
|
|
45370
|
+
// $FlowIgnore
|
|
45371
|
+
typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
|
|
45372
|
+
: isBrowser ? window : global;
|
|
45373
|
+
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
|
|
45374
|
+
if (globalContext[globalKey]) {
|
|
45375
|
+
console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
|
|
45376
|
+
}
|
|
45377
|
+
globalContext[globalKey] = true;
|
|
45378
|
+
}
|
|
45379
|
+
}
|
|
44717
45380
|
|
|
44718
|
-
function _taggedTemplateLiteral(
|
|
44719
|
-
|
|
45381
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
45382
|
+
if (!raw) {
|
|
45383
|
+
raw = strings.slice(0);
|
|
45384
|
+
}
|
|
45385
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
44720
45386
|
raw: {
|
|
44721
|
-
value: Object.freeze(
|
|
45387
|
+
value: Object.freeze(raw)
|
|
44722
45388
|
}
|
|
44723
45389
|
}));
|
|
44724
45390
|
}
|
|
44725
45391
|
|
|
44726
|
-
function _objectWithoutProperties(
|
|
44727
|
-
if (
|
|
44728
|
-
var
|
|
44729
|
-
|
|
44730
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
45392
|
+
function _objectWithoutProperties(source, excluded) {
|
|
45393
|
+
if (source == null) return {};
|
|
45394
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
45395
|
+
var key, i;
|
|
44731
45396
|
if (Object.getOwnPropertySymbols) {
|
|
44732
|
-
var
|
|
44733
|
-
for (
|
|
45397
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
45398
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
45399
|
+
key = sourceSymbolKeys[i];
|
|
45400
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
45401
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
45402
|
+
target[key] = source[key];
|
|
45403
|
+
}
|
|
44734
45404
|
}
|
|
44735
|
-
return
|
|
45405
|
+
return target;
|
|
44736
45406
|
}
|
|
44737
45407
|
|
|
44738
|
-
function _arrayWithHoles(
|
|
44739
|
-
if (Array.isArray(
|
|
45408
|
+
function _arrayWithHoles(arr) {
|
|
45409
|
+
if (Array.isArray(arr)) return arr;
|
|
44740
45410
|
}
|
|
44741
45411
|
|
|
44742
45412
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -44767,55 +45437,68 @@ function _iterableToArrayLimit(r, l) {
|
|
|
44767
45437
|
}
|
|
44768
45438
|
}
|
|
44769
45439
|
|
|
44770
|
-
function _arrayLikeToArray(
|
|
44771
|
-
(
|
|
44772
|
-
for (var
|
|
44773
|
-
return
|
|
45440
|
+
function _arrayLikeToArray(arr, len) {
|
|
45441
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
45442
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
45443
|
+
return arr2;
|
|
44774
45444
|
}
|
|
44775
45445
|
|
|
44776
|
-
function _unsupportedIterableToArray(
|
|
44777
|
-
if (
|
|
44778
|
-
|
|
44779
|
-
|
|
44780
|
-
|
|
44781
|
-
|
|
45446
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
45447
|
+
if (!o) return;
|
|
45448
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
45449
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
45450
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
45451
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
45452
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
44782
45453
|
}
|
|
44783
45454
|
|
|
44784
45455
|
function _nonIterableRest() {
|
|
44785
45456
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44786
45457
|
}
|
|
44787
45458
|
|
|
44788
|
-
function _slicedToArray(
|
|
44789
|
-
return _arrayWithHoles(
|
|
45459
|
+
function _slicedToArray(arr, i) {
|
|
45460
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
44790
45461
|
}
|
|
44791
45462
|
|
|
44792
|
-
function _classCallCheck(
|
|
44793
|
-
if (!(
|
|
45463
|
+
function _classCallCheck(instance, Constructor) {
|
|
45464
|
+
if (!(instance instanceof Constructor)) {
|
|
45465
|
+
throw new TypeError("Cannot call a class as a function");
|
|
45466
|
+
}
|
|
44794
45467
|
}
|
|
44795
45468
|
|
|
44796
|
-
function _defineProperties(
|
|
44797
|
-
for (var
|
|
44798
|
-
var
|
|
44799
|
-
|
|
45469
|
+
function _defineProperties(target, props) {
|
|
45470
|
+
for (var i = 0; i < props.length; i++) {
|
|
45471
|
+
var descriptor = props[i];
|
|
45472
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
45473
|
+
descriptor.configurable = true;
|
|
45474
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
45475
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
44800
45476
|
}
|
|
44801
45477
|
}
|
|
44802
|
-
function _createClass(
|
|
44803
|
-
|
|
44804
|
-
|
|
44805
|
-
|
|
45478
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
45479
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
45480
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
45481
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
45482
|
+
writable: false
|
|
45483
|
+
});
|
|
45484
|
+
return Constructor;
|
|
44806
45485
|
}
|
|
44807
45486
|
|
|
44808
|
-
function _inherits(
|
|
44809
|
-
if (
|
|
44810
|
-
|
|
45487
|
+
function _inherits(subClass, superClass) {
|
|
45488
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
45489
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
45490
|
+
}
|
|
45491
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
44811
45492
|
constructor: {
|
|
44812
|
-
value:
|
|
44813
|
-
writable:
|
|
44814
|
-
configurable:
|
|
45493
|
+
value: subClass,
|
|
45494
|
+
writable: true,
|
|
45495
|
+
configurable: true
|
|
44815
45496
|
}
|
|
44816
|
-
})
|
|
44817
|
-
|
|
44818
|
-
|
|
45497
|
+
});
|
|
45498
|
+
Object.defineProperty(subClass, "prototype", {
|
|
45499
|
+
writable: false
|
|
45500
|
+
});
|
|
45501
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
44819
45502
|
}
|
|
44820
45503
|
|
|
44821
45504
|
function _defineProperty(obj, key, value) {
|
|
@@ -46275,20 +46958,20 @@ var defaultComponents = function defaultComponents(props) {
|
|
|
46275
46958
|
return _objectSpread2(_objectSpread2({}, components), props.components);
|
|
46276
46959
|
};
|
|
46277
46960
|
|
|
46278
|
-
function _arrayWithoutHoles(
|
|
46279
|
-
if (Array.isArray(
|
|
46961
|
+
function _arrayWithoutHoles(arr) {
|
|
46962
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
46280
46963
|
}
|
|
46281
46964
|
|
|
46282
|
-
function _iterableToArray(
|
|
46283
|
-
if (
|
|
46965
|
+
function _iterableToArray(iter) {
|
|
46966
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
46284
46967
|
}
|
|
46285
46968
|
|
|
46286
46969
|
function _nonIterableSpread() {
|
|
46287
46970
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
46288
46971
|
}
|
|
46289
46972
|
|
|
46290
|
-
function _toConsumableArray(
|
|
46291
|
-
return _arrayWithoutHoles(
|
|
46973
|
+
function _toConsumableArray(arr) {
|
|
46974
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
46292
46975
|
}
|
|
46293
46976
|
|
|
46294
46977
|
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
@@ -49250,7 +49933,7 @@ RadioGroup.propTypes = {
|
|
|
49250
49933
|
direction: PropTypes.oneOf(['row', 'column'])
|
|
49251
49934
|
};
|
|
49252
49935
|
|
|
49253
|
-
var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
|
|
49936
|
+
var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles"];
|
|
49254
49937
|
var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
49255
49938
|
var isChecked = _ref.isChecked,
|
|
49256
49939
|
isDisabled = _ref.isDisabled,
|
|
@@ -49263,10 +49946,13 @@ var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
49263
49946
|
isExpandable = _ref.isExpandable,
|
|
49264
49947
|
_ref$size = _ref.size,
|
|
49265
49948
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
49949
|
+
_ref$expandableChildr = _ref.expandableChildrenStyles,
|
|
49950
|
+
expandableChildrenStyles = _ref$expandableChildr === void 0 ? {} : _ref$expandableChildr,
|
|
49266
49951
|
props = _objectWithoutProperties$1(_ref, _excluded$6);
|
|
49267
49952
|
var Component = isRadio ? Radio : Checkbox;
|
|
49268
49953
|
var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
49269
49954
|
var hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
49955
|
+
var prefersReducedMotion = usePrefersReducedMotion();
|
|
49270
49956
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
49271
49957
|
paddingBottom: hasExpandableContent ? 3 : 0,
|
|
49272
49958
|
borderRadius: "lg",
|
|
@@ -49290,12 +49976,22 @@ var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
|
|
|
49290
49976
|
width: "100%",
|
|
49291
49977
|
paddingX: 4,
|
|
49292
49978
|
paddingY: 3
|
|
49293
|
-
}, props), label)),
|
|
49979
|
+
}, props), label)), /*#__PURE__*/React__default.createElement(Box, {
|
|
49980
|
+
overflow: "hidden",
|
|
49981
|
+
display: "grid"
|
|
49982
|
+
// Using this as a pseudo height transition to get around no height auto transition
|
|
49983
|
+
,
|
|
49984
|
+
gridTemplateRows: hasExpandableContent ? '1fr' : '0fr',
|
|
49985
|
+
opacity: hasExpandableContent ? '100%' : '0%',
|
|
49986
|
+
transition: prefersReducedMotion ? '' : 'all 150ms ease-out'
|
|
49987
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
49988
|
+
overflow: "hidden"
|
|
49989
|
+
}, hasExpandableContent && /*#__PURE__*/React__default.createElement(Box, _extends$7({
|
|
49294
49990
|
color: "gray.600",
|
|
49295
49991
|
fontSize: expandableTextSize,
|
|
49296
49992
|
paddingTop: 3,
|
|
49297
49993
|
paddingX: 4
|
|
49298
|
-
}, expandableChildren));
|
|
49994
|
+
}, expandableChildrenStyles), expandableChildren))));
|
|
49299
49995
|
});
|
|
49300
49996
|
SelectionCard.propTypes = {
|
|
49301
49997
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
|
@@ -49307,6 +50003,7 @@ SelectionCard.propTypes = {
|
|
|
49307
50003
|
helperText: PropTypes.string,
|
|
49308
50004
|
isRadio: PropTypes.bool,
|
|
49309
50005
|
isExpandable: PropTypes.bool,
|
|
50006
|
+
expandableChildrenStyles: PropTypes.object,
|
|
49310
50007
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
49311
50008
|
};
|
|
49312
50009
|
|