baseui 10.11.1 → 11.0.0

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.
Files changed (273) hide show
  1. package/README.md +3 -3
  2. package/accordion/accordion.js +60 -13
  3. package/accordion/accordion.js.flow +49 -12
  4. package/accordion/index.d.ts +0 -3
  5. package/accordion/panel.js +7 -6
  6. package/accordion/panel.js.flow +20 -20
  7. package/accordion/stateless-accordion.js +2 -4
  8. package/accordion/stateless-accordion.js.flow +0 -2
  9. package/accordion/types.js.flow +0 -5
  10. package/button/constants.js +1 -2
  11. package/button/constants.js.flow +0 -1
  12. package/button/index.d.ts +0 -1
  13. package/button/styled-components.js +2 -29
  14. package/button/styled-components.js.flow +2 -30
  15. package/checkbox/checkbox.js +6 -30
  16. package/checkbox/checkbox.js.flow +7 -38
  17. package/checkbox/constants.js +2 -1
  18. package/checkbox/constants.js.flow +2 -1
  19. package/checkbox/index.d.ts +4 -6
  20. package/checkbox/index.js +0 -6
  21. package/checkbox/index.js.flow +0 -1
  22. package/checkbox/styled-components.js +52 -149
  23. package/checkbox/styled-components.js.flow +59 -165
  24. package/checkbox/types.js.flow +0 -5
  25. package/data-table/column-categorical.js +1 -1
  26. package/data-table/column-categorical.js.flow +1 -1
  27. package/data-table/column-datetime.js +1 -1
  28. package/data-table/column-datetime.js.flow +3 -1
  29. package/data-table/column.js +6 -2
  30. package/data-table/column.js.flow +9 -7
  31. package/data-table/data-table.js +1 -1
  32. package/data-table/data-table.js.flow +1 -1
  33. package/data-table/header-cell.js +3 -0
  34. package/data-table/header-cell.js.flow +1 -1
  35. package/datepicker/calendar.js +15 -7
  36. package/datepicker/calendar.js.flow +23 -9
  37. package/datepicker/constants.js +12 -2
  38. package/datepicker/constants.js.flow +10 -0
  39. package/datepicker/datepicker.js +61 -30
  40. package/datepicker/datepicker.js.flow +77 -37
  41. package/datepicker/day.js +85 -34
  42. package/datepicker/day.js.flow +118 -54
  43. package/datepicker/locale.js.flow +0 -1
  44. package/datepicker/month.js +3 -1
  45. package/datepicker/month.js.flow +2 -0
  46. package/datepicker/stateful-container.js.flow +2 -1
  47. package/datepicker/styled-components.js +23 -1
  48. package/datepicker/styled-components.js.flow +12 -2
  49. package/datepicker/types.js.flow +35 -10
  50. package/datepicker/utils/date-helpers.js +30 -0
  51. package/datepicker/utils/date-helpers.js.flow +12 -0
  52. package/datepicker/week.js +3 -1
  53. package/datepicker/week.js.flow +2 -0
  54. package/es/accordion/accordion.js +52 -12
  55. package/es/accordion/panel.js +7 -5
  56. package/es/accordion/stateless-accordion.js +2 -4
  57. package/es/button/constants.js +1 -2
  58. package/es/button/styled-components.js +2 -29
  59. package/es/checkbox/checkbox.js +7 -32
  60. package/es/checkbox/constants.js +2 -1
  61. package/es/checkbox/index.js +1 -1
  62. package/es/checkbox/styled-components.js +51 -146
  63. package/es/data-table/column-categorical.js +1 -1
  64. package/es/data-table/column-datetime.js +1 -1
  65. package/es/data-table/column.js +6 -2
  66. package/es/data-table/data-table.js +1 -1
  67. package/es/data-table/header-cell.js +3 -0
  68. package/es/datepicker/calendar.js +15 -7
  69. package/es/datepicker/constants.js +8 -0
  70. package/es/datepicker/datepicker.js +56 -29
  71. package/es/datepicker/day.js +77 -34
  72. package/es/datepicker/month.js +3 -1
  73. package/es/datepicker/styled-components.js +8 -2
  74. package/es/datepicker/types.js +1 -1
  75. package/es/datepicker/utils/date-helpers.js +16 -0
  76. package/es/datepicker/week.js +3 -1
  77. package/es/file-uploader/file-uploader.js +4 -4
  78. package/es/header-navigation/styled-components.js +3 -3
  79. package/es/helpers/overrides.js +1 -2
  80. package/es/input/styled-components.js +4 -4
  81. package/es/layer/layer.js +4 -4
  82. package/es/locale/index.js +0 -7
  83. package/es/menu/stateful-container.js +0 -1
  84. package/es/menu/styled-components.js +1 -1
  85. package/es/modal/index.js +1 -1
  86. package/es/modal/modal.js +19 -65
  87. package/es/modal/styled-components.js +12 -48
  88. package/es/phone-input/default-props.js +1 -1
  89. package/es/phone-input/index.js +0 -4
  90. package/es/phone-input/phone-input-lite.js +55 -31
  91. package/es/radio/radio.js +1 -7
  92. package/es/radio/radiogroup.js +3 -28
  93. package/es/radio/styled-components.js +4 -5
  94. package/es/rating/styled-components.js +3 -3
  95. package/es/select/index.js +1 -2
  96. package/es/select/select-component.js +32 -20
  97. package/es/select/styled-components.js +4 -4
  98. package/es/snackbar/styled-components.js +2 -2
  99. package/es/spinner/index.js +3 -9
  100. package/es/spinner/styled-components.js +2 -32
  101. package/es/table/filter.js +3 -3
  102. package/es/tag/styled-components.js +1 -1
  103. package/es/themes/dark-theme/color-component-tokens.js +0 -38
  104. package/es/themes/dark-theme/color-tokens.js +0 -2
  105. package/es/themes/dark-theme/create-dark-theme.js +0 -2
  106. package/es/themes/dark-theme/dark-theme.js +0 -2
  107. package/es/themes/light-theme/color-component-tokens.js +0 -38
  108. package/es/themes/light-theme/color-tokens.js +0 -2
  109. package/es/themes/light-theme/create-light-theme.js +0 -2
  110. package/es/themes/light-theme/light-theme.js +0 -2
  111. package/es/timepicker/timepicker.js +1 -8
  112. package/es/typography/index.js +1 -31
  113. package/esm/accordion/accordion.js +60 -13
  114. package/esm/accordion/panel.js +7 -6
  115. package/esm/accordion/stateless-accordion.js +2 -4
  116. package/esm/button/constants.js +1 -2
  117. package/esm/button/styled-components.js +2 -29
  118. package/esm/checkbox/checkbox.js +7 -30
  119. package/esm/checkbox/constants.js +2 -1
  120. package/esm/checkbox/index.js +1 -1
  121. package/esm/checkbox/styled-components.js +52 -147
  122. package/esm/data-table/column-categorical.js +1 -1
  123. package/esm/data-table/column-datetime.js +1 -1
  124. package/esm/data-table/column.js +6 -2
  125. package/esm/data-table/data-table.js +1 -1
  126. package/esm/data-table/header-cell.js +3 -0
  127. package/esm/datepicker/calendar.js +15 -7
  128. package/esm/datepicker/constants.js +8 -0
  129. package/esm/datepicker/datepicker.js +60 -30
  130. package/esm/datepicker/day.js +84 -34
  131. package/esm/datepicker/month.js +3 -1
  132. package/esm/datepicker/styled-components.js +24 -2
  133. package/esm/datepicker/types.js +1 -1
  134. package/esm/datepicker/utils/date-helpers.js +30 -0
  135. package/esm/datepicker/week.js +3 -1
  136. package/esm/file-uploader/file-uploader.js +4 -4
  137. package/esm/header-navigation/styled-components.js +3 -3
  138. package/esm/helpers/overrides.js +1 -2
  139. package/esm/input/styled-components.js +4 -4
  140. package/esm/layer/layer.js +4 -4
  141. package/esm/locale/index.js +0 -7
  142. package/esm/menu/stateful-container.js +0 -1
  143. package/esm/menu/styled-components.js +1 -1
  144. package/esm/modal/index.js +1 -1
  145. package/esm/modal/modal.js +28 -71
  146. package/esm/modal/styled-components.js +6 -38
  147. package/esm/phone-input/default-props.js +1 -1
  148. package/esm/phone-input/index.js +0 -4
  149. package/esm/phone-input/phone-input-lite.js +60 -37
  150. package/esm/radio/radio.js +1 -7
  151. package/esm/radio/radiogroup.js +3 -28
  152. package/esm/radio/styled-components.js +4 -5
  153. package/esm/rating/styled-components.js +3 -3
  154. package/esm/select/index.js +1 -2
  155. package/esm/select/select-component.js +34 -19
  156. package/esm/select/styled-components.js +4 -4
  157. package/esm/snackbar/styled-components.js +2 -2
  158. package/esm/spinner/index.js +3 -9
  159. package/esm/spinner/styled-components.js +2 -40
  160. package/esm/table/filter.js +3 -3
  161. package/esm/tag/styled-components.js +1 -1
  162. package/esm/themes/dark-theme/color-component-tokens.js +0 -38
  163. package/esm/themes/dark-theme/color-tokens.js +0 -2
  164. package/esm/themes/dark-theme/create-dark-theme.js +1 -2
  165. package/esm/themes/dark-theme/dark-theme.js +1 -2
  166. package/esm/themes/light-theme/color-component-tokens.js +0 -38
  167. package/esm/themes/light-theme/color-tokens.js +0 -2
  168. package/esm/themes/light-theme/create-light-theme.js +1 -2
  169. package/esm/themes/light-theme/light-theme.js +1 -2
  170. package/esm/timepicker/timepicker.js +1 -8
  171. package/esm/typography/index.js +1 -35
  172. package/file-uploader/file-uploader.js +3 -3
  173. package/file-uploader/file-uploader.js.flow +4 -4
  174. package/header-navigation/styled-components.js +3 -3
  175. package/header-navigation/styled-components.js.flow +3 -3
  176. package/helpers/overrides.js +1 -2
  177. package/helpers/overrides.js.flow +1 -1
  178. package/input/index.d.ts +5 -9
  179. package/input/styled-components.js +4 -4
  180. package/input/styled-components.js.flow +4 -4
  181. package/layer/layer.js +4 -4
  182. package/layer/layer.js.flow +4 -3
  183. package/locale/index.js +0 -7
  184. package/locale/index.js.flow +0 -7
  185. package/locale.ts +0 -1
  186. package/menu/index.d.ts +1 -3
  187. package/menu/stateful-container.js +0 -1
  188. package/menu/stateful-container.js.flow +0 -1
  189. package/menu/styled-components.js +1 -1
  190. package/menu/styled-components.js.flow +1 -1
  191. package/modal/index.d.ts +4 -6
  192. package/modal/index.js +0 -6
  193. package/modal/index.js.flow +0 -1
  194. package/modal/modal.js +27 -70
  195. package/modal/modal.js.flow +17 -83
  196. package/modal/styled-components.js +7 -40
  197. package/modal/styled-components.js.flow +12 -44
  198. package/modal/types.js.flow +1 -10
  199. package/package.json +10 -10
  200. package/phone-input/default-props.js +1 -1
  201. package/phone-input/default-props.js.flow +1 -1
  202. package/phone-input/index.d.ts +0 -1
  203. package/phone-input/index.js +0 -36
  204. package/phone-input/index.js.flow +0 -4
  205. package/phone-input/phone-input-lite.js +63 -38
  206. package/phone-input/phone-input-lite.js.flow +66 -44
  207. package/progress-bar/index.d.ts +3 -3
  208. package/radio/index.d.ts +4 -9
  209. package/radio/radio.js +1 -7
  210. package/radio/radio.js.flow +1 -8
  211. package/radio/radiogroup.js +3 -28
  212. package/radio/radiogroup.js.flow +2 -26
  213. package/radio/styled-components.js +4 -5
  214. package/radio/styled-components.js.flow +3 -4
  215. package/radio/types.js.flow +4 -15
  216. package/rating/styled-components.js +3 -3
  217. package/rating/styled-components.js.flow +3 -3
  218. package/select/index.d.ts +8 -3
  219. package/select/index.js +0 -6
  220. package/select/index.js.flow +0 -2
  221. package/select/select-component.js +34 -19
  222. package/select/select-component.js.flow +29 -13
  223. package/select/styled-components.js +4 -4
  224. package/select/styled-components.js.flow +4 -4
  225. package/select/types.js.flow +11 -7
  226. package/snackbar/styled-components.js +1 -1
  227. package/snackbar/styled-components.js.flow +11 -11
  228. package/spinner/index.d.ts +5 -18
  229. package/spinner/index.js +2 -68
  230. package/spinner/index.js.flow +2 -27
  231. package/spinner/styled-components.js +9 -45
  232. package/spinner/styled-components.js.flow +2 -34
  233. package/spinner/types.js.flow +1 -19
  234. package/styles/types.js.flow +0 -2
  235. package/table/filter.js +3 -3
  236. package/table/filter.js.flow +3 -3
  237. package/tag/styled-components.js +1 -1
  238. package/tag/styled-components.js.flow +1 -1
  239. package/theme.ts +0 -81
  240. package/themes/dark-theme/color-component-tokens.js +0 -38
  241. package/themes/dark-theme/color-component-tokens.js.flow +0 -42
  242. package/themes/dark-theme/color-tokens.js +0 -2
  243. package/themes/dark-theme/color-tokens.js.flow +0 -2
  244. package/themes/dark-theme/create-dark-theme.js +1 -3
  245. package/themes/dark-theme/create-dark-theme.js.flow +0 -2
  246. package/themes/dark-theme/dark-theme.js +1 -3
  247. package/themes/dark-theme/dark-theme.js.flow +0 -2
  248. package/themes/light-theme/color-component-tokens.js +0 -38
  249. package/themes/light-theme/color-component-tokens.js.flow +0 -43
  250. package/themes/light-theme/color-tokens.js +0 -2
  251. package/themes/light-theme/color-tokens.js.flow +0 -2
  252. package/themes/light-theme/create-light-theme.js +1 -3
  253. package/themes/light-theme/create-light-theme.js.flow +0 -2
  254. package/themes/light-theme/light-theme.js +1 -3
  255. package/themes/light-theme/light-theme.js.flow +0 -2
  256. package/themes/types.js.flow +0 -68
  257. package/timepicker/timepicker.js +1 -8
  258. package/timepicker/timepicker.js.flow +4 -10
  259. package/typography/index.d.ts +0 -23
  260. package/typography/index.js +2 -57
  261. package/typography/index.js.flow +0 -31
  262. package/es/spinner/spinner.js +0 -68
  263. package/es/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -35
  264. package/es/themes/light-theme/color-deprecated-semantic-tokens.js +0 -35
  265. package/esm/spinner/spinner.js +0 -125
  266. package/esm/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -38
  267. package/esm/themes/light-theme/color-deprecated-semantic-tokens.js +0 -38
  268. package/spinner/spinner.js +0 -136
  269. package/spinner/spinner.js.flow +0 -75
  270. package/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -50
  271. package/themes/dark-theme/color-deprecated-semantic-tokens.js.flow +0 -42
  272. package/themes/light-theme/color-deprecated-semantic-tokens.js +0 -50
  273. package/themes/light-theme/color-deprecated-semantic-tokens.js.flow +0 -42
