@atlaskit/button 16.1.0 → 16.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 16.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
8
+ - Updated dependencies
9
+
10
+ ## 16.1.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [`c3b0a17a96c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c3b0a17a96c) - Fix spinner colours for disabled, warning and selected states when using tokens
15
+ - Updated dependencies
16
+
17
+ ## 16.1.2
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
23
+ ## 16.1.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 16.1.0
4
30
 
5
31
  ### Minor Changes
@@ -21,6 +21,8 @@ var _analyticsNext = require("@atlaskit/analytics-next");
21
21
 
22
22
  var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-focus"));
23
23
 
24
+ var _colors = require("@atlaskit/theme/colors");
25
+
24
26
  var _blockEvents = _interopRequireDefault(require("./block-events"));
25
27
 
26
28
  var _css = require("./css");
@@ -98,7 +100,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
98
100
  action: 'clicked',
99
101
  componentName: 'button',
100
102
  packageName: "@atlaskit/button",
101
- packageVersion: "16.1.0",
103
+ packageVersion: "16.1.4",
102
104
  analyticsData: analyticsContext
103
105
  }); // Button currently calls preventDefault, which is not standard button behaviour
104
106
 
@@ -120,6 +122,21 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
120
122
  hasOverlay: hasOverlay
121
123
  });
122
124
  var isInteractive = !isDisabled && !hasOverlay;
125
+ /** HACK: Spinner needs to have different colours in the "new" tokens design compared to the old design.
126
+ * For now, while we support both, these styles reach into Spinner when a theme is set, applies the right color.
127
+ * Ticket to remove: https://product-fabric.atlassian.net/browse/DSP-2067
128
+ */
129
+
130
+ var spinnerHackCss = {};
131
+
132
+ if (isSelected || isDisabled || appearance === 'warning') {
133
+ spinnerHackCss = {
134
+ '[data-theme] & svg': {
135
+ stroke: isSelected || isDisabled ? "var(--ds-text-mediumEmphasis, ".concat(_colors.N500, ")") : "var(--ds-text-onBoldWarning, ".concat(_colors.N500, ")")
136
+ }
137
+ };
138
+ }
139
+
123
140
  return (0, _core.jsx)(Component, (0, _extends2.default)({}, rest, {
124
141
  css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss],
125
142
  className: className,
@@ -151,7 +168,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
151
168
  spacing: spacing
152
169
  })]
153
170
  }, iconAfter) : null, overlay ? (0, _core.jsx)("span", {
154
- css: _css.overlayCss
171
+ css: [_css.overlayCss, spinnerHackCss]
155
172
  }, overlay) : null);
156
173
  });
157
174