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.
Files changed (162) hide show
  1. package/accordion/accordion.js +4 -4
  2. package/accordion/panel.d.ts +1 -1
  3. package/accordion/stateless-accordion.js +8 -8
  4. package/accordion/styled-components.js +1 -1
  5. package/accordion/types.d.ts +1 -1
  6. package/app-nav-bar/mobile-menu.js +3 -1
  7. package/banner/banner.js +3 -1
  8. package/banner/types.d.ts +2 -1
  9. package/bottom-navigation/bottom-navigation.js +4 -6
  10. package/bottom-navigation/selector.js +1 -1
  11. package/bottom-navigation/styled-components.js +1 -1
  12. package/button/button.d.ts +1 -3
  13. package/button/button.js +6 -2
  14. package/button/styled-components.d.ts +1 -0
  15. package/button/styled-components.js +61 -4
  16. package/button/types.d.ts +15 -3
  17. package/button-timed/button-timed.js +4 -5
  18. package/button-timed/styled-components.js +5 -3
  19. package/button-timed/types.d.ts +1 -1
  20. package/data-table/column-categorical.js +2 -2
  21. package/data-table/column-numerical.js +3 -18
  22. package/data-table/locale.d.ts +2 -0
  23. package/data-table/locale.js +2 -1
  24. package/data-table/stateful-container.js +1 -1
  25. package/data-table/stateful-data-table.js +7 -3
  26. package/data-table/types.d.ts +2 -0
  27. package/datepicker/day.js +2 -4
  28. package/datepicker/utils/date-helpers.d.ts +1 -0
  29. package/datepicker/utils/date-helpers.js +3 -0
  30. package/dialog/dialog.d.ts +1 -1
  31. package/dialog/dialog.js +38 -56
  32. package/dialog/styled-components.d.ts +2 -2
  33. package/dialog/styled-components.js +56 -24
  34. package/dialog/types.d.ts +5 -2
  35. package/dnd-list/list.js +1 -1
  36. package/dnd-list/stateful-list-container.js +1 -1
  37. package/file-uploader/constants.d.ts +18 -0
  38. package/file-uploader/constants.js +32 -0
  39. package/file-uploader/file-uploader.d.ts +2 -2
  40. package/file-uploader/file-uploader.js +406 -117
  41. package/file-uploader/index.d.ts +1 -1
  42. package/file-uploader/index.js +67 -18
  43. package/file-uploader/locale.d.ts +10 -10
  44. package/file-uploader/locale.js +5 -5
  45. package/file-uploader/styled-components.d.ts +13 -6
  46. package/file-uploader/styled-components.js +261 -64
  47. package/file-uploader/types.d.ts +49 -32
  48. package/file-uploader/utils.d.ts +5 -0
  49. package/file-uploader/utils.js +45 -0
  50. package/file-uploader-basic/file-uploader-basic.d.ts +10 -0
  51. package/file-uploader-basic/file-uploader-basic.js +173 -0
  52. package/file-uploader-basic/index.d.ts +4 -0
  53. package/file-uploader-basic/index.js +71 -0
  54. package/file-uploader-basic/locale.d.ts +15 -0
  55. package/file-uploader-basic/locale.js +21 -0
  56. package/file-uploader-basic/styled-components.d.ts +7 -0
  57. package/file-uploader-basic/styled-components.js +83 -0
  58. package/file-uploader-basic/types.d.ts +41 -0
  59. package/form-control/form-control.js +38 -3
  60. package/form-control/styled-components.d.ts +2 -0
  61. package/form-control/styled-components.js +22 -2
  62. package/form-control/types.d.ts +4 -0
  63. package/helpers/react-helpers.js +1 -1
  64. package/icon/circle-check-filled.d.ts +9 -0
  65. package/icon/circle-check-filled.js +50 -0
  66. package/icon/circle-exclamation-point-filled.d.ts +9 -0
  67. package/icon/circle-exclamation-point-filled.js +50 -0
  68. package/icon/hide.js +1 -1
  69. package/icon/icon-exports.d.ts +4 -0
  70. package/icon/icon-exports.js +28 -0
  71. package/icon/paperclip-filled.d.ts +9 -0
  72. package/icon/paperclip-filled.js +50 -0
  73. package/icon/show.js +1 -1
  74. package/icon/trash-can-filled.d.ts +9 -0
  75. package/{button-docked/button-docked.js → icon/trash-can-filled.js} +35 -16
  76. package/list/list-item.js +0 -2
  77. package/locale/en_US.js +14 -12
  78. package/locale/es_AR.js +9 -1
  79. package/locale/index.d.ts +3 -0
  80. package/locale/index.js +1 -0
  81. package/locale/tr_TR.js +9 -1
  82. package/locale/types.d.ts +2 -0
  83. package/message-card/message-card.js +2 -2
  84. package/message-card/utils.js +8 -3
  85. package/mobile-header/mobile-header.js +0 -1
  86. package/modal/modal-button.d.ts +1 -3
  87. package/package.json +5 -2
  88. package/page-control/page-control.js +1 -3
  89. package/payment-card/custom-cards.config.d.ts +1 -11
  90. package/payment-card/payment-card.js +1 -3
  91. package/phone-input/base-country-picker.js +2 -2
  92. package/phone-input/country-picker.js +0 -10
  93. package/progress-bar/progressbar-rounded.js +1 -1
  94. package/progress-bar/styled-components.js +8 -6
  95. package/rating/styled-components.js +3 -2
  96. package/rating/svg-icons.d.ts +5 -5
  97. package/rating/svg-icons.js +20 -20
  98. package/segmented-control/segmented-control.js +1 -2
  99. package/segmented-control/stateful-segmented-control.js +1 -2
  100. package/select/multi-value.js +1 -1
  101. package/sheet/sheet.js +1 -3
  102. package/snackbar/index.d.ts +1 -0
  103. package/snackbar/snackbar-context.d.ts +1 -2
  104. package/snackbar/snackbar-context.js +27 -21
  105. package/spinner/index.d.ts +4 -2
  106. package/stepper/stepper.js +29 -30
  107. package/styles/__mocks__/styled.js +0 -2
  108. package/styles/as-primary-export-hoc.js +0 -2
  109. package/styles/styled.js +0 -2
  110. package/styles/types.d.ts +7 -3
  111. package/system-banner/system-banner.js +1 -3
  112. package/tabs-motion/tabs.js +2 -2
  113. package/tag/constants.d.ts +5 -4
  114. package/tag/constants.js +7 -6
  115. package/tag/index.d.ts +1 -1
  116. package/tag/index.js +7 -7
  117. package/tag/styled-components.d.ts +1 -1
  118. package/tag/styled-components.js +137 -124
  119. package/tag/tag.js +2 -2
  120. package/tag/types.d.ts +9 -8
  121. package/tag/types.js +2 -2
  122. package/themes/dark-theme/color-component-tokens.d.ts +2 -2
  123. package/themes/dark-theme/color-component-tokens.js +279 -275
  124. package/themes/dark-theme/color-foundation-tokens.d.ts +3 -0
  125. package/themes/dark-theme/{color-tokens.js → color-foundation-tokens.js} +11 -14
  126. package/themes/dark-theme/color-semantic-tokens.d.ts +2 -2
  127. package/themes/dark-theme/color-semantic-tokens.js +52 -58
  128. package/themes/dark-theme/create-dark-theme.d.ts +1 -1
  129. package/themes/dark-theme/create-dark-theme.js +12 -32
  130. package/themes/dark-theme/dark-theme.js +4 -4
  131. package/themes/dark-theme/primitives.js +2 -2
  132. package/themes/light-theme/color-component-tokens.d.ts +2 -2
  133. package/themes/light-theme/color-component-tokens.js +287 -282
  134. package/themes/light-theme/color-foundation-tokens.d.ts +3 -0
  135. package/themes/light-theme/{color-tokens.js → color-foundation-tokens.js} +10 -13
  136. package/themes/light-theme/color-semantic-tokens.d.ts +2 -2
  137. package/themes/light-theme/color-semantic-tokens.js +50 -53
  138. package/themes/light-theme/create-light-theme.d.ts +1 -1
  139. package/themes/light-theme/create-light-theme.js +12 -32
  140. package/themes/light-theme/light-theme.js +4 -4
  141. package/themes/light-theme/primitives.js +2 -2
  142. package/themes/types.d.ts +74 -13
  143. package/themes/utils.d.ts +1 -1
  144. package/themes/utils.js +4 -4
  145. package/tile/tile-group.js +2 -2
  146. package/timezonepicker/update-tzdata.js +0 -1
  147. package/tokens/color-primitive-tokens.d.ts +5 -0
  148. package/tokens/color-primitive-tokens.js +301 -0
  149. package/tokens/index.d.ts +5 -4
  150. package/tokens/index.js +25 -3
  151. package/tokens/types.d.ts +170 -1
  152. package/button-docked/button-docked.d.ts +0 -4
  153. package/button-docked/index.d.ts +0 -3
  154. package/button-docked/index.js +0 -40
  155. package/button-docked/styled-components.d.ts +0 -5
  156. package/button-docked/styled-components.js +0 -55
  157. package/button-docked/types.d.ts +0 -14
  158. package/themes/dark-theme/color-tokens.d.ts +0 -3
  159. package/themes/light-theme/color-tokens.d.ts +0 -3
  160. package/tokens/colors.d.ts +0 -3
  161. package/tokens/colors.js +0 -125
  162. /package/{button-docked → file-uploader-basic}/types.js +0 -0
