@atlaskit/button 21.0.0 → 21.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 21.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#119753](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119753)
8
+ [`6a1bfec451e30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a1bfec451e30) -
9
+ [ux] `color` and `text-decoration` style specificity have been increased to reduce the probability
10
+ of global `<a>` tag styles interfering with button styles.
11
+
12
+ ## 21.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#117964](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117964)
17
+ [`78292160a22d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/78292160a22d6) -
18
+ Updated styles for new button to use `rem` unit for width and height instead of `em` with
19
+ fractional units. This change is no longer behind a feature flag.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 21.0.0
4
26
 
5
27
  ### Major Changes
@@ -61,14 +61,6 @@ var dividerRefreshedOffsetStyles = (0, _react.css)({
61
61
  marginInline: "calc(0px - ".concat("var(--ds-border-width, 1px)", ")")
62
62
  });
63
63
  var dividerHeight = {
64
- default: (0, _react.css)({
65
- height: "".concat(32 / 14, "em")
66
- }),
67
- compact: (0, _react.css)({
68
- height: "".concat(24 / 14, "em")
69
- })
70
- };
71
- var dividerHeightWithRem = {
72
64
  default: (0, _react.css)({
73
65
  height: '2rem'
74
66
  }),
@@ -77,17 +69,6 @@ var dividerHeightWithRem = {
77
69
  })
78
70
  };
