@atlaskit/button 18.4.1 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/cjs/containers/button-group.js +2 -8
  3. package/dist/cjs/new-button/containers/split-button/split-button.js +2 -2
  4. package/dist/cjs/new-button/variants/default/button.js +3 -7
  5. package/dist/cjs/new-button/variants/default/link.js +3 -7
  6. package/dist/cjs/new-button/variants/default/use-default-button.js +3 -7
  7. package/dist/cjs/new-button/variants/icon/button.js +2 -4
  8. package/dist/cjs/new-button/variants/icon/link.js +2 -4
  9. package/dist/cjs/new-button/variants/icon/use-icon-button.js +2 -4
  10. package/dist/cjs/new-button/variants/shared/icon-renderer.js +1 -4
  11. package/dist/cjs/new-button/variants/shared/use-button-base.js +2 -2
  12. package/dist/cjs/old-button/shared/button-base.js +1 -1
  13. package/dist/cjs/old-button/shared/css.js +3 -3
  14. package/dist/es2019/containers/button-group.js +1 -7
  15. package/dist/es2019/new-button/containers/split-button/split-button.js +2 -2
  16. package/dist/es2019/new-button/variants/default/button.js +3 -7
  17. package/dist/es2019/new-button/variants/default/link.js +3 -7
  18. package/dist/es2019/new-button/variants/default/use-default-button.js +3 -7
  19. package/dist/es2019/new-button/variants/icon/button.js +1 -3
  20. package/dist/es2019/new-button/variants/icon/link.js +1 -3
  21. package/dist/es2019/new-button/variants/icon/use-icon-button.js +2 -4
  22. package/dist/es2019/new-button/variants/shared/icon-renderer.js +1 -4
  23. package/dist/es2019/new-button/variants/shared/use-button-base.js +2 -2
  24. package/dist/es2019/old-button/shared/button-base.js +1 -1
  25. package/dist/es2019/old-button/shared/css.js +3 -3
  26. package/dist/esm/containers/button-group.js +2 -8
  27. package/dist/esm/new-button/containers/split-button/split-button.js +2 -2
  28. package/dist/esm/new-button/variants/default/button.js +4 -8
  29. package/dist/esm/new-button/variants/default/link.js +4 -8
  30. package/dist/esm/new-button/variants/default/use-default-button.js +3 -7
  31. package/dist/esm/new-button/variants/icon/button.js +2 -4
  32. package/dist/esm/new-button/variants/icon/link.js +2 -4
  33. package/dist/esm/new-button/variants/icon/use-icon-button.js +2 -4
  34. package/dist/esm/new-button/variants/shared/icon-renderer.js +1 -4
  35. package/dist/esm/new-button/variants/shared/use-button-base.js +2 -2
  36. package/dist/esm/old-button/shared/button-base.js +1 -1
  37. package/dist/esm/old-button/shared/css.js +3 -3
  38. package/dist/types/containers/button-group.d.ts +1 -8
  39. package/dist/types/new-button/variants/default/link.d.ts +1 -1
  40. package/dist/types/new-button/variants/default/types.d.ts +1 -15
  41. package/dist/types/new-button/variants/default/use-default-button.d.ts +1 -1
  42. package/dist/types/new-button/variants/icon/link.d.ts +1 -1
  43. package/dist/types/new-button/variants/icon/types.d.ts +1 -8
  44. package/dist/types/new-button/variants/icon/use-icon-button.d.ts +1 -1
  45. package/dist/types/new-button/variants/shared/icon-renderer.d.ts +1 -3
  46. package/dist/types-ts4.5/containers/button-group.d.ts +1 -8
  47. package/dist/types-ts4.5/new-button/variants/default/link.d.ts +1 -1
  48. package/dist/types-ts4.5/new-button/variants/default/types.d.ts +1 -15
  49. package/dist/types-ts4.5/new-button/variants/default/use-default-button.d.ts +1 -1
  50. package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +1 -1
  51. package/dist/types-ts4.5/new-button/variants/icon/types.d.ts +1 -8
  52. package/dist/types-ts4.5/new-button/variants/icon/use-icon-button.d.ts +1 -1
  53. package/dist/types-ts4.5/new-button/variants/shared/icon-renderer.d.ts +1 -3
  54. package/package.json +3 -23
