|
- 'use strict';
-
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
- var React = require('react');
- var React__default = _interopDefault(React);
- var core = require('@emotion/core');
- var reactDom = require('react-dom');
- var PropTypes = _interopDefault(require('prop-types'));
- var utils = require('./utils-03a02e63.cjs.dev.js');
- var _css = _interopDefault(require('@emotion/css'));
- var AutosizeInput = _interopDefault(require('react-input-autosize'));
-
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
-
- function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
- function getMenuPlacement(_ref) {
- var maxHeight = _ref.maxHeight,
- menuEl = _ref.menuEl,
- minHeight = _ref.minHeight,
- placement = _ref.placement,
- shouldScroll = _ref.shouldScroll,
- isFixedPosition = _ref.isFixedPosition,
- theme = _ref.theme;
- var spacing = theme.spacing;
- var scrollParent = utils.getScrollParent(menuEl);
- var defaultState = {
- placement: 'bottom',
- maxHeight: maxHeight
- }; // something went wrong, return default state
-
- if (!menuEl || !menuEl.offsetParent) return defaultState; // we can't trust `scrollParent.scrollHeight` --> it may increase when
- // the menu is rendered
-
- var _scrollParent$getBoun = scrollParent.getBoundingClientRect(),
- scrollHeight = _scrollParent$getBoun.height;
-
- var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(),
- menuBottom = _menuEl$getBoundingCl.bottom,
- menuHeight = _menuEl$getBoundingCl.height,
- menuTop = _menuEl$getBoundingCl.top;
-
- var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(),
- containerTop = _menuEl$offsetParent$.top;
-
- var viewHeight = window.innerHeight;
- var scrollTop = utils.getScrollTop(scrollParent);
- var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10);
- var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10);
- var viewSpaceAbove = containerTop - marginTop;
- var viewSpaceBelow = viewHeight - menuTop;
- var scrollSpaceAbove = viewSpaceAbove + scrollTop;
- var scrollSpaceBelow = scrollHeight - scrollTop - menuTop;
- var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom;
- var scrollUp = scrollTop + menuTop - marginTop;
- var scrollDuration = 160;
-
- switch (placement) {
- case 'auto':
- case 'bottom':
- // 1: the menu will fit, do nothing
- if (viewSpaceBelow >= menuHeight) {
- return {
- placement: 'bottom',
- maxHeight: maxHeight
- };
- } // 2: the menu will fit, if scrolled
-
-
- if (scrollSpaceBelow >= menuHeight && !isFixedPosition) {
- if (shouldScroll) {
- utils.animatedScrollTo(scrollParent, scrollDown, scrollDuration);
- }
-
- return {
- placement: 'bottom',
- maxHeight: maxHeight
- };
- } // 3: the menu will fit, if constrained
-
-
- if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) {
- if (shouldScroll) {
- utils.animatedScrollTo(scrollParent, scrollDown, scrollDuration);
- } // we want to provide as much of the menu as possible to the user,
- // so give them whatever is available below rather than the minHeight.
-
-
- var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom;
- return {
- placement: 'bottom',
- maxHeight: constrainedHeight
- };
- } // 4. Forked beviour when there isn't enough space below
- // AUTO: flip the menu, render above
-
-
- if (placement === 'auto' || isFixedPosition) {
- // may need to be constrained after flipping
- var _constrainedHeight = maxHeight;
- var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove;
-
- if (spaceAbove >= minHeight) {
- _constrainedHeight = Math.min(spaceAbove - marginBottom - spacing.controlHeight, maxHeight);
- }
-
- return {
- placement: 'top',
- maxHeight: _constrainedHeight
- };
- } // BOTTOM: allow browser to increase scrollable area and immediately set scroll
-
-
- if (placement === 'bottom') {
- utils.scrollTo(scrollParent, scrollDown);
- return {
- placement: 'bottom',
- maxHeight: maxHeight
- };
- }
-
- break;
-
- case 'top':
- // 1: the menu will fit, do nothing
- if (viewSpaceAbove >= menuHeight) {
- return {
- placement: 'top',
- maxHeight: maxHeight
- };
- } // 2: the menu will fit, if scrolled
-
-
- if (scrollSpaceAbove >= menuHeight && !isFixedPosition) {
- if (shouldScroll) {
- utils.animatedScrollTo(scrollParent, scrollUp, scrollDuration);
- }
-
- return {
- placement: 'top',
- maxHeight: maxHeight
- };
- } // 3: the menu will fit, if constrained
-
-
- if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
- var _constrainedHeight2 = maxHeight; // we want to provide as much of the menu as possible to the user,
- // so give them whatever is available below rather than the minHeight.
-
- if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) {
- _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop;
- }
-
- if (shouldScroll) {
- utils.animatedScrollTo(scrollParent, scrollUp, scrollDuration);
- }
-
- return {
- placement: 'top',
- maxHeight: _constrainedHeight2
- };
- } // 4. not enough space, the browser WILL NOT increase scrollable area when
- // absolutely positioned element rendered above the viewport (only below).
- // Flip the menu, render below
-
-
- return {
- placement: 'bottom',
- maxHeight: maxHeight
- };
-
- default:
- throw new Error("Invalid placement provided \"" + placement + "\".");
- } // fulfil contract with flow: implicit return value of undefined
-
-
- return defaultState;
- } // Menu Component
- // ------------------------------
-
- function alignToControl(placement) {
- var placementToCSSProp = {
- bottom: 'top',
- top: 'bottom'
- };
- return placement ? placementToCSSProp[placement] : 'bottom';
- }
-
- var coercePlacement = function coercePlacement(p) {
- return p === 'auto' ? 'bottom' : p;
- };
-
- var menuCSS = function menuCSS(_ref2) {
- var _ref3;
-
- var placement = _ref2.placement,
- _ref2$theme = _ref2.theme,
- borderRadius = _ref2$theme.borderRadius,
- spacing = _ref2$theme.spacing,
- colors = _ref2$theme.colors;
- return _ref3 = {
- label: 'menu'
- }, _ref3[alignToControl(placement)] = '100%', _ref3.backgroundColor = colors.neutral0, _ref3.borderRadius = borderRadius, _ref3.boxShadow = '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)', _ref3.marginBottom = spacing.menuGutter, _ref3.marginTop = spacing.menuGutter, _ref3.position = 'absolute', _ref3.width = '100%', _ref3.zIndex = 1, _ref3;
- }; // NOTE: internal only
-
- var MenuPlacer =
- /*#__PURE__*/
- function (_Component) {
- _inheritsLoose(MenuPlacer, _Component);
-
- function MenuPlacer() {
- var _this;
-
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- _this = _Component.call.apply(_Component, [this].concat(args)) || this;
- _this.state = {
- maxHeight: _this.props.maxMenuHeight,
- placement: null
- };
-
- _this.getPlacement = function (ref) {
- var _this$props = _this.props,
- minMenuHeight = _this$props.minMenuHeight,
- maxMenuHeight = _this$props.maxMenuHeight,
- menuPlacement = _this$props.menuPlacement,
- menuPosition = _this$props.menuPosition,
- menuShouldScrollIntoView = _this$props.menuShouldScrollIntoView,
- theme = _this$props.theme;
- var getPortalPlacement = _this.context.getPortalPlacement;
- if (!ref) return; // DO NOT scroll if position is fixed
-
- var isFixedPosition = menuPosition === 'fixed';
- var shouldScroll = menuShouldScrollIntoView && !isFixedPosition;
- var state = getMenuPlacement({
- maxHeight: maxMenuHeight,
- menuEl: ref,
- minHeight: minMenuHeight,
- placement: menuPlacement,
- shouldScroll: shouldScroll,
- isFixedPosition: isFixedPosition,
- theme: theme
- });
- if (getPortalPlacement) getPortalPlacement(state);
-
- _this.setState(state);
- };
-
- _this.getUpdatedProps = function () {
- var menuPlacement = _this.props.menuPlacement;
- var placement = _this.state.placement || coercePlacement(menuPlacement);
- return _extends({}, _this.props, {
- placement: placement,
- maxHeight: _this.state.maxHeight
- });
- };
-
- return _this;
- }
-
- var _proto = MenuPlacer.prototype;
-
- _proto.render = function render() {
- var children = this.props.children;
- return children({
- ref: this.getPlacement,
- placerProps: this.getUpdatedProps()
- });
- };
-
- return MenuPlacer;
- }(React.Component);
- MenuPlacer.contextTypes = {
- getPortalPlacement: PropTypes.func
- };
-
- var Menu = function Menu(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerRef = props.innerRef,
- innerProps = props.innerProps;
- return core.jsx("div", _extends({
- css: getStyles('menu', props),
- className: cx({
- menu: true
- }, className)
- }, innerProps, {
- ref: innerRef
- }), children);
- };
- // Menu List
- // ==============================
-
- var menuListCSS = function menuListCSS(_ref4) {
- var maxHeight = _ref4.maxHeight,
- baseUnit = _ref4.theme.spacing.baseUnit;
- return {
- maxHeight: maxHeight,
- overflowY: 'auto',
- paddingBottom: baseUnit,
- paddingTop: baseUnit,
- position: 'relative',
- // required for offset[Height, Top] > keyboard scroll
- WebkitOverflowScrolling: 'touch'
- };
- };
- var MenuList = function MenuList(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- isMulti = props.isMulti,
- innerRef = props.innerRef;
- return core.jsx("div", {
- css: getStyles('menuList', props),
- className: cx({
- 'menu-list': true,
- 'menu-list--is-multi': isMulti
- }, className),
- ref: innerRef
- }, children);
- }; // ==============================
- // Menu Notices
- // ==============================
-
- var noticeCSS = function noticeCSS(_ref5) {
- var _ref5$theme = _ref5.theme,
- baseUnit = _ref5$theme.spacing.baseUnit,
- colors = _ref5$theme.colors;
- return {
- color: colors.neutral40,
- padding: baseUnit * 2 + "px " + baseUnit * 3 + "px",
- textAlign: 'center'
- };
- };
-
- var noOptionsMessageCSS = noticeCSS;
- var loadingMessageCSS = noticeCSS;
- var NoOptionsMessage = function NoOptionsMessage(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("div", _extends({
- css: getStyles('noOptionsMessage', props),
- className: cx({
- 'menu-notice': true,
- 'menu-notice--no-options': true
- }, className)
- }, innerProps), children);
- };
- NoOptionsMessage.defaultProps = {
- children: 'No options'
- };
- var LoadingMessage = function LoadingMessage(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("div", _extends({
- css: getStyles('loadingMessage', props),
- className: cx({
- 'menu-notice': true,
- 'menu-notice--loading': true
- }, className)
- }, innerProps), children);
- };
- LoadingMessage.defaultProps = {
- children: 'Loading...'
- }; // ==============================
- // Menu Portal
- // ==============================
-
- var menuPortalCSS = function menuPortalCSS(_ref6) {
- var rect = _ref6.rect,
- offset = _ref6.offset,
- position = _ref6.position;
- return {
- left: rect.left,
- position: position,
- top: offset,
- width: rect.width,
- zIndex: 1
- };
- };
- var MenuPortal =
- /*#__PURE__*/
- function (_Component2) {
- _inheritsLoose(MenuPortal, _Component2);
-
- function MenuPortal() {
- var _this2;
-
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- _this2 = _Component2.call.apply(_Component2, [this].concat(args)) || this;
- _this2.state = {
- placement: null
- };
-
- _this2.getPortalPlacement = function (_ref7) {
- var placement = _ref7.placement;
- var initialPlacement = coercePlacement(_this2.props.menuPlacement); // avoid re-renders if the placement has not changed
-
- if (placement !== initialPlacement) {
- _this2.setState({
- placement: placement
- });
- }
- };
-
- return _this2;
- }
-
- var _proto2 = MenuPortal.prototype;
-
- _proto2.getChildContext = function getChildContext() {
- return {
- getPortalPlacement: this.getPortalPlacement
- };
- } // callback for occassions where the menu must "flip"
- ;
-
- _proto2.render = function render() {
- var _this$props2 = this.props,
- appendTo = _this$props2.appendTo,
- children = _this$props2.children,
- controlElement = _this$props2.controlElement,
- menuPlacement = _this$props2.menuPlacement,
- position = _this$props2.menuPosition,
- getStyles = _this$props2.getStyles;
- var isFixed = position === 'fixed'; // bail early if required elements aren't present
-
- if (!appendTo && !isFixed || !controlElement) {
- return null;
- }
-
- var placement = this.state.placement || coercePlacement(menuPlacement);
- var rect = utils.getBoundingClientObj(controlElement);
- var scrollDistance = isFixed ? 0 : window.pageYOffset;
- var offset = rect[placement] + scrollDistance;
- var state = {
- offset: offset,
- position: position,
- rect: rect
- }; // same wrapper element whether fixed or portalled
-
- var menuWrapper = core.jsx("div", {
- css: getStyles('menuPortal', state)
- }, children);
- return appendTo ? reactDom.createPortal(menuWrapper, appendTo) : menuWrapper;
- };
-
- return MenuPortal;
- }(React.Component);
- MenuPortal.childContextTypes = {
- getPortalPlacement: PropTypes.func
- };
-
- var isArray = Array.isArray;
- var keyList = Object.keys;
- var hasProp = Object.prototype.hasOwnProperty;
-
- function equal(a, b) {
- // fast-deep-equal index.js 2.0.1
- if (a === b) return true;
-
- if (a && b && typeof a == 'object' && typeof b == 'object') {
- var arrA = isArray(a),
- arrB = isArray(b),
- i,
- length,
- key;
-
- if (arrA && arrB) {
- length = a.length;
- if (length != b.length) return false;
-
- for (i = length; i-- !== 0;) {
- if (!equal(a[i], b[i])) return false;
- }
-
- return true;
- }
-
- if (arrA != arrB) return false;
- var dateA = a instanceof Date,
- dateB = b instanceof Date;
- if (dateA != dateB) return false;
- if (dateA && dateB) return a.getTime() == b.getTime();
- var regexpA = a instanceof RegExp,
- regexpB = b instanceof RegExp;
- if (regexpA != regexpB) return false;
- if (regexpA && regexpB) return a.toString() == b.toString();
- var keys = keyList(a);
- length = keys.length;
-
- if (length !== keyList(b).length) {
- return false;
- }
-
- for (i = length; i-- !== 0;) {
- if (!hasProp.call(b, keys[i])) return false;
- } // end fast-deep-equal
- // Custom handling for React
-
-
- for (i = length; i-- !== 0;) {
- key = keys[i];
-
- if (key === '_owner' && a.$$typeof) {
- // React-specific: avoid traversing React elements' _owner.
- // _owner contains circular references
- // and is not needed when comparing the actual elements (and not their owners)
- // .$$typeof and ._store on just reasonable markers of a react element
- continue;
- } else {
- // all other properties should be traversed as usual
- if (!equal(a[key], b[key])) return false;
- }
- } // fast-deep-equal index.js 2.0.1
-
-
- return true;
- }
-
- return a !== a && b !== b;
- } // end fast-deep-equal
-
-
- function exportedEqual(a, b) {
- try {
- return equal(a, b);
- } catch (error) {
- if (error.message && error.message.match(/stack|recursion/i)) {
- // warn on circular references, don't crash
- // browsers give this different errors name and messages:
- // chrome/safari: "RangeError", "Maximum call stack size exceeded"
- // firefox: "InternalError", too much recursion"
- // edge: "Error", "Out of stack space"
- console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);
- return false;
- } // some other error. we should definitely know about these
-
-
- throw error;
- }
- }
-
- function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
- var containerCSS = function containerCSS(_ref) {
- var isDisabled = _ref.isDisabled,
- isRtl = _ref.isRtl;
- return {
- label: 'container',
- direction: isRtl ? 'rtl' : null,
- pointerEvents: isDisabled ? 'none' : null,
- // cancel mouse events when disabled
- position: 'relative'
- };
- };
- var SelectContainer = function SelectContainer(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps,
- isDisabled = props.isDisabled,
- isRtl = props.isRtl;
- return core.jsx("div", _extends$1({
- css: getStyles('container', props),
- className: cx({
- '--is-disabled': isDisabled,
- '--is-rtl': isRtl
- }, className)
- }, innerProps), children);
- }; // ==============================
- // Value Container
- // ==============================
-
- var valueContainerCSS = function valueContainerCSS(_ref2) {
- var spacing = _ref2.theme.spacing;
- return {
- alignItems: 'center',
- display: 'flex',
- flex: 1,
- flexWrap: 'wrap',
- padding: spacing.baseUnit / 2 + "px " + spacing.baseUnit * 2 + "px",
- WebkitOverflowScrolling: 'touch',
- position: 'relative',
- overflow: 'hidden'
- };
- };
- var ValueContainer = function ValueContainer(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- isMulti = props.isMulti,
- getStyles = props.getStyles,
- hasValue = props.hasValue;
- return core.jsx("div", {
- css: getStyles('valueContainer', props),
- className: cx({
- 'value-container': true,
- 'value-container--is-multi': isMulti,
- 'value-container--has-value': hasValue
- }, className)
- }, children);
- }; // ==============================
- // Indicator Container
- // ==============================
-
- var indicatorsContainerCSS = function indicatorsContainerCSS() {
- return {
- alignItems: 'center',
- alignSelf: 'stretch',
- display: 'flex',
- flexShrink: 0
- };
- };
- var IndicatorsContainer = function IndicatorsContainer(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles;
- return core.jsx("div", {
- css: getStyles('indicatorsContainer', props),
- className: cx({
- indicators: true
- }, className)
- }, children);
- };
-
- function _templateObject() {
- var data = _taggedTemplateLiteralLoose(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]);
-
- _templateObject = function _templateObject() {
- return data;
- };
-
- return data;
- }
-
- function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
-
- function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
-
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
-
- var _ref2 = process.env.NODE_ENV === "production" ? {
- name: "19bqh2r",
- styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"
- } : {
- name: "19bqh2r",
- styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;",
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0J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GVzKCdsb2FkaW5nSW5kaWNhdG9yJywgcHJvcHMpfVxuICAgICAgY2xhc3NOYW1lPXtjeChcbiAgICAgICAge1xuICAgICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgICAnbG9hZGluZy1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBjbGFzc05hbWVcbiAgICAgICl9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */"
- };
-
- // ==============================
- // Dropdown & Clear Icons
- // ==============================
- var Svg = function Svg(_ref) {
- var size = _ref.size,
- props = _objectWithoutPropertiesLoose(_ref, ["size"]);
-
- return core.jsx("svg", _extends$2({
- height: size,
- width: size,
- viewBox: "0 0 20 20",
- "aria-hidden": "true",
- focusable: "false",
- css: _ref2
- }, props));
- };
-
- var CrossIcon = function CrossIcon(props) {
- return core.jsx(Svg, _extends$2({
- size: 20
- }, props), core.jsx("path", {
- 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"
- }));
- };
- var DownChevron = function DownChevron(props) {
- return core.jsx(Svg, _extends$2({
- size: 20
- }, props), core.jsx("path", {
- 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"
- }));
- }; // ==============================
- // Dropdown & Clear Buttons
- // ==============================
-
- var baseCSS = function baseCSS(_ref3) {
- var isFocused = _ref3.isFocused,
- _ref3$theme = _ref3.theme,
- baseUnit = _ref3$theme.spacing.baseUnit,
- colors = _ref3$theme.colors;
- return {
- label: 'indicatorContainer',
- color: isFocused ? colors.neutral60 : colors.neutral20,
- display: 'flex',
- padding: baseUnit * 2,
- transition: 'color 150ms',
- ':hover': {
- color: isFocused ? colors.neutral80 : colors.neutral40
- }
- };
- };
-
- var dropdownIndicatorCSS = baseCSS;
- var DropdownIndicator = function DropdownIndicator(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("div", _extends$2({}, innerProps, {
- css: getStyles('dropdownIndicator', props),
- className: cx({
- indicator: true,
- 'dropdown-indicator': true
- }, className)
- }), children || core.jsx(DownChevron, null));
- };
- var clearIndicatorCSS = baseCSS;
- var ClearIndicator = function ClearIndicator(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("div", _extends$2({}, innerProps, {
- css: getStyles('clearIndicator', props),
- className: cx({
- indicator: true,
- 'clear-indicator': true
- }, className)
- }), children || core.jsx(CrossIcon, null));
- }; // ==============================
- // Separator
- // ==============================
-
- var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4) {
- var isDisabled = _ref4.isDisabled,
- _ref4$theme = _ref4.theme,
- baseUnit = _ref4$theme.spacing.baseUnit,
- colors = _ref4$theme.colors;
- return {
- label: 'indicatorSeparator',
- alignSelf: 'stretch',
- backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20,
- marginBottom: baseUnit * 2,
- marginTop: baseUnit * 2,
- width: 1
- };
- };
- var IndicatorSeparator = function IndicatorSeparator(props) {
- var className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("span", _extends$2({}, innerProps, {
- css: getStyles('indicatorSeparator', props),
- className: cx({
- 'indicator-separator': true
- }, className)
- }));
- }; // ==============================
- // Loading
- // ==============================
-
- var loadingDotAnimations = core.keyframes(_templateObject());
- var loadingIndicatorCSS = function loadingIndicatorCSS(_ref5) {
- var isFocused = _ref5.isFocused,
- size = _ref5.size,
- _ref5$theme = _ref5.theme,
- colors = _ref5$theme.colors,
- baseUnit = _ref5$theme.spacing.baseUnit;
- return {
- label: 'loadingIndicator',
- color: isFocused ? colors.neutral60 : colors.neutral20,
- display: 'flex',
- padding: baseUnit * 2,
- transition: 'color 150ms',
- alignSelf: 'center',
- fontSize: size,
- lineHeight: 1,
- marginRight: size,
- textAlign: 'center',
- verticalAlign: 'middle'
- };
- };
-
- var LoadingDot = function LoadingDot(_ref6) {
- var delay = _ref6.delay,
- offset = _ref6.offset;
- return core.jsx("span", {
- css:
- /*#__PURE__*/
- _css({
- animation: loadingDotAnimations + " 1s ease-in-out " + delay + "ms infinite;",
- backgroundColor: 'currentColor',
- borderRadius: '1em',
- display: 'inline-block',
- marginLeft: offset ? '1em' : null,
- height: '1em',
- verticalAlign: 'top',
- width: '1em'
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0xJIiwiZmlsZSI6ImluZGljYXRvcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyB0eXBlIE5vZG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cbiAgICAgICAgICAnbG9hZGluZy1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgICB9LFxuICAgICAgICBjbGFzc05hbWVcbiAgICAgICl9XG4gICAgPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezB9IG9mZnNldD17aXNSdGx9IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MTYwfSBvZmZzZXQgLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXszMjB9IG9mZnNldD17IWlzUnRsfSAvPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkxvYWRpbmdJbmRpY2F0b3IuZGVmYXVsdFByb3BzID0geyBzaXplOiA0IH07XG4iXX0= */")
- });
- };
-
- var LoadingIndicator = function LoadingIndicator(props) {
- var className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps,
- isRtl = props.isRtl;
- return core.jsx("div", _extends$2({}, innerProps, {
- css: getStyles('loadingIndicator', props),
- className: cx({
- indicator: true,
- 'loading-indicator': true
- }, className)
- }), core.jsx(LoadingDot, {
- delay: 0,
- offset: isRtl
- }), core.jsx(LoadingDot, {
- delay: 160,
- offset: true
- }), core.jsx(LoadingDot, {
- delay: 320,
- offset: !isRtl
- }));
- };
- LoadingIndicator.defaultProps = {
- size: 4
- };
-
- function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
- var css = function css(_ref) {
- var isDisabled = _ref.isDisabled,
- isFocused = _ref.isFocused,
- _ref$theme = _ref.theme,
- colors = _ref$theme.colors,
- borderRadius = _ref$theme.borderRadius,
- spacing = _ref$theme.spacing;
- return {
- label: 'control',
- alignItems: 'center',
- backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0,
- borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20,
- borderRadius: borderRadius,
- borderStyle: 'solid',
- borderWidth: 1,
- boxShadow: isFocused ? "0 0 0 1px " + colors.primary : null,
- cursor: 'default',
- display: 'flex',
- flexWrap: 'wrap',
- justifyContent: 'space-between',
- minHeight: spacing.controlHeight,
- outline: '0 !important',
- position: 'relative',
- transition: 'all 100ms',
- '&:hover': {
- borderColor: isFocused ? colors.primary : colors.neutral30
- }
- };
- };
-
- var Control = function Control(props) {
- var children = props.children,
- cx = props.cx,
- getStyles = props.getStyles,
- className = props.className,
- isDisabled = props.isDisabled,
- isFocused = props.isFocused,
- innerRef = props.innerRef,
- innerProps = props.innerProps,
- menuIsOpen = props.menuIsOpen;
- return core.jsx("div", _extends$3({
- ref: innerRef,
- css: getStyles('control', props),
- className: cx({
- control: true,
- 'control--is-disabled': isDisabled,
- 'control--is-focused': isFocused,
- 'control--menu-is-open': menuIsOpen
- }, className)
- }, innerProps), children);
- };
-
- function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
-
- function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
- var groupCSS = function groupCSS(_ref) {
- var spacing = _ref.theme.spacing;
- return {
- paddingBottom: spacing.baseUnit * 2,
- paddingTop: spacing.baseUnit * 2
- };
- };
-
- var Group = function Group(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- Heading = props.Heading,
- headingProps = props.headingProps,
- label = props.label,
- theme = props.theme,
- selectProps = props.selectProps;
- return core.jsx("div", {
- css: getStyles('group', props),
- className: cx({
- group: true
- }, className)
- }, core.jsx(Heading, _extends$4({}, headingProps, {
- selectProps: selectProps,
- theme: theme,
- getStyles: getStyles,
- cx: cx
- }), label), core.jsx("div", null, children));
- };
-
- var groupHeadingCSS = function groupHeadingCSS(_ref2) {
- var spacing = _ref2.theme.spacing;
- return {
- label: 'group',
- color: '#999',
- cursor: 'default',
- display: 'block',
- fontSize: '75%',
- fontWeight: '500',
- marginBottom: '0.25em',
- paddingLeft: spacing.baseUnit * 3,
- paddingRight: spacing.baseUnit * 3,
- textTransform: 'uppercase'
- };
- };
- var GroupHeading = function GroupHeading(props) {
- var className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- theme = props.theme,
- selectProps = props.selectProps,
- cleanProps = _objectWithoutPropertiesLoose$1(props, ["className", "cx", "getStyles", "theme", "selectProps"]);
-
- return core.jsx("div", _extends$4({
- css: getStyles('groupHeading', _extends$4({
- theme: theme
- }, cleanProps)),
- className: cx({
- 'group-heading': true
- }, className)
- }, cleanProps));
- };
-
- function _extends$5() { _extends$5 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
-
- function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
- var inputCSS = function inputCSS(_ref) {
- var isDisabled = _ref.isDisabled,
- _ref$theme = _ref.theme,
- spacing = _ref$theme.spacing,
- colors = _ref$theme.colors;
- return {
- margin: spacing.baseUnit / 2,
- paddingBottom: spacing.baseUnit / 2,
- paddingTop: spacing.baseUnit / 2,
- visibility: isDisabled ? 'hidden' : 'visible',
- color: colors.neutral80
- };
- };
-
- var inputStyle = function inputStyle(isHidden) {
- return {
- label: 'input',
- background: 0,
- border: 0,
- fontSize: 'inherit',
- opacity: isHidden ? 0 : 1,
- outline: 0,
- padding: 0,
- color: 'inherit'
- };
- };
-
- var Input = function Input(_ref2) {
- var className = _ref2.className,
- cx = _ref2.cx,
- getStyles = _ref2.getStyles,
- innerRef = _ref2.innerRef,
- isHidden = _ref2.isHidden,
- isDisabled = _ref2.isDisabled,
- theme = _ref2.theme,
- selectProps = _ref2.selectProps,
- props = _objectWithoutPropertiesLoose$2(_ref2, ["className", "cx", "getStyles", "innerRef", "isHidden", "isDisabled", "theme", "selectProps"]);
-
- return core.jsx("div", {
- css: getStyles('input', _extends$5({
- theme: theme
- }, props))
- }, core.jsx(AutosizeInput, _extends$5({
- className: cx({
- input: true
- }, className),
- inputRef: innerRef,
- inputStyle: inputStyle(isHidden),
- disabled: isDisabled
- }, props)));
- };
-
- function _extends$6() { _extends$6 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
- var multiValueCSS = function multiValueCSS(_ref) {
- var _ref$theme = _ref.theme,
- spacing = _ref$theme.spacing,
- borderRadius = _ref$theme.borderRadius,
- colors = _ref$theme.colors;
- return {
- label: 'multiValue',
- backgroundColor: colors.neutral10,
- borderRadius: borderRadius / 2,
- display: 'flex',
- margin: spacing.baseUnit / 2,
- minWidth: 0 // resolves flex/text-overflow bug
-
- };
- };
- var multiValueLabelCSS = function multiValueLabelCSS(_ref2) {
- var _ref2$theme = _ref2.theme,
- borderRadius = _ref2$theme.borderRadius,
- colors = _ref2$theme.colors,
- cropWithEllipsis = _ref2.cropWithEllipsis;
- return {
- borderRadius: borderRadius / 2,
- color: colors.neutral80,
- fontSize: '85%',
- overflow: 'hidden',
- padding: 3,
- paddingLeft: 6,
- textOverflow: cropWithEllipsis ? 'ellipsis' : null,
- whiteSpace: 'nowrap'
- };
- };
- var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3) {
- var _ref3$theme = _ref3.theme,
- spacing = _ref3$theme.spacing,
- borderRadius = _ref3$theme.borderRadius,
- colors = _ref3$theme.colors,
- isFocused = _ref3.isFocused;
- return {
- alignItems: 'center',
- borderRadius: borderRadius / 2,
- backgroundColor: isFocused && colors.dangerLight,
- display: 'flex',
- paddingLeft: spacing.baseUnit,
- paddingRight: spacing.baseUnit,
- ':hover': {
- backgroundColor: colors.dangerLight,
- color: colors.danger
- }
- };
- };
- var MultiValueGeneric = function MultiValueGeneric(_ref4) {
- var children = _ref4.children,
- innerProps = _ref4.innerProps;
- return core.jsx("div", innerProps, children);
- };
- var MultiValueContainer = MultiValueGeneric;
- var MultiValueLabel = MultiValueGeneric;
- function MultiValueRemove(_ref5) {
- var children = _ref5.children,
- innerProps = _ref5.innerProps;
- return core.jsx("div", innerProps, children || core.jsx(CrossIcon, {
- size: 14
- }));
- }
-
- var MultiValue = function MultiValue(props) {
- var children = props.children,
- className = props.className,
- components = props.components,
- cx = props.cx,
- data = props.data,
- getStyles = props.getStyles,
- innerProps = props.innerProps,
- isDisabled = props.isDisabled,
- removeProps = props.removeProps,
- selectProps = props.selectProps;
- var Container = components.Container,
- Label = components.Label,
- Remove = components.Remove;
- return core.jsx(core.ClassNames, null, function (_ref6) {
- var css = _ref6.css,
- emotionCx = _ref6.cx;
- return core.jsx(Container, {
- data: data,
- innerProps: _extends$6({}, innerProps, {
- className: emotionCx(css(getStyles('multiValue', props)), cx({
- 'multi-value': true,
- 'multi-value--is-disabled': isDisabled
- }, className))
- }),
- selectProps: selectProps
- }, core.jsx(Label, {
- data: data,
- innerProps: {
- className: emotionCx(css(getStyles('multiValueLabel', props)), cx({
- 'multi-value__label': true
- }, className))
- },
- selectProps: selectProps
- }, children), core.jsx(Remove, {
- data: data,
- innerProps: _extends$6({
- className: emotionCx(css(getStyles('multiValueRemove', props)), cx({
- 'multi-value__remove': true
- }, className))
- }, removeProps),
- selectProps: selectProps
- }));
- });
- };
-
- MultiValue.defaultProps = {
- cropWithEllipsis: true
- };
-
- function _extends$7() { _extends$7 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
- var optionCSS = function optionCSS(_ref) {
- var isDisabled = _ref.isDisabled,
- isFocused = _ref.isFocused,
- isSelected = _ref.isSelected,
- _ref$theme = _ref.theme,
- spacing = _ref$theme.spacing,
- colors = _ref$theme.colors;
- return {
- label: 'option',
- backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent',
- color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit',
- cursor: 'default',
- display: 'block',
- fontSize: 'inherit',
- padding: spacing.baseUnit * 2 + "px " + spacing.baseUnit * 3 + "px",
- width: '100%',
- userSelect: 'none',
- WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
- // provide some affordance on touch devices
- ':active': {
- backgroundColor: !isDisabled && (isSelected ? colors.primary : colors.primary50)
- }
- };
- };
-
- var Option = function Option(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- isDisabled = props.isDisabled,
- isFocused = props.isFocused,
- isSelected = props.isSelected,
- innerRef = props.innerRef,
- innerProps = props.innerProps;
- return core.jsx("div", _extends$7({
- css: getStyles('option', props),
- className: cx({
- option: true,
- 'option--is-disabled': isDisabled,
- 'option--is-focused': isFocused,
- 'option--is-selected': isSelected
- }, className),
- ref: innerRef
- }, innerProps), children);
- };
-
- function _extends$8() { _extends$8 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
- var placeholderCSS = function placeholderCSS(_ref) {
- var _ref$theme = _ref.theme,
- spacing = _ref$theme.spacing,
- colors = _ref$theme.colors;
- return {
- label: 'placeholder',
- color: colors.neutral50,
- marginLeft: spacing.baseUnit / 2,
- marginRight: spacing.baseUnit / 2,
- position: 'absolute',
- top: '50%',
- transform: 'translateY(-50%)'
- };
- };
-
- var Placeholder = function Placeholder(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- innerProps = props.innerProps;
- return core.jsx("div", _extends$8({
- css: getStyles('placeholder', props),
- className: cx({
- placeholder: true
- }, className)
- }, innerProps), children);
- };
-
- function _extends$9() { _extends$9 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
- var css$1 = function css(_ref) {
- var isDisabled = _ref.isDisabled,
- _ref$theme = _ref.theme,
- spacing = _ref$theme.spacing,
- colors = _ref$theme.colors;
- return {
- label: 'singleValue',
- color: isDisabled ? colors.neutral40 : colors.neutral80,
- marginLeft: spacing.baseUnit / 2,
- marginRight: spacing.baseUnit / 2,
- maxWidth: "calc(100% - " + spacing.baseUnit * 2 + "px)",
- overflow: 'hidden',
- position: 'absolute',
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- top: '50%',
- transform: 'translateY(-50%)'
- };
- };
-
- var SingleValue = function SingleValue(props) {
- var children = props.children,
- className = props.className,
- cx = props.cx,
- getStyles = props.getStyles,
- isDisabled = props.isDisabled,
- innerProps = props.innerProps;
- return core.jsx("div", _extends$9({
- css: getStyles('singleValue', props),
- className: cx({
- 'single-value': true,
- 'single-value--is-disabled': isDisabled
- }, className)
- }, innerProps), children);
- };
-
- function _extends$a() { _extends$a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
- var components = {
- ClearIndicator: ClearIndicator,
- Control: Control,
- DropdownIndicator: DropdownIndicator,
- DownChevron: DownChevron,
- CrossIcon: CrossIcon,
- Group: Group,
- GroupHeading: GroupHeading,
- IndicatorsContainer: IndicatorsContainer,
- IndicatorSeparator: IndicatorSeparator,
- Input: Input,
- LoadingIndicator: LoadingIndicator,
- Menu: Menu,
- MenuList: MenuList,
- MenuPortal: MenuPortal,
- LoadingMessage: LoadingMessage,
- NoOptionsMessage: NoOptionsMessage,
- MultiValue: MultiValue,
- MultiValueContainer: MultiValueContainer,
- MultiValueLabel: MultiValueLabel,
- MultiValueRemove: MultiValueRemove,
- Option: Option,
- Placeholder: Placeholder,
- SelectContainer: SelectContainer,
- SingleValue: SingleValue,
- ValueContainer: ValueContainer
- };
- var defaultComponents = function defaultComponents(props) {
- return _extends$a({}, components, props.components);
- };
-
- exports.MenuPlacer = MenuPlacer;
- exports.clearIndicatorCSS = clearIndicatorCSS;
- exports.components = components;
- exports.containerCSS = containerCSS;
- exports.css = css;
- exports.css$1 = css$1;
- exports.defaultComponents = defaultComponents;
- exports.dropdownIndicatorCSS = dropdownIndicatorCSS;
- exports.exportedEqual = exportedEqual;
- exports.groupCSS = groupCSS;
- exports.groupHeadingCSS = groupHeadingCSS;
- exports.indicatorSeparatorCSS = indicatorSeparatorCSS;
- exports.indicatorsContainerCSS = indicatorsContainerCSS;
- exports.inputCSS = inputCSS;
- exports.loadingIndicatorCSS = loadingIndicatorCSS;
- exports.loadingMessageCSS = loadingMessageCSS;
- exports.menuCSS = menuCSS;
- exports.menuListCSS = menuListCSS;
- exports.menuPortalCSS = menuPortalCSS;
- exports.multiValueCSS = multiValueCSS;
- exports.multiValueLabelCSS = multiValueLabelCSS;
- exports.multiValueRemoveCSS = multiValueRemoveCSS;
- exports.noOptionsMessageCSS = noOptionsMessageCSS;
- exports.optionCSS = optionCSS;
- exports.placeholderCSS = placeholderCSS;
- exports.valueContainerCSS = valueContainerCSS;
|