@atlaskit/button 16.5.6 → 16.6.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.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/custom-theme-button/theme.js +1 -1
- package/dist/cjs/shared/button-base.js +6 -5
- package/dist/cjs/shared/colors.js +0 -72
- package/dist/cjs/shared/css.js +1 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/custom-theme-button/theme.js +1 -1
- package/dist/es2019/shared/button-base.js +6 -5
- package/dist/es2019/shared/colors.js +0 -72
- package/dist/es2019/shared/css.js +1 -13
- package/dist/es2019/version.json +1 -1
- package/dist/esm/custom-theme-button/theme.js +1 -1
- package/dist/esm/shared/button-base.js +6 -5
- package/dist/esm/shared/colors.js +0 -72
- package/dist/esm/shared/css.js +1 -12
- package/dist/esm/version.json +1 -1
- package/dist/types/shared/colors.d.ts +0 -8
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 16.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3367210dce8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3367210dce8) - [ux] Internal change to the way focus is rendered for buttons.
|
|
8
|
+
Focus states now apply a 2px offset to the focus ring to aid the contrast of the focus state when applied on the 'primary' and 'selected' buttons.
|
|
9
|
+
As part of this change, and to settle on a more systemic approach to focus, button also no longer applies a different colored shadow per appearance.
|
|
10
|
+
|
|
11
|
+
## 16.5.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`729e45efa7f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/729e45efa7f) - [ux] Fix a bug where the incorrect design tokens were used for the color of spinners in warning, disabled and selected buttons
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 16.5.6
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -81,7 +81,7 @@ function getCustomCss(_ref) {
|
|
|
81
81
|
// To do this we are overwriting all pseudo selectors
|
|
82
82
|
function getSpecifiers(styles) {
|
|
83
83
|
return {
|
|
84
|
-
'&, &:hover, &:active, &:focus, &:visited, &:disabled, &[disabled]': styles
|
|
84
|
+
'&, &:hover, &:active, &:focus, &:focus-visible, &:visited, &:disabled, &[disabled]': styles
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
function defaultThemeFn(current, values) {
|
|
@@ -13,6 +13,7 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
14
14
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
15
15
|
var _useAutoFocus = _interopRequireDefault(require("@atlaskit/ds-lib/use-auto-focus"));
|
|
16
|
+
var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
16
17
|
var _interactionContext = _interopRequireDefault(require("@atlaskit/interaction-context"));
|
|
17
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
19
|
var _blockEvents = _interopRequireDefault(require("./block-events"));
|
|
@@ -90,7 +91,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
|
|
|
90
91
|
action: 'clicked',
|
|
91
92
|
componentName: 'button',
|
|
92
93
|
packageName: "@atlaskit/button",
|
|
93
|
-
packageVersion: "16.
|
|
94
|
+
packageVersion: "16.6.0",
|
|
94
95
|
analyticsData: analyticsContext
|
|
95
96
|
});
|
|
96
97
|
|
|
@@ -123,12 +124,12 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
|
|
|
123
124
|
var spinnerHackCss = {};
|
|
124
125
|
if (isSelected || isDisabled || appearance === 'warning') {
|
|
125
126
|
spinnerHackCss = {
|
|
126
|
-
'[data-theme] &
|
|
127
|
-
stroke: isSelected || isDisabled ? "var(--ds-
|
|
127
|
+
'[data-theme] & circle': {
|
|
128
|
+
stroke: "".concat(isSelected || isDisabled ? "var(--ds-icon-subtle, ".concat(_colors.N500, ")") : "var(--ds-icon-warning-inverse, ".concat(_colors.N500, ")"), " !important")
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
}
|
|
131
|
-
return (0, _react2.jsx)(Component, (0, _extends2.default)({}, rest, {
|
|
132
|
+
return (0, _react2.jsx)(_focusRing.default, null, (0, _react2.jsx)(Component, (0, _extends2.default)({}, rest, {
|
|
132
133
|
css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss],
|
|
133
134
|
className: className,
|
|
134
135
|
ref: setRef,
|
|
@@ -162,6 +163,6 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
|
|
|
162
163
|
})]
|
|
163
164
|
}, iconAfter) : null, overlay ? (0, _react2.jsx)("span", {
|
|
164
165
|
css: [_css.overlayCss, spinnerHackCss]
|
|
165
|
-
}, overlay) : null);
|
|
166
|
+
}, overlay) : null));
|
|
166
167
|
});
|
|
167
168
|
exports.default = _default;
|
|
@@ -173,78 +173,6 @@ var values = {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
|
-
boxShadowColor: {
|
|
177
|
-
default: {
|
|
178
|
-
focus: {
|
|
179
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
180
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
181
|
-
},
|
|
182
|
-
focusSelected: {
|
|
183
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
184
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
primary: {
|
|
188
|
-
focus: {
|
|
189
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
190
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
191
|
-
},
|
|
192
|
-
focusSelected: {
|
|
193
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
194
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
warning: {
|
|
198
|
-
focus: {
|
|
199
|
-
light: "var(--ds-border-focused, ".concat(colors.Y500, ")"),
|
|
200
|
-
dark: "var(--ds-border-focused, ".concat(colors.Y500, ")")
|
|
201
|
-
},
|
|
202
|
-
focusSelected: {
|
|
203
|
-
light: "var(--ds-border-focused, ".concat(colors.Y500, ")"),
|
|
204
|
-
dark: "var(--ds-border-focused, ".concat(colors.Y500, ")")
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
danger: {
|
|
208
|
-
focus: {
|
|
209
|
-
light: "var(--ds-border-focused, ".concat(colors.R100, ")"),
|
|
210
|
-
dark: "var(--ds-border-focused, ".concat(colors.R100, ")")
|
|
211
|
-
},
|
|
212
|
-
focusSelected: {
|
|
213
|
-
light: "var(--ds-border-focused, ".concat(colors.R100, ")"),
|
|
214
|
-
dark: "var(--ds-border-focused, ".concat(colors.R100, ")")
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
link: {
|
|
218
|
-
focus: {
|
|
219
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
220
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
221
|
-
},
|
|
222
|
-
focusSelected: {
|
|
223
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
224
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
225
|
-
}
|
|
226
|
-
},
|
|
227
|
-
subtle: {
|
|
228
|
-
focus: {
|
|
229
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
230
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
231
|
-
},
|
|
232
|
-
focusSelected: {
|
|
233
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
234
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
'subtle-link': {
|
|
238
|
-
focus: {
|
|
239
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
240
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
241
|
-
},
|
|
242
|
-
focusSelected: {
|
|
243
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
244
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
},
|
|
248
176
|
color: {
|
|
249
177
|
default: {
|
|
250
178
|
default: {
|
package/dist/cjs/shared/css.js
CHANGED
|
@@ -143,17 +143,6 @@ function getCss(_ref3) {
|
|
|
143
143
|
// background, box-shadow
|
|
144
144
|
transitionDuration: '0s, 0.15s'
|
|
145
145
|
}),
|
|
146
|
-
'&:focus': _objectSpread(_objectSpread({}, getColors({
|
|
147
|
-
appearance: appearance,
|
|
148
|
-
key: isSelected ? 'focusSelected' : 'focus',
|
|
149
|
-
mode: mode
|
|
150
|
-
})), {}, {
|
|
151
|
-
boxShadow: "0 0 0 2px ".concat(_colors.default.boxShadowColor[appearance].focus[mode]),
|
|
152
|
-
// background, box-shadow
|
|
153
|
-
transitionDuration: '0s, 0.2s',
|
|
154
|
-
// disabling browser focus outline
|
|
155
|
-
outline: 'none'
|
|
156
|
-
}),
|
|
157
146
|
// giving active styles preference by listing them after focus
|
|
158
147
|
'&:active': _objectSpread(_objectSpread({}, getColors({
|
|
159
148
|
appearance: appearance,
|
|
@@ -207,9 +196,9 @@ function getIconStyle(_ref4) {
|
|
|
207
196
|
var spacing = _ref4.spacing;
|
|
208
197
|
return (0, _react.css)({
|
|
209
198
|
display: 'flex',
|
|
199
|
+
// icon size cannot grow and shrink
|
|
210
200
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
211
201
|
margin: spacing === 'none' ? 0 : innerMargin.icon,
|
|
212
|
-
// icon size cannot grow and shrink
|
|
213
202
|
flexGrow: 0,
|
|
214
203
|
flexShrink: 0,
|
|
215
204
|
alignSelf: 'center',
|
package/dist/cjs/version.json
CHANGED
|
@@ -69,7 +69,7 @@ export function getCustomCss({
|
|
|
69
69
|
// To do this we are overwriting all pseudo selectors
|
|
70
70
|
export function getSpecifiers(styles) {
|
|
71
71
|
return {
|
|
72
|
-
'&, &:hover, &:active, &:focus, &:visited, &:disabled, &[disabled]': styles
|
|
72
|
+
'&, &:hover, &:active, &:focus, &:focus-visible, &:visited, &:disabled, &[disabled]': styles
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
export function defaultThemeFn(current, values) {
|
|
@@ -5,6 +5,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
5
5
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
6
6
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
7
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
8
|
+
import FocusRing from '@atlaskit/focus-ring';
|
|
8
9
|
// eslint-disable-next-line no-duplicate-imports
|
|
9
10
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
10
11
|
import { N500 } from '@atlaskit/theme/colors';
|
|
@@ -75,7 +76,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
75
76
|
action: 'clicked',
|
|
76
77
|
componentName: 'button',
|
|
77
78
|
packageName: "@atlaskit/button",
|
|
78
|
-
packageVersion: "16.
|
|
79
|
+
packageVersion: "16.6.0",
|
|
79
80
|
analyticsData: analyticsContext
|
|
80
81
|
});
|
|
81
82
|
|
|
@@ -108,12 +109,12 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
108
109
|
var spinnerHackCss = {};
|
|
109
110
|
if (isSelected || isDisabled || appearance === 'warning') {
|
|
110
111
|
spinnerHackCss = {
|
|
111
|
-
'[data-theme] &
|
|
112
|
-
stroke: isSelected || isDisabled ? `var(--ds-
|
|
112
|
+
'[data-theme] & circle': {
|
|
113
|
+
stroke: `${isSelected || isDisabled ? `var(--ds-icon-subtle, ${N500})` : `var(--ds-icon-warning-inverse, ${N500})`} !important`
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
|
-
return jsx(Component, _extends({}, rest, {
|
|
117
|
+
return jsx(FocusRing, null, jsx(Component, _extends({}, rest, {
|
|
117
118
|
css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss],
|
|
118
119
|
className: className,
|
|
119
120
|
ref: setRef,
|
|
@@ -147,5 +148,5 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
147
148
|
})]
|
|
148
149
|
}, iconAfter) : null, overlay ? jsx("span", {
|
|
149
150
|
css: [overlayCss, spinnerHackCss]
|
|
150
|
-
}, overlay) : null);
|
|
151
|
+
}, overlay) : null));
|
|
151
152
|
});
|
|
@@ -164,78 +164,6 @@ const values = {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
boxShadowColor: {
|
|
168
|
-
default: {
|
|
169
|
-
focus: {
|
|
170
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
171
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
172
|
-
},
|
|
173
|
-
focusSelected: {
|
|
174
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
175
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
primary: {
|
|
179
|
-
focus: {
|
|
180
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
181
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
182
|
-
},
|
|
183
|
-
focusSelected: {
|
|
184
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
185
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
warning: {
|
|
189
|
-
focus: {
|
|
190
|
-
light: `var(--ds-border-focused, ${colors.Y500})`,
|
|
191
|
-
dark: `var(--ds-border-focused, ${colors.Y500})`
|
|
192
|
-
},
|
|
193
|
-
focusSelected: {
|
|
194
|
-
light: `var(--ds-border-focused, ${colors.Y500})`,
|
|
195
|
-
dark: `var(--ds-border-focused, ${colors.Y500})`
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
danger: {
|
|
199
|
-
focus: {
|
|
200
|
-
light: `var(--ds-border-focused, ${colors.R100})`,
|
|
201
|
-
dark: `var(--ds-border-focused, ${colors.R100})`
|
|
202
|
-
},
|
|
203
|
-
focusSelected: {
|
|
204
|
-
light: `var(--ds-border-focused, ${colors.R100})`,
|
|
205
|
-
dark: `var(--ds-border-focused, ${colors.R100})`
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
link: {
|
|
209
|
-
focus: {
|
|
210
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
211
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
212
|
-
},
|
|
213
|
-
focusSelected: {
|
|
214
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
215
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
subtle: {
|
|
219
|
-
focus: {
|
|
220
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
221
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
222
|
-
},
|
|
223
|
-
focusSelected: {
|
|
224
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
225
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
'subtle-link': {
|
|
229
|
-
focus: {
|
|
230
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
231
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
232
|
-
},
|
|
233
|
-
focusSelected: {
|
|
234
|
-
light: `var(--ds-border-focused, ${colors.B100})`,
|
|
235
|
-
dark: `var(--ds-border-focused, ${colors.B75})`
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
167
|
color: {
|
|
240
168
|
default: {
|
|
241
169
|
default: {
|
|
@@ -136,18 +136,6 @@ export function getCss({
|
|
|
136
136
|
// background, box-shadow
|
|
137
137
|
transitionDuration: '0s, 0.15s'
|
|
138
138
|
},
|
|
139
|
-
'&:focus': {
|
|
140
|
-
...getColors({
|
|
141
|
-
appearance,
|
|
142
|
-
key: isSelected ? 'focusSelected' : 'focus',
|
|
143
|
-
mode
|
|
144
|
-
}),
|
|
145
|
-
boxShadow: `0 0 0 2px ${colors.boxShadowColor[appearance].focus[mode]}`,
|
|
146
|
-
// background, box-shadow
|
|
147
|
-
transitionDuration: '0s, 0.2s',
|
|
148
|
-
// disabling browser focus outline
|
|
149
|
-
outline: 'none'
|
|
150
|
-
},
|
|
151
139
|
// giving active styles preference by listing them after focus
|
|
152
140
|
'&:active': {
|
|
153
141
|
...getColors({
|
|
@@ -208,9 +196,9 @@ export function getIconStyle({
|
|
|
208
196
|
}) {
|
|
209
197
|
return css({
|
|
210
198
|
display: 'flex',
|
|
199
|
+
// icon size cannot grow and shrink
|
|
211
200
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
212
201
|
margin: spacing === 'none' ? 0 : innerMargin.icon,
|
|
213
|
-
// icon size cannot grow and shrink
|
|
214
202
|
flexGrow: 0,
|
|
215
203
|
flexShrink: 0,
|
|
216
204
|
alignSelf: 'center',
|
package/dist/es2019/version.json
CHANGED
|
@@ -71,7 +71,7 @@ export function getCustomCss(_ref) {
|
|
|
71
71
|
// To do this we are overwriting all pseudo selectors
|
|
72
72
|
export function getSpecifiers(styles) {
|
|
73
73
|
return {
|
|
74
|
-
'&, &:hover, &:active, &:focus, &:visited, &:disabled, &[disabled]': styles
|
|
74
|
+
'&, &:hover, &:active, &:focus, &:focus-visible, &:visited, &:disabled, &[disabled]': styles
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
export function defaultThemeFn(current, values) {
|
|
@@ -7,6 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
8
8
|
import noop from '@atlaskit/ds-lib/noop';
|
|
9
9
|
import useAutoFocus from '@atlaskit/ds-lib/use-auto-focus';
|
|
10
|
+
import FocusRing from '@atlaskit/focus-ring';
|
|
10
11
|
// eslint-disable-next-line no-duplicate-imports
|
|
11
12
|
import InteractionContext from '@atlaskit/interaction-context';
|
|
12
13
|
import { N500 } from '@atlaskit/theme/colors';
|
|
@@ -83,7 +84,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
83
84
|
action: 'clicked',
|
|
84
85
|
componentName: 'button',
|
|
85
86
|
packageName: "@atlaskit/button",
|
|
86
|
-
packageVersion: "16.
|
|
87
|
+
packageVersion: "16.6.0",
|
|
87
88
|
analyticsData: analyticsContext
|
|
88
89
|
});
|
|
89
90
|
|
|
@@ -116,12 +117,12 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
116
117
|
var spinnerHackCss = {};
|
|
117
118
|
if (isSelected || isDisabled || appearance === 'warning') {
|
|
118
119
|
spinnerHackCss = {
|
|
119
|
-
'[data-theme] &
|
|
120
|
-
stroke: isSelected || isDisabled ? "var(--ds-
|
|
120
|
+
'[data-theme] & circle': {
|
|
121
|
+
stroke: "".concat(isSelected || isDisabled ? "var(--ds-icon-subtle, ".concat(N500, ")") : "var(--ds-icon-warning-inverse, ".concat(N500, ")"), " !important")
|
|
121
122
|
}
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
|
-
return jsx(Component, _extends({}, rest, {
|
|
125
|
+
return jsx(FocusRing, null, jsx(Component, _extends({}, rest, {
|
|
125
126
|
css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss],
|
|
126
127
|
className: className,
|
|
127
128
|
ref: setRef,
|
|
@@ -155,5 +156,5 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
155
156
|
})]
|
|
156
157
|
}, iconAfter) : null, overlay ? jsx("span", {
|
|
157
158
|
css: [overlayCss, spinnerHackCss]
|
|
158
|
-
}, overlay) : null);
|
|
159
|
+
}, overlay) : null));
|
|
159
160
|
});
|
|
@@ -164,78 +164,6 @@ var values = {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
boxShadowColor: {
|
|
168
|
-
default: {
|
|
169
|
-
focus: {
|
|
170
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
171
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
172
|
-
},
|
|
173
|
-
focusSelected: {
|
|
174
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
175
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
primary: {
|
|
179
|
-
focus: {
|
|
180
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
181
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
182
|
-
},
|
|
183
|
-
focusSelected: {
|
|
184
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
185
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
warning: {
|
|
189
|
-
focus: {
|
|
190
|
-
light: "var(--ds-border-focused, ".concat(colors.Y500, ")"),
|
|
191
|
-
dark: "var(--ds-border-focused, ".concat(colors.Y500, ")")
|
|
192
|
-
},
|
|
193
|
-
focusSelected: {
|
|
194
|
-
light: "var(--ds-border-focused, ".concat(colors.Y500, ")"),
|
|
195
|
-
dark: "var(--ds-border-focused, ".concat(colors.Y500, ")")
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
danger: {
|
|
199
|
-
focus: {
|
|
200
|
-
light: "var(--ds-border-focused, ".concat(colors.R100, ")"),
|
|
201
|
-
dark: "var(--ds-border-focused, ".concat(colors.R100, ")")
|
|
202
|
-
},
|
|
203
|
-
focusSelected: {
|
|
204
|
-
light: "var(--ds-border-focused, ".concat(colors.R100, ")"),
|
|
205
|
-
dark: "var(--ds-border-focused, ".concat(colors.R100, ")")
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
link: {
|
|
209
|
-
focus: {
|
|
210
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
211
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
212
|
-
},
|
|
213
|
-
focusSelected: {
|
|
214
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
215
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
subtle: {
|
|
219
|
-
focus: {
|
|
220
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
221
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
222
|
-
},
|
|
223
|
-
focusSelected: {
|
|
224
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
225
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
'subtle-link': {
|
|
229
|
-
focus: {
|
|
230
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
231
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
232
|
-
},
|
|
233
|
-
focusSelected: {
|
|
234
|
-
light: "var(--ds-border-focused, ".concat(colors.B100, ")"),
|
|
235
|
-
dark: "var(--ds-border-focused, ".concat(colors.B75, ")")
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
167
|
color: {
|
|
240
168
|
default: {
|
|
241
169
|
default: {
|
package/dist/esm/shared/css.js
CHANGED
|
@@ -132,17 +132,6 @@ export function getCss(_ref3) {
|
|
|
132
132
|
// background, box-shadow
|
|
133
133
|
transitionDuration: '0s, 0.15s'
|
|
134
134
|
}),
|
|
135
|
-
'&:focus': _objectSpread(_objectSpread({}, getColors({
|
|
136
|
-
appearance: appearance,
|
|
137
|
-
key: isSelected ? 'focusSelected' : 'focus',
|
|
138
|
-
mode: mode
|
|
139
|
-
})), {}, {
|
|
140
|
-
boxShadow: "0 0 0 2px ".concat(colors.boxShadowColor[appearance].focus[mode]),
|
|
141
|
-
// background, box-shadow
|
|
142
|
-
transitionDuration: '0s, 0.2s',
|
|
143
|
-
// disabling browser focus outline
|
|
144
|
-
outline: 'none'
|
|
145
|
-
}),
|
|
146
135
|
// giving active styles preference by listing them after focus
|
|
147
136
|
'&:active': _objectSpread(_objectSpread({}, getColors({
|
|
148
137
|
appearance: appearance,
|
|
@@ -196,9 +185,9 @@ export function getIconStyle(_ref4) {
|
|
|
196
185
|
var spacing = _ref4.spacing;
|
|
197
186
|
return css({
|
|
198
187
|
display: 'flex',
|
|
188
|
+
// icon size cannot grow and shrink
|
|
199
189
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
200
190
|
margin: spacing === 'none' ? 0 : innerMargin.icon,
|
|
201
|
-
// icon size cannot grow and shrink
|
|
202
191
|
flexGrow: 0,
|
|
203
192
|
flexShrink: 0,
|
|
204
193
|
alignSelf: 'center',
|
package/dist/esm/version.json
CHANGED
|
@@ -15,16 +15,8 @@ export declare type ColorGroup = {
|
|
|
15
15
|
export declare type ColorPreset = {
|
|
16
16
|
[key in Appearance]: ColorGroup;
|
|
17
17
|
};
|
|
18
|
-
export declare type BoxShadowColorGroup = {
|
|
19
|
-
focus: ColorRule;
|
|
20
|
-
focusSelected: ColorRule;
|
|
21
|
-
};
|
|
22
|
-
declare type BoxShadowColorPreset = {
|
|
23
|
-
[key in Appearance]: BoxShadowColorGroup;
|
|
24
|
-
};
|
|
25
18
|
declare type Values = {
|
|
26
19
|
background: ColorPreset;
|
|
27
|
-
boxShadowColor: BoxShadowColorPreset;
|
|
28
20
|
color: ColorPreset;
|
|
29
21
|
};
|
|
30
22
|
declare const values: Values;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.6.0",
|
|
4
4
|
"description": "A button triggers an event or action. They let users know what will happen next.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"atlaskit:src": "src/index.tsx",
|
|
17
17
|
"atlassian": {
|
|
18
|
-
"disableProductCI": true,
|
|
19
18
|
"team": "Design System Team",
|
|
20
19
|
"releaseModel": "scheduled",
|
|
21
20
|
"website": {
|
|
@@ -34,9 +33,10 @@
|
|
|
34
33
|
"dependencies": {
|
|
35
34
|
"@atlaskit/analytics-next": "^9.0.0",
|
|
36
35
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
36
|
+
"@atlaskit/focus-ring": "^1.0.6",
|
|
37
37
|
"@atlaskit/interaction-context": "^2.0.0",
|
|
38
|
-
"@atlaskit/spinner": "^15.
|
|
39
|
-
"@atlaskit/theme": "^12.
|
|
38
|
+
"@atlaskit/spinner": "^15.4.0",
|
|
39
|
+
"@atlaskit/theme": "^12.3.0",
|
|
40
40
|
"@atlaskit/tokens": "^1.2.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1"
|
|
@@ -90,4 +90,4 @@
|
|
|
90
90
|
},
|
|
91
91
|
"homepage": "https://atlassian.design/components/button/",
|
|
92
92
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
93
|
-
}
|
|
93
|
+
}
|