baseui 14.0.0 → 15.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.
Files changed (150) hide show
  1. package/accordion/accordion.js +4 -4
  2. package/accordion/panel.d.ts +1 -1
  3. package/accordion/styled-components.js +1 -1
  4. package/accordion/types.d.ts +1 -1
  5. package/app-nav-bar/mobile-menu.js +3 -1
  6. package/banner/banner.js +3 -1
  7. package/banner/types.d.ts +2 -1
  8. package/bottom-navigation/bottom-navigation.js +3 -1
  9. package/bottom-navigation/selector.js +1 -1
  10. package/bottom-navigation/styled-components.js +1 -1
  11. package/button/button.d.ts +1 -3
  12. package/button/button.js +6 -2
  13. package/button/styled-components.d.ts +1 -0
  14. package/button/styled-components.js +61 -4
  15. package/button/types.d.ts +15 -3
  16. package/button-timed/button-timed.js +4 -5
  17. package/button-timed/styled-components.js +5 -3
  18. package/button-timed/types.d.ts +1 -1
  19. package/data-table/column-categorical.js +2 -2
  20. package/data-table/locale.d.ts +2 -0
  21. package/data-table/locale.js +2 -1
  22. package/data-table/stateful-container.js +1 -1
  23. package/data-table/stateful-data-table.js +7 -3
  24. package/data-table/types.d.ts +2 -0
  25. package/datepicker/day.js +2 -4
  26. package/datepicker/utils/date-helpers.d.ts +1 -0
  27. package/datepicker/utils/date-helpers.js +3 -0
  28. package/dialog/dialog.d.ts +1 -1
  29. package/dialog/dialog.js +38 -56
  30. package/dialog/styled-components.d.ts +2 -2
  31. package/dialog/styled-components.js +56 -24
  32. package/dialog/types.d.ts +5 -2
  33. package/file-uploader/constants.d.ts +16 -0
  34. package/file-uploader/constants.js +30 -0
  35. package/file-uploader/file-uploader.d.ts +2 -2
  36. package/file-uploader/file-uploader.js +387 -117
  37. package/file-uploader/index.d.ts +1 -1
  38. package/file-uploader/index.js +67 -18
  39. package/file-uploader/locale.d.ts +10 -10
  40. package/file-uploader/locale.js +5 -5
  41. package/file-uploader/styled-components.d.ts +13 -6
  42. package/file-uploader/styled-components.js +261 -64
  43. package/file-uploader/types.d.ts +47 -32
  44. package/file-uploader/utils.d.ts +5 -0
  45. package/file-uploader/utils.js +45 -0
  46. package/file-uploader-basic/file-uploader-basic.d.ts +10 -0
  47. package/file-uploader-basic/file-uploader-basic.js +175 -0
  48. package/file-uploader-basic/index.d.ts +4 -0
  49. package/file-uploader-basic/index.js +71 -0
  50. package/file-uploader-basic/locale.d.ts +15 -0
  51. package/file-uploader-basic/locale.js +21 -0
  52. package/file-uploader-basic/styled-components.d.ts +7 -0
  53. package/file-uploader-basic/styled-components.js +83 -0
  54. package/file-uploader-basic/types.d.ts +41 -0
  55. package/form-control/form-control.js +38 -3
  56. package/form-control/styled-components.d.ts +2 -0
  57. package/form-control/styled-components.js +22 -2
  58. package/form-control/types.d.ts +4 -0
  59. package/icon/circle-check-filled.d.ts +9 -0
  60. package/icon/circle-check-filled.js +50 -0
  61. package/icon/circle-exclamation-point-filled.d.ts +9 -0
  62. package/icon/circle-exclamation-point-filled.js +50 -0
  63. package/icon/hide.js +1 -1
  64. package/icon/icon-exports.d.ts +4 -0
  65. package/icon/icon-exports.js +28 -0
  66. package/icon/paperclip-filled.d.ts +9 -0
  67. package/icon/paperclip-filled.js +50 -0
  68. package/icon/show.js +1 -1
  69. package/icon/trash-can-filled.d.ts +9 -0
  70. package/{button-docked/button-docked.js → icon/trash-can-filled.js} +35 -16
  71. package/locale/en_US.js +14 -12
  72. package/locale/es_AR.js +9 -1
  73. package/locale/index.d.ts +3 -0
  74. package/locale/index.js +2 -0
  75. package/locale/tr_TR.js +9 -1
  76. package/locale/types.d.ts +2 -0
  77. package/message-card/message-card.js +2 -2
  78. package/message-card/utils.js +8 -3
  79. package/modal/modal-button.d.ts +1 -3
  80. package/package.json +5 -3
  81. package/payment-card/custom-cards.config.d.ts +1 -11
  82. package/payment-card/payment-card.js +1 -3
  83. package/phone-input/base-country-picker.js +2 -2
  84. package/phone-input/country-picker.js +0 -10
  85. package/progress-bar/progressbar-rounded.js +1 -1
  86. package/progress-bar/styled-components.js +8 -6
  87. package/rating/styled-components.js +3 -2
  88. package/rating/svg-icons.d.ts +5 -5
  89. package/rating/svg-icons.js +20 -20
  90. package/select/multi-value.js +1 -1
  91. package/snackbar/index.d.ts +1 -0
  92. package/snackbar/snackbar-context.d.ts +1 -2
  93. package/snackbar/snackbar-context.js +27 -21
  94. package/spinner/index.d.ts +4 -2
  95. package/stepper/stepper.js +28 -27
  96. package/styles/__mocks__/styled.js +0 -2
  97. package/styles/as-primary-export-hoc.js +0 -2
  98. package/styles/styled.js +0 -2
  99. package/styles/types.d.ts +7 -3
  100. package/tabs-motion/tabs.js +2 -2
  101. package/tag/constants.d.ts +5 -4
  102. package/tag/constants.js +7 -6
  103. package/tag/index.d.ts +1 -1
  104. package/tag/index.js +7 -7
  105. package/tag/styled-components.d.ts +1 -1
  106. package/tag/styled-components.js +137 -124
  107. package/tag/tag.js +2 -2
  108. package/tag/types.d.ts +9 -8
  109. package/tag/types.js +2 -2
  110. package/themes/dark-theme/color-component-tokens.d.ts +2 -2
  111. package/themes/dark-theme/color-component-tokens.js +279 -275
  112. package/themes/dark-theme/color-foundation-tokens.d.ts +3 -0
  113. package/themes/dark-theme/{color-tokens.js → color-foundation-tokens.js} +11 -14
  114. package/themes/dark-theme/color-semantic-tokens.d.ts +2 -2
  115. package/themes/dark-theme/color-semantic-tokens.js +52 -58
  116. package/themes/dark-theme/create-dark-theme.d.ts +1 -1
  117. package/themes/dark-theme/create-dark-theme.js +12 -32
  118. package/themes/dark-theme/dark-theme.js +4 -4
  119. package/themes/dark-theme/primitives.js +2 -2
  120. package/themes/light-theme/color-component-tokens.d.ts +2 -2
  121. package/themes/light-theme/color-component-tokens.js +287 -282
  122. package/themes/light-theme/color-foundation-tokens.d.ts +3 -0
  123. package/themes/light-theme/{color-tokens.js → color-foundation-tokens.js} +10 -13
  124. package/themes/light-theme/color-semantic-tokens.d.ts +2 -2
  125. package/themes/light-theme/color-semantic-tokens.js +50 -53
  126. package/themes/light-theme/create-light-theme.d.ts +1 -1
  127. package/themes/light-theme/create-light-theme.js +12 -32
  128. package/themes/light-theme/light-theme.js +4 -4
  129. package/themes/light-theme/primitives.js +2 -2
  130. package/themes/types.d.ts +74 -13
  131. package/themes/utils.d.ts +1 -1
  132. package/themes/utils.js +4 -4
  133. package/tile/tile-group.js +2 -2
  134. package/timezonepicker/update-tzdata.js +0 -1
  135. package/tokens/color-primitive-tokens.d.ts +5 -0
  136. package/tokens/color-primitive-tokens.js +301 -0
  137. package/tokens/index.d.ts +5 -4
  138. package/tokens/index.js +25 -3
  139. package/tokens/types.d.ts +170 -1
  140. package/button-docked/button-docked.d.ts +0 -4
  141. package/button-docked/index.d.ts +0 -3
  142. package/button-docked/index.js +0 -40
  143. package/button-docked/styled-components.d.ts +0 -5
  144. package/button-docked/styled-components.js +0 -55
  145. package/button-docked/types.d.ts +0 -14
  146. package/themes/dark-theme/color-tokens.d.ts +0 -3
  147. package/themes/light-theme/color-tokens.d.ts +0 -3
  148. package/tokens/colors.d.ts +0 -3
  149. package/tokens/colors.js +0 -125
  150. /package/{button-docked → file-uploader-basic}/types.js +0 -0
