baseui 14.0.0 → 15.0.1
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/accordion/accordion.js +4 -4
- package/accordion/panel.d.ts +1 -1
- package/accordion/stateless-accordion.js +8 -8
- package/accordion/styled-components.js +1 -1
- package/accordion/types.d.ts +1 -1
- package/app-nav-bar/mobile-menu.js +3 -1
- package/banner/banner.js +3 -1
- package/banner/types.d.ts +2 -1
- package/bottom-navigation/bottom-navigation.js +4 -6
- package/bottom-navigation/selector.js +1 -1
- package/bottom-navigation/styled-components.js +1 -1
- package/button/button.d.ts +1 -3
- package/button/button.js +6 -2
- package/button/styled-components.d.ts +1 -0
- package/button/styled-components.js +61 -4
- package/button/types.d.ts +15 -3
- package/button-timed/button-timed.js +4 -5
- package/button-timed/styled-components.js +5 -3
- package/button-timed/types.d.ts +1 -1
- package/data-table/column-categorical.js +2 -2
- package/data-table/column-numerical.js +3 -18
- package/data-table/locale.d.ts +2 -0
- package/data-table/locale.js +2 -1
- package/data-table/stateful-container.js +1 -1
- package/data-table/stateful-data-table.js +7 -3
- package/data-table/types.d.ts +2 -0
- package/datepicker/day.js +2 -4
- package/datepicker/utils/date-helpers.d.ts +1 -0
- package/datepicker/utils/date-helpers.js +3 -0
- package/dialog/dialog.d.ts +1 -1
- package/dialog/dialog.js +38 -56
- package/dialog/styled-components.d.ts +2 -2
- package/dialog/styled-components.js +56 -24
- package/dialog/types.d.ts +5 -2
- package/dnd-list/list.js +1 -1
- package/dnd-list/stateful-list-container.js +1 -1
- package/file-uploader/constants.d.ts +18 -0
- package/file-uploader/constants.js +32 -0
- package/file-uploader/file-uploader.d.ts +2 -2
- package/file-uploader/file-uploader.js +406 -117
- package/file-uploader/index.d.ts +1 -1
- package/file-uploader/index.js +67 -18
- package/file-uploader/locale.d.ts +10 -10
- package/file-uploader/locale.js +5 -5
- package/file-uploader/styled-components.d.ts +13 -6
- package/file-uploader/styled-components.js +261 -64
- package/file-uploader/types.d.ts +49 -32
- package/file-uploader/utils.d.ts +5 -0
- package/file-uploader/utils.js +45 -0
- package/file-uploader-basic/file-uploader-basic.d.ts +10 -0
- package/file-uploader-basic/file-uploader-basic.js +173 -0
- package/file-uploader-basic/index.d.ts +4 -0
- package/file-uploader-basic/index.js +71 -0
- package/file-uploader-basic/locale.d.ts +15 -0
- package/file-uploader-basic/locale.js +21 -0
- package/file-uploader-basic/styled-components.d.ts +7 -0
- package/file-uploader-basic/styled-components.js +83 -0
- package/file-uploader-basic/types.d.ts +41 -0
- package/form-control/form-control.js +38 -3
- package/form-control/styled-components.d.ts +2 -0
- package/form-control/styled-components.js +22 -2
- package/form-control/types.d.ts +4 -0
- package/helpers/react-helpers.js +1 -1
- package/icon/circle-check-filled.d.ts +9 -0
- package/icon/circle-check-filled.js +50 -0
- package/icon/circle-exclamation-point-filled.d.ts +9 -0
- package/icon/circle-exclamation-point-filled.js +50 -0
- package/icon/hide.js +1 -1
- package/icon/icon-exports.d.ts +4 -0
- package/icon/icon-exports.js +28 -0
- package/icon/paperclip-filled.d.ts +9 -0
- package/icon/paperclip-filled.js +50 -0
- package/icon/show.js +1 -1
- package/icon/trash-can-filled.d.ts +9 -0
- package/{button-docked/button-docked.js → icon/trash-can-filled.js} +35 -16
- package/list/list-item.js +0 -2
- package/locale/en_US.js +14 -12
- package/locale/es_AR.js +9 -1
- package/locale/index.d.ts +3 -0
- package/locale/index.js +1 -0
- package/locale/tr_TR.js +9 -1
- package/locale/types.d.ts +2 -0
- package/message-card/message-card.js +2 -2
- package/message-card/utils.js +8 -3
- package/mobile-header/mobile-header.js +0 -1
- package/modal/modal-button.d.ts +1 -3
- package/package.json +5 -2
- package/page-control/page-control.js +1 -3
- package/payment-card/custom-cards.config.d.ts +1 -11
- package/payment-card/payment-card.js +1 -3
- package/phone-input/base-country-picker.js +2 -2
- package/phone-input/country-picker.js +0 -10
- package/progress-bar/progressbar-rounded.js +1 -1
- package/progress-bar/styled-components.js +8 -6
- package/rating/styled-components.js +3 -2
- package/rating/svg-icons.d.ts +5 -5
- package/rating/svg-icons.js +20 -20
- package/segmented-control/segmented-control.js +1 -2
- package/segmented-control/stateful-segmented-control.js +1 -2
- package/select/multi-value.js +1 -1
- package/sheet/sheet.js +1 -3
- package/snackbar/index.d.ts +1 -0
- package/snackbar/snackbar-context.d.ts +1 -2
- package/snackbar/snackbar-context.js +27 -21
- package/spinner/index.d.ts +4 -2
- package/stepper/stepper.js +29 -30
- package/styles/__mocks__/styled.js +0 -2
- package/styles/as-primary-export-hoc.js +0 -2
- package/styles/styled.js +0 -2
- package/styles/types.d.ts +7 -3
- package/system-banner/system-banner.js +1 -3
- package/tabs-motion/tabs.js +2 -2
- package/tag/constants.d.ts +5 -4
- package/tag/constants.js +7 -6
- package/tag/index.d.ts +1 -1
- package/tag/index.js +7 -7
- package/tag/styled-components.d.ts +1 -1
- package/tag/styled-components.js +137 -124
- package/tag/tag.js +2 -2
- package/tag/types.d.ts +9 -8
- package/tag/types.js +2 -2
- package/themes/dark-theme/color-component-tokens.d.ts +2 -2
- package/themes/dark-theme/color-component-tokens.js +279 -275
- package/themes/dark-theme/color-foundation-tokens.d.ts +3 -0
- package/themes/dark-theme/{color-tokens.js → color-foundation-tokens.js} +11 -14
- package/themes/dark-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/dark-theme/color-semantic-tokens.js +52 -58
- package/themes/dark-theme/create-dark-theme.d.ts +1 -1
- package/themes/dark-theme/create-dark-theme.js +12 -32
- package/themes/dark-theme/dark-theme.js +4 -4
- package/themes/dark-theme/primitives.js +2 -2
- package/themes/light-theme/color-component-tokens.d.ts +2 -2
- package/themes/light-theme/color-component-tokens.js +287 -282
- package/themes/light-theme/color-foundation-tokens.d.ts +3 -0
- package/themes/light-theme/{color-tokens.js → color-foundation-tokens.js} +10 -13
- package/themes/light-theme/color-semantic-tokens.d.ts +2 -2
- package/themes/light-theme/color-semantic-tokens.js +50 -53
- package/themes/light-theme/create-light-theme.d.ts +1 -1
- package/themes/light-theme/create-light-theme.js +12 -32
- package/themes/light-theme/light-theme.js +4 -4
- package/themes/light-theme/primitives.js +2 -2
- package/themes/types.d.ts +74 -13
- package/themes/utils.d.ts +1 -1
- package/themes/utils.js +4 -4
- package/tile/tile-group.js +2 -2
- package/timezonepicker/update-tzdata.js +0 -1
- package/tokens/color-primitive-tokens.d.ts +5 -0
- package/tokens/color-primitive-tokens.js +301 -0
- package/tokens/index.d.ts +5 -4
- package/tokens/index.js +25 -3
- package/tokens/types.d.ts +170 -1
- package/button-docked/button-docked.d.ts +0 -4
- package/button-docked/index.d.ts +0 -3
- package/button-docked/index.js +0 -40
- package/button-docked/styled-components.d.ts +0 -5
- package/button-docked/styled-components.js +0 -55
- package/button-docked/types.d.ts +0 -14
- package/themes/dark-theme/color-tokens.d.ts +0 -3
- package/themes/light-theme/color-tokens.d.ts +0 -3
- package/tokens/colors.d.ts +0 -3
- package/tokens/colors.js +0 -125
- /package/{button-docked → file-uploader-basic}/types.js +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.foundationColors = exports.default = void 0;
|
|
7
7
|
var _tokens = require("../../tokens");
|
|
8
8
|
/*
|
|
9
9
|
Copyright (c) Uber Technologies, Inc.
|
|
@@ -13,11 +13,11 @@ LICENSE file in the root directory of this source tree.
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
// color constants
|
|
16
|
-
const
|
|
16
|
+
const foundationColors = exports.foundationColors = {
|
|
17
17
|
// Primary Palette
|
|
18
|
-
primaryA: _tokens.
|
|
19
|
-
primaryB: _tokens.
|
|
20
|
-
primary:
|
|
18
|
+
primaryA: _tokens.primitiveDarkColors.gray900Dark,
|
|
19
|
+
primaryB: _tokens.primitiveDarkColors.gray50Dark,
|
|
20
|
+
primary: '#FFFFFF',
|
|
21
21
|
primary50: '#F6F6F6',
|
|
22
22
|
primary100: '#EEEEEE',
|
|
23
23
|
primary200: '#E2E2E2',
|
|
@@ -27,7 +27,7 @@ const darkColorTokens = exports.darkColorTokens = {
|
|
|
27
27
|
primary600: '#545454',
|
|
28
28
|
primary700: '#333333',
|
|
29
29
|
// Accent Palette
|
|
30
|
-
accent: _tokens.
|
|
30
|
+
accent: _tokens.primitiveDarkColors.blue400Dark,
|
|
31
31
|
accent50: '#EFF3FE',
|
|
32
32
|
accent100: '#D4E2FC',
|
|
33
33
|
accent200: '#A0BFF8',
|
|
@@ -37,7 +37,7 @@ const darkColorTokens = exports.darkColorTokens = {
|
|
|
37
37
|
accent600: '#174291',
|
|
38
38
|
accent700: '#102C60',
|
|
39
39
|
// Negative Palette
|
|
40
|
-
negative: _tokens.
|
|
40
|
+
negative: _tokens.primitiveDarkColors.red400Dark,
|
|
41
41
|
negative50: '#FFEFED',
|
|
42
42
|
negative100: '#FED7D2',
|
|
43
43
|
negative200: '#F1998E',
|
|
@@ -47,7 +47,7 @@ const darkColorTokens = exports.darkColorTokens = {
|
|
|
47
47
|
negative600: '#870F00',
|
|
48
48
|
negative700: '#5A0A00',
|
|
49
49
|
// Warning Palette
|
|
50
|
-
warning: _tokens.
|
|
50
|
+
warning: _tokens.primitiveDarkColors.yellow400Dark,
|
|
51
51
|
warning50: '#FFFAF0',
|
|
52
52
|
warning100: '#FFF2D9',
|
|
53
53
|
warning200: '#FFE3AC',
|
|
@@ -57,7 +57,7 @@ const darkColorTokens = exports.darkColorTokens = {
|
|
|
57
57
|
warning600: '#996F00',
|
|
58
58
|
warning700: '#674D1B',
|
|
59
59
|
// Positive Palette
|
|
60
|
-
positive: _tokens.
|
|
60
|
+
positive: _tokens.primitiveDarkColors.green400Dark,
|
|
61
61
|
positive50: '#E6F2ED',
|
|
62
62
|
positive100: '#ADDEC9',
|
|
63
63
|
positive200: '#66D19E',
|
|
@@ -79,9 +79,6 @@ const darkColorTokens = exports.darkColorTokens = {
|
|
|
79
79
|
mono700: '#1F1F1F',
|
|
80
80
|
mono800: '#141414',
|
|
81
81
|
mono900: '#111111',
|
|
82
|
-
mono1000: '#000000'
|
|
83
|
-
// Rating Palette,
|
|
84
|
-
ratingInactiveFill: _tokens.colors.gray500,
|
|
85
|
-
ratingStroke: _tokens.colors.gray700
|
|
82
|
+
mono1000: '#000000'
|
|
86
83
|
};
|
|
87
|
-
var _default = exports.default =
|
|
84
|
+
var _default = exports.default = foundationColors;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (foundation?:
|
|
1
|
+
import type { FoundationColors, SemanticColors } from '../types';
|
|
2
|
+
declare const _default: (foundation?: FoundationColors) => SemanticColors;
|
|
3
3
|
export default _default;
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _colorFoundationTokens = _interopRequireDefault(require("./color-foundation-tokens"));
|
|
8
8
|
var _util = require("../../styles/util");
|
|
9
|
-
var
|
|
9
|
+
var _colorPrimitiveTokens = require("../../tokens/color-primitive-tokens");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
/*
|
|
12
12
|
Copyright (c) Uber Technologies, Inc.
|
|
@@ -14,80 +14,74 @@ Copyright (c) Uber Technologies, Inc.
|
|
|
14
14
|
This source code is licensed under the MIT license found in the
|
|
15
15
|
LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var _default = (
|
|
18
|
-
// themePrimitives or foundation colors
|
|
19
|
-
foundation = _colorTokens.default) => {
|
|
17
|
+
var _default = (foundation = _colorFoundationTokens.default) => {
|
|
20
18
|
const core = {
|
|
21
19
|
// Background
|
|
22
20
|
backgroundPrimary: foundation.primaryB,
|
|
23
|
-
backgroundSecondary:
|
|
24
|
-
backgroundTertiary:
|
|
25
|
-
backgroundInversePrimary:
|
|
26
|
-
backgroundInverseSecondary:
|
|
21
|
+
backgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
|
|
22
|
+
backgroundTertiary: _colorPrimitiveTokens.primitiveDarkColors.gray200Dark,
|
|
23
|
+
backgroundInversePrimary: _colorPrimitiveTokens.primitiveDarkColors.gray800Dark,
|
|
24
|
+
backgroundInverseSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray700Dark,
|
|
27
25
|
// Content
|
|
28
|
-
contentPrimary:
|
|
29
|
-
contentSecondary:
|
|
30
|
-
contentTertiary:
|
|
31
|
-
contentInversePrimary:
|
|
32
|
-
contentInverseSecondary:
|
|
33
|
-
contentInverseTertiary:
|
|
26
|
+
contentPrimary: foundation.primaryA,
|
|
27
|
+
contentSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray800Dark,
|
|
28
|
+
contentTertiary: _colorPrimitiveTokens.primitiveDarkColors.gray700Dark,
|
|
29
|
+
contentInversePrimary: _colorPrimitiveTokens.primitiveDarkColors.black,
|
|
30
|
+
contentInverseSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray200Dark,
|
|
31
|
+
contentInverseTertiary: _colorPrimitiveTokens.primitiveDarkColors.gray300Dark,
|
|
34
32
|
// Border
|
|
35
|
-
borderOpaque:
|
|
36
|
-
|
|
37
|
-
borderTransparent: (0, _util.hexToRgb)(foundation.primaryA, '0.08'),
|
|
33
|
+
borderOpaque: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
|
|
34
|
+
borderTransparent: (0, _util.hexToRgb)(foundation.primaryA, '0.08') || '',
|
|
38
35
|
borderSelected: foundation.primaryA,
|
|
39
|
-
borderInverseOpaque:
|
|
40
|
-
|
|
41
|
-
borderInverseTransparent: (0, _util.hexToRgb)(foundation.primaryB, '0.2'),
|
|
36
|
+
borderInverseOpaque: _colorPrimitiveTokens.primitiveDarkColors.gray300Dark,
|
|
37
|
+
borderInverseTransparent: (0, _util.hexToRgb)(foundation.primaryB, '0.2') || '',
|
|
42
38
|
borderInverseSelected: foundation.primaryB
|
|
43
39
|
};
|
|
44
40
|
const coreExtensions = {
|
|
45
41
|
// Backgrounds
|
|
46
|
-
backgroundStateDisabled:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
backgroundOverlayArt: (0, _util.hexToRgb)(_colors.default.black, '0.16'),
|
|
42
|
+
backgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
|
|
43
|
+
backgroundOverlay: (0, _util.hexToRgb)(_colorPrimitiveTokens.primitiveDarkColors.black, '0.7') || '',
|
|
44
|
+
backgroundOverlayArt: (0, _util.hexToRgb)(_colorPrimitiveTokens.primitiveDarkColors.black, '0.16') || '',
|
|
51
45
|
backgroundAccent: foundation.accent,
|
|
52
46
|
backgroundNegative: foundation.negative,
|
|
53
47
|
backgroundWarning: foundation.warning,
|
|
54
|
-
backgroundPositive:
|
|
55
|
-
backgroundAccentLight:
|
|
56
|
-
backgroundPositiveLight:
|
|
57
|
-
backgroundNegativeLight:
|
|
58
|
-
backgroundWarningLight:
|
|
59
|
-
backgroundAlwaysDark:
|
|
60
|
-
backgroundAlwaysLight:
|
|
48
|
+
backgroundPositive: foundation.positive,
|
|
49
|
+
backgroundAccentLight: _colorPrimitiveTokens.primitiveDarkColors.blue100Dark,
|
|
50
|
+
backgroundPositiveLight: _colorPrimitiveTokens.primitiveDarkColors.green100Dark,
|
|
51
|
+
backgroundNegativeLight: _colorPrimitiveTokens.primitiveDarkColors.red100Dark,
|
|
52
|
+
backgroundWarningLight: _colorPrimitiveTokens.primitiveDarkColors.yellow100Dark,
|
|
53
|
+
backgroundAlwaysDark: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
|
|
54
|
+
backgroundAlwaysLight: _colorPrimitiveTokens.primitiveDarkColors.gray900Dark,
|
|
61
55
|
// Content
|
|
62
|
-
contentStateDisabled:
|
|
63
|
-
contentAccent:
|
|
64
|
-
contentOnColor:
|
|
65
|
-
contentOnColorInverse:
|
|
66
|
-
contentNegative:
|
|
67
|
-
contentWarning:
|
|
68
|
-
contentPositive:
|
|
56
|
+
contentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray400Dark,
|
|
57
|
+
contentAccent: _colorPrimitiveTokens.primitiveDarkColors.blue600Dark,
|
|
58
|
+
contentOnColor: _colorPrimitiveTokens.primitiveDarkColors.gray900Dark,
|
|
59
|
+
contentOnColorInverse: _colorPrimitiveTokens.primitiveDarkColors.black,
|
|
60
|
+
contentNegative: _colorPrimitiveTokens.primitiveDarkColors.red600Dark,
|
|
61
|
+
contentWarning: _colorPrimitiveTokens.primitiveDarkColors.yellow600Dark,
|
|
62
|
+
contentPositive: _colorPrimitiveTokens.primitiveDarkColors.green600Dark,
|
|
69
63
|
// Border
|
|
70
|
-
borderStateDisabled:
|
|
71
|
-
borderAccent:
|
|
72
|
-
borderAccentLight:
|
|
73
|
-
borderNegative:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
borderPositiveLight:
|
|
64
|
+
borderStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
|
|
65
|
+
borderAccent: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
|
|
66
|
+
borderAccentLight: _colorPrimitiveTokens.primitiveDarkColors.blue400Dark,
|
|
67
|
+
borderNegative: _colorPrimitiveTokens.primitiveDarkColors.red500Dark,
|
|
68
|
+
borderNegativeLight: _colorPrimitiveTokens.primitiveDarkColors.red400Dark,
|
|
69
|
+
borderWarning: _colorPrimitiveTokens.primitiveDarkColors.yellow500Dark,
|
|
70
|
+
borderWarningLight: _colorPrimitiveTokens.primitiveDarkColors.yellow400Dark,
|
|
71
|
+
borderPositive: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
|
|
72
|
+
borderPositiveLight: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
|
|
79
73
|
// Programs
|
|
80
|
-
safety:
|
|
81
|
-
eatsGreen400:
|
|
82
|
-
freightBlue400:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
membership: _colors.default.yellow600
|
|
74
|
+
safety: _colorPrimitiveTokens.primitiveLightColors.blue600,
|
|
75
|
+
eatsGreen400: _colorPrimitiveTokens.primitiveLightColors.green600,
|
|
76
|
+
freightBlue400: _colorPrimitiveTokens.primitiveLightColors.cobalt400,
|
|
77
|
+
rewardsTier1: _colorPrimitiveTokens.primitiveLightColors.blue600,
|
|
78
|
+
rewardsTier2: _colorPrimitiveTokens.primitiveLightColors.yellow300,
|
|
79
|
+
rewardsTier3: _colorPrimitiveTokens.primitiveLightColors.platinum400,
|
|
80
|
+
rewardsTier4: _colorPrimitiveTokens.primitiveLightColors.black,
|
|
81
|
+
membership: _colorPrimitiveTokens.primitiveLightColors.yellow600
|
|
89
82
|
};
|
|
90
83
|
const deprecated = {
|
|
84
|
+
jumpRed400: _colorPrimitiveTokens.primitiveLightColors.red600,
|
|
91
85
|
backgroundOverlayLight: coreExtensions.backgroundOverlay,
|
|
92
86
|
backgroundOverlayDark: coreExtensions.backgroundOverlay,
|
|
93
87
|
backgroundLightAccent: coreExtensions.backgroundAccentLight,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DeepPartial, MakeExtendable, Theme } from '../../styles/types';
|
|
2
2
|
export default function createDarkTheme<OverridesT extends DeepPartial<MakeExtendable<Theme>> = {}>(overrides?: OverridesT): Theme & OverridesT;
|
|
@@ -4,20 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = createDarkTheme;
|
|
7
|
-
var _animation = _interopRequireDefault(require("../shared/animation"));
|
|
8
|
-
var _borders = _interopRequireDefault(require("./borders"));
|
|
9
|
-
var _breakpoints = _interopRequireDefault(require("../shared/breakpoints"));
|
|
10
7
|
var _deepMerge = _interopRequireDefault(require("../../utils/deep-merge"));
|
|
11
8
|
var _utils = require("../utils");
|
|
12
|
-
var _colorTokens = _interopRequireDefault(require("./color-tokens"));
|
|
13
9
|
var _tokens = require("../../tokens");
|
|
14
10
|
var _colorComponentTokens = _interopRequireDefault(require("./color-component-tokens"));
|
|
15
11
|
var _colorSemanticTokens = _interopRequireDefault(require("./color-semantic-tokens"));
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var _lighting = _interopRequireDefault(require("../shared/lighting"));
|
|
19
|
-
var _mediaQuery = _interopRequireDefault(require("../shared/media-query"));
|
|
20
|
-
var _sizing = _interopRequireDefault(require("../shared/sizing"));
|
|
12
|
+
var _colorFoundationTokens = _interopRequireDefault(require("./color-foundation-tokens"));
|
|
13
|
+
var _darkTheme = require("./dark-theme");
|
|
21
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
15
|
/*
|
|
23
16
|
Copyright (c) Uber Technologies, Inc.
|
|
@@ -27,32 +20,19 @@ LICENSE file in the root directory of this source tree.
|
|
|
27
20
|
*/
|
|
28
21
|
|
|
29
22
|
function createDarkTheme(overrides) {
|
|
30
|
-
const
|
|
31
|
-
...
|
|
32
|
-
...(0, _utils.
|
|
23
|
+
const foundationColors = {
|
|
24
|
+
..._colorFoundationTokens.default,
|
|
25
|
+
...(0, _utils.getFoundationColorOverrides)(overrides?.colors)
|
|
33
26
|
};
|
|
34
|
-
const
|
|
35
|
-
const
|
|
27
|
+
const semanticColors = (0, _colorSemanticTokens.default)(foundationColors);
|
|
28
|
+
const componentColors = (0, _colorComponentTokens.default)(semanticColors);
|
|
36
29
|
const theme = {
|
|
37
|
-
|
|
38
|
-
borders: _borders.default,
|
|
39
|
-
breakpoints: _breakpoints.default,
|
|
30
|
+
...structuredClone(_darkTheme.DarkTheme),
|
|
40
31
|
colors: {
|
|
41
|
-
..._tokens.
|
|
42
|
-
...
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
},
|
|
46
|
-
direction: 'auto',
|
|
47
|
-
grid: _grid.default,
|
|
48
|
-
lighting: _lighting.default,
|
|
49
|
-
mediaQuery: _mediaQuery.default,
|
|
50
|
-
sizing: _sizing.default,
|
|
51
|
-
typography: _typography.default,
|
|
52
|
-
// TODO(#2318) Remove in v11, the next major version.
|
|
53
|
-
// Do not use.
|
|
54
|
-
zIndex: {
|
|
55
|
-
modal: 2000
|
|
32
|
+
..._tokens.primitiveColors,
|
|
33
|
+
...foundationColors,
|
|
34
|
+
...semanticColors,
|
|
35
|
+
...componentColors
|
|
56
36
|
}
|
|
57
37
|
};
|
|
58
38
|
return (0, _deepMerge.default)(theme, overrides);
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DarkTheme = void 0;
|
|
7
|
-
var
|
|
8
|
-
var
|
|
7
|
+
var _colorFoundationTokens = _interopRequireDefault(require("./color-foundation-tokens"));
|
|
8
|
+
var _colorPrimitiveTokens = _interopRequireDefault(require("../../tokens/color-primitive-tokens"));
|
|
9
9
|
var _colorSemanticTokens = _interopRequireDefault(require("./color-semantic-tokens"));
|
|
10
10
|
var _colorComponentTokens = _interopRequireDefault(require("./color-component-tokens"));
|
|
11
11
|
var _borders = _interopRequireDefault(require("./borders"));
|
|
@@ -27,8 +27,8 @@ LICENSE file in the root directory of this source tree.
|
|
|
27
27
|
const DarkTheme = exports.DarkTheme = {
|
|
28
28
|
name: 'dark-theme',
|
|
29
29
|
colors: {
|
|
30
|
-
...
|
|
31
|
-
...
|
|
30
|
+
..._colorFoundationTokens.default,
|
|
31
|
+
..._colorPrimitiveTokens.default,
|
|
32
32
|
...(0, _colorComponentTokens.default)(),
|
|
33
33
|
...(0, _colorSemanticTokens.default)()
|
|
34
34
|
},
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _colorFoundationTokens = _interopRequireDefault(require("./color-foundation-tokens"));
|
|
8
8
|
var _typography = require("../shared/typography");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
/*
|
|
@@ -17,7 +17,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
17
17
|
// We don't use this ourselves. We provide it for backward compatibility.
|
|
18
18
|
// People may have used it to create their own custom theme.
|
|
19
19
|
const primitives = {
|
|
20
|
-
...
|
|
20
|
+
..._colorFoundationTokens.default,
|
|
21
21
|
..._typography.fontTokens
|
|
22
22
|
};
|
|
23
23
|
var _default = exports.default = primitives;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const _default: (
|
|
1
|
+
import type { SemanticColors, ComponentColors } from '../types';
|
|
2
|
+
declare const _default: (semanticColors?: SemanticColors) => ComponentColors;
|
|
3
3
|
export default _default;
|