@@ -0,0 +1,3 @@
1
+ import type { FoundationColors } from '../types';
2
+ declare const foundationColors: FoundationColors;
3
+ export default foundationColors;
@@ -13,11 +13,11 @@ LICENSE file in the root directory of this source tree.
13
13
  */
14
14
 
15
15
  // color constants
16
- const lightColorTokens = {
16
+ const foundationColors = {
17
17
  // Primary Palette
18
- primaryA: _tokens.colors.black,
19
- primaryB: _tokens.colors.white,
20
- primary: _tokens.colors.black,
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.colors.blue400,
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.colors.red400,
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.colors.yellow400,
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.colors.green500,
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 = lightColorTokens;
83
+ 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 = _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 = _colorTokens.default) => {
19
+ foundation = _colorFoundationTokens.default) => {
20
20
  const core = {
21
21
  // Background
22
22
  backgroundPrimary: foundation.primaryB,
23
- backgroundSecondary: _colors.default.gray50,
24
- backgroundTertiary: _colors.default.gray100,
23
+ backgroundSecondary: _colorPrimitiveTokens.default.gray50,
24
+ backgroundTertiary: _colorPrimitiveTokens.default.gray100,
25
25
  backgroundInversePrimary: foundation.primaryA,
26
- backgroundInverseSecondary: _colors.default.gray800,
26
+ backgroundInverseSecondary: _colorPrimitiveTokens.default.gray900,
27
27
  // Content
28
28
  contentPrimary: foundation.primaryA,
29
- contentSecondary: _colors.default.gray600,
30
- contentTertiary: _colors.default.gray500,
29
+ contentSecondary: _colorPrimitiveTokens.default.gray800,
30
+ contentTertiary: _colorPrimitiveTokens.default.gray700,
31
31
  contentInversePrimary: foundation.primaryB,
32
- contentInverseSecondary: _colors.default.gray300,
33
- contentInverseTertiary: _colors.default.gray400,
32
+ contentInverseSecondary: _colorPrimitiveTokens.default.gray200,
33
+ contentInverseTertiary: _colorPrimitiveTokens.default.gray400,
34
34
  // Border
35
- borderOpaque: _colors.default.gray200,
36
- // @ts-ignore
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: _colors.default.gray700,
40
- // @ts-ignore
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: _colors.default.gray50,
47
- // @ts-ignore
48
- backgroundOverlay: (0, _util.hexToRgb)(_colors.default.black, '0.5'),
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: _colors.default.green400,
55
- backgroundAccentLight: _colors.default.blue50,
56
- backgroundNegativeLight: _colors.default.red50,
57
- backgroundWarningLight: _colors.default.yellow50,
58
- backgroundPositiveLight: _colors.default.green50,
59
- backgroundAlwaysDark: _colors.default.black,
60
- backgroundAlwaysLight: _colors.default.white,
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: _colors.default.gray400,
63
- contentAccent: foundation.accent,
64
- contentOnColor: _colors.default.white,
65
- contentOnColorInverse: _colors.default.black,
66
- contentNegative: foundation.negative,
67
- contentWarning: _colors.default.yellow600,
68
- contentPositive: _colors.default.green400,
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: _colors.default.gray50,
71
- borderAccent: _colors.default.blue400,
72
- borderAccentLight: _colors.default.blue200,
73
- borderNegative: _colors.default.red200,
74
- borderWarning: _colors.default.yellow200,
75
- borderPositive: _colors.default.green200,
76
- borderNegativeLight: _colors.default.red200,
77
- borderWarningLight: _colors.default.yellow200,
78
- borderPositiveLight: _colors.default.green200,
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: _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.black,
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 { Theme, MakeExtendable, DeepPartial } from '../../styles/types';
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 _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 _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 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(_lightTheme.LightTheme),
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.LightTheme = 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("../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
- ..._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;
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 FoundationColorTokens = {
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 CoreSemanticColorTokens = {
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?: string;
131
+ borderTransparent: string;
82
132
  borderSelected: string;
83
133
  borderInverseOpaque: string;
84
- borderInverseTransparent?: string;
134
+ borderInverseTransparent: string;
85
135
  borderInverseSelected: string;
86
136
  };
87
- export type CoreExtensionSemanticColorTokens = {
137
+ export type CoreExtensionSemanticColors = {
88
138
  backgroundStateDisabled: string;
89
139
  backgroundOverlay: string;
90
- backgroundOverlayArt?: string;
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 DeprecatedSemanticColorTokens = {
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 SemanticColorTokens = {} & CoreSemanticColorTokens & CoreExtensionSemanticColorTokens & DeprecatedSemanticColorTokens;
136
- export type ComponentColorTokens = {
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 = {} & FoundationColorTokens & FontTokens;
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 getFoundationColorTokenOverrides(colors?: Partial<ColorTokens>): {};
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.getFoundationColorTokenOverrides = getFoundationColorTokenOverrides;
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 foundationColorTokens = ['primaryA', 'primaryB', 'primary', 'accent', 'negative', 'warning', 'positive'];
15
- function getFoundationColorTokenOverrides(colors) {
14
+ const foundationColors = ['primaryA', 'primaryB', 'primary', 'accent', 'negative', 'warning', 'positive'];
15
+ function getFoundationColorOverrides(colors) {
16
16
  if (!colors) return {};
17
- return foundationColorTokens.reduce((acc, key) => {
17
+ return foundationColors.reduce((acc, key) => {
18
18
  if (colors[key]) {
19
19
  acc[key] = colors[key];
20
20
  }
@@ -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
  };
@@ -7,7 +7,6 @@ This source code is licensed under the MIT license found in the
7
7
  LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  /* eslint-env node */
10
- // @flow
11
10
 
12
11
  const fs = require('fs');
13
12
  const path = require('path');
@@ -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 };