baseui 0.0.0-next-ab3501a → 0.0.0-next-cc22b61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,8 @@ exports.default = void 0;
9
9
 
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _chevronDownSmall = _interopRequireDefault(require("../icon/chevron-down-small"));
13
+
12
14
  var _locale = require("../locale");
13
15
 
14
16
  var _overrides = require("../helpers/overrides");
@@ -17,6 +19,8 @@ var _styledComponents = require("./styled-components");
17
19
 
18
20
  var _focusVisible = require("../utils/focusVisible");
19
21
 
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
20
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
25
 
22
26
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -219,16 +223,8 @@ ref) {
219
223
  }), title, /*#__PURE__*/React.createElement(ToggleIcon, _extends({
220
224
  viewBox: "0 0 24 24",
221
225
  title: localState.expanded ? locale.accordion.collapse : locale.accordion.expand,
222
- size: 16
223
- }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement("path", {
224
- fillRule: "evenodd",
225
- clipRule: "evenodd",
226
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
227
- })), /*#__PURE__*/React.createElement("path", {
228
- fillRule: "evenodd",
229
- clipRule: "evenodd",
230
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
231
- }))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
226
+ $size: 24
227
+ }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement(_chevronDownSmall.default, null)))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
232
228
  $height: contentHeight,
233
229
  onTransitionEnd: function onTransitionEnd() {
234
230
  if (localState.animationInProgress) {
@@ -92,7 +92,7 @@ var ToggleIconGroup = (0, _styles.styled)('g', function (props) {
92
92
  var $theme = props.$theme,
93
93
  $expanded = props.$expanded;
94
94
  return {
95
- transform: $expanded ? 'rotate(0)' : 'rotate(-90deg)',
95
+ transform: $expanded ? 'rotate(-180deg)' : 'rotate(0)',
96
96
  transformOrigin: 'center',
97
97
  transitionProperty: 'transform',
98
98
  transitionDuration: $theme.animation.timing500,
@@ -7,6 +7,7 @@ This source code is licensed under the MIT license found in the
7
7
  LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import * as React from 'react';
10
+ import ChevronDownSmall from '../icon/chevron-down-small';
10
11
  import { LocaleContext } from '../locale';
11
12
  import { getOverrides } from '../helpers/overrides';
12
13
  import { PanelContainer as StyledPanelContainer, Header as StyledHeader, Content as StyledContent, ToggleIcon as StyledToggleIcon, ToggleIconGroup as StyledToggleIconGroup, ContentAnimationContainer as StyledContentAnimationContainer } from './styled-components';
@@ -154,16 +155,8 @@ ref) => {
154
155
  }), title, /*#__PURE__*/React.createElement(ToggleIcon, _extends({
155
156
  viewBox: "0 0 24 24",
156
157
  title: localState.expanded ? locale.accordion.collapse : locale.accordion.expand,
157
- size: 16
158
- }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement("path", {
159
- fillRule: "evenodd",
160
- clipRule: "evenodd",
161
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
162
- })), /*#__PURE__*/React.createElement("path", {
163
- fillRule: "evenodd",
164
- clipRule: "evenodd",
165
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
166
- }))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
158
+ $size: 24
159
+ }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement(ChevronDownSmall, null)))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
167
160
  $height: contentHeight,
