@atlaskit/button 16.1.2

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 (113) hide show
  1. package/CHANGELOG.md +1485 -0
  2. package/LICENSE +13 -0
  3. package/README.md +13 -0
  4. package/__perf__/button.tsx +19 -0
  5. package/__perf__/custom.tsx +19 -0
  6. package/__perf__/customised.tsx +11 -0
  7. package/__perf__/default.tsx +5 -0
  8. package/__perf__/loading.tsx +5 -0
  9. package/__perf__/utils/example-runner.tsx +48 -0
  10. package/__perf__/utils/interaction-tasks.tsx +98 -0
  11. package/button-group/package.json +7 -0
  12. package/codemods/15.0.0-lite-mode.ts +49 -0
  13. package/codemods/15.1.1-data-testid.ts +173 -0
  14. package/codemods/__tests__/15.0.0-lite-mode/optimistic.ts +646 -0
  15. package/codemods/__tests__/15.0.0-lite-mode/safe.ts +223 -0
  16. package/codemods/__tests__/15.0.0-lite-mode/shared.ts +257 -0
  17. package/codemods/__tests__/15.1.1-data-testid/rename-data-testid.ts +186 -0
  18. package/codemods/__tests__/_framework.ts +47 -0
  19. package/codemods/helpers/15.0.0-runner.ts +169 -0
  20. package/codemods/helpers/helpers-generic.ts +662 -0
  21. package/codemods/optimistic-15.0.0-lite-mode.ts +279 -0
  22. package/codemods/readme.md +1 -0
  23. package/custom-theme-button/package.json +7 -0
  24. package/dist/cjs/button-group.js +50 -0
  25. package/dist/cjs/button.js +104 -0
  26. package/dist/cjs/custom-theme-button/custom-theme-button-types.js +5 -0
  27. package/dist/cjs/custom-theme-button/custom-theme-button.js +229 -0
  28. package/dist/cjs/custom-theme-button/index.js +23 -0
  29. package/dist/cjs/custom-theme-button/theme.js +108 -0
  30. package/dist/cjs/entry-points/button-group.js +15 -0
  31. package/dist/cjs/entry-points/custom-theme-button.js +25 -0
  32. package/dist/cjs/entry-points/loading-button.js +15 -0
  33. package/dist/cjs/entry-points/standard-button.js +15 -0
  34. package/dist/cjs/entry-points/types.js +5 -0
  35. package/dist/cjs/index.js +51 -0
  36. package/dist/cjs/loading-button.js +34 -0
  37. package/dist/cjs/shared/block-events.js +44 -0
  38. package/dist/cjs/shared/button-base.js +158 -0
  39. package/dist/cjs/shared/colors.js +409 -0
  40. package/dist/cjs/shared/css.js +265 -0
  41. package/dist/cjs/shared/get-is-only-single-icon.js +26 -0
  42. package/dist/cjs/shared/loading-spinner.js +45 -0
  43. package/dist/cjs/types.js +5 -0
  44. package/dist/cjs/version.json +5 -0
  45. package/dist/es2019/button-group.js +36 -0
  46. package/dist/es2019/button.js +69 -0
  47. package/dist/es2019/custom-theme-button/custom-theme-button-types.js +1 -0
  48. package/dist/es2019/custom-theme-button/custom-theme-button.js +164 -0
  49. package/dist/es2019/custom-theme-button/index.js +2 -0
  50. package/dist/es2019/custom-theme-button/theme.js +81 -0
  51. package/dist/es2019/entry-points/button-group.js +1 -0
  52. package/dist/es2019/entry-points/custom-theme-button.js +1 -0
  53. package/dist/es2019/entry-points/loading-button.js +1 -0
  54. package/dist/es2019/entry-points/standard-button.js +1 -0
  55. package/dist/es2019/entry-points/types.js +1 -0
  56. package/dist/es2019/index.js +6 -0
  57. package/dist/es2019/loading-button.js +17 -0
  58. package/dist/es2019/shared/block-events.js +37 -0
  59. package/dist/es2019/shared/button-base.js +127 -0
  60. package/dist/es2019/shared/colors.js +393 -0
  61. package/dist/es2019/shared/css.js +249 -0
  62. package/dist/es2019/shared/get-is-only-single-icon.js +19 -0
  63. package/dist/es2019/shared/loading-spinner.js +33 -0
  64. package/dist/es2019/types.js +1 -0
  65. package/dist/es2019/version.json +5 -0
  66. package/dist/esm/button-group.js +35 -0
  67. package/dist/esm/button.js +79 -0
  68. package/dist/esm/custom-theme-button/custom-theme-button-types.js +1 -0
  69. package/dist/esm/custom-theme-button/custom-theme-button.js +203 -0
  70. package/dist/esm/custom-theme-button/index.js +2 -0
  71. package/dist/esm/custom-theme-button/theme.js +90 -0
  72. package/dist/esm/entry-points/button-group.js +1 -0
  73. package/dist/esm/entry-points/custom-theme-button.js +1 -0
  74. package/dist/esm/entry-points/loading-button.js +1 -0
  75. package/dist/esm/entry-points/standard-button.js +1 -0
  76. package/dist/esm/entry-points/types.js +1 -0
  77. package/dist/esm/index.js +6 -0
  78. package/dist/esm/loading-button.js +19 -0
  79. package/dist/esm/shared/block-events.js +36 -0
  80. package/dist/esm/shared/button-base.js +135 -0
  81. package/dist/esm/shared/colors.js +393 -0
  82. package/dist/esm/shared/css.js +245 -0
  83. package/dist/esm/shared/get-is-only-single-icon.js +19 -0
  84. package/dist/esm/shared/loading-spinner.js +35 -0
  85. package/dist/esm/types.js +1 -0
  86. package/dist/esm/version.json +5 -0
  87. package/dist/types/button-group.d.ts +18 -0
  88. package/dist/types/button.d.ts +8 -0
  89. package/dist/types/custom-theme-button/custom-theme-button-types.d.ts +21 -0
  90. package/dist/types/custom-theme-button/custom-theme-button.d.ts +6 -0
  91. package/dist/types/custom-theme-button/index.d.ts +2 -0
  92. package/dist/types/custom-theme-button/theme.d.ts +21 -0
  93. package/dist/types/entry-points/button-group.d.ts +1 -0
  94. package/dist/types/entry-points/custom-theme-button.d.ts +2 -0
  95. package/dist/types/entry-points/loading-button.d.ts +2 -0
  96. package/dist/types/entry-points/standard-button.d.ts +2 -0
  97. package/dist/types/entry-points/types.d.ts +4 -0
  98. package/dist/types/index.d.ts +8 -0
  99. package/dist/types/loading-button.d.ts +11 -0
  100. package/dist/types/shared/block-events.d.ts +3 -0
  101. package/dist/types/shared/button-base.d.ts +10 -0
  102. package/dist/types/shared/colors.d.ts +31 -0
  103. package/dist/types/shared/css.d.ts +22 -0
  104. package/dist/types/shared/get-is-only-single-icon.d.ts +2 -0
  105. package/dist/types/shared/loading-spinner.d.ts +4 -0
  106. package/dist/types/types.d.ts +51 -0
  107. package/extract-react-types/custom-theme-button-props.tsx +7 -0
  108. package/extract-react-types/loading-button-props.tsx +5 -0
  109. package/extract-react-types/shared-props.tsx +5 -0
  110. package/loading-button/package.json +7 -0
  111. package/package.json +83 -0
  112. package/standard-button/package.json +7 -0
  113. package/types/package.json +7 -0
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ Object.defineProperty(exports, "default", {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _standardButton.default;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "LoadingButton", {
17
+ enumerable: true,
18
+ get: function get() {
19
+ return _loadingButton.default;
20
+ }
21
+ });
22
+ Object.defineProperty(exports, "CustomThemeButton", {
23
+ enumerable: true,
24
+ get: function get() {
25
+ return _customThemeButton.default;
26
+ }
27
+ });
28
+ Object.defineProperty(exports, "Theme", {
29
+ enumerable: true,
30
+ get: function get() {
31
+ return _customThemeButton.Theme;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "ButtonGroup", {
35
+ enumerable: true,
36
+ get: function get() {
37
+ return _buttonGroup.default;
38
+ }
39
+ });
40
+
41
+ var _standardButton = _interopRequireDefault(require("./entry-points/standard-button"));
42
+
43
+ var _loadingButton = _interopRequireDefault(require("./entry-points/loading-button"));
44
+
45
+ var _customThemeButton = _interopRequireWildcard(require("./entry-points/custom-theme-button"));
46
+
47
+ var _buttonGroup = _interopRequireDefault(require("./entry-points/button-group"));
48
+
49
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
50
+
51
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _button = _interopRequireDefault(require("./button"));
17
+
18
+ var _loadingSpinner = _interopRequireDefault(require("./shared/loading-spinner"));
19
+
20
+ var LoadingButton = /*#__PURE__*/_react.default.forwardRef(function LoadingButton(_ref, ref) {
21
+ var _ref$isLoading = _ref.isLoading,
22
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
23
+ rest = (0, _objectWithoutProperties2.default)(_ref, ["isLoading"]);
24
+ // Button already has React.memo, so just leaning on that
25
+ return /*#__PURE__*/_react.default.createElement(_button.default, (0, _extends2.default)({}, rest, {
26
+ ref: ref,
27
+ overlay: isLoading ? /*#__PURE__*/_react.default.createElement(_loadingSpinner.default, rest) : null
28
+ }));
29
+ }); // Tools including enzyme rely on components having a display name
30
+
31
+
32
+ LoadingButton.displayName = 'LoadingButton';
33
+ var _default = LoadingButton;
34
+ exports.default = _default;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = blockEvents;
7
+
8
+ function abort(event) {
9
+ event.preventDefault();
10
+ event.stopPropagation();
11
+ }
12
+
13
+ var tabKeyCode = 9;
14
+
15
+ function onKey(event) {
16
+ // Allowing tab so that a user can move focus away
17
+ if (event.keyCode === tabKeyCode) {
18
+ return;
19
+ }
20
+
21
+ abort(event);
22
+ }
23
+
24
+ var block = {
25
+ onMouseDownCapture: abort,
26
+ onMouseUpCapture: abort,
27
+ // because we have tabIndex = -1 when disabled,
28
+ // keyboard events can only occur when there is an overlay
29
+ onKeyDownCapture: onKey,
30
+ onKeyUpCapture: onKey,
31
+ onTouchStartCapture: abort,
32
+ onTouchEndCapture: abort,
33
+ onPointerDownCapture: abort,
34
+ onPointerUpCapture: abort,
35
+ onClickCapture: abort,
36
+ // Just smashing the existing onClick for good measure
37
+ onClick: abort
38
+ };
39
+ var doNotBlock = {};
40
+
41
+ function blockEvents(_ref) {
42
+ var isInteractive = _ref.isInteractive;
43
+ return isInteractive ? doNotBlock : block;
44
+ }
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.default = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
+
16
+ var _react = _interopRequireWildcard(require("react"));
17
+
18
+ var _core = require("@emotion/core");
19
+
20
+ var _analyticsNext = require("@atlaskit/analytics-next");
21
+
22
+ var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-focus"));
23
+
24
+ var _blockEvents = _interopRequireDefault(require("./block-events"));
25
+
26
+ var _css = require("./css");
27
+
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
32
+ /** @jsx jsx */
33
+ function noop() {} // Disabled buttons will still publish events for nested elements in webkit.
34
+ // We are disabling pointer events on child elements so that
35
+ // the button will always be the target of events
36
+ // Note: firefox does not have this behaviour for child elements
37
+
38
+
39
+ var noPointerEventsOnChildrenCss = {
40
+ '> *': {
41
+ pointerEvents: 'none'
42
+ }
43
+ };
44
+
45
+ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props, ref) {
46
+ var _props$appearance = props.appearance,
47
+ appearance = _props$appearance === void 0 ? 'default' : _props$appearance,
48
+ buttonCss = props.buttonCss,
49
+ _props$spacing = props.spacing,
50
+ spacing = _props$spacing === void 0 ? 'default' : _props$spacing,
51
+ _props$autoFocus = props.autoFocus,
52
+ autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
53
+ _props$isDisabled = props.isDisabled,
54
+ isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
55
+ _props$shouldFitConta = props.shouldFitContainer,
56
+ shouldFitContainer = _props$shouldFitConta === void 0 ? false : _props$shouldFitConta,
57
+ _props$isSelected = props.isSelected,
58
+ isSelected = _props$isSelected === void 0 ? false : _props$isSelected,
59
+ iconBefore = props.iconBefore,
60
+ iconAfter = props.iconAfter,
61
+ children = props.children,
62
+ className = props.className,
63
+ href = props.href,
64
+ overlay = props.overlay,
65
+ _props$tabIndex = props.tabIndex,
66
+ tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
67
+ _props$type = props.type,
68
+ type = _props$type === void 0 ? !href ? 'button' : undefined : _props$type,
69
+ _props$onMouseDown = props.onMouseDown,
70
+ providedOnMouseDown = _props$onMouseDown === void 0 ? noop : _props$onMouseDown,
71
+ _props$onClick = props.onClick,
72
+ providedOnClick = _props$onClick === void 0 ? noop : _props$onClick,
73
+ _props$component = props.component,
74
+ Component = _props$component === void 0 ? href ? 'a' : 'button' : _props$component,
75
+ testId = props.testId,
76
+ analyticsContext = props.analyticsContext,
77
+ rest = (0, _objectWithoutProperties2.default)(props, ["appearance", "buttonCss", "spacing", "autoFocus", "isDisabled", "shouldFitContainer", "isSelected", "iconBefore", "iconAfter", "children", "className", "href", "overlay", "tabIndex", "type", "onMouseDown", "onClick", "component", "testId", "analyticsContext"]);
78
+ var ourRef = (0, _react.useRef)();
79
+ var setRef = (0, _react.useCallback)(function (node) {
80
+ ourRef.current = node;
81
+
82
+ if (ref == null) {
83
+ return;
84
+ }
85
+
86
+ if (typeof ref === 'function') {
87
+ ref(node);
88
+ return;
89
+ } // @ts-ignore
90
+
91
+
92
+ ref.current = node;
93
+ }, [ourRef, ref]); // Cross browser auto focusing is pretty broken, so we are doing it ourselves
94
+
95
+ (0, _useAutoFocus.default)(ourRef, autoFocus);
96
+ var onClick = (0, _analyticsNext.usePlatformLeafEventHandler)({
97
+ fn: providedOnClick,
98
+ action: 'clicked',
99
+ componentName: 'button',
100
+ packageName: "@atlaskit/button",
101
+ packageVersion: "16.1.2",
102
+ analyticsData: analyticsContext
103
+ }); // Button currently calls preventDefault, which is not standard button behaviour
104
+
105
+ var onMouseDown = (0, _react.useCallback)(function (event) {
106
+ event.preventDefault();
107
+ providedOnMouseDown(event);
108
+ }, [providedOnMouseDown]); // Lose focus when becoming disabled (standard button behaviour)
109
+
110
+ (0, _react.useEffect)(function () {
111
+ var el = ourRef.current;
112
+
113
+ if (isDisabled && el && el === document.activeElement) {
114
+ el.blur();
115
+ }
116
+ }, [isDisabled]); // we are 'disabling' input with a button when there is an overlay
117
+
118
+ var hasOverlay = Boolean(overlay);
119
+ var fadeCss = (0, _css.getFadingCss)({
120
+ hasOverlay: hasOverlay
121
+ });
122
+ var isInteractive = !isDisabled && !hasOverlay;
123
+ return (0, _core.jsx)(Component, (0, _extends2.default)({}, rest, {
124
+ css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss],
125
+ className: className,
126
+ ref: setRef,
127
+ onClick: onClick,
128
+ onMouseDown: onMouseDown,
129
+ disabled: isDisabled,
130
+ href: isInteractive ? href : undefined // using undefined so that the property doesn't exist when false
131
+ ,
132
+ "data-has-overlay": hasOverlay ? true : undefined,
133
+ "data-testid": testId,
134
+ type: type // Adding a tab index so element is always focusable, even when not a <button> or <a>
135
+ // Disabling focus via keyboard navigation when disabled
136
+ // as this is standard button behaviour
137
+ ,
138
+ tabIndex: isDisabled ? -1 : tabIndex
139
+ }, (0, _blockEvents.default)({
140
+ isInteractive: isInteractive
141
+ })), iconBefore ? (0, _core.jsx)("span", {
142
+ css: [fadeCss, (0, _css.getIconStyle)({
143
+ spacing: spacing
144
+ })]
145
+ }, iconBefore) : null, children ? (0, _core.jsx)("span", {
146
+ css: [fadeCss, (0, _css.getContentStyle)({
147
+ spacing: spacing
148
+ })]
149
+ }, children) : null, iconAfter ? (0, _core.jsx)("span", {
150
+ css: [fadeCss, (0, _css.getIconStyle)({
151
+ spacing: spacing
152
+ })]
153
+ }, iconAfter) : null, overlay ? (0, _core.jsx)("span", {
154
+ css: _css.overlayCss
155
+ }, overlay) : null);
156
+ });
157
+
158
+ exports.default = _default;
@@ -0,0 +1,409 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
11
+
12
+ var _tokens = require("@atlaskit/tokens");
13
+
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
18
+ // Hard coding the active rgba color value rather than using a helper to convert it
19
+ // With helper it would be: hex2rgba(colors.B75, 0.6)
20
+ var fadedB75 = 'rgba(179, 212, 255, 0.6)';
21
+ var values = {
22
+ // Default appearance
23
+ background: {
24
+ default: {
25
+ default: {
26
+ light: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.N20A),
27
+ dark: (0, _tokens.token)('color.background.subtleNeutral.resting', colors.DN70)
28
+ },
29
+ hover: {
30
+ light: (0, _tokens.token)('color.background.subtleNeutral.hover', colors.N30A),
31
+ dark: (0, _tokens.token)('color.background.subtleNeutral.hover', colors.DN60)
32
+ },
33
+ active: {
34
+ light: (0, _tokens.token)('color.background.subtleNeutral.pressed', fadedB75),
35
+ dark: (0, _tokens.token)('color.background.subtleNeutral.pressed', colors.B75)
36
+ },
37
+ disabled: {
38
+ light: (0, _tokens.token)('color.background.disabled', colors.N20A),
39
+ dark: (0, _tokens.token)('color.background.disabled', colors.DN70)
40
+ },
41
+ selected: {
42
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
43
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
44
+ },
45
+ focusSelected: {
46
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
47
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
48
+ }
49
+ },
50
+ primary: {
51
+ default: {
52
+ light: (0, _tokens.token)('color.background.boldBrand.resting', colors.B400),
53
+ dark: (0, _tokens.token)('color.background.boldBrand.resting', colors.B100)
54
+ },
55
+ hover: {
56
+ light: (0, _tokens.token)('color.background.boldBrand.hover', colors.B300),
57
+ dark: (0, _tokens.token)('color.background.boldBrand.hover', colors.B75)
58
+ },
59
+ active: {
60
+ light: (0, _tokens.token)('color.background.boldBrand.pressed', colors.B500),
61
+ dark: (0, _tokens.token)('color.background.boldBrand.pressed', colors.B200)
62
+ },
63
+ disabled: {
64
+ light: (0, _tokens.token)('color.background.disabled', colors.N20A),
65
+ dark: (0, _tokens.token)('color.background.disabled', colors.DN70)
66
+ },
67
+ selected: {
68
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
69
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
70
+ },
71
+ focusSelected: {
72
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
73
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
74
+ }
75
+ },
76
+ warning: {
77
+ default: {
78
+ light: (0, _tokens.token)('color.background.boldWarning.resting', colors.Y300),
79
+ dark: (0, _tokens.token)('color.background.boldWarning.resting', colors.Y300)
80
+ },
81
+ hover: {
82
+ light: (0, _tokens.token)('color.background.boldWarning.hover', colors.Y200),
83
+ dark: (0, _tokens.token)('color.background.boldWarning.hover', colors.Y200)
84
+ },
85
+ active: {
86
+ light: (0, _tokens.token)('color.background.boldWarning.pressed', colors.Y400),
87
+ dark: (0, _tokens.token)('color.background.boldWarning.pressed', colors.Y400)
88
+ },
89
+ disabled: {
90
+ light: (0, _tokens.token)('color.background.disabled', colors.N20A),
91
+ dark: (0, _tokens.token)('color.background.disabled', colors.DN70)
92
+ },
93
+ selected: {
94
+ light: (0, _tokens.token)('color.background.selected.resting', colors.Y400),
95
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.Y400)
96
+ },
97
+ focusSelected: {
98
+ light: (0, _tokens.token)('color.background.selected.resting', colors.Y400),
99
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.Y400)
100
+ }
101
+ },
102
+ danger: {
103
+ default: {
104
+ light: (0, _tokens.token)('color.background.boldDanger.resting', colors.R400),
105
+ dark: (0, _tokens.token)('color.background.boldDanger.resting', colors.R400)
106
+ },
107
+ hover: {
108
+ light: (0, _tokens.token)('color.background.boldDanger.hover', colors.R300),
109
+ dark: (0, _tokens.token)('color.background.boldDanger.hover', colors.R300)
110
+ },
111
+ active: {
112
+ light: (0, _tokens.token)('color.background.boldDanger.pressed', colors.R500),
113
+ dark: (0, _tokens.token)('color.background.boldDanger.pressed', colors.R500)
114
+ },
115
+ disabled: {
116
+ light: (0, _tokens.token)('color.background.disabled', colors.N20A),
117
+ dark: (0, _tokens.token)('color.background.disabled', colors.DN70)
118
+ },
119
+ selected: {
120
+ light: (0, _tokens.token)('color.background.selected.resting', colors.R500),
121
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.R500)
122
+ },
123
+ focusSelected: {
124
+ light: (0, _tokens.token)('color.background.selected.resting', colors.R500),
125
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.R500)
126
+ }
127
+ },
128
+ link: {
129
+ default: {
130
+ light: 'none',
131
+ dark: 'none'
132
+ },
133
+ selected: {
134
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
135
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.N20)
136
+ },
137
+ focusSelected: {
138
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
139
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.N20)
140
+ }
141
+ },
142
+ subtle: {
143
+ default: {
144
+ light: 'none',
145
+ dark: 'none'
146
+ },
147
+ hover: {
148
+ light: (0, _tokens.token)('color.background.transparentNeutral.hover', colors.N30A),
149
+ dark: (0, _tokens.token)('color.background.transparentNeutral.hover', colors.DN60)
150
+ },
151
+ active: {
152
+ light: (0, _tokens.token)('color.background.transparentNeutral.pressed', fadedB75),
153
+ dark: (0, _tokens.token)('color.background.transparentNeutral.pressed', colors.B75)
154
+ },
155
+ disabled: {
156
+ light: 'none',
157
+ dark: 'none'
158
+ },
159
+ selected: {
160
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
161
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
162
+ },
163
+ focusSelected: {
164
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
165
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.DN0)
166
+ }
167
+ },
168
+ 'subtle-link': {
169
+ default: {
170
+ light: 'none',
171
+ dark: 'none'
172
+ },
173
+ selected: {
174
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
175
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.N20)
176
+ },
177
+ focusSelected: {
178
+ light: (0, _tokens.token)('color.background.selected.resting', colors.N700),
179
+ dark: (0, _tokens.token)('color.background.selected.resting', colors.N20)
180
+ }
181
+ }
182
+ },
183
+ boxShadowColor: {
184
+ default: {
185
+ focus: {
186
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
187
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
188
+ },
189
+ focusSelected: {
190
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
191
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
192
+ }
193
+ },
194
+ primary: {
195
+ focus: {
196
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
197
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
198
+ },
199
+ focusSelected: {
200
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
201
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
202
+ }
203
+ },
204
+ warning: {
205
+ focus: {
206
+ light: (0, _tokens.token)('color.border.focus', colors.Y500),
207
+ dark: (0, _tokens.token)('color.border.focus', colors.Y500)
208
+ },
209
+ focusSelected: {
210
+ light: (0, _tokens.token)('color.border.focus', colors.Y500),
211
+ dark: (0, _tokens.token)('color.border.focus', colors.Y500)
212
+ }
213
+ },
214
+ danger: {
215
+ focus: {
216
+ light: (0, _tokens.token)('color.border.focus', colors.R100),
217
+ dark: (0, _tokens.token)('color.border.focus', colors.R100)
218
+ },
219
+ focusSelected: {
220
+ light: (0, _tokens.token)('color.border.focus', colors.R100),
221
+ dark: (0, _tokens.token)('color.border.focus', colors.R100)
222
+ }
223
+ },
224
+ link: {
225
+ focus: {
226
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
227
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
228
+ },
229
+ focusSelected: {
230
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
231
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
232
+ }
233
+ },
234
+ subtle: {
235
+ focus: {
236
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
237
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
238
+ },
239
+ focusSelected: {
240
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
241
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
242
+ }
243
+ },
244
+ 'subtle-link': {
245
+ focus: {
246
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
247
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
248
+ },
249
+ focusSelected: {
250
+ light: (0, _tokens.token)('color.border.focus', colors.B100),
251
+ dark: (0, _tokens.token)('color.border.focus', colors.B75)
252
+ }
253
+ }
254
+ },
255
+ color: {
256
+ default: {
257
+ default: {
258
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N500),
259
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.DN400)
260
+ },
261
+ active: {
262
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.B400),
263
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.B400)
264
+ },
265
+ disabled: {
266
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
267
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
268
+ },
269
+ selected: {
270
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
271
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
272
+ },
273
+ focusSelected: {
274
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
275
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
276
+ }
277
+ },
278
+ primary: {
279
+ default: {
280
+ light: (0, _tokens.token)('color.text.onBold', colors.N0),
281
+ dark: (0, _tokens.token)('color.text.onBold', colors.DN30)
282
+ },
283
+ disabled: {
284
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
285
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
286
+ },
287
+ selected: {
288
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
289
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
290
+ },
291
+ focusSelected: {
292
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
293
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
294
+ }
295
+ },
296
+ warning: {
297
+ default: {
298
+ light: (0, _tokens.token)('color.text.onBoldWarning', colors.N800),
299
+ dark: (0, _tokens.token)('color.text.onBoldWarning', colors.N800)
300
+ },
301
+ disabled: {
302
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
303
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
304
+ },
305
+ selected: {
306
+ light: (0, _tokens.token)('color.text.selected', colors.N800),
307
+ dark: (0, _tokens.token)('color.text.selected', colors.N800)
308
+ },
309
+ focusSelected: {
310
+ light: (0, _tokens.token)('color.text.selected', colors.N800),
311
+ dark: (0, _tokens.token)('color.text.selected', colors.N800)
312
+ }
313
+ },
314
+ danger: {
315
+ default: {
316
+ light: (0, _tokens.token)('color.text.onBold', colors.N0),
317
+ dark: (0, _tokens.token)('color.text.onBold', colors.N0)
318
+ },
319
+ disabled: {
320
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
321
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN30)
322
+ },
323
+ selected: {
324
+ light: (0, _tokens.token)('color.text.selected', colors.N0),
325
+ dark: (0, _tokens.token)('color.text.selected', colors.N0)
326
+ },
327
+ focusSelected: {
328
+ light: (0, _tokens.token)('color.text.selected', colors.N0),
329
+ dark: (0, _tokens.token)('color.text.selected', colors.N0)
330
+ }
331
+ },
332
+ link: {
333
+ default: {
334
+ light: (0, _tokens.token)('color.text.link.resting', colors.B400),
335
+ dark: (0, _tokens.token)('color.text.link.resting', colors.B100)
336
+ },
337
+ hover: {
338
+ light: (0, _tokens.token)('color.text.link.resting', colors.B300),
339
+ dark: (0, _tokens.token)('color.text.link.resting', colors.B75)
340
+ },
341
+ active: {
342
+ light: (0, _tokens.token)('color.text.link.pressed', colors.B500),
343
+ dark: (0, _tokens.token)('color.text.link.pressed', colors.B200)
344
+ },
345
+ disabled: {
346
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
347
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN100)
348
+ },
349
+ selected: {
350
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
351
+ dark: (0, _tokens.token)('color.text.selected', colors.N700)
352
+ },
353
+ focusSelected: {
354
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
355
+ dark: (0, _tokens.token)('color.text.selected', colors.N700)
356
+ }
357
+ },
358
+ subtle: {
359
+ default: {
360
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N500),
361
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.DN400)
362
+ },
363
+ active: {
364
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.B400),
365
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.B400)
366
+ },
367
+ disabled: {
368
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
369
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN100)
370
+ },
371
+ selected: {
372
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
373
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
374
+ },
375
+ focusSelected: {
376
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
377
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
378
+ }
379
+ },
380
+ 'subtle-link': {
381
+ default: {
382
+ light: (0, _tokens.token)('color.text.mediumEmphasis', colors.N200),
383
+ dark: (0, _tokens.token)('color.text.mediumEmphasis', colors.DN400)
384
+ },
385
+ hover: {
386
+ light: (0, _tokens.token)('color.text.mediumEmphasis', colors.N90),
387
+ dark: (0, _tokens.token)('color.text.mediumEmphasis', colors.B50)
388
+ },
389
+ active: {
390
+ light: (0, _tokens.token)('color.text.highEmphasis', colors.N400),
391
+ dark: (0, _tokens.token)('color.text.highEmphasis', colors.DN300)
392
+ },
393
+ disabled: {
394
+ light: (0, _tokens.token)('color.text.disabled', colors.N70),
395
+ dark: (0, _tokens.token)('color.text.disabled', colors.DN100)
396
+ },
397
+ selected: {
398
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
399
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
400
+ },
401
+ focusSelected: {
402
+ light: (0, _tokens.token)('color.text.selected', colors.N20),
403
+ dark: (0, _tokens.token)('color.text.selected', colors.DN400)
404
+ }
405
+ }
406
+ }
407
+ };
408
+ var _default = values;
409
+ exports.default = _default;