@atlaskit/button 17.17.0 → 17.17.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 +11 -3
- package/dist/cjs/new-button/variants/default/link.js +3 -3
- package/dist/cjs/new-button/variants/icon/button.js +3 -3
- package/dist/cjs/new-button/variants/icon/link.js +3 -3
- package/dist/cjs/old-button/button.js +5 -3
- package/dist/cjs/old-button/loading-button.js +2 -0
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/default/link.js +3 -3
- package/dist/es2019/new-button/variants/icon/button.js +3 -3
- package/dist/es2019/new-button/variants/icon/link.js +3 -3
- package/dist/es2019/old-button/button.js +5 -3
- package/dist/es2019/old-button/loading-button.js +2 -0
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/default/link.js +3 -3
- package/dist/esm/new-button/variants/icon/button.js +3 -3
- package/dist/esm/new-button/variants/icon/link.js +3 -3
- package/dist/esm/old-button/button.js +5 -3
- package/dist/esm/old-button/loading-button.js +2 -0
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/variants/default/link.d.ts +3 -3
- package/dist/types/new-button/variants/icon/button.d.ts +3 -3
- package/dist/types/new-button/variants/icon/link.d.ts +3 -3
- package/dist/types/new-button/variants/types.d.ts +1 -1
- package/dist/types/old-button/button.d.ts +5 -3
- package/dist/types/old-button/loading-button.d.ts +2 -0
- package/dist/types-ts4.5/new-button/variants/default/link.d.ts +3 -3
- package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +3 -3
- package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +3 -3
- package/dist/types-ts4.5/new-button/variants/types.d.ts +1 -1
- package/dist/types-ts4.5/old-button/button.d.ts +5 -3
- package/dist/types-ts4.5/old-button/loading-button.d.ts +2 -0
- package/package.json +57 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 17.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#103760](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103760)
|
|
8
|
+
[`53958b31d2e7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/53958b31d2e7) -
|
|
9
|
+
Legacy buttons are now marked with intent to deprecate in favor of new buttons
|
|
10
|
+
|
|
3
11
|
## 17.17.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -297,12 +305,12 @@ See new features for new exports and entrypoint ⤵
|
|
|
297
305
|
|
|
298
306
|
New Button goes open beta!
|
|
299
307
|
|
|
300
|
-
Check out the exports under `@atlaskit/button/new` and the
|
|
301
|
-
|
|
308
|
+
Check out the exports under `@atlaskit/button/new` and the [docs](/components/button/examples) for
|
|
309
|
+
our new approach.
|
|
302
310
|
|
|
303
311
|
##### Button
|
|
304
312
|
|
|
305
|
-
[Read the docs here.](/components/button/
|
|
313
|
+
[Read the docs here.](/components/button/examples)
|
|
306
314
|
|
|
307
315
|
```js
|
|
308
316
|
import Button from '@atlaskit/button/new';
|
|
@@ -109,9 +109,9 @@ var WithRef = /*#__PURE__*/(0, _react.forwardRef)(LinkButtonBase);
|
|
|
109
109
|
*
|
|
110
110
|
* Renders a link in the style of a button.
|
|
111
111
|
*
|
|
112
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
113
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
114
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
112
|
+
* - [Examples](https://atlassian.design/components/link-button/examples)
|
|
113
|
+
* - [Code](https://atlassian.design/components/link-button/code)
|
|
114
|
+
* - [Usage](https://atlassian.design/components/link-button/usage)
|
|
115
115
|
*/
|
|
116
116
|
var LinkButton = /*#__PURE__*/(0, _react.memo)(WithRef);
|
|
117
117
|
var _default = exports.default = LinkButton;
|
|
@@ -17,9 +17,9 @@ var _excluded = ["aria-label", "analyticsContext", "appearance", "autoFocus", "i
|
|
|
17
17
|
*
|
|
18
18
|
* TODO: Description
|
|
19
19
|
*
|
|
20
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
21
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
22
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
20
|
+
* - [Examples](https://atlassian.design/components/icon-button/examples)
|
|
21
|
+
* - [Code](https://atlassian.design/components/icon-button/code)
|
|
22
|
+
* - [Usage](https://atlassian.design/components/icon-button/usage)
|
|
23
23
|
*/
|
|
24
24
|
var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function Button(_ref, ref) {
|
|
25
25
|
var preventedAriaLabel = _ref['aria-label'],
|
|
@@ -203,9 +203,9 @@ var WithRef = /*#__PURE__*/(0, _react.forwardRef)(LinkIconButtonBase);
|
|
|
203
203
|
*
|
|
204
204
|
* Renders a link in the style of an icon button.
|
|
205
205
|
*
|
|
206
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
207
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
208
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
206
|
+
* - [Examples](https://atlassian.design/components/link-icon-button/examples)
|
|
207
|
+
* - [Code](https://atlassian.design/components/link-icon-button/code)
|
|
208
|
+
* - [Usage](https://atlassian.design/components/link-icon-button/usage)
|
|
209
209
|
*/
|
|
210
210
|
var LinkIconButton = /*#__PURE__*/(0, _react.memo)(WithRef);
|
|
211
211
|
var _default = exports.default = LinkIconButton;
|
|
@@ -22,11 +22,13 @@ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerC
|
|
|
22
22
|
/**
|
|
23
23
|
* __Button__
|
|
24
24
|
*
|
|
25
|
+
* CAUTION: Legacy buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new`.
|
|
26
|
+
*
|
|
25
27
|
* A button triggers an event or action. They let users know what will happen next.
|
|
26
28
|
*
|
|
27
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
28
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
29
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
29
|
+
* - [Examples](https://atlassian.design/components/button/button-legacy/examples)
|
|
30
|
+
* - [Code](https://atlassian.design/components/button/button-legacy/code)
|
|
31
|
+
* - [Usage](https://atlassian.design/components/button/button-legacy/usage)
|
|
30
32
|
*/
|
|
31
33
|
var Button = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function Button(_ref, ref) {
|
|
32
34
|
var _ref$appearance = _ref.appearance,
|
|
@@ -14,6 +14,8 @@ var _excluded = ["appearance", "isDisabled", "isSelected", "isLoading", "spacing
|
|
|
14
14
|
/**
|
|
15
15
|
* __Loading button__
|
|
16
16
|
*
|
|
17
|
+
* CAUTION: Legacy loading buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
18
|
+
*
|
|
17
19
|
* 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.
|
|
18
20
|
*
|
|
19
21
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
@@ -129,7 +129,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
129
129
|
action: 'clicked',
|
|
130
130
|
componentName: 'button',
|
|
131
131
|
packageName: "@atlaskit/button",
|
|
132
|
-
packageVersion: "17.17.
|
|
132
|
+
packageVersion: "17.17.1",
|
|
133
133
|
analyticsData: analyticsContext
|
|
134
134
|
});
|
|
135
135
|
|
|
@@ -98,9 +98,9 @@ const WithRef = /*#__PURE__*/forwardRef(LinkButtonBase);
|
|
|
98
98
|
*
|
|
99
99
|
* Renders a link in the style of a button.
|
|
100
100
|
*
|
|
101
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
102
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
103
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
101
|
+
* - [Examples](https://atlassian.design/components/link-button/examples)
|
|
102
|
+
* - [Code](https://atlassian.design/components/link-button/code)
|
|
103
|
+
* - [Usage](https://atlassian.design/components/link-button/usage)
|
|
104
104
|
*/
|
|
105
105
|
const LinkButton = /*#__PURE__*/memo(WithRef);
|
|
106
106
|
export default LinkButton;
|
|
@@ -8,9 +8,9 @@ import useIconButton from './use-icon-button';
|
|
|
8
8
|
*
|
|
9
9
|
* TODO: Description
|
|
10
10
|
*
|
|
11
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
12
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
13
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
11
|
+
* - [Examples](https://atlassian.design/components/icon-button/examples)
|
|
12
|
+
* - [Code](https://atlassian.design/components/icon-button/code)
|
|
13
|
+
* - [Usage](https://atlassian.design/components/icon-button/usage)
|
|
14
14
|
*/
|
|
15
15
|
const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button({
|
|
16
16
|
// Prevent duplicate labels being added.
|
|
@@ -190,9 +190,9 @@ const WithRef = /*#__PURE__*/forwardRef(LinkIconButtonBase);
|
|
|
190
190
|
*
|
|
191
191
|
* Renders a link in the style of an icon button.
|
|
192
192
|
*
|
|
193
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
194
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
195
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
193
|
+
* - [Examples](https://atlassian.design/components/link-icon-button/examples)
|
|
194
|
+
* - [Code](https://atlassian.design/components/link-icon-button/code)
|
|
195
|
+
* - [Usage](https://atlassian.design/components/link-icon-button/usage)
|
|
196
196
|
*/
|
|
197
197
|
const LinkIconButton = /*#__PURE__*/memo(WithRef);
|
|
198
198
|
export default LinkIconButton;
|
|
@@ -9,11 +9,13 @@ const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowe
|
|
|
9
9
|
/**
|
|
10
10
|
* __Button__
|
|
11
11
|
*
|
|
12
|
+
* CAUTION: Legacy buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new`.
|
|
13
|
+
*
|
|
12
14
|
* A button triggers an event or action. They let users know what will happen next.
|
|
13
15
|
*
|
|
14
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
15
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
16
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
16
|
+
* - [Examples](https://atlassian.design/components/button/button-legacy/examples)
|
|
17
|
+
* - [Code](https://atlassian.design/components/button/button-legacy/code)
|
|
18
|
+
* - [Usage](https://atlassian.design/components/button/button-legacy/usage)
|
|
17
19
|
*/
|
|
18
20
|
const Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button({
|
|
19
21
|
appearance = 'default',
|
|
@@ -5,6 +5,8 @@ import LoadingSpinner from './shared/loading-spinner';
|
|
|
5
5
|
/**
|
|
6
6
|
* __Loading button__
|
|
7
7
|
*
|
|
8
|
+
* CAUTION: Legacy loading buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
9
|
+
*
|
|
8
10
|
* 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.
|
|
9
11
|
*
|
|
10
12
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
@@ -114,7 +114,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
114
114
|
action: 'clicked',
|
|
115
115
|
componentName: 'button',
|
|
116
116
|
packageName: "@atlaskit/button",
|
|
117
|
-
packageVersion: "17.17.
|
|
117
|
+
packageVersion: "17.17.1",
|
|
118
118
|
analyticsData: analyticsContext
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -99,9 +99,9 @@ var WithRef = /*#__PURE__*/forwardRef(LinkButtonBase);
|
|
|
99
99
|
*
|
|
100
100
|
* Renders a link in the style of a button.
|
|
101
101
|
*
|
|
102
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
103
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
104
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
102
|
+
* - [Examples](https://atlassian.design/components/link-button/examples)
|
|
103
|
+
* - [Code](https://atlassian.design/components/link-button/code)
|
|
104
|
+
* - [Usage](https://atlassian.design/components/link-button/usage)
|
|
105
105
|
*/
|
|
106
106
|
var LinkButton = /*#__PURE__*/memo(WithRef);
|
|
107
107
|
export default LinkButton;
|
|
@@ -10,9 +10,9 @@ import useIconButton from './use-icon-button';
|
|
|
10
10
|
*
|
|
11
11
|
* TODO: Description
|
|
12
12
|
*
|
|
13
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
14
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
15
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
13
|
+
* - [Examples](https://atlassian.design/components/icon-button/examples)
|
|
14
|
+
* - [Code](https://atlassian.design/components/icon-button/code)
|
|
15
|
+
* - [Usage](https://atlassian.design/components/icon-button/usage)
|
|
16
16
|
*/
|
|
17
17
|
var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
18
18
|
var preventedAriaLabel = _ref['aria-label'],
|
|
@@ -193,9 +193,9 @@ var WithRef = /*#__PURE__*/forwardRef(LinkIconButtonBase);
|
|
|
193
193
|
*
|
|
194
194
|
* Renders a link in the style of an icon button.
|
|
195
195
|
*
|
|
196
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
197
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
198
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
196
|
+
* - [Examples](https://atlassian.design/components/link-icon-button/examples)
|
|
197
|
+
* - [Code](https://atlassian.design/components/link-icon-button/code)
|
|
198
|
+
* - [Usage](https://atlassian.design/components/link-icon-button/usage)
|
|
199
199
|
*/
|
|
200
200
|
var LinkIconButton = /*#__PURE__*/memo(WithRef);
|
|
201
201
|
export default LinkIconButton;
|
|
@@ -12,11 +12,13 @@ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerC
|
|
|
12
12
|
/**
|
|
13
13
|
* __Button__
|
|
14
14
|
*
|
|
15
|
+
* CAUTION: Legacy buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new`.
|
|
16
|
+
*
|
|
15
17
|
* A button triggers an event or action. They let users know what will happen next.
|
|
16
18
|
*
|
|
17
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
18
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
19
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
19
|
+
* - [Examples](https://atlassian.design/components/button/button-legacy/examples)
|
|
20
|
+
* - [Code](https://atlassian.design/components/button/button-legacy/code)
|
|
21
|
+
* - [Usage](https://atlassian.design/components/button/button-legacy/usage)
|
|
20
22
|
*/
|
|
21
23
|
var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
22
24
|
var _ref$appearance = _ref.appearance,
|
|
@@ -7,6 +7,8 @@ import LoadingSpinner from './shared/loading-spinner';
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
+
* CAUTION: Legacy loading buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
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
|
*
|
|
12
14
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
@@ -120,7 +120,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
120
120
|
action: 'clicked',
|
|
121
121
|
componentName: 'button',
|
|
122
122
|
packageName: "@atlaskit/button",
|
|
123
|
-
packageVersion: "17.17.
|
|
123
|
+
packageVersion: "17.17.1",
|
|
124
124
|
analyticsData: analyticsContext
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -8,9 +8,9 @@ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = ne
|
|
|
8
8
|
*
|
|
9
9
|
* Renders a link in the style of a button.
|
|
10
10
|
*
|
|
11
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
12
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
13
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
11
|
+
* - [Examples](https://atlassian.design/components/link-button/examples)
|
|
12
|
+
* - [Code](https://atlassian.design/components/link-button/code)
|
|
13
|
+
* - [Usage](https://atlassian.design/components/link-button/usage)
|
|
14
14
|
*/
|
|
15
15
|
declare const LinkButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkButtonProps<RouterLinkConfig> & {
|
|
16
16
|
ref?: Ref<HTMLAnchorElement>;
|
|
@@ -7,9 +7,9 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
|
|
|
7
7
|
*
|
|
8
8
|
* TODO: Description
|
|
9
9
|
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
10
|
+
* - [Examples](https://atlassian.design/components/icon-button/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/icon-button/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/icon-button/usage)
|
|
13
13
|
*/
|
|
14
14
|
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<import("../types").AdditionalHTMLElementPropsExtender<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">>, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
|
|
15
15
|
export default IconButton;
|
|
@@ -8,9 +8,9 @@ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any>
|
|
|
8
8
|
*
|
|
9
9
|
* Renders a link in the style of an icon button.
|
|
10
10
|
*
|
|
11
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
12
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
13
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
11
|
+
* - [Examples](https://atlassian.design/components/link-icon-button/examples)
|
|
12
|
+
* - [Code](https://atlassian.design/components/link-icon-button/code)
|
|
13
|
+
* - [Usage](https://atlassian.design/components/link-icon-button/usage)
|
|
14
14
|
*/
|
|
15
15
|
declare const LinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
|
|
16
16
|
ref?: Ref<HTMLAnchorElement>;
|
|
@@ -84,7 +84,7 @@ export type CommonButtonVariantProps = AdditionalButtonVariantProps & CombinedBu
|
|
|
84
84
|
*/
|
|
85
85
|
export type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
|
|
86
86
|
/**
|
|
87
|
-
* Provides a URL for link buttons. When using an AppProvider with a configured router link component, a `RouterLinkConfig` object type can be provided for advanced usage. See the [Link Button routing example](/components/button/
|
|
87
|
+
* Provides a URL for link buttons. When using an AppProvider with a configured router link component, a `RouterLinkConfig` object type can be provided for advanced usage. See the [Link Button routing example](/components/button/examples#routing) for more details.
|
|
88
88
|
*/
|
|
89
89
|
href: string | RouterLinkConfig;
|
|
90
90
|
};
|
|
@@ -5,11 +5,13 @@ export interface ButtonProps extends BaseProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* __Button__
|
|
7
7
|
*
|
|
8
|
+
* CAUTION: Legacy buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new`.
|
|
9
|
+
*
|
|
8
10
|
* A button triggers an event or action. They let users know what will happen next.
|
|
9
11
|
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
12
|
+
* - [Examples](https://atlassian.design/components/button/button-legacy/examples)
|
|
13
|
+
* - [Code](https://atlassian.design/components/button/button-legacy/code)
|
|
14
|
+
* - [Usage](https://atlassian.design/components/button/button-legacy/usage)
|
|
13
15
|
*/
|
|
14
16
|
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>>;
|
|
15
17
|
export default Button;
|
|
@@ -7,6 +7,8 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
+
* CAUTION: Legacy loading buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
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
|
*
|
|
12
14
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
@@ -8,9 +8,9 @@ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = ne
|
|
|
8
8
|
*
|
|
9
9
|
* Renders a link in the style of a button.
|
|
10
10
|
*
|
|
11
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
12
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
13
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
11
|
+
* - [Examples](https://atlassian.design/components/link-button/examples)
|
|
12
|
+
* - [Code](https://atlassian.design/components/link-button/code)
|
|
13
|
+
* - [Usage](https://atlassian.design/components/link-button/usage)
|
|
14
14
|
*/
|
|
15
15
|
declare const LinkButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkButtonProps<RouterLinkConfig> & {
|
|
16
16
|
ref?: Ref<HTMLAnchorElement>;
|
|
@@ -7,9 +7,9 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
|
|
|
7
7
|
*
|
|
8
8
|
* TODO: Description
|
|
9
9
|
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
10
|
+
* - [Examples](https://atlassian.design/components/icon-button/examples)
|
|
11
|
+
* - [Code](https://atlassian.design/components/icon-button/code)
|
|
12
|
+
* - [Usage](https://atlassian.design/components/icon-button/usage)
|
|
13
13
|
*/
|
|
14
14
|
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<import("../types").AdditionalHTMLElementPropsExtender<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">>, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
|
|
15
15
|
export default IconButton;
|
|
@@ -8,9 +8,9 @@ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any>
|
|
|
8
8
|
*
|
|
9
9
|
* Renders a link in the style of an icon button.
|
|
10
10
|
*
|
|
11
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
12
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
13
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
11
|
+
* - [Examples](https://atlassian.design/components/link-icon-button/examples)
|
|
12
|
+
* - [Code](https://atlassian.design/components/link-icon-button/code)
|
|
13
|
+
* - [Usage](https://atlassian.design/components/link-icon-button/usage)
|
|
14
14
|
*/
|
|
15
15
|
declare const LinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
|
|
16
16
|
ref?: Ref<HTMLAnchorElement>;
|
|
@@ -84,7 +84,7 @@ export type CommonButtonVariantProps = AdditionalButtonVariantProps & CombinedBu
|
|
|
84
84
|
*/
|
|
85
85
|
export type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
|
|
86
86
|
/**
|
|
87
|
-
* Provides a URL for link buttons. When using an AppProvider with a configured router link component, a `RouterLinkConfig` object type can be provided for advanced usage. See the [Link Button routing example](/components/button/
|
|
87
|
+
* Provides a URL for link buttons. When using an AppProvider with a configured router link component, a `RouterLinkConfig` object type can be provided for advanced usage. See the [Link Button routing example](/components/button/examples#routing) for more details.
|
|
88
88
|
*/
|
|
89
89
|
href: string | RouterLinkConfig;
|
|
90
90
|
};
|
|
@@ -5,11 +5,13 @@ export interface ButtonProps extends BaseProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* __Button__
|
|
7
7
|
*
|
|
8
|
+
* CAUTION: Legacy buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new`.
|
|
9
|
+
*
|
|
8
10
|
* A button triggers an event or action. They let users know what will happen next.
|
|
9
11
|
*
|
|
10
|
-
* - [Examples](https://atlassian.design/components/button/examples)
|
|
11
|
-
* - [Code](https://atlassian.design/components/button/code)
|
|
12
|
-
* - [Usage](https://atlassian.design/components/button/usage)
|
|
12
|
+
* - [Examples](https://atlassian.design/components/button/button-legacy/examples)
|
|
13
|
+
* - [Code](https://atlassian.design/components/button/button-legacy/code)
|
|
14
|
+
* - [Usage](https://atlassian.design/components/button/button-legacy/usage)
|
|
13
15
|
*/
|
|
14
16
|
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>>;
|
|
15
17
|
export default Button;
|
|
@@ -7,6 +7,8 @@ export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnPr
|
|
|
7
7
|
/**
|
|
8
8
|
* __Loading button__
|
|
9
9
|
*
|
|
10
|
+
* CAUTION: Legacy loading buttons will soon be deprecated. Please use the new Button components from `@atlaskit/button/new` with the `isLoading` prop.
|
|
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
|
*
|
|
12
14
|
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "17.17.
|
|
3
|
+
"version": "17.17.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,50 +31,88 @@
|
|
|
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
|
+
},
|
|
34
44
|
"subPages": [
|
|
35
45
|
{
|
|
36
|
-
"title": "
|
|
37
|
-
"id": "button
|
|
46
|
+
"title": "Icon button",
|
|
47
|
+
"id": "icon-button",
|
|
38
48
|
"status": {
|
|
39
|
-
"type": "beta"
|
|
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
|
+
]
|
|
40
57
|
},
|
|
41
58
|
"sortKey": 1
|
|
42
59
|
},
|
|
43
60
|
{
|
|
44
|
-
"title": "
|
|
45
|
-
"id": "
|
|
61
|
+
"title": "Link button",
|
|
62
|
+
"id": "link-button",
|
|
46
63
|
"status": {
|
|
47
|
-
"type": "beta"
|
|
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
|
+
]
|
|
48
72
|
},
|
|
49
73
|
"sortKey": 2
|
|
50
74
|
},
|
|
51
75
|
{
|
|
52
|
-
"title": "
|
|
53
|
-
"id": "
|
|
76
|
+
"title": "Link icon button",
|
|
77
|
+
"id": "link-icon-button",
|
|
54
78
|
"status": {
|
|
55
|
-
"type": "beta"
|
|
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
|
+
]
|
|
56
87
|
},
|
|
57
88
|
"sortKey": 3
|
|
58
89
|
},
|
|
59
90
|
{
|
|
60
|
-
"title": "
|
|
61
|
-
"id": "
|
|
91
|
+
"title": "Split button",
|
|
92
|
+
"id": "split-button",
|
|
62
93
|
"status": {
|
|
63
94
|
"type": "beta"
|
|
64
95
|
},
|
|
65
96
|
"sortKey": 4
|
|
66
97
|
},
|
|
67
98
|
{
|
|
68
|
-
"title": "
|
|
69
|
-
"id": "
|
|
70
|
-
"status": {
|
|
71
|
-
"type": "beta"
|
|
72
|
-
},
|
|
99
|
+
"title": "Button group",
|
|
100
|
+
"id": "button-group",
|
|
73
101
|
"sortKey": 5
|
|
74
102
|
},
|
|
75
103
|
{
|
|
76
|
-
"title": "Button
|
|
77
|
-
"id": "button-
|
|
104
|
+
"title": "Button (legacy)",
|
|
105
|
+
"id": "button-legacy",
|
|
106
|
+
"status": {
|
|
107
|
+
"type": "intent-to-deprecate",
|
|
108
|
+
"description": "Legacy buttons will soon be deprecated. Please use the new [button](/components/button), [icon button](/components/button/icon-button), [link button](/components/button/link-button), or [link icon button](/components/button/link-icon-button). Migrate from legacy buttons using our codemod.",
|
|
109
|
+
"actions": [
|
|
110
|
+
{
|
|
111
|
+
"text": "View the migration guide",
|
|
112
|
+
"href": "/components/button/button-legacy/migration-guide"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
78
116
|
"sortKey": 6
|
|
79
117
|
}
|
|
80
118
|
]
|