baseui 15.0.2 → 16.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 (49) hide show
  1. package/button/button-internals.d.ts +2 -2
  2. package/button/button-internals.js +56 -7
  3. package/button/button.d.ts +2 -2
  4. package/button/button.js +80 -8
  5. package/button/constants.d.ts +22 -0
  6. package/button/constants.js +31 -3
  7. package/button/default-props.d.ts +5 -3
  8. package/button/default-props.js +5 -3
  9. package/button/index.d.ts +1 -1
  10. package/button/index.js +21 -0
  11. package/button/styled-components.d.ts +7 -0
  12. package/button/styled-components.js +476 -66
  13. package/button/types.d.ts +39 -3
  14. package/button/utils.d.ts +2 -2
  15. package/button/utils.js +9 -3
  16. package/button-group/button-group.d.ts +1 -0
  17. package/button-group/button-group.js +22 -33
  18. package/button-group/constants.d.ts +5 -0
  19. package/button-group/constants.js +6 -1
  20. package/button-group/index.d.ts +10 -1
  21. package/button-group/index.js +33 -4
  22. package/button-group/styled-components.d.ts +5 -2
  23. package/button-group/styled-components.js +47 -6
  24. package/button-group/types.d.ts +9 -2
  25. package/modal/modal-button.d.ts +8 -1
  26. package/package.json +1 -1
  27. package/tag/constants.d.ts +31 -5
  28. package/tag/constants.js +18 -11
  29. package/tag/deprecated-styles.d.ts +119 -0
  30. package/tag/deprecated-styles.js +179 -0
  31. package/tag/index.d.ts +1 -1
  32. package/tag/index.js +15 -1
  33. package/tag/styled-components.js +199 -230
  34. package/tag/tag.js +10 -4
  35. package/tag/types.d.ts +16 -11
  36. package/tag-group/index.d.ts +5 -0
  37. package/tag-group/index.js +51 -0
  38. package/tag-group/styled-components.d.ts +3 -0
  39. package/tag-group/styled-components.js +46 -0
  40. package/tag-group/tag-group.d.ts +4 -0
  41. package/tag-group/tag-group.js +65 -0
  42. package/tag-group/types.d.ts +18 -0
  43. package/tag-group/types.js +1 -0
  44. package/themes/dark-theme/color-component-tokens.js +56 -3
  45. package/themes/dark-theme/color-semantic-tokens.js +104 -0
  46. package/themes/light-theme/color-component-tokens.js +55 -2
  47. package/themes/light-theme/color-semantic-tokens.js +104 -0
  48. package/themes/shared/animation.js +30 -5
  49. package/themes/types.d.ts +76 -1
package/tag/types.d.ts CHANGED
@@ -2,6 +2,16 @@ import type * as React from 'react';
2
2
  import type { Override } from '../helpers/overrides';