79
71
  var defaultDividerHeight = {
80
- // The divider height is calculated by subtracting twice the border width from the button height.
81
- // This ensures the divider does not intersect with the button's border, avoiding visual issues
82
- // caused by overlapping alpha colors (color.border) at the intersection.
83
- default: (0, _react.css)({
84
- height: "calc(".concat(32 / 14, "em - ", "var(--ds-border-width, 1px)", " - ", "var(--ds-border-width, 1px)", ")")
85
- }),
86
- compact: (0, _react.css)({
87
- height: "calc(".concat(24 / 14, "em - ", "var(--ds-border-width, 1px)", " - ", "var(--ds-border-width, 1px)", ")")
88
- })
89
- };
90
- var defaultDividerHeightWithRem = {
91
72
  // The divider height is calculated by subtracting twice the border width from the button height.
92
73
  // This ensures the divider does not intersect with the button's border, avoiding visual issues
93
74
  // caused by overlapping alpha colors (color.border) at the intersection.
@@ -106,13 +87,10 @@ var Divider = exports.Divider = function Divider(_ref) {
106
87
  spacing = _ref.spacing,
107
88
  _ref$isDisabled = _ref.isDisabled,
108
89
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
109
- // Pulling these out of the below `css` prop to avoid nested ternaries
110
- var defaultDividerHeightStyles = (0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? defaultDividerHeightWithRem : defaultDividerHeight;
111
- var dividerHeightStyles = (0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? dividerHeightWithRem : dividerHeight;
112
90
  return (
113
91
  // I find it funny to provide a div for Divider
114
92
  (0, _react.jsx)("div", {
115
- css: [baseDividerStyles, appearance === 'default' && !isDisabled && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultDividerHeightStyles[spacing] : dividerHeightStyles[spacing], isDisabled && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
93
+ css: [baseDividerStyles, appearance === 'default' && !isDisabled && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultDividerHeight[spacing] : dividerHeight[spacing], isDisabled && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
116
94
  })
117
95
  );
118
96
  };
@@ -23,38 +23,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
23
23
  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 && {}.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; }
24
24
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
25
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26
- // If updating `buttonStyles`, also update `buttonStylesWithRem`.
27
26
  var buttonStyles = (0, _primitives.xcss)({
28
- display: 'inline-flex',
29
- boxSizing: 'border-box',
30
- width: 'auto',
31
- maxWidth: '100%',
32
- position: 'relative',
33
- alignItems: 'baseline',
34
- justifyContent: 'center',
35
- columnGap: 'space.050',
36
- borderRadius: 'border.radius.100',
37
- borderWidth: 'border.width.0',
38
- flexShrink: 0,
39
- height: "".concat(32 / 14, "em"),
40
- font: 'font.body',
41
- fontWeight: 'font.weight.medium',
42
- paddingBlock: 'space.075',
43
- paddingInlineEnd: 'space.150',
44
- paddingInlineStart: 'space.150',
45
- textAlign: 'center',
46
- transition: 'background 0.1s ease-out',
47
- verticalAlign: 'middle',
48
- '::after': {
49
- borderRadius: 'inherit',
50
- inset: 'space.0',
51
- borderStyle: 'solid',
52
- borderWidth: "var(--ds-border-width, 1px)",
53
- pointerEvents: 'none',
54
- position: 'absolute'
55
- }
56
- });
57
- var buttonStylesWithRem = (0, _primitives.xcss)({
58
27
  display: 'inline-flex',
59
28
  boxSizing: 'border-box',
60
29
  width: 'auto',
@@ -119,6 +88,21 @@ var defaultStyles = (0, _primitives.xcss)({
119
88
  // @ts-expect-error
120
89
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
121
90
  color: "var(--ds-text, ".concat(colors.N500, ")")
91
+ },
92
+ ':hover': {
93
+ // @ts-expect-error — using tokens for explicit fallback usage.
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
95
+ color: "var(--ds-text, ".concat(colors.N500, ")")
96
+ },
97
+ ':active': {
98
+ // @ts-expect-error — using tokens for explicit fallback usage.
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
100
+ color: "var(--ds-text, ".concat(colors.N500, ")")
101
+ },
102
+ ':focus': {
103
+ // @ts-expect-error — using tokens for explicit fallback usage.
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
105
+ color: "var(--ds-text, ".concat(colors.N500, ")")
122
106
  }
123
107
  });
124
108
  var defaultRefreshedStyles = (0, _primitives.xcss)({
@@ -130,15 +114,31 @@ var defaultRefreshedStyles = (0, _primitives.xcss)({
130
114
  },
131
115
  ':visited': {
132
116
  color: 'color.text.subtle'
117
+ },
118
+ ':hover': {
119
+ color: 'color.text.subtle'
120
+ },
121
+ ':active': {
122
+ color: 'color.text.subtle'
123
+ },
124
+ ':focus': {
125
+ color: 'color.text.subtle'
133
126
  }
134
127
  });
135
128
  var primaryStyles = (0, _primitives.xcss)({
136
129
  background: "var(--ds-background-brand-bold, #0052CC)",
137
- // @ts-expect-error
138
- color: "var(--ds-text-inverse, #FFFFFF)",
130
+ color: 'color.text.inverse',
139
131
  ':visited': {
140
- // @ts-expect-error
141
- color: "var(--ds-text-inverse, #FFFFFF)"
132
+ color: 'color.text.inverse'
133
+ },
134
+ ':hover': {
135
+ color: 'color.text.inverse'
136
+ },
137
+ ':active': {
138
+ color: 'color.text.inverse'
139
+ },
140
+ ':focus': {
141
+ color: 'color.text.inverse'
142
142
  }
143
143
  });
144
144
  var primaryInteractiveStyles = (0, _primitives.xcss)({
@@ -160,6 +160,18 @@ var warningStyles = (0, _primitives.xcss)({
160
160
  ':visited': {
161
161
  // @ts-expect-error
162
162
  color: "var(--ds-text-warning-inverse, #172B4D)"
163
+ },
164
+ ':hover': {
165
+ // @ts-expect-error
166
+ color: "var(--ds-text-warning-inverse, #172B4D)"
167
+ },
168
+ ':active': {
169
+ // @ts-expect-error
170
+ color: "var(--ds-text-warning-inverse, #172B4D)"
171
+ },
172
+ ':focus': {
173
+ // @ts-expect-error
174
+ color: "var(--ds-text-warning-inverse, #172B4D)"
163
175
  }
164
176
  });
165
177
  var warningInteractiveStyles = (0, _primitives.xcss)({
@@ -179,6 +191,15 @@ var dangerStyles = (0, _primitives.xcss)({
179
191
  color: 'color.text.inverse',
180
192
  ':visited': {
181
193
  color: 'color.text.inverse'
194
+ },
195
+ ':hover': {
196
+ color: 'color.text.inverse'
197
+ },
198
+ ':active': {
199
+ color: 'color.text.inverse'
200
+ },
201
+ ':focus': {
202
+ color: 'color.text.inverse'
182
203
  }
183
204
  });
184
205
  var dangerInteractiveStyles = (0, _primitives.xcss)({
@@ -196,6 +217,15 @@ var discoveryStyles = (0, _primitives.xcss)({
196
217
  color: 'color.text.inverse',
197
218
  ':visited': {
198
219
  color: 'color.text.inverse'
220
+ },
221
+ ':hover': {
222
+ color: 'color.text.inverse'
223
+ },
224
+ ':active': {
225
+ color: 'color.text.inverse'
226
+ },
227
+ ':focus': {
228
+ color: 'color.text.inverse'
199
229
  }
200
230
  });
201
231
  var discoveryInteractiveStyles = (0, _primitives.xcss)({
@@ -215,6 +245,18 @@ var subtleStyles = (0, _primitives.xcss)({
215
245
  ':visited': {
216
246
  // @ts-expect-error
217
247
  color: "var(--ds-text, #42526E)"
248
+ },
249
+ ':hover': {
250
+ // @ts-expect-error
251
+ color: "var(--ds-text, #42526E)"
252
+ },
253
+ ':active': {
254
+ // @ts-expect-error
255
+ color: "var(--ds-text, #42526E)"
256
+ },
257
+ ':focus': {
258
+ // @ts-expect-error
259
+ color: "var(--ds-text, #42526E)"
218
260
  }
219
261
  });
220
262
  var subtleRefreshedStyles = (0, _primitives.xcss)({
@@ -222,6 +264,15 @@ var subtleRefreshedStyles = (0, _primitives.xcss)({
222
264
  color: 'color.text.subtle',
223
265
  ':visited': {
224
266
  color: 'color.text.subtle'
267
+ },
268
+ ':hover': {
269
+ color: 'color.text.subtle'
270
+ },
271
+ ':active': {
272
+ color: 'color.text.subtle'
273
+ },
274
+ ':focus': {
275
+ color: 'color.text.subtle'
225
276
  }
226
277
  });
227
278
  var subtleInteractiveStyles = (0, _primitives.xcss)({
@@ -247,8 +298,10 @@ var subtleInteractiveRefreshedStyles = (0, _primitives.xcss)({
247
298
  }
248
299
  });
249
300
 
250
- // Required due to Jira's AUI CSS reset: https://product-fabric.atlassian.net/browse/DSP-15687
251
- var linkDecorationUnsetStyles = (0, _primitives.xcss)({
301
+ // Reinforce existing styles with higher specificity
302
+ // to defend against global anchor styles from products,
303
+ // preventing issues in Jira and Confluence.
304
+ var linkDefensiveStyles = (0, _primitives.xcss)({
252
305
  textDecoration: 'none',
253
306
  ':hover': {
254
307
  textDecoration: 'none'
@@ -258,28 +311,34 @@ var linkDecorationUnsetStyles = (0, _primitives.xcss)({
258
311
  },
259
312
  ':focus': {
260
313
  textDecoration: 'none'
314
+ },
315
+ ':visited': {
316
+ textDecoration: 'none'
261
317
  }
262
318
  });
263
319
  var disabledStyles = (0, _primitives.xcss)({
264
320
  cursor: 'not-allowed',
265
321
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
266
322
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
267
- // @ts-expect-error
268
- color: "var(--ds-text-disabled, #091E424F)",
323
+ color: 'color.text.disabled',
324
+ '::after': {
325
+ content: 'none'
326
+ },
327
+ ':visited': {
328
+ color: 'color.text.disabled'
329
+ },
269
330
  ':hover': {
270
331
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
271
332
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
272
- // @ts-expect-error
273
- color: "var(--ds-text-disabled, #091E424F)"
333
+ color: 'color.text.disabled'
274
334
  },
275
335
  ':active': {
276
336
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
277
337
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
278
- // @ts-expect-error
279
- color: "var(--ds-text-disabled, #091E424F)"
338
+ color: 'color.text.disabled'
280
339
  },
281
- '::after': {
282
- content: 'none'
340
+ ':focus': {
341
+ color: 'color.text.disabled'
283
342
  }
284
343
  });
285
344
  var selectedStyles = (0, _primitives.xcss)({
@@ -292,6 +351,21 @@ var selectedStyles = (0, _primitives.xcss)({
292
351
  // @ts-expect-error
293
352
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
294
353
  color: "var(--ds-text-selected, ".concat(colors.N20, ")")
354
+ },
355
+ ':hover': {
356
+ // @ts-expect-error
357
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
358
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
359
+ },
360
+ ':active': {
361
+ // @ts-expect-error
362
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
363
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
364
+ },
365
+ ':focus': {
366
+ // @ts-expect-error
367
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
368
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
295
369
  }
296
370
  });
297
371
  var selectedRefreshedStyles = (0, _primitives.xcss)({
@@ -303,6 +377,15 @@ var selectedRefreshedStyles = (0, _primitives.xcss)({
303
377
  },
304
378
  ':visited': {
305
379
  color: 'color.text.selected'
380
+ },
381
+ ':hover': {
382
+ color: 'color.text.selected'
383
+ },
384
+ ':active': {
385
+ color: 'color.text.selected'
386
+ },
387
+ ':focus': {
388
+ color: 'color.text.selected'
306
389
  }
307
390
  });
308
391
  var selectedInsideSplitButtonStyles = (0, _primitives.xcss)({
@@ -393,17 +476,7 @@ var selectedDiscoveryStyles = (0, _primitives.xcss)({
393
476
  background: "var(--ds-background-selected, #403294)"
394
477
  }
395
478
  });
396
-
397
- // If updating `spacingCompactStyles`, also update `spacingCompactStylesWithRem`.
398
479
  var spacingCompactStyles = (0, _primitives.xcss)({
399
- columnGap: 'space.050',
400
- height: "".concat(24 / 14, "em"),
401
- paddingBlock: 'space.025',
402
- paddingInlineEnd: 'space.150',
403
- paddingInlineStart: 'space.150',
404
- verticalAlign: 'middle'
405
- });
406
- var spacingCompactStylesWithRem = (0, _primitives.xcss)({
407
480
  columnGap: 'space.050',
408
481
  height: '1.5rem',
409
482
  paddingBlock: 'space.025',
@@ -420,25 +493,13 @@ var fullWidthStyles = (0, _primitives.xcss)({
420
493
  var loadingStyles = (0, _primitives.xcss)({
421
494
  cursor: 'progress'
422
495
  });
423
- // If updating `iconButtonStyles`, also update `iconButtonStylesWithRem`.
424
496
  var iconButtonStyles = (0, _primitives.xcss)({
425
- height: "".concat(32 / 14, "em"),
426
- width: "".concat(32 / 14, "em"),
427
- paddingInlineEnd: 'space.0',
428
- paddingInlineStart: 'space.0'
429
- });
430
- var iconButtonStylesWithRem = (0, _primitives.xcss)({
431
497
  height: '2rem',
432
498
  width: '2rem',
433
499
  paddingInlineEnd: 'space.0',
434
500
  paddingInlineStart: 'space.0'
435
501
  });
436
- // If updating `iconButtonCompactStyles`, also update `iconButtonCompactStylesWithRem`.
437
502
  var iconButtonCompactStyles = (0, _primitives.xcss)({
438
- width: "".concat(24 / 14, "em"),
439
- height: "".concat(24 / 14, "em")
440
- });
441
- var iconButtonCompactStylesWithRem = (0, _primitives.xcss)({
442
503
  width: '1.5rem',
443
504
  height: '1.5rem'
444
505
  });
@@ -488,6 +549,7 @@ var useButtonBase = function useButtonBase(_ref) {
488
549
  propAppearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
489
550
  _ref$autoFocus = _ref.autoFocus,
490
551
  autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
552
+ buttonType = _ref.buttonType,
491
553
  _ref$isDisabled = _ref.isDisabled,
492
554
  propIsDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
493
555
  _ref$isLoading = _ref.isLoading,
@@ -537,13 +599,13 @@ var useButtonBase = function useButtonBase(_ref) {
537
599
  (0, _useAutoFocus.default)(localRef, autoFocus);
538
600
  return _objectSpread({
539
601
  ref: (0, _mergeRefs.default)([localRef, ref]),
540
- xcss: [(0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? buttonStylesWithRem : buttonStyles, appearance === 'default' && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), linkDecorationUnsetStyles, isSelected && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
602
+ xcss: [buttonStyles, appearance === 'default' && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), buttonType === 'link' && linkDefensiveStyles, isSelected && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
541
603
  // TODO: remove me once we kill color fallbacks
542
604
  isSelected && appearance === 'danger' && selectedDangerStyles,
543
605
  // TODO: remove me once we kill color fallbacks
544
606
  isSelected && appearance === 'warning' && selectedWarningStyles,
545
607
  // TODO: remove me once we kill color fallbacks
546
- isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && ((0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? spacingCompactStylesWithRem : spacingCompactStyles), hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && ((0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? iconButtonStylesWithRem : iconButtonStyles), isIconButton && spacing === 'compact' && ((0, _platformFeatureFlags.fg)('platform_dst_button_replace_em_with_rem') ? iconButtonCompactStylesWithRem : iconButtonCompactStyles), shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
608
+ isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
547
609
  isDisabled: isEffectivelyDisabled,
548
610
  children: /*#__PURE__*/_react.default.createElement(_splitButtonContext.SplitButtonContext.Provider, {
549
611
  value: undefined
@@ -133,7 +133,7 @@ var ButtonBase = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(prop
133
133
  action: 'clicked',
134
134
  componentName: 'button',
135
135
  packageName: "@atlaskit/button",
136
- packageVersion: "21.0.0",
136
+ packageVersion: "21.1.1",
137
137
  analyticsData: analyticsContext
138
138
  });
139
139
 
@@ -55,14 +55,6 @@ const dividerRefreshedOffsetStyles = css({
55
55
  marginInline: `calc(0px - ${"var(--ds-border-width, 1px)"})`
56
56
  });
57
57
  const dividerHeight = {
58
- default: css({
59
- height: `${32 / 14}em`
60
- }),
61
- compact: css({
62
- height: `${24 / 14}em`
63
- })
64
- };
65
- const dividerHeightWithRem = {
66
58
  default: css({
67
59
  height: '2rem'
68
60
  }),
@@ -71,17 +63,6 @@ const dividerHeightWithRem = {
71
63
  })
72
64
  };
73
65
  const defaultDividerHeight = {
74
- // The divider height is calculated by subtracting twice the border width from the button height.
75
- // This ensures the divider does not intersect with the button's border, avoiding visual issues
76
- // caused by overlapping alpha colors (color.border) at the intersection.
77
- default: css({
78
- height: `calc(${32 / 14}em - ${"var(--ds-border-width, 1px)"} - ${"var(--ds-border-width, 1px)"})`
79
- }),
80
- compact: css({
81
- height: `calc(${24 / 14}em - ${"var(--ds-border-width, 1px)"} - ${"var(--ds-border-width, 1px)"})`
82
- })
83
- };
84
- const defaultDividerHeightWithRem = {
85
66
  // The divider height is calculated by subtracting twice the border width from the button height.
86
67
  // This ensures the divider does not intersect with the button's border, avoiding visual issues
87
68
  // caused by overlapping alpha colors (color.border) at the intersection.
@@ -100,13 +81,10 @@ export const Divider = ({
100
81
  spacing,
101
82
  isDisabled = false
102
83
  }) => {
103
- // Pulling these out of the below `css` prop to avoid nested ternaries
104
- const defaultDividerHeightStyles = fg('platform_dst_button_replace_em_with_rem') ? defaultDividerHeightWithRem : defaultDividerHeight;
105
- const dividerHeightStyles = fg('platform_dst_button_replace_em_with_rem') ? dividerHeightWithRem : dividerHeight;
106
84
  return (
107
85
  // I find it funny to provide a div for Divider
108
86
  jsx("div", {
109
- css: [baseDividerStyles, appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') ? defaultDividerHeightStyles[spacing] : dividerHeightStyles[spacing], isDisabled && (fg('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && (fg('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), fg('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
87
+ css: [baseDividerStyles, appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') ? defaultDividerHeight[spacing] : dividerHeight[spacing], isDisabled && (fg('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && (fg('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), fg('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
110
88
  })
111
89
  );
112
90
  };
@@ -10,38 +10,7 @@ import { SplitButtonContext, useSplitButtonContext } from '../../containers/spli
10
10
  import blockEvents from './block-events';
11
11
  import { LOADING_LABEL } from './constants';
12
12
  import renderLoadingOverlay from './loading-overlay';
13
- // If updating `buttonStyles`, also update `buttonStylesWithRem`.
14
13
  const buttonStyles = xcss({
15
- display: 'inline-flex',
16
- boxSizing: 'border-box',
17
- width: 'auto',
18
- maxWidth: '100%',
19
- position: 'relative',
20
- alignItems: 'baseline',
21
- justifyContent: 'center',
22
- columnGap: 'space.050',
23
- borderRadius: 'border.radius.100',
24
- borderWidth: 'border.width.0',
25
- flexShrink: 0,
26
- height: `${32 / 14}em`,
27
- font: 'font.body',
28
- fontWeight: 'font.weight.medium',
29
- paddingBlock: 'space.075',
30
- paddingInlineEnd: 'space.150',
31
- paddingInlineStart: 'space.150',
32
- textAlign: 'center',
33
- transition: 'background 0.1s ease-out',
34
- verticalAlign: 'middle',
35
- '::after': {
36
- borderRadius: 'inherit',
37
- inset: 'space.0',
38
- borderStyle: 'solid',
39
- borderWidth: "var(--ds-border-width, 1px)",
40
- pointerEvents: 'none',
41
- position: 'absolute'
42
- }
43
- });
44
- const buttonStylesWithRem = xcss({
45
14
  display: 'inline-flex',
46
15
  boxSizing: 'border-box',
47
16
  width: 'auto',
@@ -106,6 +75,21 @@ const defaultStyles = xcss({
106
75
  // @ts-expect-error
107
76
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
108
77
  color: `var(--ds-text, ${colors.N500})`
78
+ },
79
+ ':hover': {
80
+ // @ts-expect-error — using tokens for explicit fallback usage.
81
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
82
+ color: `var(--ds-text, ${colors.N500})`
83
+ },
84
+ ':active': {
85
+ // @ts-expect-error — using tokens for explicit fallback usage.
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
87
+ color: `var(--ds-text, ${colors.N500})`
88
+ },
89
+ ':focus': {
90
+ // @ts-expect-error — using tokens for explicit fallback usage.
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
92
+ color: `var(--ds-text, ${colors.N500})`
109
93
  }
110
94
  });
111
95
  const defaultRefreshedStyles = xcss({
@@ -117,15 +101,31 @@ const defaultRefreshedStyles = xcss({
117
101
  },
118
102
  ':visited': {
119
103
  color: 'color.text.subtle'
104
+ },
105
+ ':hover': {
106
+ color: 'color.text.subtle'
107
+ },
108
+ ':active': {
109
+ color: 'color.text.subtle'
110
+ },
111
+ ':focus': {
112
+ color: 'color.text.subtle'
120
113
  }
121
114
  });
122
115
  const primaryStyles = xcss({
123
116
  background: "var(--ds-background-brand-bold, #0052CC)",
124
- // @ts-expect-error
125
- color: "var(--ds-text-inverse, #FFFFFF)",
117
+ color: 'color.text.inverse',
126
118
  ':visited': {
127
- // @ts-expect-error
128
- color: "var(--ds-text-inverse, #FFFFFF)"
119
+ color: 'color.text.inverse'
120
+ },
121
+ ':hover': {
122
+ color: 'color.text.inverse'
123
+ },
124
+ ':active': {
125
+ color: 'color.text.inverse'
126
+ },
127
+ ':focus': {
128
+ color: 'color.text.inverse'
129
129
  }
130
130
  });
131
131
  const primaryInteractiveStyles = xcss({
@@ -147,6 +147,18 @@ const warningStyles = xcss({
147
147
  ':visited': {
148
148
  // @ts-expect-error
149
149
  color: "var(--ds-text-warning-inverse, #172B4D)"
150
+ },
151
+ ':hover': {
152
+ // @ts-expect-error
153
+ color: "var(--ds-text-warning-inverse, #172B4D)"
154
+ },
155
+ ':active': {
156
+ // @ts-expect-error
157
+ color: "var(--ds-text-warning-inverse, #172B4D)"
158
+ },
159
+ ':focus': {
160
+ // @ts-expect-error
161
+ color: "var(--ds-text-warning-inverse, #172B4D)"
150
162
  }
151
163
  });
152
164
  const warningInteractiveStyles = xcss({
@@ -166,6 +178,15 @@ const dangerStyles = xcss({
166
178
  color: 'color.text.inverse',
167
179
  ':visited': {
168
180
  color: 'color.text.inverse'
181
+ },
182
+ ':hover': {
183
+ color: 'color.text.inverse'
184
+ },
185
+ ':active': {
186
+ color: 'color.text.inverse'
187
+ },
188
+ ':focus': {
189
+ color: 'color.text.inverse'
169
190
  }
170
191
  });
171
192
  const dangerInteractiveStyles = xcss({
@@ -183,6 +204,15 @@ const discoveryStyles = xcss({
183
204
  color: 'color.text.inverse',
184
205
  ':visited': {
185
206
  color: 'color.text.inverse'
207
+ },
208
+ ':hover': {
209
+ color: 'color.text.inverse'
210
+ },
211
+ ':active': {
212
+ color: 'color.text.inverse'
213
+ },
214
+ ':focus': {
215
+ color: 'color.text.inverse'
186
216
  }
187
217
  });
188
218
  const discoveryInteractiveStyles = xcss({
@@ -202,6 +232,18 @@ const subtleStyles = xcss({
202
232
  ':visited': {
203
233
  // @ts-expect-error
204
234
  color: "var(--ds-text, #42526E)"
235
+ },
236
+ ':hover': {
237
+ // @ts-expect-error
238
+ color: "var(--ds-text, #42526E)"
239
+ },
240
+ ':active': {
241
+ // @ts-expect-error
242
+ color: "var(--ds-text, #42526E)"
243
+ },
244
+ ':focus': {
245
+ // @ts-expect-error
246
+ color: "var(--ds-text, #42526E)"
205
247
  }
206
248
  });
207
249
  const subtleRefreshedStyles = xcss({
@@ -209,6 +251,15 @@ const subtleRefreshedStyles = xcss({
209
251
  color: 'color.text.subtle',
210
252
  ':visited': {
211
253
  color: 'color.text.subtle'
254
+ },
255
+ ':hover': {
256
+ color: 'color.text.subtle'
257
+ },
258
+ ':active': {
259
+ color: 'color.text.subtle'
260
+ },
261
+ ':focus': {
262
+ color: 'color.text.subtle'
212
263
  }
213
264
  });
214
265
  const subtleInteractiveStyles = xcss({
@@ -234,8 +285,10 @@ const subtleInteractiveRefreshedStyles = xcss({
234
285
  }
235
286
  });
236
287
 
237
- // Required due to Jira's AUI CSS reset: https://product-fabric.atlassian.net/browse/DSP-15687
238
- const linkDecorationUnsetStyles = xcss({
288
+ // Reinforce existing styles with higher specificity
289
+ // to defend against global anchor styles from products,
290
+ // preventing issues in Jira and Confluence.
291
+ const linkDefensiveStyles = xcss({
239
292
  textDecoration: 'none',
240
293
  ':hover': {
241
294
  textDecoration: 'none'
@@ -245,28 +298,34 @@ const linkDecorationUnsetStyles = xcss({
245
298
  },
246
299
  ':focus': {
247
300
  textDecoration: 'none'
301
+ },
302
+ ':visited': {
303
+ textDecoration: 'none'
248
304
  }
249
305
  });
250
306
  const disabledStyles = xcss({
251
307
  cursor: 'not-allowed',
252
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
253
309
  background: `var(--ds-background-disabled, ${colors.N20A})`,
254
- // @ts-expect-error
255
- color: "var(--ds-text-disabled, #091E424F)",
310
+ color: 'color.text.disabled',
311
+ '::after': {
312
+ content: 'none'
313
+ },
314
+ ':visited': {
315
+ color: 'color.text.disabled'
316
+ },
256
317
  ':hover': {
257
318
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
258
319
  background: `var(--ds-background-disabled, ${colors.N20A})`,
259
- // @ts-expect-error
260
- color: "var(--ds-text-disabled, #091E424F)"
320
+ color: 'color.text.disabled'
261
321
  },
262
322
  ':active': {
263
323
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
264
324
  background: `var(--ds-background-disabled, ${colors.N20A})`,
265
- // @ts-expect-error
266
- color: "var(--ds-text-disabled, #091E424F)"
325
+ color: 'color.text.disabled'
267
326
  },
268
- '::after': {
269
- content: 'none'
327
+ ':focus': {
328
+ color: 'color.text.disabled'
270
329
  }
271
330
  });
272
331
  const selectedStyles = xcss({
@@ -279,6 +338,21 @@ const selectedStyles = xcss({
279
338
  // @ts-expect-error
280
339
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
281
340
  color: `var(--ds-text-selected, ${colors.N20})`
341
+ },
342
+ ':hover': {
343
+ // @ts-expect-error
344
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
345
+ color: `var(--ds-text-selected, ${colors.N20})`
346
+ },
347
+ ':active': {
348
+ // @ts-expect-error
349
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
350
+ color: `var(--ds-text-selected, ${colors.N20})`
351
+ },
352
+ ':focus': {
353
+ // @ts-expect-error
354
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
355
+ color: `var(--ds-text-selected, ${colors.N20})`
282
356
  }
283
357
  });
284
358
  const selectedRefreshedStyles = xcss({
@@ -290,6 +364,15 @@ const selectedRefreshedStyles = xcss({
290
364
  },
291
365
  ':visited': {
292
366
  color: 'color.text.selected'
367
+ },
368
+ ':hover': {
369
+ color: 'color.text.selected'
370
+ },
371
+ ':active': {
372
+ color: 'color.text.selected'
373
+ },
374
+ ':focus': {
375
+ color: 'color.text.selected'
293
376
  }
294
377
  });
295
378
  const selectedInsideSplitButtonStyles = xcss({
@@ -380,17 +463,7 @@ const selectedDiscoveryStyles = xcss({
380
463
  background: "var(--ds-background-selected, #403294)"
381
464
  }
382
465
  });
383
-
384
- // If updating `spacingCompactStyles`, also update `spacingCompactStylesWithRem`.
385
466
  const spacingCompactStyles = xcss({
386
- columnGap: 'space.050',
387
- height: `${24 / 14}em`,
388
- paddingBlock: 'space.025',
389
- paddingInlineEnd: 'space.150',
390
- paddingInlineStart: 'space.150',
391
- verticalAlign: 'middle'
392
- });
393
- const spacingCompactStylesWithRem = xcss({
394
467
  columnGap: 'space.050',
395
468
  height: '1.5rem',
396
469
  paddingBlock: 'space.025',
@@ -407,25 +480,13 @@ const fullWidthStyles = xcss({
407
480
  const loadingStyles = xcss({
408
481
  cursor: 'progress'
409
482
  });
410
- // If updating `iconButtonStyles`, also update `iconButtonStylesWithRem`.
411
483
  const iconButtonStyles = xcss({
412
- height: `${32 / 14}em`,
413
- width: `${32 / 14}em`,
414
- paddingInlineEnd: 'space.0',
415
- paddingInlineStart: 'space.0'
416
- });
417
- const iconButtonStylesWithRem = xcss({
418
484
  height: '2rem',
419
485
  width: '2rem',
420
486
  paddingInlineEnd: 'space.0',
421
487
  paddingInlineStart: 'space.0'
422
488
  });
423
- // If updating `iconButtonCompactStyles`, also update `iconButtonCompactStylesWithRem`.
424
489
  const iconButtonCompactStyles = xcss({
425
- width: `${24 / 14}em`,
426
- height: `${24 / 14}em`
427
- });
428
- const iconButtonCompactStylesWithRem = xcss({
429
490
  width: '1.5rem',
430
491
  height: '1.5rem'
431
492
  });
@@ -473,6 +534,7 @@ const loadingOverlayStyles = xcss({
473
534
  const useButtonBase = ({
474
535
  appearance: propAppearance = 'default',
475
536
  autoFocus = false,
537
+ buttonType,
476
538
  isDisabled: propIsDisabled = false,
477
539
  isLoading = false,
478
540
  isSelected: propIsSelected = false,
@@ -516,13 +578,13 @@ const useButtonBase = ({
516
578
  useAutoFocus(localRef, autoFocus);
517
579
  return {
518
580
  ref: mergeRefs([localRef, ref]),
519
- xcss: [fg('platform_dst_button_replace_em_with_rem') ? buttonStylesWithRem : buttonStyles, appearance === 'default' && (fg('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && (fg('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && (fg('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && (fg('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), linkDecorationUnsetStyles, isSelected && (fg('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
581
+ xcss: [buttonStyles, appearance === 'default' && (fg('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && (fg('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && (fg('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && (fg('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), buttonType === 'link' && linkDefensiveStyles, isSelected && (fg('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
520
582
  // TODO: remove me once we kill color fallbacks
521
583
  isSelected && appearance === 'danger' && selectedDangerStyles,
522
584
  // TODO: remove me once we kill color fallbacks
523
585
  isSelected && appearance === 'warning' && selectedWarningStyles,
524
586
  // TODO: remove me once we kill color fallbacks
525
- isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && (fg('platform_dst_button_replace_em_with_rem') ? spacingCompactStylesWithRem : spacingCompactStyles), hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && (fg('platform_dst_button_replace_em_with_rem') ? iconButtonStylesWithRem : iconButtonStyles), isIconButton && spacing === 'compact' && (fg('platform_dst_button_replace_em_with_rem') ? iconButtonCompactStylesWithRem : iconButtonCompactStyles), shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
587
+ isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
526
588
  isDisabled: isEffectivelyDisabled,
527
589
  children: /*#__PURE__*/React.createElement(SplitButtonContext.Provider, {
528
590
  value: undefined
@@ -119,7 +119,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref)
119
119
  action: 'clicked',
120
120
  componentName: 'button',
121
121
  packageName: "@atlaskit/button",
122
- packageVersion: "21.0.0",
122
+ packageVersion: "21.1.1",
123
123
  analyticsData: analyticsContext
124
124
  });
125
125
 
@@ -57,14 +57,6 @@ var dividerRefreshedOffsetStyles = css({
57
57
  marginInline: "calc(0px - ".concat("var(--ds-border-width, 1px)", ")")
58
58
  });
59
59
  var dividerHeight = {
60
- default: css({
61
- height: "".concat(32 / 14, "em")
62
- }),
63
- compact: css({
64
- height: "".concat(24 / 14, "em")
65
- })
66
- };
67
- var dividerHeightWithRem = {
68
60
  default: css({
69
61
  height: '2rem'
70
62
  }),
@@ -73,17 +65,6 @@ var dividerHeightWithRem = {
73
65
  })
74
66
  };
75
67
  var defaultDividerHeight = {
76
- // The divider height is calculated by subtracting twice the border width from the button height.
77
- // This ensures the divider does not intersect with the button's border, avoiding visual issues
78
- // caused by overlapping alpha colors (color.border) at the intersection.
79
- default: css({
80
- height: "calc(".concat(32 / 14, "em - ", "var(--ds-border-width, 1px)", " - ", "var(--ds-border-width, 1px)", ")")
81
- }),
82
- compact: css({
83
- height: "calc(".concat(24 / 14, "em - ", "var(--ds-border-width, 1px)", " - ", "var(--ds-border-width, 1px)", ")")
84
- })
85
- };
86
- var defaultDividerHeightWithRem = {
87
68
  // The divider height is calculated by subtracting twice the border width from the button height.
88
69
  // This ensures the divider does not intersect with the button's border, avoiding visual issues
89
70
  // caused by overlapping alpha colors (color.border) at the intersection.
@@ -102,13 +83,10 @@ export var Divider = function Divider(_ref) {
102
83
  spacing = _ref.spacing,
103
84
  _ref$isDisabled = _ref.isDisabled,
104
85
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
105
- // Pulling these out of the below `css` prop to avoid nested ternaries
106
- var defaultDividerHeightStyles = fg('platform_dst_button_replace_em_with_rem') ? defaultDividerHeightWithRem : defaultDividerHeight;
107
- var dividerHeightStyles = fg('platform_dst_button_replace_em_with_rem') ? dividerHeightWithRem : dividerHeight;
108
86
  return (
109
87
  // I find it funny to provide a div for Divider
110
88
  jsx("div", {
111
- css: [baseDividerStyles, appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') ? defaultDividerHeightStyles[spacing] : dividerHeightStyles[spacing], isDisabled && (fg('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && (fg('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), fg('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
89
+ css: [baseDividerStyles, appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') ? defaultDividerHeight[spacing] : dividerHeight[spacing], isDisabled && (fg('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && (fg('platform-component-visual-refresh') ? dividerRefreshedAppearance[appearance] : dividerAppearance[appearance]), fg('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
112
90
  })
113
91
  );
114
92
  };
@@ -13,38 +13,7 @@ import { SplitButtonContext, useSplitButtonContext } from '../../containers/spli
13
13
  import blockEvents from './block-events';
14
14
  import { LOADING_LABEL } from './constants';
15
15
  import renderLoadingOverlay from './loading-overlay';
16
- // If updating `buttonStyles`, also update `buttonStylesWithRem`.
17
16
  var buttonStyles = xcss({
18
- display: 'inline-flex',
19
- boxSizing: 'border-box',
20
- width: 'auto',
21
- maxWidth: '100%',
22
- position: 'relative',
23
- alignItems: 'baseline',
24
- justifyContent: 'center',
25
- columnGap: 'space.050',
26
- borderRadius: 'border.radius.100',
27
- borderWidth: 'border.width.0',
28
- flexShrink: 0,
29
- height: "".concat(32 / 14, "em"),
30
- font: 'font.body',
31
- fontWeight: 'font.weight.medium',
32
- paddingBlock: 'space.075',
33
- paddingInlineEnd: 'space.150',
34
- paddingInlineStart: 'space.150',
35
- textAlign: 'center',
36
- transition: 'background 0.1s ease-out',
37
- verticalAlign: 'middle',
38
- '::after': {
39
- borderRadius: 'inherit',
40
- inset: 'space.0',
41
- borderStyle: 'solid',
42
- borderWidth: "var(--ds-border-width, 1px)",
43
- pointerEvents: 'none',
44
- position: 'absolute'
45
- }
46
- });
47
- var buttonStylesWithRem = xcss({
48
17
  display: 'inline-flex',
49
18
  boxSizing: 'border-box',
50
19
  width: 'auto',
@@ -109,6 +78,21 @@ var defaultStyles = xcss({
109
78
  // @ts-expect-error
110
79
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
111
80
  color: "var(--ds-text, ".concat(colors.N500, ")")
81
+ },
82
+ ':hover': {
83
+ // @ts-expect-error — using tokens for explicit fallback usage.
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
85
+ color: "var(--ds-text, ".concat(colors.N500, ")")
86
+ },
87
+ ':active': {
88
+ // @ts-expect-error — using tokens for explicit fallback usage.
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
90
+ color: "var(--ds-text, ".concat(colors.N500, ")")
91
+ },
92
+ ':focus': {
93
+ // @ts-expect-error — using tokens for explicit fallback usage.
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- -- Ignored via go/DSP-18766
95
+ color: "var(--ds-text, ".concat(colors.N500, ")")
112
96
  }
113
97
  });
114
98
  var defaultRefreshedStyles = xcss({
@@ -120,15 +104,31 @@ var defaultRefreshedStyles = xcss({
120
104
  },
121
105
  ':visited': {
122
106
  color: 'color.text.subtle'
107
+ },
108
+ ':hover': {
109
+ color: 'color.text.subtle'
110
+ },
111
+ ':active': {
112
+ color: 'color.text.subtle'
113
+ },
114
+ ':focus': {
115
+ color: 'color.text.subtle'
123
116
  }
124
117
  });
125
118
  var primaryStyles = xcss({
126
119
  background: "var(--ds-background-brand-bold, #0052CC)",
127
- // @ts-expect-error
128
- color: "var(--ds-text-inverse, #FFFFFF)",
120
+ color: 'color.text.inverse',
129
121
  ':visited': {
130
- // @ts-expect-error
131
- color: "var(--ds-text-inverse, #FFFFFF)"
122
+ color: 'color.text.inverse'
123
+ },
124
+ ':hover': {
125
+ color: 'color.text.inverse'
126
+ },
127
+ ':active': {
128
+ color: 'color.text.inverse'
129
+ },
130
+ ':focus': {
131
+ color: 'color.text.inverse'
132
132
  }
133
133
  });
134
134
  var primaryInteractiveStyles = xcss({
@@ -150,6 +150,18 @@ var warningStyles = xcss({
150
150
  ':visited': {
151
151
  // @ts-expect-error
152
152
  color: "var(--ds-text-warning-inverse, #172B4D)"
153
+ },
154
+ ':hover': {
155
+ // @ts-expect-error
156
+ color: "var(--ds-text-warning-inverse, #172B4D)"
157
+ },
158
+ ':active': {
159
+ // @ts-expect-error
160
+ color: "var(--ds-text-warning-inverse, #172B4D)"
161
+ },
162
+ ':focus': {
163
+ // @ts-expect-error
164
+ color: "var(--ds-text-warning-inverse, #172B4D)"
153
165
  }
154
166
  });
155
167
  var warningInteractiveStyles = xcss({
@@ -169,6 +181,15 @@ var dangerStyles = xcss({
169
181
  color: 'color.text.inverse',
170
182
  ':visited': {
171
183
  color: 'color.text.inverse'
184
+ },
185
+ ':hover': {
186
+ color: 'color.text.inverse'
187
+ },
188
+ ':active': {
189
+ color: 'color.text.inverse'
190
+ },
191
+ ':focus': {
192
+ color: 'color.text.inverse'
172
193
  }
173
194
  });
174
195
  var dangerInteractiveStyles = xcss({
@@ -186,6 +207,15 @@ var discoveryStyles = xcss({
186
207
  color: 'color.text.inverse',
187
208
  ':visited': {
188
209
  color: 'color.text.inverse'
210
+ },
211
+ ':hover': {
212
+ color: 'color.text.inverse'
213
+ },
214
+ ':active': {
215
+ color: 'color.text.inverse'
216
+ },
217
+ ':focus': {
218
+ color: 'color.text.inverse'
189
219
  }
190
220
  });
191
221
  var discoveryInteractiveStyles = xcss({
@@ -205,6 +235,18 @@ var subtleStyles = xcss({
205
235
  ':visited': {
206
236
  // @ts-expect-error
207
237
  color: "var(--ds-text, #42526E)"
238
+ },
239
+ ':hover': {
240
+ // @ts-expect-error
241
+ color: "var(--ds-text, #42526E)"
242
+ },
243
+ ':active': {
244
+ // @ts-expect-error
245
+ color: "var(--ds-text, #42526E)"
246
+ },
247
+ ':focus': {
248
+ // @ts-expect-error
249
+ color: "var(--ds-text, #42526E)"
208
250
  }
209
251
  });
210
252
  var subtleRefreshedStyles = xcss({
@@ -212,6 +254,15 @@ var subtleRefreshedStyles = xcss({
212
254
  color: 'color.text.subtle',
213
255
  ':visited': {
214
256
  color: 'color.text.subtle'
257
+ },
258
+ ':hover': {
259
+ color: 'color.text.subtle'
260
+ },
261
+ ':active': {
262
+ color: 'color.text.subtle'
263
+ },
264
+ ':focus': {
265
+ color: 'color.text.subtle'
215
266
  }
216
267
  });
217
268
  var subtleInteractiveStyles = xcss({
@@ -237,8 +288,10 @@ var subtleInteractiveRefreshedStyles = xcss({
237
288
  }
238
289
  });
239
290
 
240
- // Required due to Jira's AUI CSS reset: https://product-fabric.atlassian.net/browse/DSP-15687
241
- var linkDecorationUnsetStyles = xcss({
291
+ // Reinforce existing styles with higher specificity
292
+ // to defend against global anchor styles from products,
293
+ // preventing issues in Jira and Confluence.
294
+ var linkDefensiveStyles = xcss({
242
295
  textDecoration: 'none',
243
296
  ':hover': {
244
297
  textDecoration: 'none'
@@ -248,28 +301,34 @@ var linkDecorationUnsetStyles = xcss({
248
301
  },
249
302
  ':focus': {
250
303
  textDecoration: 'none'
304
+ },
305
+ ':visited': {
306
+ textDecoration: 'none'
251
307
  }
252
308
  });
253
309
  var disabledStyles = xcss({
254
310
  cursor: 'not-allowed',
255
311
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
256
312
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
257
- // @ts-expect-error
258
- color: "var(--ds-text-disabled, #091E424F)",
313
+ color: 'color.text.disabled',
314
+ '::after': {
315
+ content: 'none'
316
+ },
317
+ ':visited': {
318
+ color: 'color.text.disabled'
319
+ },
259
320
  ':hover': {
260
321
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
261
322
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
262
- // @ts-expect-error
263
- color: "var(--ds-text-disabled, #091E424F)"
323
+ color: 'color.text.disabled'
264
324
  },
265
325
  ':active': {
266
326
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
267
327
  background: "var(--ds-background-disabled, ".concat(colors.N20A, ")"),
268
- // @ts-expect-error
269
- color: "var(--ds-text-disabled, #091E424F)"
328
+ color: 'color.text.disabled'
270
329
  },
271
- '::after': {
272
- content: 'none'
330
+ ':focus': {
331
+ color: 'color.text.disabled'
273
332
  }
274
333
  });
275
334
  var selectedStyles = xcss({
@@ -282,6 +341,21 @@ var selectedStyles = xcss({
282
341
  // @ts-expect-error
283
342
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
284
343
  color: "var(--ds-text-selected, ".concat(colors.N20, ")")
344
+ },
345
+ ':hover': {
346
+ // @ts-expect-error
347
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
348
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
349
+ },
350
+ ':active': {
351
+ // @ts-expect-error
352
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
353
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
354
+ },
355
+ ':focus': {
356
+ // @ts-expect-error
357
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
358
+ color: "var(--ds-text-selected, ".concat(colors.N20, ")")
285
359
  }
286
360
  });
287
361
  var selectedRefreshedStyles = xcss({
@@ -293,6 +367,15 @@ var selectedRefreshedStyles = xcss({
293
367
  },
294
368
  ':visited': {
295
369
  color: 'color.text.selected'
370
+ },
371
+ ':hover': {
372
+ color: 'color.text.selected'
373
+ },
374
+ ':active': {
375
+ color: 'color.text.selected'
376
+ },
377
+ ':focus': {
378
+ color: 'color.text.selected'
296
379
  }
297
380
  });
298
381
  var selectedInsideSplitButtonStyles = xcss({
@@ -383,17 +466,7 @@ var selectedDiscoveryStyles = xcss({
383
466
  background: "var(--ds-background-selected, #403294)"
384
467
  }
385
468
  });
386
-
387
- // If updating `spacingCompactStyles`, also update `spacingCompactStylesWithRem`.
388
469
  var spacingCompactStyles = xcss({
389
- columnGap: 'space.050',
390
- height: "".concat(24 / 14, "em"),
391
- paddingBlock: 'space.025',
392
- paddingInlineEnd: 'space.150',
393
- paddingInlineStart: 'space.150',
394
- verticalAlign: 'middle'
395
- });
396
- var spacingCompactStylesWithRem = xcss({
397
470
  columnGap: 'space.050',
398
471
  height: '1.5rem',
399
472
  paddingBlock: 'space.025',
@@ -410,25 +483,13 @@ var fullWidthStyles = xcss({
410
483
  var loadingStyles = xcss({
411
484
  cursor: 'progress'
412
485
  });
413
- // If updating `iconButtonStyles`, also update `iconButtonStylesWithRem`.
414
486
  var iconButtonStyles = xcss({
415
- height: "".concat(32 / 14, "em"),
416
- width: "".concat(32 / 14, "em"),
417
- paddingInlineEnd: 'space.0',
418
- paddingInlineStart: 'space.0'
419
- });
420
- var iconButtonStylesWithRem = xcss({
421
487
  height: '2rem',
422
488
  width: '2rem',
423
489
  paddingInlineEnd: 'space.0',
424
490
  paddingInlineStart: 'space.0'
425
491
  });
426
- // If updating `iconButtonCompactStyles`, also update `iconButtonCompactStylesWithRem`.
427
492
  var iconButtonCompactStyles = xcss({
428
- width: "".concat(24 / 14, "em"),
429
- height: "".concat(24 / 14, "em")
430
- });
431
- var iconButtonCompactStylesWithRem = xcss({
432
493
  width: '1.5rem',
433
494
  height: '1.5rem'
434
495
  });
@@ -478,6 +539,7 @@ var useButtonBase = function useButtonBase(_ref) {
478
539
  propAppearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
479
540
  _ref$autoFocus = _ref.autoFocus,
480
541
  autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
542
+ buttonType = _ref.buttonType,
481
543
  _ref$isDisabled = _ref.isDisabled,
482
544
  propIsDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
483
545
  _ref$isLoading = _ref.isLoading,
@@ -527,13 +589,13 @@ var useButtonBase = function useButtonBase(_ref) {
527
589
  useAutoFocus(localRef, autoFocus);
528
590
  return _objectSpread({
529
591
  ref: mergeRefs([localRef, ref]),
530
- xcss: [fg('platform_dst_button_replace_em_with_rem') ? buttonStylesWithRem : buttonStyles, appearance === 'default' && (fg('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && (fg('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && (fg('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && (fg('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), linkDecorationUnsetStyles, isSelected && (fg('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
592
+ xcss: [buttonStyles, appearance === 'default' && (fg('platform-component-visual-refresh') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && (fg('platform-component-visual-refresh') ? defaultInteractiveRefreshedStyles : defaultInteractiveStyles), appearance === 'primary' && primaryStyles, appearance === 'primary' && isInteractive && primaryInteractiveStyles, appearance === 'warning' && warningStyles, appearance === 'warning' && isInteractive && warningInteractiveStyles, appearance === 'danger' && dangerStyles, appearance === 'danger' && isInteractive && dangerInteractiveStyles, appearance === 'discovery' && discoveryStyles, appearance === 'discovery' && isInteractive && discoveryInteractiveStyles, appearance === 'subtle' && (fg('platform-component-visual-refresh') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && (fg('platform-component-visual-refresh') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), buttonType === 'link' && linkDefensiveStyles, isSelected && (fg('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
531
593
  // TODO: remove me once we kill color fallbacks
532
594
  isSelected && appearance === 'danger' && selectedDangerStyles,
533
595
  // TODO: remove me once we kill color fallbacks
534
596
  isSelected && appearance === 'warning' && selectedWarningStyles,
535
597
  // TODO: remove me once we kill color fallbacks
536
- isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && (fg('platform_dst_button_replace_em_with_rem') ? spacingCompactStylesWithRem : spacingCompactStyles), hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && (fg('platform_dst_button_replace_em_with_rem') ? iconButtonStylesWithRem : iconButtonStyles), isIconButton && spacing === 'compact' && (fg('platform_dst_button_replace_em_with_rem') ? iconButtonCompactStylesWithRem : iconButtonCompactStyles), shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
598
+ isSelected && appearance === 'discovery' && selectedDiscoveryStyles, isDisabled && disabledStyles, isCircle && !isSplitButton && circleStyles, spacing === 'compact' && spacingCompactStyles, hasIconBefore && buttonIconBeforeStyles, hasIconAfter && buttonIconAfterStyles, isIconButton && iconButtonStyles, isIconButton && spacing === 'compact' && iconButtonCompactStyles, shouldFitContainer && fullWidthStyles, isLoading && loadingStyles, isSplitButton && splitButtonStyles, isNavigationSplitButton && navigationSplitButtonStyles],
537
599
  isDisabled: isEffectivelyDisabled,
538
600
  children: /*#__PURE__*/React.createElement(SplitButtonContext.Provider, {
539
601
  value: undefined
@@ -125,7 +125,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
125
125
  action: 'clicked',
126
126
  componentName: 'button',
127
127
  packageName: "@atlaskit/button",
128
- packageVersion: "21.0.0",
128
+ packageVersion: "21.1.1",
129
129
  analyticsData: analyticsContext
130
130
  });
131
131
 
@@ -42,5 +42,5 @@ export type UseButtonBaseReturn<TagName extends HTMLElement> = {
42
42
  *
43
43
  * @private
44
44
  */
45
- declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, isDisabled: propIsDisabled, isLoading, isSelected: propIsSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, ref, shouldFitContainer, spacing: propSpacing, testId, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
45
+ declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, buttonType, isDisabled: propIsDisabled, isLoading, isSelected: propIsSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, ref, shouldFitContainer, spacing: propSpacing, testId, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
46
46
  export default useButtonBase;
@@ -42,5 +42,5 @@ export type UseButtonBaseReturn<TagName extends HTMLElement> = {
42
42
  *
43
43
  * @private
44
44
  */
45
- declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, isDisabled: propIsDisabled, isLoading, isSelected: propIsSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, ref, shouldFitContainer, spacing: propSpacing, testId, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
45
+ declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, buttonType, isDisabled: propIsDisabled, isLoading, isSelected: propIsSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, ref, shouldFitContainer, spacing: propSpacing, testId, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
46
46
  export default useButtonBase;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "21.0.0",
3
+ "version": "21.1.1",
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/"
@@ -87,13 +87,13 @@
87
87
  "@atlaskit/analytics-next": "^11.0.0",
88
88
  "@atlaskit/ds-lib": "^4.0.0",
89
89
  "@atlaskit/focus-ring": "^3.0.0",
90
- "@atlaskit/icon": "^24.0.0",
90
+ "@atlaskit/icon": "^24.1.0",
91
91
  "@atlaskit/interaction-context": "^3.0.0",
92
92
  "@atlaskit/platform-feature-flags": "^1.1.0",
93
- "@atlaskit/primitives": "^14.0.0",
93
+ "@atlaskit/primitives": "^14.1.0",
94
94
  "@atlaskit/spinner": "^18.0.0",
95
95
  "@atlaskit/theme": "^17.0.0",
96
- "@atlaskit/tokens": "^4.0.0",
96
+ "@atlaskit/tokens": "^4.2.0",
97
97
  "@atlaskit/tooltip": "^20.0.0",
98
98
  "@atlaskit/visually-hidden": "^2.0.0",
99
99
  "@babel/runtime": "^7.0.0",
@@ -107,7 +107,7 @@
107
107
  "@af/integration-testing": "*",
108
108
  "@af/visual-regression": "*",
109
109
  "@atlaskit/app-provider": "^2.0.0",
110
- "@atlaskit/checkbox": "^16.0.0",
110
+ "@atlaskit/checkbox": "^17.0.0",
111
111
  "@atlaskit/docs": "*",
112
112
  "@atlaskit/dropdown-menu": "^13.0.0",
113
113
  "@atlaskit/form": "^12.0.0",
@@ -116,7 +116,7 @@
116
116
  "@atlaskit/logo": "^16.0.0",
117
117
  "@atlaskit/modal-dialog": "^13.0.0",
118
118
  "@atlaskit/section-message": "*",
119
- "@atlaskit/select": "^19.0.0",
119
+ "@atlaskit/select": "^20.0.0",
120
120
  "@atlaskit/ssr": "*",
121
121
  "@atlaskit/toggle": "^15.0.0",
122
122
  "@atlaskit/visual-regression": "*",
@@ -132,9 +132,6 @@
132
132
  "platform-feature-flags": {
133
133
  "platform-component-visual-refresh": {
134
134
  "type": "boolean"
135
- },
136
- "platform_dst_button_replace_em_with_rem": {
137
- "type": "boolean"
138
135
  }
139
136
  }
140
137
  }