168
161
  onTransitionEnd: () => {
169
162
  if (localState.animationInProgress) {
@@ -91,7 +91,7 @@ export const ToggleIconGroup = styled('g', props => {
91
91
  $expanded
92
92
  } = props;
93
93
  return {
94
- transform: $expanded ? 'rotate(0)' : 'rotate(-90deg)',
94
+ transform: $expanded ? 'rotate(-180deg)' : 'rotate(0)',
95
95
  transformOrigin: 'center',
96
96
  transitionProperty: 'transform',
97
97
  transitionDuration: $theme.animation.timing500,
@@ -0,0 +1,50 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+
3
+ /*
4
+ Copyright (c) Uber Technologies, Inc.
5
+
6
+ This source code is licensed under the MIT license found in the
7
+ LICENSE file in the root directory of this source tree.
8
+ */
9
+ // BASEUI-GENERATED-REACT-ICON
10
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
11
+ import * as React from 'react';
12
+ import { useStyletron } from '../styles';
13
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
14
+ import Icon from './icon';
15
+
16
+ function ChevronDownSmall(props, ref) {
17
+ const [, theme] = useStyletron();
18
+ const {
19
+ title = 'Down Small',
20
+ size,
21
+ color,
22
+ overrides = {},
23
+ ...restProps
24
+ } = props;
25
+ const SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
26
+ {
27
+ component: theme.icons && theme.icons.ChevronDownSmall ? theme.icons.ChevronDownSmall : null
28
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
29
+ return /*#__PURE__*/React.createElement(Icon, _extends({
30
+ viewBox: "0 0 24 24",
31
+ ref: ref,
32
+ title: title,
33
+ size: size,
34
+ color: color,
35
+ overrides: {
36
+ Svg: SvgOverride
37
+ }
38
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
39
+ width: "24",
40
+ height: "24",
41
+ fill: "white"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ fillRule: "evenodd",
44
+ clipRule: "evenodd",
45
+ d: "M10.9394 15.5607C11.5252 16.1464 12.4749 16.1464 13.0607 15.5607L17.0607 11.5607C17.6465 10.9749 17.6465 10.0251 17.0607 9.43934C16.4749 8.85355 15.5252 8.85355 14.9394 9.43934L12 12.3787L9.06069 9.43934C8.4749 8.85355 7.52515 8.85355 6.93937 9.43934C6.35358 10.0251 6.35358 10.9749 6.93937 11.5607L10.9394 15.5607Z",
46
+ fill: "black"
47
+ }));
48
+ }
49
+
50
+ export default /*#__PURE__*/React.forwardRef(ChevronDownSmall);
@@ -0,0 +1,50 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+
3
+ /*
4
+ Copyright (c) Uber Technologies, Inc.
5
+
6
+ This source code is licensed under the MIT license found in the
7
+ LICENSE file in the root directory of this source tree.
8
+ */
9
+ // BASEUI-GENERATED-REACT-ICON
10
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
11
+ import * as React from 'react';
12
+ import { useStyletron } from '../styles';
13
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
14
+ import Icon from './icon';
15
+
16
+ function ChevronLeftSmall(props, ref) {
17
+ const [, theme] = useStyletron();
18
+ const {
19
+ title = 'Left Small',
20
+ size,
21
+ color,
22
+ overrides = {},
23
+ ...restProps
24
+ } = props;
25
+ const SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
26
+ {
27
+ component: theme.icons && theme.icons.ChevronLeftSmall ? theme.icons.ChevronLeftSmall : null
28
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
29
+ return /*#__PURE__*/React.createElement(Icon, _extends({
30
+ viewBox: "0 0 24 24",
31
+ ref: ref,
32
+ title: title,
33
+ size: size,
34
+ color: color,
35
+ overrides: {
36
+ Svg: SvgOverride
37
+ }
38
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
39
+ width: "24",
40
+ height: "24",
41
+ fill: "white"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ fillRule: "evenodd",
44
+ clipRule: "evenodd",
45
+ d: "M8.93937 10.9394C8.35358 11.5251 8.35358 12.4749 8.93937 13.0607L12.9394 17.0607C13.5252 17.6465 14.4749 17.6465 15.0607 17.0607C15.6465 16.4749 15.6465 15.5251 15.0607 14.9393L12.1213 12L15.0607 9.06066C15.6465 8.47487 15.6465 7.52512 15.0607 6.93934C14.4749 6.35355 13.5252 6.35355 12.9394 6.93934L8.93937 10.9394Z",
46
+ fill: "black"
47
+ }));
48
+ }
49
+
50
+ export default /*#__PURE__*/React.forwardRef(ChevronLeftSmall);
@@ -0,0 +1,50 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+
3
+ /*
4
+ Copyright (c) Uber Technologies, Inc.
5
+
6
+ This source code is licensed under the MIT license found in the
7
+ LICENSE file in the root directory of this source tree.
8
+ */
9
+ // BASEUI-GENERATED-REACT-ICON
10
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
11
+ import * as React from 'react';
12
+ import { useStyletron } from '../styles';
13
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
14
+ import Icon from './icon';
15
+
16
+ function ChevronRightSmall(props, ref) {
17
+ const [, theme] = useStyletron();
18
+ const {
19
+ title = 'Right Small',
20
+ size,
21
+ color,
22
+ overrides = {},
23
+ ...restProps
24
+ } = props;
25
+ const SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
26
+ {
27
+ component: theme.icons && theme.icons.ChevronRightSmall ? theme.icons.ChevronRightSmall : null
28
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
29
+ return /*#__PURE__*/React.createElement(Icon, _extends({
30
+ viewBox: "0 0 24 24",
31
+ ref: ref,
32
+ title: title,
33
+ size: size,
34
+ color: color,
35
+ overrides: {
36
+ Svg: SvgOverride
37
+ }
38
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
39
+ width: "24",
40
+ height: "24",
41
+ fill: "white"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ fillRule: "evenodd",
44
+ clipRule: "evenodd",
45
+ d: "M15.0607 13.0606C15.6465 12.4749 15.6465 11.5251 15.0607 10.9393L11.0607 6.93933C10.4749 6.35355 9.52516 6.35355 8.93937 6.93934C8.35358 7.52512 8.35358 8.47487 8.93937 9.06065L11.8787 12L8.93937 14.9393C8.35358 15.5251 8.35358 16.4749 8.93937 17.0607C9.52516 17.6464 10.4749 17.6464 11.0607 17.0607L15.0607 13.0606Z",
46
+ fill: "black"
47
+ }));
48
+ }
49
+
50
+ export default /*#__PURE__*/React.forwardRef(ChevronRightSmall);
@@ -0,0 +1,50 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
2
+
3
+ /*
4
+ Copyright (c) Uber Technologies, Inc.
5
+
6
+ This source code is licensed under the MIT license found in the
7
+ LICENSE file in the root directory of this source tree.
8
+ */
9
+ // BASEUI-GENERATED-REACT-ICON
10
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
11
+ import * as React from 'react';
12
+ import { useStyletron } from '../styles';
13
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
14
+ import Icon from './icon';
15
+
16
+ function ChevronUpSmall(props, ref) {
17
+ const [, theme] = useStyletron();
18
+ const {
19
+ title = 'Up Small',
20
+ size,
21
+ color,
22
+ overrides = {},
23
+ ...restProps
24
+ } = props;
25
+ const SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
26
+ {
27
+ component: theme.icons && theme.icons.ChevronUpSmall ? theme.icons.ChevronUpSmall : null
28
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
29
+ return /*#__PURE__*/React.createElement(Icon, _extends({
30
+ viewBox: "0 0 24 24",
31
+ ref: ref,
32
+ title: title,
33
+ size: size,
34
+ color: color,
35
+ overrides: {
36
+ Svg: SvgOverride
37
+ }
38
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
39
+ width: "24",
40
+ height: "24",
41
+ fill: "white"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ fillRule: "evenodd",
44
+ clipRule: "evenodd",
45
+ d: "M13.0607 8.93934C12.4749 8.35355 11.5251 8.35355 10.9394 8.93934L6.93936 12.9393C6.35358 13.5251 6.35358 14.4749 6.93936 15.0607C7.52515 15.6464 8.4749 15.6464 9.06068 15.0607L12 12.1213L14.9394 15.0607C15.5252 15.6464 16.4749 15.6464 17.0607 15.0607C17.6465 14.4749 17.6465 13.5251 17.0607 12.9393L13.0607 8.93934Z",
46
+ fill: "black"
47
+ }));
48
+ }
49
+
50
+ export default /*#__PURE__*/React.forwardRef(ChevronUpSmall);
@@ -285,7 +285,7 @@ class Select extends React.Component {
285
285
  switch (event.keyCode) {
286
286
  case 8:
287
287
  // backspace
288
- if (!this.state.inputValue && this.props.backspaceRemoves) {
288
+ if (!this.state.inputValue && this.props.clearable && this.props.backspaceRemoves) {
289
289
  event.preventDefault();
290
290
  this.backspaceValue();
291
291
  }
@@ -25,6 +25,7 @@ This source code is licensed under the MIT license found in the
25
25
  LICENSE file in the root directory of this source tree.
26
26
  */
27
27
  import * as React from 'react';
28
+ import ChevronDownSmall from '../icon/chevron-down-small';
28
29
  import { LocaleContext } from '../locale';
29
30
  import { getOverrides } from '../helpers/overrides';
30
31
  import { PanelContainer as StyledPanelContainer, Header as StyledHeader, Content as StyledContent, ToggleIcon as StyledToggleIcon, ToggleIconGroup as StyledToggleIconGroup, ContentAnimationContainer as StyledContentAnimationContainer } from './styled-components';
@@ -208,16 +209,8 @@ ref) {
208
209
  }), title, /*#__PURE__*/React.createElement(ToggleIcon, _extends({
209
210
  viewBox: "0 0 24 24",
210
211
  title: localState.expanded ? locale.accordion.collapse : locale.accordion.expand,
211
- size: 16
212
- }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement("path", {
213
- fillRule: "evenodd",
214
- clipRule: "evenodd",
215
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
216
- })), /*#__PURE__*/React.createElement("path", {
217
- fillRule: "evenodd",
218
- clipRule: "evenodd",
219
- d: "M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z"
220
- }))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
212
+ $size: 24
213
+ }, toggleIconProps, sharedProps), /*#__PURE__*/React.createElement(ToggleIconGroup, _extends({}, sharedProps, toggleIconGroupProps), /*#__PURE__*/React.createElement(ChevronDownSmall, null)))), /*#__PURE__*/React.createElement(ContentAnimationContainer, _extends({}, sharedProps, contentAnimationProps, {
221
214
  $height: contentHeight,
222
215
  onTransitionEnd: function onTransitionEnd() {
223
216
  if (localState.animationInProgress) {
@@ -86,7 +86,7 @@ export var ToggleIconGroup = styled('g', function (props) {
86
86
  var $theme = props.$theme,
87
87
  $expanded = props.$expanded;
88
88
  return {
89
- transform: $expanded ? 'rotate(0)' : 'rotate(-90deg)',
89
+ transform: $expanded ? 'rotate(-180deg)' : 'rotate(0)',
90
90
  transformOrigin: 'center',
91
91
  transitionProperty: 'transform',
92
92
  transitionDuration: $theme.animation.timing500,
@@ -0,0 +1,72 @@
1
+ var _excluded = ["title", "size", "color", "overrides"];
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ /*
22
+ Copyright (c) Uber Technologies, Inc.
23
+
24
+ This source code is licensed under the MIT license found in the
25
+ LICENSE file in the root directory of this source tree.
26
+ */
27
+ // BASEUI-GENERATED-REACT-ICON
28
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
29
+ import * as React from 'react';
30
+ import { useStyletron } from '../styles';
31
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
32
+ import Icon from './icon';
33
+
34
+ function ChevronDownSmall(props, ref) {
35
+ var _useStyletron = useStyletron(),
36
+ _useStyletron2 = _slicedToArray(_useStyletron, 2),
37
+ theme = _useStyletron2[1];
38
+
39
+ var _props$title = props.title,
40
+ title = _props$title === void 0 ? 'Down Small' : _props$title,
41
+ size = props.size,
42
+ color = props.color,
43
+ _props$overrides = props.overrides,
44
+ overrides = _props$overrides === void 0 ? {} : _props$overrides,
45
+ restProps = _objectWithoutProperties(props, _excluded);
46
+
47
+ var SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
48
+ {
49
+ component: theme.icons && theme.icons.ChevronDownSmall ? theme.icons.ChevronDownSmall : null
50
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
51
+ return /*#__PURE__*/React.createElement(Icon, _extends({
52
+ viewBox: "0 0 24 24",
53
+ ref: ref,
54
+ title: title,
55
+ size: size,
56
+ color: color,
57
+ overrides: {
58
+ Svg: SvgOverride
59
+ }
60
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
61
+ width: "24",
62
+ height: "24",
63
+ fill: "white"
64
+ }), /*#__PURE__*/React.createElement("path", {
65
+ fillRule: "evenodd",
66
+ clipRule: "evenodd",
67
+ d: "M10.9394 15.5607C11.5252 16.1464 12.4749 16.1464 13.0607 15.5607L17.0607 11.5607C17.6465 10.9749 17.6465 10.0251 17.0607 9.43934C16.4749 8.85355 15.5252 8.85355 14.9394 9.43934L12 12.3787L9.06069 9.43934C8.4749 8.85355 7.52515 8.85355 6.93937 9.43934C6.35358 10.0251 6.35358 10.9749 6.93937 11.5607L10.9394 15.5607Z",
68
+ fill: "black"
69
+ }));
70
+ }
71
+
72
+ export default /*#__PURE__*/React.forwardRef(ChevronDownSmall);
@@ -0,0 +1,72 @@
1
+ var _excluded = ["title", "size", "color", "overrides"];
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ /*
22
+ Copyright (c) Uber Technologies, Inc.
23
+
24
+ This source code is licensed under the MIT license found in the
25
+ LICENSE file in the root directory of this source tree.
26
+ */
27
+ // BASEUI-GENERATED-REACT-ICON
28
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
29
+ import * as React from 'react';
30
+ import { useStyletron } from '../styles';
31
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
32
+ import Icon from './icon';
33
+
34
+ function ChevronLeftSmall(props, ref) {
35
+ var _useStyletron = useStyletron(),
36
+ _useStyletron2 = _slicedToArray(_useStyletron, 2),
37
+ theme = _useStyletron2[1];
38
+
39
+ var _props$title = props.title,
40
+ title = _props$title === void 0 ? 'Left Small' : _props$title,
41
+ size = props.size,
42
+ color = props.color,
43
+ _props$overrides = props.overrides,
44
+ overrides = _props$overrides === void 0 ? {} : _props$overrides,
45
+ restProps = _objectWithoutProperties(props, _excluded);
46
+
47
+ var SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
48
+ {
49
+ component: theme.icons && theme.icons.ChevronLeftSmall ? theme.icons.ChevronLeftSmall : null
50
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
51
+ return /*#__PURE__*/React.createElement(Icon, _extends({
52
+ viewBox: "0 0 24 24",
53
+ ref: ref,
54
+ title: title,
55
+ size: size,
56
+ color: color,
57
+ overrides: {
58
+ Svg: SvgOverride
59
+ }
60
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
61
+ width: "24",
62
+ height: "24",
63
+ fill: "white"
64
+ }), /*#__PURE__*/React.createElement("path", {
65
+ fillRule: "evenodd",
66
+ clipRule: "evenodd",
67
+ d: "M8.93937 10.9394C8.35358 11.5251 8.35358 12.4749 8.93937 13.0607L12.9394 17.0607C13.5252 17.6465 14.4749 17.6465 15.0607 17.0607C15.6465 16.4749 15.6465 15.5251 15.0607 14.9393L12.1213 12L15.0607 9.06066C15.6465 8.47487 15.6465 7.52512 15.0607 6.93934C14.4749 6.35355 13.5252 6.35355 12.9394 6.93934L8.93937 10.9394Z",
68
+ fill: "black"
69
+ }));
70
+ }
71
+
72
+ export default /*#__PURE__*/React.forwardRef(ChevronLeftSmall);
@@ -0,0 +1,72 @@
1
+ var _excluded = ["title", "size", "color", "overrides"];
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ /*
22
+ Copyright (c) Uber Technologies, Inc.
23
+
24
+ This source code is licensed under the MIT license found in the
25
+ LICENSE file in the root directory of this source tree.
26
+ */
27
+ // BASEUI-GENERATED-REACT-ICON
28
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
29
+ import * as React from 'react';
30
+ import { useStyletron } from '../styles';
31
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
32
+ import Icon from './icon';
33
+
34
+ function ChevronRightSmall(props, ref) {
35
+ var _useStyletron = useStyletron(),
36
+ _useStyletron2 = _slicedToArray(_useStyletron, 2),
37
+ theme = _useStyletron2[1];
38
+
39
+ var _props$title = props.title,
40
+ title = _props$title === void 0 ? 'Right Small' : _props$title,
41
+ size = props.size,
42
+ color = props.color,
43
+ _props$overrides = props.overrides,
44
+ overrides = _props$overrides === void 0 ? {} : _props$overrides,
45
+ restProps = _objectWithoutProperties(props, _excluded);
46
+
47
+ var SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
48
+ {
49
+ component: theme.icons && theme.icons.ChevronRightSmall ? theme.icons.ChevronRightSmall : null
50
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
51
+ return /*#__PURE__*/React.createElement(Icon, _extends({
52
+ viewBox: "0 0 24 24",
53
+ ref: ref,
54
+ title: title,
55
+ size: size,
56
+ color: color,
57
+ overrides: {
58
+ Svg: SvgOverride
59
+ }
60
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
61
+ width: "24",
62
+ height: "24",
63
+ fill: "white"
64
+ }), /*#__PURE__*/React.createElement("path", {
65
+ fillRule: "evenodd",
66
+ clipRule: "evenodd",
67
+ d: "M15.0607 13.0606C15.6465 12.4749 15.6465 11.5251 15.0607 10.9393L11.0607 6.93933C10.4749 6.35355 9.52516 6.35355 8.93937 6.93934C8.35358 7.52512 8.35358 8.47487 8.93937 9.06065L11.8787 12L8.93937 14.9393C8.35358 15.5251 8.35358 16.4749 8.93937 17.0607C9.52516 17.6464 10.4749 17.6464 11.0607 17.0607L15.0607 13.0606Z",
68
+ fill: "black"
69
+ }));
70
+ }
71
+
72
+ export default /*#__PURE__*/React.forwardRef(ChevronRightSmall);
@@ -0,0 +1,72 @@
1
+ var _excluded = ["title", "size", "color", "overrides"];
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
4
+
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ /*
22
+ Copyright (c) Uber Technologies, Inc.
23
+
24
+ This source code is licensed under the MIT license found in the
25
+ LICENSE file in the root directory of this source tree.
26
+ */
27
+ // BASEUI-GENERATED-REACT-ICON
28
+ // DO NOT EDIT THIS FILE DIRECTLY, SEE README.md
29
+ import * as React from 'react';
30
+ import { useStyletron } from '../styles';
31
+ import { mergeOverride, toObjectOverride } from '../helpers/overrides';
32
+ import Icon from './icon';
33
+
34
+ function ChevronUpSmall(props, ref) {
35
+ var _useStyletron = useStyletron(),
36
+ _useStyletron2 = _slicedToArray(_useStyletron, 2),
37
+ theme = _useStyletron2[1];
38
+
39
+ var _props$title = props.title,
40
+ title = _props$title === void 0 ? 'Up Small' : _props$title,
41
+ size = props.size,
42
+ color = props.color,
43
+ _props$overrides = props.overrides,
44
+ overrides = _props$overrides === void 0 ? {} : _props$overrides,
45
+ restProps = _objectWithoutProperties(props, _excluded);
46
+
47
+ var SvgOverride = mergeOverride( // Icons from the theme target the SVG override in the underlying Icon component
48
+ {
49
+ component: theme.icons && theme.icons.ChevronUpSmall ? theme.icons.ChevronUpSmall : null
50
+ }, overrides && overrides.Svg ? toObjectOverride(overrides.Svg) : {});
51
+ return /*#__PURE__*/React.createElement(Icon, _extends({
52
+ viewBox: "0 0 24 24",
53
+ ref: ref,
54
+ title: title,
55
+ size: size,
56
+ color: color,
57
+ overrides: {
58
+ Svg: SvgOverride
59
+ }
60
+ }, restProps), /*#__PURE__*/React.createElement("rect", {
61
+ width: "24",
62
+ height: "24",
63
+ fill: "white"
64
+ }), /*#__PURE__*/React.createElement("path", {
65
+ fillRule: "evenodd",
66
+ clipRule: "evenodd",
67
+ d: "M13.0607 8.93934C12.4749 8.35355 11.5251 8.35355 10.9394 8.93934L6.93936 12.9393C6.35358 13.5251 6.35358 14.4749 6.93936 15.0607C7.52515 15.6464 8.4749 15.6464 9.06068 15.0607L12 12.1213L14.9394 15.0607C15.5252 15.6464 16.4749 15.6464 17.0607 15.0607C17.6465 14.4749 17.6465 13.5251 17.0607 12.9393L13.0607 8.93934Z",
68
+ fill: "black"
69
+ }));
70
+ }
71
+
72
+ export default /*#__PURE__*/React.forwardRef(ChevronUpSmall);
@@ -361,7 +361,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
361
361
  switch (event.keyCode) {
362
362
  case 8:
363
363
  // backspace
364
- if (!_this.state.inputValue && _this.props.backspaceRemoves) {
364
+ if (!_this.state.inputValue && _this.props.clearable && _this.props.backspaceRemoves) {
365
365
  event.preventDefault();
366
366
 
367
367
  _this.backspaceValue();