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
|
@@ -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 = {
|
|
17
17
|
// Primary Palette
|
|
18
|
-
primaryA: _tokens.
|
|
19
|
-
primaryB: _tokens.
|
|
20
|
-
primary:
|
|
18
|
+
primaryA: _tokens.primitiveLightColors.black,
|
|
19
|
+
primaryB: _tokens.primitiveLightColors.white,
|
|
20
|
+
primary: '#000000',
|
|
21
21
|
primary50: '#F6F6F6',
|
|
22
22
|
primary100: '#EEEEEE',
|
|
23
23
|
primary200: '#E2E2E2',
|
|
@@ -27,7 +27,7 @@ const lightColorTokens = {
|
|
|
27
27
|
primary600: '#545454',
|
|
28
28
|
primary700: '#333333',
|
|
29
29
|
// Accent Palette
|
|
30
|
-
accent: _tokens.
|
|
30
|
+
accent: _tokens.primitiveLightColors.blue600,
|
|
31
31
|
accent50: '#EFF3FE',
|
|
32
32
|
accent100: '#D4E2FC',
|
|
33
33
|
accent200: '#A0BFF8',
|
|
@@ -37,7 +37,7 @@ const lightColorTokens = {
|
|
|
37
37
|
accent600: '#174291',
|
|
38
38
|
accent700: '#102C60',
|
|
39
39
|
// Negative Palette
|
|
40
|
-
negative: _tokens.
|
|
40
|
+
negative: _tokens.primitiveLightColors.red600,
|
|
41
41
|
negative50: '#FFEFED',
|
|
42
42
|
negative100: '#FED7D2',
|
|
43
43
|
negative200: '#F1998E',
|
|
@@ -47,7 +47,7 @@ const lightColorTokens = {
|
|
|
47
47
|
negative600: '#870F00',
|
|
48
48
|
negative700: '#5A0A00',
|
|
49
49
|
// Warning Palette
|
|
50
|
-
warning: _tokens.
|
|
50
|
+
warning: _tokens.primitiveLightColors.yellow300,
|
|
51
51
|
warning50: '#FFFAF0',
|
|
52
52
|
warning100: '#FFF2D9',
|
|
53
53
|
warning200: '#FFE3AC',
|
|
@@ -57,7 +57,7 @@ const lightColorTokens = {
|
|
|
57
57
|
warning600: '#996F00',
|
|
58
58
|
warning700: '#674D1B',
|
|
59
59
|
// Positive Palette
|
|
60
|
-
positive: _tokens.
|
|
60
|
+
positive: _tokens.primitiveLightColors.green600,
|
|
61
61
|
positive50: '#E6F2ED',
|
|
62
62
|
positive100: '#ADDEC9',
|
|
63
63
|
positive200: '#66D19E',
|
|
@@ -78,9 +78,6 @@ const lightColorTokens = {
|
|
|
78
78
|
mono700: '#6B6B6B',
|
|
79
79
|
mono800: '#545454',
|
|
80
80
|
mono900: '#333333',
|
|
81
|
-
mono1000: '#000000'
|
|
82
|
-
// Rating Palette,
|
|
83
|
-
ratingInactiveFill: _tokens.colors.gray100,
|
|
84
|
-
ratingStroke: _tokens.colors.gray300
|
|
81
|
+
mono1000: '#000000'
|
|
85
82
|
};
|
|
86
|
-
var _default = exports.default =
|
|
83
|
+
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 = _interopRequireDefault(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.
|
|
@@ -16,78 +16,75 @@ LICENSE file in the root directory of this source tree.
|
|
|
16
16
|
*/
|
|
17
17
|
var _default = (
|
|
18
18
|
// themePrimitives or foundation colors
|
|
19
|
-
foundation =
|
|
19
|
+
foundation = _colorFoundationTokens.default) => {
|
|
20
20
|
const core = {
|
|
21
21
|
// Background
|
|
22
22
|
backgroundPrimary: foundation.primaryB,
|
|
23
|
-
backgroundSecondary:
|
|
24
|
-
backgroundTertiary:
|
|
23
|
+
backgroundSecondary: _colorPrimitiveTokens.default.gray50,
|
|
24
|
+
backgroundTertiary: _colorPrimitiveTokens.default.gray100,
|
|
25
25
|
backgroundInversePrimary: foundation.primaryA,
|
|
26
|
-
backgroundInverseSecondary:
|
|
26
|
+
backgroundInverseSecondary: _colorPrimitiveTokens.default.gray900,
|
|
27
27
|
// Content
|
|
28
28
|
contentPrimary: foundation.primaryA,
|
|
29
|
-
contentSecondary:
|
|
30
|
-
contentTertiary:
|
|
29
|
+
contentSecondary: _colorPrimitiveTokens.default.gray800,
|
|
30
|
+
contentTertiary: _colorPrimitiveTokens.default.gray700,
|
|
31
31
|
contentInversePrimary: foundation.primaryB,
|
|
32
|
-
contentInverseSecondary:
|
|
33
|
-
contentInverseTertiary:
|
|
32
|
+
contentInverseSecondary: _colorPrimitiveTokens.default.gray200,
|
|
33
|
+
contentInverseTertiary: _colorPrimitiveTokens.default.gray400,
|
|
34
34
|
// Border
|
|
35
|
-
borderOpaque:
|
|
36
|
-
|
|
37
|
-
borderTransparent: (0, _util.hexToRgb)(foundation.primaryA, '0.08'),
|
|
35
|
+
borderOpaque: _colorPrimitiveTokens.default.gray50,
|
|
36
|
+
borderTransparent: (0, _util.hexToRgb)(foundation.primaryA, '0.08') || (0, _util.hexToRgb)(_colorFoundationTokens.default.primaryA, '0.08') || '',
|
|
38
37
|
borderSelected: foundation.primaryA,
|
|
39
|
-
borderInverseOpaque:
|
|
40
|
-
|
|
41
|
-
borderInverseTransparent: (0, _util.hexToRgb)(foundation.primaryB, '0.2'),
|
|
38
|
+
borderInverseOpaque: _colorPrimitiveTokens.default.gray800,
|
|
39
|
+
borderInverseTransparent: (0, _util.hexToRgb)(foundation.primaryB, '0.2') || (0, _util.hexToRgb)(_colorFoundationTokens.default.primaryB, '0.2') || '',
|
|
42
40
|
borderInverseSelected: foundation.primaryB
|
|
43
41
|
};
|
|
44
42
|
const coreExtensions = {
|
|
45
43
|
// Backgrounds
|
|
46
|
-
backgroundStateDisabled:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// @ts-ignore
|
|
50
|
-
backgroundOverlayArt: (0, _util.hexToRgb)(_colors.default.black, '0.00'),
|
|
44
|
+
backgroundStateDisabled: _colorPrimitiveTokens.default.gray50,
|
|
45
|
+
backgroundOverlay: (0, _util.hexToRgb)(_colorPrimitiveTokens.default.black, '0.5') || '',
|
|
46
|
+
backgroundOverlayArt: (0, _util.hexToRgb)(_colorPrimitiveTokens.default.black, '0.00') || '',
|
|
51
47
|
backgroundAccent: foundation.accent,
|
|
52
48
|
backgroundNegative: foundation.negative,
|
|
53
49
|
backgroundWarning: foundation.warning,
|
|
54
|
-
backgroundPositive:
|
|
55
|
-
backgroundAccentLight:
|
|
56
|
-
backgroundNegativeLight:
|
|
57
|
-
backgroundWarningLight:
|
|
58
|
-
backgroundPositiveLight:
|
|
59
|
-
backgroundAlwaysDark:
|
|
60
|
-
backgroundAlwaysLight:
|
|
50
|
+
backgroundPositive: foundation.positive,
|
|
51
|
+
backgroundAccentLight: _colorPrimitiveTokens.default.blue50,
|
|
52
|
+
backgroundNegativeLight: _colorPrimitiveTokens.default.red50,
|
|
53
|
+
backgroundWarningLight: _colorPrimitiveTokens.default.yellow50,
|
|
54
|
+
backgroundPositiveLight: _colorPrimitiveTokens.default.green50,
|
|
55
|
+
backgroundAlwaysDark: _colorPrimitiveTokens.default.black,
|
|
56
|
+
backgroundAlwaysLight: _colorPrimitiveTokens.default.white,
|
|
61
57
|
// Content
|
|
62
|
-
contentStateDisabled:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
contentNegative:
|
|
67
|
-
contentWarning:
|
|
68
|
-
contentPositive:
|
|
58
|
+
contentStateDisabled: _colorPrimitiveTokens.default.gray400,
|
|
59
|
+
contentOnColor: _colorPrimitiveTokens.default.white,
|
|
60
|
+
contentOnColorInverse: _colorPrimitiveTokens.default.black,
|
|
61
|
+
contentAccent: _colorPrimitiveTokens.default.blue600,
|
|
62
|
+
contentNegative: _colorPrimitiveTokens.default.red600,
|
|
63
|
+
contentWarning: _colorPrimitiveTokens.default.yellow600,
|
|
64
|
+
contentPositive: _colorPrimitiveTokens.default.green600,
|
|
69
65
|
// Border
|
|
70
|
-
borderStateDisabled:
|
|
71
|
-
borderAccent:
|
|
72
|
-
borderAccentLight:
|
|
73
|
-
borderNegative:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
borderPositiveLight:
|
|
66
|
+
borderStateDisabled: _colorPrimitiveTokens.default.gray50,
|
|
67
|
+
borderAccent: _colorPrimitiveTokens.default.blue600,
|
|
68
|
+
borderAccentLight: _colorPrimitiveTokens.default.blue300,
|
|
69
|
+
borderNegative: _colorPrimitiveTokens.default.red600,
|
|
70
|
+
borderNegativeLight: _colorPrimitiveTokens.default.red300,
|
|
71
|
+
borderWarning: _colorPrimitiveTokens.default.yellow600,
|
|
72
|
+
borderWarningLight: _colorPrimitiveTokens.default.yellow200,
|
|
73
|
+
borderPositive: _colorPrimitiveTokens.default.green600,
|
|
74
|
+
borderPositiveLight: _colorPrimitiveTokens.default.green300,
|
|
79
75
|
// Programs
|
|
80
|
-
safety:
|
|
81
|
-
eatsGreen400:
|
|
82
|
-
freightBlue400:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
membership: _colors.default.yellow600
|
|
76
|
+
safety: _colorPrimitiveTokens.default.blue600,
|
|
77
|
+
eatsGreen400: _colorPrimitiveTokens.default.green600,
|
|
78
|
+
freightBlue400: _colorPrimitiveTokens.default.cobalt400,
|
|
79
|
+
rewardsTier1: _colorPrimitiveTokens.default.blue600,
|
|
80
|
+
rewardsTier2: _colorPrimitiveTokens.default.yellow300,
|
|
81
|
+
rewardsTier3: _colorPrimitiveTokens.default.platinum400,
|
|
82
|
+
rewardsTier4: _colorPrimitiveTokens.default.black,
|
|
83
|
+
membership: _colorPrimitiveTokens.default.yellow600
|
|
89
84
|
};
|
|
85
|
+
/** @deprecated these tokens are deprecated */
|
|
90
86
|
const deprecated = {
|
|
87
|
+
jumpRed400: _colorPrimitiveTokens.default.red400,
|
|
91
88
|
backgroundOverlayLight: coreExtensions.backgroundOverlay,
|
|
92
89
|
backgroundOverlayDark: coreExtensions.backgroundOverlay,
|
|
93
90
|
backgroundLightAccent: coreExtensions.backgroundAccentLight,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DeepPartial, MakeExtendable, Theme } from '../../styles/types';
|
|
2
2
|
export default function createLightTheme<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 = createLightTheme;
|
|
7
|
-
var _animation = _interopRequireDefault(require("../shared/animation"));
|
|
8
|
-
var _borders = _interopRequireDefault(require("../shared/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 _lightTheme = require("./light-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 createLightTheme(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(_lightTheme.LightTheme),
|
|
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.LightTheme = 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("../shared/borders"));
|
|
@@ -27,8 +27,8 @@ LICENSE file in the root directory of this source tree.
|
|
|
27
27
|
const LightTheme = exports.LightTheme = {
|
|
28
28
|
name: 'light-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;
|
package/themes/types.d.ts
CHANGED
|
@@ -2,70 +2,120 @@ import type { Properties } from 'csstype';
|
|
|
2
2
|
import type { Responsive, CSSLengthUnit } from '../layout-grid';
|
|
3
3
|
export type Globals = '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'unset';
|
|
4
4
|
export type LineStyle = 'dashed' | 'dotted' | 'double' | 'groove' | 'hidden' | 'inset' | 'none' | 'outset' | 'ridge' | 'solid';
|
|
5
|
-
export type
|
|
5
|
+
export type FoundationColors = {
|
|
6
6
|
primaryA: string;
|
|
7
7
|
primaryB: string;
|
|
8
|
+
/** @deprecated Use semantic tokens instead. */
|
|
8
9
|
primary: string;
|
|
10
|
+
/** @deprecated Use semantic tokens instead. */
|
|
9
11
|
primary50: string;
|
|
12
|
+
/** @deprecated Use semantic tokens instead. */
|
|
10
13
|
primary100: string;
|
|
14
|
+
/** @deprecated Use semantic tokens instead. */
|
|
11
15
|
primary200: string;
|
|
16
|
+
/** @deprecated Use semantic tokens instead. */
|
|
12
17
|
primary300: string;
|
|
18
|
+
/** @deprecated Use semantic tokens instead. */
|
|
13
19
|
primary400: string;
|
|
20
|
+
/** @deprecated Use semantic tokens instead. */
|
|
14
21
|
primary500: string;
|
|
22
|
+
/** @deprecated Use semantic tokens instead. */
|
|
15
23
|
primary600: string;
|
|
24
|
+
/** @deprecated Use semantic tokens instead. */
|
|
16
25
|
primary700: string;
|
|
17
26
|
accent: string;
|
|
27
|
+
/** @deprecated Use semantic tokens instead. */
|
|
18
28
|
accent50: string;
|
|
29
|
+
/** @deprecated Use semantic tokens instead. */
|
|
19
30
|
accent100: string;
|
|
31
|
+
/** @deprecated Use semantic tokens instead. */
|
|
20
32
|
accent200: string;
|
|
33
|
+
/** @deprecated Use semantic tokens instead. */
|
|
21
34
|
accent300: string;
|
|
35
|
+
/** @deprecated Use semantic tokens instead. */
|
|
22
36
|
accent400: string;
|
|
37
|
+
/** @deprecated Use semantic tokens instead. */
|
|
23
38
|
accent500: string;
|
|
39
|
+
/** @deprecated Use semantic tokens instead. */
|
|
24
40
|
accent600: string;
|
|
41
|
+
/** @deprecated Use semantic tokens instead. */
|
|
25
42
|
accent700: string;
|
|
26
43
|
negative: string;
|
|
27
44
|
negative50: string;
|
|
45
|
+
/** @deprecated Use semantic tokens instead. */
|
|
28
46
|
negative100: string;
|
|
47
|
+
/** @deprecated Use semantic tokens instead. */
|
|
29
48
|
negative200: string;
|
|
49
|
+
/** @deprecated Use semantic tokens instead. */
|
|
30
50
|
negative300: string;
|
|
51
|
+
/** @deprecated Use semantic tokens instead. */
|
|
31
52
|
negative400: string;
|
|
53
|
+
/** @deprecated Use semantic tokens instead. */
|
|
32
54
|
negative500: string;
|
|
55
|
+
/** @deprecated Use semantic tokens instead. */
|
|
33
56
|
negative600: string;
|
|
57
|
+
/** @deprecated Use semantic tokens instead. */
|
|
34
58
|
negative700: string;
|
|
35
59
|
warning: string;
|
|
60
|
+
/** @deprecated Use semantic tokens instead. */
|
|
36
61
|
warning50: string;
|
|
62
|
+
/** @deprecated Use semantic tokens instead. */
|
|
37
63
|
warning100: string;
|
|
64
|
+
/** @deprecated Use semantic tokens instead. */
|
|
38
65
|
warning200: string;
|
|
66
|
+
/** @deprecated Use semantic tokens instead. */
|
|
39
67
|
warning300: string;
|
|
68
|
+
/** @deprecated Use semantic tokens instead. */
|
|
40
69
|
warning400: string;
|
|
70
|
+
/** @deprecated Use semantic tokens instead. */
|
|
41
71
|
warning500: string;
|
|
72
|
+
/** @deprecated Use semantic tokens instead. */
|
|
42
73
|
warning600: string;
|
|
74
|
+
/** @deprecated Use semantic tokens instead. */
|
|
43
75
|
warning700: string;
|
|
44
76
|
positive: string;
|
|
77
|
+
/** @deprecated Use semantic tokens instead. */
|
|
45
78
|
positive50: string;
|
|
79
|
+
/** @deprecated Use semantic tokens instead. */
|
|
46
80
|
positive100: string;
|
|
81
|
+
/** @deprecated Use semantic tokens instead. */
|
|
47
82
|
positive200: string;
|
|
83
|
+
/** @deprecated Use semantic tokens instead. */
|
|
48
84
|
positive300: string;
|
|
85
|
+
/** @deprecated Use semantic tokens instead. */
|
|
49
86
|
positive400: string;
|
|
87
|
+
/** @deprecated Use semantic tokens instead. */
|
|
50
88
|
positive500: string;
|
|
89
|
+
/** @deprecated Use semantic tokens instead. */
|
|
51
90
|
positive600: string;
|
|
91
|
+
/** @deprecated Use semantic tokens instead. */
|
|
52
92
|
positive700: string;
|
|
93
|
+
/** @deprecated Use semantic tokens instead. */
|
|
53
94
|
white: string;
|
|
95
|
+
/** @deprecated Use semantic tokens instead. */
|
|
54
96
|
black: string;
|
|
97
|
+
/** @deprecated Use semantic tokens instead. */
|
|
55
98
|
mono100: string;
|
|
99
|
+
/** @deprecated Use semantic tokens instead. */
|
|
56
100
|
mono200: string;
|
|
101
|
+
/** @deprecated Use semantic tokens instead. */
|
|
57
102
|
mono300: string;
|
|
103
|
+
/** @deprecated Use semantic tokens instead. */
|
|
58
104
|
mono400: string;
|
|
105
|
+
/** @deprecated Use semantic tokens instead. */
|
|
59
106
|
mono500: string;
|
|
107
|
+
/** @deprecated Use semantic tokens instead. */
|
|
60
108
|
mono600: string;
|
|
109
|
+
/** @deprecated Use semantic tokens instead. */
|
|
61
110
|
mono700: string;
|
|
111
|
+
/** @deprecated Use semantic tokens instead. */
|
|
62
112
|
mono800: string;
|
|
113
|
+
/** @deprecated Use semantic tokens instead. */
|
|
63
114
|
mono900: string;
|
|
115
|
+
/** @deprecated Use semantic tokens instead. */
|
|
64
116
|
mono1000: string;
|
|
65
|
-
ratingInactiveFill: string;
|
|
66
|
-
ratingStroke: string;
|
|
67
117
|
};
|
|
68
|
-
export type
|
|
118
|
+
export type CoreSemanticColors = {
|
|
69
119
|
backgroundPrimary: string;
|
|
70
120
|
backgroundSecondary: string;
|
|
71
121
|
backgroundTertiary: string;
|
|
@@ -78,16 +128,16 @@ export type CoreSemanticColorTokens = {
|
|
|
78
128
|
contentInverseSecondary: string;
|
|
79
129
|
contentInverseTertiary: string;
|
|
80
130
|
borderOpaque: string;
|
|
81
|
-
borderTransparent
|
|
131
|
+
borderTransparent: string;
|
|
82
132
|
borderSelected: string;
|
|
83
133
|
borderInverseOpaque: string;
|
|
84
|
-
borderInverseTransparent
|
|
134
|
+
borderInverseTransparent: string;
|
|
85
135
|
borderInverseSelected: string;
|
|
86
136
|
};
|
|
87
|
-
export type
|
|
137
|
+
export type CoreExtensionSemanticColors = {
|
|
88
138
|
backgroundStateDisabled: string;
|
|
89
139
|
backgroundOverlay: string;
|
|
90
|
-
backgroundOverlayArt
|
|
140
|
+
backgroundOverlayArt: string;
|
|
91
141
|
backgroundAccent: string;
|
|
92
142
|
backgroundNegative: string;
|
|
93
143
|
backgroundWarning: string;
|
|
@@ -117,23 +167,30 @@ export type CoreExtensionSemanticColorTokens = {
|
|
|
117
167
|
safety: string;
|
|
118
168
|
eatsGreen400: string;
|
|
119
169
|
freightBlue400: string;
|
|
120
|
-
jumpRed400: string;
|
|
121
170
|
rewardsTier1: string;
|
|
122
171
|
rewardsTier2: string;
|
|
123
172
|
rewardsTier3: string;
|
|
124
173
|
rewardsTier4: string;
|
|
125
174
|
membership: string;
|
|
126
175
|
};
|
|
127
|
-
export type
|
|
176
|
+
export type DeprecatedSemanticColors = {
|
|
177
|
+
/** @deprecated this color token is deprecated */
|
|
178
|
+
jumpRed400: string;
|
|
179
|
+
/** @deprecated this color token is deprecated */
|
|
128
180
|
backgroundOverlayLight: string;
|
|
181
|
+
/** @deprecated this color token is deprecated */
|
|
129
182
|
backgroundOverlayDark: string;
|
|
183
|
+
/** @deprecated this color token is deprecated */
|
|
130
184
|
backgroundLightAccent: string;
|
|
185
|
+
/** @deprecated this color token is deprecated */
|
|
131
186
|
backgroundLightPositive: string;
|
|
187
|
+
/** @deprecated this color token is deprecated */
|
|
132
188
|
backgroundLightWarning: string;
|
|
189
|
+
/** @deprecated this color token is deprecated */
|
|
133
190
|
backgroundLightNegative: string;
|
|
134
191
|
};
|
|
135
|
-
export type
|
|
136
|
-
export type
|
|
192
|
+
export type SemanticColors = {} & CoreSemanticColors & CoreExtensionSemanticColors & DeprecatedSemanticColors;
|
|
193
|
+
export type ComponentColors = {
|
|
137
194
|
bannerActionLowInfo: string;
|
|
138
195
|
bannerActionLowNegative: string;
|
|
139
196
|
bannerActionLowPositive: string;
|
|
@@ -142,6 +199,8 @@ export type ComponentColorTokens = {
|
|
|
142
199
|
bannerActionHighNegative: string;
|
|
143
200
|
bannerActionHighPositive: string;
|
|
144
201
|
bannerActionHighWarning: string;
|
|
202
|
+
bottomNavigationText: string;
|
|
203
|
+
bottomNavigationSelectedText: string;
|
|
145
204
|
buttonPrimaryFill: string;
|
|
146
205
|
buttonPrimaryText: string;
|
|
147
206
|
buttonPrimaryHover: string;
|
|
@@ -425,13 +484,15 @@ export type ComponentColorTokens = {
|
|
|
425
484
|
progressbarTrackFill: string;
|
|
426
485
|
tooltipBackground: string;
|
|
427
486
|
tooltipText: string;
|
|
487
|
+
ratingInactiveFill: string;
|
|
488
|
+
ratingStroke: string;
|
|
428
489
|
};
|
|
429
490
|
export type FontTokens = {
|
|
430
491
|
primaryFontFamily: string;
|
|
431
492
|
secondaryFontFamily: string;
|
|
432
493
|
monoFontFamily: string;
|
|
433
494
|
};
|
|
434
|
-
export type Primitives = {} &
|
|
495
|
+
export type Primitives = {} & FoundationColors & FontTokens;
|
|
435
496
|
export type Font = {
|
|
436
497
|
fontFamily: string;
|
|
437
498
|
fontWeight: Globals | 'bold' | 'normal' | 'bolder' | 'lighter' | number;
|
package/themes/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ColorTokens } from '../styles/types';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getFoundationColorOverrides(colors?: Partial<ColorTokens>): {};
|
package/themes/utils.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getFoundationColorOverrides = getFoundationColorOverrides;
|
|
7
7
|
/*
|
|
8
8
|
Copyright (c) Uber Technologies, Inc.
|
|
9
9
|
|
|
@@ -11,10 +11,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
13
|
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
const foundationColors = ['primaryA', 'primaryB', 'primary', 'accent', 'negative', 'warning', 'positive'];
|
|
15
|
+
function getFoundationColorOverrides(colors) {
|
|
16
16
|
if (!colors) return {};
|
|
17
|
-
return
|
|
17
|
+
return foundationColors.reduce((acc, key) => {
|
|
18
18
|
if (colors[key]) {
|
|
19
19
|
acc[key] = colors[key];
|
|
20
20
|
}
|
package/tile/tile-group.js
CHANGED
|
@@ -120,14 +120,14 @@ const TileGroup = ({
|
|
|
120
120
|
onClick(event, index);
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
|
-
overrides: {
|
|
123
|
+
overrides: (0, _overrides.mergeOverrides)({
|
|
124
124
|
Root: {
|
|
125
125
|
props: {
|
|
126
126
|
'aria-checked': isSelected,
|
|
127
127
|
role: isRadioGroup ? 'radio' : 'checkbox'
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
}
|
|
130
|
+
}, child.props.overrides)
|
|
131
131
|
});
|
|
132
132
|
}));
|
|
133
133
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PrimitiveColors, PrimitiveLightColors, PrimitiveDarkColors } from './types';
|
|
2
|
+
declare const primitiveColors: PrimitiveColors;
|
|
3
|
+
declare const primitiveLightColors: PrimitiveLightColors;
|
|
4
|
+
declare const primitiveDarkColors: PrimitiveDarkColors;
|
|
5
|
+
export { primitiveColors as default, primitiveLightColors, primitiveDarkColors };
|