@@ -43,67 +43,31 @@ export const Root = styled('div', props => {
43
43
  };
44
44
  });
45
45
  Root.displayName = "Root";
46
- export const Backdrop = styled('div', props => {
47
- const {
48
- $animate,
49
- $isOpen,
50
- $isVisible,
51
- $theme,
52
- $unstable_ModalBackdropScroll
53
- } = props;
54
-
55
- if ($unstable_ModalBackdropScroll) {
56
- return {};
57
- }
58
-
59
- return {
60
- position: 'fixed',
61
- right: 0,
62
- bottom: 0,
63
- top: 0,
64
- left: 0,
65
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
66
- // Remove grey highlight
67
- WebkitTapHighlightColor: 'transparent',
68
- // Disable scroll capabilities.
69
- touchAction: 'none',
70
- opacity: $isVisible && $isOpen ? 1 : 0,
71
- ...($animate ? {
72
- transitionProperty: 'opacity',
73
- transitionDuration: $theme.animation.timing400,
74
- transitionTimingFunction: $theme.animation.easeOutCurve
75
- } : null)
76
- };
77
- });
78
- Backdrop.displayName = "Backdrop";
79
46
  export const DialogContainer = styled('div', props => {
80
47
  const {
81
48
  $animate,
82
49
  $isOpen,
83
50
  $isVisible,
84
- $theme,
85
- $unstable_ModalBackdropScroll
51
+ $theme
86
52
  } = props;
53
+ const animationRules = {
54
+ transitionProperty: 'opacity',
55
+ transitionDuration: $theme.animation.timing400,
56
+ transitionTimingFunction: $theme.animation.easeOutCurve
57
+ };
87
58
  return {
88
59
  display: 'flex',
89
60
  alignItems: 'center',
90
61
  justifyContent: 'center',
91
62
  width: '100%',
92
63
  minHeight: '100%',
93
- pointerEvents: 'none',
94
64
  userSelect: 'none',
95
- ...($unstable_ModalBackdropScroll ? {
96
- pointerEvents: 'auto',
97
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
98
- // Remove grey highlight
99
- WebkitTapHighlightColor: 'transparent',
100
- opacity: $isVisible && $isOpen ? 1 : 0,
101
- ...($animate ? {
102
- transitionProperty: 'opacity',
103
- transitionDuration: $theme.animation.timing400,
104
- transitionTimingFunction: $theme.animation.easeOutCurve
105
- } : null)
106
- } : {})
65
+ pointerEvents: 'auto',
66
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
67
+ // Remove grey highlight
68
+ WebkitTapHighlightColor: 'transparent',
69
+ opacity: $isVisible && $isOpen ? 1 : 0,
70
+ ...($animate ? animationRules : null)
107
71
  };
108
72
  });
