@atlaskit/button 16.3.9 → 16.3.10
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 +6 -0
- package/dist/cjs/button-group.js +2 -1
- package/dist/cjs/shared/button-base.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/button-group.js +2 -1
- package/dist/es2019/shared/button-base.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/button-group.js +2 -1
- package/dist/esm/shared/button-base.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +9 -6
- package/report.api.md +89 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 16.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bc989043572`](https://bitbucket.org/atlassian/atlassian-frontend/commits/bc989043572) - Internal changes to apply spacing tokens. This should be a no-op change.
|
|
8
|
+
|
|
3
9
|
## 16.3.9
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/button-group.js
CHANGED
|
@@ -18,7 +18,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
18
18
|
/** @jsx jsx */
|
|
19
19
|
var buttonGroupStyles = (0, _core.css)({
|
|
20
20
|
display: 'inline-flex',
|
|
21
|
-
|
|
21
|
+
// TODO Delete this comment after verifying spacing token -> previous value `4`
|
|
22
|
+
gap: "var(--ds-scale-050, 4px)",
|
|
22
23
|
'> *': {
|
|
23
24
|
flex: '1 0 auto'
|
|
24
25
|
}
|
|
@@ -101,7 +101,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
|
|
|
101
101
|
action: 'clicked',
|
|
102
102
|
componentName: 'button',
|
|
103
103
|
packageName: "@atlaskit/button",
|
|
104
|
-
packageVersion: "16.3.
|
|
104
|
+
packageVersion: "16.3.10",
|
|
105
105
|
analyticsData: analyticsContext
|
|
106
106
|
}); // Button currently calls preventDefault, which is not standard button behaviour
|
|
107
107
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,7 +3,8 @@ import React, { Fragment } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/core';
|
|
4
4
|
const buttonGroupStyles = css({
|
|
5
5
|
display: 'inline-flex',
|
|
6
|
-
|
|
6
|
+
// TODO Delete this comment after verifying spacing token -> previous value `4`
|
|
7
|
+
gap: "var(--ds-scale-050, 4px)",
|
|
7
8
|
'> *': {
|
|
8
9
|
flex: '1 0 auto'
|
|
9
10
|
}
|
|
@@ -68,7 +68,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
68
68
|
action: 'clicked',
|
|
69
69
|
componentName: 'button',
|
|
70
70
|
packageName: "@atlaskit/button",
|
|
71
|
-
packageVersion: "16.3.
|
|
71
|
+
packageVersion: "16.3.10",
|
|
72
72
|
analyticsData: analyticsContext
|
|
73
73
|
}); // Button currently calls preventDefault, which is not standard button behaviour
|
|
74
74
|
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/button-group.js
CHANGED
|
@@ -3,7 +3,8 @@ import React, { Fragment } from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/core';
|
|
4
4
|
var buttonGroupStyles = css({
|
|
5
5
|
display: 'inline-flex',
|
|
6
|
-
|
|
6
|
+
// TODO Delete this comment after verifying spacing token -> previous value `4`
|
|
7
|
+
gap: "var(--ds-scale-050, 4px)",
|
|
7
8
|
'> *': {
|
|
8
9
|
flex: '1 0 auto'
|
|
9
10
|
}
|
|
@@ -77,7 +77,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
77
77
|
action: 'clicked',
|
|
78
78
|
componentName: 'button',
|
|
79
79
|
packageName: "@atlaskit/button",
|
|
80
|
-
packageVersion: "16.3.
|
|
80
|
+
packageVersion: "16.3.10",
|
|
81
81
|
analyticsData: analyticsContext
|
|
82
82
|
}); // Button currently calls preventDefault, which is not standard button behaviour
|
|
83
83
|
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "16.3.
|
|
3
|
+
"version": "16.3.10",
|
|
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/"
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
22
23
|
"sideEffects": false,
|
|
23
24
|
"atlaskit:src": "src/index.tsx",
|
|
24
25
|
"atlassian": {
|
|
26
|
+
"disableProductCI": true,
|
|
25
27
|
"team": "Design System Team",
|
|
26
28
|
"releaseModel": "scheduled",
|
|
27
29
|
"website": {
|
|
@@ -50,11 +52,11 @@
|
|
|
50
52
|
"react": "^16.8.0"
|
|
51
53
|
},
|
|
52
54
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/checkbox": "^12.
|
|
55
|
+
"@atlaskit/checkbox": "^12.4.0",
|
|
54
56
|
"@atlaskit/docs": "*",
|
|
55
|
-
"@atlaskit/icon": "^21.
|
|
56
|
-
"@atlaskit/logo": "^13.
|
|
57
|
-
"@atlaskit/section-message": "^6.
|
|
57
|
+
"@atlaskit/icon": "^21.11.0",
|
|
58
|
+
"@atlaskit/logo": "^13.10.0",
|
|
59
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
58
60
|
"@atlaskit/select": "^15.7.0",
|
|
59
61
|
"@atlaskit/ssr": "*",
|
|
60
62
|
"@atlaskit/visual-regression": "*",
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
"design-system": "v1",
|
|
84
86
|
"ui-components": "lite-mode",
|
|
85
87
|
"analytics": "analytics-next",
|
|
88
|
+
"design-tokens": "spacing",
|
|
86
89
|
"theming": "tokens",
|
|
87
90
|
"deprecation": "no-deprecated-imports",
|
|
88
91
|
"styling": [
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/button"
|
|
1
|
+
## API Report File for "@atlaskit/button".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
/// <reference types="react" />
|
|
@@ -24,49 +26,87 @@ export declare type Appearance =
|
|
|
24
26
|
| 'warning';
|
|
25
27
|
|
|
26
28
|
export declare type BaseOwnProps = {
|
|
27
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The base styling to apply to the button
|
|
31
|
+
*/
|
|
28
32
|
appearance?: Appearance;
|
|
29
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Set the button to autofocus on mount
|
|
35
|
+
*/
|
|
30
36
|
autoFocus?: boolean;
|
|
31
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Add a classname to the button
|
|
39
|
+
*/
|
|
32
40
|
className?: string;
|
|
33
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Used to 'overlay' something over a button. This is commonly used to display a loading spinner
|
|
43
|
+
*/
|
|
34
44
|
overlay?: React_2.ReactNode;
|
|
35
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Provides a url for buttons being used as a link
|
|
47
|
+
*/
|
|
36
48
|
href?: string;
|
|
37
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Places an icon within the button, after the button's text
|
|
51
|
+
*/
|
|
38
52
|
iconAfter?: React_2.ReactChild;
|
|
39
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Places an icon within the button, before the button's text
|
|
55
|
+
*/
|
|
40
56
|
iconBefore?: React_2.ReactChild;
|
|
41
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Set if the button is disabled
|
|
59
|
+
*/
|
|
42
60
|
isDisabled?: boolean;
|
|
43
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Change the style to indicate the button is selected
|
|
63
|
+
*/
|
|
44
64
|
isSelected?: boolean;
|
|
45
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Handler to be called on blur
|
|
67
|
+
*/
|
|
46
68
|
onBlur?: React_2.FocusEventHandler<HTMLElement>;
|
|
47
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details
|
|
71
|
+
*/
|
|
48
72
|
onClick?: (
|
|
49
73
|
e: React_2.MouseEvent<HTMLElement>,
|
|
50
74
|
analyticsEvent: UIAnalyticsEvent,
|
|
51
75
|
) => void;
|
|
52
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Handler to be called on focus
|
|
78
|
+
*/
|
|
53
79
|
onFocus?: React_2.FocusEventHandler<HTMLElement>;
|
|
54
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Set the amount of padding in the button
|
|
82
|
+
*/
|
|
55
83
|
spacing?: Spacing;
|
|
56
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Pass target down to a link within the button component, if a href is provided
|
|
86
|
+
*/
|
|
57
87
|
target?: React_2.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
58
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Pass type down to a button
|
|
90
|
+
*/
|
|
59
91
|
type?: React_2.ButtonHTMLAttributes<HTMLButtonElement>['type'];
|
|
60
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Option to fit button width to its parent width
|
|
94
|
+
*/
|
|
61
95
|
shouldFitContainer?: boolean;
|
|
62
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Text content to be rendered in the button
|
|
98
|
+
*/
|
|
63
99
|
children?: React_2.ReactNode;
|
|
64
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
102
|
+
*/
|
|
65
103
|
testId?: string;
|
|
66
104
|
component?:
|
|
67
105
|
| React_2.ComponentType<React_2.AllHTMLAttributes<HTMLElement>>
|
|
68
106
|
| React_2.ElementType;
|
|
69
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* Additional information to be included in the `context` of analytics events that come from button
|
|
109
|
+
*/
|
|
70
110
|
analyticsContext?: Record<string, any>;
|
|
71
111
|
};
|
|
72
112
|
|
|
@@ -81,6 +121,15 @@ export declare type BaseProps = Combine<
|
|
|
81
121
|
BaseOwnProps
|
|
82
122
|
>;
|
|
83
123
|
|
|
124
|
+
/**
|
|
125
|
+
* __Button__
|
|
126
|
+
*
|
|
127
|
+
* A button triggers an event or action. They let users know what will happen next.
|
|
128
|
+
*
|
|
129
|
+
* - [Examples](https://atlassian.design/components/button/examples)
|
|
130
|
+
* - [Code](https://atlassian.design/components/button/code)
|
|
131
|
+
* - [Usage](https://atlassian.design/components/button/usage)
|
|
132
|
+
*/
|
|
84
133
|
declare const Button: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
|
|
85
134
|
ButtonProps & React_2.RefAttributes<HTMLElement>
|
|
86
135
|
>>;
|
|
@@ -92,7 +141,9 @@ export declare function ButtonGroup({
|
|
|
92
141
|
}: ButtonGroupProps): JSX.Element;
|
|
93
142
|
|
|
94
143
|
declare type ButtonGroupProps = {
|
|
95
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* The appearance to apply to all buttons.
|
|
146
|
+
*/
|
|
96
147
|
appearance?: Appearance;
|
|
97
148
|
children?: React_2.ReactNode;
|
|
98
149
|
};
|
|
@@ -101,6 +152,13 @@ export declare interface ButtonProps extends BaseProps {}
|
|
|
101
152
|
|
|
102
153
|
declare type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
103
154
|
|
|
155
|
+
/**
|
|
156
|
+
* __Custom theme button__
|
|
157
|
+
*
|
|
158
|
+
* 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.
|
|
159
|
+
*
|
|
160
|
+
* - [Examples](https://atlassian.design/components/button/examples#custom-theme-button)
|
|
161
|
+
*/
|
|
104
162
|
export declare const CustomThemeButton: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<
|
|
105
163
|
Omit<BaseProps, 'overlay'> &
|
|
106
164
|
CustomThemeButtonOwnProps &
|
|
@@ -109,7 +167,8 @@ export declare const CustomThemeButton: React_2.MemoExoticComponent<React_2.Forw
|
|
|
109
167
|
|
|
110
168
|
export declare type CustomThemeButtonOwnProps = {
|
|
111
169
|
isLoading?: boolean;
|
|
112
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* Slow + discouraged custom theme API
|
|
113
172
|
* See custom theme guide for usage details
|
|
114
173
|
*/
|
|
115
174
|
theme?: (
|
|
@@ -130,6 +189,13 @@ export declare type InteractionState =
|
|
|
130
189
|
| 'focus'
|
|
131
190
|
| 'default';
|
|
132
191
|
|
|
192
|
+
/**
|
|
193
|
+
* __Loading button__
|
|
194
|
+
*
|
|
195
|
+
* 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.
|
|
196
|
+
*
|
|
197
|
+
* - [Examples](https://atlassian.design/components/button/examples#loading-button)
|
|
198
|
+
*/
|
|
133
199
|
export declare const LoadingButton: React_2.ForwardRefExoticComponent<
|
|
134
200
|
Omit<BaseProps, 'overlay'> &
|
|
135
201
|
LoadingButtonOwnProps &
|