@ntbjs/react-components 2.0.0-rc.11 → 2.0.0-rc.13
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/cjs/components/data/Alert/Alert.js +8 -10
- package/cjs/components/data/Alert/Alert.styled.js +17 -10
- package/cjs/components/data/Badge/Badge.js +13 -13
- package/cjs/components/data/Badge/Badge.styled.js +37 -26
- package/cjs/components/data/Popover/Popover.js +4 -2
- package/cjs/components/data/Tab/Tab.styled.js +6 -1
- package/cjs/components/data/Tabs/Tabs.js +22 -12
- package/cjs/components/data/Tabs/Tabs.styled.js +29 -16
- package/cjs/components/data/Tooltip/Tooltip.js +3 -1
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
- package/cjs/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
- package/cjs/components/inputs/ActionButton/ActionButton.js +5 -3
- package/cjs/components/inputs/ActionButton/ActionButton.styled.js +17 -8
- package/cjs/components/inputs/Button/Button.js +45 -38
- package/cjs/components/inputs/Button/Button.styled.js +84 -38
- package/cjs/components/inputs/Checkbox/Checkbox.js +1 -1
- package/cjs/components/inputs/Checkbox/Checkbox.styled.js +23 -8
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +2 -2
- package/cjs/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
- package/cjs/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
- package/cjs/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
- package/cjs/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
- package/cjs/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
- package/cjs/components/inputs/MultiSelect/MultiSelect.js +5 -48
- package/cjs/components/inputs/MultiSelect/MultiSelect.styled.js +27 -31
- package/cjs/components/inputs/Radio/Radio.styled.js +9 -2
- package/cjs/components/inputs/Switch/Switch.js +1 -1
- package/cjs/components/inputs/Switch/Switch.styled.js +22 -7
- package/cjs/components/inputs/TextArea/TextArea.js +10 -20
- package/cjs/components/inputs/TextArea/TextArea.styled.js +208 -133
- package/cjs/components/inputs/TextInput/TextInput.js +21 -22
- package/cjs/components/inputs/TextInput/TextInput.styled.js +58 -45
- package/cjs/components/layout/InputGroup/InputGroup.styled.js +6 -1
- package/cjs/components/layout/SectionSeparator/SectionSeparator.js +7 -7
- package/cjs/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
- package/cjs/components/widgets/AssetAction/AssetAction.js +1 -1
- package/cjs/components/widgets/AssetAction/AssetAction.styled.js +16 -5
- package/cjs/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
- package/cjs/components/widgets/AssetGallery/AssetGallery.js +5 -1
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
- package/cjs/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
- package/cjs/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
- package/cjs/components/widgets/ContextMenu/ContextMenu.js +2 -1
- package/cjs/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
- package/cjs/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
- package/cjs/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
- package/cjs/components/widgets/InfoCard/InfoCard.js +17 -9
- package/cjs/components/widgets/InfoCard/InfoCard.styled.js +40 -13
- package/cjs/components/widgets/ProgressBar/ProgressBar.js +43 -22
- package/cjs/components/widgets/ProgressBar/ProgressBar.styled.js +78 -22
- package/cjs/components/widgets/SummaryCard/SummaryCard.js +9 -8
- package/cjs/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
- package/cjs/components/widgets/widgets/index.js +0 -2
- package/cjs/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
- package/cjs/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +54 -12
- package/cjs/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +10 -7
- package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
- package/cjs/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
- package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
- package/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
- package/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +1 -1
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
- package/cjs/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
- package/cjs/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
- package/cjs/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
- package/cjs/node_modules/react/cjs/react.development.js +125 -82
- package/cjs/node_modules/react/cjs/react.production.js +88 -92
- package/cjs/node_modules/react-dom/cjs/react-dom.development.js +1 -1
- package/cjs/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/cjs/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +5 -5
- package/cjs/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +23 -17
- package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +47 -47
- package/cjs/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +3 -3
- package/cjs/node_modules/use-isomorphic-layout-effect/dist/{use-isomorphic-layout-effect.browser.esm.js → use-isomorphic-layout-effect.esm.js} +4 -1
- package/cjs/styles/utils/colors-export.js +41 -0
- package/cjs/utils/defaultTheme.js +28 -5
- package/esm/components/data/Alert/Alert.js +8 -10
- package/esm/components/data/Alert/Alert.styled.js +17 -10
- package/esm/components/data/Badge/Badge.js +13 -13
- package/esm/components/data/Badge/Badge.styled.js +37 -26
- package/esm/components/data/Popover/Popover.js +4 -2
- package/esm/components/data/Tab/Tab.styled.js +6 -1
- package/esm/components/data/Tabs/Tabs.js +23 -13
- package/esm/components/data/Tabs/Tabs.styled.js +29 -16
- package/esm/components/data/Tooltip/Tooltip.js +3 -1
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.js +6 -6
- package/esm/components/data/VerificationStatusIcon/VerificationStatusIcon.styled.js +24 -15
- package/esm/components/inputs/ActionButton/ActionButton.js +5 -3
- package/esm/components/inputs/ActionButton/ActionButton.styled.js +17 -8
- package/esm/components/inputs/Button/Button.js +45 -38
- package/esm/components/inputs/Button/Button.styled.js +84 -38
- package/esm/components/inputs/Checkbox/Checkbox.js +1 -1
- package/esm/components/inputs/Checkbox/Checkbox.styled.js +23 -8
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.js +4 -4
- package/esm/components/inputs/CompactAutocompleteSelect/CompactAutocompleteSelect.styled.js +46 -35
- package/esm/components/inputs/CompactStarRating/CompactStarRating.js +3 -4
- package/esm/components/inputs/CompactStarRating/CompactStarRating.styled.js +36 -25
- package/esm/components/inputs/CompactTextInput/CompactTextInput.js +5 -5
- package/esm/components/inputs/CompactTextInput/CompactTextInput.styled.js +79 -25
- package/esm/components/inputs/MultiLevelCheckbox/MultiLevelCheckbox.styled.js +24 -7
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js +1 -1
- package/esm/components/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.styled.js +38 -13
- package/esm/components/inputs/MultiSelect/MultiSelect.js +6 -49
- package/esm/components/inputs/MultiSelect/MultiSelect.styled.js +28 -28
- package/esm/components/inputs/Radio/Radio.styled.js +9 -2
- package/esm/components/inputs/Switch/Switch.js +1 -1
- package/esm/components/inputs/Switch/Switch.styled.js +22 -7
- package/esm/components/inputs/TextArea/TextArea.js +10 -20
- package/esm/components/inputs/TextArea/TextArea.styled.js +208 -133
- package/esm/components/inputs/TextInput/TextInput.js +21 -22
- package/esm/components/inputs/TextInput/TextInput.styled.js +58 -45
- package/esm/components/layout/InputGroup/InputGroup.styled.js +6 -1
- package/esm/components/layout/SectionSeparator/SectionSeparator.js +7 -7
- package/esm/components/layout/SectionSeparator/SectionSeparator.styled.js +12 -5
- package/esm/components/widgets/AssetAction/AssetAction.js +1 -1
- package/esm/components/widgets/AssetAction/AssetAction.styled.js +16 -5
- package/esm/components/widgets/AssetActionsBase/AssetActionsBase.styled.js +6 -1
- package/esm/components/widgets/AssetGallery/AssetGallery.js +5 -1
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.js +9 -6
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryBase.styled.js +12 -3
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +7 -4
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +80 -33
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.js +1 -1
- package/esm/components/widgets/AssetGallery/AssetGalleryBase/AssetGalleryGridCard/AssetGalleryGridCard.styled.js +22 -22
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.js +2 -2
- package/esm/components/widgets/AssetPreview/AssetPreviewTopBar/AssetPreviewTopBar.styled.js +18 -7
- package/esm/components/widgets/ContextMenu/ContextMenu.js +2 -1
- package/esm/components/widgets/ContextMenu/ContextMenu.styled.js +6 -1
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.js +4 -4
- package/esm/components/widgets/ContextMenu/ContextMenuItem/ContextMenuItem.styled.js +16 -7
- package/esm/components/widgets/ContextMenu/ContextMenuItemsGroup/ContextMenuItemsGroup.styled.js +6 -1
- package/esm/components/widgets/InfoCard/InfoCard.js +10 -2
- package/esm/components/widgets/InfoCard/InfoCard.styled.js +40 -13
- package/esm/components/widgets/ProgressBar/ProgressBar.js +31 -10
- package/esm/components/widgets/ProgressBar/ProgressBar.styled.js +77 -23
- package/esm/components/widgets/SummaryCard/SummaryCard.js +9 -8
- package/esm/components/widgets/SummaryCard/SummaryCard.styled.js +46 -19
- package/esm/components/widgets/widgets/index.js +0 -1
- package/esm/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
- package/esm/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +47 -5
- package/esm/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +3 -3
- package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
- package/esm/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
- package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
- package/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +20 -12
- package/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +4 -4
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +4 -2
- package/esm/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +9 -8
- package/esm/node_modules/@restart/hooks/{esm → lib}/useMergedRefs.js +8 -11
- package/esm/node_modules/@restart/hooks/{esm → lib}/useUpdateEffect.js +2 -4
- package/esm/node_modules/react/cjs/react.development.js +125 -82
- package/esm/node_modules/react/cjs/react.production.js +88 -92
- package/esm/node_modules/react-dom/cjs/react-dom.development.js +1 -1
- package/esm/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/esm/node_modules/react-select/creatable/dist/react-select-creatable.esm.js +3 -3
- package/esm/node_modules/react-select/dist/{Select-aab027f3.esm.js → Select-ef7c0426.esm.js} +12 -6
- package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +2 -2
- package/esm/node_modules/react-select/dist/{useCreatable-84008237.esm.js → useCreatable-09aaeb9a.esm.js} +1 -1
- package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +9 -0
- package/esm/styles/utils/colors-export.js +37 -0
- package/esm/utils/defaultTheme.js +28 -5
- package/package.json +16 -22
- package/styles/utils/colors-export.js +35 -0
- package/cjs/components/widgets/Instructions/Instructions.js +0 -217
- package/cjs/components/widgets/Instructions/Instructions.styled.js +0 -47
- package/cjs/components/widgets/Instructions/widgets/Instructions/index.js +0 -9
- package/cjs/styles/utils/colors.scss.js +0 -11
- package/esm/components/widgets/Instructions/Instructions.js +0 -213
- package/esm/components/widgets/Instructions/Instructions.styled.js +0 -36
- package/esm/components/widgets/Instructions/widgets/Instructions/index.js +0 -1
- package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -6
- package/esm/styles/utils/colors.scss.js +0 -7
- package/styles/config.scss +0 -37
- /package/styles/utils/{colors.scss → .colors.scss} +0 -0
package/cjs/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js}
RENAMED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var emotionSheet_esm = require('../../sheet/dist/emotion-sheet.esm.js');
|
|
6
|
+
var emotionWeakMemoize_esm = require('../../weak-memoize/dist/emotion-weak-memoize.esm.js');
|
|
7
|
+
var emotionMemoize_esm = require('../../memoize/dist/emotion-memoize.esm.js');
|
|
6
8
|
var Middleware = require('../../../stylis/src/Middleware.js');
|
|
7
9
|
var Enum = require('../../../stylis/src/Enum.js');
|
|
8
10
|
var Utility = require('../../../stylis/src/Utility.js');
|
|
@@ -10,6 +12,8 @@ var Serializer = require('../../../stylis/src/Serializer.js');
|
|
|
10
12
|
var Tokenizer = require('../../../stylis/src/Tokenizer.js');
|
|
11
13
|
var Parser = require('../../../stylis/src/Parser.js');
|
|
12
14
|
|
|
15
|
+
var isBrowser = typeof document !== 'undefined';
|
|
16
|
+
|
|
13
17
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
14
18
|
var previous = 0;
|
|
15
19
|
var character = 0;
|
|
@@ -347,12 +351,17 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
347
351
|
}
|
|
348
352
|
};
|
|
349
353
|
|
|
354
|
+
var getServerStylisCache = isBrowser ? undefined : emotionWeakMemoize_esm["default"](function () {
|
|
355
|
+
return emotionMemoize_esm["default"](function () {
|
|
356
|
+
return {};
|
|
357
|
+
});
|
|
358
|
+
});
|
|
350
359
|
var defaultStylisPlugins = [prefixer];
|
|
351
360
|
|
|
352
361
|
var createCache = function createCache(options) {
|
|
353
362
|
var key = options.key;
|
|
354
363
|
|
|
355
|
-
if (key === 'css') {
|
|
364
|
+
if (isBrowser && key === 'css') {
|
|
356
365
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
357
366
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
358
367
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
@@ -382,7 +391,7 @@ var createCache = function createCache(options) {
|
|
|
382
391
|
var container;
|
|
383
392
|
var nodesToHydrate = [];
|
|
384
393
|
|
|
385
|
-
{
|
|
394
|
+
if (isBrowser) {
|
|
386
395
|
container = options.container || document.head;
|
|
387
396
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
388
397
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
@@ -401,7 +410,7 @@ var createCache = function createCache(options) {
|
|
|
401
410
|
|
|
402
411
|
var omnipresentPlugins = [compat, removeLabel];
|
|
403
412
|
|
|
404
|
-
{
|
|
413
|
+
if (!getServerStylisCache) {
|
|
405
414
|
var currentSheet;
|
|
406
415
|
var finalizingPlugins = [Serializer.stringify, Middleware.rulesheet(function (rule) {
|
|
407
416
|
currentSheet.insert(rule);
|
|
@@ -421,6 +430,55 @@ var createCache = function createCache(options) {
|
|
|
421
430
|
cache.inserted[serialized.name] = true;
|
|
422
431
|
}
|
|
423
432
|
};
|
|
433
|
+
} else {
|
|
434
|
+
var _finalizingPlugins = [Serializer.stringify];
|
|
435
|
+
|
|
436
|
+
var _serializer = Middleware.middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
437
|
+
|
|
438
|
+
var _stylis = function _stylis(styles) {
|
|
439
|
+
return Serializer.serialize(Parser.compile(styles), _serializer);
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
443
|
+
|
|
444
|
+
var getRules = function getRules(selector, serialized) {
|
|
445
|
+
var name = serialized.name;
|
|
446
|
+
|
|
447
|
+
if (serverStylisCache[name] === undefined) {
|
|
448
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
return serverStylisCache[name];
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
455
|
+
var name = serialized.name;
|
|
456
|
+
var rules = getRules(selector, serialized);
|
|
457
|
+
|
|
458
|
+
if (cache.compat === undefined) {
|
|
459
|
+
// in regular mode, we don't set the styles on the inserted cache
|
|
460
|
+
// since we don't need to and that would be wasting memory
|
|
461
|
+
// we return them so that they are rendered in a style tag
|
|
462
|
+
if (shouldCache) {
|
|
463
|
+
cache.inserted[name] = true;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
return rules;
|
|
467
|
+
} else {
|
|
468
|
+
// in compat mode, we put the styles on the inserted cache so
|
|
469
|
+
// that emotion-server can pull out the styles
|
|
470
|
+
// except when we don't want to cache it which was in Global but now
|
|
471
|
+
// is nowhere but we don't want to do a major right now
|
|
472
|
+
// and just in case we're going to leave the case here
|
|
473
|
+
// it's also not affecting client side bundle size
|
|
474
|
+
// so it's really not a big deal
|
|
475
|
+
if (shouldCache) {
|
|
476
|
+
cache.inserted[name] = rules;
|
|
477
|
+
} else {
|
|
478
|
+
return rules;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
};
|
|
424
482
|
}
|
|
425
483
|
|
|
426
484
|
var cache = {
|
|
@@ -3,27 +3,29 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../../react/index.js');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var emotionCache_esm = require('../../cache/dist/emotion-cache.esm.js');
|
|
7
|
+
var emotionUtils_esm = require('../../utils/dist/emotion-utils.esm.js');
|
|
8
8
|
var emotionSerialize_esm = require('../../serialize/dist/emotion-serialize.esm.js');
|
|
9
|
-
var
|
|
9
|
+
var emotionUseInsertionEffectWithFallbacks_esm = require('../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js');
|
|
10
10
|
var index = require('../../../../_virtual/index.js');
|
|
11
11
|
|
|
12
12
|
var isDevelopment = false;
|
|
13
13
|
|
|
14
|
+
var isBrowser = typeof document !== 'undefined';
|
|
15
|
+
|
|
14
16
|
var EmotionCacheContext = /* #__PURE__ */index.react.exports.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
15
17
|
// because this module is primarily intended for the browser and node
|
|
16
18
|
// but it's also required in react native and similar environments sometimes
|
|
17
19
|
// and we could have a special build just for that
|
|
18
20
|
// but this is much easier and the native packages
|
|
19
21
|
// might use a different theme context in the future anyway
|
|
20
|
-
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */
|
|
22
|
+
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */emotionCache_esm["default"]({
|
|
21
23
|
key: 'css'
|
|
22
24
|
}) : null);
|
|
23
25
|
|
|
24
26
|
EmotionCacheContext.Provider;
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
exports.w = function withEmotionCache(func) {
|
|
27
29
|
return /*#__PURE__*/index.react.exports.forwardRef(function (props, ref) {
|
|
28
30
|
// the cache will never be null in the browser
|
|
29
31
|
var cache = index.react.exports.useContext(EmotionCacheContext);
|
|
@@ -31,6 +33,30 @@ var withEmotionCache = function withEmotionCache(func) {
|
|
|
31
33
|
});
|
|
32
34
|
};
|
|
33
35
|
|
|
36
|
+
if (!isBrowser) {
|
|
37
|
+
exports.w = function withEmotionCache(func) {
|
|
38
|
+
return function (props) {
|
|
39
|
+
var cache = index.react.exports.useContext(EmotionCacheContext);
|
|
40
|
+
|
|
41
|
+
if (cache === null) {
|
|
42
|
+
// yes, we're potentially creating this on every render
|
|
43
|
+
// it doesn't actually matter though since it's only on the server
|
|
44
|
+
// so there will only every be a single render
|
|
45
|
+
// that could change in the future because of suspense and etc. but for now,
|
|
46
|
+
// this works and i don't want to optimise for a future thing that we aren't sure about
|
|
47
|
+
cache = emotionCache_esm["default"]({
|
|
48
|
+
key: 'css'
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/index.react.exports.createElement(EmotionCacheContext.Provider, {
|
|
51
|
+
value: cache
|
|
52
|
+
}, func(props, cache));
|
|
53
|
+
} else {
|
|
54
|
+
return func(props, cache);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
34
60
|
var ThemeContext = /* #__PURE__ */index.react.exports.createContext({});
|
|
35
61
|
|
|
36
62
|
var hasOwn = {}.hasOwnProperty;
|
|
@@ -55,15 +81,31 @@ var Insertion = function Insertion(_ref) {
|
|
|
55
81
|
var cache = _ref.cache,
|
|
56
82
|
serialized = _ref.serialized,
|
|
57
83
|
isStringTag = _ref.isStringTag;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return
|
|
84
|
+
emotionUtils_esm.registerStyles(cache, serialized, isStringTag);
|
|
85
|
+
var rules = emotionUseInsertionEffectWithFallbacks_esm.useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
86
|
+
return emotionUtils_esm.insertStyles(cache, serialized, isStringTag);
|
|
61
87
|
});
|
|
62
88
|
|
|
89
|
+
if (!isBrowser && rules !== undefined) {
|
|
90
|
+
var _ref2;
|
|
91
|
+
|
|
92
|
+
var serializedNames = serialized.name;
|
|
93
|
+
var next = serialized.next;
|
|
94
|
+
|
|
95
|
+
while (next !== undefined) {
|
|
96
|
+
serializedNames += ' ' + next.name;
|
|
97
|
+
next = next.next;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return /*#__PURE__*/index.react.exports.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
101
|
+
__html: rules
|
|
102
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
103
|
+
}
|
|
104
|
+
|
|
63
105
|
return null;
|
|
64
106
|
};
|
|
65
107
|
|
|
66
|
-
var Emotion = /* #__PURE__ */
|
|
108
|
+
var Emotion = /* #__PURE__ */exports.w(function (props, cache, ref) {
|
|
67
109
|
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
68
110
|
// not passing the registered cache to serializeStyles because it would
|
|
69
111
|
// make certain babel optimisations not possible
|
|
@@ -77,7 +119,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
77
119
|
var className = '';
|
|
78
120
|
|
|
79
121
|
if (typeof props.className === 'string') {
|
|
80
|
-
className =
|
|
122
|
+
className = emotionUtils_esm.getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
81
123
|
} else if (props.className != null) {
|
|
82
124
|
className = props.className + " ";
|
|
83
125
|
}
|
|
@@ -110,7 +152,7 @@ var Emotion$1 = Emotion;
|
|
|
110
152
|
|
|
111
153
|
exports.E = Emotion$1;
|
|
112
154
|
exports.T = ThemeContext;
|
|
155
|
+
exports.a = isDevelopment;
|
|
113
156
|
exports.c = createEmotionProps;
|
|
114
157
|
exports.h = hasOwn;
|
|
115
|
-
exports.i =
|
|
116
|
-
exports.w = withEmotionCache;
|
|
158
|
+
exports.i = isBrowser;
|
package/cjs/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var emotionElementD59e098f_esm = require('./emotion-element-d59e098f.esm.js');
|
|
6
6
|
require('../../../react/index.js');
|
|
7
|
-
require('../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.
|
|
7
|
+
require('../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js');
|
|
8
8
|
var emotionSerialize_esm = require('../../serialize/dist/emotion-serialize.esm.js');
|
|
9
9
|
require('../../../hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js');
|
|
10
10
|
var index = require('../../../../_virtual/index.js');
|
|
@@ -13,14 +13,14 @@ exports.jsx = function jsx(type, props) {
|
|
|
13
13
|
// eslint-disable-next-line prefer-rest-params
|
|
14
14
|
var args = arguments;
|
|
15
15
|
|
|
16
|
-
if (props == null || !
|
|
16
|
+
if (props == null || !emotionElementD59e098f_esm.h.call(props, 'css')) {
|
|
17
17
|
return index.react.exports.createElement.apply(undefined, args);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
var argsLength = args.length;
|
|
21
21
|
var createElementArgArray = new Array(argsLength);
|
|
22
|
-
createElementArgArray[0] =
|
|
23
|
-
createElementArgArray[1] =
|
|
22
|
+
createElementArgArray[0] = emotionElementD59e098f_esm.E;
|
|
23
|
+
createElementArgArray[1] = emotionElementD59e098f_esm.c(type, props);
|
|
24
24
|
|
|
25
25
|
for (var i = 2; i < argsLength; i++) {
|
|
26
26
|
createElementArgArray[i] = args[i];
|
|
@@ -56,8 +56,11 @@ function keyframes() {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
exports.ThemeContext =
|
|
60
|
-
exports
|
|
59
|
+
exports.ThemeContext = emotionElementD59e098f_esm.T;
|
|
60
|
+
Object.defineProperty(exports, 'withEmotionCache', {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return emotionElementD59e098f_esm.w; }
|
|
63
|
+
});
|
|
61
64
|
exports.createElement = exports.jsx;
|
|
62
65
|
exports.css = css;
|
|
63
66
|
exports.keyframes = keyframes;
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var index = require('../../../react/index.js');
|
|
6
6
|
|
|
7
|
+
var isBrowser = typeof document !== 'undefined';
|
|
8
|
+
|
|
7
9
|
var syncFallback = function syncFallback(create) {
|
|
8
10
|
return create();
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
var useInsertionEffect = index['useInsertion' + 'Effect'] ? index['useInsertion' + 'Effect'] : false;
|
|
12
|
-
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
|
|
14
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser ? syncFallback : useInsertionEffect || syncFallback;
|
|
13
15
|
|
|
14
16
|
exports.useInsertionEffectAlwaysWithSyncFallback = useInsertionEffectAlwaysWithSyncFallback;
|
package/cjs/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var isBrowser =
|
|
5
|
+
var isBrowser = typeof document !== 'undefined';
|
|
6
6
|
|
|
7
7
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
8
8
|
var rawClassName = '';
|
|
@@ -27,7 +27,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
|
27
27
|
// in node since emotion-server relies on whether a style is in
|
|
28
28
|
// the registered cache to know whether a style is global or not
|
|
29
29
|
// also, note that this check will be dead code eliminated in the browser
|
|
30
|
-
isBrowser === false ) && cache.registered[className] === undefined) {
|
|
30
|
+
isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
31
31
|
cache.registered[className] = serialized.styles;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -36,13 +36,22 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
36
36
|
var className = cache.key + "-" + serialized.name;
|
|
37
37
|
|
|
38
38
|
if (cache.inserted[serialized.name] === undefined) {
|
|
39
|
+
var stylesForSSR = '';
|
|
39
40
|
var current = serialized;
|
|
40
41
|
|
|
41
42
|
do {
|
|
42
|
-
cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
43
|
+
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
44
|
+
|
|
45
|
+
if (!isBrowser && maybeStyles !== undefined) {
|
|
46
|
+
stylesForSSR += maybeStyles;
|
|
47
|
+
}
|
|
43
48
|
|
|
44
49
|
current = current.next;
|
|
45
50
|
} while (current !== undefined);
|
|
51
|
+
|
|
52
|
+
if (!isBrowser && stylesForSSR.length !== 0) {
|
|
53
|
+
return stylesForSSR;
|
|
54
|
+
}
|
|
46
55
|
}
|
|
47
56
|
};
|
|
48
57
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var weakMemoize = function weakMemoize(func) {
|
|
6
|
+
var cache = new WeakMap();
|
|
7
|
+
return function (arg) {
|
|
8
|
+
if (cache.has(arg)) {
|
|
9
|
+
// Use non-null assertion because we just checked that the cache `has` it
|
|
10
|
+
// This allows us to remove `undefined` from the return value
|
|
11
|
+
return cache.get(arg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var ret = func(arg);
|
|
15
|
+
cache.set(arg, ret);
|
|
16
|
+
return ret;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports["default"] = weakMemoize;
|
|
@@ -325,16 +325,22 @@ const flip = function (options) {
|
|
|
325
325
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
326
326
|
const nextPlacement = placements[nextIndex];
|
|
327
327
|
if (nextPlacement) {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
328
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== floatingUi_utils.getSideAxis(nextPlacement) : false;
|
|
329
|
+
if (!ignoreCrossAxisOverflow ||
|
|
330
|
+
// We leave the current main axis only if every placement on that axis
|
|
331
|
+
// overflows the main axis.
|
|
332
|
+
overflowsData.every(d => floatingUi_utils.getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
333
|
+
// Try next placement and re-run the lifecycle.
|
|
334
|
+
return {
|
|
335
|
+
data: {
|
|
336
|
+
index: nextIndex,
|
|
337
|
+
overflows: overflowsData
|
|
338
|
+
},
|
|
339
|
+
reset: {
|
|
340
|
+
placement: nextPlacement
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
}
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -580,6 +586,8 @@ const inline = function (options) {
|
|
|
580
586
|
};
|
|
581
587
|
};
|
|
582
588
|
|
|
589
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
590
|
+
|
|
583
591
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
584
592
|
// Derivable.
|
|
585
593
|
|
|
@@ -593,7 +601,7 @@ async function convertValueToCoords(state, options) {
|
|
|
593
601
|
const side = floatingUi_utils.getSide(placement);
|
|
594
602
|
const alignment = floatingUi_utils.getAlignment(placement);
|
|
595
603
|
const isVertical = floatingUi_utils.getSideAxis(placement) === 'y';
|
|
596
|
-
const mainAxisMulti =
|
|
604
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
597
605
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
598
606
|
const rawValue = floatingUi_utils.evaluate(options, state);
|
|
599
607
|
|
|
@@ -793,7 +801,7 @@ const limitShift = function (options) {
|
|
|
793
801
|
if (checkCrossAxis) {
|
|
794
802
|
var _middlewareData$offse, _middlewareData$offse2;
|
|
795
803
|
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
796
|
-
const isOriginSide =
|
|
804
|
+
const isOriginSide = originSides.has(floatingUi_utils.getSide(placement));
|
|
797
805
|
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
798
806
|
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
799
807
|
if (crossAxisCoord < limitMin) {
|
|
@@ -46,6 +46,7 @@ function isShadowRoot(value) {
|
|
|
46
46
|
}
|
|
47
47
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
48
48
|
}
|
|
49
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
49
50
|
function isOverflowElement(element) {
|
|
50
51
|
const {
|
|
51
52
|
overflow,
|
|
@@ -53,14 +54,15 @@ function isOverflowElement(element) {
|
|
|
53
54
|
overflowY,
|
|
54
55
|
display
|
|
55
56
|
} = getComputedStyle(element);
|
|
56
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
57
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
57
58
|
}
|
|
58
59
|
function isWebKit() {
|
|
59
60
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
60
61
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
61
62
|
}
|
|
63
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
62
64
|
function isLastTraversableNode(node) {
|
|
63
|
-
return
|
|
65
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
64
66
|
}
|
|
65
67
|
function getComputedStyle(element) {
|
|
66
68
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -46,8 +46,9 @@ function getOppositeAxis(axis) {
|
|
|
46
46
|
function getAxisLength(axis) {
|
|
47
47
|
return axis === 'y' ? 'height' : 'width';
|
|
48
48
|
}
|
|
49
|
+
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
49
50
|
function getSideAxis(placement) {
|
|
50
|
-
return
|
|
51
|
+
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
51
52
|
}
|
|
52
53
|
function getAlignmentAxis(placement) {
|
|
53
54
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -72,19 +73,19 @@ function getExpandedPlacements(placement) {
|
|
|
72
73
|
function getOppositeAlignmentPlacement(placement) {
|
|
73
74
|
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
74
75
|
}
|
|
76
|
+
const lrPlacement = ['left', 'right'];
|
|
77
|
+
const rlPlacement = ['right', 'left'];
|
|
78
|
+
const tbPlacement = ['top', 'bottom'];
|
|
79
|
+
const btPlacement = ['bottom', 'top'];
|
|
75
80
|
function getSideList(side, isStart, rtl) {
|
|
76
|
-
const lr = ['left', 'right'];
|
|
77
|
-
const rl = ['right', 'left'];
|
|
78
|
-
const tb = ['top', 'bottom'];
|
|
79
|
-
const bt = ['bottom', 'top'];
|
|
80
81
|
switch (side) {
|
|
81
82
|
case 'top':
|
|
82
83
|
case 'bottom':
|
|
83
|
-
if (rtl) return isStart ?
|
|
84
|
-
return isStart ?
|
|
84
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
85
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
85
86
|
case 'left':
|
|
86
87
|
case 'right':
|
|
87
|
-
return isStart ?
|
|
88
|
+
return isStart ? tbPlacement : btPlacement;
|
|
88
89
|
default:
|
|
89
90
|
return [];
|
|
90
91
|
}
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
require('../../../react/index.js');
|
|
6
6
|
var index = require('../../../../_virtual/index.js');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
return !ref || typeof ref === 'function' ? ref :
|
|
8
|
+
function toFnRef(ref) {
|
|
9
|
+
return !ref || typeof ref === 'function' ? ref : value => {
|
|
10
10
|
ref.current = value;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
13
|
-
|
|
12
|
+
}
|
|
14
13
|
function mergeRefs(refA, refB) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
14
|
+
const a = toFnRef(refA);
|
|
15
|
+
const b = toFnRef(refB);
|
|
16
|
+
return value => {
|
|
18
17
|
if (a) a(value);
|
|
19
18
|
if (b) b(value);
|
|
20
19
|
};
|
|
21
20
|
}
|
|
21
|
+
|
|
22
22
|
/**
|
|
23
23
|
* Create and returns a single callback ref composed from two other Refs.
|
|
24
24
|
*
|
|
@@ -35,11 +35,8 @@ function mergeRefs(refA, refB) {
|
|
|
35
35
|
* @param refB A Callback or mutable Ref
|
|
36
36
|
* @category refs
|
|
37
37
|
*/
|
|
38
|
-
|
|
39
38
|
function useMergedRefs(refA, refB) {
|
|
40
|
-
return index.react.exports.useMemo(
|
|
41
|
-
return mergeRefs(refA, refB);
|
|
42
|
-
}, [refA, refB]);
|
|
39
|
+
return index.react.exports.useMemo(() => mergeRefs(refA, refB), [refA, refB]);
|
|
43
40
|
}
|
|
44
41
|
|
|
45
42
|
exports["default"] = useMergedRefs;
|
|
@@ -25,15 +25,13 @@ var index = require('../../../../_virtual/index.js');
|
|
|
25
25
|
*
|
|
26
26
|
* @category effects
|
|
27
27
|
*/
|
|
28
|
-
|
|
29
28
|
function useUpdateEffect(fn, deps) {
|
|
30
|
-
|
|
31
|
-
index.react.exports.useEffect(
|
|
29
|
+
const isFirst = index.react.exports.useRef(true);
|
|
30
|
+
index.react.exports.useEffect(() => {
|
|
32
31
|
if (isFirst.current) {
|
|
33
32
|
isFirst.current = false;
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
return fn();
|
|
38
36
|
}, deps);
|
|
39
37
|
}
|