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.
- 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 +1 -1
- package/data-table/data-table.js.flow +1 -1
- package/data-table/header-cell.js +3 -0
- package/data-table/header-cell.js.flow +1 -1
- package/datepicker/calendar.js +15 -7
- package/datepicker/calendar.js.flow +23 -9
- package/datepicker/constants.js +12 -2
- package/datepicker/constants.js.flow +10 -0
- package/datepicker/datepicker.js +61 -30
- package/datepicker/datepicker.js.flow +77 -37
- 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-container.js.flow +2 -1
- package/datepicker/styled-components.js +23 -1
- package/datepicker/styled-components.js.flow +12 -2
- package/datepicker/types.js.flow +35 -10
- 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 +1 -1
- package/es/data-table/header-cell.js +3 -0
- package/es/datepicker/calendar.js +15 -7
- package/es/datepicker/constants.js +8 -0
- package/es/datepicker/datepicker.js +56 -29
- package/es/datepicker/day.js +77 -34
- package/es/datepicker/month.js +3 -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/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/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 +32 -20
- package/es/select/styled-components.js +4 -4
- 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 +1 -1
- package/esm/data-table/header-cell.js +3 -0
- package/esm/datepicker/calendar.js +15 -7
- package/esm/datepicker/constants.js +8 -0
- package/esm/datepicker/datepicker.js +60 -30
- package/esm/datepicker/day.js +84 -34
- package/esm/datepicker/month.js +3 -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/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/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 +34 -19
- package/esm/select/styled-components.js +4 -4
- 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/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/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 +10 -10
- 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/progress-bar/index.d.ts +3 -3
- 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 +8 -3
- package/select/index.js +0 -6
- package/select/index.js.flow +0 -2
- package/select/select-component.js +34 -19
- package/select/select-component.js.flow +29 -13
- package/select/styled-components.js +4 -4
- package/select/styled-components.js.flow +4 -4
- package/select/types.js.flow +11 -7
- 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/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/spinner/spinner.js.flow
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) Uber Technologies, Inc.
|
|
3
|
-
|
|
4
|
-
This source code is licensed under the MIT license found in the
|
|
5
|
-
LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
// @flow
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
|
|
10
|
-
import { mergeOverrides, getOverrides } from '../helpers/overrides.js';
|
|
11
|
-
import Icon from '../icon/icon.js';
|
|
12
|
-
|
|
13
|
-
import { Svg as StyledSvg, StyledActivePath, StyledTrackPath } from './styled-components.js';
|
|
14
|
-
import type { SpinnerPropsT } from './types.js';
|
|
15
|
-
|
|
16
|
-
class Spinner extends React.Component<SpinnerPropsT> {
|
|
17
|
-
static defaultProps: $Shape<SpinnerPropsT> = {
|
|
18
|
-
color: '',
|
|
19
|
-
size: 44,
|
|
20
|
-
title: 'Loading',
|
|
21
|
-
overrides: {},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
componentDidMount() {
|
|
25
|
-
// TODO(v11): remove warning when switching default Spinner
|
|
26
|
-
if (__DEV__) {
|
|
27
|
-
if (!this.props.$silenceV11DeprecationWarning) {
|
|
28
|
-
console.warn(
|
|
29
|
-
`❖ [baseui] Please consider using "StyledSpinnerNext" instead of "Spinner". ` +
|
|
30
|
-
`In v11, "StyledSpinnerNext" will become the default "Spinner"` +
|
|
31
|
-
` and the current SVG based implementation will be deprecated.`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
render() {
|
|
38
|
-
const { overrides = {} } = this.props;
|
|
39
|
-
const mergedOverrides = mergeOverrides({ Svg: StyledSvg }, overrides);
|
|
40
|
-
const [TrackPath, trackPathProps] = getOverrides(overrides.TrackPath, StyledTrackPath);
|
|
41
|
-
const [ActivePath, activePathProps] = getOverrides(overrides.ActivePath, StyledActivePath);
|
|
42
|
-
return (
|
|
43
|
-
// $FlowExpectedError[cannot-spread-inexact]
|
|
44
|
-
<Icon
|
|
45
|
-
aria-label={'Loading'}
|
|
46
|
-
data-baseweb="spinner"
|
|
47
|
-
title="Spinner"
|
|
48
|
-
viewBox="3 3 18 18"
|
|
49
|
-
{...this.props}
|
|
50
|
-
overrides={mergedOverrides}
|
|
51
|
-
>
|
|
52
|
-
<TrackPath
|
|
53
|
-
fillRule="evenodd"
|
|
54
|
-
clipRule="evenodd"
|
|
55
|
-
d="M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z"
|
|
56
|
-
$color={this.props.color}
|
|
57
|
-
{...trackPathProps}
|
|
58
|
-
/>
|
|
59
|
-
<ActivePath
|
|
60
|
-
fillRule="evenodd"
|
|
61
|
-
clipRule="evenodd"
|
|
62
|
-
d="M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z"
|
|
63
|
-
$color={this.props.color}
|
|
64
|
-
{...activePathProps}
|
|
65
|
-
/>
|
|
66
|
-
</Icon>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export default Spinner;
|
|
72
|
-
|
|
73
|
-
declare var __DEV__: boolean;
|
|
74
|
-
declare var __NODE__: boolean;
|
|
75
|
-
declare var __BROWSER__: boolean;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _colorTokens = _interopRequireDefault(require("./color-tokens.js"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Copyright (c) Uber Technologies, Inc.
|
|
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
|
-
*/
|
|
18
|
-
|
|
19
|
-
/* ---- DEPRECATED ---- */
|
|
20
|
-
var _default = function _default() {
|
|
21
|
-
var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _colorTokens.default;
|
|
22
|
-
return {
|
|
23
|
-
// TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
|
|
24
|
-
// since it's not used in the component specific tokens
|
|
25
|
-
// and we ship semantic tokens separately
|
|
26
|
-
|
|
27
|
-
/* ---- Legacy Semantic Colors ---- */
|
|
28
|
-
// Font Color
|
|
29
|
-
colorPrimary: themePrimitives.mono100,
|
|
30
|
-
colorSecondary: themePrimitives.mono200,
|
|
31
|
-
// Background
|
|
32
|
-
background: themePrimitives.mono1000,
|
|
33
|
-
backgroundAlt: themePrimitives.mono700,
|
|
34
|
-
backgroundInv: themePrimitives.mono100,
|
|
35
|
-
// Foreground
|
|
36
|
-
foreground: themePrimitives.mono100,
|
|
37
|
-
foregroundAlt: themePrimitives.mono300,
|
|
38
|
-
foregroundInv: themePrimitives.mono1000,
|
|
39
|
-
// Borders
|
|
40
|
-
border: themePrimitives.mono600,
|
|
41
|
-
borderAlt: themePrimitives.mono700,
|
|
42
|
-
borderFocus: themePrimitives.primary,
|
|
43
|
-
borderError: themePrimitives.negative,
|
|
44
|
-
// Shadow
|
|
45
|
-
shadowFocus: 'rgba(39, 110, 241, 0.32)',
|
|
46
|
-
shadowError: 'rgba(229, 73, 55, 0.32)'
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) Uber Technologies, Inc.
|
|
3
|
-
|
|
4
|
-
This source code is licensed under the MIT license found in the
|
|
5
|
-
LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
// @flow
|
|
8
|
-
import colorTokens from './color-tokens.js';
|
|
9
|
-
import type { ColorTokensT } from '../types.js';
|
|
10
|
-
|
|
11
|
-
/* ---- DEPRECATED ---- */
|
|
12
|
-
export default (themePrimitives: ColorTokensT = colorTokens) => ({
|
|
13
|
-
// TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
|
|
14
|
-
// since it's not used in the component specific tokens
|
|
15
|
-
// and we ship semantic tokens separately
|
|
16
|
-
|
|
17
|
-
/* ---- Legacy Semantic Colors ---- */
|
|
18
|
-
|
|
19
|
-
// Font Color
|
|
20
|
-
colorPrimary: themePrimitives.mono100,
|
|
21
|
-
colorSecondary: themePrimitives.mono200,
|
|
22
|
-
// Background
|
|
23
|
-
background: themePrimitives.mono1000,
|
|
24
|
-
backgroundAlt: themePrimitives.mono700,
|
|
25
|
-
backgroundInv: themePrimitives.mono100,
|
|
26
|
-
// Foreground
|
|
27
|
-
foreground: themePrimitives.mono100,
|
|
28
|
-
foregroundAlt: themePrimitives.mono300,
|
|
29
|
-
foregroundInv: themePrimitives.mono1000,
|
|
30
|
-
// Borders
|
|
31
|
-
border: themePrimitives.mono600,
|
|
32
|
-
borderAlt: themePrimitives.mono700,
|
|
33
|
-
borderFocus: themePrimitives.primary,
|
|
34
|
-
borderError: themePrimitives.negative,
|
|
35
|
-
// Shadow
|
|
36
|
-
shadowFocus: 'rgba(39, 110, 241, 0.32)',
|
|
37
|
-
shadowError: 'rgba(229, 73, 55, 0.32)',
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
declare var __DEV__: boolean;
|
|
41
|
-
declare var __NODE__: boolean;
|
|
42
|
-
declare var __BROWSER__: boolean;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _colorTokens = _interopRequireDefault(require("./color-tokens.js"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Copyright (c) Uber Technologies, Inc.
|
|
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
|
-
*/
|
|
18
|
-
|
|
19
|
-
/* ---- DEPRECATED ---- */
|
|
20
|
-
var _default = function _default() {
|
|
21
|
-
var themePrimitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _colorTokens.default;
|
|
22
|
-
return {
|
|
23
|
-
// TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
|
|
24
|
-
// since it's not used in the component specific tokens
|
|
25
|
-
// and we ship semantic tokens separately
|
|
26
|
-
|
|
27
|
-
/* ---- Legacy Semantic Colors ---- */
|
|
28
|
-
// Font Color
|
|
29
|
-
colorPrimary: themePrimitives.black,
|
|
30
|
-
colorSecondary: themePrimitives.mono800,
|
|
31
|
-
// Background
|
|
32
|
-
background: themePrimitives.white,
|
|
33
|
-
backgroundAlt: themePrimitives.white,
|
|
34
|
-
backgroundInv: themePrimitives.primary,
|
|
35
|
-
// Foreground
|
|
36
|
-
foreground: themePrimitives.black,
|
|
37
|
-
foregroundAlt: themePrimitives.mono800,
|
|
38
|
-
foregroundInv: themePrimitives.white,
|
|
39
|
-
// Borders
|
|
40
|
-
border: themePrimitives.mono500,
|
|
41
|
-
borderAlt: themePrimitives.mono600,
|
|
42
|
-
borderFocus: themePrimitives.primary,
|
|
43
|
-
borderError: themePrimitives.negative,
|
|
44
|
-
// Shadow
|
|
45
|
-
shadowFocus: 'rgba(39, 110, 241, 0.32)',
|
|
46
|
-
shadowError: 'rgba(229, 73, 55, 0.32)'
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright (c) Uber Technologies, Inc.
|
|
3
|
-
|
|
4
|
-
This source code is licensed under the MIT license found in the
|
|
5
|
-
LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
// @flow
|
|
8
|
-
import colorTokens from './color-tokens.js';
|
|
9
|
-
import type { ColorTokensT, DeprecatedSemanticColorTokensT } from '../types.js';
|
|
10
|
-
|
|
11
|
-
/* ---- DEPRECATED ---- */
|
|
12
|
-
export default (themePrimitives: ColorTokensT = colorTokens): DeprecatedSemanticColorTokensT => ({
|
|
13
|
-
// TODO(#2318) Remove Legacy Semantic Colors values in the next v11 major
|
|
14
|
-
// since it's not used in the component specific tokens
|
|
15
|
-
// and we ship semantic tokens separately
|
|
16
|
-
|
|
17
|
-
/* ---- Legacy Semantic Colors ---- */
|
|
18
|
-
|
|
19
|
-
// Font Color
|
|
20
|
-
colorPrimary: themePrimitives.black,
|
|
21
|
-
colorSecondary: themePrimitives.mono800,
|
|
22
|
-
// Background
|
|
23
|
-
background: themePrimitives.white,
|
|
24
|
-
backgroundAlt: themePrimitives.white,
|
|
25
|
-
backgroundInv: themePrimitives.primary,
|
|
26
|
-
// Foreground
|
|
27
|
-
foreground: themePrimitives.black,
|
|
28
|
-
foregroundAlt: themePrimitives.mono800,
|
|
29
|
-
foregroundInv: themePrimitives.white,
|
|
30
|
-
// Borders
|
|
31
|
-
border: themePrimitives.mono500,
|
|
32
|
-
borderAlt: themePrimitives.mono600,
|
|
33
|
-
borderFocus: themePrimitives.primary,
|
|
34
|
-
borderError: themePrimitives.negative,
|
|
35
|
-
// Shadow
|
|
36
|
-
shadowFocus: 'rgba(39, 110, 241, 0.32)',
|
|
37
|
-
shadowError: 'rgba(229, 73, 55, 0.32)',
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
declare var __DEV__: boolean;
|
|
41
|
-
declare var __NODE__: boolean;
|
|
42
|
-
declare var __BROWSER__: boolean;
|