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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.StyledSearchIconContainer = exports.
|
|
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; }
|
|
@@ -111,10 +113,10 @@ function getControlContainerColors($disabled, $isFocused, $isPseudoFocused, $pos
|
|
|
111
113
|
if ($isFocused || $isPseudoFocused) {
|
|
112
114
|
return {
|
|
113
115
|
color: colors.contentPrimary,
|
|
114
|
-
borderLeftColor: colors.
|
|
115
|
-
borderRightColor: colors.
|
|
116
|
-
borderTopColor: colors.
|
|
117
|
-
borderBottomColor: colors.
|
|
116
|
+
borderLeftColor: colors.borderSelected,
|
|
117
|
+
borderRightColor: colors.borderSelected,
|
|
118
|
+
borderTopColor: colors.borderSelected,
|
|
119
|
+
borderBottomColor: colors.borderSelected,
|
|
118
120
|
backgroundColor: colors.inputFillActive
|
|
119
121
|
};
|
|
120
122
|
}
|
|
@@ -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
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
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 {
|
|
@@ -135,10 +135,10 @@ function getControlContainerColors(
|
|
|
135
135
|
if ($isFocused || $isPseudoFocused) {
|
|
136
136
|
return {
|
|
137
137
|
color: colors.contentPrimary,
|
|
138
|
-
borderLeftColor: colors.
|
|
139
|
-
borderRightColor: colors.
|
|
140
|
-
borderTopColor: colors.
|
|
141
|
-
borderBottomColor: colors.
|
|
138
|
+
borderLeftColor: colors.borderSelected,
|
|
139
|
+
borderRightColor: colors.borderSelected,
|
|
140
|
+
borderTopColor: colors.borderSelected,
|
|
141
|
+
borderBottomColor: colors.borderSelected,
|
|
142
142
|
backgroundColor: colors.inputFillActive,
|
|
143
143
|
};
|
|
144
144
|
}
|
|
@@ -424,14 +424,19 @@ export const StyledClearIcon = styled<SharedStylePropsArgT>('svg', (props) => {
|
|
|
424
424
|
};
|
|
425
425
|
});
|
|
426
426
|
|
|
427
|
-
export const
|
|
428
|
-
const { $theme } = props;
|
|
429
|
-
const { colors } = $theme;
|
|
427
|
+
export const StyledLoadingIndicator = withStyle<typeof Spinner, {}>(Spinner, ({ $theme }) => {
|
|
430
428
|
return {
|
|
431
|
-
|
|
432
|
-
|
|
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;
|
|
@@ -51,7 +51,7 @@ var StyledStartEnhancerContainer = (0, _index2.styled)('span', function (_ref2)
|
|
|
51
51
|
});
|
|
52
52
|
exports.StyledStartEnhancerContainer = StyledStartEnhancerContainer;
|
|
53
53
|
StyledStartEnhancerContainer.displayName = "StyledStartEnhancerContainer";
|
|
54
|
-
var StyledSpinner = (0, _index2.withStyle)(_index.
|
|
54
|
+
var StyledSpinner = (0, _index2.withStyle)(_index.Spinner, function (_ref4) {
|
|
55
55
|
var $height = _ref4.$height,
|
|
56
56
|
$width = _ref4.$width;
|
|
57
57
|
return {
|
|
@@ -7,7 +7,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
7
7
|
|
|
8
8
|
// @flow
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Spinner } from '../spinner/index.js';
|
|
11
11
|
import { styled, withStyle } from '../styles/index.js';
|
|
12
12
|
|
|
13
13
|
import { PLACEMENT } from './constants.js';
|
|
@@ -43,16 +43,16 @@ export const StyledStartEnhancerContainer = styled<{}>('span', ({ $theme }) => {
|
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
export const StyledSpinner = withStyle<
|
|
47
|
-
|
|
48
|
-
{ $height
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
46
|
+
export const StyledSpinner = withStyle<typeof Spinner, { $height: number, $width: number }>(
|
|
47
|
+
Spinner,
|
|
48
|
+
({ $height, $width }) => {
|
|
49
|
+
return {
|
|
50
|
+
boxSizing: 'border-box',
|
|
51
|
+
height: `${$height}px`,
|
|
52
|
+
width: `${$width}px`,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
56
|
|
|
57
57
|
export const StyledMessage = styled<{ $hasSuffix: boolean }>(
|
|
58
58
|
'p',
|
package/spinner/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import {StyletronComponent} from 'styletron-react';
|
|
3
|
-
import {
|
|
2
|
+
import {Sizing} from '../theme.ts';
|
|
4
3
|
|
|
5
4
|
export enum SIZE {
|
|
6
5
|
small = 'small',
|
|
@@ -8,22 +7,10 @@ export enum SIZE {
|
|
|
8
7
|
large = 'large',
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
export interface SpinnerOverrides {
|
|
12
|
-
Svg?: Override<any>;
|
|
13
|
-
ActivePath?: Override<any>;
|
|
14
|
-
TrackPath?: Override<any>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
10
|
export interface SpinnerProps {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
title?: string;
|
|
22
|
-
overrides?: SpinnerOverrides;
|
|
11
|
+
$color?: string;
|
|
12
|
+
$borderWidth?: number | string | SIZE | Sizing;
|
|
13
|
+
$size?: number | string | SIZE | Sizing;
|
|
23
14
|
}
|
|
24
|
-
export class Spinner extends React.Component<SpinnerProps> {}
|
|
25
15
|
|
|
26
|
-
export const
|
|
27
|
-
export const StyledTrackPath: StyletronComponent<any>;
|
|
28
|
-
export const StyledActivePath: StyletronComponent<any>;
|
|
29
|
-
export const StyledSpinnerNext: StyletronComponent<any>;
|
|
16
|
+
export const Spinner: StyletronComponent<SpinnerProps>;
|
package/spinner/index.js
CHANGED
|
@@ -3,70 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "SpinnerDeterminate", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _index.ProgressBarRounded;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "StyledSpinnerDeterminateRoot", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _index.StyledProgressBarRoundedRoot;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "StyledSpinnerDeterminateSvg", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _index.StyledProgressBarRoundedSvg;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "StyledSpinnerDeterminateText", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _index.StyledProgressBarRoundedText;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "StyledSpinnerDeterminateTrackBackground", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _index.StyledProgressBarRoundedTrackBackground;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "StyledSpinnerDeterminateTrackForeground", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _index.StyledProgressBarRoundedTrackForeground;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
6
|
Object.defineProperty(exports, "Spinner", {
|
|
43
7
|
enumerable: true,
|
|
44
8
|
get: function get() {
|
|
45
|
-
return
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "StyledSvg", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _styledComponents.Svg;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "StyledTrackPath", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _styledComponents.StyledTrackPath;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "StyledActivePath", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _styledComponents.StyledActivePath;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "StyledSpinnerNext", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function get() {
|
|
69
|
-
return _styledComponents.StyledSpinnerNext;
|
|
9
|
+
return _styledComponents.StyledSpinner;
|
|
70
10
|
}
|
|
71
11
|
});
|
|
72
12
|
Object.defineProperty(exports, "SIZE", {
|
|
@@ -76,12 +16,6 @@ Object.defineProperty(exports, "SIZE", {
|
|
|
76
16
|
}
|
|
77
17
|
});
|
|
78
18
|
|
|
79
|
-
var _index = require("../progress-bar/index.js");
|
|
80
|
-
|
|
81
|
-
var _spinner = _interopRequireDefault(require("./spinner.js"));
|
|
82
|
-
|
|
83
19
|
var _styledComponents = require("./styled-components.js");
|
|
84
20
|
|
|
85
|
-
var _constants = require("./constants.js");
|
|
86
|
-
|
|
87
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
var _constants = require("./constants.js");
|
package/spinner/index.js.flow
CHANGED
|
@@ -5,38 +5,13 @@ 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
|
// @flow
|
|
8
|
-
import {
|
|
9
|
-
ProgressBarRounded,
|
|
10
|
-
StyledProgressBarRoundedRoot,
|
|
11
|
-
StyledProgressBarRoundedSvg,
|
|
12
|
-
StyledProgressBarRoundedText,
|
|
13
|
-
StyledProgressBarRoundedTrackBackground,
|
|
14
|
-
StyledProgressBarRoundedTrackForeground,
|
|
15
|
-
} from '../progress-bar/index.js';
|
|
8
|
+
import { StyledSpinner } from './styled-components.js';
|
|
16
9
|
|
|
17
|
-
export {
|
|
18
|
-
// Styled elements
|
|
19
|
-
export {
|
|
20
|
-
Svg as StyledSvg,
|
|
21
|
-
StyledTrackPath,
|
|
22
|
-
StyledActivePath,
|
|
23
|
-
StyledSpinnerNext,
|
|
24
|
-
} from './styled-components.js';
|
|
10
|
+
export { StyledSpinner as Spinner };
|
|
25
11
|
export { SIZE } from './constants.js';
|
|
26
12
|
// Flow
|
|
27
13
|
export type * from './types.js';
|
|
28
14
|
|
|
29
|
-
// Backward compatibility with SpinnerDeterminate
|
|
30
|
-
// Deprecated
|
|
31
|
-
export {
|
|
32
|
-
ProgressBarRounded as SpinnerDeterminate,
|
|
33
|
-
StyledProgressBarRoundedRoot as StyledSpinnerDeterminateRoot,
|
|
34
|
-
StyledProgressBarRoundedSvg as StyledSpinnerDeterminateSvg,
|
|
35
|
-
StyledProgressBarRoundedTrackBackground as StyledSpinnerDeterminateTrackBackground,
|
|
36
|
-
StyledProgressBarRoundedTrackForeground as StyledSpinnerDeterminateTrackForeground,
|
|
37
|
-
StyledProgressBarRoundedText as StyledSpinnerDeterminateText,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
15
|
declare var __DEV__: boolean;
|
|
41
16
|
declare var __NODE__: boolean;
|
|
42
17
|
declare var __BROWSER__: boolean;
|
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.StyledSpinner = void 0;
|
|
7
7
|
|
|
8
8
|
var _index = require("../styles/index.js");
|
|
9
9
|
|
|
10
|
-
var _styledComponents = require("../icon/styled-components.js");
|
|
11
|
-
|
|
12
10
|
var _constants = require("./constants.js");
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
12
|
+
/*
|
|
13
|
+
Copyright (c) Uber Technologies, Inc.
|
|
19
14
|
|
|
15
|
+
This source code is licensed under the MIT license found in the
|
|
16
|
+
LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
20
18
|
var spin = {
|
|
21
19
|
from: {
|
|
22
20
|
transform: 'rotate(0deg)'
|
|
@@ -25,41 +23,7 @@ var spin = {
|
|
|
25
23
|
transform: 'rotate(360deg)'
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
* Spinner icon overrides
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
var Svg = (0, _index.styled)('svg', function (props) {
|
|
33
|
-
var $theme = props.$theme,
|
|
34
|
-
$color = props.$color;
|
|
35
|
-
return _objectSpread(_objectSpread({}, (0, _styledComponents.getSvgStyles)(props)), {}, {
|
|
36
|
-
fill: $color || $theme.colors.accent,
|
|
37
|
-
cursor: 'wait',
|
|
38
|
-
animationName: spin,
|
|
39
|
-
animationDuration: $theme.animation.timing1000,
|
|
40
|
-
animationIterationCount: 'infinite',
|
|
41
|
-
animationTimingFunction: 'linear'
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
exports.Svg = Svg;
|
|
45
|
-
Svg.displayName = "Svg";
|
|
46
|
-
var StyledTrackPath = (0, _index.styled)('path', function (props) {
|
|
47
|
-
return {
|
|
48
|
-
fill: props.$theme.colors.spinnerTrackFill,
|
|
49
|
-
opacity: 0.16
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
exports.StyledTrackPath = StyledTrackPath;
|
|
53
|
-
StyledTrackPath.displayName = "StyledTrackPath";
|
|
54
|
-
var StyledActivePath = (0, _index.styled)('path', function (props) {
|
|
55
|
-
return {
|
|
56
|
-
fill: props.$color || props.$theme.colors.accent
|
|
57
|
-
};
|
|
58
|
-
}); // TODO(v11): Replace Spinner with SpinnerNext
|
|
59
|
-
|
|
60
|
-
exports.StyledActivePath = StyledActivePath;
|
|
61
|
-
StyledActivePath.displayName = "StyledActivePath";
|
|
62
|
-
var StyledSpinnerNext = (0, _index.styled)('i', function (_ref) {
|
|
26
|
+
var StyledSpinner = (0, _index.styled)('i', function (_ref) {
|
|
63
27
|
var $theme = _ref.$theme,
|
|
64
28
|
_ref$$color = _ref.$color,
|
|
65
29
|
$color = _ref$$color === void 0 ? $theme.colors.contentAccent : _ref$$color,
|
|
@@ -117,5 +81,5 @@ var StyledSpinnerNext = (0, _index.styled)('i', function (_ref) {
|
|
|
117
81
|
cursor: 'wait'
|
|
118
82
|
};
|
|
119
83
|
});
|
|
120
|
-
exports.
|
|
121
|
-
|
|
84
|
+
exports.StyledSpinner = StyledSpinner;
|
|
85
|
+
StyledSpinner.displayName = "StyledSpinner";
|
|
@@ -6,14 +6,8 @@ LICENSE file in the root directory of this source tree.
|
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
8
|
import { styled } from '../styles/index.js';
|
|
9
|
-
import { getSvgStyles } from '../icon/styled-components.js';
|
|
10
9
|
import { SIZE } from './constants.js';
|
|
11
|
-
import type {
|
|
12
|
-
|
|
13
|
-
type StylePropsT = {
|
|
14
|
-
$size?: number | string,
|
|
15
|
-
$color?: string,
|
|
16
|
-
};
|
|
10
|
+
import type { SpinnerPropsT } from './types.js';
|
|
17
11
|
|
|
18
12
|
const spin = {
|
|
19
13
|
from: {
|
|
@@ -24,33 +18,7 @@ const spin = {
|
|
|
24
18
|
},
|
|
25
19
|
};
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
* Spinner icon overrides
|
|
29
|
-
*/
|
|
30
|
-
export const Svg = styled<StylePropsT>('svg', (props) => {
|
|
31
|
-
const { $theme, $color } = props;
|
|
32
|
-
return {
|
|
33
|
-
...getSvgStyles(props),
|
|
34
|
-
fill: $color || $theme.colors.accent,
|
|
35
|
-
cursor: 'wait',
|
|
36
|
-
animationName: spin,
|
|
37
|
-
animationDuration: $theme.animation.timing1000,
|
|
38
|
-
animationIterationCount: 'infinite',
|
|
39
|
-
animationTimingFunction: 'linear',
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const StyledTrackPath = styled<StylePropsT>('path', (props) => ({
|
|
44
|
-
fill: props.$theme.colors.spinnerTrackFill,
|
|
45
|
-
opacity: 0.16,
|
|
46
|
-
}));
|
|
47
|
-
|
|
48
|
-
export const StyledActivePath = styled<StylePropsT>('path', (props) => ({
|
|
49
|
-
fill: props.$color || props.$theme.colors.accent,
|
|
50
|
-
}));
|
|
51
|
-
|
|
52
|
-
// TODO(v11): Replace Spinner with SpinnerNext
|
|
53
|
-
export const StyledSpinnerNext = styled<StyledSpinnerNextPropsT>(
|
|
21
|
+
export const StyledSpinner = styled<SpinnerPropsT>(
|
|
54
22
|
'i',
|
|
55
23
|
({
|
|
56
24
|
//$FlowFixMe
|
package/spinner/types.js.flow
CHANGED
|
@@ -7,29 +7,11 @@ LICENSE file in the root directory of this source tree.
|
|
|
7
7
|
// @flow
|
|
8
8
|
|
|
9
9
|
import { SIZE } from './constants.js';
|
|
10
|
-
import type { OverrideT } from '../helpers/overrides.js';
|
|
11
10
|
import type { SizingT } from '../themes/types.js';
|
|
12
11
|
|
|
13
12
|
export type SizeT = $Keys<typeof SIZE>;
|
|
14
|
-
export type SpinnerPropsT = {
|
|
15
|
-
/** Sets aria-label attribute. */
|
|
16
|
-
'aria-label'?: string,
|
|
17
|
-
/** Size of element, will be passed to the svg width/height style. Can also be a value included in */
|
|
18
|
-
size?: number | string,
|
|
19
|
-
/** Color of icon, will be used as svg fill */
|
|
20
|
-
color?: string,
|
|
21
|
-
/** Silence should only be used in baseui. Used to not spam console on composed components like Select */
|
|
22
|
-
$silenceV11DeprecationWarning?: boolean,
|
|
23
|
-
/** Allows you to set the SVG `<title>` label, which is used for accessibility */
|
|
24
|
-
title?: string,
|
|
25
|
-
overrides?: {
|
|
26
|
-
Svg?: OverrideT,
|
|
27
|
-
ActivePath?: OverrideT,
|
|
28
|
-
TrackPath?: OverrideT,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
13
|
|
|
32
|
-
export type
|
|
14
|
+
export type SpinnerPropsT = {
|
|
33
15
|
/** Color of progress indicator */
|
|
34
16
|
$color?: string,
|
|
35
17
|
/** Width of the progress indicator "stroke". */
|
package/styles/types.js.flow
CHANGED
|
@@ -12,7 +12,6 @@ import type {
|
|
|
12
12
|
ColorTokensT,
|
|
13
13
|
ComponentColorTokensT,
|
|
14
14
|
SemanticColorTokensT,
|
|
15
|
-
DeprecatedSemanticColorTokensT,
|
|
16
15
|
AnimationT,
|
|
17
16
|
BreakpointsT,
|
|
18
17
|
BorderT,
|
|
@@ -44,7 +43,6 @@ export type ColorsT = {
|
|
|
44
43
|
...ColorTokensT,
|
|
45
44
|
...ComponentColorTokensT,
|
|
46
45
|
...SemanticColorTokensT,
|
|
47
|
-
...DeprecatedSemanticColorTokensT,
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
export type ThemeT = {|
|
package/table/filter.js
CHANGED
|
@@ -95,19 +95,19 @@ function Filter(props) {
|
|
|
95
95
|
,
|
|
96
96
|
crossFrame: false
|
|
97
97
|
}, /*#__PURE__*/React.createElement(Heading, headingProps, "Filter Column"), /*#__PURE__*/React.createElement(Content, contentProps, props.children), /*#__PURE__*/React.createElement(Footer, footerProps, /*#__PURE__*/React.createElement(_index.Button, {
|
|
98
|
-
kind: _index.KIND.
|
|
98
|
+
kind: _index.KIND.tertiary,
|
|
99
99
|
size: _index.SIZE.compact,
|
|
100
100
|
onClick: function onClick() {
|
|
101
101
|
onSelectAll();
|
|
102
102
|
}
|
|
103
103
|
}, "Select All"), /*#__PURE__*/React.createElement(_index.Button, {
|
|
104
|
-
kind: _index.KIND.
|
|
104
|
+
kind: _index.KIND.tertiary,
|
|
105
105
|
size: _index.SIZE.compact,
|
|
106
106
|
onClick: function onClick() {
|
|
107
107
|
onReset();
|
|
108
108
|
}
|
|
109
109
|
}, "Reset"), props.hasCloseButton && /*#__PURE__*/React.createElement(_index.Button, {
|
|
110
|
-
kind: _index.KIND.
|
|
110
|
+
kind: _index.KIND.tertiary,
|
|
111
111
|
size: _index.SIZE.compact,
|
|
112
112
|
onClick: close
|
|
113
113
|
}, "Close")));
|
package/table/filter.js.flow
CHANGED
|
@@ -54,7 +54,7 @@ export default function Filter(props: FilterProps) {
|
|
|
54
54
|
<Content {...contentProps}>{props.children}</Content>
|
|
55
55
|
<Footer {...footerProps}>
|
|
56
56
|
<Button
|
|
57
|
-
kind={KIND.
|
|
57
|
+
kind={KIND.tertiary}
|
|
58
58
|
size={SIZE.compact}
|
|
59
59
|
onClick={() => {
|
|
60
60
|
onSelectAll();
|
|
@@ -64,7 +64,7 @@ export default function Filter(props: FilterProps) {
|
|
|
64
64
|
</Button>
|
|
65
65
|
|
|
66
66
|
<Button
|
|
67
|
-
kind={KIND.
|
|
67
|
+
kind={KIND.tertiary}
|
|
68
68
|
size={SIZE.compact}
|
|
69
69
|
onClick={() => {
|
|
70
70
|
onReset();
|
|
@@ -74,7 +74,7 @@ export default function Filter(props: FilterProps) {
|
|
|
74
74
|
</Button>
|
|
75
75
|
|
|
76
76
|
{props.hasCloseButton && (
|
|
77
|
-
<Button kind={KIND.
|
|
77
|
+
<Button kind={KIND.tertiary} size={SIZE.compact} onClick={close}>
|
|
78
78
|
Close
|
|
79
79
|
</Button>
|
|
80
80
|
)}
|
package/tag/styled-components.js
CHANGED
|
@@ -251,7 +251,7 @@ var customColorStates = (_customColorStates = {}, _defineProperty(_customColorSt
|
|
|
251
251
|
return {
|
|
252
252
|
color: customOnRamp(color, theme.colors.tagFontDisabledRampUnit),
|
|
253
253
|
backgroundColor: null,
|
|
254
|
-
borderColor: customOnRamp(color, theme.colors.
|
|
254
|
+
borderColor: customOnRamp(color, theme.colors.tagSolidDisabledRampUnit)
|
|
255
255
|
};
|
|
256
256
|
}), _defineProperty(_customColorStates, COLOR_STATE.solid, function (theme, color) {
|
|
257
257
|
return {
|
|
@@ -217,7 +217,7 @@ const customColorStates = {
|
|
|
217
217
|
[COLOR_STATE.disabled]: (theme, color) => ({
|
|
218
218
|
color: customOnRamp(color, theme.colors.tagFontDisabledRampUnit),
|
|
219
219
|
backgroundColor: null,
|
|
220
|
-
borderColor: customOnRamp(color, theme.colors.
|
|
220
|
+
borderColor: customOnRamp(color, theme.colors.tagSolidDisabledRampUnit),
|
|
221
221
|
}),
|
|
222
222
|
[COLOR_STATE.solid]: (theme, color) => ({
|
|
223
223
|
color: customOnRamp(color, theme.colors.tagSolidFontRampUnit),
|