@bigbinary/neetoui 8.3.29 → 8.3.31
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/Accordion.js +94 -76
- package/dist/Accordion.js.map +1 -1
- package/dist/ActionDropdown.js +29 -32
- package/dist/ActionDropdown.js.map +1 -1
- package/dist/Alert.js +44 -38
- package/dist/Alert.js.map +1 -1
- package/dist/Avatar.js +28 -22
- package/dist/Avatar.js.map +1 -1
- package/dist/Button.js +45 -43
- package/dist/Button.js.map +1 -1
- package/dist/Callout.js +12 -7
- package/dist/Callout.js.map +1 -1
- package/dist/Checkbox.js +35 -28
- package/dist/Checkbox.js.map +1 -1
- package/dist/ColorPicker.js +134 -117
- package/dist/ColorPicker.js.map +1 -1
- package/dist/DatePicker.js +25 -9
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dropdown.js +75 -83
- package/dist/Dropdown.js.map +1 -1
- package/dist/Input.js +82 -70
- package/dist/Input.js.map +1 -1
- package/dist/Kbd.js +13 -7
- package/dist/Kbd.js.map +1 -1
- package/dist/Label.js +59 -40
- package/dist/Label.js.map +1 -1
- package/dist/Modal.js +76 -65
- package/dist/Modal.js.map +1 -1
- package/dist/MultiEmailInput.js +118 -99
- package/dist/MultiEmailInput.js.map +1 -1
- package/dist/NoData.js +55 -39
- package/dist/NoData.js.map +1 -1
- package/dist/Pagination.js +64 -52
- package/dist/Pagination.js.map +1 -1
- package/dist/Pane.js +66 -56
- package/dist/Pane.js.map +1 -1
- package/dist/Popover.js +10 -7
- package/dist/Popover.js.map +1 -1
- package/dist/ProgressBar.js +20 -17
- package/dist/ProgressBar.js.map +1 -1
- package/dist/Radio.js +50 -40
- package/dist/Radio.js.map +1 -1
- package/dist/Select.js +111 -90
- package/dist/Select.js.map +1 -1
- package/dist/Sidebar.js +265 -216
- package/dist/Sidebar.js.map +1 -1
- package/dist/Slider.js +45 -38
- package/dist/Slider.js.map +1 -1
- package/dist/Spinner.js +3 -2
- package/dist/Spinner.js.map +1 -1
- package/dist/Stepper.js +33 -26
- package/dist/Stepper.js.map +1 -1
- package/dist/Switch.js +56 -46
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +17 -11
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +221 -182
- package/dist/Table.js.map +1 -1
- package/dist/Tag.js +31 -24
- package/dist/Tag.js.map +1 -1
- package/dist/{Textarea-DlEGZFfG.js → Textarea-D1gsiIxm.js} +66 -56
- package/dist/{Textarea-DlEGZFfG.js.map → Textarea-D1gsiIxm.js.map} +1 -1
- package/dist/Textarea.js +4 -4
- package/dist/TimePicker.js +25 -9
- package/dist/TimePicker.js.map +1 -1
- package/dist/Toastr.js +46 -37
- package/dist/Toastr.js.map +1 -1
- package/dist/Tooltip.js +10 -6
- package/dist/Tooltip.js.map +1 -1
- package/dist/TranslationProvider.js +6 -4
- package/dist/TranslationProvider.js.map +1 -1
- package/dist/Tree.js +17 -15
- package/dist/Tree.js.map +1 -1
- package/dist/TreeSelect.js +65 -58
- package/dist/TreeSelect.js.map +1 -1
- package/dist/Typography.js +7 -3
- package/dist/Typography.js.map +1 -1
- package/dist/cjs/Accordion.js +94 -76
- package/dist/cjs/Accordion.js.map +1 -1
- package/dist/cjs/ActionDropdown.js +29 -32
- package/dist/cjs/ActionDropdown.js.map +1 -1
- package/dist/cjs/Alert.js +43 -37
- package/dist/cjs/Alert.js.map +1 -1
- package/dist/cjs/Avatar.js +27 -21
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/Button.js +45 -43
- package/dist/cjs/Button.js.map +1 -1
- package/dist/cjs/Callout.js +11 -6
- package/dist/cjs/Callout.js.map +1 -1
- package/dist/cjs/Checkbox.js +34 -27
- package/dist/cjs/Checkbox.js.map +1 -1
- package/dist/cjs/ColorPicker.js +132 -115
- package/dist/cjs/ColorPicker.js.map +1 -1
- package/dist/cjs/DatePicker.js +25 -9
- package/dist/cjs/DatePicker.js.map +1 -1
- package/dist/cjs/Dropdown.js +74 -82
- package/dist/cjs/Dropdown.js.map +1 -1
- package/dist/cjs/Input.js +81 -69
- package/dist/cjs/Input.js.map +1 -1
- package/dist/cjs/Kbd.js +13 -7
- package/dist/cjs/Kbd.js.map +1 -1
- package/dist/cjs/Label.js +59 -40
- package/dist/cjs/Label.js.map +1 -1
- package/dist/cjs/Modal.js +76 -65
- package/dist/cjs/Modal.js.map +1 -1
- package/dist/cjs/MultiEmailInput.js +117 -98
- package/dist/cjs/MultiEmailInput.js.map +1 -1
- package/dist/cjs/NoData.js +55 -39
- package/dist/cjs/NoData.js.map +1 -1
- package/dist/cjs/Pagination.js +63 -51
- package/dist/cjs/Pagination.js.map +1 -1
- package/dist/cjs/Pane.js +65 -55
- package/dist/cjs/Pane.js.map +1 -1
- package/dist/cjs/Popover.js +10 -7
- package/dist/cjs/Popover.js.map +1 -1
- package/dist/cjs/ProgressBar.js +20 -17
- package/dist/cjs/ProgressBar.js.map +1 -1
- package/dist/cjs/Radio.js +49 -39
- package/dist/cjs/Radio.js.map +1 -1
- package/dist/cjs/Select.js +110 -89
- package/dist/cjs/Select.js.map +1 -1
- package/dist/cjs/Sidebar.js +268 -219
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/Slider.js +45 -38
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Spinner.js +3 -2
- package/dist/cjs/Spinner.js.map +1 -1
- package/dist/cjs/Stepper.js +33 -26
- package/dist/cjs/Stepper.js.map +1 -1
- package/dist/cjs/Switch.js +55 -45
- package/dist/cjs/Switch.js.map +1 -1
- package/dist/cjs/Tab.js +17 -11
- package/dist/cjs/Tab.js.map +1 -1
- package/dist/cjs/Table.js +224 -185
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/Tag.js +30 -23
- package/dist/cjs/Tag.js.map +1 -1
- package/dist/cjs/{Textarea-CiUKmQHr.js → Textarea-BzBZbgdT.js} +65 -55
- package/dist/cjs/{Textarea-CiUKmQHr.js.map → Textarea-BzBZbgdT.js.map} +1 -1
- package/dist/cjs/Textarea.js +4 -4
- package/dist/cjs/TimePicker.js +25 -9
- package/dist/cjs/TimePicker.js.map +1 -1
- package/dist/cjs/Toastr.js +45 -36
- package/dist/cjs/Toastr.js.map +1 -1
- package/dist/cjs/Tooltip.js +10 -6
- package/dist/cjs/Tooltip.js.map +1 -1
- package/dist/cjs/TranslationProvider.js +5 -3
- package/dist/cjs/TranslationProvider.js.map +1 -1
- package/dist/cjs/Tree.js +17 -15
- package/dist/cjs/Tree.js.map +1 -1
- package/dist/cjs/TreeSelect.js +66 -59
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/Typography.js +7 -3
- package/dist/cjs/Typography.js.map +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/formik/ActionBlock.js +16 -9
- package/dist/cjs/formik/ActionBlock.js.map +1 -1
- package/dist/cjs/formik/BlockNavigation.js +40 -30
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Button.js +5 -3
- package/dist/cjs/formik/Button.js.map +1 -1
- package/dist/cjs/formik/Checkbox.js +29 -28
- package/dist/cjs/formik/Checkbox.js.map +1 -1
- package/dist/cjs/formik/Form.js +53 -47
- package/dist/cjs/formik/Form.js.map +1 -1
- package/dist/cjs/formik/Input.js +27 -26
- package/dist/cjs/formik/Input.js.map +1 -1
- package/dist/cjs/formik/MultiEmailInput.js +10 -6
- package/dist/cjs/formik/MultiEmailInput.js.map +1 -1
- package/dist/cjs/formik/Radio.js +7 -7
- package/dist/cjs/formik/Radio.js.map +1 -1
- package/dist/cjs/formik/Select.js +15 -10
- package/dist/cjs/formik/Select.js.map +1 -1
- package/dist/cjs/formik/Slider.js +7 -7
- package/dist/cjs/formik/Slider.js.map +1 -1
- package/dist/cjs/formik/Switch.js +31 -28
- package/dist/cjs/formik/Switch.js.map +1 -1
- package/dist/cjs/formik/Textarea.js +28 -27
- package/dist/cjs/formik/Textarea.js.map +1 -1
- package/dist/cjs/formik/TreeSelect.js +8 -5
- package/dist/cjs/formik/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/index.js +11 -7
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/{index-BQsO_CAs.js → index-Dv40T5Ly.js} +195 -169
- package/dist/cjs/{index-BQsO_CAs.js.map → index-Dv40T5Ly.js.map} +1 -1
- package/dist/cjs/{index--BeRLo6L.js → index-h3QcOeWw.js} +12 -14
- package/dist/cjs/{index--BeRLo6L.js.map → index-h3QcOeWw.js.map} +1 -1
- package/dist/cjs/index.css +1 -2
- package/dist/cjs/index.js +26 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts.js +8 -3
- package/dist/cjs/layouts.js.map +1 -1
- package/dist/cjs/overlayManager.js +1 -2
- package/dist/cjs/overlayManager.js.map +1 -1
- package/dist/cjs/{react-select-creatable.esm-Bdv9YAMt.js → react-select-creatable.esm-lcdODVBz.js} +449 -243
- package/dist/cjs/react-select-creatable.esm-lcdODVBz.js.map +1 -0
- package/dist/cjs/useId-DXHUzdxd.js.map +1 -1
- package/dist/cjs/{useOverlayManager-CxBh9gVG.js → useOverlayManager-Bj58uLfc.js} +14 -9
- package/dist/cjs/{useOverlayManager-CxBh9gVG.js.map → useOverlayManager-Bj58uLfc.js.map} +1 -1
- package/dist/cjs/useQueryParams-BrrbBvY_.js +18 -0
- package/dist/cjs/{useQueryParams-l5fJJYCR.js.map → useQueryParams-BrrbBvY_.js.map} +1 -1
- package/dist/cjs/useRecentlyUsedColors-BcOkiB-v.js +1239 -0
- package/dist/cjs/useRecentlyUsedColors-BcOkiB-v.js.map +1 -0
- package/dist/cjs/useRestoreScrollPosition-DP8SUs19.js +236 -0
- package/dist/cjs/useRestoreScrollPosition-DP8SUs19.js.map +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/formik/ActionBlock.js +16 -9
- package/dist/formik/ActionBlock.js.map +1 -1
- package/dist/formik/BlockNavigation.js +41 -31
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Button.js +6 -4
- package/dist/formik/Button.js.map +1 -1
- package/dist/formik/Checkbox.js +30 -29
- package/dist/formik/Checkbox.js.map +1 -1
- package/dist/formik/Form.js +54 -48
- package/dist/formik/Form.js.map +1 -1
- package/dist/formik/Input.js +28 -27
- package/dist/formik/Input.js.map +1 -1
- package/dist/formik/MultiEmailInput.js +11 -7
- package/dist/formik/MultiEmailInput.js.map +1 -1
- package/dist/formik/Radio.js +7 -7
- package/dist/formik/Radio.js.map +1 -1
- package/dist/formik/Select.js +17 -12
- package/dist/formik/Select.js.map +1 -1
- package/dist/formik/Slider.js +8 -8
- package/dist/formik/Slider.js.map +1 -1
- package/dist/formik/Switch.js +31 -28
- package/dist/formik/Switch.js.map +1 -1
- package/dist/formik/Textarea.js +29 -28
- package/dist/formik/Textarea.js.map +1 -1
- package/dist/formik/TreeSelect.js +9 -6
- package/dist/formik/TreeSelect.js.map +1 -1
- package/dist/formik/index.js +11 -7
- package/dist/formik/index.js.map +1 -1
- package/dist/{index-Dxaw6gl9.js → index-D6vmwyYl.js} +14 -16
- package/dist/index-D6vmwyYl.js.map +1 -0
- package/dist/{index-C4Jg7ZKa.js → index-D6yXgUQN.js} +196 -170
- package/dist/{index-C4Jg7ZKa.js.map → index-D6yXgUQN.js.map} +1 -1
- package/dist/index.css +1 -2
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/dist/layouts.js +8 -3
- package/dist/layouts.js.map +1 -1
- package/dist/overlayManager.js +1 -2
- package/dist/overlayManager.js.map +1 -1
- package/dist/{react-select-creatable.esm-Dx_vEnyD.js → react-select-creatable.esm-opiJTCqo.js} +450 -244
- package/dist/react-select-creatable.esm-opiJTCqo.js.map +1 -0
- package/dist/useId-Jj9hXm-g.js.map +1 -1
- package/dist/{useOverlayManager-AZIGhUYS.js → useOverlayManager-BzuBvhPZ.js} +14 -9
- package/dist/{useOverlayManager-AZIGhUYS.js.map → useOverlayManager-BzuBvhPZ.js.map} +1 -1
- package/dist/useQueryParams-BKsf4FPY.js +16 -0
- package/dist/{useQueryParams-b60CHFUx.js.map → useQueryParams-BKsf4FPY.js.map} +1 -1
- package/dist/useRecentlyUsedColors-CtvdF-KQ.js +1236 -0
- package/dist/useRecentlyUsedColors-CtvdF-KQ.js.map +1 -0
- package/dist/useRestoreScrollPosition-BVX-mT5c.js +225 -0
- package/dist/useRestoreScrollPosition-BVX-mT5c.js.map +1 -0
- package/package.json +42 -48
- package/dist/cjs/react-select-creatable.esm-Bdv9YAMt.js.map +0 -1
- package/dist/cjs/useQueryParams-l5fJJYCR.js +0 -18
- package/dist/cjs/useRecentlyUsedColors-3cKx-eDH.js +0 -1270
- package/dist/cjs/useRecentlyUsedColors-3cKx-eDH.js.map +0 -1
- package/dist/cjs/useRestoreScrollPosition-PsoENtiB.js +0 -218
- package/dist/cjs/useRestoreScrollPosition-PsoENtiB.js.map +0 -1
- package/dist/index-Dxaw6gl9.js.map +0 -1
- package/dist/react-select-creatable.esm-Dx_vEnyD.js.map +0 -1
- package/dist/useQueryParams-b60CHFUx.js +0 -16
- package/dist/useRecentlyUsedColors-CqUfqfck.js +0 -1267
- package/dist/useRecentlyUsedColors-CqUfqfck.js.map +0 -1
- package/dist/useRestoreScrollPosition-C1NSANQW.js +0 -207
- package/dist/useRestoreScrollPosition-C1NSANQW.js.map +0 -1
- package/src/translations/ar.json +0 -41
- package/src/translations/bg.json +0 -41
- package/src/translations/ca.json +0 -41
- package/src/translations/cs.json +0 -41
- package/src/translations/da.json +0 -41
- package/src/translations/de.json +0 -41
- package/src/translations/en.json +0 -41
- package/src/translations/es-MX.json +0 -41
- package/src/translations/es.json +0 -41
- package/src/translations/et.json +0 -41
- package/src/translations/fi.json +0 -41
- package/src/translations/fil.json +0 -41
- package/src/translations/fr.json +0 -41
- package/src/translations/hi.json +0 -41
- package/src/translations/hr.json +0 -41
- package/src/translations/id.json +0 -41
- package/src/translations/index.js +0 -18
- package/src/translations/it.json +0 -41
- package/src/translations/ja.json +0 -41
- package/src/translations/ko.json +0 -41
- package/src/translations/nl.json +0 -41
- package/src/translations/pl.json +0 -41
- package/src/translations/pt-BR.json +0 -41
- package/src/translations/pt.json +0 -41
- package/src/translations/ro.json +0 -41
- package/src/translations/ru.json +0 -41
- package/src/translations/sk.json +0 -41
- package/src/translations/sl.json +0 -41
- package/src/translations/sv.json +0 -41
- package/src/translations/th.json +0 -41
- package/src/translations/tr.json +0 -41
- package/src/translations/uk.json +0 -41
- package/src/translations/vi.json +0 -41
- package/src/translations/zh-CN.json +0 -41
- package/src/translations/zh-TW.json +0 -41
package/dist/{react-select-creatable.esm-Dx_vEnyD.js → react-select-creatable.esm-opiJTCqo.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef, useContext, useLayoutEffect, createContext, useRef, useState, useMemo, useCallback, Component, Fragment, useEffect } from 'react';
|
|
4
4
|
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
|
|
5
5
|
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
|
|
6
6
|
import _createClass from '@babel/runtime/helpers/esm/createClass';
|
|
@@ -48,10 +48,9 @@ styleSheet.flush()
|
|
|
48
48
|
- empties the stylesheet of all its contents
|
|
49
49
|
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
function sheetForTag(tag) {
|
|
53
53
|
if (tag.sheet) {
|
|
54
|
-
// $FlowFixMe
|
|
55
54
|
return tag.sheet;
|
|
56
55
|
} // this weirdness brought to you by firefox
|
|
57
56
|
|
|
@@ -60,10 +59,13 @@ function sheetForTag(tag) {
|
|
|
60
59
|
|
|
61
60
|
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
62
61
|
if (document.styleSheets[i].ownerNode === tag) {
|
|
63
|
-
// $FlowFixMe
|
|
64
62
|
return document.styleSheets[i];
|
|
65
63
|
}
|
|
66
|
-
}
|
|
64
|
+
} // this function should always return with a value
|
|
65
|
+
// TS can't understand it though so we make it stop complaining here
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
return undefined;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
function createStyleElement(options) {
|
|
@@ -104,7 +106,7 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
104
106
|
_this.tags.push(tag);
|
|
105
107
|
};
|
|
106
108
|
|
|
107
|
-
this.isSpeedy = options.speedy === undefined ?
|
|
109
|
+
this.isSpeedy = options.speedy === undefined ? true : options.speedy;
|
|
108
110
|
this.tags = [];
|
|
109
111
|
this.ctr = 0;
|
|
110
112
|
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
@@ -149,9 +151,10 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
149
151
|
};
|
|
150
152
|
|
|
151
153
|
_proto.flush = function flush() {
|
|
152
|
-
// $FlowFixMe
|
|
153
154
|
this.tags.forEach(function (tag) {
|
|
154
|
-
|
|
155
|
+
var _tag$parentNode;
|
|
156
|
+
|
|
157
|
+
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
155
158
|
});
|
|
156
159
|
this.tags = [];
|
|
157
160
|
this.ctr = 0;
|
|
@@ -169,6 +172,7 @@ var RULESET = 'rule';
|
|
|
169
172
|
var DECLARATION = 'decl';
|
|
170
173
|
var IMPORT = '@import';
|
|
171
174
|
var KEYFRAMES = '@keyframes';
|
|
175
|
+
var LAYER = '@layer';
|
|
172
176
|
|
|
173
177
|
/**
|
|
174
178
|
* @param {number}
|
|
@@ -583,7 +587,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
|
|
|
583
587
|
// \0 }
|
|
584
588
|
case 0: case 125: scanning = 0;
|
|
585
589
|
// ;
|
|
586
|
-
case 59 + offset:
|
|
590
|
+
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
587
591
|
if (property > 0 && (strlen(characters) - length))
|
|
588
592
|
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
589
593
|
break
|
|
@@ -598,8 +602,8 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
|
|
|
598
602
|
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
599
603
|
else
|
|
600
604
|
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
601
|
-
// d m s
|
|
602
|
-
case 100: case 109: case 115:
|
|
605
|
+
// d l m s
|
|
606
|
+
case 100: case 108: case 109: case 115:
|
|
603
607
|
parse(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);
|
|
604
608
|
break
|
|
605
609
|
default:
|
|
@@ -718,6 +722,7 @@ function serialize (children, callback) {
|
|
|
718
722
|
*/
|
|
719
723
|
function stringify (element, index, children, callback) {
|
|
720
724
|
switch (element.type) {
|
|
725
|
+
case LAYER: if (element.children.length) break
|
|
721
726
|
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
|
722
727
|
case COMMENT: return ''
|
|
723
728
|
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
|
@@ -757,11 +762,11 @@ function rulesheet (callback) {
|
|
|
757
762
|
}
|
|
758
763
|
|
|
759
764
|
var weakMemoize = function weakMemoize(func) {
|
|
760
|
-
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
761
765
|
var cache = new WeakMap();
|
|
762
766
|
return function (arg) {
|
|
763
767
|
if (cache.has(arg)) {
|
|
764
|
-
//
|
|
768
|
+
// Use non-null assertion because we just checked that the cache `has` it
|
|
769
|
+
// This allows us to remove `undefined` from the return value
|
|
765
770
|
return cache.get(arg);
|
|
766
771
|
}
|
|
767
772
|
|
|
@@ -779,6 +784,8 @@ function memoize(fn) {
|
|
|
779
784
|
};
|
|
780
785
|
}
|
|
781
786
|
|
|
787
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
788
|
+
|
|
782
789
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
783
790
|
var previous = 0;
|
|
784
791
|
var character = 0;
|
|
@@ -857,8 +864,8 @@ var compat = function compat(element) {
|
|
|
857
864
|
return;
|
|
858
865
|
}
|
|
859
866
|
|
|
860
|
-
var value = element.value
|
|
861
|
-
|
|
867
|
+
var value = element.value;
|
|
868
|
+
var parent = element.parent;
|
|
862
869
|
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
863
870
|
|
|
864
871
|
while (parent.type !== 'rule') {
|
|
@@ -1116,13 +1123,9 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
1116
1123
|
}
|
|
1117
1124
|
};
|
|
1118
1125
|
|
|
1119
|
-
var isBrowser$3 = typeof document !== 'undefined';
|
|
1120
1126
|
var getServerStylisCache = isBrowser$3 ? undefined : weakMemoize(function () {
|
|
1121
1127
|
return memoize(function () {
|
|
1122
|
-
|
|
1123
|
-
return function (name) {
|
|
1124
|
-
return cache[name];
|
|
1125
|
-
};
|
|
1128
|
+
return {};
|
|
1126
1129
|
});
|
|
1127
1130
|
});
|
|
1128
1131
|
var defaultStylisPlugins = [prefixer];
|
|
@@ -1148,6 +1151,7 @@ var createCache = function createCache(options) {
|
|
|
1148
1151
|
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
1149
1152
|
return;
|
|
1150
1153
|
}
|
|
1154
|
+
|
|
1151
1155
|
document.head.appendChild(node);
|
|
1152
1156
|
node.setAttribute('data-s', '');
|
|
1153
1157
|
});
|
|
@@ -1164,7 +1168,7 @@ var createCache = function createCache(options) {
|
|
|
1164
1168
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
1165
1169
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1166
1170
|
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1167
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1171
|
+
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1168
1172
|
|
|
1169
1173
|
for (var i = 1; i < attrib.length; i++) {
|
|
1170
1174
|
inserted[attrib[i]] = true;
|
|
@@ -1178,7 +1182,7 @@ var createCache = function createCache(options) {
|
|
|
1178
1182
|
|
|
1179
1183
|
var omnipresentPlugins = [compat, removeLabel];
|
|
1180
1184
|
|
|
1181
|
-
if (
|
|
1185
|
+
if (!getServerStylisCache) {
|
|
1182
1186
|
var currentSheet;
|
|
1183
1187
|
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
1184
1188
|
currentSheet.insert(rule);
|
|
@@ -1205,8 +1209,7 @@ var createCache = function createCache(options) {
|
|
|
1205
1209
|
|
|
1206
1210
|
var _stylis = function _stylis(styles) {
|
|
1207
1211
|
return serialize(compile(styles), _serializer);
|
|
1208
|
-
};
|
|
1209
|
-
|
|
1212
|
+
};
|
|
1210
1213
|
|
|
1211
1214
|
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1212
1215
|
|
|
@@ -1422,12 +1425,13 @@ function requireHoistNonReactStatics_cjs () {
|
|
|
1422
1425
|
requireHoistNonReactStatics_cjs();
|
|
1423
1426
|
|
|
1424
1427
|
var isBrowser$2 = typeof document !== 'undefined';
|
|
1428
|
+
|
|
1425
1429
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1426
1430
|
var rawClassName = '';
|
|
1427
1431
|
classNames.split(' ').forEach(function (className) {
|
|
1428
1432
|
if (registered[className] !== undefined) {
|
|
1429
1433
|
registeredStyles.push(registered[className] + ";");
|
|
1430
|
-
} else {
|
|
1434
|
+
} else if (className) {
|
|
1431
1435
|
rawClassName += className + " ";
|
|
1432
1436
|
}
|
|
1433
1437
|
});
|
|
@@ -1529,6 +1533,7 @@ function murmur2(str) {
|
|
|
1529
1533
|
|
|
1530
1534
|
var unitlessKeys = {
|
|
1531
1535
|
animationIterationCount: 1,
|
|
1536
|
+
aspectRatio: 1,
|
|
1532
1537
|
borderImageOutset: 1,
|
|
1533
1538
|
borderImageSlice: 1,
|
|
1534
1539
|
borderImageWidth: 1,
|
|
@@ -1560,6 +1565,7 @@ var unitlessKeys = {
|
|
|
1560
1565
|
opacity: 1,
|
|
1561
1566
|
order: 1,
|
|
1562
1567
|
orphans: 1,
|
|
1568
|
+
scale: 1,
|
|
1563
1569
|
tabSize: 1,
|
|
1564
1570
|
widows: 1,
|
|
1565
1571
|
zIndex: 1,
|
|
@@ -1616,16 +1622,16 @@ var processStyleValue = function processStyleValue(key, value) {
|
|
|
1616
1622
|
return value;
|
|
1617
1623
|
};
|
|
1618
1624
|
|
|
1619
|
-
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
1620
|
-
|
|
1621
1625
|
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1622
1626
|
if (interpolation == null) {
|
|
1623
1627
|
return '';
|
|
1624
1628
|
}
|
|
1625
1629
|
|
|
1626
|
-
|
|
1630
|
+
var componentSelector = interpolation;
|
|
1631
|
+
|
|
1632
|
+
if (componentSelector.__emotion_styles !== undefined) {
|
|
1627
1633
|
|
|
1628
|
-
return
|
|
1634
|
+
return componentSelector;
|
|
1629
1635
|
}
|
|
1630
1636
|
|
|
1631
1637
|
switch (typeof interpolation) {
|
|
@@ -1636,17 +1642,21 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1636
1642
|
|
|
1637
1643
|
case 'object':
|
|
1638
1644
|
{
|
|
1639
|
-
|
|
1645
|
+
var keyframes = interpolation;
|
|
1646
|
+
|
|
1647
|
+
if (keyframes.anim === 1) {
|
|
1640
1648
|
cursor = {
|
|
1641
|
-
name:
|
|
1642
|
-
styles:
|
|
1649
|
+
name: keyframes.name,
|
|
1650
|
+
styles: keyframes.styles,
|
|
1643
1651
|
next: cursor
|
|
1644
1652
|
};
|
|
1645
|
-
return
|
|
1653
|
+
return keyframes.name;
|
|
1646
1654
|
}
|
|
1647
1655
|
|
|
1648
|
-
|
|
1649
|
-
|
|
1656
|
+
var serializedStyles = interpolation;
|
|
1657
|
+
|
|
1658
|
+
if (serializedStyles.styles !== undefined) {
|
|
1659
|
+
var next = serializedStyles.next;
|
|
1650
1660
|
|
|
1651
1661
|
if (next !== undefined) {
|
|
1652
1662
|
// not the most efficient thing ever but this is a pretty rare case
|
|
@@ -1661,8 +1671,7 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1661
1671
|
}
|
|
1662
1672
|
}
|
|
1663
1673
|
|
|
1664
|
-
var styles =
|
|
1665
|
-
|
|
1674
|
+
var styles = serializedStyles.styles + ";";
|
|
1666
1675
|
return styles;
|
|
1667
1676
|
}
|
|
1668
1677
|
|
|
@@ -1683,12 +1692,14 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1683
1692
|
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1684
1693
|
|
|
1685
1694
|
|
|
1695
|
+
var asString = interpolation;
|
|
1696
|
+
|
|
1686
1697
|
if (registered == null) {
|
|
1687
|
-
return
|
|
1698
|
+
return asString;
|
|
1688
1699
|
}
|
|
1689
1700
|
|
|
1690
|
-
var cached = registered[
|
|
1691
|
-
return cached !== undefined ? cached :
|
|
1701
|
+
var cached = registered[asString];
|
|
1702
|
+
return cached !== undefined ? cached : asString;
|
|
1692
1703
|
}
|
|
1693
1704
|
|
|
1694
1705
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
@@ -1699,41 +1710,40 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1699
1710
|
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1700
1711
|
}
|
|
1701
1712
|
} else {
|
|
1702
|
-
for (var
|
|
1703
|
-
var value = obj[
|
|
1713
|
+
for (var key in obj) {
|
|
1714
|
+
var value = obj[key];
|
|
1704
1715
|
|
|
1705
1716
|
if (typeof value !== 'object') {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
string +=
|
|
1717
|
+
var asString = value;
|
|
1718
|
+
|
|
1719
|
+
if (registered != null && registered[asString] !== undefined) {
|
|
1720
|
+
string += key + "{" + registered[asString] + "}";
|
|
1721
|
+
} else if (isProcessableValue(asString)) {
|
|
1722
|
+
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1710
1723
|
}
|
|
1711
1724
|
} else {
|
|
1712
|
-
if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {
|
|
1713
|
-
throw new Error(noComponentSelectorMessage);
|
|
1714
|
-
}
|
|
1715
1725
|
|
|
1716
1726
|
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1717
1727
|
for (var _i = 0; _i < value.length; _i++) {
|
|
1718
1728
|
if (isProcessableValue(value[_i])) {
|
|
1719
|
-
string += processStyleName(
|
|
1729
|
+
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1720
1730
|
}
|
|
1721
1731
|
}
|
|
1722
1732
|
} else {
|
|
1723
1733
|
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1724
1734
|
|
|
1725
|
-
switch (
|
|
1735
|
+
switch (key) {
|
|
1726
1736
|
case 'animation':
|
|
1727
1737
|
case 'animationName':
|
|
1728
1738
|
{
|
|
1729
|
-
string += processStyleName(
|
|
1739
|
+
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1730
1740
|
break;
|
|
1731
1741
|
}
|
|
1732
1742
|
|
|
1733
1743
|
default:
|
|
1734
1744
|
{
|
|
1735
1745
|
|
|
1736
|
-
string +=
|
|
1746
|
+
string += key + "{" + interpolated + "}";
|
|
1737
1747
|
}
|
|
1738
1748
|
}
|
|
1739
1749
|
}
|
|
@@ -1744,12 +1754,11 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1744
1754
|
return string;
|
|
1745
1755
|
}
|
|
1746
1756
|
|
|
1747
|
-
var labelPattern = /label:\s*([^\s
|
|
1757
|
+
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
|
|
1748
1758
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1749
1759
|
|
|
1750
|
-
|
|
1751
1760
|
var cursor;
|
|
1752
|
-
|
|
1761
|
+
function serializeStyles(args, registered, mergedProps) {
|
|
1753
1762
|
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1754
1763
|
return args[0];
|
|
1755
1764
|
}
|
|
@@ -1763,8 +1772,9 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1763
1772
|
stringMode = false;
|
|
1764
1773
|
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1765
1774
|
} else {
|
|
1775
|
+
var asTemplateStringsArr = strings;
|
|
1766
1776
|
|
|
1767
|
-
styles +=
|
|
1777
|
+
styles += asTemplateStringsArr[0];
|
|
1768
1778
|
} // we start at 1 since we've already handled the first arg
|
|
1769
1779
|
|
|
1770
1780
|
|
|
@@ -1772,10 +1782,11 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1772
1782
|
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1773
1783
|
|
|
1774
1784
|
if (stringMode) {
|
|
1785
|
+
var templateStringsArr = strings;
|
|
1775
1786
|
|
|
1776
|
-
styles +=
|
|
1787
|
+
styles += templateStringsArr[i];
|
|
1777
1788
|
}
|
|
1778
|
-
}
|
|
1789
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1779
1790
|
|
|
1780
1791
|
|
|
1781
1792
|
labelPattern.lastIndex = 0;
|
|
@@ -1783,8 +1794,7 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1783
1794
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1784
1795
|
|
|
1785
1796
|
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1786
|
-
identifierName += '-' +
|
|
1787
|
-
match[1];
|
|
1797
|
+
identifierName += '-' + match[1];
|
|
1788
1798
|
}
|
|
1789
1799
|
|
|
1790
1800
|
var name = murmur2(styles) + identifierName;
|
|
@@ -1794,7 +1804,7 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1794
1804
|
styles: styles,
|
|
1795
1805
|
next: cursor
|
|
1796
1806
|
};
|
|
1797
|
-
}
|
|
1807
|
+
}
|
|
1798
1808
|
|
|
1799
1809
|
var isBrowser$1 = typeof document !== 'undefined';
|
|
1800
1810
|
|
|
@@ -1806,9 +1816,8 @@ var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion'
|
|
|
1806
1816
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$1 ? syncFallback : useInsertionEffect || syncFallback;
|
|
1807
1817
|
|
|
1808
1818
|
var isBrowser = typeof document !== 'undefined';
|
|
1809
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
1810
1819
|
|
|
1811
|
-
var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1820
|
+
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1812
1821
|
// because this module is primarily intended for the browser and node
|
|
1813
1822
|
// but it's also required in react native and similar environments sometimes
|
|
1814
1823
|
// and we could have a special build just for that
|
|
@@ -1821,7 +1830,6 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
1821
1830
|
EmotionCacheContext.Provider;
|
|
1822
1831
|
|
|
1823
1832
|
var withEmotionCache = function withEmotionCache(func) {
|
|
1824
|
-
// $FlowFixMe
|
|
1825
1833
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
1826
1834
|
// the cache will never be null in the browser
|
|
1827
1835
|
var cache = useContext(EmotionCacheContext);
|
|
@@ -1843,7 +1851,7 @@ if (!isBrowser) {
|
|
|
1843
1851
|
cache = createCache({
|
|
1844
1852
|
key: 'css'
|
|
1845
1853
|
});
|
|
1846
|
-
return /*#__PURE__*/createElement(EmotionCacheContext.Provider, {
|
|
1854
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
|
|
1847
1855
|
value: cache
|
|
1848
1856
|
}, func(props, cache));
|
|
1849
1857
|
} else {
|
|
@@ -1853,20 +1861,22 @@ if (!isBrowser) {
|
|
|
1853
1861
|
};
|
|
1854
1862
|
}
|
|
1855
1863
|
|
|
1856
|
-
var ThemeContext = /* #__PURE__ */createContext({});
|
|
1864
|
+
var ThemeContext = /* #__PURE__ */React.createContext({});
|
|
1865
|
+
|
|
1866
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1857
1867
|
|
|
1858
1868
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
1859
1869
|
var createEmotionProps = function createEmotionProps(type, props) {
|
|
1860
1870
|
|
|
1861
1871
|
var newProps = {};
|
|
1862
1872
|
|
|
1863
|
-
for (var
|
|
1864
|
-
if (
|
|
1865
|
-
newProps[
|
|
1873
|
+
for (var _key in props) {
|
|
1874
|
+
if (hasOwn.call(props, _key)) {
|
|
1875
|
+
newProps[_key] = props[_key];
|
|
1866
1876
|
}
|
|
1867
1877
|
}
|
|
1868
1878
|
|
|
1869
|
-
newProps[typePropName] = type; //
|
|
1879
|
+
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
|
|
1870
1880
|
|
|
1871
1881
|
return newProps;
|
|
1872
1882
|
};
|
|
@@ -1891,7 +1901,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
1891
1901
|
next = next.next;
|
|
1892
1902
|
}
|
|
1893
1903
|
|
|
1894
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1904
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1895
1905
|
__html: rules
|
|
1896
1906
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
1897
1907
|
}
|
|
@@ -1918,47 +1928,58 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
1918
1928
|
className = props.className + " ";
|
|
1919
1929
|
}
|
|
1920
1930
|
|
|
1921
|
-
var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));
|
|
1931
|
+
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
|
1922
1932
|
|
|
1923
1933
|
className += cache.key + "-" + serialized.name;
|
|
1924
1934
|
var newProps = {};
|
|
1925
1935
|
|
|
1926
|
-
for (var
|
|
1927
|
-
if (
|
|
1928
|
-
newProps[
|
|
1936
|
+
for (var _key2 in props) {
|
|
1937
|
+
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (true )) {
|
|
1938
|
+
newProps[_key2] = props[_key2];
|
|
1929
1939
|
}
|
|
1930
1940
|
}
|
|
1931
1941
|
|
|
1932
|
-
newProps.ref = ref;
|
|
1933
1942
|
newProps.className = className;
|
|
1934
|
-
|
|
1943
|
+
|
|
1944
|
+
if (ref) {
|
|
1945
|
+
newProps.ref = ref;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
|
1935
1949
|
cache: cache,
|
|
1936
1950
|
serialized: serialized,
|
|
1937
1951
|
isStringTag: typeof WrappedComponent === 'string'
|
|
1938
|
-
}), /*#__PURE__*/createElement(WrappedComponent, newProps));
|
|
1952
|
+
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
|
1939
1953
|
});
|
|
1940
1954
|
|
|
1955
|
+
var Emotion$1 = Emotion;
|
|
1956
|
+
|
|
1941
1957
|
var jsx = function jsx(type, props) {
|
|
1958
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1942
1959
|
var args = arguments;
|
|
1943
1960
|
|
|
1944
|
-
if (props == null || !
|
|
1945
|
-
|
|
1946
|
-
return createElement.apply(undefined, args);
|
|
1961
|
+
if (props == null || !hasOwn.call(props, 'css')) {
|
|
1962
|
+
return React.createElement.apply(undefined, args);
|
|
1947
1963
|
}
|
|
1948
1964
|
|
|
1949
1965
|
var argsLength = args.length;
|
|
1950
1966
|
var createElementArgArray = new Array(argsLength);
|
|
1951
|
-
createElementArgArray[0] = Emotion;
|
|
1967
|
+
createElementArgArray[0] = Emotion$1;
|
|
1952
1968
|
createElementArgArray[1] = createEmotionProps(type, props);
|
|
1953
1969
|
|
|
1954
1970
|
for (var i = 2; i < argsLength; i++) {
|
|
1955
1971
|
createElementArgArray[i] = args[i];
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1972
|
+
}
|
|
1958
1973
|
|
|
1959
|
-
return createElement.apply(null, createElementArgArray);
|
|
1974
|
+
return React.createElement.apply(null, createElementArgArray);
|
|
1960
1975
|
};
|
|
1961
1976
|
|
|
1977
|
+
(function (_jsx) {
|
|
1978
|
+
var JSX;
|
|
1979
|
+
|
|
1980
|
+
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
1981
|
+
})(jsx || (jsx = {}));
|
|
1982
|
+
|
|
1962
1983
|
function css$2() {
|
|
1963
1984
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1964
1985
|
args[_key] = arguments[_key];
|
|
@@ -1967,10 +1988,9 @@ function css$2() {
|
|
|
1967
1988
|
return serializeStyles(args);
|
|
1968
1989
|
}
|
|
1969
1990
|
|
|
1970
|
-
|
|
1991
|
+
function keyframes() {
|
|
1971
1992
|
var insertable = css$2.apply(void 0, arguments);
|
|
1972
|
-
var name = "animation-" + insertable.name;
|
|
1973
|
-
|
|
1993
|
+
var name = "animation-" + insertable.name;
|
|
1974
1994
|
return {
|
|
1975
1995
|
name: name,
|
|
1976
1996
|
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
@@ -1979,7 +1999,7 @@ var keyframes = function keyframes() {
|
|
|
1979
1999
|
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
1980
2000
|
}
|
|
1981
2001
|
};
|
|
1982
|
-
}
|
|
2002
|
+
}
|
|
1983
2003
|
|
|
1984
2004
|
var classnames = function classnames(args) {
|
|
1985
2005
|
var len = args.length;
|
|
@@ -2062,7 +2082,7 @@ var Insertion = function Insertion(_ref) {
|
|
|
2062
2082
|
if (!isBrowser && rules.length !== 0) {
|
|
2063
2083
|
var _ref2;
|
|
2064
2084
|
|
|
2065
|
-
return /*#__PURE__*/createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
2085
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
2066
2086
|
return serialized.name;
|
|
2067
2087
|
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2068
2088
|
__html: rules
|
|
@@ -2073,13 +2093,9 @@ var Insertion = function Insertion(_ref) {
|
|
|
2073
2093
|
};
|
|
2074
2094
|
|
|
2075
2095
|
var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
2076
|
-
var hasRendered = false;
|
|
2077
2096
|
var serializedArr = [];
|
|
2078
2097
|
|
|
2079
2098
|
var css = function css() {
|
|
2080
|
-
if (hasRendered && "production" !== 'production') {
|
|
2081
|
-
throw new Error('css can only be used during render');
|
|
2082
|
-
}
|
|
2083
2099
|
|
|
2084
2100
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2085
2101
|
args[_key] = arguments[_key];
|
|
@@ -2093,9 +2109,6 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2093
2109
|
};
|
|
2094
2110
|
|
|
2095
2111
|
var cx = function cx() {
|
|
2096
|
-
if (hasRendered && "production" !== 'production') {
|
|
2097
|
-
throw new Error('cx can only be used during render');
|
|
2098
|
-
}
|
|
2099
2112
|
|
|
2100
2113
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2101
2114
|
args[_key2] = arguments[_key2];
|
|
@@ -2107,256 +2120,449 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2107
2120
|
var content = {
|
|
2108
2121
|
css: css,
|
|
2109
2122
|
cx: cx,
|
|
2110
|
-
theme: useContext(ThemeContext)
|
|
2123
|
+
theme: React.useContext(ThemeContext)
|
|
2111
2124
|
};
|
|
2112
2125
|
var ele = props.children(content);
|
|
2113
|
-
|
|
2114
|
-
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Insertion, {
|
|
2126
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
2115
2127
|
cache: cache,
|
|
2116
2128
|
serializedArr: serializedArr
|
|
2117
2129
|
}), ele);
|
|
2118
2130
|
});
|
|
2119
2131
|
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
if (node == null) {
|
|
2125
|
-
return window;
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
if (!isWindow(node)) {
|
|
2129
|
-
const ownerDocument = node.ownerDocument;
|
|
2130
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
2131
|
-
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Custom positioning reference element.
|
|
2134
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
2135
|
+
*/
|
|
2132
2136
|
|
|
2133
|
-
|
|
2137
|
+
const min = Math.min;
|
|
2138
|
+
const max = Math.max;
|
|
2139
|
+
const round = Math.round;
|
|
2140
|
+
const floor = Math.floor;
|
|
2141
|
+
const createCoords = v => ({
|
|
2142
|
+
x: v,
|
|
2143
|
+
y: v
|
|
2144
|
+
});
|
|
2145
|
+
function rectToClientRect(rect) {
|
|
2146
|
+
const {
|
|
2147
|
+
x,
|
|
2148
|
+
y,
|
|
2149
|
+
width,
|
|
2150
|
+
height
|
|
2151
|
+
} = rect;
|
|
2152
|
+
return {
|
|
2153
|
+
width,
|
|
2154
|
+
height,
|
|
2155
|
+
top: y,
|
|
2156
|
+
left: x,
|
|
2157
|
+
right: x + width,
|
|
2158
|
+
bottom: y + height,
|
|
2159
|
+
x,
|
|
2160
|
+
y
|
|
2161
|
+
};
|
|
2134
2162
|
}
|
|
2135
2163
|
|
|
2136
|
-
function
|
|
2137
|
-
return
|
|
2164
|
+
function hasWindow() {
|
|
2165
|
+
return typeof window !== 'undefined';
|
|
2138
2166
|
}
|
|
2139
|
-
|
|
2140
2167
|
function getNodeName(node) {
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
function getUAString() {
|
|
2145
|
-
const uaData = navigator.userAgentData;
|
|
2146
|
-
|
|
2147
|
-
if (uaData && Array.isArray(uaData.brands)) {
|
|
2148
|
-
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
|
2168
|
+
if (isNode(node)) {
|
|
2169
|
+
return (node.nodeName || '').toLowerCase();
|
|
2149
2170
|
}
|
|
2150
|
-
|
|
2151
|
-
|
|
2171
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
2172
|
+
// returning `#document` an infinite loop won't occur.
|
|
2173
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
2174
|
+
return '#document';
|
|
2152
2175
|
}
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
return
|
|
2176
|
+
function getWindow(node) {
|
|
2177
|
+
var _node$ownerDocument;
|
|
2178
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
2156
2179
|
}
|
|
2157
|
-
function
|
|
2158
|
-
|
|
2180
|
+
function getDocumentElement(node) {
|
|
2181
|
+
var _ref;
|
|
2182
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
2159
2183
|
}
|
|
2160
2184
|
function isNode(value) {
|
|
2161
|
-
|
|
2185
|
+
if (!hasWindow()) {
|
|
2186
|
+
return false;
|
|
2187
|
+
}
|
|
2188
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
2162
2189
|
}
|
|
2163
|
-
function
|
|
2164
|
-
|
|
2165
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
2190
|
+
function isElement(value) {
|
|
2191
|
+
if (!hasWindow()) {
|
|
2166
2192
|
return false;
|
|
2167
2193
|
}
|
|
2168
|
-
|
|
2169
|
-
const OwnElement = getWindow(node).ShadowRoot;
|
|
2170
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
2194
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
2171
2195
|
}
|
|
2196
|
+
function isHTMLElement(value) {
|
|
2197
|
+
if (!hasWindow()) {
|
|
2198
|
+
return false;
|
|
2199
|
+
}
|
|
2200
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
2201
|
+
}
|
|
2202
|
+
function isShadowRoot(value) {
|
|
2203
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
2204
|
+
return false;
|
|
2205
|
+
}
|
|
2206
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
2207
|
+
}
|
|
2208
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
2172
2209
|
function isOverflowElement(element) {
|
|
2173
|
-
// Firefox wants us to check `-x` and `-y` variations as well
|
|
2174
2210
|
const {
|
|
2175
2211
|
overflow,
|
|
2176
2212
|
overflowX,
|
|
2177
2213
|
overflowY,
|
|
2178
2214
|
display
|
|
2179
2215
|
} = getComputedStyle$1(element);
|
|
2180
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !
|
|
2216
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
2181
2217
|
}
|
|
2182
|
-
function
|
|
2183
|
-
|
|
2184
|
-
return
|
|
2185
|
-
// • Always-visible scrollbar or not
|
|
2186
|
-
// • Width of <html>, etc.
|
|
2187
|
-
// const vV = win.visualViewport;
|
|
2188
|
-
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
|
2218
|
+
function isWebKit() {
|
|
2219
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
2220
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
2189
2221
|
}
|
|
2222
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
2190
2223
|
function isLastTraversableNode(node) {
|
|
2191
|
-
return
|
|
2224
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
2192
2225
|
}
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
includeScale = false;
|
|
2226
|
+
function getComputedStyle$1(element) {
|
|
2227
|
+
return getWindow(element).getComputedStyle(element);
|
|
2228
|
+
}
|
|
2229
|
+
function getParentNode(node) {
|
|
2230
|
+
if (getNodeName(node) === 'html') {
|
|
2231
|
+
return node;
|
|
2200
2232
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2233
|
+
const result =
|
|
2234
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
2235
|
+
node.assignedSlot ||
|
|
2236
|
+
// DOM Element detected.
|
|
2237
|
+
node.parentNode ||
|
|
2238
|
+
// ShadowRoot detected.
|
|
2239
|
+
isShadowRoot(node) && node.host ||
|
|
2240
|
+
// Fallback.
|
|
2241
|
+
getDocumentElement(node);
|
|
2242
|
+
return isShadowRoot(result) ? result.host : result;
|
|
2243
|
+
}
|
|
2244
|
+
function getNearestOverflowAncestor(node) {
|
|
2245
|
+
const parentNode = getParentNode(node);
|
|
2246
|
+
if (isLastTraversableNode(parentNode)) {
|
|
2247
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
2204
2248
|
}
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2249
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
2250
|
+
return parentNode;
|
|
2251
|
+
}
|
|
2252
|
+
return getNearestOverflowAncestor(parentNode);
|
|
2253
|
+
}
|
|
2254
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
2255
|
+
var _node$ownerDocument2;
|
|
2256
|
+
if (list === void 0) {
|
|
2257
|
+
list = [];
|
|
2258
|
+
}
|
|
2259
|
+
if (traverseIframes === void 0) {
|
|
2260
|
+
traverseIframes = true;
|
|
2261
|
+
}
|
|
2262
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
2263
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
2264
|
+
const win = getWindow(scrollableAncestor);
|
|
2265
|
+
if (isBody) {
|
|
2266
|
+
const frameElement = getFrameElement(win);
|
|
2267
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
2213
2268
|
}
|
|
2269
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
2270
|
+
}
|
|
2271
|
+
function getFrameElement(win) {
|
|
2272
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
2273
|
+
}
|
|
2214
2274
|
|
|
2215
|
-
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2275
|
+
function getCssDimensions(element) {
|
|
2276
|
+
const css = getComputedStyle$1(element);
|
|
2277
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
2278
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
2279
|
+
let width = parseFloat(css.width) || 0;
|
|
2280
|
+
let height = parseFloat(css.height) || 0;
|
|
2281
|
+
const hasOffset = isHTMLElement(element);
|
|
2282
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
2283
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
2284
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
2285
|
+
if (shouldFallback) {
|
|
2286
|
+
width = offsetWidth;
|
|
2287
|
+
height = offsetHeight;
|
|
2288
|
+
}
|
|
2221
2289
|
return {
|
|
2222
2290
|
width,
|
|
2223
2291
|
height,
|
|
2224
|
-
|
|
2225
|
-
right: x + width,
|
|
2226
|
-
bottom: y + height,
|
|
2227
|
-
left: x,
|
|
2228
|
-
x,
|
|
2229
|
-
y
|
|
2292
|
+
$: shouldFallback
|
|
2230
2293
|
};
|
|
2231
2294
|
}
|
|
2232
2295
|
|
|
2233
|
-
function
|
|
2234
|
-
return (
|
|
2296
|
+
function unwrapElement(element) {
|
|
2297
|
+
return !isElement(element) ? element.contextElement : element;
|
|
2235
2298
|
}
|
|
2236
2299
|
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2239
|
-
|
|
2300
|
+
function getScale(element) {
|
|
2301
|
+
const domElement = unwrapElement(element);
|
|
2302
|
+
if (!isHTMLElement(domElement)) {
|
|
2303
|
+
return createCoords(1);
|
|
2240
2304
|
}
|
|
2305
|
+
const rect = domElement.getBoundingClientRect();
|
|
2306
|
+
const {
|
|
2307
|
+
width,
|
|
2308
|
+
height,
|
|
2309
|
+
$
|
|
2310
|
+
} = getCssDimensions(domElement);
|
|
2311
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
2312
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
2241
2313
|
|
|
2242
|
-
|
|
2243
|
-
node.assignedSlot || // DOM Element detected
|
|
2244
|
-
node.parentNode || ( // ShadowRoot detected
|
|
2245
|
-
isShadowRoot(node) ? node.host : null) || // Fallback
|
|
2246
|
-
getDocumentElement(node);
|
|
2247
|
-
return isShadowRoot(result) ? result.host : result;
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
function getNearestOverflowAncestor(node) {
|
|
2251
|
-
const parentNode = getParentNode(node);
|
|
2314
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
2252
2315
|
|
|
2253
|
-
if (
|
|
2254
|
-
|
|
2255
|
-
|
|
2316
|
+
if (!x || !Number.isFinite(x)) {
|
|
2317
|
+
x = 1;
|
|
2318
|
+
}
|
|
2319
|
+
if (!y || !Number.isFinite(y)) {
|
|
2320
|
+
y = 1;
|
|
2256
2321
|
}
|
|
2322
|
+
return {
|
|
2323
|
+
x,
|
|
2324
|
+
y
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2257
2327
|
|
|
2258
|
-
|
|
2259
|
-
|
|
2328
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
2329
|
+
function getVisualOffsets(element) {
|
|
2330
|
+
const win = getWindow(element);
|
|
2331
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
2332
|
+
return noOffsets;
|
|
2260
2333
|
}
|
|
2334
|
+
return {
|
|
2335
|
+
x: win.visualViewport.offsetLeft,
|
|
2336
|
+
y: win.visualViewport.offsetTop
|
|
2337
|
+
};
|
|
2338
|
+
}
|
|
2339
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
2340
|
+
{
|
|
2341
|
+
return false;
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2261
2344
|
|
|
2262
|
-
|
|
2345
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
2346
|
+
if (includeScale === void 0) {
|
|
2347
|
+
includeScale = false;
|
|
2348
|
+
}
|
|
2349
|
+
const clientRect = element.getBoundingClientRect();
|
|
2350
|
+
const domElement = unwrapElement(element);
|
|
2351
|
+
let scale = createCoords(1);
|
|
2352
|
+
if (includeScale) {
|
|
2353
|
+
{
|
|
2354
|
+
scale = getScale(element);
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
const visualOffsets = shouldAddVisualOffsets() ? getVisualOffsets(domElement) : createCoords(0);
|
|
2358
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
2359
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
2360
|
+
let width = clientRect.width / scale.x;
|
|
2361
|
+
let height = clientRect.height / scale.y;
|
|
2362
|
+
if (domElement) {
|
|
2363
|
+
const win = getWindow(domElement);
|
|
2364
|
+
const offsetWin = offsetParent;
|
|
2365
|
+
let currentWin = win;
|
|
2366
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
2367
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
2368
|
+
const iframeScale = getScale(currentIFrame);
|
|
2369
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
2370
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
2371
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
2372
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
2373
|
+
x *= iframeScale.x;
|
|
2374
|
+
y *= iframeScale.y;
|
|
2375
|
+
width *= iframeScale.x;
|
|
2376
|
+
height *= iframeScale.y;
|
|
2377
|
+
x += left;
|
|
2378
|
+
y += top;
|
|
2379
|
+
currentWin = getWindow(currentIFrame);
|
|
2380
|
+
currentIFrame = getFrameElement(currentWin);
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
return rectToClientRect({
|
|
2384
|
+
width,
|
|
2385
|
+
height,
|
|
2386
|
+
x,
|
|
2387
|
+
y
|
|
2388
|
+
});
|
|
2263
2389
|
}
|
|
2264
2390
|
|
|
2265
|
-
function
|
|
2266
|
-
|
|
2391
|
+
function rectsAreEqual(a, b) {
|
|
2392
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
2393
|
+
}
|
|
2267
2394
|
|
|
2268
|
-
|
|
2269
|
-
|
|
2395
|
+
// https://samthor.au/2021/observing-dom/
|
|
2396
|
+
function observeMove(element, onMove) {
|
|
2397
|
+
let io = null;
|
|
2398
|
+
let timeoutId;
|
|
2399
|
+
const root = getDocumentElement(element);
|
|
2400
|
+
function cleanup() {
|
|
2401
|
+
var _io;
|
|
2402
|
+
clearTimeout(timeoutId);
|
|
2403
|
+
(_io = io) == null || _io.disconnect();
|
|
2404
|
+
io = null;
|
|
2270
2405
|
}
|
|
2406
|
+
function refresh(skip, threshold) {
|
|
2407
|
+
if (skip === void 0) {
|
|
2408
|
+
skip = false;
|
|
2409
|
+
}
|
|
2410
|
+
if (threshold === void 0) {
|
|
2411
|
+
threshold = 1;
|
|
2412
|
+
}
|
|
2413
|
+
cleanup();
|
|
2414
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
2415
|
+
const {
|
|
2416
|
+
left,
|
|
2417
|
+
top,
|
|
2418
|
+
width,
|
|
2419
|
+
height
|
|
2420
|
+
} = elementRectForRootMargin;
|
|
2421
|
+
if (!skip) {
|
|
2422
|
+
onMove();
|
|
2423
|
+
}
|
|
2424
|
+
if (!width || !height) {
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
const insetTop = floor(top);
|
|
2428
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
2429
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
2430
|
+
const insetLeft = floor(left);
|
|
2431
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
2432
|
+
const options = {
|
|
2433
|
+
rootMargin,
|
|
2434
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
2435
|
+
};
|
|
2436
|
+
let isFirstUpdate = true;
|
|
2437
|
+
function handleObserve(entries) {
|
|
2438
|
+
const ratio = entries[0].intersectionRatio;
|
|
2439
|
+
if (ratio !== threshold) {
|
|
2440
|
+
if (!isFirstUpdate) {
|
|
2441
|
+
return refresh();
|
|
2442
|
+
}
|
|
2443
|
+
if (!ratio) {
|
|
2444
|
+
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
2445
|
+
// to prevent an infinite loop of updates.
|
|
2446
|
+
timeoutId = setTimeout(() => {
|
|
2447
|
+
refresh(false, 1e-7);
|
|
2448
|
+
}, 1000);
|
|
2449
|
+
} else {
|
|
2450
|
+
refresh(false, ratio);
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
2454
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
2455
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
2456
|
+
// area anymore. This can happen under performance constraints. This may
|
|
2457
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
2458
|
+
// work around this, we compare the element's bounding rect now with
|
|
2459
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
2460
|
+
// are not equal then the element moved, so we refresh.
|
|
2461
|
+
refresh();
|
|
2462
|
+
}
|
|
2463
|
+
isFirstUpdate = false;
|
|
2464
|
+
}
|
|
2271
2465
|
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2466
|
+
// Older browsers don't support a `document` as the root and will throw an
|
|
2467
|
+
// error.
|
|
2468
|
+
try {
|
|
2469
|
+
io = new IntersectionObserver(handleObserve, {
|
|
2470
|
+
...options,
|
|
2471
|
+
// Handle <iframe>s
|
|
2472
|
+
root: root.ownerDocument
|
|
2473
|
+
});
|
|
2474
|
+
} catch (_e) {
|
|
2475
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
2476
|
+
}
|
|
2477
|
+
io.observe(element);
|
|
2478
|
+
}
|
|
2479
|
+
refresh(true);
|
|
2480
|
+
return cleanup;
|
|
2279
2481
|
}
|
|
2280
2482
|
|
|
2281
2483
|
/**
|
|
2282
2484
|
* Automatically updates the position of the floating element when necessary.
|
|
2485
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
2486
|
+
* visible on the screen.
|
|
2487
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
2488
|
+
* removed from the DOM or hidden from the screen.
|
|
2283
2489
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
2284
2490
|
*/
|
|
2285
2491
|
function autoUpdate(reference, floating, update, options) {
|
|
2286
2492
|
if (options === void 0) {
|
|
2287
2493
|
options = {};
|
|
2288
2494
|
}
|
|
2289
|
-
|
|
2290
2495
|
const {
|
|
2291
|
-
ancestorScroll
|
|
2496
|
+
ancestorScroll = true,
|
|
2292
2497
|
ancestorResize = true,
|
|
2293
|
-
elementResize =
|
|
2498
|
+
elementResize = typeof ResizeObserver === 'function',
|
|
2499
|
+
layoutShift = typeof IntersectionObserver === 'function',
|
|
2294
2500
|
animationFrame = false
|
|
2295
2501
|
} = options;
|
|
2296
|
-
const
|
|
2297
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(
|
|
2502
|
+
const referenceEl = unwrapElement(reference);
|
|
2503
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
2298
2504
|
ancestors.forEach(ancestor => {
|
|
2299
2505
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
2300
2506
|
passive: true
|
|
2301
2507
|
});
|
|
2302
2508
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
2303
2509
|
});
|
|
2304
|
-
|
|
2305
|
-
|
|
2510
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
2511
|
+
let reobserveFrame = -1;
|
|
2512
|
+
let resizeObserver = null;
|
|
2306
2513
|
if (elementResize) {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
if (
|
|
2310
|
-
update
|
|
2514
|
+
resizeObserver = new ResizeObserver(_ref => {
|
|
2515
|
+
let [firstEntry] = _ref;
|
|
2516
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
2517
|
+
// Prevent update loops when using the `size` middleware.
|
|
2518
|
+
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
2519
|
+
resizeObserver.unobserve(floating);
|
|
2520
|
+
cancelAnimationFrame(reobserveFrame);
|
|
2521
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
2522
|
+
var _resizeObserver;
|
|
2523
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
2524
|
+
});
|
|
2311
2525
|
}
|
|
2312
|
-
|
|
2313
|
-
initialUpdate = false;
|
|
2526
|
+
update();
|
|
2314
2527
|
});
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
if (!isElement(reference) && reference.contextElement && !animationFrame) {
|
|
2318
|
-
observer.observe(reference.contextElement);
|
|
2528
|
+
if (referenceEl && !animationFrame) {
|
|
2529
|
+
resizeObserver.observe(referenceEl);
|
|
2319
2530
|
}
|
|
2320
|
-
|
|
2321
|
-
observer.observe(floating);
|
|
2531
|
+
resizeObserver.observe(floating);
|
|
2322
2532
|
}
|
|
2323
|
-
|
|
2324
2533
|
let frameId;
|
|
2325
2534
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
2326
|
-
|
|
2327
2535
|
if (animationFrame) {
|
|
2328
2536
|
frameLoop();
|
|
2329
2537
|
}
|
|
2330
|
-
|
|
2331
2538
|
function frameLoop() {
|
|
2332
2539
|
const nextRefRect = getBoundingClientRect(reference);
|
|
2333
|
-
|
|
2334
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
2540
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
2335
2541
|
update();
|
|
2336
2542
|
}
|
|
2337
|
-
|
|
2338
2543
|
prevRefRect = nextRefRect;
|
|
2339
2544
|
frameId = requestAnimationFrame(frameLoop);
|
|
2340
2545
|
}
|
|
2341
|
-
|
|
2342
2546
|
update();
|
|
2343
2547
|
return () => {
|
|
2344
|
-
var
|
|
2345
|
-
|
|
2548
|
+
var _resizeObserver2;
|
|
2346
2549
|
ancestors.forEach(ancestor => {
|
|
2347
2550
|
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
2348
2551
|
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
2349
2552
|
});
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2553
|
+
cleanupIo == null || cleanupIo();
|
|
2554
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
2555
|
+
resizeObserver = null;
|
|
2353
2556
|
if (animationFrame) {
|
|
2354
2557
|
cancelAnimationFrame(frameId);
|
|
2355
2558
|
}
|
|
2356
2559
|
};
|
|
2357
2560
|
}
|
|
2358
2561
|
|
|
2359
|
-
var
|
|
2562
|
+
var isClient = typeof document !== 'undefined';
|
|
2563
|
+
|
|
2564
|
+
var noop$1 = function noop() {};
|
|
2565
|
+
var index = isClient ? useLayoutEffect : noop$1;
|
|
2360
2566
|
|
|
2361
2567
|
var _excluded$3 = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
2362
2568
|
// ==============================
|
|
@@ -6501,4 +6707,4 @@ var CreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6501
6707
|
});
|
|
6502
6708
|
|
|
6503
6709
|
export { CreatableSelect as C, Select as S, useCreatable as a, components as c, handleInputChange as h, useStateManager as u };
|
|
6504
|
-
//# sourceMappingURL=react-select-creatable.esm-
|
|
6710
|
+
//# sourceMappingURL=react-select-creatable.esm-opiJTCqo.js.map
|