UNPKG

70.3 kBJavaScriptView Raw
1'use strict';
2
3var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
4var _extends = require('@babel/runtime/helpers/extends');
5var react = require('@emotion/react');
6var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
7var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8var _typeof = require('@babel/runtime/helpers/typeof');
9var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
10var _defineProperty = require('@babel/runtime/helpers/defineProperty');
11var React = require('react');
12var reactDom = require('react-dom');
13var dom = require('@floating-ui/dom');
14var useLayoutEffect = require('use-isomorphic-layout-effect');
15
16function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
17
18var useLayoutEffect__default = /*#__PURE__*/_interopDefault(useLayoutEffect);
19
20var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
21// ==============================
22// NO OP
23// ==============================
24
25var noop = function noop() {};
26
27// ==============================
28// Class Name Prefixer
29// ==============================
30
31/**
32 String representation of component state for styling with class names.
33
34 Expects an array of strings OR a string/object pair:
35 - className(['comp', 'comp-arg', 'comp-arg-2'])
36 @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2'
37 - className('comp', { some: true, state: false })
38 @returns 'react-select__comp react-select__comp--some'
39*/
40function applyPrefixToName(prefix, name) {
41 if (!name) {
42 return prefix;
43 } else if (name[0] === '-') {
44 return prefix + name;
45 } else {
46 return prefix + '__' + name;
47 }
48}
49function classNames(prefix, state) {
50 for (var _len = arguments.length, classNameList = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
51 classNameList[_key - 2] = arguments[_key];
52 }
53 var arr = [].concat(classNameList);
54 if (state && prefix) {
55 for (var key in state) {
56 if (state.hasOwnProperty(key) && state[key]) {
57 arr.push("".concat(applyPrefixToName(prefix, key)));
58 }
59 }
60 }
61 return arr.filter(function (i) {
62 return i;
63 }).map(function (i) {
64 return String(i).trim();
65 }).join(' ');
66}
67// ==============================
68// Clean Value
69// ==============================
70
71var cleanValue = function cleanValue(value) {
72 if (isArray(value)) return value.filter(Boolean);
73 if (_typeof(value) === 'object' && value !== null) return [value];
74 return [];
75};
76
77// ==============================
78// Clean Common Props
79// ==============================
80
81var cleanCommonProps = function cleanCommonProps(props) {
82 //className
83 props.className;
84 props.clearValue;
85 props.cx;
86 props.getStyles;
87 props.getClassNames;
88 props.getValue;
89 props.hasValue;
90 props.isMulti;
91 props.isRtl;
92 props.options;
93 props.selectOption;
94 props.selectProps;
95 props.setValue;
96 props.theme;
97 var innerProps = _objectWithoutProperties(props, _excluded$4);
98 return _objectSpread({}, innerProps);
99};
100
101// ==============================
102// Get Style Props
103// ==============================
104
105var getStyleProps = function getStyleProps(props, name, classNamesState) {
106 var cx = props.cx,
107 getStyles = props.getStyles,
108 getClassNames = props.getClassNames,
109 className = props.className;
110 return {
111 css: getStyles(name, props),
112 className: cx(classNamesState !== null && classNamesState !== void 0 ? classNamesState : {}, getClassNames(name, props), className)
113 };
114};
115
116// ==============================
117// Handle Input Change
118// ==============================
119
120function handleInputChange(inputValue, actionMeta, onInputChange) {
121 if (onInputChange) {
122 var _newValue = onInputChange(inputValue, actionMeta);
123 if (typeof _newValue === 'string') return _newValue;
124 }
125 return inputValue;
126}
127
128// ==============================
129// Scroll Helpers
130// ==============================
131
132function isDocumentElement(el) {
133 return [document.documentElement, document.body, window].indexOf(el) > -1;
134}
135
136// Normalized Scroll Top
137// ------------------------------
138
139function normalizedHeight(el) {
140 if (isDocumentElement(el)) {
141 return window.innerHeight;
142 }
143 return el.clientHeight;
144}
145
146// Normalized scrollTo & scrollTop
147// ------------------------------
148
149function getScrollTop(el) {
150 if (isDocumentElement(el)) {
151 return window.pageYOffset;
152 }
153 return el.scrollTop;
154}
155function scrollTo(el, top) {
156 // with a scroll distance, we perform scroll on the element
157 if (isDocumentElement(el)) {
158 window.scrollTo(0, top);
159 return;
160 }
161 el.scrollTop = top;
162}
163
164// Get Scroll Parent
165// ------------------------------
166
167function getScrollParent(element) {
168 var style = getComputedStyle(element);
169 var excludeStaticParent = style.position === 'absolute';
170 var overflowRx = /(auto|scroll)/;
171 if (style.position === 'fixed') return document.documentElement;
172 for (var parent = element; parent = parent.parentElement;) {
173 style = getComputedStyle(parent);
174 if (excludeStaticParent && style.position === 'static') {
175 continue;
176 }
177 if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) {
178 return parent;
179 }
180 }
181 return document.documentElement;
182}
183
184// Animated Scroll To
185// ------------------------------
186
187/**
188 @param t: time (elapsed)
189 @param b: initial value
190 @param c: amount of change
191 @param d: duration
192*/
193function easeOutCubic(t, b, c, d) {
194 return c * ((t = t / d - 1) * t * t + 1) + b;
195}
196function animatedScrollTo(element, to) {
197 var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
198 var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;
199 var start = getScrollTop(element);
200 var change = to - start;
201 var increment = 10;
202 var currentTime = 0;
203 function animateScroll() {
204 currentTime += increment;
205 var val = easeOutCubic(currentTime, start, change, duration);
206 scrollTo(element, val);
207 if (currentTime < duration) {
208 window.requestAnimationFrame(animateScroll);
209 } else {
210 callback(element);
211 }
212 }
213 animateScroll();
214}
215
216// Scroll Into View
217// ------------------------------
218
219function scrollIntoView(menuEl, focusedEl) {
220 var menuRect = menuEl.getBoundingClientRect();
221 var focusedRect = focusedEl.getBoundingClientRect();
222 var overScroll = focusedEl.offsetHeight / 3;
223 if (focusedRect.bottom + overScroll > menuRect.bottom) {
224 scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight));
225 } else if (focusedRect.top - overScroll < menuRect.top) {
226 scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0));
227 }
228}
229
230// ==============================
231// Get bounding client object
232// ==============================
233
234// cannot get keys using array notation with DOMRect
235function getBoundingClientObj(element) {
236 var rect = element.getBoundingClientRect();
237 return {
238 bottom: rect.bottom,
239 height: rect.height,
240 left: rect.left,
241 right: rect.right,
242 top: rect.top,
243 width: rect.width
244 };
245}
246
247// ==============================
248// Touch Capability Detector
249// ==============================
250
251function isTouchCapable() {
252 try {
253 document.createEvent('TouchEvent');
254 return true;
255 } catch (e) {
256 return false;
257 }
258}
259
260// ==============================
261// Mobile Device Detector
262// ==============================
263
264function isMobileDevice() {
265 try {
266 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
267 } catch (e) {
268 return false;
269 }
270}
271
272// ==============================
273// Passive Event Detector
274// ==============================
275
276// https://github.com/rafgraph/detect-it/blob/main/src/index.ts#L19-L36
277var passiveOptionAccessed = false;
278var options = {
279 get passive() {
280 return passiveOptionAccessed = true;
281 }
282};
283// check for SSR
284var w = typeof window !== 'undefined' ? window : {};
285if (w.addEventListener && w.removeEventListener) {
286 w.addEventListener('p', noop, options);
287 w.removeEventListener('p', noop, false);
288}
289var supportsPassiveEvents = passiveOptionAccessed;
290function notNullish(item) {
291 return item != null;
292}
293function isArray(arg) {
294 return Array.isArray(arg);
295}
296function valueTernary(isMulti, multiValue, singleValue) {
297 return isMulti ? multiValue : singleValue;
298}
299function singleValueAsValue(singleValue) {
300 return singleValue;
301}
302function multiValueAsValue(multiValue) {
303 return multiValue;
304}
305var removeProps = function removeProps(propsObj) {
306 for (var _len2 = arguments.length, properties = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
307 properties[_key2 - 1] = arguments[_key2];
308 }
309 var propsMap = Object.entries(propsObj).filter(function (_ref) {
310 var _ref2 = _slicedToArray(_ref, 1),
311 key = _ref2[0];
312 return !properties.includes(key);
313 });
314 return propsMap.reduce(function (newProps, _ref3) {
315 var _ref4 = _slicedToArray(_ref3, 2),
316 key = _ref4[0],
317 val = _ref4[1];
318 newProps[key] = val;
319 return newProps;
320 }, {});
321};
322
323var _excluded$3 = ["children", "innerProps"],
324 _excluded2$1 = ["children", "innerProps"];
325function getMenuPlacement(_ref) {
326 var preferredMaxHeight = _ref.maxHeight,
327 menuEl = _ref.menuEl,
328 minHeight = _ref.minHeight,
329 preferredPlacement = _ref.placement,
330 shouldScroll = _ref.shouldScroll,
331 isFixedPosition = _ref.isFixedPosition,
332 controlHeight = _ref.controlHeight;
333 var scrollParent = getScrollParent(menuEl);
334 var defaultState = {
335 placement: 'bottom',
336 maxHeight: preferredMaxHeight
337 };
338
339 // something went wrong, return default state
340 if (!menuEl || !menuEl.offsetParent) return defaultState;
341
342 // we can't trust `scrollParent.scrollHeight` --> it may increase when
343 // the menu is rendered
344 var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
345 scrollHeight = _scrollParent$getBoun.height;
346 var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
347 menuBottom = _menuEl$getBoundingCl.bottom,
348 menuHeight = _menuEl$getBoundingCl.height,
349 menuTop = _menuEl$getBoundingCl.top;
350 var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),
351 containerTop = _menuEl$offsetParent$.top;
352 var viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent);
353 var scrollTop = getScrollTop(scrollParent);
354 var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
355 var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
356 var viewSpaceAbove = containerTop - marginTop;
357 var viewSpaceBelow = viewHeight - menuTop;
358 var scrollSpaceAbove = viewSpaceAbove + scrollTop;
359 var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;
360 var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;
361 var scrollUp = scrollTop + menuTop - marginTop;
362 var scrollDuration = 160;
363 switch (preferredPlacement) {
364 case 'auto':
365 case 'bottom':
366 // 1: the menu will fit, do nothing
367 if (viewSpaceBelow >= menuHeight) {
368 return {
369 placement: 'bottom',
370 maxHeight: preferredMaxHeight
371 };
372 }
373
374 // 2: the menu will fit, if scrolled
375 if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {
376 if (shouldScroll) {
377 animatedScrollTo(scrollParent, scrollDown, scrollDuration);
378 }
379 return {
380 placement: 'bottom',
381 maxHeight: preferredMaxHeight
382 };
383 }
384
385 // 3: the menu will fit, if constrained
386 if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {
387 if (shouldScroll) {
388 animatedScrollTo(scrollParent, scrollDown, scrollDuration);
389 }
390
391 // we want to provide as much of the menu as possible to the user,
392 // so give them whatever is available below rather than the minHeight.
393 var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;
394 return {
395 placement: 'bottom',
396 maxHeight: constrainedHeight
397 };
398 }
399
400 // 4. Forked beviour when there isn't enough space below
401
402 // AUTO: flip the menu, render above
403 if (preferredPlacement === 'auto' || isFixedPosition) {
404 // may need to be constrained after flipping
405 var _constrainedHeight = preferredMaxHeight;
406 var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;
407 if (spaceAbove >= minHeight) {
408 _constrainedHeight = Math.min(spaceAbove - marginBottom - controlHeight, preferredMaxHeight);
409 }
410 return {
411 placement: 'top',
412 maxHeight: _constrainedHeight
413 };
414 }
415
416 // BOTTOM: allow browser to increase scrollable area and immediately set scroll
417 if (preferredPlacement === 'bottom') {
418 if (shouldScroll) {
419 scrollTo(scrollParent, scrollDown);
420 }
421 return {
422 placement: 'bottom',
423 maxHeight: preferredMaxHeight
424 };
425 }
426 break;
427 case 'top':
428 // 1: the menu will fit, do nothing
429 if (viewSpaceAbove >= menuHeight) {
430 return {
431 placement: 'top',
432 maxHeight: preferredMaxHeight
433 };
434 }
435
436 // 2: the menu will fit, if scrolled
437 if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {
438 if (shouldScroll) {
439 animatedScrollTo(scrollParent, scrollUp, scrollDuration);
440 }
441 return {
442 placement: 'top',
443 maxHeight: preferredMaxHeight
444 };
445 }
446
447 // 3: the menu will fit, if constrained
448 if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
449 var _constrainedHeight2 = preferredMaxHeight;
450
451 // we want to provide as much of the menu as possible to the user,
452 // so give them whatever is available below rather than the minHeight.
453 if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
454 _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;
455 }
456 if (shouldScroll) {
457 animatedScrollTo(scrollParent, scrollUp, scrollDuration);
458 }
459 return {
460 placement: 'top',
461 maxHeight: _constrainedHeight2
462 };
463 }
464
465 // 4. not enough space, the browser WILL NOT increase scrollable area when
466 // absolutely positioned element rendered above the viewport (only below).
467 // Flip the menu, render below
468 return {
469 placement: 'bottom',
470 maxHeight: preferredMaxHeight
471 };
472 default:
473 throw new Error("Invalid placement provided \"".concat(preferredPlacement, "\"."));
474 }
475 return defaultState;
476}
477
478// Menu Component
479// ------------------------------
480
481function alignToControl(placement) {
482 var placementToCSSProp = {
483 bottom: 'top',
484 top: 'bottom'
485 };
486 return placement ? placementToCSSProp[placement] : 'bottom';
487}
488var coercePlacement = function coercePlacement(p) {
489 return p === 'auto' ? 'bottom' : p;
490};
491var menuCSS = function menuCSS(_ref2, unstyled) {
492 var _objectSpread2;
493 var placement = _ref2.placement,
494 _ref2$theme = _ref2.theme,
495 borderRadius = _ref2$theme.borderRadius,
496 spacing = _ref2$theme.spacing,
497 colors = _ref2$theme.colors;
498 return _objectSpread((_objectSpread2 = {
499 label: 'menu'
500 }, _defineProperty(_objectSpread2, alignToControl(placement), '100%'), _defineProperty(_objectSpread2, "position", 'absolute'), _defineProperty(_objectSpread2, "width", '100%'), _defineProperty(_objectSpread2, "zIndex", 1), _objectSpread2), unstyled ? {} : {
501 backgroundColor: colors.neutral0,
502 borderRadius: borderRadius,
503 boxShadow: '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)',
504 marginBottom: spacing.menuGutter,
505 marginTop: spacing.menuGutter
506 });
507};
508var PortalPlacementContext = /*#__PURE__*/React.createContext(null);
509
510// NOTE: internal only
511var MenuPlacer = function MenuPlacer(props) {
512 var children = props.children,
513 minMenuHeight = props.minMenuHeight,
514 maxMenuHeight = props.maxMenuHeight,
515 menuPlacement = props.menuPlacement,
516 menuPosition = props.menuPosition,
517 menuShouldScrollIntoView = props.menuShouldScrollIntoView,
518 theme = props.theme;
519 var _ref3 = React.useContext(PortalPlacementContext) || {},
520 setPortalPlacement = _ref3.setPortalPlacement;
521 var ref = React.useRef(null);
522 var _useState = React.useState(maxMenuHeight),
523 _useState2 = _slicedToArray(_useState, 2),
524 maxHeight = _useState2[0],
525 setMaxHeight = _useState2[1];
526 var _useState3 = React.useState(null),
527 _useState4 = _slicedToArray(_useState3, 2),
528 placement = _useState4[0],
529 setPlacement = _useState4[1];
530 var controlHeight = theme.spacing.controlHeight;
531 useLayoutEffect__default["default"](function () {
532 var menuEl = ref.current;
533 if (!menuEl) return;
534
535 // DO NOT scroll if position is fixed
536 var isFixedPosition = menuPosition === 'fixed';
537 var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;
538 var state = getMenuPlacement({
539 maxHeight: maxMenuHeight,
540 menuEl: menuEl,
541 minHeight: minMenuHeight,
542 placement: menuPlacement,
543 shouldScroll: shouldScroll,
544 isFixedPosition: isFixedPosition,
545 controlHeight: controlHeight
546 });
547 setMaxHeight(state.maxHeight);
548 setPlacement(state.placement);
549 setPortalPlacement === null || setPortalPlacement === void 0 ? void 0 : setPortalPlacement(state.placement);
550 }, [maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, setPortalPlacement, controlHeight]);
551 return children({
552 ref: ref,
553 placerProps: _objectSpread(_objectSpread({}, props), {}, {
554 placement: placement || coercePlacement(menuPlacement),
555 maxHeight: maxHeight
556 })
557 });
558};
559var Menu = function Menu(props) {
560 var children = props.children,
561 innerRef = props.innerRef,
562 innerProps = props.innerProps;
563 return react.jsx("div", _extends({}, getStyleProps(props, 'menu', {
564 menu: true
565 }), {
566 ref: innerRef
567 }, innerProps), children);
568};
569var Menu$1 = Menu;
570
571// ==============================
572// Menu List
573// ==============================
574
575var menuListCSS = function menuListCSS(_ref4, unstyled) {
576 var maxHeight = _ref4.maxHeight,
577 baseUnit = _ref4.theme.spacing.baseUnit;
578 return _objectSpread({
579 maxHeight: maxHeight,
580 overflowY: 'auto',
581 position: 'relative',
582 // required for offset[Height, Top] > keyboard scroll
583 WebkitOverflowScrolling: 'touch'
584 }, unstyled ? {} : {
585 paddingBottom: baseUnit,
586 paddingTop: baseUnit
587 });
588};
589var MenuList = function MenuList(props) {
590 var children = props.children,
591 innerProps = props.innerProps,
592 innerRef = props.innerRef,
593 isMulti = props.isMulti;
594 return react.jsx("div", _extends({}, getStyleProps(props, 'menuList', {
595 'menu-list': true,
596 'menu-list--is-multi': isMulti
597 }), {
598 ref: innerRef
599 }, innerProps), children);
600};
601
602// ==============================
603// Menu Notices
604// ==============================
605
606var noticeCSS = function noticeCSS(_ref5, unstyled) {
607 var _ref5$theme = _ref5.theme,
608 baseUnit = _ref5$theme.spacing.baseUnit,
609 colors = _ref5$theme.colors;
610 return _objectSpread({
611 textAlign: 'center'
612 }, unstyled ? {} : {
613 color: colors.neutral40,
614 padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px")
615 });
616};
617var noOptionsMessageCSS = noticeCSS;
618var loadingMessageCSS = noticeCSS;
619var NoOptionsMessage = function NoOptionsMessage(_ref6) {
620 var _ref6$children = _ref6.children,
621 children = _ref6$children === void 0 ? 'No options' : _ref6$children,
622 innerProps = _ref6.innerProps,
623 restProps = _objectWithoutProperties(_ref6, _excluded$3);
624 return react.jsx("div", _extends({}, getStyleProps(_objectSpread(_objectSpread({}, restProps), {}, {
625 children: children,
626 innerProps: innerProps
627 }), 'noOptionsMessage', {
628 'menu-notice': true,
629 'menu-notice--no-options': true
630 }), innerProps), children);
631};
632var LoadingMessage = function LoadingMessage(_ref7) {
633 var _ref7$children = _ref7.children,
634 children = _ref7$children === void 0 ? 'Loading...' : _ref7$children,
635 innerProps = _ref7.innerProps,
636 restProps = _objectWithoutProperties(_ref7, _excluded2$1);
637 return react.jsx("div", _extends({}, getStyleProps(_objectSpread(_objectSpread({}, restProps), {}, {
638 children: children,
639 innerProps: innerProps
640 }), 'loadingMessage', {
641 'menu-notice': true,
642 'menu-notice--loading': true
643 }), innerProps), children);
644};
645
646// ==============================
647// Menu Portal
648// ==============================
649
650var menuPortalCSS = function menuPortalCSS(_ref8) {
651 var rect = _ref8.rect,
652 offset = _ref8.offset,
653 position = _ref8.position;
654 return {
655 left: rect.left,
656 position: position,
657 top: offset,
658 width: rect.width,
659 zIndex: 1
660 };
661};
662var MenuPortal = function MenuPortal(props) {
663 var appendTo = props.appendTo,
664 children = props.children,
665 controlElement = props.controlElement,
666 innerProps = props.innerProps,
667 menuPlacement = props.menuPlacement,
668 menuPosition = props.menuPosition;
669 var menuPortalRef = React.useRef(null);
670 var cleanupRef = React.useRef(null);
671 var _useState5 = React.useState(coercePlacement(menuPlacement)),
672 _useState6 = _slicedToArray(_useState5, 2),
673 placement = _useState6[0],
674 setPortalPlacement = _useState6[1];
675 var portalPlacementContext = React.useMemo(function () {
676 return {
677 setPortalPlacement: setPortalPlacement
678 };
679 }, []);
680 var _useState7 = React.useState(null),
681 _useState8 = _slicedToArray(_useState7, 2),
682 computedPosition = _useState8[0],
683 setComputedPosition = _useState8[1];
684 var updateComputedPosition = React.useCallback(function () {
685 if (!controlElement) return;
686 var rect = getBoundingClientObj(controlElement);
687 var scrollDistance = menuPosition === 'fixed' ? 0 : window.pageYOffset;
688 var offset = rect[placement] + scrollDistance;
689 if (offset !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset) || rect.left !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left) || rect.width !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width)) {
690 setComputedPosition({
691 offset: offset,
692 rect: rect
693 });
694 }
695 }, [controlElement, menuPosition, placement, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width]);
696 useLayoutEffect__default["default"](function () {
697 updateComputedPosition();
698 }, [updateComputedPosition]);
699 var runAutoUpdate = React.useCallback(function () {
700 if (typeof cleanupRef.current === 'function') {
701 cleanupRef.current();
702 cleanupRef.current = null;
703 }
704 if (controlElement && menuPortalRef.current) {
705 cleanupRef.current = dom.autoUpdate(controlElement, menuPortalRef.current, updateComputedPosition, {
706 elementResize: 'ResizeObserver' in window
707 });
708 }
709 }, [controlElement, updateComputedPosition]);
710 useLayoutEffect__default["default"](function () {
711 runAutoUpdate();
712 }, [runAutoUpdate]);
713 var setMenuPortalElement = React.useCallback(function (menuPortalElement) {
714 menuPortalRef.current = menuPortalElement;
715 runAutoUpdate();
716 }, [runAutoUpdate]);
717
718 // bail early if required elements aren't present
719 if (!appendTo && menuPosition !== 'fixed' || !computedPosition) return null;
720
721 // same wrapper element whether fixed or portalled
722 var menuWrapper = react.jsx("div", _extends({
723 ref: setMenuPortalElement
724 }, getStyleProps(_objectSpread(_objectSpread({}, props), {}, {
725 offset: computedPosition.offset,
726 position: menuPosition,
727 rect: computedPosition.rect
728 }), 'menuPortal', {
729 'menu-portal': true
730 }), innerProps), children);
731 return react.jsx(PortalPlacementContext.Provider, {
732 value: portalPlacementContext
733 }, appendTo ? /*#__PURE__*/reactDom.createPortal(menuWrapper, appendTo) : menuWrapper);
734};
735
736// ==============================
737// Root Container
738// ==============================
739
740var containerCSS = function containerCSS(_ref) {
741 var isDisabled = _ref.isDisabled,
742 isRtl = _ref.isRtl;
743 return {
744 label: 'container',
745 direction: isRtl ? 'rtl' : undefined,
746 pointerEvents: isDisabled ? 'none' : undefined,
747 // cancel mouse events when disabled
748 position: 'relative'
749 };
750};
751var SelectContainer = function SelectContainer(props) {
752 var children = props.children,
753 innerProps = props.innerProps,
754 isDisabled = props.isDisabled,
755 isRtl = props.isRtl;
756 return react.jsx("div", _extends({}, getStyleProps(props, 'container', {
757 '--is-disabled': isDisabled,
758 '--is-rtl': isRtl
759 }), innerProps), children);
760};
761
762// ==============================
763// Value Container
764// ==============================
765
766var valueContainerCSS = function valueContainerCSS(_ref2, unstyled) {
767 var spacing = _ref2.theme.spacing,
768 isMulti = _ref2.isMulti,
769 hasValue = _ref2.hasValue,
770 controlShouldRenderValue = _ref2.selectProps.controlShouldRenderValue;
771 return _objectSpread({
772 alignItems: 'center',
773 display: isMulti && hasValue && controlShouldRenderValue ? 'flex' : 'grid',
774 flex: 1,
775 flexWrap: 'wrap',
776 WebkitOverflowScrolling: 'touch',
777 position: 'relative',
778 overflow: 'hidden'
779 }, unstyled ? {} : {
780 padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px")
781 });
782};
783var ValueContainer = function ValueContainer(props) {
784 var children = props.children,
785 innerProps = props.innerProps,
786 isMulti = props.isMulti,
787 hasValue = props.hasValue;
788 return react.jsx("div", _extends({}, getStyleProps(props, 'valueContainer', {
789 'value-container': true,
790 'value-container--is-multi': isMulti,
791 'value-container--has-value': hasValue
792 }), innerProps), children);
793};
794
795// ==============================
796// Indicator Container
797// ==============================
798
799var indicatorsContainerCSS = function indicatorsContainerCSS() {
800 return {
801 alignItems: 'center',
802 alignSelf: 'stretch',
803 display: 'flex',
804 flexShrink: 0
805 };
806};
807var IndicatorsContainer = function IndicatorsContainer(props) {
808 var children = props.children,
809 innerProps = props.innerProps;
810 return react.jsx("div", _extends({}, getStyleProps(props, 'indicatorsContainer', {
811 indicators: true
812 }), innerProps), children);
813};
814
815var _templateObject;
816var _excluded$2 = ["size"],
817 _excluded2 = ["innerProps", "isRtl", "size"];
818function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
819
820// ==============================
821// Dropdown & Clear Icons
822// ==============================
823var _ref2 = process.env.NODE_ENV === "production" ? {
824 name: "8mmkcg",
825 styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"
826} : {
827 name: "tj5bde-Svg",
828 styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",
829 map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmd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sXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",
830 toString: _EMOTION_STRINGIFIED_CSS_ERROR__
831};
832var Svg = function Svg(_ref) {
833 var size = _ref.size,
834 props = _objectWithoutProperties(_ref, _excluded$2);
835 return react.jsx("svg", _extends({
836 height: size,
837 width: size,
838 viewBox: "0 0 20 20",
839 "aria-hidden": "true",
840 focusable: "false",
841 css: _ref2
842 }, props));
843};
844var CrossIcon = function CrossIcon(props) {
845 return react.jsx(Svg, _extends({
846 size: 20
847 }, props), react.jsx("path", {
848 d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
849 }));
850};
851var DownChevron = function DownChevron(props) {
852 return react.jsx(Svg, _extends({
853 size: 20
854 }, props), react.jsx("path", {
855 d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
856 }));
857};
858
859// ==============================
860// Dropdown & Clear Buttons
861// ==============================
862
863var baseCSS = function baseCSS(_ref3, unstyled) {
864 var isFocused = _ref3.isFocused,
865 _ref3$theme = _ref3.theme,
866 baseUnit = _ref3$theme.spacing.baseUnit,
867 colors = _ref3$theme.colors;
868 return _objectSpread({
869 label: 'indicatorContainer',
870 display: 'flex',
871 transition: 'color 150ms'
872 }, unstyled ? {} : {
873 color: isFocused ? colors.neutral60 : colors.neutral20,
874 padding: baseUnit * 2,
875 ':hover': {
876 color: isFocused ? colors.neutral80 : colors.neutral40
877 }
878 });
879};
880var dropdownIndicatorCSS = baseCSS;
881var DropdownIndicator = function DropdownIndicator(props) {
882 var children = props.children,
883 innerProps = props.innerProps;
884 return react.jsx("div", _extends({}, getStyleProps(props, 'dropdownIndicator', {
885 indicator: true,
886 'dropdown-indicator': true
887 }), innerProps), children || react.jsx(DownChevron, null));
888};
889var clearIndicatorCSS = baseCSS;
890var ClearIndicator = function ClearIndicator(props) {
891 var children = props.children,
892 innerProps = props.innerProps;
893 return react.jsx("div", _extends({}, getStyleProps(props, 'clearIndicator', {
894 indicator: true,
895 'clear-indicator': true
896 }), innerProps), children || react.jsx(CrossIcon, null));
897};
898
899// ==============================
900// Separator
901// ==============================
902
903var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4, unstyled) {
904 var isDisabled = _ref4.isDisabled,
905 _ref4$theme = _ref4.theme,
906 baseUnit = _ref4$theme.spacing.baseUnit,
907 colors = _ref4$theme.colors;
908 return _objectSpread({
909 label: 'indicatorSeparator',
910 alignSelf: 'stretch',
911 width: 1
912 }, unstyled ? {} : {
913 backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
914 marginBottom: baseUnit * 2,
915 marginTop: baseUnit * 2
916 });
917};
918var IndicatorSeparator = function IndicatorSeparator(props) {
919 var innerProps = props.innerProps;
920 return react.jsx("span", _extends({}, innerProps, getStyleProps(props, 'indicatorSeparator', {
921 'indicator-separator': true
922 })));
923};
924
925// ==============================
926// Loading
927// ==============================
928
929var loadingDotAnimations = react.keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"])));
930var loadingIndicatorCSS = function loadingIndicatorCSS(_ref5, unstyled) {
931 var isFocused = _ref5.isFocused,
932 size = _ref5.size,
933 _ref5$theme = _ref5.theme,
934 colors = _ref5$theme.colors,
935 baseUnit = _ref5$theme.spacing.baseUnit;
936 return _objectSpread({
937 label: 'loadingIndicator',
938 display: 'flex',
939 transition: 'color 150ms',
940 alignSelf: 'center',
941 fontSize: size,
942 lineHeight: 1,
943 marginRight: size,
944 textAlign: 'center',
945 verticalAlign: 'middle'
946 }, unstyled ? {} : {
947 color: isFocused ? colors.neutral60 : colors.neutral20,
948 padding: baseUnit * 2
949 });
950};
951var LoadingDot = function LoadingDot(_ref6) {
952 var delay = _ref6.delay,
953 offset = _ref6.offset;
954 return react.jsx("span", {
955 css: /*#__PURE__*/react.css({
956 animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"),
957 backgroundColor: 'currentColor',
958 borderRadius: '1em',
959 display: 'inline-block',
960 marginLeft: offset ? '1em' : undefined,
961 height: '1em',
962 verticalAlign: 'top',
963 width: '1em'
964 }, process.env.NODE_ENV === "production" ? "" : ";label:LoadingDot;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodD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pY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")
965 });
966};
967var LoadingIndicator = function LoadingIndicator(_ref7) {
968 var innerProps = _ref7.innerProps,
969 isRtl = _ref7.isRtl,
970 _ref7$size = _ref7.size,
971 size = _ref7$size === void 0 ? 4 : _ref7$size,
972 restProps = _objectWithoutProperties(_ref7, _excluded2);
973 return react.jsx("div", _extends({}, getStyleProps(_objectSpread(_objectSpread({}, restProps), {}, {
974 innerProps: innerProps,
975 isRtl: isRtl,
976 size: size
977 }), 'loadingIndicator', {
978 indicator: true,
979 'loading-indicator': true
980 }), innerProps), react.jsx(LoadingDot, {
981 delay: 0,
982 offset: isRtl
983 }), react.jsx(LoadingDot, {
984 delay: 160,
985 offset: true
986 }), react.jsx(LoadingDot, {
987 delay: 320,
988 offset: !isRtl
989 }));
990};
991
992var css$1 = function css(_ref, unstyled) {
993 var isDisabled = _ref.isDisabled,
994 isFocused = _ref.isFocused,
995 _ref$theme = _ref.theme,
996 colors = _ref$theme.colors,
997 borderRadius = _ref$theme.borderRadius,
998 spacing = _ref$theme.spacing;
999 return _objectSpread({
1000 label: 'control',
1001 alignItems: 'center',
1002 cursor: 'default',
1003 display: 'flex',
1004 flexWrap: 'wrap',
1005 justifyContent: 'space-between',
1006 minHeight: spacing.controlHeight,
1007 outline: '0 !important',
1008 position: 'relative',
1009 transition: 'all 100ms'
1010 }, unstyled ? {} : {
1011 backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
1012 borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
1013 borderRadius: borderRadius,
1014 borderStyle: 'solid',
1015 borderWidth: 1,
1016 boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : undefined,
1017 '&:hover': {
1018 borderColor: isFocused ? colors.primary : colors.neutral30
1019 }
1020 });
1021};
1022var Control = function Control(props) {
1023 var children = props.children,
1024 isDisabled = props.isDisabled,
1025 isFocused = props.isFocused,
1026 innerRef = props.innerRef,
1027 innerProps = props.innerProps,
1028 menuIsOpen = props.menuIsOpen;
1029 return react.jsx("div", _extends({
1030 ref: innerRef
1031 }, getStyleProps(props, 'control', {
1032 control: true,
1033 'control--is-disabled': isDisabled,
1034 'control--is-focused': isFocused,
1035 'control--menu-is-open': menuIsOpen
1036 }), innerProps, {
1037 "aria-disabled": isDisabled || undefined
1038 }), children);
1039};
1040var Control$1 = Control;
1041
1042var _excluded$1 = ["data"];
1043var groupCSS = function groupCSS(_ref, unstyled) {
1044 var spacing = _ref.theme.spacing;
1045 return unstyled ? {} : {
1046 paddingBottom: spacing.baseUnit * 2,
1047 paddingTop: spacing.baseUnit * 2
1048 };
1049};
1050var Group = function Group(props) {
1051 var children = props.children,
1052 cx = props.cx,
1053 getStyles = props.getStyles,
1054 getClassNames = props.getClassNames,
1055 Heading = props.Heading,
1056 headingProps = props.headingProps,
1057 innerProps = props.innerProps,
1058 label = props.label,
1059 theme = props.theme,
1060 selectProps = props.selectProps;
1061 return react.jsx("div", _extends({}, getStyleProps(props, 'group', {
1062 group: true
1063 }), innerProps), react.jsx(Heading, _extends({}, headingProps, {
1064 selectProps: selectProps,
1065 theme: theme,
1066 getStyles: getStyles,
1067 getClassNames: getClassNames,
1068 cx: cx
1069 }), label), react.jsx("div", null, children));
1070};
1071var groupHeadingCSS = function groupHeadingCSS(_ref2, unstyled) {
1072 var _ref2$theme = _ref2.theme,
1073 colors = _ref2$theme.colors,
1074 spacing = _ref2$theme.spacing;
1075 return _objectSpread({
1076 label: 'group',
1077 cursor: 'default',
1078 display: 'block'
1079 }, unstyled ? {} : {
1080 color: colors.neutral40,
1081 fontSize: '75%',
1082 fontWeight: 500,
1083 marginBottom: '0.25em',
1084 paddingLeft: spacing.baseUnit * 3,
1085 paddingRight: spacing.baseUnit * 3,
1086 textTransform: 'uppercase'
1087 });
1088};
1089var GroupHeading = function GroupHeading(props) {
1090 var _cleanCommonProps = cleanCommonProps(props);
1091 _cleanCommonProps.data;
1092 var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1);
1093 return react.jsx("div", _extends({}, getStyleProps(props, 'groupHeading', {
1094 'group-heading': true
1095 }), innerProps));
1096};
1097var Group$1 = Group;
1098
1099var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
1100var inputCSS = function inputCSS(_ref, unstyled) {
1101 var isDisabled = _ref.isDisabled,
1102 value = _ref.value,
1103 _ref$theme = _ref.theme,
1104 spacing = _ref$theme.spacing,
1105 colors = _ref$theme.colors;
1106 return _objectSpread(_objectSpread({
1107 visibility: isDisabled ? 'hidden' : 'visible',
1108 // force css to recompute when value change due to @emotion bug.
1109 // We can remove it whenever the bug is fixed.
1110 transform: value ? 'translateZ(0)' : ''
1111 }, containerStyle), unstyled ? {} : {
1112 margin: spacing.baseUnit / 2,
1113 paddingBottom: spacing.baseUnit / 2,
1114 paddingTop: spacing.baseUnit / 2,
1115 color: colors.neutral80
1116 });
1117};
1118var spacingStyle = {
1119 gridArea: '1 / 2',
1120 font: 'inherit',
1121 minWidth: '2px',
1122 border: 0,
1123 margin: 0,
1124 outline: 0,
1125 padding: 0
1126};
1127var containerStyle = {
1128 flex: '1 1 auto',
1129 display: 'inline-grid',
1130 gridArea: '1 / 1 / 2 / 3',
1131 gridTemplateColumns: '0 min-content',
1132 '&:after': _objectSpread({
1133 content: 'attr(data-value) " "',
1134 visibility: 'hidden',
1135 whiteSpace: 'pre'
1136 }, spacingStyle)
1137};
1138var inputStyle = function inputStyle(isHidden) {
1139 return _objectSpread({
1140 label: 'input',
1141 color: 'inherit',
1142 background: 0,
1143 opacity: isHidden ? 0 : 1,
1144 width: '100%'
1145 }, spacingStyle);
1146};
1147var Input = function Input(props) {
1148 var cx = props.cx,
1149 value = props.value;
1150 var _cleanCommonProps = cleanCommonProps(props),
1151 innerRef = _cleanCommonProps.innerRef,
1152 isDisabled = _cleanCommonProps.isDisabled,
1153 isHidden = _cleanCommonProps.isHidden,
1154 inputClassName = _cleanCommonProps.inputClassName,
1155 innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded);
1156 return react.jsx("div", _extends({}, getStyleProps(props, 'input', {
1157 'input-container': true
1158 }), {
1159 "data-value": value || ''
1160 }), react.jsx("input", _extends({
1161 className: cx({
1162 input: true
1163 }, inputClassName),
1164 ref: innerRef,
1165 style: inputStyle(isHidden),
1166 disabled: isDisabled
1167 }, innerProps)));
1168};
1169var Input$1 = Input;
1170
1171var multiValueCSS = function multiValueCSS(_ref, unstyled) {
1172 var _ref$theme = _ref.theme,
1173 spacing = _ref$theme.spacing,
1174 borderRadius = _ref$theme.borderRadius,
1175 colors = _ref$theme.colors;
1176 return _objectSpread({
1177 label: 'multiValue',
1178 display: 'flex',
1179 minWidth: 0
1180 }, unstyled ? {} : {
1181 backgroundColor: colors.neutral10,
1182 borderRadius: borderRadius / 2,
1183 margin: spacing.baseUnit / 2
1184 });
1185};
1186var multiValueLabelCSS = function multiValueLabelCSS(_ref2, unstyled) {
1187 var _ref2$theme = _ref2.theme,
1188 borderRadius = _ref2$theme.borderRadius,
1189 colors = _ref2$theme.colors,
1190 cropWithEllipsis = _ref2.cropWithEllipsis;
1191 return _objectSpread({
1192 overflow: 'hidden',
1193 textOverflow: cropWithEllipsis || cropWithEllipsis === undefined ? 'ellipsis' : undefined,
1194 whiteSpace: 'nowrap'
1195 }, unstyled ? {} : {
1196 borderRadius: borderRadius / 2,
1197 color: colors.neutral80,
1198 fontSize: '85%',
1199 padding: 3,
1200 paddingLeft: 6
1201 });
1202};
1203var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3, unstyled) {
1204 var _ref3$theme = _ref3.theme,
1205 spacing = _ref3$theme.spacing,
1206 borderRadius = _ref3$theme.borderRadius,
1207 colors = _ref3$theme.colors,
1208 isFocused = _ref3.isFocused;
1209 return _objectSpread({
1210 alignItems: 'center',
1211 display: 'flex'
1212 }, unstyled ? {} : {
1213 borderRadius: borderRadius / 2,
1214 backgroundColor: isFocused ? colors.dangerLight : undefined,
1215 paddingLeft: spacing.baseUnit,
1216 paddingRight: spacing.baseUnit,
1217 ':hover': {
1218 backgroundColor: colors.dangerLight,
1219 color: colors.danger
1220 }
1221 });
1222};
1223var MultiValueGeneric = function MultiValueGeneric(_ref4) {
1224 var children = _ref4.children,
1225 innerProps = _ref4.innerProps;
1226 return react.jsx("div", innerProps, children);
1227};
1228var MultiValueContainer = MultiValueGeneric;
1229var MultiValueLabel = MultiValueGeneric;
1230function MultiValueRemove(_ref5) {
1231 var children = _ref5.children,
1232 innerProps = _ref5.innerProps;
1233 return react.jsx("div", _extends({
1234 role: "button"
1235 }, innerProps), children || react.jsx(CrossIcon, {
1236 size: 14
1237 }));
1238}
1239var MultiValue = function MultiValue(props) {
1240 var children = props.children,
1241 components = props.components,
1242 data = props.data,
1243 innerProps = props.innerProps,
1244 isDisabled = props.isDisabled,
1245 removeProps = props.removeProps,
1246 selectProps = props.selectProps;
1247 var Container = components.Container,
1248 Label = components.Label,
1249 Remove = components.Remove;
1250 return react.jsx(Container, {
1251 data: data,
1252 innerProps: _objectSpread(_objectSpread({}, getStyleProps(props, 'multiValue', {
1253 'multi-value': true,
1254 'multi-value--is-disabled': isDisabled
1255 })), innerProps),
1256 selectProps: selectProps
1257 }, react.jsx(Label, {
1258 data: data,
1259 innerProps: _objectSpread({}, getStyleProps(props, 'multiValueLabel', {
1260 'multi-value__label': true
1261 })),
1262 selectProps: selectProps
1263 }, children), react.jsx(Remove, {
1264 data: data,
1265 innerProps: _objectSpread(_objectSpread({}, getStyleProps(props, 'multiValueRemove', {
1266 'multi-value__remove': true
1267 })), {}, {
1268 'aria-label': "Remove ".concat(children || 'option')
1269 }, removeProps),
1270 selectProps: selectProps
1271 }));
1272};
1273var MultiValue$1 = MultiValue;
1274
1275var optionCSS = function optionCSS(_ref, unstyled) {
1276 var isDisabled = _ref.isDisabled,
1277 isFocused = _ref.isFocused,
1278 isSelected = _ref.isSelected,
1279 _ref$theme = _ref.theme,
1280 spacing = _ref$theme.spacing,
1281 colors = _ref$theme.colors;
1282 return _objectSpread({
1283 label: 'option',
1284 cursor: 'default',
1285 display: 'block',
1286 fontSize: 'inherit',
1287 width: '100%',
1288 userSelect: 'none',
1289 WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)'
1290 }, unstyled ? {} : {
1291 backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
1292 color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
1293 padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"),
1294 // provide some affordance on touch devices
1295 ':active': {
1296 backgroundColor: !isDisabled ? isSelected ? colors.primary : colors.primary50 : undefined
1297 }
1298 });
1299};
1300var Option = function Option(props) {
1301 var children = props.children,
1302 isDisabled = props.isDisabled,
1303 isFocused = props.isFocused,
1304 isSelected = props.isSelected,
1305 innerRef = props.innerRef,
1306 innerProps = props.innerProps;
1307 return react.jsx("div", _extends({}, getStyleProps(props, 'option', {
1308 option: true,
1309 'option--is-disabled': isDisabled,
1310 'option--is-focused': isFocused,
1311 'option--is-selected': isSelected
1312 }), {
1313 ref: innerRef,
1314 "aria-disabled": isDisabled
1315 }, innerProps), children);
1316};
1317var Option$1 = Option;
1318
1319var placeholderCSS = function placeholderCSS(_ref, unstyled) {
1320 var _ref$theme = _ref.theme,
1321 spacing = _ref$theme.spacing,
1322 colors = _ref$theme.colors;
1323 return _objectSpread({
1324 label: 'placeholder',
1325 gridArea: '1 / 1 / 2 / 3'
1326 }, unstyled ? {} : {
1327 color: colors.neutral50,
1328 marginLeft: spacing.baseUnit / 2,
1329 marginRight: spacing.baseUnit / 2
1330 });
1331};
1332var Placeholder = function Placeholder(props) {
1333 var children = props.children,
1334 innerProps = props.innerProps;
1335 return react.jsx("div", _extends({}, getStyleProps(props, 'placeholder', {
1336 placeholder: true
1337 }), innerProps), children);
1338};
1339var Placeholder$1 = Placeholder;
1340
1341var css = function css(_ref, unstyled) {
1342 var isDisabled = _ref.isDisabled,
1343 _ref$theme = _ref.theme,
1344 spacing = _ref$theme.spacing,
1345 colors = _ref$theme.colors;
1346 return _objectSpread({
1347 label: 'singleValue',
1348 gridArea: '1 / 1 / 2 / 3',
1349 maxWidth: '100%',
1350 overflow: 'hidden',
1351 textOverflow: 'ellipsis',
1352 whiteSpace: 'nowrap'
1353 }, unstyled ? {} : {
1354 color: isDisabled ? colors.neutral40 : colors.neutral80,
1355 marginLeft: spacing.baseUnit / 2,
1356 marginRight: spacing.baseUnit / 2
1357 });
1358};
1359var SingleValue = function SingleValue(props) {
1360 var children = props.children,
1361 isDisabled = props.isDisabled,
1362 innerProps = props.innerProps;
1363 return react.jsx("div", _extends({}, getStyleProps(props, 'singleValue', {
1364 'single-value': true,
1365 'single-value--is-disabled': isDisabled
1366 }), innerProps), children);
1367};
1368var SingleValue$1 = SingleValue;
1369
1370var components = {
1371 ClearIndicator: ClearIndicator,
1372 Control: Control$1,
1373 DropdownIndicator: DropdownIndicator,
1374 DownChevron: DownChevron,
1375 CrossIcon: CrossIcon,
1376 Group: Group$1,
1377 GroupHeading: GroupHeading,
1378 IndicatorsContainer: IndicatorsContainer,
1379 IndicatorSeparator: IndicatorSeparator,
1380 Input: Input$1,
1381 LoadingIndicator: LoadingIndicator,
1382 Menu: Menu$1,
1383 MenuList: MenuList,
1384 MenuPortal: MenuPortal,
1385 LoadingMessage: LoadingMessage,
1386 NoOptionsMessage: NoOptionsMessage,
1387 MultiValue: MultiValue$1,
1388 MultiValueContainer: MultiValueContainer,
1389 MultiValueLabel: MultiValueLabel,
1390 MultiValueRemove: MultiValueRemove,
1391 Option: Option$1,
1392 Placeholder: Placeholder$1,
1393 SelectContainer: SelectContainer,
1394 SingleValue: SingleValue$1,
1395 ValueContainer: ValueContainer
1396};
1397var defaultComponents = function defaultComponents(props) {
1398 return _objectSpread(_objectSpread({}, components), props.components);
1399};
1400
1401exports.MenuPlacer = MenuPlacer;
1402exports.classNames = classNames;
1403exports.cleanValue = cleanValue;
1404exports.clearIndicatorCSS = clearIndicatorCSS;
1405exports.components = components;
1406exports.containerCSS = containerCSS;
1407exports.css = css$1;
1408exports.css$1 = css;
1409exports.defaultComponents = defaultComponents;
1410exports.dropdownIndicatorCSS = dropdownIndicatorCSS;
1411exports.groupCSS = groupCSS;
1412exports.groupHeadingCSS = groupHeadingCSS;
1413exports.handleInputChange = handleInputChange;
1414exports.indicatorSeparatorCSS = indicatorSeparatorCSS;
1415exports.indicatorsContainerCSS = indicatorsContainerCSS;
1416exports.inputCSS = inputCSS;
1417exports.isDocumentElement = isDocumentElement;
1418exports.isMobileDevice = isMobileDevice;
1419exports.isTouchCapable = isTouchCapable;
1420exports.loadingIndicatorCSS = loadingIndicatorCSS;
1421exports.loadingMessageCSS = loadingMessageCSS;
1422exports.menuCSS = menuCSS;
1423exports.menuListCSS = menuListCSS;
1424exports.menuPortalCSS = menuPortalCSS;
1425exports.multiValueAsValue = multiValueAsValue;
1426exports.multiValueCSS = multiValueCSS;
1427exports.multiValueLabelCSS = multiValueLabelCSS;
1428exports.multiValueRemoveCSS = multiValueRemoveCSS;
1429exports.noOptionsMessageCSS = noOptionsMessageCSS;
1430exports.noop = noop;
1431exports.notNullish = notNullish;
1432exports.optionCSS = optionCSS;
1433exports.placeholderCSS = placeholderCSS;
1434exports.removeProps = removeProps;
1435exports.scrollIntoView = scrollIntoView;
1436exports.singleValueAsValue = singleValueAsValue;
1437exports.supportsPassiveEvents = supportsPassiveEvents;
1438exports.valueContainerCSS = valueContainerCSS;
1439exports.valueTernary = valueTernary;