@atlaskit/button 16.15.0 → 16.16.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 +12 -0
- package/dist/cjs/containers/button-group.js +4 -2
- package/dist/cjs/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/containers/button-group.js +4 -2
- package/dist/es2019/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/containers/button-group.js +4 -2
- package/dist/esm/new-button/variants/shared/use-button-base.js +1 -1
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/containers/button-group.d.ts +9 -2
- package/dist/types/new-button/variants/types.d.ts +1 -1
- package/dist/types-ts4.5/containers/button-group.d.ts +9 -2
- package/dist/types-ts4.5/new-button/variants/types.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 16.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 16.16.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#42973](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42973) [`0fe0a5121a7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0fe0a5121a7) - Add missing `testId` prop to `<ButtonGroup>` to enable testing
|
|
14
|
+
|
|
3
15
|
## 16.15.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -21,9 +21,11 @@ var buttonGroupStyles = (0, _react2.css)({
|
|
|
21
21
|
});
|
|
22
22
|
function ButtonGroup(_ref) {
|
|
23
23
|
var appearance = _ref.appearance,
|
|
24
|
-
children = _ref.children
|
|
24
|
+
children = _ref.children,
|
|
25
|
+
testId = _ref.testId;
|
|
25
26
|
return (0, _react2.jsx)("div", {
|
|
26
|
-
css: buttonGroupStyles
|
|
27
|
+
css: buttonGroupStyles,
|
|
28
|
+
"data-testid": testId
|
|
27
29
|
}, _react.default.Children.map(_react.default.Children.toArray(children), function (child, idx) {
|
|
28
30
|
if (!child) {
|
|
29
31
|
return null;
|
|
@@ -115,7 +115,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
115
115
|
action: 'clicked',
|
|
116
116
|
componentName: 'button',
|
|
117
117
|
packageName: "@atlaskit/button",
|
|
118
|
-
packageVersion: "16.
|
|
118
|
+
packageVersion: "16.16.1",
|
|
119
119
|
analyticsData: analyticsContext,
|
|
120
120
|
actionSubject: buttonType
|
|
121
121
|
});
|
|
@@ -118,7 +118,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
118
118
|
action: 'clicked',
|
|
119
119
|
componentName: 'button',
|
|
120
120
|
packageName: "@atlaskit/button",
|
|
121
|
-
packageVersion: "16.
|
|
121
|
+
packageVersion: "16.16.1",
|
|
122
122
|
analyticsData: analyticsContext
|
|
123
123
|
});
|
|
124
124
|
|
|
@@ -11,10 +11,12 @@ const buttonGroupStyles = css({
|
|
|
11
11
|
});
|
|
12
12
|
export default function ButtonGroup({
|
|
13
13
|
appearance,
|
|
14
|
-
children
|
|
14
|
+
children,
|
|
15
|
+
testId
|
|
15
16
|
}) {
|
|
16
17
|
return jsx("div", {
|
|
17
|
-
css: buttonGroupStyles
|
|
18
|
+
css: buttonGroupStyles,
|
|
19
|
+
"data-testid": testId
|
|
18
20
|
}, React.Children.map(React.Children.toArray(children), (child, idx) => {
|
|
19
21
|
if (!child) {
|
|
20
22
|
return null;
|
|
@@ -103,7 +103,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
103
103
|
action: 'clicked',
|
|
104
104
|
componentName: 'button',
|
|
105
105
|
packageName: "@atlaskit/button",
|
|
106
|
-
packageVersion: "16.
|
|
106
|
+
packageVersion: "16.16.1",
|
|
107
107
|
analyticsData: analyticsContext
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -11,9 +11,11 @@ var buttonGroupStyles = css({
|
|
|
11
11
|
});
|
|
12
12
|
export default function ButtonGroup(_ref) {
|
|
13
13
|
var appearance = _ref.appearance,
|
|
14
|
-
children = _ref.children
|
|
14
|
+
children = _ref.children,
|
|
15
|
+
testId = _ref.testId;
|
|
15
16
|
return jsx("div", {
|
|
16
|
-
css: buttonGroupStyles
|
|
17
|
+
css: buttonGroupStyles,
|
|
18
|
+
"data-testid": testId
|
|
17
19
|
}, React.Children.map(React.Children.toArray(children), function (child, idx) {
|
|
18
20
|
if (!child) {
|
|
19
21
|
return null;
|
|
@@ -107,7 +107,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
107
107
|
action: 'clicked',
|
|
108
108
|
componentName: 'button',
|
|
109
109
|
packageName: "@atlaskit/button",
|
|
110
|
-
packageVersion: "16.
|
|
110
|
+
packageVersion: "16.16.1",
|
|
111
111
|
analyticsData: analyticsContext,
|
|
112
112
|
actionSubject: buttonType
|
|
113
113
|
});
|
|
@@ -109,7 +109,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
109
109
|
action: 'clicked',
|
|
110
110
|
componentName: 'button',
|
|
111
111
|
packageName: "@atlaskit/button",
|
|
112
|
-
packageVersion: "16.
|
|
112
|
+
packageVersion: "16.16.1",
|
|
113
113
|
analyticsData: analyticsContext
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -4,9 +4,16 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { Appearance } from '../old-button/types';
|
|
5
5
|
export type ButtonGroupProps = {
|
|
6
6
|
/**
|
|
7
|
-
* The appearance to apply to all buttons
|
|
7
|
+
* The appearance to apply to all buttons
|
|
8
8
|
*/
|
|
9
9
|
appearance?: Appearance;
|
|
10
|
+
/**
|
|
11
|
+
* The buttons to render inside the Button Group
|
|
12
|
+
*/
|
|
10
13
|
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
16
|
+
*/
|
|
17
|
+
testId?: string;
|
|
11
18
|
};
|
|
12
|
-
export default function ButtonGroup({ appearance, children, }: ButtonGroupProps): jsx.JSX.Element;
|
|
19
|
+
export default function ButtonGroup({ appearance, children, testId, }: ButtonGroupProps): jsx.JSX.Element;
|
|
@@ -45,7 +45,7 @@ export type CommonButtonProps<TagName extends HTMLElement> = {
|
|
|
45
45
|
*/
|
|
46
46
|
children: React.ReactNode;
|
|
47
47
|
/**
|
|
48
|
-
* A
|
|
48
|
+
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
49
49
|
*/
|
|
50
50
|
testId?: string;
|
|
51
51
|
/**
|
|
@@ -4,9 +4,16 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import { Appearance } from '../old-button/types';
|
|
5
5
|
export type ButtonGroupProps = {
|
|
6
6
|
/**
|
|
7
|
-
* The appearance to apply to all buttons
|
|
7
|
+
* The appearance to apply to all buttons
|
|
8
8
|
*/
|
|
9
9
|
appearance?: Appearance;
|
|
10
|
+
/**
|
|
11
|
+
* The buttons to render inside the Button Group
|
|
12
|
+
*/
|
|
10
13
|
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
16
|
+
*/
|
|
17
|
+
testId?: string;
|
|
11
18
|
};
|
|
12
|
-
export default function ButtonGroup({ appearance, children, }: ButtonGroupProps): jsx.JSX.Element;
|
|
19
|
+
export default function ButtonGroup({ appearance, children, testId, }: ButtonGroupProps): jsx.JSX.Element;
|
|
@@ -45,7 +45,7 @@ export type CommonButtonProps<TagName extends HTMLElement> = {
|
|
|
45
45
|
*/
|
|
46
46
|
children: React.ReactNode;
|
|
47
47
|
/**
|
|
48
|
-
* A
|
|
48
|
+
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
49
49
|
*/
|
|
50
50
|
testId?: string;
|
|
51
51
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.16.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/"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"title": "Button (new)",
|
|
34
34
|
"id": "button-new",
|
|
35
35
|
"status": {
|
|
36
|
-
"type": "
|
|
36
|
+
"type": "closed-beta"
|
|
37
37
|
},
|
|
38
38
|
"sortKey": 1
|
|
39
39
|
},
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
83
83
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
84
84
|
"@atlaskit/primitives": "^1.10.0",
|
|
85
|
-
"@atlaskit/spinner": "^
|
|
85
|
+
"@atlaskit/spinner": "^16.0.0",
|
|
86
86
|
"@atlaskit/theme": "^12.6.0",
|
|
87
87
|
"@atlaskit/tokens": "^1.28.0",
|
|
88
88
|
"@atlaskit/visually-hidden": "^1.2.4",
|