@bigbinary/neetoui 8.3.30 → 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-eifA8CnA.js → index-Dv40T5Ly.js} +195 -169
- package/dist/cjs/{index-eifA8CnA.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-ITIifSw4.js → index-D6yXgUQN.js} +196 -170
- package/dist/{index-ITIifSw4.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/cjs/{react-select-creatable.esm-Bdv9YAMt.js → react-select-creatable.esm-lcdODVBz.js}
RENAMED
|
@@ -68,10 +68,9 @@ styleSheet.flush()
|
|
|
68
68
|
- empties the stylesheet of all its contents
|
|
69
69
|
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
function sheetForTag(tag) {
|
|
73
73
|
if (tag.sheet) {
|
|
74
|
-
// $FlowFixMe
|
|
75
74
|
return tag.sheet;
|
|
76
75
|
} // this weirdness brought to you by firefox
|
|
77
76
|
|
|
@@ -80,10 +79,13 @@ function sheetForTag(tag) {
|
|
|
80
79
|
|
|
81
80
|
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
82
81
|
if (document.styleSheets[i].ownerNode === tag) {
|
|
83
|
-
// $FlowFixMe
|
|
84
82
|
return document.styleSheets[i];
|
|
85
83
|
}
|
|
86
|
-
}
|
|
84
|
+
} // this function should always return with a value
|
|
85
|
+
// TS can't understand it though so we make it stop complaining here
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
return undefined;
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
function createStyleElement(options) {
|
|
@@ -124,7 +126,7 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
124
126
|
_this.tags.push(tag);
|
|
125
127
|
};
|
|
126
128
|
|
|
127
|
-
this.isSpeedy = options.speedy === undefined ?
|
|
129
|
+
this.isSpeedy = options.speedy === undefined ? true : options.speedy;
|
|
128
130
|
this.tags = [];
|
|
129
131
|
this.ctr = 0;
|
|
130
132
|
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
@@ -169,9 +171,10 @@ var StyleSheet = /*#__PURE__*/function () {
|
|
|
169
171
|
};
|
|
170
172
|
|
|
171
173
|
_proto.flush = function flush() {
|
|
172
|
-
// $FlowFixMe
|
|
173
174
|
this.tags.forEach(function (tag) {
|
|
174
|
-
|
|
175
|
+
var _tag$parentNode;
|
|
176
|
+
|
|
177
|
+
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
175
178
|
});
|
|
176
179
|
this.tags = [];
|
|
177
180
|
this.ctr = 0;
|
|
@@ -189,6 +192,7 @@ var RULESET = 'rule';
|
|
|
189
192
|
var DECLARATION = 'decl';
|
|
190
193
|
var IMPORT = '@import';
|
|
191
194
|
var KEYFRAMES = '@keyframes';
|
|
195
|
+
var LAYER = '@layer';
|
|
192
196
|
|
|
193
197
|
/**
|
|
194
198
|
* @param {number}
|
|
@@ -603,7 +607,7 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
|
|
|
603
607
|
// \0 }
|
|
604
608
|
case 0: case 125: scanning = 0;
|
|
605
609
|
// ;
|
|
606
|
-
case 59 + offset:
|
|
610
|
+
case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
|
|
607
611
|
if (property > 0 && (strlen(characters) - length))
|
|
608
612
|
append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
|
|
609
613
|
break
|
|
@@ -618,8 +622,8 @@ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, decl
|
|
|
618
622
|
parse(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
619
623
|
else
|
|
620
624
|
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
621
|
-
// d m s
|
|
622
|
-
case 100: case 109: case 115:
|
|
625
|
+
// d l m s
|
|
626
|
+
case 100: case 108: case 109: case 115:
|
|
623
627
|
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);
|
|
624
628
|
break
|
|
625
629
|
default:
|
|
@@ -738,6 +742,7 @@ function serialize (children, callback) {
|
|
|
738
742
|
*/
|
|
739
743
|
function stringify (element, index, children, callback) {
|
|
740
744
|
switch (element.type) {
|
|
745
|
+
case LAYER: if (element.children.length) break
|
|
741
746
|
case IMPORT: case DECLARATION: return element.return = element.return || element.value
|
|
742
747
|
case COMMENT: return ''
|
|
743
748
|
case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
|
|
@@ -777,11 +782,11 @@ function rulesheet (callback) {
|
|
|
777
782
|
}
|
|
778
783
|
|
|
779
784
|
var weakMemoize = function weakMemoize(func) {
|
|
780
|
-
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
781
785
|
var cache = new WeakMap();
|
|
782
786
|
return function (arg) {
|
|
783
787
|
if (cache.has(arg)) {
|
|
784
|
-
//
|
|
788
|
+
// Use non-null assertion because we just checked that the cache `has` it
|
|
789
|
+
// This allows us to remove `undefined` from the return value
|
|
785
790
|
return cache.get(arg);
|
|
786
791
|
}
|
|
787
792
|
|
|
@@ -799,6 +804,8 @@ function memoize(fn) {
|
|
|
799
804
|
};
|
|
800
805
|
}
|
|
801
806
|
|
|
807
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
808
|
+
|
|
802
809
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
803
810
|
var previous = 0;
|
|
804
811
|
var character = 0;
|
|
@@ -877,8 +884,8 @@ var compat = function compat(element) {
|
|
|
877
884
|
return;
|
|
878
885
|
}
|
|
879
886
|
|
|
880
|
-
var value = element.value
|
|
881
|
-
|
|
887
|
+
var value = element.value;
|
|
888
|
+
var parent = element.parent;
|
|
882
889
|
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
883
890
|
|
|
884
891
|
while (parent.type !== 'rule') {
|
|
@@ -1136,13 +1143,9 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
1136
1143
|
}
|
|
1137
1144
|
};
|
|
1138
1145
|
|
|
1139
|
-
var isBrowser$3 = typeof document !== 'undefined';
|
|
1140
1146
|
var getServerStylisCache = isBrowser$3 ? undefined : weakMemoize(function () {
|
|
1141
1147
|
return memoize(function () {
|
|
1142
|
-
|
|
1143
|
-
return function (name) {
|
|
1144
|
-
return cache[name];
|
|
1145
|
-
};
|
|
1148
|
+
return {};
|
|
1146
1149
|
});
|
|
1147
1150
|
});
|
|
1148
1151
|
var defaultStylisPlugins = [prefixer];
|
|
@@ -1168,6 +1171,7 @@ var createCache = function createCache(options) {
|
|
|
1168
1171
|
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
1169
1172
|
return;
|
|
1170
1173
|
}
|
|
1174
|
+
|
|
1171
1175
|
document.head.appendChild(node);
|
|
1172
1176
|
node.setAttribute('data-s', '');
|
|
1173
1177
|
});
|
|
@@ -1184,7 +1188,7 @@ var createCache = function createCache(options) {
|
|
|
1184
1188
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
1185
1189
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1186
1190
|
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1187
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1191
|
+
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1188
1192
|
|
|
1189
1193
|
for (var i = 1; i < attrib.length; i++) {
|
|
1190
1194
|
inserted[attrib[i]] = true;
|
|
@@ -1198,7 +1202,7 @@ var createCache = function createCache(options) {
|
|
|
1198
1202
|
|
|
1199
1203
|
var omnipresentPlugins = [compat, removeLabel];
|
|
1200
1204
|
|
|
1201
|
-
if (
|
|
1205
|
+
if (!getServerStylisCache) {
|
|
1202
1206
|
var currentSheet;
|
|
1203
1207
|
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
1204
1208
|
currentSheet.insert(rule);
|
|
@@ -1225,8 +1229,7 @@ var createCache = function createCache(options) {
|
|
|
1225
1229
|
|
|
1226
1230
|
var _stylis = function _stylis(styles) {
|
|
1227
1231
|
return serialize(compile(styles), _serializer);
|
|
1228
|
-
};
|
|
1229
|
-
|
|
1232
|
+
};
|
|
1230
1233
|
|
|
1231
1234
|
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1232
1235
|
|
|
@@ -1442,12 +1445,13 @@ function requireHoistNonReactStatics_cjs () {
|
|
|
1442
1445
|
requireHoistNonReactStatics_cjs();
|
|
1443
1446
|
|
|
1444
1447
|
var isBrowser$2 = typeof document !== 'undefined';
|
|
1448
|
+
|
|
1445
1449
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1446
1450
|
var rawClassName = '';
|
|
1447
1451
|
classNames.split(' ').forEach(function (className) {
|
|
1448
1452
|
if (registered[className] !== undefined) {
|
|
1449
1453
|
registeredStyles.push(registered[className] + ";");
|
|
1450
|
-
} else {
|
|
1454
|
+
} else if (className) {
|
|
1451
1455
|
rawClassName += className + " ";
|
|
1452
1456
|
}
|
|
1453
1457
|
});
|
|
@@ -1549,6 +1553,7 @@ function murmur2(str) {
|
|
|
1549
1553
|
|
|
1550
1554
|
var unitlessKeys = {
|
|
1551
1555
|
animationIterationCount: 1,
|
|
1556
|
+
aspectRatio: 1,
|
|
1552
1557
|
borderImageOutset: 1,
|
|
1553
1558
|
borderImageSlice: 1,
|
|
1554
1559
|
borderImageWidth: 1,
|
|
@@ -1580,6 +1585,7 @@ var unitlessKeys = {
|
|
|
1580
1585
|
opacity: 1,
|
|
1581
1586
|
order: 1,
|
|
1582
1587
|
orphans: 1,
|
|
1588
|
+
scale: 1,
|
|
1583
1589
|
tabSize: 1,
|
|
1584
1590
|
widows: 1,
|
|
1585
1591
|
zIndex: 1,
|
|
@@ -1636,16 +1642,16 @@ var processStyleValue = function processStyleValue(key, value) {
|
|
|
1636
1642
|
return value;
|
|
1637
1643
|
};
|
|
1638
1644
|
|
|
1639
|
-
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
1640
|
-
|
|
1641
1645
|
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1642
1646
|
if (interpolation == null) {
|
|
1643
1647
|
return '';
|
|
1644
1648
|
}
|
|
1645
1649
|
|
|
1646
|
-
|
|
1650
|
+
var componentSelector = interpolation;
|
|
1651
|
+
|
|
1652
|
+
if (componentSelector.__emotion_styles !== undefined) {
|
|
1647
1653
|
|
|
1648
|
-
return
|
|
1654
|
+
return componentSelector;
|
|
1649
1655
|
}
|
|
1650
1656
|
|
|
1651
1657
|
switch (typeof interpolation) {
|
|
@@ -1656,17 +1662,21 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1656
1662
|
|
|
1657
1663
|
case 'object':
|
|
1658
1664
|
{
|
|
1659
|
-
|
|
1665
|
+
var keyframes = interpolation;
|
|
1666
|
+
|
|
1667
|
+
if (keyframes.anim === 1) {
|
|
1660
1668
|
cursor = {
|
|
1661
|
-
name:
|
|
1662
|
-
styles:
|
|
1669
|
+
name: keyframes.name,
|
|
1670
|
+
styles: keyframes.styles,
|
|
1663
1671
|
next: cursor
|
|
1664
1672
|
};
|
|
1665
|
-
return
|
|
1673
|
+
return keyframes.name;
|
|
1666
1674
|
}
|
|
1667
1675
|
|
|
1668
|
-
|
|
1669
|
-
|
|
1676
|
+
var serializedStyles = interpolation;
|
|
1677
|
+
|
|
1678
|
+
if (serializedStyles.styles !== undefined) {
|
|
1679
|
+
var next = serializedStyles.next;
|
|
1670
1680
|
|
|
1671
1681
|
if (next !== undefined) {
|
|
1672
1682
|
// not the most efficient thing ever but this is a pretty rare case
|
|
@@ -1681,8 +1691,7 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1681
1691
|
}
|
|
1682
1692
|
}
|
|
1683
1693
|
|
|
1684
|
-
var styles =
|
|
1685
|
-
|
|
1694
|
+
var styles = serializedStyles.styles + ";";
|
|
1686
1695
|
return styles;
|
|
1687
1696
|
}
|
|
1688
1697
|
|
|
@@ -1703,12 +1712,14 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1703
1712
|
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1704
1713
|
|
|
1705
1714
|
|
|
1715
|
+
var asString = interpolation;
|
|
1716
|
+
|
|
1706
1717
|
if (registered == null) {
|
|
1707
|
-
return
|
|
1718
|
+
return asString;
|
|
1708
1719
|
}
|
|
1709
1720
|
|
|
1710
|
-
var cached = registered[
|
|
1711
|
-
return cached !== undefined ? cached :
|
|
1721
|
+
var cached = registered[asString];
|
|
1722
|
+
return cached !== undefined ? cached : asString;
|
|
1712
1723
|
}
|
|
1713
1724
|
|
|
1714
1725
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
@@ -1719,41 +1730,40 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1719
1730
|
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1720
1731
|
}
|
|
1721
1732
|
} else {
|
|
1722
|
-
for (var
|
|
1723
|
-
var value = obj[
|
|
1733
|
+
for (var key in obj) {
|
|
1734
|
+
var value = obj[key];
|
|
1724
1735
|
|
|
1725
1736
|
if (typeof value !== 'object') {
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
string +=
|
|
1737
|
+
var asString = value;
|
|
1738
|
+
|
|
1739
|
+
if (registered != null && registered[asString] !== undefined) {
|
|
1740
|
+
string += key + "{" + registered[asString] + "}";
|
|
1741
|
+
} else if (isProcessableValue(asString)) {
|
|
1742
|
+
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1730
1743
|
}
|
|
1731
1744
|
} else {
|
|
1732
|
-
if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {
|
|
1733
|
-
throw new Error(noComponentSelectorMessage);
|
|
1734
|
-
}
|
|
1735
1745
|
|
|
1736
1746
|
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1737
1747
|
for (var _i = 0; _i < value.length; _i++) {
|
|
1738
1748
|
if (isProcessableValue(value[_i])) {
|
|
1739
|
-
string += processStyleName(
|
|
1749
|
+
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1740
1750
|
}
|
|
1741
1751
|
}
|
|
1742
1752
|
} else {
|
|
1743
1753
|
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1744
1754
|
|
|
1745
|
-
switch (
|
|
1755
|
+
switch (key) {
|
|
1746
1756
|
case 'animation':
|
|
1747
1757
|
case 'animationName':
|
|
1748
1758
|
{
|
|
1749
|
-
string += processStyleName(
|
|
1759
|
+
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1750
1760
|
break;
|
|
1751
1761
|
}
|
|
1752
1762
|
|
|
1753
1763
|
default:
|
|
1754
1764
|
{
|
|
1755
1765
|
|
|
1756
|
-
string +=
|
|
1766
|
+
string += key + "{" + interpolated + "}";
|
|
1757
1767
|
}
|
|
1758
1768
|
}
|
|
1759
1769
|
}
|
|
@@ -1764,12 +1774,11 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1764
1774
|
return string;
|
|
1765
1775
|
}
|
|
1766
1776
|
|
|
1767
|
-
var labelPattern = /label:\s*([^\s
|
|
1777
|
+
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
|
|
1768
1778
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1769
1779
|
|
|
1770
|
-
|
|
1771
1780
|
var cursor;
|
|
1772
|
-
|
|
1781
|
+
function serializeStyles(args, registered, mergedProps) {
|
|
1773
1782
|
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1774
1783
|
return args[0];
|
|
1775
1784
|
}
|
|
@@ -1783,8 +1792,9 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1783
1792
|
stringMode = false;
|
|
1784
1793
|
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1785
1794
|
} else {
|
|
1795
|
+
var asTemplateStringsArr = strings;
|
|
1786
1796
|
|
|
1787
|
-
styles +=
|
|
1797
|
+
styles += asTemplateStringsArr[0];
|
|
1788
1798
|
} // we start at 1 since we've already handled the first arg
|
|
1789
1799
|
|
|
1790
1800
|
|
|
@@ -1792,10 +1802,11 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1792
1802
|
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1793
1803
|
|
|
1794
1804
|
if (stringMode) {
|
|
1805
|
+
var templateStringsArr = strings;
|
|
1795
1806
|
|
|
1796
|
-
styles +=
|
|
1807
|
+
styles += templateStringsArr[i];
|
|
1797
1808
|
}
|
|
1798
|
-
}
|
|
1809
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1799
1810
|
|
|
1800
1811
|
|
|
1801
1812
|
labelPattern.lastIndex = 0;
|
|
@@ -1803,8 +1814,7 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1803
1814
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1804
1815
|
|
|
1805
1816
|
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1806
|
-
identifierName += '-' +
|
|
1807
|
-
match[1];
|
|
1817
|
+
identifierName += '-' + match[1];
|
|
1808
1818
|
}
|
|
1809
1819
|
|
|
1810
1820
|
var name = murmur2(styles) + identifierName;
|
|
@@ -1814,7 +1824,7 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1814
1824
|
styles: styles,
|
|
1815
1825
|
next: cursor
|
|
1816
1826
|
};
|
|
1817
|
-
}
|
|
1827
|
+
}
|
|
1818
1828
|
|
|
1819
1829
|
var isBrowser$1 = typeof document !== 'undefined';
|
|
1820
1830
|
|
|
@@ -1826,9 +1836,8 @@ var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__na
|
|
|
1826
1836
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$1 ? syncFallback : useInsertionEffect || syncFallback;
|
|
1827
1837
|
|
|
1828
1838
|
var isBrowser = typeof document !== 'undefined';
|
|
1829
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
1830
1839
|
|
|
1831
|
-
var EmotionCacheContext = /* #__PURE__ */
|
|
1840
|
+
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1832
1841
|
// because this module is primarily intended for the browser and node
|
|
1833
1842
|
// but it's also required in react native and similar environments sometimes
|
|
1834
1843
|
// and we could have a special build just for that
|
|
@@ -1841,7 +1850,6 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
1841
1850
|
EmotionCacheContext.Provider;
|
|
1842
1851
|
|
|
1843
1852
|
var withEmotionCache = function withEmotionCache(func) {
|
|
1844
|
-
// $FlowFixMe
|
|
1845
1853
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
1846
1854
|
// the cache will never be null in the browser
|
|
1847
1855
|
var cache = React.useContext(EmotionCacheContext);
|
|
@@ -1863,7 +1871,7 @@ if (!isBrowser) {
|
|
|
1863
1871
|
cache = createCache({
|
|
1864
1872
|
key: 'css'
|
|
1865
1873
|
});
|
|
1866
|
-
return /*#__PURE__*/
|
|
1874
|
+
return /*#__PURE__*/React__namespace.createElement(EmotionCacheContext.Provider, {
|
|
1867
1875
|
value: cache
|
|
1868
1876
|
}, func(props, cache));
|
|
1869
1877
|
} else {
|
|
@@ -1873,20 +1881,22 @@ if (!isBrowser) {
|
|
|
1873
1881
|
};
|
|
1874
1882
|
}
|
|
1875
1883
|
|
|
1876
|
-
var ThemeContext = /* #__PURE__ */
|
|
1884
|
+
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
|
|
1885
|
+
|
|
1886
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1877
1887
|
|
|
1878
1888
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
1879
1889
|
var createEmotionProps = function createEmotionProps(type, props) {
|
|
1880
1890
|
|
|
1881
1891
|
var newProps = {};
|
|
1882
1892
|
|
|
1883
|
-
for (var
|
|
1884
|
-
if (
|
|
1885
|
-
newProps[
|
|
1893
|
+
for (var _key in props) {
|
|
1894
|
+
if (hasOwn.call(props, _key)) {
|
|
1895
|
+
newProps[_key] = props[_key];
|
|
1886
1896
|
}
|
|
1887
1897
|
}
|
|
1888
1898
|
|
|
1889
|
-
newProps[typePropName] = type; //
|
|
1899
|
+
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
|
|
1890
1900
|
|
|
1891
1901
|
return newProps;
|
|
1892
1902
|
};
|
|
@@ -1911,7 +1921,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
1911
1921
|
next = next.next;
|
|
1912
1922
|
}
|
|
1913
1923
|
|
|
1914
|
-
return /*#__PURE__*/
|
|
1924
|
+
return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1915
1925
|
__html: rules
|
|
1916
1926
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
1917
1927
|
}
|
|
@@ -1938,47 +1948,58 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
1938
1948
|
className = props.className + " ";
|
|
1939
1949
|
}
|
|
1940
1950
|
|
|
1941
|
-
var serialized = serializeStyles(registeredStyles, undefined,
|
|
1951
|
+
var serialized = serializeStyles(registeredStyles, undefined, React__namespace.useContext(ThemeContext));
|
|
1942
1952
|
|
|
1943
1953
|
className += cache.key + "-" + serialized.name;
|
|
1944
1954
|
var newProps = {};
|
|
1945
1955
|
|
|
1946
|
-
for (var
|
|
1947
|
-
if (
|
|
1948
|
-
newProps[
|
|
1956
|
+
for (var _key2 in props) {
|
|
1957
|
+
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (true )) {
|
|
1958
|
+
newProps[_key2] = props[_key2];
|
|
1949
1959
|
}
|
|
1950
1960
|
}
|
|
1951
1961
|
|
|
1952
|
-
newProps.ref = ref;
|
|
1953
1962
|
newProps.className = className;
|
|
1954
|
-
|
|
1963
|
+
|
|
1964
|
+
if (ref) {
|
|
1965
|
+
newProps.ref = ref;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion$1, {
|
|
1955
1969
|
cache: cache,
|
|
1956
1970
|
serialized: serialized,
|
|
1957
1971
|
isStringTag: typeof WrappedComponent === 'string'
|
|
1958
|
-
}), /*#__PURE__*/
|
|
1972
|
+
}), /*#__PURE__*/React__namespace.createElement(WrappedComponent, newProps));
|
|
1959
1973
|
});
|
|
1960
1974
|
|
|
1975
|
+
var Emotion$1 = Emotion;
|
|
1976
|
+
|
|
1961
1977
|
var jsx = function jsx(type, props) {
|
|
1978
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1962
1979
|
var args = arguments;
|
|
1963
1980
|
|
|
1964
|
-
if (props == null || !
|
|
1965
|
-
|
|
1966
|
-
return React.createElement.apply(undefined, args);
|
|
1981
|
+
if (props == null || !hasOwn.call(props, 'css')) {
|
|
1982
|
+
return React__namespace.createElement.apply(undefined, args);
|
|
1967
1983
|
}
|
|
1968
1984
|
|
|
1969
1985
|
var argsLength = args.length;
|
|
1970
1986
|
var createElementArgArray = new Array(argsLength);
|
|
1971
|
-
createElementArgArray[0] = Emotion;
|
|
1987
|
+
createElementArgArray[0] = Emotion$1;
|
|
1972
1988
|
createElementArgArray[1] = createEmotionProps(type, props);
|
|
1973
1989
|
|
|
1974
1990
|
for (var i = 2; i < argsLength; i++) {
|
|
1975
1991
|
createElementArgArray[i] = args[i];
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1992
|
+
}
|
|
1978
1993
|
|
|
1979
|
-
return
|
|
1994
|
+
return React__namespace.createElement.apply(null, createElementArgArray);
|
|
1980
1995
|
};
|
|
1981
1996
|
|
|
1997
|
+
(function (_jsx) {
|
|
1998
|
+
var JSX;
|
|
1999
|
+
|
|
2000
|
+
(function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
2001
|
+
})(jsx || (jsx = {}));
|
|
2002
|
+
|
|
1982
2003
|
function css$2() {
|
|
1983
2004
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1984
2005
|
args[_key] = arguments[_key];
|
|
@@ -1987,10 +2008,9 @@ function css$2() {
|
|
|
1987
2008
|
return serializeStyles(args);
|
|
1988
2009
|
}
|
|
1989
2010
|
|
|
1990
|
-
|
|
2011
|
+
function keyframes() {
|
|
1991
2012
|
var insertable = css$2.apply(void 0, arguments);
|
|
1992
|
-
var name = "animation-" + insertable.name;
|
|
1993
|
-
|
|
2013
|
+
var name = "animation-" + insertable.name;
|
|
1994
2014
|
return {
|
|
1995
2015
|
name: name,
|
|
1996
2016
|
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
@@ -1999,7 +2019,7 @@ var keyframes = function keyframes() {
|
|
|
1999
2019
|
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
2000
2020
|
}
|
|
2001
2021
|
};
|
|
2002
|
-
}
|
|
2022
|
+
}
|
|
2003
2023
|
|
|
2004
2024
|
var classnames = function classnames(args) {
|
|
2005
2025
|
var len = args.length;
|
|
@@ -2082,7 +2102,7 @@ var Insertion = function Insertion(_ref) {
|
|
|
2082
2102
|
if (!isBrowser && rules.length !== 0) {
|
|
2083
2103
|
var _ref2;
|
|
2084
2104
|
|
|
2085
|
-
return /*#__PURE__*/
|
|
2105
|
+
return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
2086
2106
|
return serialized.name;
|
|
2087
2107
|
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2088
2108
|
__html: rules
|
|
@@ -2093,13 +2113,9 @@ var Insertion = function Insertion(_ref) {
|
|
|
2093
2113
|
};
|
|
2094
2114
|
|
|
2095
2115
|
var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
2096
|
-
var hasRendered = false;
|
|
2097
2116
|
var serializedArr = [];
|
|
2098
2117
|
|
|
2099
2118
|
var css = function css() {
|
|
2100
|
-
if (hasRendered && "production" !== 'production') {
|
|
2101
|
-
throw new Error('css can only be used during render');
|
|
2102
|
-
}
|
|
2103
2119
|
|
|
2104
2120
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2105
2121
|
args[_key] = arguments[_key];
|
|
@@ -2113,9 +2129,6 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2113
2129
|
};
|
|
2114
2130
|
|
|
2115
2131
|
var cx = function cx() {
|
|
2116
|
-
if (hasRendered && "production" !== 'production') {
|
|
2117
|
-
throw new Error('cx can only be used during render');
|
|
2118
|
-
}
|
|
2119
2132
|
|
|
2120
2133
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2121
2134
|
args[_key2] = arguments[_key2];
|
|
@@ -2127,256 +2140,449 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2127
2140
|
var content = {
|
|
2128
2141
|
css: css,
|
|
2129
2142
|
cx: cx,
|
|
2130
|
-
theme:
|
|
2143
|
+
theme: React__namespace.useContext(ThemeContext)
|
|
2131
2144
|
};
|
|
2132
2145
|
var ele = props.children(content);
|
|
2133
|
-
|
|
2134
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
2146
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
|
|
2135
2147
|
cache: cache,
|
|
2136
2148
|
serializedArr: serializedArr
|
|
2137
2149
|
}), ele);
|
|
2138
2150
|
});
|
|
2139
2151
|
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
if (node == null) {
|
|
2145
|
-
return window;
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
if (!isWindow(node)) {
|
|
2149
|
-
const ownerDocument = node.ownerDocument;
|
|
2150
|
-
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
2151
|
-
}
|
|
2152
|
+
/**
|
|
2153
|
+
* Custom positioning reference element.
|
|
2154
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
2155
|
+
*/
|
|
2152
2156
|
|
|
2153
|
-
|
|
2157
|
+
const min = Math.min;
|
|
2158
|
+
const max = Math.max;
|
|
2159
|
+
const round = Math.round;
|
|
2160
|
+
const floor = Math.floor;
|
|
2161
|
+
const createCoords = v => ({
|
|
2162
|
+
x: v,
|
|
2163
|
+
y: v
|
|
2164
|
+
});
|
|
2165
|
+
function rectToClientRect(rect) {
|
|
2166
|
+
const {
|
|
2167
|
+
x,
|
|
2168
|
+
y,
|
|
2169
|
+
width,
|
|
2170
|
+
height
|
|
2171
|
+
} = rect;
|
|
2172
|
+
return {
|
|
2173
|
+
width,
|
|
2174
|
+
height,
|
|
2175
|
+
top: y,
|
|
2176
|
+
left: x,
|
|
2177
|
+
right: x + width,
|
|
2178
|
+
bottom: y + height,
|
|
2179
|
+
x,
|
|
2180
|
+
y
|
|
2181
|
+
};
|
|
2154
2182
|
}
|
|
2155
2183
|
|
|
2156
|
-
function
|
|
2157
|
-
return
|
|
2184
|
+
function hasWindow() {
|
|
2185
|
+
return typeof window !== 'undefined';
|
|
2158
2186
|
}
|
|
2159
|
-
|
|
2160
2187
|
function getNodeName(node) {
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
function getUAString() {
|
|
2165
|
-
const uaData = navigator.userAgentData;
|
|
2166
|
-
|
|
2167
|
-
if (uaData && Array.isArray(uaData.brands)) {
|
|
2168
|
-
return uaData.brands.map(item => item.brand + "/" + item.version).join(' ');
|
|
2188
|
+
if (isNode(node)) {
|
|
2189
|
+
return (node.nodeName || '').toLowerCase();
|
|
2169
2190
|
}
|
|
2170
|
-
|
|
2171
|
-
|
|
2191
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
2192
|
+
// returning `#document` an infinite loop won't occur.
|
|
2193
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
2194
|
+
return '#document';
|
|
2172
2195
|
}
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
return
|
|
2196
|
+
function getWindow(node) {
|
|
2197
|
+
var _node$ownerDocument;
|
|
2198
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
2176
2199
|
}
|
|
2177
|
-
function
|
|
2178
|
-
|
|
2200
|
+
function getDocumentElement(node) {
|
|
2201
|
+
var _ref;
|
|
2202
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
2179
2203
|
}
|
|
2180
2204
|
function isNode(value) {
|
|
2181
|
-
|
|
2205
|
+
if (!hasWindow()) {
|
|
2206
|
+
return false;
|
|
2207
|
+
}
|
|
2208
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
2182
2209
|
}
|
|
2183
|
-
function
|
|
2184
|
-
|
|
2185
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
2210
|
+
function isElement(value) {
|
|
2211
|
+
if (!hasWindow()) {
|
|
2186
2212
|
return false;
|
|
2187
2213
|
}
|
|
2188
|
-
|
|
2189
|
-
const OwnElement = getWindow(node).ShadowRoot;
|
|
2190
|
-
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
2214
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
2191
2215
|
}
|
|
2216
|
+
function isHTMLElement(value) {
|
|
2217
|
+
if (!hasWindow()) {
|
|
2218
|
+
return false;
|
|
2219
|
+
}
|
|
2220
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
2221
|
+
}
|
|
2222
|
+
function isShadowRoot(value) {
|
|
2223
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
2224
|
+
return false;
|
|
2225
|
+
}
|
|
2226
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
2227
|
+
}
|
|
2228
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
2192
2229
|
function isOverflowElement(element) {
|
|
2193
|
-
// Firefox wants us to check `-x` and `-y` variations as well
|
|
2194
2230
|
const {
|
|
2195
2231
|
overflow,
|
|
2196
2232
|
overflowX,
|
|
2197
2233
|
overflowY,
|
|
2198
2234
|
display
|
|
2199
2235
|
} = getComputedStyle$1(element);
|
|
2200
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !
|
|
2236
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
2201
2237
|
}
|
|
2202
|
-
function
|
|
2203
|
-
|
|
2204
|
-
return
|
|
2205
|
-
// • Always-visible scrollbar or not
|
|
2206
|
-
// • Width of <html>, etc.
|
|
2207
|
-
// const vV = win.visualViewport;
|
|
2208
|
-
// return vV ? Math.abs(win.innerWidth / vV.scale - vV.width) < 0.5 : true;
|
|
2238
|
+
function isWebKit() {
|
|
2239
|
+
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
2240
|
+
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
2209
2241
|
}
|
|
2242
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
2210
2243
|
function isLastTraversableNode(node) {
|
|
2211
|
-
return
|
|
2244
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
2212
2245
|
}
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
includeScale = false;
|
|
2246
|
+
function getComputedStyle$1(element) {
|
|
2247
|
+
return getWindow(element).getComputedStyle(element);
|
|
2248
|
+
}
|
|
2249
|
+
function getParentNode(node) {
|
|
2250
|
+
if (getNodeName(node) === 'html') {
|
|
2251
|
+
return node;
|
|
2220
2252
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2253
|
+
const result =
|
|
2254
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
2255
|
+
node.assignedSlot ||
|
|
2256
|
+
// DOM Element detected.
|
|
2257
|
+
node.parentNode ||
|
|
2258
|
+
// ShadowRoot detected.
|
|
2259
|
+
isShadowRoot(node) && node.host ||
|
|
2260
|
+
// Fallback.
|
|
2261
|
+
getDocumentElement(node);
|
|
2262
|
+
return isShadowRoot(result) ? result.host : result;
|
|
2263
|
+
}
|
|
2264
|
+
function getNearestOverflowAncestor(node) {
|
|
2265
|
+
const parentNode = getParentNode(node);
|
|
2266
|
+
if (isLastTraversableNode(parentNode)) {
|
|
2267
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
2224
2268
|
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2269
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
2270
|
+
return parentNode;
|
|
2271
|
+
}
|
|
2272
|
+
return getNearestOverflowAncestor(parentNode);
|
|
2273
|
+
}
|
|
2274
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
2275
|
+
var _node$ownerDocument2;
|
|
2276
|
+
if (list === void 0) {
|
|
2277
|
+
list = [];
|
|
2278
|
+
}
|
|
2279
|
+
if (traverseIframes === void 0) {
|
|
2280
|
+
traverseIframes = true;
|
|
2281
|
+
}
|
|
2282
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
2283
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
2284
|
+
const win = getWindow(scrollableAncestor);
|
|
2285
|
+
if (isBody) {
|
|
2286
|
+
const frameElement = getFrameElement(win);
|
|
2287
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
2233
2288
|
}
|
|
2289
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
2290
|
+
}
|
|
2291
|
+
function getFrameElement(win) {
|
|
2292
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
2293
|
+
}
|
|
2234
2294
|
|
|
2235
|
-
|
|
2236
|
-
const
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2295
|
+
function getCssDimensions(element) {
|
|
2296
|
+
const css = getComputedStyle$1(element);
|
|
2297
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
2298
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
2299
|
+
let width = parseFloat(css.width) || 0;
|
|
2300
|
+
let height = parseFloat(css.height) || 0;
|
|
2301
|
+
const hasOffset = isHTMLElement(element);
|
|
2302
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
2303
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
2304
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
2305
|
+
if (shouldFallback) {
|
|
2306
|
+
width = offsetWidth;
|
|
2307
|
+
height = offsetHeight;
|
|
2308
|
+
}
|
|
2241
2309
|
return {
|
|
2242
2310
|
width,
|
|
2243
2311
|
height,
|
|
2244
|
-
|
|
2245
|
-
right: x + width,
|
|
2246
|
-
bottom: y + height,
|
|
2247
|
-
left: x,
|
|
2248
|
-
x,
|
|
2249
|
-
y
|
|
2312
|
+
$: shouldFallback
|
|
2250
2313
|
};
|
|
2251
2314
|
}
|
|
2252
2315
|
|
|
2253
|
-
function
|
|
2254
|
-
return (
|
|
2316
|
+
function unwrapElement(element) {
|
|
2317
|
+
return !isElement(element) ? element.contextElement : element;
|
|
2255
2318
|
}
|
|
2256
2319
|
|
|
2257
|
-
function
|
|
2258
|
-
|
|
2259
|
-
|
|
2320
|
+
function getScale(element) {
|
|
2321
|
+
const domElement = unwrapElement(element);
|
|
2322
|
+
if (!isHTMLElement(domElement)) {
|
|
2323
|
+
return createCoords(1);
|
|
2260
2324
|
}
|
|
2325
|
+
const rect = domElement.getBoundingClientRect();
|
|
2326
|
+
const {
|
|
2327
|
+
width,
|
|
2328
|
+
height,
|
|
2329
|
+
$
|
|
2330
|
+
} = getCssDimensions(domElement);
|
|
2331
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
2332
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
2261
2333
|
|
|
2262
|
-
|
|
2263
|
-
node.assignedSlot || // DOM Element detected
|
|
2264
|
-
node.parentNode || ( // ShadowRoot detected
|
|
2265
|
-
isShadowRoot(node) ? node.host : null) || // Fallback
|
|
2266
|
-
getDocumentElement(node);
|
|
2267
|
-
return isShadowRoot(result) ? result.host : result;
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
function getNearestOverflowAncestor(node) {
|
|
2271
|
-
const parentNode = getParentNode(node);
|
|
2334
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
2272
2335
|
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2275
|
-
|
|
2336
|
+
if (!x || !Number.isFinite(x)) {
|
|
2337
|
+
x = 1;
|
|
2338
|
+
}
|
|
2339
|
+
if (!y || !Number.isFinite(y)) {
|
|
2340
|
+
y = 1;
|
|
2276
2341
|
}
|
|
2342
|
+
return {
|
|
2343
|
+
x,
|
|
2344
|
+
y
|
|
2345
|
+
};
|
|
2346
|
+
}
|
|
2277
2347
|
|
|
2278
|
-
|
|
2279
|
-
|
|
2348
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
2349
|
+
function getVisualOffsets(element) {
|
|
2350
|
+
const win = getWindow(element);
|
|
2351
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
2352
|
+
return noOffsets;
|
|
2280
2353
|
}
|
|
2354
|
+
return {
|
|
2355
|
+
x: win.visualViewport.offsetLeft,
|
|
2356
|
+
y: win.visualViewport.offsetTop
|
|
2357
|
+
};
|
|
2358
|
+
}
|
|
2359
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
2360
|
+
{
|
|
2361
|
+
return false;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2281
2364
|
|
|
2282
|
-
|
|
2365
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
2366
|
+
if (includeScale === void 0) {
|
|
2367
|
+
includeScale = false;
|
|
2368
|
+
}
|
|
2369
|
+
const clientRect = element.getBoundingClientRect();
|
|
2370
|
+
const domElement = unwrapElement(element);
|
|
2371
|
+
let scale = createCoords(1);
|
|
2372
|
+
if (includeScale) {
|
|
2373
|
+
{
|
|
2374
|
+
scale = getScale(element);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
const visualOffsets = shouldAddVisualOffsets() ? getVisualOffsets(domElement) : createCoords(0);
|
|
2378
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
2379
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
2380
|
+
let width = clientRect.width / scale.x;
|
|
2381
|
+
let height = clientRect.height / scale.y;
|
|
2382
|
+
if (domElement) {
|
|
2383
|
+
const win = getWindow(domElement);
|
|
2384
|
+
const offsetWin = offsetParent;
|
|
2385
|
+
let currentWin = win;
|
|
2386
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
2387
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
2388
|
+
const iframeScale = getScale(currentIFrame);
|
|
2389
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
2390
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
2391
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
2392
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
2393
|
+
x *= iframeScale.x;
|
|
2394
|
+
y *= iframeScale.y;
|
|
2395
|
+
width *= iframeScale.x;
|
|
2396
|
+
height *= iframeScale.y;
|
|
2397
|
+
x += left;
|
|
2398
|
+
y += top;
|
|
2399
|
+
currentWin = getWindow(currentIFrame);
|
|
2400
|
+
currentIFrame = getFrameElement(currentWin);
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
return rectToClientRect({
|
|
2404
|
+
width,
|
|
2405
|
+
height,
|
|
2406
|
+
x,
|
|
2407
|
+
y
|
|
2408
|
+
});
|
|
2283
2409
|
}
|
|
2284
2410
|
|
|
2285
|
-
function
|
|
2286
|
-
|
|
2411
|
+
function rectsAreEqual(a, b) {
|
|
2412
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
2413
|
+
}
|
|
2287
2414
|
|
|
2288
|
-
|
|
2289
|
-
|
|
2415
|
+
// https://samthor.au/2021/observing-dom/
|
|
2416
|
+
function observeMove(element, onMove) {
|
|
2417
|
+
let io = null;
|
|
2418
|
+
let timeoutId;
|
|
2419
|
+
const root = getDocumentElement(element);
|
|
2420
|
+
function cleanup() {
|
|
2421
|
+
var _io;
|
|
2422
|
+
clearTimeout(timeoutId);
|
|
2423
|
+
(_io = io) == null || _io.disconnect();
|
|
2424
|
+
io = null;
|
|
2290
2425
|
}
|
|
2426
|
+
function refresh(skip, threshold) {
|
|
2427
|
+
if (skip === void 0) {
|
|
2428
|
+
skip = false;
|
|
2429
|
+
}
|
|
2430
|
+
if (threshold === void 0) {
|
|
2431
|
+
threshold = 1;
|
|
2432
|
+
}
|
|
2433
|
+
cleanup();
|
|
2434
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
2435
|
+
const {
|
|
2436
|
+
left,
|
|
2437
|
+
top,
|
|
2438
|
+
width,
|
|
2439
|
+
height
|
|
2440
|
+
} = elementRectForRootMargin;
|
|
2441
|
+
if (!skip) {
|
|
2442
|
+
onMove();
|
|
2443
|
+
}
|
|
2444
|
+
if (!width || !height) {
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
const insetTop = floor(top);
|
|
2448
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
2449
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
2450
|
+
const insetLeft = floor(left);
|
|
2451
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
2452
|
+
const options = {
|
|
2453
|
+
rootMargin,
|
|
2454
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
2455
|
+
};
|
|
2456
|
+
let isFirstUpdate = true;
|
|
2457
|
+
function handleObserve(entries) {
|
|
2458
|
+
const ratio = entries[0].intersectionRatio;
|
|
2459
|
+
if (ratio !== threshold) {
|
|
2460
|
+
if (!isFirstUpdate) {
|
|
2461
|
+
return refresh();
|
|
2462
|
+
}
|
|
2463
|
+
if (!ratio) {
|
|
2464
|
+
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
2465
|
+
// to prevent an infinite loop of updates.
|
|
2466
|
+
timeoutId = setTimeout(() => {
|
|
2467
|
+
refresh(false, 1e-7);
|
|
2468
|
+
}, 1000);
|
|
2469
|
+
} else {
|
|
2470
|
+
refresh(false, ratio);
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
2474
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
2475
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
2476
|
+
// area anymore. This can happen under performance constraints. This may
|
|
2477
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
2478
|
+
// work around this, we compare the element's bounding rect now with
|
|
2479
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
2480
|
+
// are not equal then the element moved, so we refresh.
|
|
2481
|
+
refresh();
|
|
2482
|
+
}
|
|
2483
|
+
isFirstUpdate = false;
|
|
2484
|
+
}
|
|
2291
2485
|
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2486
|
+
// Older browsers don't support a `document` as the root and will throw an
|
|
2487
|
+
// error.
|
|
2488
|
+
try {
|
|
2489
|
+
io = new IntersectionObserver(handleObserve, {
|
|
2490
|
+
...options,
|
|
2491
|
+
// Handle <iframe>s
|
|
2492
|
+
root: root.ownerDocument
|
|
2493
|
+
});
|
|
2494
|
+
} catch (_e) {
|
|
2495
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
2496
|
+
}
|
|
2497
|
+
io.observe(element);
|
|
2498
|
+
}
|
|
2499
|
+
refresh(true);
|
|
2500
|
+
return cleanup;
|
|
2299
2501
|
}
|
|
2300
2502
|
|
|
2301
2503
|
/**
|
|
2302
2504
|
* Automatically updates the position of the floating element when necessary.
|
|
2505
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
2506
|
+
* visible on the screen.
|
|
2507
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
2508
|
+
* removed from the DOM or hidden from the screen.
|
|
2303
2509
|
* @see https://floating-ui.com/docs/autoUpdate
|
|
2304
2510
|
*/
|
|
2305
2511
|
function autoUpdate(reference, floating, update, options) {
|
|
2306
2512
|
if (options === void 0) {
|
|
2307
2513
|
options = {};
|
|
2308
2514
|
}
|
|
2309
|
-
|
|
2310
2515
|
const {
|
|
2311
|
-
ancestorScroll
|
|
2516
|
+
ancestorScroll = true,
|
|
2312
2517
|
ancestorResize = true,
|
|
2313
|
-
elementResize =
|
|
2518
|
+
elementResize = typeof ResizeObserver === 'function',
|
|
2519
|
+
layoutShift = typeof IntersectionObserver === 'function',
|
|
2314
2520
|
animationFrame = false
|
|
2315
2521
|
} = options;
|
|
2316
|
-
const
|
|
2317
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(
|
|
2522
|
+
const referenceEl = unwrapElement(reference);
|
|
2523
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
2318
2524
|
ancestors.forEach(ancestor => {
|
|
2319
2525
|
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
2320
2526
|
passive: true
|
|
2321
2527
|
});
|
|
2322
2528
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
2323
2529
|
});
|
|
2324
|
-
|
|
2325
|
-
|
|
2530
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
2531
|
+
let reobserveFrame = -1;
|
|
2532
|
+
let resizeObserver = null;
|
|
2326
2533
|
if (elementResize) {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
if (
|
|
2330
|
-
update
|
|
2534
|
+
resizeObserver = new ResizeObserver(_ref => {
|
|
2535
|
+
let [firstEntry] = _ref;
|
|
2536
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
2537
|
+
// Prevent update loops when using the `size` middleware.
|
|
2538
|
+
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
2539
|
+
resizeObserver.unobserve(floating);
|
|
2540
|
+
cancelAnimationFrame(reobserveFrame);
|
|
2541
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
2542
|
+
var _resizeObserver;
|
|
2543
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
2544
|
+
});
|
|
2331
2545
|
}
|
|
2332
|
-
|
|
2333
|
-
initialUpdate = false;
|
|
2546
|
+
update();
|
|
2334
2547
|
});
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
if (!isElement(reference) && reference.contextElement && !animationFrame) {
|
|
2338
|
-
observer.observe(reference.contextElement);
|
|
2548
|
+
if (referenceEl && !animationFrame) {
|
|
2549
|
+
resizeObserver.observe(referenceEl);
|
|
2339
2550
|
}
|
|
2340
|
-
|
|
2341
|
-
observer.observe(floating);
|
|
2551
|
+
resizeObserver.observe(floating);
|
|
2342
2552
|
}
|
|
2343
|
-
|
|
2344
2553
|
let frameId;
|
|
2345
2554
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
2346
|
-
|
|
2347
2555
|
if (animationFrame) {
|
|
2348
2556
|
frameLoop();
|
|
2349
2557
|
}
|
|
2350
|
-
|
|
2351
2558
|
function frameLoop() {
|
|
2352
2559
|
const nextRefRect = getBoundingClientRect(reference);
|
|
2353
|
-
|
|
2354
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
2560
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
2355
2561
|
update();
|
|
2356
2562
|
}
|
|
2357
|
-
|
|
2358
2563
|
prevRefRect = nextRefRect;
|
|
2359
2564
|
frameId = requestAnimationFrame(frameLoop);
|
|
2360
2565
|
}
|
|
2361
|
-
|
|
2362
2566
|
update();
|
|
2363
2567
|
return () => {
|
|
2364
|
-
var
|
|
2365
|
-
|
|
2568
|
+
var _resizeObserver2;
|
|
2366
2569
|
ancestors.forEach(ancestor => {
|
|
2367
2570
|
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
2368
2571
|
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
2369
2572
|
});
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2573
|
+
cleanupIo == null || cleanupIo();
|
|
2574
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
2575
|
+
resizeObserver = null;
|
|
2373
2576
|
if (animationFrame) {
|
|
2374
2577
|
cancelAnimationFrame(frameId);
|
|
2375
2578
|
}
|
|
2376
2579
|
};
|
|
2377
2580
|
}
|
|
2378
2581
|
|
|
2379
|
-
var
|
|
2582
|
+
var isClient = typeof document !== 'undefined';
|
|
2583
|
+
|
|
2584
|
+
var noop$1 = function noop() {};
|
|
2585
|
+
var index = isClient ? React.useLayoutEffect : noop$1;
|
|
2380
2586
|
|
|
2381
2587
|
var _excluded$3 = ["className", "clearValue", "cx", "getStyles", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
2382
2588
|
// ==============================
|
|
@@ -6526,4 +6732,4 @@ exports.components = components;
|
|
|
6526
6732
|
exports.handleInputChange = handleInputChange;
|
|
6527
6733
|
exports.useCreatable = useCreatable;
|
|
6528
6734
|
exports.useStateManager = useStateManager;
|
|
6529
|
-
//# sourceMappingURL=react-select-creatable.esm-
|
|
6735
|
+
//# sourceMappingURL=react-select-creatable.esm-lcdODVBz.js.map
|