@@ -0,0 +1,3 @@
1
+ import type { FoundationColors } from '../types';
2
+ export declare const foundationColors: FoundationColors;
3
+ export default foundationColors;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.darkColorTokens = void 0;
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 darkColorTokens = exports.darkColorTokens = {
16
+ const foundationColors = exports.foundationColors = {
17
17
  // Primary Palette
18
- primaryA: _tokens.colors.gray200,
19
- primaryB: _tokens.colors.gray900,
20
- primary: _tokens.colors.white,
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.colors.blue400,
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.colors.red500,
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.colors.yellow500,
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.colors.green400,
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 = darkColorTokens;
84
+ var _default = exports.default = foundationColors;
@@ -1,3 +1,3 @@
1
- import type { FoundationColorTokens, SemanticColorTokens } from '../types';
2
- declare const _default: (foundation?: FoundationColorTokens) => SemanticColorTokens;
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 _colorTokens = _interopRequireDefault(require("./color-tokens"));
7
+ var _colorFoundationTokens = _interopRequireDefault(require("./color-foundation-tokens"));
8
8
  var _util = require("../../styles/util");
9
- var _colors = _interopRequireDefault(require("../../tokens/colors"));
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: _colors.default.gray800,
24
- backgroundTertiary: _colors.default.gray700,
25
- backgroundInversePrimary: foundation.primaryA,
26
- backgroundInverseSecondary: _colors.default.gray300,
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: _colors.default.white,
29
- contentSecondary: _colors.default.gray300,
30
- contentTertiary: _colors.default.gray400,
31
- contentInversePrimary: _colors.default.black,
32
- contentInverseSecondary: _colors.default.gray700,
33
- contentInverseTertiary: _colors.default.gray600,
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: _colors.default.gray700,
36
- // @ts-ignore
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: _colors.default.gray400,
40
- // @ts-ignore
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: _colors.default.gray800,
47
- // @ts-ignore
48
- backgroundOverlay: (0, _util.hexToRgb)(_colors.default.black, '0.7'),
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: _colors.default.green500,
55
- backgroundAccentLight: _colors.default.blue700,
56
- backgroundPositiveLight: _colors.default.green700,
57
- backgroundNegativeLight: _colors.default.red700,
58
- backgroundWarningLight: _colors.default.yellow700,
59
- backgroundAlwaysDark: _colors.default.gray900,
60
- backgroundAlwaysLight: _colors.default.gray100,
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: _colors.default.gray600,
63
- contentAccent: _colors.default.blue300,
64
- contentOnColor: _colors.default.white,
65
- contentOnColorInverse: _colors.default.black,
66
- contentNegative: _colors.default.red300,
67
- contentWarning: _colors.default.yellow300,
68
- contentPositive: _colors.default.green300,
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: _colors.default.gray800,
71
- borderAccent: _colors.default.blue400,
72
- borderAccentLight: _colors.default.blue500,
73
- borderNegative: _colors.default.red500,
74
- borderWarning: _colors.default.yellow500,
75
- borderPositive: _colors.default.green500,
76
- borderNegativeLight: _colors.default.red200,
77
- borderWarningLight: _colors.default.yellow200,
78
- borderPositiveLight: _colors.default.green200,
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: _colors.default.blue400,
81
- eatsGreen400: _colors.default.green400,
82
- freightBlue400: _colors.default.cobalt400,
83
- jumpRed400: _colors.default.red400,
84
- rewardsTier1: _colors.default.blue400,
85
- rewardsTier2: _colors.default.yellow400,
86
- rewardsTier3: _colors.default.platinum400,
87
- rewardsTier4: _colors.default.gray200,
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 { Theme, MakeExtendable, DeepPartial } from '../../styles/types';
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 _typography = _interopRequireDefault(require("../shared/typography"));
17
- var _grid = _interopRequireDefault(require("../shared/grid"));
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 foundationColorTokens = {
31
- ..._colorTokens.default,
32
- ...(0, _utils.getFoundationColorTokenOverrides)(overrides?.colors)
23
+ const foundationColors = {
24
+ ..._colorFoundationTokens.default,
25
+ ...(0, _utils.getFoundationColorOverrides)(overrides?.colors)
33
26
  };
34
- const semanticColorTokens = (0, _colorSemanticTokens.default)(foundationColorTokens);
35
- const componentColorTokens = (0, _colorComponentTokens.default)(foundationColorTokens);
27
+ const semanticColors = (0, _colorSemanticTokens.default)(foundationColors);
28
+ const componentColors = (0, _colorComponentTokens.default)(semanticColors);
36
29
  const theme = {
37
- animation: _animation.default,
38
- borders: _borders.default,
39
- breakpoints: _breakpoints.default,
30
+ ...structuredClone(_darkTheme.DarkTheme),
40
31
  colors: {
41
- ..._tokens.colors,
42
- ...foundationColorTokens,
43
- ...semanticColorTokens,
44
- ...componentColorTokens
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 _colorTokens = _interopRequireDefault(require("./color-tokens"));
8
- var _colors = _interopRequireDefault(require("../../tokens/colors"));
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
- ..._colorTokens.default,
31
- ..._colors.default,
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 _colorTokens = _interopRequireDefault(require("./color-tokens"));
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
- ..._colorTokens.default,
20
+ ..._colorFoundationTokens.default,
21
21
  ..._typography.fontTokens
22
22
  };
23
23
  var _default = exports.default = primitives;
@@ -1,3 +1,3 @@
1
- import type { FoundationColorTokens, ComponentColorTokens } from '../types';
2
- declare const _default: (themePrimitives?: FoundationColorTokens) => ComponentColorTokens;
1
+ import type { SemanticColors, ComponentColors } from '../types';
2
+ declare const _default: (semanticColors?: SemanticColors) => ComponentColors;
3
3
  export default _default;