109
73
  DialogContainer.displayName = "DialogContainer";
@@ -9,7 +9,7 @@ const defaultProps = {
9
9
  'aria-label': 'Please enter a phone number without the country dial code.',
10
10
  'aria-describedby': null,
11
11
  'aria-labelledby': null,
12
- clearable: false,
12
+ clearable: true,
13
13
  focusLock: false,
14
14
  country: {
15
15
  label: 'United States',
@@ -6,13 +6,9 @@ LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export { default as PhoneInput } from './phone-input.js';
8
8
  export { default as PhoneInputLite } from './phone-input-lite.js';
9
- export { default as PhoneInputNext } from './phone-input-next.js';
10
9
  export { default as StatefulPhoneInput } from './stateful-phone-input.js';
11
- export { default as StatefulPhoneInputNext } from './stateful-phone-input-next.js';
12
10
  export { default as StatefulPhoneInputContainer } from './stateful-phone-input-container.js';
13
11
  export { default as CountryPicker } from './country-picker.js';
14
- export { default as CountrySelect } from './country-select.js';
15
- export { default as CountrySelectDropdown } from './country-select-dropdown.js';
16
12
  export { default as Flag, StyledFlag } from './flag.js';
17
13
  export * from './constants.js';
18
14
  export * from './styled-components.js';
@@ -7,20 +7,18 @@ 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 React, { useRef } from 'react';
10
+ import CountryPicker from './country-picker.js';
11
+ import defaultProps from './default-props.js';
12
+ import { StyledPhoneInputRoot, StyledDialCode } from './styled-components.js';
10
13
  import { Input as DefaultInput } from '../input/index.js';
11
- import CountrySelect from './country-select.js';
12
14
  import { getOverrides, mergeOverrides } from '../helpers/overrides.js';
13
- import defaultProps from './default-props.js';
14
- const {
15
- country,
16
- ...lightDefaultProps
17
- } = defaultProps;
18
- PhoneInputLite.defaultProps = lightDefaultProps;
15
+ PhoneInputLite.defaultProps = defaultProps;
19
16
  export default function PhoneInputLite(props) {
20
17
  const {
21
18
  'aria-label': ariaLabel,
22
19
  'aria-labelledby': ariaLabelledBy,
23
20
  'aria-describedby': ariaDescribedBy,
21
+ clearable,
24
22
  countries,
25
23
  country,
26
24
  disabled,
@@ -41,38 +39,63 @@ export default function PhoneInputLite(props) {
41
39
  ...restProps
42
40
  } = props;
43
41
  const inputRef = useRef(null);
42
+ const baseDialCodeOverride = {
43
+ component: StyledDialCode,
44
+ style: ({
45
+ $theme: {
46
+ direction,
47
+ sizing
48
+ }
49
+ }) => {
50
+ const marginDir = direction === 'rtl' ? 'marginRight' : 'marginLeft';
51
+ return {
52
+ [marginDir]: sizing.scale600
53
+ };
54
+ },
55
+ props: {
56
+ children: country.dialCode
57
+ }
58
+ };
59
+ const mergedDialCodeOverride = mergeOverrides({
60
+ DialCode: baseDialCodeOverride
61
+ }, {
62
+ DialCode: overrides.DialCode || {}
63
+ });
44
64
  const baseOverrides = {
45
65
  Input: {
46
66
  style: ({
47
67
  $theme: {
68
+ direction,
48
69
  sizing
49
70
  }
50
- }) => ({
51
- paddingLeft: sizing.scale100
52
- })
53
- },
54
- Before: {
55
- component: CountrySelect,
56
- props: {
57
- countries,
58
- country,
59
- disabled,
60
- error,
61
- inputRef,
62
- mapIsoToLabel,
63
- maxDropdownHeight,
64
- maxDropdownWidth,
65
- onCountryChange,
66
- overrides,
67
- positive,
68
- required,
69
- size
71
+ }) => {
72
+ const paddingDir = direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
73
+ return {
74
+ [paddingDir]: sizing.scale100
75
+ };
70
76
  }
71
- }
77
+ },
78
+ Before: mergedDialCodeOverride.DialCode
72
79
  };
80
+ const [Root, rootProps] = getOverrides(overrides.Root, StyledPhoneInputRoot);
73
81
  const [Input, inputProps] = getOverrides(overrides.Input, DefaultInput);
74
82
  inputProps.overrides = mergeOverrides(baseOverrides, inputProps.overrides);
75
- return /*#__PURE__*/React.createElement(Input, _extends({
83
+ return /*#__PURE__*/React.createElement(Root, _extends({}, rootProps, {
84
+ "data-baseweb": "phone-input"
85
+ }), /*#__PURE__*/React.createElement(CountryPicker, {
86
+ country: country,
87
+ countries: countries,
88
+ disabled: disabled,
89
+ error: error,
90
+ mapIsoToLabel: mapIsoToLabel,
91
+ maxDropdownHeight: maxDropdownHeight,
92
+ maxDropdownWidth: maxDropdownWidth,
93
+ onCountryChange: onCountryChange,
94
+ overrides: overrides,
95
+ positive: positive,
96
+ required: required,
97
+ size: size
98
+ }), /*#__PURE__*/React.createElement(Input, _extends({
76
99
  "aria-label": ariaLabel,
77
100
  "aria-labelledby": ariaLabelledBy,
78
101
  "aria-describedby": ariaDescribedBy,
@@ -89,6 +112,7 @@ export default function PhoneInputLite(props) {
89
112
  placeholder: placeholder,
90
113
  size: size,
91
114
  type: "text",
92
- value: text
93
- }, restProps, inputProps));
115
+ value: text,
116
+ clearable: clearable
117
+ }, restProps, inputProps)));
94
118
  }
package/es/radio/radio.js CHANGED
@@ -64,10 +64,6 @@ class Radio extends React.Component {
64
64
  if (this.props.autoFocus && this.props.inputRef?.current) {
65
65
  this.props.inputRef.current.focus();
66
66
  }
67
-
68
- if (process.env.NODE_ENV !== "production" && this.props.isError) {
69
- console.warn('baseui:Radio Property "isError" will be removed in the next major version. Use "error" property instead.');
70
- }
71
67
  }
72
68
 
73
69
  render() {
@@ -86,7 +82,6 @@ class Radio extends React.Component {
86
82
  $disabled: this.props.disabled,
87
83
  $hasDescription: !!this.props.description,
88
84
  $isActive: this.state.isActive,
89
- $isError: this.props.isError,
90
85
  $error: this.props.error,
91
86
  $isFocused: this.props.isFocused,
92
87
  $isFocusVisible: this.props.isFocused && this.props.isFocusVisible,
@@ -109,7 +104,7 @@ class Radio extends React.Component {
109
104
  onMouseDown: this.onMouseDown,
110
105
  onMouseUp: this.onMouseUp
111
106
  }, sharedProps, rootProps), isLabelTopLeft(this.props.labelPlacement) && label, /*#__PURE__*/React.createElement(RadioMarkOuter, _extends({}, sharedProps, radioMarkOuterProps), /*#__PURE__*/React.createElement(RadioMarkInner, _extends({}, sharedProps, radioMarkInnerProps))), /*#__PURE__*/React.createElement(Input, _extends({
112
- "aria-invalid": this.props.error || this.props.isError || null,
107
+ "aria-invalid": this.props.error || null,
113
108
  checked: this.props.checked,
114
109
  disabled: this.props.disabled,
115
110
  name: this.props.name,
@@ -137,7 +132,6 @@ _defineProperty(Radio, "defaultProps", {
137
132
  autoFocus: false,
138
133
  inputRef: /*#__PURE__*/React.createRef(),
139
134
  align: 'vertical',
140
- isError: false,
141
135
  error: false,
142
136
  onChange: () => {},
143
137
  onMouseEnter: () => {},
@@ -49,41 +49,22 @@ class StatelessRadioGroup extends React.Component {
49
49
  });
50
50
  }
51
51
 
52
- componentDidMount() {
53
- if (process.env.NODE_ENV !== "production" && this.props.isError) {
54
- console.warn('baseui:Radio Property "isError" will be removed in the next major version. Use "error" property instead.');
55
- }
56
- }
57
-
58
52
  render() {
59
53
  const {
60
54
  overrides = {}
61
55
  } = this.props;
62
56
  const [RadioGroupRoot, radioGroupRootProps] = getOverrides(overrides.RadioGroupRoot, StyledRadioGroupRoot);
63
-
64
- if (process.env.NODE_ENV !== "production") {
65
- const overrideKeys = Object.keys(overrides); // TODO(v11)
66
-
67
- if (Boolean(overrideKeys.length) && !overrideKeys.includes('RadioGroupRoot')) {
68
- // eslint-disable-next-line no-console
69
- console.warn(`All overrides beside 'RadioGroupRoot' will be deprecated in the next major version update.
70
- Pass other overrides to the 'Radio' children instead.
71
- `);
72
- }
73
- }
74
-
75
57
  return /*#__PURE__*/React.createElement(RadioGroupRoot, _extends({
76
58
  id: this.props.id,
77
59
  role: "radiogroup",
78
60
  "aria-describedby": this.props['aria-describedby'],
79
61
  "aria-errormessage": this.props['aria-errormessage'],
80
- "aria-invalid": this.props.error || this.props.isError || null,
62
+ "aria-invalid": this.props.error || null,
81
63
  "aria-label": this.props['aria-label'],
82
64
  "aria-labelledby": this.props['aria-labelledby'],
83
65
  $align: this.props.align,
84
66
  $disabled: this.props.disabled,
85
- $isError: this.props.error || this.props.isError,
86
- $error: this.props.error || this.props.isError,
67
+ $error: this.props.error,
87
68
  $required: this.props.required
88
69
  }, radioGroupRootProps), React.Children.map(this.props.children, (child, index) => {
89
70
  if (! /*#__PURE__*/React.isValidElement(child)) {
@@ -96,7 +77,6 @@ class StatelessRadioGroup extends React.Component {
96
77
  autoFocus: this.props.autoFocus,
97
78
  checked,
98
79
  disabled: this.props.disabled || child.props.disabled,
99
- isError: this.props.isError,
100
80
  error: this.props.error,
101
81
  isFocused: this.state.focusedRadioIndex === index,
102
82
  isFocusVisible: this.state.isFocusVisible,
@@ -107,11 +87,7 @@ class StatelessRadioGroup extends React.Component {
107
87
  onFocus: e => this.handleFocus(e, index),
108
88
  onChange: this.props.onChange,
109
89
  onMouseEnter: this.props.onMouseEnter,
110
- onMouseLeave: this.props.onMouseLeave,
111
- // will need to remove overrides pass-through on next major version
112
- overrides: { ...this.props.overrides,
113
- ...child.props.overrides
114
- }
90
+ onMouseLeave: this.props.onMouseLeave
115
91
  });
116
92
  }));
117
93
  }
@@ -125,7 +101,6 @@ _defineProperty(StatelessRadioGroup, "defaultProps", {
125
101
  autoFocus: false,
126
102
  labelPlacement: 'right',
127
103
  align: 'vertical',
128
- isError: false,
129
104
  error: false,
130
105
  required: false,
131
106
  onChange: () => {},
@@ -23,17 +23,16 @@ function getOuterColor(props) {
23
23
  $disabled,
24
24
  $checked,
25
25
  $isFocusVisible,
26
- $error,
27
- $isError
26
+ $error
28
27
  } = props;
29
28
  if ($disabled) return colors.tickFillDisabled;
30
29
 
31
30
  if (!$checked) {
32
31
  if ($isFocusVisible) return colors.borderSelected;
33
- if ($error || $isError) return colors.tickBorderError;
32
+ if ($error) return colors.tickBorderError;
34
33
  return colors.tickBorder;
35
34
  } else {
36
- if ($error || $isError) {
35
+ if ($error) {
37
36
  switch (getState(props)) {
38
37
  case DEFAULT:
39
38
  return colors.tickFillErrorSelected;
@@ -71,7 +70,7 @@ function getInnerColor(props) {
71
70
  }
72
71
 
73
72
  if (!props.$checked) {
74
- if (props.$error || props.$isError) {
73
+ if (props.$error) {
75
74
  switch (getState(props)) {
76
75
  case DEFAULT:
77
76
  return colors.tickFillError;
@@ -40,11 +40,11 @@ export const StyledStar = styled('li', ({
40
40
  let prePartialStarFill;
41
41
 
42
42
  if ($isActive) {
43
- starStroke = starFill = $theme.colors.rating400;
43
+ starStroke = starFill = $theme.colors.warning400;
44
44
  }
45
45
 
46
46
  if ($isPartialActive && !$isActive) {
47
- prePartialStarStroke = prePartialStarFill = $theme.colors.rating400;
47
+ prePartialStarStroke = prePartialStarFill = $theme.colors.warning400;
48
48
  }
49
49
 
50
50
  const styles = {
@@ -101,7 +101,7 @@ export const StyledEmoticon = styled('li', ({
101
101
  let emoticonFill = $theme.colors.ratingInactiveFill;
102
102
 
103
103
  if ($isActive) {
104
- emoticonFill = $theme.colors.rating400;
104
+ emoticonFill = $theme.colors.warning400;
105
105
  }
106
106
 
107
107
  const ratingIcons = [angryRatingSVG(emoticonFill, $size), sadRatingSVG(emoticonFill, $size), neutralRatingSVG(emoticonFill, $size), happyRatingSVG(emoticonFill, $size), veryHappyRatingSVG(emoticonFill, $size)];
@@ -14,7 +14,6 @@ export { default as SelectDropdown } from './dropdown.js';
14
14
  export { default as StatefulSelect } from './stateful-select.js';
15
15
  export { default as StatefulSelectContainer } from './stateful-select-container.js'; // Styled elements
16
16
 
17
- export { StyledRoot, StyledControlContainer, StyledValueContainer, StyledPlaceholder, StyledSingleValue, StyledInputContainer, StyledInput, StyledInputSizer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon // TODO(v11): remove StyledSearchIconContainer as StyledSearchIcon
18
- , StyledSearchIconContainer as StyledSearchIcon, StyledSearchIconContainer, StyledDropdownContainer, StyledDropdown, StyledDropdownListItem, StyledOptionContent } from './styled-components.js';
17
+ export { StyledRoot, StyledControlContainer, StyledValueContainer, StyledPlaceholder, StyledSingleValue, StyledInputContainer, StyledInput, StyledInputSizer, StyledIconsContainer, StyledSelectArrow, StyledClearIcon, StyledSearchIconContainer, StyledDropdownContainer, StyledDropdown, StyledDropdownListItem, StyledOptionContent } from './styled-components.js';
19
18
  export { default as filterOptions } from './utils/default-filter-options.js';
20
19
  export { SIZE, TYPE, STATE_CHANGE_TYPE } from './constants.js';
@@ -437,12 +437,8 @@ class Select extends React.Component {
437
437
  _defineProperty(this, "handleInputRef", input => {
438
438
  this.input = input;
439
439
 
440
- if (this.props.controlRef) {
441
- if (typeof this.props.controlRef === 'function') {
442
- this.props.controlRef(input);
443
- } else {
444
- this.props.controlRef.current = input;
445
- }
440
+ if (this.props.controlRef && typeof this.props.controlRef === 'function') {
441
+ this.props.controlRef(input);
446
442
  }
447
443
  });
448
444
 
@@ -561,13 +557,19 @@ class Select extends React.Component {
561
557
  }
562
558
 
563
559
  this.isItMounted = true;
560
+ const {
561
+ controlRef
562
+ } = this.props;
564
563
 
565
- if (this.props.methodsRef) {
566
- const {
567
- methodsRef
568
- } = this.props;
569
- methodsRef.current = {
570
- setDropdownOpen: this.handleDropdownOpen.bind(this)
564
+ if (controlRef && typeof controlRef !== 'function') {
565
+ controlRef.current = {
566
+ setDropdownOpen: this.handleDropdownOpen.bind(this),
567
+ setInputValue: this.handleSetInputValue.bind(this),
568
+ setInputFocus: this.handleSetInputFocus.bind(this),
569
+ setInputBlur: this.handleSetInputBlur.bind(this),
570
+ // `focus` & `blur` below are for backwards compatibility and may be removed. Use setInputFocus and setInputBlur instead.
571
+ focus: this.handleSetInputFocus.bind(this),
572
+ blur: this.handleSetInputBlur.bind(this)
571
573
  };
572
574
  }
573
575
  }
@@ -608,6 +610,20 @@ class Select extends React.Component {
608
610
  this.setState({
609
611
  isOpen: nextOpenState
610
612
  });
613
+ }
614
+
615
+ handleSetInputValue(newInputValue) {
616
+ this.setState({
617
+ inputValue: newInputValue
618
+ });
619
+ }
620
+
621
+ handleSetInputFocus() {
622
+ this.input.focus();
623
+ }
624
+
625
+ handleSetInputBlur() {
626
+ this.input.blur();
611
627
  } // Handle touch outside on mobile to dismiss menu, ensures that the
612
628
  // touch target is not within the anchor DOM node.
613
629
 
@@ -841,14 +857,10 @@ class Select extends React.Component {
841
857
  const [SearchIconContainer, searchIconContainerProps] = getOverrides(overrides.SearchIconContainer, StyledSearchIconContainer);
842
858
  const [SearchIcon, searchIconProps] = getOverrides(overrides.SearchIcon, SearchIconComponent);
843
859
  const sharedProps = this.getSharedProps();
844
- return (
845
- /*#__PURE__*/
846
- // TODO(v11): remove searchIconProps from SearchIconContainer
847
- React.createElement(SearchIconContainer, _extends({}, sharedProps, searchIconProps, searchIconContainerProps), /*#__PURE__*/React.createElement(SearchIcon, _extends({
848
- size: 16,
849
- title: 'search'
850
- }, searchIconProps)))
851
- );
860
+ return /*#__PURE__*/React.createElement(SearchIconContainer, _extends({}, sharedProps, searchIconContainerProps), /*#__PURE__*/React.createElement(SearchIcon, _extends({
861
+ size: 16,
862
+ title: 'search'
863
+ }, sharedProps, searchIconProps)));
852
864
  }
853
865
 
854
866
  filterOptions(excludeOptions) {
@@ -117,10 +117,10 @@ function getControlContainerColors($disabled, $isFocused, $isPseudoFocused, $pos
117
117
  if ($isFocused || $isPseudoFocused) {
118
118
  return {
119
119
  color: colors.contentPrimary,
120
- borderLeftColor: colors.borderFocus,
121
- borderRightColor: colors.borderFocus,
122
- borderTopColor: colors.borderFocus,
123
- borderBottomColor: colors.borderFocus,
120
+ borderLeftColor: colors.borderSelected,
121
+ borderRightColor: colors.borderSelected,
122
+ borderTopColor: colors.borderSelected,
123
+ borderBottomColor: colors.borderSelected,
124
124
  backgroundColor: colors.inputFillActive
125
125
  };
126
126
  }
@@ -4,7 +4,7 @@ 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 { StyledSpinnerNext } from '../spinner/index.js';
7
+ import { Spinner } from '../spinner/index.js';
8
8
  import { styled, withStyle } from '../styles/index.js';
9
9
  import { PLACEMENT } from './constants.js';
10
10
  export const StyledRoot = styled('div', ({
@@ -41,7 +41,7 @@ export const StyledStartEnhancerContainer = styled('span', ({
41
41
  };
42
42
  });
43
43
  StyledStartEnhancerContainer.displayName = "StyledStartEnhancerContainer";
44
- export const StyledSpinner = withStyle(StyledSpinnerNext, ({
44
+ export const StyledSpinner = withStyle(Spinner, ({
45
45
  $height,
46
46
  $width
47
47
  }) => {
@@ -4,12 +4,6 @@ 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 { ProgressBarRounded, StyledProgressBarRoundedRoot, StyledProgressBarRoundedSvg, StyledProgressBarRoundedText, StyledProgressBarRoundedTrackBackground, StyledProgressBarRoundedTrackForeground } from '../progress-bar/index.js';
8
- export { default as Spinner } from './spinner.js'; // Styled elements
9
-
10
- export { Svg as StyledSvg, StyledTrackPath, StyledActivePath, StyledSpinnerNext } from './styled-components.js';
11
- export { SIZE } from './constants.js'; // Flow
12
-
13
- // Backward compatibility with SpinnerDeterminate
14
- // Deprecated
15
- export { ProgressBarRounded as SpinnerDeterminate, StyledProgressBarRoundedRoot as StyledSpinnerDeterminateRoot, StyledProgressBarRoundedSvg as StyledSpinnerDeterminateSvg, StyledProgressBarRoundedTrackBackground as StyledSpinnerDeterminateTrackBackground, StyledProgressBarRoundedTrackForeground as StyledSpinnerDeterminateTrackForeground, StyledProgressBarRoundedText as StyledSpinnerDeterminateText };
7
+ import { StyledSpinner } from './styled-components.js';
8
+ export { StyledSpinner as Spinner };
9
+ export { SIZE } from './constants.js'; // Flow
@@ -5,7 +5,6 @@ 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
7
  import { styled } from '../styles/index.js';
8
- import { getSvgStyles } from '../icon/styled-components.js';
9
8
  import { SIZE } from './constants.js';
10
9
  const spin = {
11
10
  from: {
@@ -15,36 +14,7 @@ const spin = {
15
14
  transform: 'rotate(360deg)'
16
15
  }
17
16
  };
18
- /**
19
- * Spinner icon overrides
20
- */
21
-
22
- export const Svg = styled('svg', props => {
23
- const {
24
- $theme,
25
- $color
26
- } = props;
27
- return { ...getSvgStyles(props),
28
- fill: $color || $theme.colors.accent,
29
- cursor: 'wait',
30
- animationName: spin,
31
- animationDuration: $theme.animation.timing1000,
32
- animationIterationCount: 'infinite',
33
- animationTimingFunction: 'linear'
34
- };
35
- });
36
- Svg.displayName = "Svg";
37
- export const StyledTrackPath = styled('path', props => ({
38
- fill: props.$theme.colors.spinnerTrackFill,
39
- opacity: 0.16
40
- }));
41
- StyledTrackPath.displayName = "StyledTrackPath";
42
- export const StyledActivePath = styled('path', props => ({
43
- fill: props.$color || props.$theme.colors.accent
44
- })); // TODO(v11): Replace Spinner with SpinnerNext
45
-
46
- StyledActivePath.displayName = "StyledActivePath";
47
- export const StyledSpinnerNext = styled('i', ({
17
+ export const StyledSpinner = styled('i', ({
48
18
  //$FlowFixMe
49
19
  $theme,
50
20
  $color = $theme.colors.contentAccent,
@@ -104,4 +74,4 @@ export const StyledSpinnerNext = styled('i', ({
104
74
  cursor: 'wait'
105
75
  };
106
76
  });
107
- StyledSpinnerNext.displayName = "StyledSpinnerNext";
77
+ StyledSpinner.displayName = "StyledSpinner";
@@ -43,19 +43,19 @@ export default function Filter(props) {
43
43
  ,
44
44
  crossFrame: false
45
45
  }, /*#__PURE__*/React.createElement(Heading, headingProps, "Filter Column"), /*#__PURE__*/React.createElement(Content, contentProps, props.children), /*#__PURE__*/React.createElement(Footer, footerProps, /*#__PURE__*/React.createElement(Button, {
46
- kind: KIND.minimal,
46
+ kind: KIND.tertiary,
47
47
  size: SIZE.compact,
48
48
  onClick: () => {
49
49
  onSelectAll();
50
50
  }
51
51
  }, "Select All"), /*#__PURE__*/React.createElement(Button, {
52
- kind: KIND.minimal,
52
+ kind: KIND.tertiary,
53
53
  size: SIZE.compact,
54
54
  onClick: () => {
55
55
  onReset();
56
56
  }
57
57
  }, "Reset"), props.hasCloseButton && /*#__PURE__*/React.createElement(Button, {
58
- kind: KIND.minimal,
58
+ kind: KIND.tertiary,
59
59
  size: SIZE.compact,
60
60
  onClick: close
61
61
  }, "Close"))),
@@ -213,7 +213,7 @@ const customColorStates = {
213
213
  [COLOR_STATE.disabled]: (theme, color) => ({
214
214
  color: customOnRamp(color, theme.colors.tagFontDisabledRampUnit),
215
215
  backgroundColor: null,
216
- borderColor: customOnRamp(color, theme.colors.tagOutlinedDisabledRampUnit)
216
+ borderColor: customOnRamp(color, theme.colors.tagSolidDisabledRampUnit)
217
217
  }),
218
218
  [COLOR_STATE.solid]: (theme, color) => ({
219
219
  color: customOnRamp(color, theme.colors.tagSolidFontRampUnit),