@atlaskit/button 19.0.0 → 19.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 +14 -0
- package/dist/cjs/containers/button-group.js +1 -1
- package/dist/cjs/new-button/containers/split-button/split-button.js +1 -1
- package/dist/cjs/new-button/variants/default/button.js +1 -3
- package/dist/cjs/new-button/variants/default/link.js +1 -3
- package/dist/cjs/new-button/variants/icon/button.js +14 -16
- package/dist/cjs/new-button/variants/icon/link.js +14 -16
- package/dist/cjs/old-button/button.js +3 -1
- package/dist/cjs/old-button/custom-theme-button/custom-theme-button.js +4 -0
- package/dist/cjs/old-button/loading-button.js +3 -1
- package/dist/cjs/old-button/shared/button-base.js +2 -2
- package/dist/es2019/containers/button-group.js +1 -1
- package/dist/es2019/new-button/containers/split-button/split-button.js +1 -1
- package/dist/es2019/new-button/variants/default/button.js +1 -3
- package/dist/es2019/new-button/variants/default/link.js +1 -3
- package/dist/es2019/new-button/variants/icon/button.js +14 -16
- package/dist/es2019/new-button/variants/icon/link.js +14 -16
- package/dist/es2019/old-button/button.js +3 -1
- package/dist/es2019/old-button/custom-theme-button/custom-theme-button.js +4 -0
- package/dist/es2019/old-button/loading-button.js +3 -1
- package/dist/es2019/old-button/shared/button-base.js +2 -2
- package/dist/esm/containers/button-group.js +1 -1
- package/dist/esm/new-button/containers/split-button/split-button.js +1 -1
- package/dist/esm/new-button/variants/default/button.js +1 -3
- package/dist/esm/new-button/variants/default/link.js +1 -3
- package/dist/esm/new-button/variants/icon/button.js +14 -16
- package/dist/esm/new-button/variants/icon/link.js +14 -16
- package/dist/esm/old-button/button.js +3 -1
- package/dist/esm/old-button/custom-theme-button/custom-theme-button.js +4 -0
- package/dist/esm/old-button/loading-button.js +3 -1
- package/dist/esm/old-button/shared/button-base.js +2 -2
- package/dist/types/containers/button-group.d.ts +1 -1
- package/dist/types/new-button/containers/split-button/split-button.d.ts +1 -1
- package/dist/types/old-button/button.d.ts +3 -1
- package/dist/types/old-button/custom-theme-button/custom-theme-button.d.ts +4 -0
- package/dist/types/old-button/loading-button.d.ts +3 -1
- package/dist/types/old-button/shared/button-base.d.ts +1 -1
- package/dist/types-ts4.5/containers/button-group.d.ts +1 -1
- package/dist/types-ts4.5/new-button/containers/split-button/split-button.d.ts +1 -1
- package/dist/types-ts4.5/old-button/button.d.ts +3 -1
- package/dist/types-ts4.5/old-button/custom-theme-button/custom-theme-button.d.ts +4 -0
- package/dist/types-ts4.5/old-button/loading-button.d.ts +3 -1
- package/dist/types-ts4.5/old-button/shared/button-base.d.ts +1 -1
- package/package.json +8 -54
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 19.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 19.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#123598](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/123598)
|
|
14
|
+
[`83919d6adb836`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/83919d6adb836) -
|
|
15
|
+
Remove unsafe spread on new buttons.
|
|
16
|
+
|
|
3
17
|
## 19.0.0
|
|
4
18
|
|
|
5
19
|
### Major Changes
|
|
@@ -11,8 +11,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
11
11
|
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; }
|
|
12
12
|
/**
|
|
13
13
|
* @jsxRuntime classic
|
|
14
|
+
* @jsx jsx
|
|
14
15
|
*/
|
|
15
|
-
/** @jsx jsx */
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
18
|
|
|
@@ -10,8 +10,8 @@ var _splitButtonContext = require("./split-button-context");
|
|
|
10
10
|
var _utils = require("./utils");
|
|
11
11
|
/**
|
|
12
12
|
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
13
14
|
*/
|
|
14
|
-
/** @jsx jsx */
|
|
15
15
|
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
17
|
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
13
12
|
var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
|
|
14
13
|
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"],
|
|
@@ -57,7 +56,6 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
57
56
|
_as = unsafeRest.as,
|
|
58
57
|
_style = unsafeRest.style,
|
|
59
58
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
60
|
-
var rest = (0, _platformFeatureFlags.fg)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
61
59
|
var baseProps = (0, _useDefaultButton.default)({
|
|
62
60
|
ariaLabel: ariaLabel,
|
|
63
61
|
ariaLabelledBy: ariaLabelledBy,
|
|
@@ -89,7 +87,7 @@ var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwa
|
|
|
89
87
|
});
|
|
90
88
|
return /*#__PURE__*/_react.default.createElement(_pressable.default
|
|
91
89
|
// TODO: Remove spread props
|
|
92
|
-
, (0, _extends2.default)({},
|
|
90
|
+
, (0, _extends2.default)({}, saferRest, {
|
|
93
91
|
"aria-label": baseProps['aria-label'],
|
|
94
92
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
95
93
|
ref: baseProps.ref,
|
|
@@ -9,7 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
|
|
14
13
|
var _useDefaultButton = _interopRequireDefault(require("./use-default-button"));
|
|
15
14
|
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"],
|
|
@@ -49,7 +48,6 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
49
48
|
_as = unsafeRest.as,
|
|
50
49
|
_style = unsafeRest.style,
|
|
51
50
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
52
|
-
var rest = (0, _platformFeatureFlags.fg)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
53
51
|
var baseProps = (0, _useDefaultButton.default)({
|
|
54
52
|
analyticsContext: analyticsContext,
|
|
55
53
|
appearance: appearance,
|
|
@@ -80,7 +78,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
80
78
|
});
|
|
81
79
|
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
82
80
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
83
|
-
, (0, _extends2.default)({},
|
|
81
|
+
, (0, _extends2.default)({}, saferRest, {
|
|
84
82
|
"aria-label": baseProps['aria-label'],
|
|
85
83
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
86
84
|
ref: baseProps.ref,
|
|
@@ -8,7 +8,6 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
13
12
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
13
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
@@ -60,7 +59,6 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
60
59
|
_as = unsafeRest.as,
|
|
61
60
|
_style = unsafeRest.style,
|
|
62
61
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
63
|
-
var rest = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
64
62
|
|
|
65
63
|
/**
|
|
66
64
|
* TODO: At some stage I'll look into re-using more logic across 'default' and 'icon'
|
|
@@ -111,7 +109,7 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
111
109
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
112
110
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
113
111
|
}, function (triggerProps) {
|
|
114
|
-
return /*#__PURE__*/_react.default.createElement(_pressable.default, (0, _extends2.default)({},
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(_pressable.default, (0, _extends2.default)({}, saferRest, {
|
|
115
113
|
// Top level props
|
|
116
114
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
117
115
|
type: type,
|
|
@@ -122,34 +120,34 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
122
120
|
// Shared between tooltip and native props
|
|
123
121
|
,
|
|
124
122
|
onMouseOver: function onMouseOver(e) {
|
|
125
|
-
var _triggerProps$onMouse,
|
|
123
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
126
124
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
127
|
-
(
|
|
125
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 || _saferRest$onMouseOve.call(saferRest, e);
|
|
128
126
|
},
|
|
129
127
|
onMouseOut: function onMouseOut(e) {
|
|
130
|
-
var _triggerProps$onMouse2,
|
|
128
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
131
129
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
132
|
-
(
|
|
130
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 || _saferRest$onMouseOut.call(saferRest, e);
|
|
133
131
|
},
|
|
134
132
|
onMouseMove: function onMouseMove(e) {
|
|
135
|
-
var _triggerProps$onMouse3,
|
|
133
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
136
134
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
137
|
-
(
|
|
135
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 || _saferRest$onMouseMov.call(saferRest, e);
|
|
138
136
|
},
|
|
139
137
|
onMouseDown: function onMouseDown(e) {
|
|
140
|
-
var _triggerProps$onMouse4,
|
|
138
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
141
139
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
142
|
-
(
|
|
140
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 || _saferRest$onMouseDow.call(saferRest, e);
|
|
143
141
|
},
|
|
144
142
|
onFocus: function onFocus(e) {
|
|
145
|
-
var _triggerProps$onFocus,
|
|
143
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
146
144
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
147
|
-
(
|
|
145
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 || _saferRest$onFocus.call(saferRest, e);
|
|
148
146
|
},
|
|
149
147
|
onBlur: function onBlur(e) {
|
|
150
|
-
var _triggerProps$onBlur,
|
|
148
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
151
149
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
152
|
-
(
|
|
150
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 || _saferRest$onBlur.call(saferRest, e);
|
|
153
151
|
}
|
|
154
152
|
// Shared between tooltip and base props
|
|
155
153
|
,
|
|
@@ -179,7 +177,7 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
179
177
|
}), baseProps.children);
|
|
180
178
|
});
|
|
181
179
|
}
|
|
182
|
-
return /*#__PURE__*/_react.default.createElement(_pressable.default, (0, _extends2.default)({},
|
|
180
|
+
return /*#__PURE__*/_react.default.createElement(_pressable.default, (0, _extends2.default)({}, saferRest, {
|
|
183
181
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
184
182
|
ref: baseProps.ref,
|
|
185
183
|
xcss: baseProps.xcss,
|
|
@@ -9,7 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
|
|
14
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
14
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
@@ -52,7 +51,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
52
51
|
_as = unsafeRest.as,
|
|
53
52
|
_style = unsafeRest.style,
|
|
54
53
|
saferRest = (0, _objectWithoutProperties2.default)(unsafeRest, _excluded2);
|
|
55
|
-
var rest = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
56
54
|
var baseProps = (0, _useIconButton.default)({
|
|
57
55
|
analyticsContext: analyticsContext,
|
|
58
56
|
appearance: appearance,
|
|
@@ -99,7 +97,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
99
97
|
}, function (triggerProps) {
|
|
100
98
|
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
101
99
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
102
|
-
, (0, _extends2.default)({},
|
|
100
|
+
, (0, _extends2.default)({}, saferRest, {
|
|
103
101
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
104
102
|
testId: testId,
|
|
105
103
|
componentName: "LinkIconButton",
|
|
@@ -108,34 +106,34 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
108
106
|
// Shared between tooltip and native props
|
|
109
107
|
,
|
|
110
108
|
onMouseOver: function onMouseOver(e) {
|
|
111
|
-
var _triggerProps$onMouse,
|
|
109
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
112
110
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
113
|
-
(
|
|
111
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 || _saferRest$onMouseOve.call(saferRest, e);
|
|
114
112
|
},
|
|
115
113
|
onMouseOut: function onMouseOut(e) {
|
|
116
|
-
var _triggerProps$onMouse2,
|
|
114
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
117
115
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
118
|
-
(
|
|
116
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 || _saferRest$onMouseOut.call(saferRest, e);
|
|
119
117
|
},
|
|
120
118
|
onMouseMove: function onMouseMove(e) {
|
|
121
|
-
var _triggerProps$onMouse3,
|
|
119
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
122
120
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
123
|
-
(
|
|
121
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 || _saferRest$onMouseMov.call(saferRest, e);
|
|
124
122
|
},
|
|
125
123
|
onMouseDown: function onMouseDown(e) {
|
|
126
|
-
var _triggerProps$onMouse4,
|
|
124
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
127
125
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
128
|
-
(
|
|
126
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 || _saferRest$onMouseDow.call(saferRest, e);
|
|
129
127
|
},
|
|
130
128
|
onFocus: function onFocus(e) {
|
|
131
|
-
var _triggerProps$onFocus,
|
|
129
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
132
130
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
133
|
-
(
|
|
131
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 || _saferRest$onFocus.call(saferRest, e);
|
|
134
132
|
},
|
|
135
133
|
onBlur: function onBlur(e) {
|
|
136
|
-
var _triggerProps$onBlur,
|
|
134
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
137
135
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
138
|
-
(
|
|
136
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 || _saferRest$onBlur.call(saferRest, e);
|
|
139
137
|
}
|
|
140
138
|
// Shared between tooltip and base props
|
|
141
139
|
,
|
|
@@ -175,7 +173,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
175
173
|
}
|
|
176
174
|
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
177
175
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
178
|
-
, (0, _extends2.default)({},
|
|
176
|
+
, (0, _extends2.default)({}, saferRest, {
|
|
179
177
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
180
178
|
ref: baseProps.ref,
|
|
181
179
|
xcss: baseProps.xcss,
|
|
@@ -22,7 +22,9 @@ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerC
|
|
|
22
22
|
/**
|
|
23
23
|
* __Button__
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
26
|
+
*
|
|
27
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
26
28
|
*
|
|
27
29
|
* A button triggers an event or action. They let users know what will happen next.
|
|
28
30
|
*
|
|
@@ -64,6 +64,10 @@ var initial = {
|
|
|
64
64
|
/**
|
|
65
65
|
* __Custom theme button__
|
|
66
66
|
*
|
|
67
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
68
|
+
*
|
|
69
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
70
|
+
*
|
|
67
71
|
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
68
72
|
*
|
|
69
73
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
@@ -14,7 +14,9 @@ var _excluded = ["appearance", "isDisabled", "isSelected", "isLoading", "spacing
|
|
|
14
14
|
/**
|
|
15
15
|
* __Loading button__
|
|
16
16
|
*
|
|
17
|
-
*
|
|
17
|
+
* @deprecated Legacy loading buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
18
|
+
*
|
|
19
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
18
20
|
*
|
|
19
21
|
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
20
22
|
*
|
|
@@ -23,8 +23,8 @@ var _excluded = ["analyticsContext", "appearance", "autoFocus", "buttonCss", "ch
|
|
|
23
23
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
24
24
|
/**
|
|
25
25
|
* @jsxRuntime classic
|
|
26
|
+
* @jsx jsx
|
|
26
27
|
*/
|
|
27
|
-
/** @jsx jsx */
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
29
|
// eslint-disable-next-line no-duplicate-imports
|
|
30
30
|
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); }
|
|
@@ -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: "19.
|
|
136
|
+
packageVersion: "19.1.1",
|
|
137
137
|
analyticsData: analyticsContext
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
5
4
|
import useDefaultButton from './use-default-button';
|
|
6
5
|
/**
|
|
@@ -49,7 +48,6 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
49
48
|
style: _style,
|
|
50
49
|
...saferRest
|
|
51
50
|
} = unsafeRest;
|
|
52
|
-
const rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
53
51
|
const baseProps = useDefaultButton({
|
|
54
52
|
ariaLabel,
|
|
55
53
|
ariaLabelledBy,
|
|
@@ -81,7 +79,7 @@ const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function B
|
|
|
81
79
|
});
|
|
82
80
|
return /*#__PURE__*/React.createElement(Pressable
|
|
83
81
|
// TODO: Remove spread props
|
|
84
|
-
, _extends({},
|
|
82
|
+
, _extends({}, saferRest, {
|
|
85
83
|
"aria-label": baseProps['aria-label'],
|
|
86
84
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
87
85
|
ref: baseProps.ref,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, memo } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import Anchor from '@atlaskit/primitives/anchor';
|
|
5
4
|
import useDefaultButton from './use-default-button';
|
|
6
5
|
const LinkButtonBase = ({
|
|
@@ -39,7 +38,6 @@ const LinkButtonBase = ({
|
|
|
39
38
|
style: _style,
|
|
40
39
|
...saferRest
|
|
41
40
|
} = unsafeRest;
|
|
42
|
-
const rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
43
41
|
const baseProps = useDefaultButton({
|
|
44
42
|
analyticsContext,
|
|
45
43
|
appearance,
|
|
@@ -70,7 +68,7 @@ const LinkButtonBase = ({
|
|
|
70
68
|
});
|
|
71
69
|
return /*#__PURE__*/React.createElement(Anchor
|
|
72
70
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
73
|
-
, _extends({},
|
|
71
|
+
, _extends({}, saferRest, {
|
|
74
72
|
"aria-label": baseProps['aria-label'],
|
|
75
73
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
76
74
|
ref: baseProps.ref,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
5
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
5
|
import useIconButton from './use-icon-button';
|
|
@@ -52,7 +51,6 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
52
51
|
style: _style,
|
|
53
52
|
...saferRest
|
|
54
53
|
} = unsafeRest;
|
|
55
|
-
const rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
56
|
* TODO: At some stage I'll look into re-using more logic across 'default' and 'icon'
|
|
@@ -102,7 +100,7 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
102
100
|
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
103
101
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
104
102
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
105
|
-
}, triggerProps => /*#__PURE__*/React.createElement(Pressable, _extends({},
|
|
103
|
+
}, triggerProps => /*#__PURE__*/React.createElement(Pressable, _extends({}, saferRest, {
|
|
106
104
|
// Top level props
|
|
107
105
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
108
106
|
type: type,
|
|
@@ -113,34 +111,34 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
113
111
|
// Shared between tooltip and native props
|
|
114
112
|
,
|
|
115
113
|
onMouseOver: e => {
|
|
116
|
-
var _triggerProps$onMouse,
|
|
114
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
117
115
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 ? void 0 : _triggerProps$onMouse.call(triggerProps, e);
|
|
118
|
-
(
|
|
116
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 ? void 0 : _saferRest$onMouseOve.call(saferRest, e);
|
|
119
117
|
},
|
|
120
118
|
onMouseOut: e => {
|
|
121
|
-
var _triggerProps$onMouse2,
|
|
119
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
122
120
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 ? void 0 : _triggerProps$onMouse2.call(triggerProps, e);
|
|
123
|
-
(
|
|
121
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 ? void 0 : _saferRest$onMouseOut.call(saferRest, e);
|
|
124
122
|
},
|
|
125
123
|
onMouseMove: e => {
|
|
126
|
-
var _triggerProps$onMouse3,
|
|
124
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
127
125
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 ? void 0 : _triggerProps$onMouse3.call(triggerProps, e);
|
|
128
|
-
(
|
|
126
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 ? void 0 : _saferRest$onMouseMov.call(saferRest, e);
|
|
129
127
|
},
|
|
130
128
|
onMouseDown: e => {
|
|
131
|
-
var _triggerProps$onMouse4,
|
|
129
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
132
130
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 ? void 0 : _triggerProps$onMouse4.call(triggerProps, e);
|
|
133
|
-
(
|
|
131
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 ? void 0 : _saferRest$onMouseDow.call(saferRest, e);
|
|
134
132
|
},
|
|
135
133
|
onFocus: e => {
|
|
136
|
-
var _triggerProps$onFocus,
|
|
134
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
137
135
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 ? void 0 : _triggerProps$onFocus.call(triggerProps, e);
|
|
138
|
-
(
|
|
136
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 ? void 0 : _saferRest$onFocus.call(saferRest, e);
|
|
139
137
|
},
|
|
140
138
|
onBlur: e => {
|
|
141
|
-
var _triggerProps$onBlur,
|
|
139
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
142
140
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 ? void 0 : _triggerProps$onBlur.call(triggerProps, e);
|
|
143
|
-
(
|
|
141
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 ? void 0 : _saferRest$onBlur.call(saferRest, e);
|
|
144
142
|
}
|
|
145
143
|
// Shared between tooltip and base props
|
|
146
144
|
,
|
|
@@ -169,7 +167,7 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
169
167
|
onClickCapture: baseProps.onClickCapture
|
|
170
168
|
}), baseProps.children));
|
|
171
169
|
}
|
|
172
|
-
return /*#__PURE__*/React.createElement(Pressable, _extends({},
|
|
170
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({}, saferRest, {
|
|
173
171
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
174
172
|
ref: baseProps.ref,
|
|
175
173
|
xcss: baseProps.xcss,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, memo } from 'react';
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import Anchor from '@atlaskit/primitives/anchor';
|
|
5
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
5
|
import useIconButton from './use-icon-button';
|
|
@@ -42,7 +41,6 @@ const LinkIconButtonBase = ({
|
|
|
42
41
|
style: _style,
|
|
43
42
|
...saferRest
|
|
44
43
|
} = unsafeRest;
|
|
45
|
-
const rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
46
44
|
const baseProps = useIconButton({
|
|
47
45
|
analyticsContext,
|
|
48
46
|
appearance,
|
|
@@ -88,7 +86,7 @@ const LinkIconButtonBase = ({
|
|
|
88
86
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
89
87
|
}, triggerProps => /*#__PURE__*/React.createElement(Anchor
|
|
90
88
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
91
|
-
, _extends({},
|
|
89
|
+
, _extends({}, saferRest, {
|
|
92
90
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
93
91
|
testId: testId,
|
|
94
92
|
componentName: "LinkIconButton",
|
|
@@ -97,34 +95,34 @@ const LinkIconButtonBase = ({
|
|
|
97
95
|
// Shared between tooltip and native props
|
|
98
96
|
,
|
|
99
97
|
onMouseOver: e => {
|
|
100
|
-
var _triggerProps$onMouse,
|
|
98
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
101
99
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 ? void 0 : _triggerProps$onMouse.call(triggerProps, e);
|
|
102
|
-
(
|
|
100
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 ? void 0 : _saferRest$onMouseOve.call(saferRest, e);
|
|
103
101
|
},
|
|
104
102
|
onMouseOut: e => {
|
|
105
|
-
var _triggerProps$onMouse2,
|
|
103
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
106
104
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 ? void 0 : _triggerProps$onMouse2.call(triggerProps, e);
|
|
107
|
-
(
|
|
105
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 ? void 0 : _saferRest$onMouseOut.call(saferRest, e);
|
|
108
106
|
},
|
|
109
107
|
onMouseMove: e => {
|
|
110
|
-
var _triggerProps$onMouse3,
|
|
108
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
111
109
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 ? void 0 : _triggerProps$onMouse3.call(triggerProps, e);
|
|
112
|
-
(
|
|
110
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 ? void 0 : _saferRest$onMouseMov.call(saferRest, e);
|
|
113
111
|
},
|
|
114
112
|
onMouseDown: e => {
|
|
115
|
-
var _triggerProps$onMouse4,
|
|
113
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
116
114
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 ? void 0 : _triggerProps$onMouse4.call(triggerProps, e);
|
|
117
|
-
(
|
|
115
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 ? void 0 : _saferRest$onMouseDow.call(saferRest, e);
|
|
118
116
|
},
|
|
119
117
|
onFocus: e => {
|
|
120
|
-
var _triggerProps$onFocus,
|
|
118
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
121
119
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 ? void 0 : _triggerProps$onFocus.call(triggerProps, e);
|
|
122
|
-
(
|
|
120
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 ? void 0 : _saferRest$onFocus.call(saferRest, e);
|
|
123
121
|
},
|
|
124
122
|
onBlur: e => {
|
|
125
|
-
var _triggerProps$onBlur,
|
|
123
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
126
124
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 ? void 0 : _triggerProps$onBlur.call(triggerProps, e);
|
|
127
|
-
(
|
|
125
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 ? void 0 : _saferRest$onBlur.call(saferRest, e);
|
|
128
126
|
}
|
|
129
127
|
// Shared between tooltip and base props
|
|
130
128
|
,
|
|
@@ -163,7 +161,7 @@ const LinkIconButtonBase = ({
|
|
|
163
161
|
}
|
|
164
162
|
return /*#__PURE__*/React.createElement(Anchor
|
|
165
163
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
166
|
-
, _extends({},
|
|
164
|
+
, _extends({}, saferRest, {
|
|
167
165
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
168
166
|
ref: baseProps.ref,
|
|
169
167
|
xcss: baseProps.xcss,
|
|
@@ -12,7 +12,9 @@ const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowe
|
|
|
12
12
|
/**
|
|
13
13
|
* __Button__
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
16
|
+
*
|
|
17
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
16
18
|
*
|
|
17
19
|
* A button triggers an event or action. They let users know what will happen next.
|
|
18
20
|
*
|
|
@@ -46,6 +46,10 @@ const initial = {
|
|
|
46
46
|
/**
|
|
47
47
|
* __Custom theme button__
|
|
48
48
|
*
|
|
49
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
50
|
+
*
|
|
51
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
52
|
+
*
|
|
49
53
|
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
50
54
|
*
|
|
51
55
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
@@ -5,7 +5,9 @@ import LoadingSpinner from './shared/loading-spinner';
|
|
|
5
5
|
/**
|
|
6
6
|
* __Loading button__
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @deprecated Legacy loading buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
9
|
+
*
|
|
10
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
9
11
|
*
|
|
10
12
|
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
11
13
|
*
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
3
3
|
/**
|
|
4
4
|
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
5
6
|
*/
|
|
6
|
-
/** @jsx jsx */
|
|
7
7
|
import React, { useCallback, useContext, useEffect, useRef } from 'react';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -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: "19.
|
|
122
|
+
packageVersion: "19.1.1",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
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 { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
8
7
|
import useDefaultButton from './use-default-button';
|
|
9
8
|
/**
|
|
@@ -50,7 +49,6 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
|
|
|
50
49
|
_as = unsafeRest.as,
|
|
51
50
|
_style = unsafeRest.style,
|
|
52
51
|
saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
|
|
53
|
-
var rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
54
52
|
var baseProps = useDefaultButton({
|
|
55
53
|
ariaLabel: ariaLabel,
|
|
56
54
|
ariaLabelledBy: ariaLabelledBy,
|
|
@@ -82,7 +80,7 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
|
|
|
82
80
|
});
|
|
83
81
|
return /*#__PURE__*/React.createElement(Pressable
|
|
84
82
|
// TODO: Remove spread props
|
|
85
|
-
, _extends({},
|
|
83
|
+
, _extends({}, saferRest, {
|
|
86
84
|
"aria-label": baseProps['aria-label'],
|
|
87
85
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
88
86
|
ref: baseProps.ref,
|
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
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 { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Anchor from '@atlaskit/primitives/anchor';
|
|
8
7
|
import useDefaultButton from './use-default-button';
|
|
9
8
|
var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
@@ -39,7 +38,6 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
39
38
|
_as = unsafeRest.as,
|
|
40
39
|
_style = unsafeRest.style,
|
|
41
40
|
saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
|
|
42
|
-
var rest = fg('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
43
41
|
var baseProps = useDefaultButton({
|
|
44
42
|
analyticsContext: analyticsContext,
|
|
45
43
|
appearance: appearance,
|
|
@@ -70,7 +68,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
70
68
|
});
|
|
71
69
|
return /*#__PURE__*/React.createElement(Anchor
|
|
72
70
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
73
|
-
, _extends({},
|
|
71
|
+
, _extends({}, saferRest, {
|
|
74
72
|
"aria-label": baseProps['aria-label'],
|
|
75
73
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
76
74
|
ref: baseProps.ref,
|
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
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
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
8
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
8
|
import useIconButton from './use-icon-button';
|
|
@@ -53,7 +52,6 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
53
52
|
_as = unsafeRest.as,
|
|
54
53
|
_style = unsafeRest.style,
|
|
55
54
|
saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
|
|
56
|
-
var rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
57
55
|
|
|
58
56
|
/**
|
|
59
57
|
* TODO: At some stage I'll look into re-using more logic across 'default' and 'icon'
|
|
@@ -104,7 +102,7 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
104
102
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
105
103
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
106
104
|
}, function (triggerProps) {
|
|
107
|
-
return /*#__PURE__*/React.createElement(Pressable, _extends({},
|
|
105
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({}, saferRest, {
|
|
108
106
|
// Top level props
|
|
109
107
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
110
108
|
type: type,
|
|
@@ -115,34 +113,34 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
115
113
|
// Shared between tooltip and native props
|
|
116
114
|
,
|
|
117
115
|
onMouseOver: function onMouseOver(e) {
|
|
118
|
-
var _triggerProps$onMouse,
|
|
116
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
119
117
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
120
|
-
(
|
|
118
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 || _saferRest$onMouseOve.call(saferRest, e);
|
|
121
119
|
},
|
|
122
120
|
onMouseOut: function onMouseOut(e) {
|
|
123
|
-
var _triggerProps$onMouse2,
|
|
121
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
124
122
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
125
|
-
(
|
|
123
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 || _saferRest$onMouseOut.call(saferRest, e);
|
|
126
124
|
},
|
|
127
125
|
onMouseMove: function onMouseMove(e) {
|
|
128
|
-
var _triggerProps$onMouse3,
|
|
126
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
129
127
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
130
|
-
(
|
|
128
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 || _saferRest$onMouseMov.call(saferRest, e);
|
|
131
129
|
},
|
|
132
130
|
onMouseDown: function onMouseDown(e) {
|
|
133
|
-
var _triggerProps$onMouse4,
|
|
131
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
134
132
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
135
|
-
(
|
|
133
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 || _saferRest$onMouseDow.call(saferRest, e);
|
|
136
134
|
},
|
|
137
135
|
onFocus: function onFocus(e) {
|
|
138
|
-
var _triggerProps$onFocus,
|
|
136
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
139
137
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
140
|
-
(
|
|
138
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 || _saferRest$onFocus.call(saferRest, e);
|
|
141
139
|
},
|
|
142
140
|
onBlur: function onBlur(e) {
|
|
143
|
-
var _triggerProps$onBlur,
|
|
141
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
144
142
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
145
|
-
(
|
|
143
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 || _saferRest$onBlur.call(saferRest, e);
|
|
146
144
|
}
|
|
147
145
|
// Shared between tooltip and base props
|
|
148
146
|
,
|
|
@@ -172,7 +170,7 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
172
170
|
}), baseProps.children);
|
|
173
171
|
});
|
|
174
172
|
}
|
|
175
|
-
return /*#__PURE__*/React.createElement(Pressable, _extends({},
|
|
173
|
+
return /*#__PURE__*/React.createElement(Pressable, _extends({}, saferRest, {
|
|
176
174
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
177
175
|
ref: baseProps.ref,
|
|
178
176
|
xcss: baseProps.xcss,
|
|
@@ -3,7 +3,6 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
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
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import Anchor from '@atlaskit/primitives/anchor';
|
|
8
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
8
|
import useIconButton from './use-icon-button';
|
|
@@ -42,7 +41,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
42
41
|
_as = unsafeRest.as,
|
|
43
42
|
_style = unsafeRest.style,
|
|
44
43
|
saferRest = _objectWithoutProperties(unsafeRest, _excluded2);
|
|
45
|
-
var rest = getBooleanFF('platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw') ? saferRest : unsafeRest;
|
|
46
44
|
var baseProps = useIconButton({
|
|
47
45
|
analyticsContext: analyticsContext,
|
|
48
46
|
appearance: appearance,
|
|
@@ -89,7 +87,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
89
87
|
}, function (triggerProps) {
|
|
90
88
|
return /*#__PURE__*/React.createElement(Anchor
|
|
91
89
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
92
|
-
, _extends({},
|
|
90
|
+
, _extends({}, saferRest, {
|
|
93
91
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
94
92
|
testId: testId,
|
|
95
93
|
componentName: "LinkIconButton",
|
|
@@ -98,34 +96,34 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
98
96
|
// Shared between tooltip and native props
|
|
99
97
|
,
|
|
100
98
|
onMouseOver: function onMouseOver(e) {
|
|
101
|
-
var _triggerProps$onMouse,
|
|
99
|
+
var _triggerProps$onMouse, _saferRest$onMouseOve;
|
|
102
100
|
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
103
|
-
(
|
|
101
|
+
(_saferRest$onMouseOve = saferRest.onMouseOver) === null || _saferRest$onMouseOve === void 0 || _saferRest$onMouseOve.call(saferRest, e);
|
|
104
102
|
},
|
|
105
103
|
onMouseOut: function onMouseOut(e) {
|
|
106
|
-
var _triggerProps$onMouse2,
|
|
104
|
+
var _triggerProps$onMouse2, _saferRest$onMouseOut;
|
|
107
105
|
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
108
|
-
(
|
|
106
|
+
(_saferRest$onMouseOut = saferRest.onMouseOut) === null || _saferRest$onMouseOut === void 0 || _saferRest$onMouseOut.call(saferRest, e);
|
|
109
107
|
},
|
|
110
108
|
onMouseMove: function onMouseMove(e) {
|
|
111
|
-
var _triggerProps$onMouse3,
|
|
109
|
+
var _triggerProps$onMouse3, _saferRest$onMouseMov;
|
|
112
110
|
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
113
|
-
(
|
|
111
|
+
(_saferRest$onMouseMov = saferRest.onMouseMove) === null || _saferRest$onMouseMov === void 0 || _saferRest$onMouseMov.call(saferRest, e);
|
|
114
112
|
},
|
|
115
113
|
onMouseDown: function onMouseDown(e) {
|
|
116
|
-
var _triggerProps$onMouse4,
|
|
114
|
+
var _triggerProps$onMouse4, _saferRest$onMouseDow;
|
|
117
115
|
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
118
|
-
(
|
|
116
|
+
(_saferRest$onMouseDow = saferRest.onMouseDown) === null || _saferRest$onMouseDow === void 0 || _saferRest$onMouseDow.call(saferRest, e);
|
|
119
117
|
},
|
|
120
118
|
onFocus: function onFocus(e) {
|
|
121
|
-
var _triggerProps$onFocus,
|
|
119
|
+
var _triggerProps$onFocus, _saferRest$onFocus;
|
|
122
120
|
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
123
|
-
(
|
|
121
|
+
(_saferRest$onFocus = saferRest.onFocus) === null || _saferRest$onFocus === void 0 || _saferRest$onFocus.call(saferRest, e);
|
|
124
122
|
},
|
|
125
123
|
onBlur: function onBlur(e) {
|
|
126
|
-
var _triggerProps$onBlur,
|
|
124
|
+
var _triggerProps$onBlur, _saferRest$onBlur;
|
|
127
125
|
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
128
|
-
(
|
|
126
|
+
(_saferRest$onBlur = saferRest.onBlur) === null || _saferRest$onBlur === void 0 || _saferRest$onBlur.call(saferRest, e);
|
|
129
127
|
}
|
|
130
128
|
// Shared between tooltip and base props
|
|
131
129
|
,
|
|
@@ -165,7 +163,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
165
163
|
}
|
|
166
164
|
return /*#__PURE__*/React.createElement(Anchor
|
|
167
165
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
168
|
-
, _extends({},
|
|
166
|
+
, _extends({}, saferRest, {
|
|
169
167
|
"aria-labelledby": baseProps['aria-labelledby'],
|
|
170
168
|
ref: baseProps.ref,
|
|
171
169
|
xcss: baseProps.xcss,
|
|
@@ -15,7 +15,9 @@ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerC
|
|
|
15
15
|
/**
|
|
16
16
|
* __Button__
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
19
|
+
*
|
|
20
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
19
21
|
*
|
|
20
22
|
* A button triggers an event or action. They let users know what will happen next.
|
|
21
23
|
*
|
|
@@ -57,6 +57,10 @@ var initial = {
|
|
|
57
57
|
/**
|
|
58
58
|
* __Custom theme button__
|
|
59
59
|
*
|
|
60
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
61
|
+
*
|
|
62
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
63
|
+
*
|
|
60
64
|
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
61
65
|
*
|
|
62
66
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
@@ -7,7 +7,9 @@ import LoadingSpinner from './shared/loading-spinner';
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* @deprecated Legacy loading buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
11
|
+
*
|
|
12
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
11
13
|
*
|
|
12
14
|
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
13
15
|
*
|
|
@@ -4,8 +4,8 @@ var _excluded = ["analyticsContext", "appearance", "autoFocus", "buttonCss", "ch
|
|
|
4
4
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
5
5
|
/**
|
|
6
6
|
* @jsxRuntime classic
|
|
7
|
+
* @jsx jsx
|
|
7
8
|
*/
|
|
8
|
-
/** @jsx jsx */
|
|
9
9
|
import React, { useCallback, useContext, useEffect, useRef } from 'react';
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -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: "19.
|
|
128
|
+
packageVersion: "19.1.1",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ReactNode } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { SplitButtonAppearance, SplitButtonContextAppearance, SplitButtonProps, SplitButtonSpacing } from './types';
|
|
@@ -5,7 +5,9 @@ export interface ButtonProps extends BaseProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* __Button__
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
9
|
+
*
|
|
10
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
9
11
|
*
|
|
10
12
|
* A button triggers an event or action. They let users know what will happen next.
|
|
11
13
|
*
|
|
@@ -2,6 +2,10 @@ import React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* __Custom theme button__
|
|
4
4
|
*
|
|
5
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
6
|
+
*
|
|
7
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
8
|
+
*
|
|
5
9
|
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
6
10
|
*
|
|
7
11
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
@@ -7,7 +7,9 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* @deprecated Legacy loading buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
11
|
+
*
|
|
12
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
11
13
|
*
|
|
12
14
|
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
13
15
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { type CSSObject } from '@emotion/react';
|
|
7
7
|
declare const ButtonBase: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.AllHTMLAttributes<HTMLElement>, "disabled">, "data-testid" | "data-has-overlay"> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import { type ReactNode } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { SplitButtonAppearance, SplitButtonContextAppearance, SplitButtonProps, SplitButtonSpacing } from './types';
|
|
@@ -5,7 +5,9 @@ export interface ButtonProps extends BaseProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* __Button__
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
9
|
+
*
|
|
10
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
9
11
|
*
|
|
10
12
|
* A button triggers an event or action. They let users know what will happen next.
|
|
11
13
|
*
|
|
@@ -2,6 +2,10 @@ import React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* __Custom theme button__
|
|
4
4
|
*
|
|
5
|
+
* @deprecated Legacy buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new`
|
|
6
|
+
*
|
|
7
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
8
|
+
*
|
|
5
9
|
* A custom theme button. Avoid using this component. It exists for those already using custom theming, which is hard to use and has performance issues.
|
|
6
10
|
*
|
|
7
11
|
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
@@ -7,7 +7,9 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* @deprecated Legacy loading buttons are deprecated and will be removed from `atlaskit/button` in an upcoming major release. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
11
|
+
*
|
|
12
|
+
* Please refer to the [migration guide](https://atlassian.design/components/button/button-legacy/migration-guide) for further details.
|
|
11
13
|
*
|
|
12
14
|
* A small wrapper around Button that allows you to show an @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true.
|
|
13
15
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
3
4
|
*/
|
|
4
|
-
/** @jsx jsx */
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { type CSSObject } from '@emotion/react';
|
|
7
7
|
declare const ButtonBase: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.AllHTMLAttributes<HTMLElement>, "disabled">, "data-testid" | "data-has-overlay"> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.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/"
|
|
@@ -31,68 +31,25 @@
|
|
|
31
31
|
"website": {
|
|
32
32
|
"name": "Button",
|
|
33
33
|
"category": "Components",
|
|
34
|
-
"status": {
|
|
35
|
-
"type": "beta",
|
|
36
|
-
"description": "New and ready to use. We'll provide comms and support for any major changes. Migrate from legacy buttons using our codemod.",
|
|
37
|
-
"actions": [
|
|
38
|
-
{
|
|
39
|
-
"text": "View the migration guide",
|
|
40
|
-
"href": "/components/button/button-legacy/migration-guide"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
34
|
"subPages": [
|
|
45
35
|
{
|
|
46
36
|
"title": "Icon button",
|
|
47
37
|
"id": "icon-button",
|
|
48
|
-
"status": {
|
|
49
|
-
"type": "beta",
|
|
50
|
-
"description": "New and ready to use. We'll provide comms and support for any major changes. Migrate from legacy buttons using our codemod.",
|
|
51
|
-
"actions": [
|
|
52
|
-
{
|
|
53
|
-
"text": "View the migration guide",
|
|
54
|
-
"href": "/components/button/button-legacy/migration-guide"
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
},
|
|
58
38
|
"sortKey": 1
|
|
59
39
|
},
|
|
60
40
|
{
|
|
61
41
|
"title": "Link button",
|
|
62
42
|
"id": "link-button",
|
|
63
|
-
"status": {
|
|
64
|
-
"type": "beta",
|
|
65
|
-
"description": "New and ready to use. We'll provide comms and support for any major changes. Migrate from legacy buttons using our codemod.",
|
|
66
|
-
"actions": [
|
|
67
|
-
{
|
|
68
|
-
"text": "View the migration guide",
|
|
69
|
-
"href": "/components/button/button-legacy/migration-guide"
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
43
|
"sortKey": 2
|
|
74
44
|
},
|
|
75
45
|
{
|
|
76
46
|
"title": "Link icon button",
|
|
77
47
|
"id": "link-icon-button",
|
|
78
|
-
"status": {
|
|
79
|
-
"type": "beta",
|
|
80
|
-
"description": "New and ready to use. We'll provide comms and support for any major changes. Migrate from legacy buttons using our codemod.",
|
|
81
|
-
"actions": [
|
|
82
|
-
{
|
|
83
|
-
"text": "View the migration guide",
|
|
84
|
-
"href": "/components/button/button-legacy/migration-guide"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
48
|
"sortKey": 3
|
|
89
49
|
},
|
|
90
50
|
{
|
|
91
51
|
"title": "Split button",
|
|
92
52
|
"id": "split-button",
|
|
93
|
-
"status": {
|
|
94
|
-
"type": "beta"
|
|
95
|
-
},
|
|
96
53
|
"sortKey": 4
|
|
97
54
|
},
|
|
98
55
|
{
|
|
@@ -129,16 +86,16 @@
|
|
|
129
86
|
".": "./src/index.tsx"
|
|
130
87
|
},
|
|
131
88
|
"dependencies": {
|
|
132
|
-
"@atlaskit/analytics-next": "^
|
|
89
|
+
"@atlaskit/analytics-next": "^10.0.0",
|
|
133
90
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
134
91
|
"@atlaskit/focus-ring": "^1.5.0",
|
|
135
|
-
"@atlaskit/icon": "^22.
|
|
92
|
+
"@atlaskit/icon": "^22.10.0",
|
|
136
93
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
137
94
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
138
|
-
"@atlaskit/primitives": "^11.
|
|
95
|
+
"@atlaskit/primitives": "^11.1.0",
|
|
139
96
|
"@atlaskit/spinner": "^16.2.0",
|
|
140
97
|
"@atlaskit/theme": "^12.11.0",
|
|
141
|
-
"@atlaskit/tokens": "^1.
|
|
98
|
+
"@atlaskit/tokens": "^1.57.0",
|
|
142
99
|
"@atlaskit/tooltip": "^18.5.0",
|
|
143
100
|
"@atlaskit/visually-hidden": "^1.4.0",
|
|
144
101
|
"@babel/runtime": "^7.0.0",
|
|
@@ -153,9 +110,9 @@
|
|
|
153
110
|
"@af/integration-testing": "*",
|
|
154
111
|
"@af/visual-regression": "*",
|
|
155
112
|
"@atlaskit/app-provider": "^1.3.0",
|
|
156
|
-
"@atlaskit/calendar": "^14.
|
|
157
|
-
"@atlaskit/checkbox": "^13.
|
|
158
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
113
|
+
"@atlaskit/calendar": "^14.4.0",
|
|
114
|
+
"@atlaskit/checkbox": "^13.6.0",
|
|
115
|
+
"@atlaskit/dropdown-menu": "^12.15.0",
|
|
159
116
|
"@atlaskit/ssr": "*",
|
|
160
117
|
"@atlaskit/toggle": "^13.2.0",
|
|
161
118
|
"@atlaskit/visual-regression": "*",
|
|
@@ -183,9 +140,6 @@
|
|
|
183
140
|
},
|
|
184
141
|
"platform-component-visual-refresh": {
|
|
185
142
|
"type": "boolean"
|
|
186
|
-
},
|
|
187
|
-
"platform.design-system-team.remove-unsafe-spread-from-new-button_a2xhw": {
|
|
188
|
-
"type": "boolean"
|
|
189
143
|
}
|
|
190
144
|
}
|
|
191
145
|
}
|