3
3
  export declare const TagKind: Readonly<{
4
4
  readonly custom: "custom";
5
+ readonly gray: "gray";
6
+ readonly red: "red";
7
+ readonly orange: "orange";
8
+ readonly yellow: "yellow";
9
+ readonly green: "green";
10
+ readonly blue: "blue";
11
+ readonly purple: "purple";
12
+ readonly magenta: "magenta";
13
+ readonly teal: "teal";
14
+ readonly lime: "lime";
5
15
  readonly neutral: "neutral";
6
16
  readonly primary: "primary";
7
17
  readonly accent: "accent";
@@ -9,21 +19,14 @@ export declare const TagKind: Readonly<{
9
19
  readonly warning: "warning";
10
20
  readonly negative: "negative";
11
21
  readonly black: "black";
12
- readonly blue: "blue";
13
- readonly green: "green";
14
- readonly red: "red";
15
- readonly yellow: "yellow";
16
- readonly orange: "orange";
17
- readonly purple: "purple";
18
22
  readonly brown: "brown";
19
- readonly teal: "teal";
20
- readonly lime: "lime";
21
23
  }>;
22
24
  export declare const TagHierarchy: Readonly<Readonly<{
23
25
  readonly primary: "primary";
24
26
  readonly secondary: "secondary";
25
27
  }>>;
26
28
  export declare const TagSize: Readonly<{
29
+ readonly xSmall: "xSmall";
27
30
  readonly small: "small";
28
31
  readonly medium: "medium";
29
32
  readonly large: "large";
@@ -58,9 +61,9 @@ export type TagProps = {
58
61
  color?: string;
59
62
  /** Text to display in native OS tooltip on long hover. */
60
63
  title?: string;
61
- /** onClick handler for the action button element. */
64
+ /** onClick handler for the action button(the "x" button) element. */
62
65
  onActionClick?: (e: Event, children?: React.ReactNode) => unknown;
63
- /** keydown handler for the action button element. */
66
+ /** keydown handler for the action button(the "x" button) element. */
64
67
  onActionKeyDown?: (e: Event, children?: React.ReactNode) => unknown;
65
68
  /** onClick handler for the tag. Passing an onClick handler also makes the tag clickable. */
66
69
  onClick?: null | ((event: Event) => unknown);
@@ -68,7 +71,9 @@ export type TagProps = {
68
71
  onKeyDown?: null | ((event: Event) => unknown);
69
72
  /** Determines the size of the Tag. */
70
73
  size?: TagSize;
71
- startEnhancer?: React.ComponentType<{}>;
74
+ startEnhancer?: React.ComponentType<{
75
+ size?: number | string;
76
+ }>;
72
77
  contentMaxWidth?: string | null;
73
78
  };
74
79
  export type SharedPropsArg = {
@@ -0,0 +1,5 @@
1
+ import { SIZE, HIERARCHY } from '../tag';
2
+ export { SIZE, HIERARCHY };
3
+ export * from './types';
4
+ export { default as TagGroup } from './tag-group';
5
+ export { StyledRoot } from './styled-components';
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ SIZE: true,
8
+ HIERARCHY: true,
9
+ TagGroup: true,
10
+ StyledRoot: true
11
+ };
12
+ Object.defineProperty(exports, "HIERARCHY", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _tag.HIERARCHY;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SIZE", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _tag.SIZE;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "StyledRoot", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _styledComponents.StyledRoot;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "TagGroup", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _tagGroup.default;
34
+ }
35
+ });
36
+ var _tag = require("../tag");
37
+ var _types = require("./types");
38
+ Object.keys(_types).forEach(function (key) {
39
+ if (key === "default" || key === "__esModule") return;
40
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
41
+ if (key in exports && exports[key] === _types[key]) return;
42
+ Object.defineProperty(exports, key, {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _types[key];
46
+ }
47
+ });
48
+ });
49
+ var _tagGroup = _interopRequireDefault(require("./tag-group"));
50
+ var _styledComponents = require("./styled-components");
51
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,3 @@
1
+ export declare const StyledRoot: import("styletron-react").StyletronComponent<"div", {
2
+ $wrap?: boolean;
3
+ }>;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledRoot = void 0;
7
+ var _styles = require("../styles");
8
+ /*
9
+ Copyright (c) Uber Technologies, Inc.
10
+
11
+ This source code is licensed under the MIT license found in the
12
+ LICENSE file in the root directory of this source tree.
13
+ */
14
+
15
+ const StyledRoot = exports.StyledRoot = (0, _styles.styled)('div', ({
16
+ $wrap,
17
+ $theme
18
+ }) => {
19
+ return {
20
+ display: 'flex',
21
+ columnGap: $theme.sizing.scale300,
22
+ rowGap: $theme.sizing.scale300,
23
+ ...getWrapStyles({
24
+ $wrap,
25
+ $theme
26
+ })
27
+ };
28
+ });
29
+ StyledRoot.displayName = "StyledRoot";
30
+ StyledRoot.displayName = 'StyledRoot';
31
+ const getWrapStyles = ({
32
+ $wrap,
33
+ $theme
34
+ }) => {
35
+ if (typeof $wrap === 'boolean') {
36
+ return $wrap ? {
37
+ padding: 0,
38
+ flexWrap: 'wrap'
39
+ } : {
40
+ overflowX: 'auto',
41
+ scrollbarWidth: 'none',
42
+ padding: `0 ${$theme.sizing.scale600}`
43
+ };
44
+ }
45
+ return {};
46
+ };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { TagGroupProps } from './types';
3
+ declare const TagGroup: React.ForwardRefExoticComponent<TagGroupProps & React.RefAttributes<HTMLDivElement>>;
4
+ export default TagGroup;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _tag = require("../tag");
9
+ var _overrides = require("../helpers/overrides");
10
+ var _styledComponents = require("./styled-components");
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /*
14
+ Copyright (c) Uber Technologies, Inc.
15
+
16
+ This source code is licensed under the MIT license found in the
17
+ LICENSE file in the root directory of this source tree.
18
+ */
19
+ const TagGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
20
+ const {
21
+ children,
22
+ wrap = true,
23
+ hierarchy = _tag.KIND.primary,
24
+ size = _tag.SIZE.small,
25
+ overrides = {}
26
+ } = props;
27
+ const [Root, rootProps] = (0, _overrides.getOverrides)(overrides.Root, _styledComponents.StyledRoot);
28
+ const styleProps = {
29
+ $wrap: wrap
30
+ };
31
+ return /*#__PURE__*/React.createElement(Root, _extends({
32
+ ref: ref
33
+ }, styleProps, rootProps), React.Children.map(children, child => {
34
+ if (! /*#__PURE__*/React.isValidElement(child)) {
35
+ return null;
36
+ }
37
+ return /*#__PURE__*/React.cloneElement(child, {
38
+ hierarchy,
39
+ size,
40
+ // All tags in tag group are display only
41
+ onActionClick: undefined,
42
+ onActionKeyDown: undefined,
43
+ onClick: undefined,
44
+ onKeyDown: undefined,
45
+ closeable: false,
46
+ overrides: {
47
+ Root: {
48
+ style: {
49
+ // Single Tag has default margin, reset it to 0 in TagGroup
50
+ margin: 0,
51
+ ...(wrap ? {
52
+ maxWidth: '100%'
53
+ } : {}),
54
+ // ensure wrapping works correctly even if Tag itself has a custom maxWidth(Tag has a default maxWidth 128px on Text inside)
55
+ ...child.props.overrides?.Root?.style
56
+ },
57
+ ...child.props.overrides?.Root
58
+ },
59
+ ...child.props.overrides
60
+ }
61
+ });
62
+ }));
63
+ });
64
+ TagGroup.displayName = 'TagGroup';
65
+ var _default = exports.default = TagGroup;
@@ -0,0 +1,18 @@
1
+ import type * as React from 'react';
2
+ import type { Override } from '../helpers/overrides';
3
+ import type { HIERARCHY, SIZE } from '../tag';
4
+ export type TagGroupProps = {
5
+ /** Set of more than one `Button` components */
6
+ children: Array<React.ReactNode>;
7
+ overrides?: TagGroupOverrides;
8
+ /** Determines whether tags should wrap to the next line when they exceed the container width. Defaults to true */
9
+ wrap?: boolean;
10
+ /** Defines tags look in the tag group. Set it to one of HIERARCHY[key] values. Defaults to HIERARCHY.primary */
11
+ hierarchy?: (typeof HIERARCHY)[keyof typeof HIERARCHY];
12
+ /** Determines the size of the Tag in the tag group. Defaults to small */
13
+ size?: (typeof SIZE)[keyof typeof SIZE];
14
+ };
15
+ type TagGroupOverrides = {
16
+ Root?: Override;
17
+ };
18
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";
@@ -36,34 +36,87 @@ var _default = (semanticColors = defaultSemanticColors) => ({
36
36
  buttonPrimaryText: semanticColors.contentInversePrimary,
37
37
  buttonPrimaryHover: _tokens.primitiveDarkColors.gray700Dark,
38
38
  buttonPrimaryActive: _tokens.primitiveDarkColors.gray600Dark,
39
+ buttonPrimaryHoverOverlay: semanticColors.hoverOverlayInverseAlpha,
40
+ buttonPrimaryActiveOverlay: semanticColors.pressedOverlayInverseAlpha,
39
41
  buttonPrimarySelectedFill: semanticColors.backgroundInversePrimary,
40
42
  buttonPrimarySelectedText: semanticColors.contentInversePrimary,
43
+ buttonPrimaryLoadingFill: semanticColors.backgroundInversePrimary,
41
44
  buttonPrimarySpinnerForeground: semanticColors.backgroundAccent,
42
45
  buttonPrimarySpinnerBackground: semanticColors.backgroundPrimary,
43
- buttonSecondaryFill: semanticColors.backgroundTertiary,
46
+ buttonSecondaryFill: semanticColors.backgroundSecondary,
44
47
  buttonSecondaryText: semanticColors.contentPrimary,
45
48
  buttonSecondaryHover: _tokens.primitiveDarkColors.gray300Dark,
46
49
  buttonSecondaryActive: _tokens.primitiveDarkColors.gray400Dark,
50
+ buttonSecondaryHoverOverlay: semanticColors.hoverOverlayAlpha,
51
+ buttonSecondaryActiveOverlay: semanticColors.pressedOverlayAlpha,
47
52
  buttonSecondarySelectedFill: semanticColors.backgroundInversePrimary,
48
53
  buttonSecondarySelectedText: semanticColors.contentInversePrimary,
54
+ buttonSecondaryLoadingFill: semanticColors.backgroundSecondary,
49
55
  buttonSecondarySpinnerForeground: semanticColors.backgroundAccent,
50
56
  buttonSecondarySpinnerBackground: semanticColors.backgroundPrimary,
51
57
  buttonTertiaryFill: 'transparent',
52
58
  buttonTertiaryText: semanticColors.contentPrimary,
53
59
  buttonTertiaryHover: _tokens.primitiveDarkColors.gray100Dark,
54
60
  buttonTertiaryActive: _tokens.primitiveDarkColors.gray200Dark,
55
- buttonTertiarySelectedFill: semanticColors.backgroundInversePrimary,
56
- buttonTertiarySelectedText: semanticColors.contentInversePrimary,
61
+ buttonTertiaryHoverOverlay: semanticColors.hoverOverlayAlpha,
62
+ buttonTertiaryActiveOverlay: semanticColors.pressedOverlayAlpha,
63
+ buttonTertiarySelectedFill: 'transparent',
64
+ buttonTertiarySelectedText: semanticColors.contentPrimary,
65
+ buttonTertiaryLoadingFill: 'transparent',
66
+ buttonTertiaryFocusFill: semanticColors.backgroundTertiary,
57
67
  buttonTertiaryDisabledActiveFill: semanticColors.backgroundStateDisabled,
58
68
  buttonTertiaryDisabledActiveText: semanticColors.contentStateDisabled,
59
69
  buttonTertiarySpinnerForeground: semanticColors.backgroundAccent,
60
70
  buttonTertiarySpinnerBackground: semanticColors.backgroundTertiary,
71
+ buttonDangerPrimaryFill: semanticColors.backgroundNegative,
72
+ buttonDangerPrimaryText: semanticColors.contentOnColor,
73
+ buttonDangerPrimaryHoverOverlay: semanticColors.hoverOverlayAlpha,
74
+ buttonDangerPrimaryActiveOverlay: semanticColors.pressedOverlayAlpha,
75
+ buttonDangerPrimarySelectedFill: semanticColors.backgroundNegative,
76
+ buttonDangerPrimarySelectedText: semanticColors.contentOnColor,
77
+ buttonDangerPrimaryLoadingFill: semanticColors.backgroundNegative,
78
+ buttonDangerPrimarySpinnerForeground: semanticColors.backgroundAccent,
79
+ buttonDangerPrimarySpinnerBackground: semanticColors.backgroundPrimary,
80
+ buttonDangerSecondaryFill: semanticColors.backgroundSecondary,
81
+ buttonDangerSecondaryText: semanticColors.contentNegative,
82
+ buttonDangerSecondaryHoverOverlay: semanticColors.hoverOverlayAlpha,
83
+ buttonDangerSecondaryActiveOverlay: semanticColors.pressedOverlayAlpha,
84
+ buttonDangerSecondarySelectedFill: semanticColors.backgroundNegative,
85
+ buttonDangerSecondarySelectedText: semanticColors.contentOnColor,
86
+ buttonDangerSecondaryLoadingFill: semanticColors.backgroundSecondary,
87
+ buttonDangerSecondarySpinnerForeground: semanticColors.backgroundAccent,
88
+ buttonDangerSecondarySpinnerBackground: semanticColors.backgroundPrimary,
89
+ buttonDangerTertiaryFill: 'transparent',
90
+ buttonDangerTertiaryText: semanticColors.contentNegative,
91
+ buttonDangerTertiaryHoverOverlay: semanticColors.hoverOverlayAlpha,
92
+ buttonDangerTertiaryActiveOverlay: semanticColors.pressedOverlayAlpha,
93
+ buttonDangerTertiarySelectedFill: semanticColors.backgroundPrimary,
94
+ buttonDangerTertiarySelectedText: semanticColors.contentNegative,
95
+ buttonDangerTertiaryLoadingFill: 'transparent',
96
+ buttonDangerTertiarySpinnerForeground: semanticColors.backgroundAccent,
97
+ buttonDangerTertiarySpinnerBackground: semanticColors.backgroundPrimary,
98
+ buttonOutlineFill: 'transparent',
99
+ buttonOutlineText: semanticColors.contentPrimary,
100
+ buttonOutlineHoverOverlay: semanticColors.hoverOverlayAlpha,
101
+ buttonOutlineActiveOverlay: semanticColors.pressedOverlayAlpha,
102
+ buttonOutlineSelectedFill: 'transparent',
103
+ buttonOutlineSelectedText: semanticColors.contentPrimary,
104
+ buttonOutlineFocusFill: semanticColors.backgroundTertiary,
105
+ buttonOutlineLoadingFill: 'transparent',
106
+ buttonOutlineSpinnerForeground: semanticColors.backgroundAccent,
107
+ buttonOutlineSpinnerBackground: semanticColors.backgroundPrimary,
61
108
  buttonDisabledFill: semanticColors.backgroundStateDisabled,
62
109
  buttonDisabledText: semanticColors.contentStateDisabled,
63
110
  buttonDisabledActiveFill: semanticColors.backgroundStateDisabled,
64
111
  buttonDisabledActiveText: semanticColors.contentStateDisabled,
65
112
  buttonDisabledSpinnerForeground: semanticColors.contentStateDisabled,
66
113
  buttonDisabledSpinnerBackground: semanticColors.backgroundPrimary,
114
+ buttonOuterBorder: semanticColors.borderSelected,
115
+ buttonOutlineOuterBorder: semanticColors.borderOpaque,
116
+ buttonDangerTertiaryOuterBorder: semanticColors.tagRedBorderSecondarySelected,
117
+ buttonInnerBorder: semanticColors.contentInversePrimary,
118
+ buttonTransparentBorder: 'transparent',
119
+ buttonFocusOuterBorder: semanticColors.borderAccent,
67
120
  // Breadcrumbs
68
121
  breadcrumbsText: semanticColors.contentPrimary,
69
122
  breadcrumbsSeparatorFill: semanticColors.contentTertiary,
@@ -60,6 +60,7 @@ var _default = (foundation = _colorFoundationTokens.default) => {
60
60
  contentNegative: _colorPrimitiveTokens.primitiveDarkColors.red600Dark,
61
61
  contentWarning: _colorPrimitiveTokens.primitiveDarkColors.yellow600Dark,
62
62
  contentPositive: _colorPrimitiveTokens.primitiveDarkColors.green600Dark,
63
+ tagRedContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.red700Dark,
63
64
  // Border
64
65
  borderStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
65
66
  borderAccent: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
@@ -70,6 +71,7 @@ var _default = (foundation = _colorFoundationTokens.default) => {
70
71
  borderWarningLight: _colorPrimitiveTokens.primitiveDarkColors.yellow400Dark,
71
72
  borderPositive: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
72
73
  borderPositiveLight: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
74
+ tagRedBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.red800Dark,
73
75
  // Programs
74
76
  safety: _colorPrimitiveTokens.primitiveLightColors.blue600,
75
77
  eatsGreen400: _colorPrimitiveTokens.primitiveLightColors.green600,
@@ -89,9 +91,111 @@ var _default = (foundation = _colorFoundationTokens.default) => {
89
91
  backgroundLightWarning: coreExtensions.backgroundWarningLight,
90
92
  backgroundLightNegative: coreExtensions.backgroundNegativeLight
91
93
  };
94
+ const tagTokens = {
95
+ tagGrayBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.gray400Dark,
96
+ tagGrayBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
97
+ tagGrayContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.gray900Dark,
98
+ tagGrayContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.gray700Dark,
99
+ tagGrayBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray100Dark,
100
+ tagGrayContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.gray400Dark,
101
+ tagGrayBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.gray500Dark,
102
+ tagGrayBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.gray500Dark,
103
+ tagGrayBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.gray800Dark,
104
+ tagRedBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.red400Dark,
105
+ tagRedBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.red100Dark,
106
+ tagRedContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.red900Dark,
107
+ tagRedContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.red700Dark,
108
+ tagRedBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.red100Dark,
109
+ tagRedContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.red400Dark,
110
+ tagRedBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.red500Dark,
111
+ tagRedBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.red500Dark,
112
+ tagRedBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.red800Dark,
113
+ tagOrangeBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.orange400Dark,
114
+ tagOrangeBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.orange100Dark,
115
+ tagOrangeContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.orange900Dark,
116
+ tagOrangeContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.orange700Dark,
117
+ tagOrangeBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.orange100Dark,
118
+ tagOrangeContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.orange400Dark,
119
+ tagYellowBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.yellow700Dark,
120
+ tagOrangeBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.orange500Dark,
121
+ tagYellowBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.yellow100Dark,
122
+ tagOrangeBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.orange500Dark,
123
+ tagOrangeBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.orange800Dark,
124
+ tagYellowContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.yellow50Dark,
125
+ tagYellowContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.yellow900Dark,
126
+ tagYellowBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.yellow100Dark,
127
+ tagYellowContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.yellow400Dark,
128
+ tagYellowBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.yellow800Dark,
129
+ tagYellowBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.yellow500Dark,
130
+ tagYellowBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.yellow800Dark,
131
+ tagGreenBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
132
+ tagGreenBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.green100Dark,
133
+ tagGreenContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.green900Dark,
134
+ tagGreenContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.green700Dark,
135
+ tagGreenBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.green100Dark,
136
+ tagGreenContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.green400Dark,
137
+ tagGreenBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
138
+ tagBlueBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.blue400Dark,
139
+ tagBlueBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.blue100Dark,
140
+ tagGreenBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.green500Dark,
141
+ tagBlueContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.blue900Dark,
142
+ tagGreenBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.green800Dark,
143
+ tagBlueContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.blue700Dark,
144
+ tagBlueBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.blue100Dark,
145
+ tagBlueContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.blue400Dark,
146
+ tagBlueBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
147
+ tagPurpleBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.purple400Dark,
148
+ tagPurpleBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.purple100Dark,
149
+ tagBlueBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.blue500Dark,
150
+ tagBlueBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.blue800Dark,
151
+ tagPurpleContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.purple900Dark,
152
+ tagPurpleContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.purple700Dark,
153
+ tagPurpleBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.purple100Dark,
154
+ tagPurpleContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.purple400Dark,
155
+ tagPurpleBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.purple500Dark,
156
+ tagMagentaBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.magenta400Dark,
157
+ tagPurpleBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.purple500Dark,
158
+ tagMagentaBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.magenta100Dark,
159
+ tagPurpleBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.purple800Dark,
160
+ tagMagentaContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.magenta900Dark,
161
+ tagMagentaContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.magenta700Dark,
162
+ tagMagentaBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.magenta100Dark,
163
+ tagMagentaContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.magenta400Dark,
164
+ tagMagentaBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.magenta500Dark,
165
+ tagMagentaBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.magenta500Dark,
166
+ tagMagentaBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.magenta800Dark,
167
+ tagTealBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.teal400Dark,
168
+ tagTealBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.teal100Dark,
169
+ tagTealContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.teal900Dark,
170
+ tagTealContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.teal700Dark,
171
+ tagTealBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.teal100Dark,
172
+ tagTealContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.teal400Dark,
173
+ tagTealBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.teal500Dark,
174
+ tagTealBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.teal500Dark,
175
+ tagTealBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.teal800Dark,
176
+ tagLimeBackgroundPrimary: _colorPrimitiveTokens.primitiveDarkColors.lime400Dark,
177
+ tagLimeBackgroundSecondary: _colorPrimitiveTokens.primitiveDarkColors.lime100Dark,
178
+ tagLimeContentPrimary: _colorPrimitiveTokens.primitiveDarkColors.lime900Dark,
179
+ tagLimeContentSecondary: _colorPrimitiveTokens.primitiveDarkColors.lime700Dark,
180
+ tagLimeBackgroundStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.lime100Dark,
181
+ tagLimeContentStateDisabled: _colorPrimitiveTokens.primitiveDarkColors.lime400Dark,
182
+ tagLimeBorderPrimaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.lime500Dark,
183
+ tagLimeBorderSecondaryUnselected: _colorPrimitiveTokens.primitiveDarkColors.lime500Dark,
184
+ tagLimeBorderSecondarySelected: _colorPrimitiveTokens.primitiveDarkColors.lime800Dark
185
+ };
186
+ const hoveredAndPressedColors = {
187
+ hoverOverlayInverseAlpha: 'rgba(0, 0, 0, 0.04)',
188
+ hoverOverlayAlpha: 'rgba(255, 255, 255, 0.1)',
189
+ hoverNegativeAlpha: 'rgba(163, 44, 52, 0.4)',
190
+ pressedOverlayAlpha: 'rgba(255, 255, 255, 0.15)',
191
+ pressedOverlayInverseAlpha: 'rgba(0, 0, 0, 0.08)',
192
+ pressedNegativeAlpha: 'rgba(163, 44, 52, 0.6)'
193
+ };
92
194
  return {
93
195
  ...core,
94
196
  ...coreExtensions,
197
+ ...tagTokens,
198
+ ...hoveredAndPressedColors,
95
199
  ...deprecated
96
200
  };
97
201
  };
@@ -36,34 +36,87 @@ var _default = (semanticColors = defaultSemanticColors) => ({
36
36
  buttonPrimaryText: semanticColors.contentInversePrimary,
37
37
  buttonPrimaryHover: _tokens.primitiveLightColors.gray900,
38
38
  buttonPrimaryActive: _tokens.primitiveLightColors.gray800,
39
+ buttonPrimaryHoverOverlay: semanticColors.hoverOverlayInverseAlpha,
40
+ buttonPrimaryActiveOverlay: semanticColors.pressedOverlayInverseAlpha,
39
41
  buttonPrimarySelectedFill: semanticColors.backgroundInversePrimary,
40
42
  buttonPrimarySelectedText: semanticColors.contentInversePrimary,
43
+ buttonPrimaryLoadingFill: semanticColors.backgroundInversePrimary,
41
44
  buttonPrimarySpinnerForeground: semanticColors.backgroundAccent,
42
45
  buttonPrimarySpinnerBackground: semanticColors.backgroundPrimary,
43
46
  buttonSecondaryFill: semanticColors.backgroundSecondary,
44
47
  buttonSecondaryText: semanticColors.contentPrimary,
45
48
  buttonSecondaryHover: _tokens.primitiveLightColors.gray200,
46
49
  buttonSecondaryActive: _tokens.primitiveLightColors.gray300,
50
+ buttonSecondaryHoverOverlay: semanticColors.hoverOverlayAlpha,
51
+ buttonSecondaryActiveOverlay: semanticColors.pressedOverlayAlpha,
47
52
  buttonSecondarySelectedFill: semanticColors.backgroundInversePrimary,
48
53
  buttonSecondarySelectedText: semanticColors.contentInversePrimary,
54
+ buttonSecondaryLoadingFill: semanticColors.backgroundSecondary,
49
55
  buttonSecondarySpinnerForeground: semanticColors.backgroundAccent,
50
56
  buttonSecondarySpinnerBackground: semanticColors.backgroundPrimary,
51
57
  buttonTertiaryFill: 'transparent',
52
58
  buttonTertiaryText: semanticColors.contentPrimary,
53
59
  buttonTertiaryHover: _tokens.primitiveLightColors.gray50,
54
60
  buttonTertiaryActive: _tokens.primitiveLightColors.gray100,
55
- buttonTertiarySelectedFill: semanticColors.backgroundInversePrimary,
56
- buttonTertiarySelectedText: semanticColors.contentInversePrimary,
61
+ buttonTertiaryHoverOverlay: semanticColors.hoverOverlayAlpha,
62
+ buttonTertiaryActiveOverlay: semanticColors.pressedOverlayAlpha,
63
+ buttonTertiarySelectedFill: 'transparent',
64
+ buttonTertiarySelectedText: semanticColors.contentPrimary,
65
+ buttonTertiaryLoadingFill: 'transparent',
66
+ buttonTertiaryFocusFill: semanticColors.backgroundTertiary,
57
67
  buttonTertiaryDisabledActiveFill: semanticColors.backgroundStateDisabled,
58
68
  buttonTertiaryDisabledActiveText: semanticColors.contentStateDisabled,
59
69
  buttonTertiarySpinnerForeground: semanticColors.backgroundAccent,
60
70
  buttonTertiarySpinnerBackground: semanticColors.backgroundTertiary,
71
+ buttonDangerPrimaryFill: semanticColors.backgroundNegative,
72
+ buttonDangerPrimaryText: semanticColors.contentOnColor,
73
+ buttonDangerPrimaryHoverOverlay: semanticColors.hoverOverlayAlpha,
74
+ buttonDangerPrimaryActiveOverlay: semanticColors.pressedOverlayAlpha,
75
+ buttonDangerPrimarySelectedFill: semanticColors.backgroundNegative,
76
+ buttonDangerPrimarySelectedText: semanticColors.contentOnColor,
77
+ buttonDangerPrimaryLoadingFill: semanticColors.backgroundNegative,
78
+ buttonDangerPrimarySpinnerForeground: semanticColors.backgroundAccent,
79
+ buttonDangerPrimarySpinnerBackground: semanticColors.backgroundPrimary,
80
+ buttonDangerSecondaryFill: semanticColors.backgroundSecondary,
81
+ buttonDangerSecondaryText: semanticColors.tagRedContentSecondary,
82
+ buttonDangerSecondaryHoverOverlay: semanticColors.hoverOverlayAlpha,
83
+ buttonDangerSecondaryActiveOverlay: semanticColors.pressedOverlayAlpha,
84
+ buttonDangerSecondarySelectedFill: semanticColors.backgroundNegative,
85
+ buttonDangerSecondarySelectedText: semanticColors.contentOnColor,
86
+ buttonDangerSecondaryLoadingFill: semanticColors.backgroundSecondary,
87
+ buttonDangerSecondarySpinnerForeground: semanticColors.backgroundAccent,
88
+ buttonDangerSecondarySpinnerBackground: semanticColors.backgroundPrimary,
89
+ buttonDangerTertiaryFill: 'transparent',
90
+ buttonDangerTertiaryText: semanticColors.tagRedContentSecondary,
91
+ buttonDangerTertiaryHoverOverlay: semanticColors.hoverOverlayAlpha,
92
+ buttonDangerTertiaryActiveOverlay: semanticColors.pressedOverlayAlpha,
93
+ buttonDangerTertiarySelectedFill: semanticColors.backgroundPrimary,
94
+ buttonDangerTertiarySelectedText: semanticColors.tagRedContentSecondary,
95
+ buttonDangerTertiaryLoadingFill: 'transparent',
96
+ buttonDangerTertiarySpinnerForeground: semanticColors.backgroundAccent,
97
+ buttonDangerTertiarySpinnerBackground: semanticColors.backgroundPrimary,
98
+ buttonOutlineFill: 'transparent',
99
+ buttonOutlineText: semanticColors.contentPrimary,
100
+ buttonOutlineHoverOverlay: semanticColors.hoverOverlayAlpha,
101
+ buttonOutlineActiveOverlay: semanticColors.pressedOverlayAlpha,
102
+ buttonOutlineSelectedFill: 'transparent',
103
+ buttonOutlineSelectedText: semanticColors.contentPrimary,
104
+ buttonOutlineFocusFill: semanticColors.backgroundTertiary,
105
+ buttonOutlineLoadingFill: 'transparent',
106
+ buttonOutlineSpinnerForeground: semanticColors.backgroundAccent,
107
+ buttonOutlineSpinnerBackground: semanticColors.backgroundPrimary,
61
108
  buttonDisabledFill: semanticColors.backgroundStateDisabled,
62
109
  buttonDisabledText: semanticColors.contentStateDisabled,
63
110
  buttonDisabledActiveFill: semanticColors.backgroundStateDisabled,
64
111
  buttonDisabledActiveText: semanticColors.contentStateDisabled,
65
112
  buttonDisabledSpinnerForeground: semanticColors.contentStateDisabled,
66
113
  buttonDisabledSpinnerBackground: semanticColors.backgroundPrimary,
114
+ buttonOuterBorder: semanticColors.borderSelected,
115
+ buttonOutlineOuterBorder: semanticColors.borderOpaque,
116
+ buttonDangerTertiaryOuterBorder: semanticColors.tagRedBorderSecondarySelected,
117
+ buttonInnerBorder: semanticColors.contentInversePrimary,
118
+ buttonTransparentBorder: 'transparent',
119
+ buttonFocusOuterBorder: semanticColors.borderAccent,
67
120
  // Breadcrumbs
68
121
  breadcrumbsText: semanticColors.contentPrimary,
69
122
  breadcrumbsSeparatorFill: semanticColors.contentTertiary,