baseui 10.12.1 → 11.0.2
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.
- package/README.md +3 -3
- package/accordion/accordion.js +60 -13
- package/accordion/accordion.js.flow +49 -12
- package/accordion/index.d.ts +0 -3
- package/accordion/panel.js +7 -6
- package/accordion/panel.js.flow +20 -20
- package/accordion/stateless-accordion.js +2 -4
- package/accordion/stateless-accordion.js.flow +0 -2
- package/accordion/types.js.flow +0 -5
- package/button/constants.js +1 -2
- package/button/constants.js.flow +0 -1
- package/button/index.d.ts +0 -1
- package/button/styled-components.js +2 -29
- package/button/styled-components.js.flow +2 -30
- package/checkbox/checkbox.js +6 -30
- package/checkbox/checkbox.js.flow +7 -38
- package/checkbox/constants.js +2 -1
- package/checkbox/constants.js.flow +2 -1
- package/checkbox/index.d.ts +4 -6
- package/checkbox/index.js +0 -6
- package/checkbox/index.js.flow +0 -1
- package/checkbox/styled-components.js +52 -149
- package/checkbox/styled-components.js.flow +59 -165
- package/checkbox/types.js.flow +0 -5
- package/data-table/column-categorical.js +1 -1
- package/data-table/column-categorical.js.flow +1 -1
- package/data-table/column-datetime.js +1 -1
- package/data-table/column-datetime.js.flow +3 -1
- package/data-table/column.js +6 -2
- package/data-table/column.js.flow +9 -7
- package/data-table/data-table.js +10 -2
- package/data-table/data-table.js.flow +4 -1
- package/data-table/header-cell.js +3 -0
- package/data-table/header-cell.js.flow +1 -1
- package/data-table/index.d.ts +7 -8
- package/data-table/stateful-data-table.js +2 -1
- package/data-table/stateful-data-table.js.flow +1 -0
- package/data-table/types.js.flow +8 -0
- package/datepicker/calendar.js +28 -15
- package/datepicker/calendar.js.flow +31 -14
- package/datepicker/constants.js +12 -2
- package/datepicker/constants.js.flow +10 -0
- package/datepicker/datepicker.js +117 -86
- package/datepicker/datepicker.js.flow +123 -66
- package/datepicker/day.js +85 -34
- package/datepicker/day.js.flow +118 -54
- package/datepicker/locale.js.flow +0 -1
- package/datepicker/month.js +3 -1
- package/datepicker/month.js.flow +2 -0
- package/datepicker/stateful-calendar.js +6 -1
- package/datepicker/stateful-calendar.js.flow +8 -1
- package/datepicker/stateful-container.js +23 -2
- package/datepicker/stateful-container.js.flow +17 -3
- package/datepicker/stateful-datepicker.js +6 -1
- package/datepicker/stateful-datepicker.js.flow +7 -1
- package/datepicker/styled-components.js +23 -1
- package/datepicker/styled-components.js.flow +12 -2
- package/datepicker/types.js.flow +46 -43
- package/datepicker/utils/date-helpers.js +30 -0
- package/datepicker/utils/date-helpers.js.flow +12 -0
- package/datepicker/week.js +3 -1
- package/datepicker/week.js.flow +2 -0
- package/es/accordion/accordion.js +52 -12
- package/es/accordion/panel.js +7 -5
- package/es/accordion/stateless-accordion.js +2 -4
- package/es/button/constants.js +1 -2
- package/es/button/styled-components.js +2 -29
- package/es/checkbox/checkbox.js +7 -32
- package/es/checkbox/constants.js +2 -1
- package/es/checkbox/index.js +1 -1
- package/es/checkbox/styled-components.js +51 -146
- package/es/data-table/column-categorical.js +1 -1
- package/es/data-table/column-datetime.js +1 -1
- package/es/data-table/column.js +6 -2
- package/es/data-table/data-table.js +6 -2
- package/es/data-table/header-cell.js +3 -0
- package/es/data-table/stateful-data-table.js +2 -1
- package/es/datepicker/calendar.js +28 -15
- package/es/datepicker/constants.js +8 -0
- package/es/datepicker/datepicker.js +106 -79
- package/es/datepicker/day.js +77 -34
- package/es/datepicker/month.js +3 -1
- package/es/datepicker/stateful-calendar.js +6 -1
- package/es/datepicker/stateful-container.js +22 -2
- package/es/datepicker/stateful-datepicker.js +6 -1
- package/es/datepicker/styled-components.js +8 -2
- package/es/datepicker/types.js +1 -1
- package/es/datepicker/utils/date-helpers.js +16 -0
- package/es/datepicker/week.js +3 -1
- package/es/file-uploader/file-uploader.js +4 -4
- package/es/form-control/styled-components.js +0 -1
- package/es/header-navigation/styled-components.js +3 -3
- package/es/helpers/overrides.js +1 -2
- package/es/input/styled-components.js +4 -4
- package/es/layer/layer.js +4 -4
- package/es/list/list-item.js +5 -1
- package/es/list/menu-adapter.js +4 -0
- package/es/locale/index.js +0 -7
- package/es/menu/stateful-container.js +0 -1
- package/es/menu/styled-components.js +1 -1
- package/es/modal/index.js +1 -1
- package/es/modal/modal.js +19 -65
- package/es/modal/styled-components.js +12 -48
- package/es/phone-input/default-props.js +1 -1
- package/es/phone-input/index.js +0 -4
- package/es/phone-input/phone-input-lite.js +55 -31
- package/es/radio/radio.js +1 -7
- package/es/radio/radiogroup.js +3 -28
- package/es/radio/styled-components.js +4 -5
- package/es/rating/styled-components.js +3 -3
- package/es/select/index.js +1 -2
- package/es/select/select-component.js +20 -20
- package/es/select/styled-components.js +21 -17
- package/es/snackbar/snackbar-context.js +1 -1
- package/es/snackbar/styled-components.js +2 -2
- package/es/spinner/index.js +3 -9
- package/es/spinner/styled-components.js +2 -32
- package/es/table/filter.js +3 -3
- package/es/tag/styled-components.js +1 -1
- package/es/themes/dark-theme/color-component-tokens.js +0 -38
- package/es/themes/dark-theme/color-tokens.js +0 -2
- package/es/themes/dark-theme/create-dark-theme.js +0 -2
- package/es/themes/dark-theme/dark-theme.js +0 -2
- package/es/themes/light-theme/color-component-tokens.js +0 -38
- package/es/themes/light-theme/color-tokens.js +0 -2
- package/es/themes/light-theme/create-light-theme.js +0 -2
- package/es/themes/light-theme/light-theme.js +0 -2
- package/es/timepicker/timepicker.js +1 -8
- package/es/typography/index.js +1 -31
- package/esm/accordion/accordion.js +60 -13
- package/esm/accordion/panel.js +7 -6
- package/esm/accordion/stateless-accordion.js +2 -4
- package/esm/button/constants.js +1 -2
- package/esm/button/styled-components.js +2 -29
- package/esm/checkbox/checkbox.js +7 -30
- package/esm/checkbox/constants.js +2 -1
- package/esm/checkbox/index.js +1 -1
- package/esm/checkbox/styled-components.js +52 -147
- package/esm/data-table/column-categorical.js +1 -1
- package/esm/data-table/column-datetime.js +1 -1
- package/esm/data-table/column.js +6 -2
- package/esm/data-table/data-table.js +10 -2
- package/esm/data-table/header-cell.js +3 -0
- package/esm/data-table/stateful-data-table.js +2 -1
- package/esm/datepicker/calendar.js +28 -15
- package/esm/datepicker/constants.js +8 -0
- package/esm/datepicker/datepicker.js +116 -86
- package/esm/datepicker/day.js +84 -34
- package/esm/datepicker/month.js +3 -1
- package/esm/datepicker/stateful-calendar.js +6 -1
- package/esm/datepicker/stateful-container.js +23 -2
- package/esm/datepicker/stateful-datepicker.js +6 -1
- package/esm/datepicker/styled-components.js +24 -2
- package/esm/datepicker/types.js +1 -1
- package/esm/datepicker/utils/date-helpers.js +30 -0
- package/esm/datepicker/week.js +3 -1
- package/esm/file-uploader/file-uploader.js +4 -4
- package/esm/form-control/styled-components.js +0 -1
- package/esm/header-navigation/styled-components.js +3 -3
- package/esm/helpers/overrides.js +1 -2
- package/esm/input/styled-components.js +4 -4
- package/esm/layer/layer.js +4 -4
- package/esm/list/list-item.js +5 -1
- package/esm/list/menu-adapter.js +4 -0
- package/esm/locale/index.js +0 -7
- package/esm/menu/stateful-container.js +0 -1
- package/esm/menu/styled-components.js +1 -1
- package/esm/modal/index.js +1 -1
- package/esm/modal/modal.js +28 -71
- package/esm/modal/styled-components.js +6 -38
- package/esm/phone-input/default-props.js +1 -1
- package/esm/phone-input/index.js +0 -4
- package/esm/phone-input/phone-input-lite.js +60 -37
- package/esm/radio/radio.js +1 -7
- package/esm/radio/radiogroup.js +3 -28
- package/esm/radio/styled-components.js +4 -5
- package/esm/rating/styled-components.js +3 -3
- package/esm/select/index.js +1 -2
- package/esm/select/select-component.js +20 -20
- package/esm/select/styled-components.js +21 -14
- package/esm/snackbar/snackbar-context.js +1 -1
- package/esm/snackbar/styled-components.js +2 -2
- package/esm/spinner/index.js +3 -9
- package/esm/spinner/styled-components.js +2 -40
- package/esm/table/filter.js +3 -3
- package/esm/tag/styled-components.js +1 -1
- package/esm/themes/dark-theme/color-component-tokens.js +0 -38
- package/esm/themes/dark-theme/color-tokens.js +0 -2
- package/esm/themes/dark-theme/create-dark-theme.js +1 -2
- package/esm/themes/dark-theme/dark-theme.js +1 -2
- package/esm/themes/light-theme/color-component-tokens.js +0 -38
- package/esm/themes/light-theme/color-tokens.js +0 -2
- package/esm/themes/light-theme/create-light-theme.js +1 -2
- package/esm/themes/light-theme/light-theme.js +1 -2
- package/esm/timepicker/timepicker.js +1 -8
- package/esm/typography/index.js +1 -35
- package/file-uploader/file-uploader.js +3 -3
- package/file-uploader/file-uploader.js.flow +4 -4
- package/form-control/index.d.ts +9 -0
- package/form-control/styled-components.js +0 -1
- package/form-control/styled-components.js.flow +0 -1
- package/header-navigation/styled-components.js +3 -3
- package/header-navigation/styled-components.js.flow +3 -3
- package/helpers/overrides.js +1 -2
- package/helpers/overrides.js.flow +1 -1
- package/input/index.d.ts +5 -9
- package/input/styled-components.js +4 -4
- package/input/styled-components.js.flow +4 -4
- package/layer/layer.js +4 -4
- package/layer/layer.js.flow +4 -3
- package/list/list-item.js +5 -1
- package/list/list-item.js.flow +4 -0
- package/list/menu-adapter.js +4 -0
- package/list/menu-adapter.js.flow +4 -0
- package/list/types.js.flow +4 -0
- package/locale/index.js +0 -7
- package/locale/index.js.flow +0 -7
- package/locale.ts +0 -1
- package/menu/index.d.ts +1 -3
- package/menu/stateful-container.js +0 -1
- package/menu/stateful-container.js.flow +0 -1
- package/menu/styled-components.js +1 -1
- package/menu/styled-components.js.flow +1 -1
- package/modal/index.d.ts +4 -6
- package/modal/index.js +0 -6
- package/modal/index.js.flow +0 -1
- package/modal/modal.js +27 -70
- package/modal/modal.js.flow +17 -83
- package/modal/styled-components.js +7 -40
- package/modal/styled-components.js.flow +12 -44
- package/modal/types.js.flow +1 -10
- package/package.json +3 -2
- package/phone-input/default-props.js +1 -1
- package/phone-input/default-props.js.flow +1 -1
- package/phone-input/index.d.ts +0 -1
- package/phone-input/index.js +0 -36
- package/phone-input/index.js.flow +0 -4
- package/phone-input/phone-input-lite.js +63 -38
- package/phone-input/phone-input-lite.js.flow +66 -44
- package/radio/index.d.ts +4 -9
- package/radio/radio.js +1 -7
- package/radio/radio.js.flow +1 -8
- package/radio/radiogroup.js +3 -28
- package/radio/radiogroup.js.flow +2 -26
- package/radio/styled-components.js +4 -5
- package/radio/styled-components.js.flow +3 -4
- package/radio/types.js.flow +4 -15
- package/rating/styled-components.js +3 -3
- package/rating/styled-components.js.flow +3 -3
- package/select/index.d.ts +0 -2
- package/select/index.js +0 -6
- package/select/index.js.flow +0 -2
- package/select/select-component.js +23 -24
- package/select/select-component.js.flow +25 -14
- package/select/styled-components.js +23 -17
- package/select/styled-components.js.flow +17 -12
- package/snackbar/snackbar-context.js +1 -1
- package/snackbar/snackbar-context.js.flow +1 -1
- package/snackbar/styled-components.js +1 -1
- package/snackbar/styled-components.js.flow +11 -11
- package/spinner/index.d.ts +5 -18
- package/spinner/index.js +2 -68
- package/spinner/index.js.flow +2 -27
- package/spinner/styled-components.js +9 -45
- package/spinner/styled-components.js.flow +2 -34
- package/spinner/types.js.flow +1 -19
- package/styles/types.js.flow +0 -2
- package/table/filter.js +3 -3
- package/table/filter.js.flow +3 -3
- package/tag/styled-components.js +1 -1
- package/tag/styled-components.js.flow +1 -1
- package/tag/types.js.flow +1 -1
- package/theme.ts +0 -81
- package/themes/dark-theme/color-component-tokens.js +0 -38
- package/themes/dark-theme/color-component-tokens.js.flow +0 -42
- package/themes/dark-theme/color-tokens.js +0 -2
- package/themes/dark-theme/color-tokens.js.flow +0 -2
- package/themes/dark-theme/create-dark-theme.js +1 -3
- package/themes/dark-theme/create-dark-theme.js.flow +0 -2
- package/themes/dark-theme/dark-theme.js +1 -3
- package/themes/dark-theme/dark-theme.js.flow +0 -2
- package/themes/light-theme/color-component-tokens.js +0 -38
- package/themes/light-theme/color-component-tokens.js.flow +0 -43
- package/themes/light-theme/color-tokens.js +0 -2
- package/themes/light-theme/color-tokens.js.flow +0 -2
- package/themes/light-theme/create-light-theme.js +1 -3
- package/themes/light-theme/create-light-theme.js.flow +0 -2
- package/themes/light-theme/light-theme.js +1 -3
- package/themes/light-theme/light-theme.js.flow +0 -2
- package/themes/types.js.flow +0 -68
- package/timepicker/timepicker.js +1 -8
- package/timepicker/timepicker.js.flow +4 -10
- package/typography/index.d.ts +0 -23
- package/typography/index.js +2 -57
- package/typography/index.js.flow +0 -31
- package/es/spinner/spinner.js +0 -68
- package/es/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -35
- package/es/themes/light-theme/color-deprecated-semantic-tokens.js +0 -35
- package/esm/spinner/spinner.js +0 -125
- package/esm/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -38
- package/esm/themes/light-theme/color-deprecated-semantic-tokens.js +0 -38
- package/spinner/spinner.js +0 -136
- package/spinner/spinner.js.flow +0 -75
- package/themes/dark-theme/color-deprecated-semantic-tokens.js +0 -50
- package/themes/dark-theme/color-deprecated-semantic-tokens.js.flow +0 -42
- package/themes/light-theme/color-deprecated-semantic-tokens.js +0 -50
- package/themes/light-theme/color-deprecated-semantic-tokens.js.flow +0 -42
package/esm/phone-input/index.js
CHANGED
|
@@ -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';
|
|
@@ -12,6 +12,8 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
|
|
|
12
12
|
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
14
|
|
|
15
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
|
|
15
17
|
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; }
|
|
16
18
|
|
|
17
19
|
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; }
|
|
@@ -23,19 +25,17 @@ This source code is licensed under the MIT license found in the
|
|
|
23
25
|
LICENSE file in the root directory of this source tree.
|
|
24
26
|
*/
|
|
25
27
|
import React, { useRef } from 'react';
|
|
28
|
+
import CountryPicker from './country-picker.js';
|
|
29
|
+
import defaultProps from './default-props.js';
|
|
30
|
+
import { StyledPhoneInputRoot, StyledDialCode } from './styled-components.js';
|
|
26
31
|
import { Input as DefaultInput } from '../input/index.js';
|
|
27
|
-
import CountrySelect from './country-select.js';
|
|
28
32
|
import { getOverrides, mergeOverrides } from '../helpers/overrides.js';
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var country = defaultProps.country,
|
|
32
|
-
lightDefaultProps = _objectWithoutProperties(defaultProps, ["country"]);
|
|
33
|
-
|
|
34
|
-
PhoneInputLite.defaultProps = lightDefaultProps;
|
|
33
|
+
PhoneInputLite.defaultProps = defaultProps;
|
|
35
34
|
export default function PhoneInputLite(props) {
|
|
36
35
|
var ariaLabel = props['aria-label'],
|
|
37
36
|
ariaLabelledBy = props['aria-labelledby'],
|
|
38
37
|
ariaDescribedBy = props['aria-describedby'],
|
|
38
|
+
clearable = props.clearable,
|
|
39
39
|
countries = props.countries,
|
|
40
40
|
country = props.country,
|
|
41
41
|
disabled = props.disabled,
|
|
@@ -53,45 +53,67 @@ export default function PhoneInputLite(props) {
|
|
|
53
53
|
required = props.required,
|
|
54
54
|
size = props.size,
|
|
55
55
|
text = props.text,
|
|
56
|
-
restProps = _objectWithoutProperties(props, ["aria-label", "aria-labelledby", "aria-describedby", "countries", "country", "disabled", "error", "id", "mapIsoToLabel", "maxDropdownHeight", "maxDropdownWidth", "name", "onTextChange", "onCountryChange", "overrides", "placeholder", "positive", "required", "size", "text"]);
|
|
56
|
+
restProps = _objectWithoutProperties(props, ["aria-label", "aria-labelledby", "aria-describedby", "clearable", "countries", "country", "disabled", "error", "id", "mapIsoToLabel", "maxDropdownHeight", "maxDropdownWidth", "name", "onTextChange", "onCountryChange", "overrides", "placeholder", "positive", "required", "size", "text"]);
|
|
57
57
|
|
|
58
58
|
var inputRef = useRef(null);
|
|
59
|
+
var baseDialCodeOverride = {
|
|
60
|
+
component: StyledDialCode,
|
|
61
|
+
style: function style(_ref) {
|
|
62
|
+
var _ref$$theme = _ref.$theme,
|
|
63
|
+
direction = _ref$$theme.direction,
|
|
64
|
+
sizing = _ref$$theme.sizing;
|
|
65
|
+
var marginDir = direction === 'rtl' ? 'marginRight' : 'marginLeft';
|
|
66
|
+
return _defineProperty({}, marginDir, sizing.scale600);
|
|
67
|
+
},
|
|
68
|
+
props: {
|
|
69
|
+
children: country.dialCode
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var mergedDialCodeOverride = mergeOverrides({
|
|
73
|
+
DialCode: baseDialCodeOverride
|
|
74
|
+
}, {
|
|
75
|
+
DialCode: overrides.DialCode || {}
|
|
76
|
+
});
|
|
59
77
|
var baseOverrides = {
|
|
60
78
|
Input: {
|
|
61
|
-
style: function style(
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
style: function style(_ref3) {
|
|
80
|
+
var _ref3$$theme = _ref3.$theme,
|
|
81
|
+
direction = _ref3$$theme.direction,
|
|
82
|
+
sizing = _ref3$$theme.sizing;
|
|
83
|
+
var paddingDir = direction === 'rtl' ? 'paddingRight' : 'paddingLeft';
|
|
84
|
+
return _defineProperty({}, paddingDir, sizing.scale100);
|
|
66
85
|
}
|
|
67
86
|
},
|
|
68
|
-
Before:
|
|
69
|
-
component: CountrySelect,
|
|
70
|
-
props: {
|
|
71
|
-
countries: countries,
|
|
72
|
-
country: country,
|
|
73
|
-
disabled: disabled,
|
|
74
|
-
error: error,
|
|
75
|
-
inputRef: inputRef,
|
|
76
|
-
mapIsoToLabel: mapIsoToLabel,
|
|
77
|
-
maxDropdownHeight: maxDropdownHeight,
|
|
78
|
-
maxDropdownWidth: maxDropdownWidth,
|
|
79
|
-
onCountryChange: onCountryChange,
|
|
80
|
-
overrides: overrides,
|
|
81
|
-
positive: positive,
|
|
82
|
-
required: required,
|
|
83
|
-
size: size
|
|
84
|
-
}
|
|
85
|
-
}
|
|
87
|
+
Before: mergedDialCodeOverride.DialCode
|
|
86
88
|
};
|
|
87
89
|
|
|
88
|
-
var _getOverrides = getOverrides(overrides.
|
|
90
|
+
var _getOverrides = getOverrides(overrides.Root, StyledPhoneInputRoot),
|
|
89
91
|
_getOverrides2 = _slicedToArray(_getOverrides, 2),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
Root = _getOverrides2[0],
|
|
93
|
+
rootProps = _getOverrides2[1];
|
|
94
|
+
|
|
95
|
+
var _getOverrides3 = getOverrides(overrides.Input, DefaultInput),
|
|
96
|
+
_getOverrides4 = _slicedToArray(_getOverrides3, 2),
|
|
97
|
+
Input = _getOverrides4[0],
|
|
98
|
+
inputProps = _getOverrides4[1];
|
|
92
99
|
|
|
93
100
|
inputProps.overrides = mergeOverrides(baseOverrides, inputProps.overrides);
|
|
94
|
-
return /*#__PURE__*/React.createElement(
|
|
101
|
+
return /*#__PURE__*/React.createElement(Root, _extends({}, rootProps, {
|
|
102
|
+
"data-baseweb": "phone-input"
|
|
103
|
+
}), /*#__PURE__*/React.createElement(CountryPicker, {
|
|
104
|
+
country: country,
|
|
105
|
+
countries: countries,
|
|
106
|
+
disabled: disabled,
|
|
107
|
+
error: error,
|
|
108
|
+
mapIsoToLabel: mapIsoToLabel,
|
|
109
|
+
maxDropdownHeight: maxDropdownHeight,
|
|
110
|
+
maxDropdownWidth: maxDropdownWidth,
|
|
111
|
+
onCountryChange: onCountryChange,
|
|
112
|
+
overrides: overrides,
|
|
113
|
+
positive: positive,
|
|
114
|
+
required: required,
|
|
115
|
+
size: size
|
|
116
|
+
}), /*#__PURE__*/React.createElement(Input, _extends({
|
|
95
117
|
"aria-label": ariaLabel,
|
|
96
118
|
"aria-labelledby": ariaLabelledBy,
|
|
97
119
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -108,6 +130,7 @@ export default function PhoneInputLite(props) {
|
|
|
108
130
|
placeholder: placeholder,
|
|
109
131
|
size: size,
|
|
110
132
|
type: "text",
|
|
111
|
-
value: text
|
|
112
|
-
|
|
133
|
+
value: text,
|
|
134
|
+
clearable: clearable
|
|
135
|
+
}, restProps, inputProps)));
|
|
113
136
|
}
|
package/esm/radio/radio.js
CHANGED
|
@@ -122,10 +122,6 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
122
122
|
if (this.props.autoFocus && (_this$props$inputRef = this.props.inputRef) !== null && _this$props$inputRef !== void 0 && _this$props$inputRef.current) {
|
|
123
123
|
this.props.inputRef.current.focus();
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
if (process.env.NODE_ENV !== "production" && this.props.isError) {
|
|
127
|
-
console.warn('baseui:Radio Property "isError" will be removed in the next major version. Use "error" property instead.');
|
|
128
|
-
}
|
|
129
125
|
}
|
|
130
126
|
}, {
|
|
131
127
|
key: "render",
|
|
@@ -169,7 +165,6 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
169
165
|
$disabled: this.props.disabled,
|
|
170
166
|
$hasDescription: !!this.props.description,
|
|
171
167
|
$isActive: this.state.isActive,
|
|
172
|
-
$isError: this.props.isError,
|
|
173
168
|
$error: this.props.error,
|
|
174
169
|
$isFocused: this.props.isFocused,
|
|
175
170
|
$isFocusVisible: this.props.isFocused && this.props.isFocusVisible,
|
|
@@ -194,7 +189,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
194
189
|
onMouseDown: this.onMouseDown,
|
|
195
190
|
onMouseUp: this.onMouseUp
|
|
196
191
|
}, 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({
|
|
197
|
-
"aria-invalid": this.props.error ||
|
|
192
|
+
"aria-invalid": this.props.error || null,
|
|
198
193
|
checked: this.props.checked,
|
|
199
194
|
disabled: this.props.disabled,
|
|
200
195
|
name: this.props.name,
|
|
@@ -224,7 +219,6 @@ _defineProperty(Radio, "defaultProps", {
|
|
|
224
219
|
autoFocus: false,
|
|
225
220
|
inputRef: /*#__PURE__*/React.createRef(),
|
|
226
221
|
align: 'vertical',
|
|
227
|
-
isError: false,
|
|
228
222
|
error: false,
|
|
229
223
|
onChange: function onChange() {},
|
|
230
224
|
onMouseEnter: function onMouseEnter() {},
|
package/esm/radio/radiogroup.js
CHANGED
|
@@ -2,10 +2,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
6
|
|
|
11
7
|
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."); }
|
|
@@ -104,13 +100,6 @@ var StatelessRadioGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
_createClass(StatelessRadioGroup, [{
|
|
107
|
-
key: "componentDidMount",
|
|
108
|
-
value: function componentDidMount() {
|
|
109
|
-
if (process.env.NODE_ENV !== "production" && this.props.isError) {
|
|
110
|
-
console.warn('baseui:Radio Property "isError" will be removed in the next major version. Use "error" property instead.');
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
103
|
key: "render",
|
|
115
104
|
value: function render() {
|
|
116
105
|
var _this2 = this;
|
|
@@ -123,27 +112,17 @@ var StatelessRadioGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
123
112
|
RadioGroupRoot = _getOverrides2[0],
|
|
124
113
|
radioGroupRootProps = _getOverrides2[1];
|
|
125
114
|
|
|
126
|
-
if (process.env.NODE_ENV !== "production") {
|
|
127
|
-
var overrideKeys = Object.keys(overrides); // TODO(v11)
|
|
128
|
-
|
|
129
|
-
if (Boolean(overrideKeys.length) && !overrideKeys.includes('RadioGroupRoot')) {
|
|
130
|
-
// eslint-disable-next-line no-console
|
|
131
|
-
console.warn("All overrides beside 'RadioGroupRoot' will be deprecated in the next major version update.\n Pass other overrides to the 'Radio' children instead.\n ");
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
115
|
return /*#__PURE__*/React.createElement(RadioGroupRoot, _extends({
|
|
136
116
|
id: this.props.id,
|
|
137
117
|
role: "radiogroup",
|
|
138
118
|
"aria-describedby": this.props['aria-describedby'],
|
|
139
119
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
140
|
-
"aria-invalid": this.props.error ||
|
|
120
|
+
"aria-invalid": this.props.error || null,
|
|
141
121
|
"aria-label": this.props['aria-label'],
|
|
142
122
|
"aria-labelledby": this.props['aria-labelledby'],
|
|
143
123
|
$align: this.props.align,
|
|
144
124
|
$disabled: this.props.disabled,
|
|
145
|
-
$
|
|
146
|
-
$error: this.props.error || this.props.isError,
|
|
125
|
+
$error: this.props.error,
|
|
147
126
|
$required: this.props.required
|
|
148
127
|
}, radioGroupRootProps), React.Children.map(this.props.children, function (child, index) {
|
|
149
128
|
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
@@ -156,7 +135,6 @@ var StatelessRadioGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
156
135
|
autoFocus: _this2.props.autoFocus,
|
|
157
136
|
checked: checked,
|
|
158
137
|
disabled: _this2.props.disabled || child.props.disabled,
|
|
159
|
-
isError: _this2.props.isError,
|
|
160
138
|
error: _this2.props.error,
|
|
161
139
|
isFocused: _this2.state.focusedRadioIndex === index,
|
|
162
140
|
isFocusVisible: _this2.state.isFocusVisible,
|
|
@@ -171,9 +149,7 @@ var StatelessRadioGroup = /*#__PURE__*/function (_React$Component) {
|
|
|
171
149
|
},
|
|
172
150
|
onChange: _this2.props.onChange,
|
|
173
151
|
onMouseEnter: _this2.props.onMouseEnter,
|
|
174
|
-
onMouseLeave: _this2.props.onMouseLeave
|
|
175
|
-
// will need to remove overrides pass-through on next major version
|
|
176
|
-
overrides: _objectSpread(_objectSpread({}, _this2.props.overrides), child.props.overrides)
|
|
152
|
+
onMouseLeave: _this2.props.onMouseLeave
|
|
177
153
|
});
|
|
178
154
|
}));
|
|
179
155
|
}
|
|
@@ -189,7 +165,6 @@ _defineProperty(StatelessRadioGroup, "defaultProps", {
|
|
|
189
165
|
autoFocus: false,
|
|
190
166
|
labelPlacement: 'right',
|
|
191
167
|
align: 'vertical',
|
|
192
|
-
isError: false,
|
|
193
168
|
error: false,
|
|
194
169
|
required: false,
|
|
195
170
|
onChange: function onChange() {},
|
|
@@ -26,16 +26,15 @@ function getOuterColor(props) {
|
|
|
26
26
|
$disabled = props.$disabled,
|
|
27
27
|
$checked = props.$checked,
|
|
28
28
|
$isFocusVisible = props.$isFocusVisible,
|
|
29
|
-
$error = props.$error
|
|
30
|
-
$isError = props.$isError;
|
|
29
|
+
$error = props.$error;
|
|
31
30
|
if ($disabled) return colors.tickFillDisabled;
|
|
32
31
|
|
|
33
32
|
if (!$checked) {
|
|
34
33
|
if ($isFocusVisible) return colors.borderSelected;
|
|
35
|
-
if ($error
|
|
34
|
+
if ($error) return colors.tickBorderError;
|
|
36
35
|
return colors.tickBorder;
|
|
37
36
|
} else {
|
|
38
|
-
if ($error
|
|
37
|
+
if ($error) {
|
|
39
38
|
switch (getState(props)) {
|
|
40
39
|
case DEFAULT:
|
|
41
40
|
return colors.tickFillErrorSelected;
|
|
@@ -71,7 +70,7 @@ function getInnerColor(props) {
|
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
if (!props.$checked) {
|
|
74
|
-
if (props.$error
|
|
73
|
+
if (props.$error) {
|
|
75
74
|
switch (getState(props)) {
|
|
76
75
|
case DEFAULT:
|
|
77
76
|
return colors.tickFillError;
|
|
@@ -38,11 +38,11 @@ export var StyledStar = styled('li', function (_ref2) {
|
|
|
38
38
|
var prePartialStarFill;
|
|
39
39
|
|
|
40
40
|
if ($isActive) {
|
|
41
|
-
starStroke = starFill = $theme.colors.
|
|
41
|
+
starStroke = starFill = $theme.colors.warning400;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
if ($isPartialActive && !$isActive) {
|
|
45
|
-
prePartialStarStroke = prePartialStarFill = $theme.colors.
|
|
45
|
+
prePartialStarStroke = prePartialStarFill = $theme.colors.warning400;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
var styles = {
|
|
@@ -99,7 +99,7 @@ export var StyledEmoticon = styled('li', function (_ref3) {
|
|
|
99
99
|
var emoticonFill = $theme.colors.ratingInactiveFill;
|
|
100
100
|
|
|
101
101
|
if ($isActive) {
|
|
102
|
-
emoticonFill = $theme.colors.
|
|
102
|
+
emoticonFill = $theme.colors.warning400;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
var ratingIcons = [angryRatingSVG(emoticonFill, $size), sadRatingSVG(emoticonFill, $size), neutralRatingSVG(emoticonFill, $size), happyRatingSVG(emoticonFill, $size), veryHappyRatingSVG(emoticonFill, $size)];
|
package/esm/select/index.js
CHANGED
|
@@ -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
|
|
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';
|
|
@@ -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,
|
|
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,
|
|
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
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
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",
|
|
@@ -1002,14 +1006,10 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
1002
1006
|
searchIconProps = _getOverrides12[1];
|
|
1003
1007
|
|
|
1004
1008
|
var sharedProps = this.getSharedProps();
|
|
1005
|
-
return (
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
size: 16,
|
|
1010
|
-
title: 'search'
|
|
1011
|
-
}, searchIconProps)))
|
|
1012
|
-
);
|
|
1009
|
+
return /*#__PURE__*/React.createElement(SearchIconContainer, _extends({}, sharedProps, searchIconContainerProps), /*#__PURE__*/React.createElement(SearchIcon, _extends({
|
|
1010
|
+
size: 16,
|
|
1011
|
+
title: 'search'
|
|
1012
|
+
}, sharedProps, searchIconProps)));
|
|
1013
1013
|
}
|
|
1014
1014
|
}, {
|
|
1015
1015
|
key: "filterOptions",
|
|
@@ -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() {
|
|
@@ -102,10 +103,10 @@ function getControlContainerColors($disabled, $isFocused, $isPseudoFocused, $pos
|
|
|
102
103
|
if ($isFocused || $isPseudoFocused) {
|
|
103
104
|
return {
|
|
104
105
|
color: colors.contentPrimary,
|
|
105
|
-
borderLeftColor: colors.
|
|
106
|
-
borderRightColor: colors.
|
|
107
|
-
borderTopColor: colors.
|
|
108
|
-
borderBottomColor: colors.
|
|
106
|
+
borderLeftColor: colors.borderSelected,
|
|
107
|
+
borderRightColor: colors.borderSelected,
|
|
108
|
+
borderTopColor: colors.borderSelected,
|
|
109
|
+
borderBottomColor: colors.borderSelected,
|
|
109
110
|
backgroundColor: colors.inputFillActive
|
|
110
111
|
};
|
|
111
112
|
}
|
|
@@ -371,15 +372,21 @@ export var StyledClearIcon = styled('svg', function (props) {
|
|
|
371
372
|
});
|
|
372
373
|
});
|
|
373
374
|
StyledClearIcon.displayName = "StyledClearIcon";
|
|
374
|
-
export var
|
|
375
|
-
var $theme =
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
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
|
|
|
@@ -10,7 +10,7 @@ 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 {
|
|
13
|
+
import { Spinner } from '../spinner/index.js';
|
|
14
14
|
import { styled, withStyle } from '../styles/index.js';
|
|
15
15
|
import { PLACEMENT } from './constants.js';
|
|
16
16
|
export var StyledRoot = styled('div', function (_ref) {
|
|
@@ -44,7 +44,7 @@ export var StyledStartEnhancerContainer = styled('span', function (_ref2) {
|
|
|
44
44
|
}, paddingDir, $theme.sizing.scale600);
|
|
45
45
|
});
|
|
46
46
|
StyledStartEnhancerContainer.displayName = "StyledStartEnhancerContainer";
|
|
47
|
-
export var StyledSpinner = withStyle(
|
|
47
|
+
export var StyledSpinner = withStyle(Spinner, function (_ref4) {
|
|
48
48
|
var $height = _ref4.$height,
|
|
49
49
|
$width = _ref4.$width;
|
|
50
50
|
return {
|
package/esm/spinner/index.js
CHANGED
|
@@ -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 {
|
|
8
|
-
export {
|
|
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
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
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; }
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
1
|
/*
|
|
8
2
|
Copyright (c) Uber Technologies, Inc.
|
|
9
3
|
|
|
@@ -11,7 +5,6 @@ This source code is licensed under the MIT license found in the
|
|
|
11
5
|
LICENSE file in the root directory of this source tree.
|
|
12
6
|
*/
|
|
13
7
|
import { styled } from '../styles/index.js';
|
|
14
|
-
import { getSvgStyles } from '../icon/styled-components.js';
|
|
15
8
|
import { SIZE } from './constants.js';
|
|
16
9
|
var spin = {
|
|
17
10
|
from: {
|
|
@@ -21,38 +14,7 @@ var spin = {
|
|
|
21
14
|
transform: 'rotate(360deg)'
|
|
22
15
|
}
|
|
23
16
|
};
|
|
24
|
-
|
|
25
|
-
* Spinner icon overrides
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
export var Svg = styled('svg', function (props) {
|
|
29
|
-
var $theme = props.$theme,
|
|
30
|
-
$color = props.$color;
|
|
31
|
-
return _objectSpread(_objectSpread({}, getSvgStyles(props)), {}, {
|
|
32
|
-
fill: $color || $theme.colors.accent,
|
|
33
|
-
cursor: 'wait',
|
|
34
|
-
animationName: spin,
|
|
35
|
-
animationDuration: $theme.animation.timing1000,
|
|
36
|
-
animationIterationCount: 'infinite',
|
|
37
|
-
animationTimingFunction: 'linear'
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
Svg.displayName = "Svg";
|
|
41
|
-
export var StyledTrackPath = styled('path', function (props) {
|
|
42
|
-
return {
|
|
43
|
-
fill: props.$theme.colors.spinnerTrackFill,
|
|
44
|
-
opacity: 0.16
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
StyledTrackPath.displayName = "StyledTrackPath";
|
|
48
|
-
export var StyledActivePath = styled('path', function (props) {
|
|
49
|
-
return {
|
|
50
|
-
fill: props.$color || props.$theme.colors.accent
|
|
51
|
-
};
|
|
52
|
-
}); // TODO(v11): Replace Spinner with SpinnerNext
|
|
53
|
-
|
|
54
|
-
StyledActivePath.displayName = "StyledActivePath";
|
|
55
|
-
export var StyledSpinnerNext = styled('i', function (_ref) {
|
|
17
|
+
export var StyledSpinner = styled('i', function (_ref) {
|
|
56
18
|
var $theme = _ref.$theme,
|
|
57
19
|
_ref$$color = _ref.$color,
|
|
58
20
|
$color = _ref$$color === void 0 ? $theme.colors.contentAccent : _ref$$color,
|
|
@@ -110,4 +72,4 @@ export var StyledSpinnerNext = styled('i', function (_ref) {
|
|
|
110
72
|
cursor: 'wait'
|
|
111
73
|
};
|
|
112
74
|
});
|
|
113
|
-
|
|
75
|
+
StyledSpinner.displayName = "StyledSpinner";
|
package/esm/table/filter.js
CHANGED
|
@@ -79,19 +79,19 @@ export default function Filter(props) {
|
|
|
79
79
|
,
|
|
80
80
|
crossFrame: false
|
|
81
81
|
}, /*#__PURE__*/React.createElement(Heading, headingProps, "Filter Column"), /*#__PURE__*/React.createElement(Content, contentProps, props.children), /*#__PURE__*/React.createElement(Footer, footerProps, /*#__PURE__*/React.createElement(Button, {
|
|
82
|
-
kind: KIND.
|
|
82
|
+
kind: KIND.tertiary,
|
|
83
83
|
size: SIZE.compact,
|
|
84
84
|
onClick: function onClick() {
|
|
85
85
|
onSelectAll();
|
|
86
86
|
}
|
|
87
87
|
}, "Select All"), /*#__PURE__*/React.createElement(Button, {
|
|
88
|
-
kind: KIND.
|
|
88
|
+
kind: KIND.tertiary,
|
|
89
89
|
size: SIZE.compact,
|
|
90
90
|
onClick: function onClick() {
|
|
91
91
|
onReset();
|
|
92
92
|
}
|
|
93
93
|
}, "Reset"), props.hasCloseButton && /*#__PURE__*/React.createElement(Button, {
|
|
94
|
-
kind: KIND.
|
|
94
|
+
kind: KIND.tertiary,
|
|
95
95
|
size: SIZE.compact,
|
|
96
96
|
onClick: close
|
|
97
97
|
}, "Close")));
|
|
@@ -241,7 +241,7 @@ var customColorStates = (_customColorStates = {}, _defineProperty(_customColorSt
|
|
|
241
241
|
return {
|
|
242
242
|
color: customOnRamp(color, theme.colors.tagFontDisabledRampUnit),
|
|
243
243
|
backgroundColor: null,
|
|
244
|
-
borderColor: customOnRamp(color, theme.colors.
|
|
244
|
+
borderColor: customOnRamp(color, theme.colors.tagSolidDisabledRampUnit)
|
|
245
245
|
};
|
|
246
246
|
}), _defineProperty(_customColorStates, COLOR_STATE.solid, function (theme, color) {
|
|
247
247
|
return {
|