@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.
- package/CHANGELOG.md +46 -0
- package/dist/cjs/containers/button-group.js +2 -8
- package/dist/cjs/new-button/containers/split-button/split-button.js +2 -2
- package/dist/cjs/new-button/variants/default/button.js +3 -7
- package/dist/cjs/new-button/variants/default/link.js +3 -7
- package/dist/cjs/new-button/variants/default/use-default-button.js +3 -7
- package/dist/cjs/new-button/variants/icon/button.js +2 -4
- package/dist/cjs/new-button/variants/icon/link.js +2 -4
- package/dist/cjs/new-button/variants/icon/use-icon-button.js +2 -4
- package/dist/cjs/new-button/variants/shared/icon-renderer.js +1 -4
- package/dist/cjs/new-button/variants/shared/use-button-base.js +2 -2
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/cjs/old-button/shared/css.js +3 -3
- package/dist/es2019/containers/button-group.js +1 -7
- package/dist/es2019/new-button/containers/split-button/split-button.js +2 -2
- package/dist/es2019/new-button/variants/default/button.js +3 -7
- package/dist/es2019/new-button/variants/default/link.js +3 -7
- package/dist/es2019/new-button/variants/default/use-default-button.js +3 -7
- package/dist/es2019/new-button/variants/icon/button.js +1 -3
- package/dist/es2019/new-button/variants/icon/link.js +1 -3
- package/dist/es2019/new-button/variants/icon/use-icon-button.js +2 -4
- package/dist/es2019/new-button/variants/shared/icon-renderer.js +1 -4
- package/dist/es2019/new-button/variants/shared/use-button-base.js +2 -2
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/es2019/old-button/shared/css.js +3 -3
- package/dist/esm/containers/button-group.js +2 -8
- package/dist/esm/new-button/containers/split-button/split-button.js +2 -2
- package/dist/esm/new-button/variants/default/button.js +4 -8
- package/dist/esm/new-button/variants/default/link.js +4 -8
- package/dist/esm/new-button/variants/default/use-default-button.js +3 -7
- package/dist/esm/new-button/variants/icon/button.js +2 -4
- package/dist/esm/new-button/variants/icon/link.js +2 -4
- package/dist/esm/new-button/variants/icon/use-icon-button.js +2 -4
- package/dist/esm/new-button/variants/shared/icon-renderer.js +1 -4
- package/dist/esm/new-button/variants/shared/use-button-base.js +2 -2
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/esm/old-button/shared/css.js +3 -3
- package/dist/types/containers/button-group.d.ts +1 -8
- package/dist/types/new-button/variants/default/link.d.ts +1 -1
- package/dist/types/new-button/variants/default/types.d.ts +1 -15
- package/dist/types/new-button/variants/default/use-default-button.d.ts +1 -1
- package/dist/types/new-button/variants/icon/link.d.ts +1 -1
- package/dist/types/new-button/variants/icon/types.d.ts +1 -8
- package/dist/types/new-button/variants/icon/use-icon-button.d.ts +1 -1
- package/dist/types/new-button/variants/shared/icon-renderer.d.ts +1 -3
- package/dist/types-ts4.5/containers/button-group.d.ts +1 -8
- package/dist/types-ts4.5/new-button/variants/default/link.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/default/types.d.ts +1 -15
- package/dist/types-ts4.5/new-button/variants/default/use-default-button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/icon/types.d.ts +1 -8
- package/dist/types-ts4.5/new-button/variants/icon/use-icon-button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/shared/icon-renderer.d.ts +1 -3
- package/package.json +3 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 19.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#120669](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120669)
|
|
8
|
+
[`9e1c531090ea4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e1c531090ea4) -
|
|
9
|
+
Removed these deprecated props for overriding icon sizes:
|
|
10
|
+
|
|
11
|
+
- `UNSAFE_size`
|
|
12
|
+
- `UNSAFE_iconBefore_size`
|
|
13
|
+
- `UNSAFE_iconAfter_size`
|
|
14
|
+
|
|
15
|
+
See
|
|
16
|
+
[the examples for overriding icon props](https://atlassian.design/components/button/examples#overriding-icon-props)
|
|
17
|
+
for the new method of customizing icon sizes in buttons. To automate migration of these props, use
|
|
18
|
+
[the button codemod](https://atlassian.design/components/button/button-legacy/migration-guide#use-the-codemod-for-automated-migration-assistance).
|
|
19
|
+
|
|
20
|
+
- [#121331](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121331)
|
|
21
|
+
[`a8c984f9b3956`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a8c984f9b3956) -
|
|
22
|
+
ButtonGroup's deprecated `appearance` prop has been removed. Apply the `appearance` prop on each
|
|
23
|
+
button instead.
|
|
24
|
+
|
|
25
|
+
**Before**:
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
<ButtonGroup appearance="primary">
|
|
29
|
+
<Button>First button</Button>
|
|
30
|
+
<Button>Second button</Button>
|
|
31
|
+
<Button>Third button</Button>
|
|
32
|
+
</ButtonGroup>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**After**:
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
<ButtonGroup>
|
|
39
|
+
<Button appearance="primary">First button</Button>
|
|
40
|
+
<Button appearance="primary">Second button</Button>
|
|
41
|
+
<Button appearance="primary">Third button</Button>
|
|
42
|
+
</ButtonGroup>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies
|
|
48
|
+
|
|
3
49
|
## 18.4.1
|
|
4
50
|
|
|
5
51
|
### Patch Changes
|
|
@@ -25,8 +25,7 @@ var buttonGroupStyles = (0, _react2.css)({
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
function ButtonGroup(_ref) {
|
|
28
|
-
var
|
|
29
|
-
children = _ref.children,
|
|
28
|
+
var children = _ref.children,
|
|
30
29
|
testId = _ref.testId,
|
|
31
30
|
label = _ref.label,
|
|
32
31
|
titleId = _ref.titleId;
|
|
@@ -42,11 +41,6 @@ function ButtonGroup(_ref) {
|
|
|
42
41
|
}
|
|
43
42
|
return (0, _react2.jsx)(_react.Fragment, {
|
|
44
43
|
key: idx
|
|
45
|
-
},
|
|
46
|
-
/*#__PURE__*/
|
|
47
|
-
// eslint-disable-next-line @repo/internal/react/no-clone-element
|
|
48
|
-
_react.default.cloneElement(child, {
|
|
49
|
-
appearance: appearance
|
|
50
|
-
}) : child);
|
|
44
|
+
}, child);
|
|
51
45
|
}));
|
|
52
46
|
}
|
|
@@ -79,7 +79,7 @@ var Divider = exports.Divider = function Divider(_ref) {
|
|
|
79
79
|
return (
|
|
80
80
|
// I find it funny to provide a div for Divider
|
|
81
81
|
(0, _react.jsx)("div", {
|
|
82
|
-
css: [baseDividerStyles, dividerHeight[spacing], isDisabled && ((0, _platformFeatureFlags.fg)('platform
|
|
82
|
+
css: [baseDividerStyles, dividerHeight[spacing], isDisabled && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? dividerDisabledRefreshedStyles : dividerDisabledStyles), !isDisabled && dividerAppearance[appearance], (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && dividerRefreshedOffsetStyles]
|
|
83
83
|
})
|
|
84
84
|
);
|
|
85
85
|
};
|
|
@@ -120,7 +120,7 @@ var SplitButtonContainer = exports.SplitButtonContainer = function SplitButtonCo
|
|
|
120
120
|
_ref2$isDisabled = _ref2.isDisabled,
|
|
121
121
|
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled;
|
|
122
122
|
return (0, _react.jsx)("div", {
|
|
123
|
-
css: [appearance === 'default' && !isDisabled && (0, _platformFeatureFlags.fg)('platform
|
|
123
|
+
css: [appearance === 'default' && !isDisabled && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && defaultAppearanceContainerStyles, splitButtonStyles]
|
|
124
124
|
}, children);
|
|
125
125
|
};
|
|
126
126
|
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
13
13
|
var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
|
|
14
|
-
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"
|
|
14
|
+
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"],
|
|
15
15
|
_excluded2 = ["className", "css", "as", "style"];
|
|
16
16
|
/**
|
|
17
17
|
* __Button__
|
|
@@ -50,8 +50,6 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
50
50
|
testId = _ref.testId,
|
|
51
51
|
_ref$type = _ref.type,
|
|
52
52
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
53
|
-
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
54
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
55
53
|
unsafeRest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
56
54
|
// @ts-expect-error
|
|
57
55
|
var _className = unsafeRest.className,
|
|
@@ -59,7 +57,7 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
59
57
|
_as = unsafeRest.as,
|
|
60
58
|
_style = unsafeRest.style,
|
|
61
59
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
62
|
-
var rest = (0, _platformFeatureFlags.
|
|
60
|
+
var rest = (0, _platformFeatureFlags.fg)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
63
61
|
var baseProps = (0, _useDefaultButton.default)({
|
|
64
62
|
ariaLabel: ariaLabel,
|
|
65
63
|
ariaLabelledBy: ariaLabelledBy,
|
|
@@ -87,9 +85,7 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
87
85
|
ref: ref,
|
|
88
86
|
shouldFitContainer: shouldFitContainer,
|
|
89
87
|
spacing: spacing,
|
|
90
|
-
testId: testId
|
|
91
|
-
UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
|
|
92
|
-
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
|
|
88
|
+
testId: testId
|
|
93
89
|
});
|
|
94
90
|
return /*#__PURE__*/_react.default.createElement(_pressable.default
|
|
95
91
|
// TODO: Remove spread props
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
13
|
var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
|
|
14
14
|
var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
|
|
15
|
-
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"
|
|
15
|
+
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"],
|
|
16
16
|
_excluded2 = ["className", "css", "as", "style"];
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
18
|
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 && Object.prototype.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; }
|
|
@@ -42,8 +42,6 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
42
42
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
43
43
|
spacing = _ref.spacing,
|
|
44
44
|
testId = _ref.testId,
|
|
45
|
-
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
46
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
47
45
|
unsafeRest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
46
|
// @ts-expect-error
|
|
49
47
|
var _className = unsafeRest.className,
|
|
@@ -51,7 +49,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
51
49
|
_as = unsafeRest.as,
|
|
52
50
|
_style = unsafeRest.style,
|
|
53
51
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
54
|
-
var rest = (0, _platformFeatureFlags.
|
|
52
|
+
var rest = (0, _platformFeatureFlags.fg)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
55
53
|
var baseProps = (0, _useDefaultButton.default)({
|
|
56
54
|
analyticsContext: analyticsContext,
|
|
57
55
|
appearance: appearance,
|
|
@@ -78,9 +76,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
78
76
|
ref: ref,
|
|
79
77
|
shouldFitContainer: shouldFitContainer,
|
|
80
78
|
spacing: spacing,
|
|
81
|
-
testId: testId
|
|
82
|
-
UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
|
|
83
|
-
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
|
|
79
|
+
testId: testId
|
|
84
80
|
});
|
|
85
81
|
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
86
82
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -49,9 +49,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
|
|
|
49
49
|
ref = _ref.ref,
|
|
50
50
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
51
51
|
spacing = _ref.spacing,
|
|
52
|
-
testId = _ref.testId
|
|
53
|
-
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
54
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size;
|
|
52
|
+
testId = _ref.testId;
|
|
55
53
|
var baseProps = (0, _useButtonBase.default)({
|
|
56
54
|
analyticsContext: analyticsContext,
|
|
57
55
|
appearance: appearance,
|
|
@@ -64,8 +62,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
|
|
|
64
62
|
position: "before",
|
|
65
63
|
isLoading: isLoading
|
|
66
64
|
}, /*#__PURE__*/_react.default.createElement(_iconRenderer.default, {
|
|
67
|
-
icon: iconBefore
|
|
68
|
-
size: UNSAFE_iconBefore_size
|
|
65
|
+
icon: iconBefore
|
|
69
66
|
})), children && /*#__PURE__*/_react.default.createElement(_content.default, {
|
|
70
67
|
isLoading: isLoading
|
|
71
68
|
}, children), iconAfter && /*#__PURE__*/_react.default.createElement(_content.default, {
|
|
@@ -73,8 +70,7 @@ var useDefaultButton = function useDefaultButton(_ref) {
|
|
|
73
70
|
position: "after",
|
|
74
71
|
isLoading: isLoading
|
|
75
72
|
}, /*#__PURE__*/_react.default.createElement(_iconRenderer.default, {
|
|
76
|
-
icon: iconAfter
|
|
77
|
-
size: UNSAFE_iconAfter_size
|
|
73
|
+
icon: iconAfter
|
|
78
74
|
}))),
|
|
79
75
|
interactionName: interactionName,
|
|
80
76
|
isDisabled: isDisabled,
|
|
@@ -12,7 +12,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
12
12
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
14
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
15
|
-
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"
|
|
15
|
+
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"],
|
|
16
16
|
_excluded2 = ["className", "css", "as", "style"];
|
|
17
17
|
/**
|
|
18
18
|
* __Icon Button__
|
|
@@ -53,7 +53,6 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
53
53
|
tooltip = _ref.tooltip,
|
|
54
54
|
_ref$type = _ref.type,
|
|
55
55
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
56
|
-
UNSAFE_size = _ref.UNSAFE_size,
|
|
57
56
|
unsafeRest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
57
|
// @ts-expect-error
|
|
59
58
|
var _className = unsafeRest.className,
|
|
@@ -92,8 +91,7 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
92
91
|
ref: ref,
|
|
93
92
|
shape: shape,
|
|
94
93
|
spacing: spacing,
|
|
95
|
-
testId: testId
|
|
96
|
-
UNSAFE_size: UNSAFE_size
|
|
94
|
+
testId: testId
|
|
97
95
|
});
|
|
98
96
|
if (!isTooltipDisabled) {
|
|
99
97
|
var _tooltip$content;
|
|
@@ -13,7 +13,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
13
13
|
var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
|
|
14
14
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
15
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
16
|
-
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"
|
|
16
|
+
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"],
|
|
17
17
|
_excluded2 = ["className", "css", "as", "style"];
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
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 && Object.prototype.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; }
|
|
@@ -45,7 +45,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
45
45
|
spacing = _ref.spacing,
|
|
46
46
|
testId = _ref.testId,
|
|
47
47
|
tooltip = _ref.tooltip,
|
|
48
|
-
UNSAFE_size = _ref.UNSAFE_size,
|
|
49
48
|
unsafeRest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
49
|
// @ts-expect-error
|
|
51
50
|
var _className = unsafeRest.className,
|
|
@@ -78,8 +77,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
78
77
|
ref: ref,
|
|
79
78
|
shape: shape,
|
|
80
79
|
spacing: spacing,
|
|
81
|
-
testId: testId
|
|
82
|
-
UNSAFE_size: UNSAFE_size
|
|
80
|
+
testId: testId
|
|
83
81
|
});
|
|
84
82
|
if (!isTooltipDisabled) {
|
|
85
83
|
var _tooltip$content;
|
|
@@ -47,8 +47,7 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
47
47
|
shape = _ref.shape,
|
|
48
48
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
49
49
|
spacing = _ref.spacing,
|
|
50
|
-
testId = _ref.testId
|
|
51
|
-
UNSAFE_size = _ref.UNSAFE_size;
|
|
50
|
+
testId = _ref.testId;
|
|
52
51
|
var isCircle = shape === 'circle';
|
|
53
52
|
var baseProps = (0, _useButtonBase.default)({
|
|
54
53
|
analyticsContext: analyticsContext,
|
|
@@ -61,8 +60,7 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
61
60
|
type: "icon",
|
|
62
61
|
isLoading: isLoading
|
|
63
62
|
}, /*#__PURE__*/_react.default.createElement(_iconRenderer.default, {
|
|
64
|
-
icon: icon
|
|
65
|
-
size: UNSAFE_size
|
|
63
|
+
icon: icon
|
|
66
64
|
}), /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, label)),
|
|
67
65
|
interactionName: interactionName,
|
|
68
66
|
isDisabled: isDisabled,
|
|
@@ -22,15 +22,12 @@ function isIconRenderProp(func) {
|
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
var IconRenderer = function IconRenderer(_ref) {
|
|
25
|
-
var Icon = _ref.icon
|
|
26
|
-
size = _ref.size;
|
|
25
|
+
var Icon = _ref.icon;
|
|
27
26
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isIconRenderProp(Icon) ? Icon({
|
|
28
27
|
label: '',
|
|
29
|
-
size: size,
|
|
30
28
|
color: 'currentColor'
|
|
31
29
|
}) : /*#__PURE__*/_react.default.createElement(Icon, {
|
|
32
30
|
label: "",
|
|
33
|
-
size: size,
|
|
34
31
|
color: 'currentColor'
|
|
35
32
|
}));
|
|
36
33
|
};
|
|
@@ -559,7 +559,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
559
559
|
var isSplitButton = Boolean(splitButtonContext);
|
|
560
560
|
var isNavigationSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isNavigationSplitButton) || false;
|
|
561
561
|
var isDefaultAppearanceSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) === 'default';
|
|
562
|
-
var appearance = isDefaultAppearanceSplitButton && (0, _platformFeatureFlags.fg)('platform
|
|
562
|
+
var appearance = isDefaultAppearanceSplitButton && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? 'subtle' : (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) || propAppearance;
|
|
563
563
|
var spacing = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.spacing) || propSpacing;
|
|
564
564
|
var isDisabled = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isDisabled) || propIsDisabled;
|
|
565
565
|
var isInteractive = !isDisabled && !isLoading;
|
|
@@ -569,7 +569,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
569
569
|
(0, _useAutoFocus.default)(localRef, autoFocus);
|
|
570
570
|
return _objectSpread({
|
|
571
571
|
ref: (0, _mergeRefs.default)([localRef, ref]),
|
|
572
|
-
xcss: [(0, _platformFeatureFlags.fg)('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : hardCodedButtonStyles, buttonStyles, appearance === 'default' && ((0, _platformFeatureFlags.fg)('platform
|
|
572
|
+
xcss: [(0, _platformFeatureFlags.fg)('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : hardCodedButtonStyles, 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), appearance === 'link' && linkStyles, appearance === 'subtle-link' && subtleLinkStyles, !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? linkDecorationStyles : linkDecorationUnsetStyles, isSelected && ((0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? selectedRefreshedStyles : selectedStyles), isSelected && isSplitButton && selectedInsideSplitButtonStyles, isSelected && isInteractive && selectedInteractiveStyles,
|
|
573
573
|
// TODO: remove me once we kill color fallbacks
|
|
574
574
|
isSelected && appearance === 'danger' && selectedDangerStyles,
|
|
575
575
|
// TODO: remove me once we kill color fallbacks
|
|
@@ -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: "
|
|
136
|
+
packageVersion: "19.0.0",
|
|
137
137
|
analyticsData: analyticsContext
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -222,7 +222,7 @@ function getCss(_ref3) {
|
|
|
222
222
|
textDecoration: 'none',
|
|
223
223
|
transition: 'background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
|
|
224
224
|
whiteSpace: 'nowrap'
|
|
225
|
-
}, !(0, _platformFeatureFlags.fg)('platform
|
|
225
|
+
}, !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && baseColors), {}, {
|
|
226
226
|
cursor: 'pointer',
|
|
227
227
|
height: heights[spacing],
|
|
228
228
|
lineHeight: lineHeights[spacing],
|
|
@@ -231,7 +231,7 @@ function getCss(_ref3) {
|
|
|
231
231
|
width: shouldFitContainer ? '100%' : 'auto',
|
|
232
232
|
// justifyContent required for shouldFitContainer buttons with an icon inside
|
|
233
233
|
justifyContent: 'center'
|
|
234
|
-
}, !(0, _platformFeatureFlags.fg)('platform
|
|
234
|
+
}, !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && _objectSpread(_objectSpread({
|
|
235
235
|
// Disabling visited styles (just using the base colors)
|
|
236
236
|
'&:visited': _objectSpread({}, baseColors),
|
|
237
237
|
'&:hover': _objectSpread(_objectSpread({}, getColors({
|
|
@@ -280,7 +280,7 @@ function getCss(_ref3) {
|
|
|
280
280
|
key: isSelected ? 'selected' : 'default',
|
|
281
281
|
mode: mode
|
|
282
282
|
}))
|
|
283
|
-
})), (0, _platformFeatureFlags.fg)('platform
|
|
283
|
+
})), (0, _platformFeatureFlags.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), {}, {
|
|
284
284
|
'&[disabled]': {
|
|
285
285
|
color: "var(--ds-text-disabled, #091E424F)",
|
|
286
286
|
backgroundColor: HAS_DISABLED_BACKGROUND.includes(appearance) ? "var(--ds-background-disabled, #091E4208)" : 'transparent',
|
|
@@ -15,7 +15,6 @@ const buttonGroupStyles = css({
|
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
export default function ButtonGroup({
|
|
18
|
-
appearance,
|
|
19
18
|
children,
|
|
20
19
|
testId,
|
|
21
20
|
label,
|
|
@@ -33,11 +32,6 @@ export default function ButtonGroup({
|
|
|
33
32
|
}
|
|
34
33
|
return jsx(Fragment, {
|
|
35
34
|
key: idx
|
|
36
|
-
},
|
|
37
|
-
/*#__PURE__*/
|
|
38
|
-
// eslint-disable-next-line @repo/internal/react/no-clone-element
|
|
39
|
-
React.cloneElement(child, {
|
|
40
|
-
appearance
|
|
41
|
-
}) : child);
|
|
35
|
+
}, child);
|
|
42
36
|
}));
|
|
43
37
|
}
|
|
@@ -72,7 +72,7 @@ export const Divider = ({
|
|
|
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
|
|
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 const SplitButtonContainer = ({
|
|
|
113
113
|
isDisabled = false
|
|
114
114
|
}) => {
|
|
115
115
|
return jsx("div", {
|
|
116
|
-
css: [appearance === 'default' && !isDisabled && fg('platform
|
|
116
|
+
css: [appearance === 'default' && !isDisabled && fg('platform-component-visual-refresh') && defaultAppearanceContainerStyles, splitButtonStyles]
|
|
117
117
|
}, children);
|
|
118
118
|
};
|
|
119
119
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
5
5
|
import useDefaultButton from './use-default-button';
|
|
6
6
|
/**
|
|
@@ -39,8 +39,6 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
39
39
|
spacing,
|
|
40
40
|
testId,
|
|
41
41
|
type = 'button',
|
|
42
|
-
UNSAFE_iconAfter_size,
|
|
43
|
-
UNSAFE_iconBefore_size,
|
|
44
42
|
...unsafeRest
|
|
45
43
|
}, ref) {
|
|
46
44
|
// @ts-expect-error
|
|
@@ -51,7 +49,7 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
51
49
|
style: _style,
|
|
52
50
|
...saferRest
|
|
53
51
|
} = unsafeRest;
|
|
54
|
-
const rest =
|
|
52
|
+
const rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
55
53
|
const baseProps = useDefaultButton({
|
|
56
54
|
ariaLabel,
|
|
57
55
|
ariaLabelledBy,
|
|
@@ -79,9 +77,7 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
79
77
|
ref,
|
|
80
78
|
shouldFitContainer,
|
|
81
79
|
spacing,
|
|
82
|
-
testId
|
|
83
|
-
UNSAFE_iconAfter_size,
|
|
84
|
-
UNSAFE_iconBefore_size
|
|
80
|
+
testId
|
|
85
81
|
});
|
|
86
82
|
return /*#__PURE__*/React.createElement(Pressable
|
|
87
83
|
// TODO: Remove spread props
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, memo } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import Anchor from '@atlaskit/primitives/anchor';
|
|
5
5
|
import useDefaultButton from './use-default-button';
|
|
6
6
|
const LinkButtonBase = ({
|
|
@@ -29,8 +29,6 @@ const LinkButtonBase = ({
|
|
|
29
29
|
shouldFitContainer,
|
|
30
30
|
spacing,
|
|
31
31
|
testId,
|
|
32
|
-
UNSAFE_iconAfter_size,
|
|
33
|
-
UNSAFE_iconBefore_size,
|
|
34
32
|
...unsafeRest
|
|
35
33
|
}, ref) => {
|
|
36
34
|
// @ts-expect-error
|
|
@@ -41,7 +39,7 @@ const LinkButtonBase = ({
|
|
|
41
39
|
style: _style,
|
|
42
40
|
...saferRest
|
|
43
41
|
} = unsafeRest;
|
|
44
|
-
const rest =
|
|
42
|
+
const rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
45
43
|
const baseProps = useDefaultButton({
|
|
46
44
|
analyticsContext,
|
|
47
45
|
appearance,
|
|
@@ -68,9 +66,7 @@ const LinkButtonBase = ({
|
|
|
68
66
|
ref,
|
|
69
67
|
shouldFitContainer,
|
|
70
68
|
spacing,
|
|
71
|
-
testId
|
|
72
|
-
UNSAFE_iconAfter_size,
|
|
73
|
-
UNSAFE_iconBefore_size
|
|
69
|
+
testId
|
|
74
70
|
});
|
|
75
71
|
return /*#__PURE__*/React.createElement(Anchor
|
|
76
72
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -38,9 +38,7 @@ const useDefaultButton = ({
|
|
|
38
38
|
ref,
|
|
39
39
|
shouldFitContainer,
|
|
40
40
|
spacing,
|
|
41
|
-
testId
|
|
42
|
-
UNSAFE_iconAfter_size,
|
|
43
|
-
UNSAFE_iconBefore_size
|
|
41
|
+
testId
|
|
44
42
|
}) => {
|
|
45
43
|
const baseProps = useButtonBase({
|
|
46
44
|
analyticsContext,
|
|
@@ -54,8 +52,7 @@ const useDefaultButton = ({
|
|
|
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 @@ const useDefaultButton = ({
|
|
|
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,
|
|
70
66
|
isDisabled,
|
|
@@ -42,7 +42,6 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
42
42
|
testId,
|
|
43
43
|
tooltip,
|
|
44
44
|
type = 'button',
|
|
45
|
-
UNSAFE_size,
|
|
46
45
|
...unsafeRest
|
|
47
46
|
}, ref) {
|
|
48
47
|
// @ts-expect-error
|
|
@@ -84,8 +83,7 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
84
83
|
ref,
|
|
85
84
|
shape,
|
|
86
85
|
spacing,
|
|
87
|
-
testId
|
|
88
|
-
UNSAFE_size
|
|
86
|
+
testId
|
|
89
87
|
});
|
|
90
88
|
if (!isTooltipDisabled) {
|
|
91
89
|
var _tooltip$content;
|
|
@@ -32,7 +32,6 @@ const LinkIconButtonBase = ({
|
|
|
32
32
|
spacing,
|
|
33
33
|
testId,
|
|
34
34
|
tooltip,
|
|
35
|
-
UNSAFE_size,
|
|
36
35
|
...unsafeRest
|
|
37
36
|
}, ref) => {
|
|
38
37
|
// @ts-expect-error
|
|
@@ -68,8 +67,7 @@ const LinkIconButtonBase = ({
|
|
|
68
67
|
ref,
|
|
69
68
|
shape,
|
|
70
69
|
spacing,
|
|
71
|
-
testId
|
|
72
|
-
UNSAFE_size
|
|
70
|
+
testId
|
|
73
71
|
});
|
|
74
72
|
if (!isTooltipDisabled) {
|
|
75
73
|
var _tooltip$content;
|
|
@@ -39,8 +39,7 @@ const useIconButton = ({
|
|
|
39
39
|
shape,
|
|
40
40
|
shouldFitContainer,
|
|
41
41
|
spacing,
|
|
42
|
-
testId
|
|
43
|
-
UNSAFE_size
|
|
42
|
+
testId
|
|
44
43
|
}) => {
|
|
45
44
|
const isCircle = shape === 'circle';
|
|
46
45
|
const baseProps = useButtonBase({
|
|
@@ -54,8 +53,7 @@ const useIconButton = ({
|
|
|
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,
|
|
61
59
|
isDisabled,
|
|
@@ -15,16 +15,13 @@ function isIconRenderProp(func) {
|
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
17
|
const IconRenderer = ({
|
|
18
|
-
icon: Icon
|
|
19
|
-
size
|
|
18
|
+
icon: Icon
|
|
20
19
|
}) => {
|
|
21
20
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
|
|
22
21
|
label: '',
|
|
23
|
-
size: size,
|
|
24
22
|
color: 'currentColor'
|
|
25
23
|
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
26
24
|
label: "",
|
|
27
|
-
size: size,
|
|
28
25
|
color: 'currentColor'
|
|
29
26
|
}));
|
|
30
27
|
};
|
|
@@ -538,7 +538,7 @@ const useButtonBase = ({
|
|
|
538
538
|
const isSplitButton = Boolean(splitButtonContext);
|
|
539
539
|
const isNavigationSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isNavigationSplitButton) || false;
|
|
540
540
|
const isDefaultAppearanceSplitButton = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) === 'default';
|
|
541
|
-
const appearance = isDefaultAppearanceSplitButton && fg('platform
|
|
541
|
+
const appearance = isDefaultAppearanceSplitButton && fg('platform-component-visual-refresh') ? 'subtle' : (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.appearance) || propAppearance;
|
|
542
542
|
const spacing = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.spacing) || propSpacing;
|
|
543
543
|
const isDisabled = (splitButtonContext === null || splitButtonContext === void 0 ? void 0 : splitButtonContext.isDisabled) || propIsDisabled;
|
|
544
544
|
const isInteractive = !isDisabled && !isLoading;
|
|
@@ -548,7 +548,7 @@ const useButtonBase = ({
|
|
|
548
548
|
useAutoFocus(localRef, autoFocus);
|
|
549
549
|
return {
|
|
550
550
|
ref: mergeRefs([localRef, ref]),
|
|
551
|
-
xcss: [fg('platform.design-system-team.button-tokenised-typography-styles') ? tokenizedButtonStyles : hardCodedButtonStyles, buttonStyles, appearance === 'default' && (fg('platform
|
|
551
|
+
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,
|
|
552
552
|
// TODO: remove me once we kill color fallbacks
|
|
553
553
|
isSelected && appearance === 'danger' && selectedDangerStyles,
|
|
554
554
|
// TODO: remove me once we kill color fallbacks
|
|
@@ -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: "
|
|
122
|
+
packageVersion: "19.0.0",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|