baseui 0.0.0-next-773a78c → 0.0.0-next-0df5daf

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.
@@ -41,7 +41,11 @@ const ListItem = /*#__PURE__*/React.forwardRef((props, ref) => {
41
41
  return /*#__PURE__*/React.createElement(Root // flowlint-next-line unclear-type:off
42
42
  , _extends({
43
43
  ref: ref,
44
- $shape: props.shape || SHAPE.DEFAULT
44
+ $shape: props.shape || SHAPE.DEFAULT,
45
+ "aria-label": props['aria-label'],
46
+ "aria-selected": props['aria-selected'],
47
+ id: props.id,
48
+ role: props.role
45
49
  }, rootProps), Artwork && /*#__PURE__*/React.createElement(ArtworkContainer, _extends({
46
50
  $artworkSize: artworkSize,
47
51
  $sublist: Boolean(props.sublist)
@@ -11,9 +11,13 @@ const MenuAdapter = /*#__PURE__*/React.forwardRef((props, ref) => {
11
11
  return /*#__PURE__*/React.createElement(ListItem, {
12
12
  ref: ref,
13
13
  sublist: props.sublist || props.$size === 'compact',
14
+ "aria-label": props['aria-label'],
15
+ "aria-selected": props['aria-selected'],
14
16
  artwork: props.artwork,
15
17
  artworkSize: props.artworkSize,
16
18
  endEnhancer: props.endEnhancer,
19
+ id: props.id,
20
+ role: props.role,
17
21
  overrides: mergeOverrides({
18
22
  Root: {
19
23
  props: {
@@ -17,13 +17,12 @@ import TriangleDownIcon from '../icon/triangle-down.js';
17
17
  import SearchIconComponent from '../icon/search.js';
18
18
  import { LocaleContext } from '../locale/index.js';
19
19
  import { Popover, PLACEMENT } from '../popover/index.js';
20
- import { Spinner } from '../spinner/index.js';
21
20
  import { UIDConsumer } from 'react-uid';
22
21
  import AutosizeInput from './autosize-input.js';
23
22
  import { TYPE, STATE_CHANGE_TYPE } from './constants.js';
24
23
  import defaultProps from './default-props.js';
25
24
  import SelectDropdown from './dropdown.js';
26
- import { StyledRoot, StyledControlContainer, StyledPlaceholder, StyledValueContainer, StyledInputContainer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon, getLoadingIconStyles, StyledSearchIconContainer } from './styled-components.js';
25
+ import { StyledRoot, StyledControlContainer, StyledPlaceholder, StyledValueContainer, StyledInputContainer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon, StyledSearchIconContainer, StyledLoadingIndicator } from './styled-components.js';
27
26
  import { expandValue, normalizeOptions } from './utils/index.js';
28
27
 
29
28
  function Noop() {
@@ -667,20 +666,25 @@ class Select extends React.Component {
667
666
 
668
667
  renderLoading() {
669
668
  if (!this.props.isLoading) return;
670
- const sharedProps = this.getSharedProps();
671
669
  const {
672
670
  overrides = {}
673
671
  } = this.props;
674
- const [LoadingIndicator, loadingIndicatorProps] = getOverrides(overrides.LoadingIndicator, Spinner);
672
+ const [LoadingIndicator, loadingIndicatorProps] = getOverrides(overrides.LoadingIndicator, StyledLoadingIndicator);
675
673
  return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({
676
- size: 16,
677
- overrides: {
678
- Svg: {
679
- style: getLoadingIconStyles
680
- }
681
- },
682
- $silenceV11DeprecationWarning: true
683
- }, sharedProps, loadingIndicatorProps));
674
+ role: "status"
675
+ }, loadingIndicatorProps), /*#__PURE__*/React.createElement("span", {
676
+ style: {
677
+ position: 'absolute',
678
+ width: '1px',
679
+ height: '1px',
680
+ padding: 0,
681
+ margin: '-1px',
682
+ overflow: 'hidden',
683
+ clip: 'rect(0,0,0,0)',
684
+ whiteSpace: 'nowrap',
685
+ border: 0
686
+ }
687
+ }, "Loading"));
684
688
  }
685
689
 
686
690
  renderValue(valueArray, isOpen, locale) {
@@ -4,9 +4,10 @@ Copyright (c) Uber Technologies, Inc.
4
4
  This source code is licensed under the MIT license found in the
5
5
  LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { styled } from '../styles/index.js';
7
+ import { styled, withStyle } from '../styles/index.js';
8
8
  import { TYPE, SIZE } from './constants.js';
9
9
  import { StyledList, StyledListItem } from '../menu/index.js';
10
+ import { Spinner } from '../spinner/index.js';
10
11
  import { ellipsisText } from '../styles/util.js';
11
12
 
12
13
  function getFont(size = SIZE.default, typography) {
@@ -432,19 +433,22 @@ export const StyledClearIcon = styled('svg', props => {
432
433
  };
433
434
  });
434
435
  StyledClearIcon.displayName = "StyledClearIcon";
435
- export const getLoadingIconStyles = props => {
436
- const {
437
- $theme
438
- } = props;
439
- const {
440
- colors
441
- } = $theme;
442
- return { ...getSvgStyles({
443
- $theme
444
- }),
445
- color: colors.contentPrimary
436
+ export const StyledLoadingIndicator = withStyle(Spinner, ({
437
+ $theme
438
+ }) => {
439
+ return {
440
+ borderTopWidth: '2px',
441
+ borderRightWidth: '2px',
442
+ borderBottomWidth: '2px',
443
+ borderLeftWidth: '2px',
444
+ borderRightColor: $theme.colors.borderOpaque,
445
+ borderBottomColor: $theme.colors.borderOpaque,
446
+ borderLeftColor: $theme.colors.borderOpaque,
447
+ width: '16px',
448
+ height: '16px'
446
449
  };
447
- };
450
+ });
451
+ StyledLoadingIndicator.displayName = "StyledLoadingIndicator";
448
452
  export const StyledSearchIconContainer = styled('div', props => {
449
453
  const {
450
454
  $disabled,
@@ -69,7 +69,11 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
69
69
  return /*#__PURE__*/React.createElement(Root // flowlint-next-line unclear-type:off
70
70
  , _extends({
71
71
  ref: ref,
72
- $shape: props.shape || SHAPE.DEFAULT
72
+ $shape: props.shape || SHAPE.DEFAULT,
73
+ "aria-label": props['aria-label'],
74
+ "aria-selected": props['aria-selected'],
75
+ id: props.id,
76
+ role: props.role
73
77
  }, rootProps), Artwork && /*#__PURE__*/React.createElement(ArtworkContainer, _extends({
74
78
  $artworkSize: artworkSize,
75
79
  $sublist: Boolean(props.sublist)
@@ -11,9 +11,13 @@ var MenuAdapter = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
11
  return /*#__PURE__*/React.createElement(ListItem, {
12
12
  ref: ref,
13
13
  sublist: props.sublist || props.$size === 'compact',
14
+ "aria-label": props['aria-label'],
15
+ "aria-selected": props['aria-selected'],
14
16
  artwork: props.artwork,
15
17
  artworkSize: props.artworkSize,
16
18
  endEnhancer: props.endEnhancer,
19
+ id: props.id,
20
+ role: props.role,
17
21
  overrides: mergeOverrides({
18
22
  Root: {
19
23
  props: {
@@ -59,13 +59,12 @@ import TriangleDownIcon from '../icon/triangle-down.js';
59
59
  import SearchIconComponent from '../icon/search.js';
60
60
  import { LocaleContext } from '../locale/index.js';
61
61
  import { Popover, PLACEMENT } from '../popover/index.js';
62
- import { Spinner } from '../spinner/index.js';
63
62
  import { UIDConsumer } from 'react-uid';
64
63
  import AutosizeInput from './autosize-input.js';
65
64
  import { TYPE, STATE_CHANGE_TYPE } from './constants.js';
66
65
  import defaultProps from './default-props.js';
67
66
  import SelectDropdown from './dropdown.js';
68
- import { StyledRoot, StyledControlContainer, StyledPlaceholder, StyledValueContainer, StyledInputContainer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon, getLoadingIconStyles, StyledSearchIconContainer } from './styled-components.js';
67
+ import { StyledRoot, StyledControlContainer, StyledPlaceholder, StyledValueContainer, StyledInputContainer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon, StyledSearchIconContainer, StyledLoadingIndicator } from './styled-components.js';
69
68
  import { expandValue, normalizeOptions } from './utils/index.js';
70
69
 
71
70
  function Noop() {
@@ -776,24 +775,29 @@ var Select = /*#__PURE__*/function (_React$Component) {
776
775
  key: "renderLoading",
777
776
  value: function renderLoading() {
778
777
  if (!this.props.isLoading) return;
779
- var sharedProps = this.getSharedProps();
780
778
  var _this$props$overrides = this.props.overrides,
781
779
  overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides;
782
780
 
783
- var _getOverrides = getOverrides(overrides.LoadingIndicator, Spinner),
781
+ var _getOverrides = getOverrides(overrides.LoadingIndicator, StyledLoadingIndicator),
784
782
  _getOverrides2 = _slicedToArray(_getOverrides, 2),
785
783
  LoadingIndicator = _getOverrides2[0],
786
784
  loadingIndicatorProps = _getOverrides2[1];
787
785
 
788
786
  return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({
789
- size: 16,
790
- overrides: {
791
- Svg: {
792
- style: getLoadingIconStyles
793
- }
794
- },
795
- $silenceV11DeprecationWarning: true
796
- }, sharedProps, loadingIndicatorProps));
787
+ role: "status"
788
+ }, loadingIndicatorProps), /*#__PURE__*/React.createElement("span", {
789
+ style: {
790
+ position: 'absolute',
791
+ width: '1px',
792
+ height: '1px',
793
+ padding: 0,
794
+ margin: '-1px',
795
+ overflow: 'hidden',
796
+ clip: 'rect(0,0,0,0)',
797
+ whiteSpace: 'nowrap',
798
+ border: 0
799
+ }
800
+ }, "Loading"));
797
801
  }
798
802
  }, {
799
803
  key: "renderValue",
@@ -10,9 +10,10 @@ Copyright (c) Uber Technologies, Inc.
10
10
  This source code is licensed under the MIT license found in the
11
11
  LICENSE file in the root directory of this source tree.
12
12
  */
13
- import { styled } from '../styles/index.js';
13
+ import { styled, withStyle } from '../styles/index.js';
14
14
  import { TYPE, SIZE } from './constants.js';
15
15
  import { StyledList, StyledListItem } from '../menu/index.js';
16
+ import { Spinner } from '../spinner/index.js';
16
17
  import { ellipsisText } from '../styles/util.js';
17
18
 
18
19
  function getFont() {
@@ -371,15 +372,21 @@ export var StyledClearIcon = styled('svg', function (props) {
371
372
  });
372
373
  });
373
374
  StyledClearIcon.displayName = "StyledClearIcon";
374
- export var getLoadingIconStyles = function getLoadingIconStyles(props) {
375
- var $theme = props.$theme;
376
- var colors = $theme.colors;
377
- return _objectSpread(_objectSpread({}, getSvgStyles({
378
- $theme: $theme
379
- })), {}, {
380
- color: colors.contentPrimary
381
- });
382
- };
375
+ export var StyledLoadingIndicator = withStyle(Spinner, function (_ref5) {
376
+ var $theme = _ref5.$theme;
377
+ return {
378
+ borderTopWidth: '2px',
379
+ borderRightWidth: '2px',
380
+ borderBottomWidth: '2px',
381
+ borderLeftWidth: '2px',
382
+ borderRightColor: $theme.colors.borderOpaque,
383
+ borderBottomColor: $theme.colors.borderOpaque,
384
+ borderLeftColor: $theme.colors.borderOpaque,
385
+ width: '16px',
386
+ height: '16px'
387
+ };
388
+ });
389
+ StyledLoadingIndicator.displayName = "StyledLoadingIndicator";
383
390
  export var StyledSearchIconContainer = styled('div', function (props) {
384
391
  var _objectSpread4;
385
392
 
@@ -32,3 +32,12 @@ export class FormControl extends React.Component<
32
32
  FormControlProps,
33
33
  FormControlState
34
34
  > {}
35
+
36
+ export interface FormControlChildProps {
37
+ 'aria-describedby': string | null,
38
+ 'aria-errormessage': string | null,
39
+ key: React.Key,
40
+ disabled: boolean,
41
+ error: boolean,
42
+ positive: boolean
43
+ }
package/list/list-item.js CHANGED
@@ -78,7 +78,11 @@ var ListItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
78
78
  return /*#__PURE__*/_react.default.createElement(Root // flowlint-next-line unclear-type:off
79
79
  , _extends({
80
80
  ref: ref,
81
- $shape: props.shape || _constants.SHAPE.DEFAULT
81
+ $shape: props.shape || _constants.SHAPE.DEFAULT,
82
+ "aria-label": props['aria-label'],
83
+ "aria-selected": props['aria-selected'],
84
+ id: props.id,
85
+ role: props.role
82
86
  }, rootProps), Artwork && /*#__PURE__*/_react.default.createElement(ArtworkContainer, _extends({
83
87
  $artworkSize: artworkSize,
84
88
  $sublist: Boolean(props.sublist)
@@ -58,6 +58,10 @@ const ListItem = React.forwardRef<PropsT, HTMLLIElement>((props: PropsT, ref) =>
58
58
  // flowlint-next-line unclear-type:off
59
59
  ref={(ref: any)}
60
60
  $shape={props.shape || SHAPE.DEFAULT}
61
+ aria-label={props['aria-label']}
62
+ aria-selected={props['aria-selected']}
63
+ id={props.id}
64
+ role={props.role}
61
65
  {...rootProps}
62
66
  >
63
67
  {Artwork && (
@@ -29,9 +29,13 @@ var MenuAdapter = /*#__PURE__*/React.forwardRef(function (props, ref) {
29
29
  return /*#__PURE__*/React.createElement(_listItem.default, {
30
30
  ref: ref,
31
31
  sublist: props.sublist || props.$size === 'compact',
32
+ "aria-label": props['aria-label'],
33
+ "aria-selected": props['aria-selected'],
32
34
  artwork: props.artwork,
33
35
  artworkSize: props.artworkSize,
34
36
  endEnhancer: props.endEnhancer,
37
+ id: props.id,
38
+ role: props.role,
35
39
  overrides: (0, _overrides.mergeOverrides)({
36
40
  Root: {
37
41
  props: {
@@ -17,9 +17,13 @@ const MenuAdapter = React.forwardRef<MenuAdapterPropsT, HTMLLIElement>((props, r
17
17
  <ListItem
18
18
  ref={ref}
19
19
  sublist={props.sublist || props.$size === 'compact'}
20
+ aria-label={props['aria-label']}
21
+ aria-selected={props['aria-selected']}
20
22
  artwork={props.artwork}
21
23
  artworkSize={props.artworkSize}
22
24
  endEnhancer={props.endEnhancer}
25
+ id={props.id}
26
+ role={props.role}
23
27
  overrides={mergeOverrides(
24
28
  {
25
29
  Root: {
@@ -44,7 +44,11 @@ export type PropsT = {|
44
44
  shape?: ShapeT,
45
45
  children: React.Node,
46
46
  endEnhancer?: React.AbstractComponent<{}>,
47
+ 'aria-label'?: string,
48
+ 'aria-selected'?: boolean,
49
+ id?: String,
47
50
  overrides?: OverridesT,
51
+ role?: string,
48
52
  sublist?: boolean,
49
53
  |};
50
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "0.0.0-next-773a78c",
3
+ "version": "0.0.0-next-0df5daf",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -22,8 +22,6 @@ var _index = require("../locale/index.js");
22
22
 
23
23
  var _index2 = require("../popover/index.js");
24
24
 
25
- var _index3 = require("../spinner/index.js");
26
-
27
25
  var _reactUid = require("react-uid");
28
26
 
29
27
  var _autosizeInput = _interopRequireDefault(require("./autosize-input.js"));
@@ -36,7 +34,7 @@ var _dropdown = _interopRequireDefault(require("./dropdown.js"));
36
34
 
37
35
  var _styledComponents = require("./styled-components.js");
38
36
 
39
- var _index4 = require("./utils/index.js");
37
+ var _index3 = require("./utils/index.js");
40
38
 
41
39
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
40
 
@@ -660,7 +658,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
660
658
  return !_this.state.inputValue;
661
659
  });
662
660
 
663
- _this.options = (0, _index4.normalizeOptions)(props.options);
661
+ _this.options = (0, _index3.normalizeOptions)(props.options);
664
662
  return _this;
665
663
  }
666
664
 
@@ -778,7 +776,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
778
776
  }
779
777
 
780
778
  return value.map(function (value) {
781
- return (0, _index4.expandValue)(value, _this2.props);
779
+ return (0, _index3.expandValue)(value, _this2.props);
782
780
  });
783
781
  }
784
782
  }, {
@@ -796,24 +794,29 @@ var Select = /*#__PURE__*/function (_React$Component) {
796
794
  key: "renderLoading",
797
795
  value: function renderLoading() {
798
796
  if (!this.props.isLoading) return;
799
- var sharedProps = this.getSharedProps();
800
797
  var _this$props$overrides = this.props.overrides,
801
798
  overrides = _this$props$overrides === void 0 ? {} : _this$props$overrides;
802
799
 
803
- var _getOverrides = (0, _overrides.getOverrides)(overrides.LoadingIndicator, _index3.Spinner),
800
+ var _getOverrides = (0, _overrides.getOverrides)(overrides.LoadingIndicator, _styledComponents.StyledLoadingIndicator),
804
801
  _getOverrides2 = _slicedToArray(_getOverrides, 2),
805
802
  LoadingIndicator = _getOverrides2[0],
806
803
  loadingIndicatorProps = _getOverrides2[1];
807
804
 
808
805
  return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({
809
- size: 16,
810
- overrides: {
811
- Svg: {
812
- style: _styledComponents.getLoadingIconStyles
813
- }
814
- },
815
- $silenceV11DeprecationWarning: true
816
- }, sharedProps, loadingIndicatorProps));
806
+ role: "status"
807
+ }, loadingIndicatorProps), /*#__PURE__*/React.createElement("span", {
808
+ style: {
809
+ position: 'absolute',
810
+ width: '1px',
811
+ height: '1px',
812
+ padding: 0,
813
+ margin: '-1px',
814
+ overflow: 'hidden',
815
+ clip: 'rect(0,0,0,0)',
816
+ whiteSpace: 'nowrap',
817
+ border: 0
818
+ }
819
+ }, "Loading"));
817
820
  }
818
821
  }, {
819
822
  key: "renderValue",
@@ -1102,7 +1105,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
1102
1105
  value: function render() {
1103
1106
  var _this6 = this;
1104
1107
 
1105
- this.options = (0, _index4.normalizeOptions)(this.props.options);
1108
+ this.options = (0, _index3.normalizeOptions)(this.props.options);
1106
1109
  var _this$props2 = this.props,
1107
1110
  _this$props2$override = _this$props2.overrides,
1108
1111
  overrides = _this$props2$override === void 0 ? {} : _this$props2$override,
@@ -15,7 +15,6 @@ import SearchIconComponent from '../icon/search.js';
15
15
  import { LocaleContext } from '../locale/index.js';
16
16
  import type { LocaleT } from '../locale/types.js';
17
17
  import { Popover, PLACEMENT } from '../popover/index.js';
18
- import { Spinner } from '../spinner/index.js';
19
18
  import { UIDConsumer } from 'react-uid';
20
19
 
21
20
  import AutosizeInput from './autosize-input.js';
@@ -31,8 +30,8 @@ import {
31
30
  StyledIconsContainer,
32
31
  StyledSelectArrow,
33
32
  StyledClearIcon,
34
- getLoadingIconStyles,
35
33
  StyledSearchIconContainer,
34
+ StyledLoadingIndicator,
36
35
  } from './styled-components.js';
37
36
  import type { PropsT, SelectStateT, ValueT, OptionT, ChangeActionT, ReactRefT } from './types.js';
38
37
  import { expandValue, normalizeOptions } from './utils/index.js';
@@ -616,20 +615,33 @@ class Select extends React.Component<PropsT, SelectStateT> {
616
615
 
617
616
  renderLoading() {
618
617
  if (!this.props.isLoading) return;
619
- const sharedProps = this.getSharedProps();
620
618
  const { overrides = {} } = this.props;
621
619
  const [LoadingIndicator, loadingIndicatorProps] = getOverrides(
622
620
  overrides.LoadingIndicator,
623
- Spinner
621
+ StyledLoadingIndicator
624
622
  );
623
+
625
624
  return (
626
- <LoadingIndicator
627
- size={16}
628
- overrides={{ Svg: { style: getLoadingIconStyles } }}
629
- $silenceV11DeprecationWarning
630
- {...sharedProps}
631
- {...loadingIndicatorProps}
632
- />
625
+ <LoadingIndicator role="status" {...loadingIndicatorProps}>
626
+ {/* Offscreen content could be defined as styled-component and
627
+ overridable, but I can't think of a good reason for doing so.
628
+ LoadingIndicator children can be overriden if required. */}
629
+ <span
630
+ style={{
631
+ position: 'absolute',
632
+ width: '1px',
633
+ height: '1px',
634
+ padding: 0,
635
+ margin: '-1px',
636
+ overflow: 'hidden',
637
+ clip: 'rect(0,0,0,0)',
638
+ whiteSpace: 'nowrap',
639
+ border: 0,
640
+ }}
641
+ >
642
+ Loading
643
+ </span>
644
+ </LoadingIndicator>
633
645
  );
634
646
  }
635
647
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledSearchIconContainer = exports.getLoadingIconStyles = exports.StyledClearIcon = exports.StyledSelectArrow = exports.StyledIconsContainer = exports.StyledInputSizer = exports.StyledInput = exports.StyledInputContainer = exports.StyledSingleValue = exports.StyledPlaceholder = exports.StyledValueContainer = exports.StyledControlContainer = exports.StyledRoot = exports.StyledOptionContent = exports.StyledDropdownListItem = exports.StyledDropdown = exports.StyledDropdownContainer = void 0;
6
+ exports.StyledSearchIconContainer = exports.StyledLoadingIndicator = exports.StyledClearIcon = exports.StyledSelectArrow = exports.StyledIconsContainer = exports.StyledInputSizer = exports.StyledInput = exports.StyledInputContainer = exports.StyledSingleValue = exports.StyledPlaceholder = exports.StyledValueContainer = exports.StyledControlContainer = exports.StyledRoot = exports.StyledOptionContent = exports.StyledDropdownListItem = exports.StyledDropdown = exports.StyledDropdownContainer = void 0;
7
7
 
8
8
  var _index = require("../styles/index.js");
9
9
 
@@ -11,6 +11,8 @@ var _constants = require("./constants.js");
11
11
 
12
12
  var _index2 = require("../menu/index.js");
13
13
 
14
+ var _index3 = require("../spinner/index.js");
15
+
14
16
  var _util = require("../styles/util.js");
15
17
 
16
18
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
@@ -390,18 +392,22 @@ var StyledClearIcon = (0, _index.styled)('svg', function (props) {
390
392
  });
391
393
  exports.StyledClearIcon = StyledClearIcon;
392
394
  StyledClearIcon.displayName = "StyledClearIcon";
393
-
394
- var getLoadingIconStyles = function getLoadingIconStyles(props) {
395
- var $theme = props.$theme;
396
- var colors = $theme.colors;
397
- return _objectSpread(_objectSpread({}, getSvgStyles({
398
- $theme: $theme
399
- })), {}, {
400
- color: colors.contentPrimary
401
- });
402
- };
403
-
404
- exports.getLoadingIconStyles = getLoadingIconStyles;
395
+ var StyledLoadingIndicator = (0, _index.withStyle)(_index3.Spinner, function (_ref5) {
396
+ var $theme = _ref5.$theme;
397
+ return {
398
+ borderTopWidth: '2px',
399
+ borderRightWidth: '2px',
400
+ borderBottomWidth: '2px',
401
+ borderLeftWidth: '2px',
402
+ borderRightColor: $theme.colors.borderOpaque,
403
+ borderBottomColor: $theme.colors.borderOpaque,
404
+ borderLeftColor: $theme.colors.borderOpaque,
405
+ width: '16px',
406
+ height: '16px'
407
+ };
408
+ });
409
+ exports.StyledLoadingIndicator = StyledLoadingIndicator;
410
+ StyledLoadingIndicator.displayName = "StyledLoadingIndicator";
405
411
  var StyledSearchIconContainer = (0, _index.styled)('div', function (props) {
406
412
  var _objectSpread4;
407
413
 
@@ -6,13 +6,13 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  // @flow
8
8
 
9
- import { styled } from '../styles/index.js';
9
+ import { styled, withStyle } from '../styles/index.js';
10
10
  import { TYPE, SIZE } from './constants.js';
11
11
  import { StyledList, StyledListItem } from '../menu/index.js';
12
+ import { Spinner } from '../spinner/index.js';
12
13
 
13
14
  import type { SharedStylePropsArgT } from './types.js';
14
15
  import { ellipsisText } from '../styles/util.js';
15
- import type { ThemeT } from '../styles/types.js';
16
16
 
17
17
  function getFont(size = SIZE.default, typography) {
18
18
  return {
@@ -424,14 +424,19 @@ export const StyledClearIcon = styled<SharedStylePropsArgT>('svg', (props) => {
424
424
  };
425
425
  });
426
426
 
427
- export const getLoadingIconStyles = (props: { $theme: ThemeT }) => {
428
- const { $theme } = props;
429
- const { colors } = $theme;
427
+ export const StyledLoadingIndicator = withStyle<typeof Spinner, {}>(Spinner, ({ $theme }) => {
430
428
  return {
431
- ...getSvgStyles({ $theme }),
432
- color: colors.contentPrimary,
429
+ borderTopWidth: '2px',
430
+ borderRightWidth: '2px',
431
+ borderBottomWidth: '2px',
432
+ borderLeftWidth: '2px',
433
+ borderRightColor: $theme.colors.borderOpaque,
434
+ borderBottomColor: $theme.colors.borderOpaque,
435
+ borderLeftColor: $theme.colors.borderOpaque,
436
+ width: '16px',
437
+ height: '16px',
433
438
  };
434
- };
439
+ });
435
440
 
436
441
  export const StyledSearchIconContainer = styled<SharedStylePropsArgT>('div', (props) => {
437
442
  const { $disabled, $theme } = props;