@@ -217,7 +217,7 @@ export function getCss({
217
217
  transition: 'background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
218
218
  whiteSpace: 'nowrap',
219
219
  // dynamic styles
220
- ...(!fg('platform.design-system-team.component-visual-refresh_t8zbo') && baseColors),
220
+ ...(!fg('platform-component-visual-refresh') && baseColors),
221
221
  cursor: 'pointer',
222
222
  height: heights[spacing],
223
223
  lineHeight: lineHeights[spacing],
@@ -229,7 +229,7 @@ export function getCss({
229
229
  // Note: we cannot disable pointer events when there is an overlay.
230
230
  // That would be easy for styling, but it would start letting events through on disabled buttons
231
231
 
232
- ...(!fg('platform.design-system-team.component-visual-refresh_t8zbo') && {
232
+ ...(!fg('platform-component-visual-refresh') && {
233
233
  // Disabling visited styles (just using the base colors)
234
234
  '&:visited': {
235
235
  ...baseColors
@@ -289,7 +289,7 @@ export function getCss({
289
289
  }
290
290
  }),
291
291
  // dynamic colours for visual refresh:
292
- ...(fg('platform.design-system-team.component-visual-refresh_t8zbo') && (isSelected ? selectedStyles : {
292
+ ...(fg('platform-component-visual-refresh') && (isSelected ? selectedStyles : {
293
293
  ...(appearance === 'default' && defaultStyles),
294
294
  ...(appearance === 'primary' && primaryStyles),
295
295
  ...(appearance === 'link' && linkStyles),
@@ -15,8 +15,7 @@ var buttonGroupStyles = css({
15
15
  }
16
16
  });
17
17
  export default function ButtonGroup(_ref) {
18
- var appearance = _ref.appearance,
19
- children = _ref.children,
18
+ var children = _ref.children,
20
19
  testId = _ref.testId,
21
20
  label = _ref.label,
22
21
  titleId = _ref.titleId;
@@ -32,11 +31,6 @@ export default function ButtonGroup(_ref) {
32
31
  }
33
32
  return jsx(Fragment, {
34
33
  key: idx
35
- }, appearance ?
36
- /*#__PURE__*/
37
- // eslint-disable-next-line @repo/internal/react/no-clone-element
38
- React.cloneElement(child, {
39
- appearance: appearance
40
- }) : child);
34
+ }, child);
41
35
  }));
42
36
  }
@@ -72,7 +72,7 @@ export var Divider = function Divider(_ref) {
72
72
  return (
73
73
  // I find it funny to provide a div for Divider
74
74
  jsx("div", {
75
- css: [baseDividerStyles, dividerHeight[spacing], isDisabled && (fg('platform.design-system-team.component-visual-refresh_t8zbo') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && dividerAppearance[appearance], fg('platform.design-system-team.component-visual-refresh_t8zbo') && dividerRefreshedOffsetStyles]
75
+ css: [baseDividerStyles, dividerHeight[spacing], isDisabled && (fg('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && dividerAppearance[appearance], fg('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
76
76
  })
77
77
  );
78
78
  };
@@ -113,7 +113,7 @@ export var SplitButtonContainer = function SplitButtonContainer(_ref2) {
113
113
  _ref2$isDisabled = _ref2.isDisabled,
114
114
  isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled;
115
115
  return jsx("div", {
116
- css: [appearance === 'default' && !isDisabled && fg('platform.design-system-team.component-visual-refresh_t8zbo') && defaultAppearanceContainerStyles, splitButtonStyles]
116
+ css: [appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') && defaultAppearanceContainerStyles, splitButtonStyles]
117
117
  }, children);
118
118
  };
119
119
 
@@ -1,9 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId", "type", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"],
3
+ var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId", "type"],
4
4
  _excluded2 = ["className", "css", "as", "style"];
5
5
  import React from 'react';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import Pressable from '@atlaskit/primitives/pressable';
8
8
  import useDefaultButton from './use-default-button';
9
9
  /**
@@ -43,8 +43,6 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
43
43
  testId = _ref.testId,
44
44
  _ref$type = _ref.type,
45
45
  type = _ref$type === void 0 ? 'button' : _ref$type,
46
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
47
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
48
46
  unsafeRest = _objectWithoutProperties(_ref, _excluded);
49
47
  // @ts-expect-error
50
48
  var _className = unsafeRest.className,
@@ -52,7 +50,7 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
52
50
  _as = unsafeRest.as,
53
51
  _style = unsafeRest.style,
54
52
  saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
55
- var rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
53
+ var rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
56
54
  var baseProps = useDefaultButton({
57
55
  ariaLabel: ariaLabel,
58
56
  ariaLabelledBy: ariaLabelledBy,
@@ -80,9 +78,7 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
80
78
  ref: ref,
81
79
  shouldFitContainer: shouldFitContainer,
82
80
  spacing: spacing,
83
- testId: testId,
84
- UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
85
- UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
81
+ testId: testId
86
82
  });
87
83
  return /*#__PURE__*/React.createElement(Pressable
88
84
  // TODO: Remove spread props
@@ -1,9 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"],
3
+ var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId"],
4
4
  _excluded2 = ["className", "css", "as", "style"];
5
5
  import React, { forwardRef, memo } from 'react';
6
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
7
7
  import Anchor from '@atlaskit/primitives/anchor';
8
8
  import useDefaultButton from './use-default-button';
9
9
  var LinkButtonBase = function LinkButtonBase(_ref, ref) {
@@ -32,8 +32,6 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
32
32
  shouldFitContainer = _ref.shouldFitContainer,
33
33
  spacing = _ref.spacing,
34
34
  testId = _ref.testId,
35
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
36
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
37
35
  unsafeRest = _objectWithoutProperties(_ref, _excluded);
38
36
  // @ts-expect-error
39
37
  var _className = unsafeRest.className,
@@ -41,7 +39,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
41
39
  _as = unsafeRest.as,
42
40
  _style = unsafeRest.style,
43
41
  saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
44
- var rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
42
+ var rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
45
43
  var baseProps = useDefaultButton({
46
44
  analyticsContext: analyticsContext,
47
45
  appearance: appearance,
@@ -68,9 +66,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
68
66
  ref: ref,
69
67
  shouldFitContainer: shouldFitContainer,
70
68
  spacing: spacing,
71
- testId: testId,
72
- UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
73
- UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
69
+ testId: testId
74
70
  });
75
71
  return /*#__PURE__*/React.createElement(Anchor
76
72
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -39,9 +39,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
39
39
  ref = _ref.ref,
40
40
  shouldFitContainer = _ref.shouldFitContainer,
41
41
  spacing = _ref.spacing,
42
- testId = _ref.testId,
43
- UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
44
- UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size;
42
+ testId = _ref.testId;
45
43
  var baseProps = useButtonBase({
46
44
  analyticsContext: analyticsContext,
47
45
  appearance: appearance,
@@ -54,8 +52,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
54
52
  position: "before",
55
53
  isLoading: isLoading
56
54
  }, /*#__PURE__*/React.createElement(IconRenderer, {
57
- icon: iconBefore,
58
- size: UNSAFE_iconBefore_size
55
+ icon: iconBefore
59
56
  })), children && /*#__PURE__*/React.createElement(Content, {
60
57
  isLoading: isLoading
61
58
  }, children), iconAfter && /*#__PURE__*/React.createElement(Content, {
@@ -63,8 +60,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
63
60
  position: "after",
64
61
  isLoading: isLoading
65
62
  }, /*#__PURE__*/React.createElement(IconRenderer, {
66
- icon: iconAfter,
67
- size: UNSAFE_iconAfter_size
63
+ icon: iconAfter
68
64
  }))),
69
65
  interactionName: interactionName,
70
66
  isDisabled: isDisabled,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["aria-label", "aria-labelledby", "analyticsContext", "appearance", "autoFocus", "icon", "interactionName", "isDisabled", "isLoading", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shape", "spacing", "testId", "tooltip", "type", "UNSAFE_size"],
3
+ var _excluded = ["aria-label", "aria-labelledby", "analyticsContext", "appearance", "autoFocus", "icon", "interactionName", "isDisabled", "isLoading", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shape", "spacing", "testId", "tooltip", "type"],
4
4
  _excluded2 = ["className", "css", "as", "style"];
5
5
  import React from 'react';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
@@ -46,7 +46,6 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
46
46
  tooltip = _ref.tooltip,
47
47
  _ref$type = _ref.type,
48
48
  type = _ref$type === void 0 ? 'button' : _ref$type,
49
- UNSAFE_size = _ref.UNSAFE_size,
50
49
  unsafeRest = _objectWithoutProperties(_ref, _excluded);
51
50
  // @ts-expect-error
52
51
  var _className = unsafeRest.className,
@@ -85,8 +84,7 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
85
84
  ref: ref,
86
85
  shape: shape,
87
86
  spacing: spacing,
88
- testId: testId,
89
- UNSAFE_size: UNSAFE_size
87
+ testId: testId
90
88
  });
91
89
  if (!isTooltipDisabled) {
92
90
  var _tooltip$content;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["aria-label", "aria-labelledby", "analyticsContext", "appearance", "autoFocus", "href", "icon", "interactionName", "isDisabled", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shape", "spacing", "testId", "tooltip", "UNSAFE_size"],
3
+ var _excluded = ["aria-label", "aria-labelledby", "analyticsContext", "appearance", "autoFocus", "href", "icon", "interactionName", "isDisabled", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shape", "spacing", "testId", "tooltip"],
4
4
  _excluded2 = ["className", "css", "as", "style"];
5
5
  import React, { forwardRef, memo } from 'react';
6
6
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
@@ -35,7 +35,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
35
35
  spacing = _ref.spacing,
36
36
  testId = _ref.testId,
37
37
  tooltip = _ref.tooltip,
38
- UNSAFE_size = _ref.UNSAFE_size,
39
38
  unsafeRest = _objectWithoutProperties(_ref, _excluded);
40
39
  // @ts-expect-error
41
40
  var _className = unsafeRest.className,
@@ -68,8 +67,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
68
67
  ref: ref,
69
68
  shape: shape,
70
69
  spacing: spacing,
71
- testId: testId,
72
- UNSAFE_size: UNSAFE_size
70
+ testId: testId
73
71
  });
74
72
  if (!isTooltipDisabled) {
75
73
  var _tooltip$content;
@@ -40,8 +40,7 @@ var useIconButton = function useIconButton(_ref) {
40
40
  shape = _ref.shape,
41
41
  shouldFitContainer = _ref.shouldFitContainer,
42
42
  spacing = _ref.spacing,
43
- testId = _ref.testId,
44
- UNSAFE_size = _ref.UNSAFE_size;
43
+ testId = _ref.testId;
45
44
  var isCircle = shape === 'circle';
46
45
  var baseProps = useButtonBase({
47
46
  analyticsContext: analyticsContext,
@@ -54,8 +53,7 @@ var useIconButton = function useIconButton(_ref) {
54
53
  type: "icon",
55
54
  isLoading: isLoading
56
55
  }, /*#__PURE__*/React.createElement(IconRenderer, {
57
- icon: icon,
58
- size: UNSAFE_size
56
+ icon: icon
59
57
  }), /*#__PURE__*/React.createElement(VisuallyHidden, null, label)),
60
58
  interactionName: interactionName,
61
59
  isDisabled: isDisabled,
@@ -15,15 +15,12 @@ function isIconRenderProp(func) {
15
15
  *
16
16
  */
17
17
  var IconRenderer = function IconRenderer(_ref) {
18
- var Icon = _ref.icon,
19
- size = _ref.size;
18
+ var Icon = _ref.icon;
20
19
  return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
21
20
  label: '',
22
- size: size,
23
21
  color: 'currentColor'
24
22
  }) : /*#__PURE__*/React.createElement(Icon, {
25
23
  label: "",
26
- size: size,
27
24
  color: 'currentColor'
28
25
  }));
29
26
  };
@@ -549,7 +549,7 @@ var useButtonBase = function useButtonBase(_ref) {
549
549
  var isSplitButton = Boolean(splitButtonContext);
550
550
  var isNavigationSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isNavigationSplitButton) || false;
551
551
  var isDefaultAppearanceSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) === 'default';
552
- var appearance = isDefaultAppearanceSplitButton && fg('platform.design-system-team.component-visual-refresh_t8zbo') ? 'subtle' : (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) || propAppearance;
552
+ var appearance = isDefaultAppearanceSplitButton && fg('platform-component-visual-refresh') ? 'subtle' : (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) || propAppearance;
553
553
  var spacing = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.spacing) || propSpacing;
554
554
  var isDisabled = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isDisabled) || propIsDisabled;
555
555
  var isInteractive = !isDisabled && !isLoading;
@@ -559,7 +559,7 @@ var useButtonBase = function useButtonBase(_ref) {
559
559
  useAutoFocus(localRef, autoFocus);
560
560
  return _objectSpread({
561
561
  ref: mergeRefs([localRef, ref]),
562
- xcss: [fg('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : hardCodedButtonStyles, buttonStyles, appearance === 'default' && (fg('platform.design-system-team.component-visual-refresh_t8zbo') ? defaultRefreshedStyles : defaultStyles), appearance === 'default' && isInteractive && (fg('platform.design-system-team.component-visual-refresh_t8zbo') ? 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.design-system-team.component-visual-refresh_t8zbo') ? subtleRefreshedStyles : subtleStyles), appearance === 'subtle' && isInteractive && (fg('platform.design-system-team.component-visual-refresh_t8zbo') ? subtleInteractiveRefreshedStyles : subtleInteractiveStyles), appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && (fg('platform.design-system-team.component-visual-refresh_t8zbo') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
562
+ xcss: [fg('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : hardCodedButtonStyles, 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), appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && (fg('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
563
563
  // TODO: remove me once we kill color fallbacks
564
564
  isSelected && appearance === 'danger' && selectedDangerStyles,
565
565
  // TODO: remove me once we kill color fallbacks
@@ -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: "18.4.1",
128
+ packageVersion: "19.0.0",
129
129
  analyticsData: analyticsContext
130
130
  });
131
131
 
@@ -214,7 +214,7 @@ export function getCss(_ref3) {
214
214
  textDecoration: 'none',
215
215
  transition: 'background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
216
216
  whiteSpace: 'nowrap'
217
- }, !fg('platform.design-system-team.component-visual-refresh_t8zbo') && baseColors), {}, {
217
+ }, !fg('platform-component-visual-refresh') && baseColors), {}, {
218
218
  cursor: 'pointer',
219
219
  height: heights[spacing],
220
220
  lineHeight: lineHeights[spacing],
@@ -223,7 +223,7 @@ export function getCss(_ref3) {
223
223
  width: shouldFitContainer ? '100%' : 'auto',
224
224
  // justifyContent required for shouldFitContainer buttons with an icon inside
225
225
  justifyContent: 'center'
226
- }, !fg('platform.design-system-team.component-visual-refresh_t8zbo') && _objectSpread(_objectSpread({
226
+ }, !fg('platform-component-visual-refresh') && _objectSpread(_objectSpread({
227
227
  // Disabling visited styles (just using the base colors)
228
228
  '&:visited': _objectSpread({}, baseColors),
229
229
  '&:hover': _objectSpread(_objectSpread({}, getColors({
@@ -272,7 +272,7 @@ export function getCss(_ref3) {
272
272
  key: isSelected ? 'selected' : 'default',
273
273
  mode: mode
274
274
  }))
275
- })), fg('platform.design-system-team.component-visual-refresh_t8zbo') && (isSelected ? selectedStyles : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, appearance === 'default' && defaultStyles), appearance === 'primary' && primaryStyles), appearance === 'link' && linkStyles), appearance === 'subtle' && subtleStyles), appearance === 'subtle-link' && subtleLinkStyles), appearance === 'warning' && warningStyles), appearance === 'danger' && dangerStyles), {}, {
275
+ })), fg('platform-component-visual-refresh') && (isSelected ? selectedStyles : _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, appearance === 'default' && defaultStyles), appearance === 'primary' && primaryStyles), appearance === 'link' && linkStyles), appearance === 'subtle' && subtleStyles), appearance === 'subtle-link' && subtleLinkStyles), appearance === 'warning' && warningStyles), appearance === 'danger' && dangerStyles), {}, {
276
276
  '&[disabled]': {
277
277
  color: "var(--ds-text-disabled, #091E424F)",
278
278
  backgroundColor: HAS_DISABLED_BACKGROUND.includes(appearance) ? "var(--ds-background-disabled, #091E4208)" : 'transparent',
@@ -4,14 +4,7 @@
4
4
  /** @jsx jsx */
5
5
  import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
- import { type Appearance } from '../old-button/types';
8
7
  export type ButtonGroupProps = {
9
- /**
10
- * The appearance to apply to all buttons.
11
- *
12
- * @deprecated This prop is deprecated and will be removed in an upcoming major version. Apply the `appearance` prop on each button instead.
13
- */
14
- appearance?: Appearance;
15
8
  /**
16
9
  * The buttons to render inside the button group.
17
10
  */
@@ -31,4 +24,4 @@ export type ButtonGroupProps = {
31
24
  */
32
25
  titleId?: string;
33
26
  };
34
- export default function ButtonGroup({ appearance, children, testId, label, titleId, }: ButtonGroupProps): jsx.JSX.Element;
27
+ export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): jsx.JSX.Element;
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
2
2
  import { type AdditionalDefaultLinkVariantProps, type CommonLinkVariantProps } from '../types';
3
3
  import { type CommonDefaultButtonProps } from './types';
4
4
  export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
5
- declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
5
+ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
6
6
  /**
7
7
  * __Link Button__
8
8
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type ButtonSpacing, type IconProp, type IconSize } from '../types';
2
+ import { type ButtonSpacing, type IconProp } from '../types';
3
3
  export type CommonDefaultButtonProps = {
4
4
  /**
5
5
  * Text content to be rendered in the button.
@@ -9,24 +9,10 @@ export type CommonDefaultButtonProps = {
9
9
  * Places an icon within the button, after the button's text.
10
10
  */
11
11
  iconAfter?: IconProp;
12
- /**
13
- * @deprecated Prefer `iconAfter` render prop for icon customizations.
14
- *
15
- * Set the size of the icon after. `medium` is default, so it does not need to be specified.
16
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API
17
- */
18
- UNSAFE_iconAfter_size?: IconSize;
19
12
  /**
20
13
  * Places an icon within the button, before the button's text.
21
14
  */
22
15
  iconBefore?: IconProp;
23
- /**
24
- * @deprecated Prefer `iconBefore` render prop for icon customizations.
25
- *
26
- * Set the size of the icon before. `medium` is default, so it does not need to be specified.
27
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API
28
- */
29
- UNSAFE_iconBefore_size?: IconSize;
30
16
  /**
31
17
  * Option to fit button width to its parent width.
32
18
  */
@@ -12,5 +12,5 @@ type UseButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>
12
12
  *
13
13
  * @private
14
14
  */
15
- declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter, iconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
15
+ declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter, iconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shouldFitContainer, spacing, testId, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
16
16
  export default useDefaultButton;
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
2
2
  import { type CommonLinkVariantProps } from '../types';
3
3
  import { type CommonIconButtonProps } from './types';
4
4
  export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & CommonLinkVariantProps<RouterLinkConfig>;
5
- declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, UNSAFE_size, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
5
+ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
6
6
  /**
7
7
  * __Link Icon Button__
8
8
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type TooltipProps } from '@atlaskit/tooltip';
3
- import { type IconButtonAppearance, type IconButtonSpacing, type IconProp, type IconSize } from '../types';
3
+ import { type IconButtonAppearance, type IconButtonSpacing, type IconProp } from '../types';
4
4
  export type CommonIconButtonProps = {
5
5
  'aria-label'?: never;
6
6
  /**
@@ -31,11 +31,4 @@ export type CommonIconButtonProps = {
31
31
  * Props passed down to the Tooltip component.
32
32
  */
33
33
  tooltip?: Partial<Omit<TooltipProps, 'children'>>;
34
- /**
35
- * @deprecated Prefer `icon` render prop for icon customizations.
36
- *
37
- * Set the size of the icon. `medium` is default, so it does not need to be specified.
38
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API.
39
- */
40
- UNSAFE_size?: IconSize;
41
34
  };
@@ -12,5 +12,5 @@ type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagN
12
12
  *
13
13
  * @private
14
14
  */
15
- declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shape, shouldFitContainer, spacing, testId, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
15
+ declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shape, shouldFitContainer, spacing, testId, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
16
16
  export default useIconButton;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { type IconProps, type UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
2
  import { type IconProp } from '../types';
4
3
  /**
5
4
  * __Icon renderer__
@@ -7,8 +6,7 @@ import { type IconProp } from '../types';
7
6
  * Used to support render props with icons.
8
7
  *
9
8
  */
10
- declare const IconRenderer: ({ icon: Icon, size, }: {
9
+ declare const IconRenderer: ({ icon: Icon }: {
11
10
  icon: IconProp;
12
- size: IconProps['size'] | UNSAFE_NewIconProps['LEGACY_size'];
13
11
  }) => JSX.Element;
14
12
  export default IconRenderer;
@@ -4,14 +4,7 @@
4
4
  /** @jsx jsx */
5
5
  import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
- import { type Appearance } from '../old-button/types';
8
7
  export type ButtonGroupProps = {
9
- /**
10
- * The appearance to apply to all buttons.
11
- *
12
- * @deprecated This prop is deprecated and will be removed in an upcoming major version. Apply the `appearance` prop on each button instead.
13
- */
14
- appearance?: Appearance;
15
8
  /**
16
9
  * The buttons to render inside the button group.
17
10
  */
@@ -31,4 +24,4 @@ export type ButtonGroupProps = {
31
24
  */
32
25
  titleId?: string;
33
26
  };
34
- export default function ButtonGroup({ appearance, children, testId, label, titleId, }: ButtonGroupProps): jsx.JSX.Element;
27
+ export default function ButtonGroup({ children, testId, label, titleId }: ButtonGroupProps): jsx.JSX.Element;
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
2
2
  import { type AdditionalDefaultLinkVariantProps, type CommonLinkVariantProps } from '../types';
3
3
  import { type CommonDefaultButtonProps } from './types';
4
4
  export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
5
- declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
5
+ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
6
6
  /**
7
7
  * __Link Button__
8
8
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type ButtonSpacing, type IconProp, type IconSize } from '../types';
2
+ import { type ButtonSpacing, type IconProp } from '../types';
3
3
  export type CommonDefaultButtonProps = {
4
4
  /**
5
5
  * Text content to be rendered in the button.
@@ -9,24 +9,10 @@ export type CommonDefaultButtonProps = {
9
9
  * Places an icon within the button, after the button's text.
10
10
  */
11
11
  iconAfter?: IconProp;
12
- /**
13
- * @deprecated Prefer `iconAfter` render prop for icon customizations.
14
- *
15
- * Set the size of the icon after. `medium` is default, so it does not need to be specified.
16
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API
17
- */
18
- UNSAFE_iconAfter_size?: IconSize;
19
12
  /**
20
13
  * Places an icon within the button, before the button's text.
21
14
  */
22
15
  iconBefore?: IconProp;
23
- /**
24
- * @deprecated Prefer `iconBefore` render prop for icon customizations.
25
- *
26
- * Set the size of the icon before. `medium` is default, so it does not need to be specified.
27
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API
28
- */
29
- UNSAFE_iconBefore_size?: IconSize;
30
16
  /**
31
17
  * Option to fit button width to its parent width.
32
18
  */
@@ -12,5 +12,5 @@ type UseButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>
12
12
  *
13
13
  * @private
14
14
  */
15
- declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter, iconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
15
+ declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter, iconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shouldFitContainer, spacing, testId, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
16
16
  export default useDefaultButton;
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
2
2
  import { type CommonLinkVariantProps } from '../types';
3
3
  import { type CommonIconButtonProps } from './types';
4
4
  export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & CommonLinkVariantProps<RouterLinkConfig>;
5
- declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, UNSAFE_size, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
5
+ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
6
6
  /**
7
7
  * __Link Icon Button__
8
8
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type TooltipProps } from '@atlaskit/tooltip';
3
- import { type IconButtonAppearance, type IconButtonSpacing, type IconProp, type IconSize } from '../types';
3
+ import { type IconButtonAppearance, type IconButtonSpacing, type IconProp } from '../types';
4
4
  export type CommonIconButtonProps = {
5
5
  'aria-label'?: never;
6
6
  /**
@@ -31,11 +31,4 @@ export type CommonIconButtonProps = {
31
31
  * Props passed down to the Tooltip component.
32
32
  */
33
33
  tooltip?: Partial<Omit<TooltipProps, 'children'>>;
34
- /**
35
- * @deprecated Prefer `icon` render prop for icon customizations.
36
- *
37
- * Set the size of the icon. `medium` is default, so it does not need to be specified.
38
- * This is UNSAFE as it will be removed in future in favor of a 100% bounded API.
39
- */
40
- UNSAFE_size?: IconSize;
41
34
  };
@@ -12,5 +12,5 @@ type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagN
12
12
  *
13
13
  * @private
14
14
  */
15
- declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shape, shouldFitContainer, spacing, testId, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
15
+ declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, ref, shape, shouldFitContainer, spacing, testId, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
16
16
  export default useIconButton;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { type IconProps, type UNSAFE_NewIconProps } from '@atlaskit/icon/types';
3
2
  import { type IconProp } from '../types';
4
3
  /**
5
4
  * __Icon renderer__
@@ -7,8 +6,7 @@ import { type IconProp } from '../types';
7
6
  * Used to support render props with icons.
8
7
  *
9
8
  */
10
- declare const IconRenderer: ({ icon: Icon, size, }: {
9
+ declare const IconRenderer: ({ icon: Icon }: {
11
10
  icon: IconProp;
12
- size: IconProps['size'] | UNSAFE_NewIconProps['LEGACY_size'];
13
11
  }) => JSX.Element;
14
12
  export default IconRenderer;