@atlaskit/button 16.8.1 → 16.8.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 16.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`11cd2f83450`](https://bitbucket.org/atlassian/atlassian-frontend/commits/11cd2f83450) - Refactor loading button to use less rest props to pass props more explicitly.
8
+
9
+ ## 16.8.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`4ae083a7e66`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4ae083a7e66) - Use `@af/accessibility-testing` for default jest-axe config and jest-axe import in accessibility testing.
14
+
3
15
  ## 16.8.1
4
16
 
5
17
  ### Patch Changes
@@ -16,13 +28,13 @@
16
28
 
17
29
  ### Patch Changes
18
30
 
19
- - [`687e9b93266`](https://bitbucket.org/atlassian/atlassian-frontend/commits/687e9b93266) - DUMMY changeset to fix version resolution
31
+ - [`687e9b93266`](https://bitbucket.org/atlassian/atlassian-frontend/commits/687e9b93266) - Updated dependencies
20
32
 
21
33
  ## 16.7.5
22
34
 
23
35
  ### Patch Changes
24
36
 
25
- - [`3a14ab26d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a14ab26d19) - Workaround for product intgegrator
37
+ - [`3a14ab26d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a14ab26d19) - Updated dependencies
26
38
 
27
39
  ## 16.7.4
28
40
 
@@ -40,7 +52,7 @@
40
52
 
41
53
  ### Patch Changes
42
54
 
43
- - [`96b5112590b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96b5112590b) - DUMMY CHANGESET to work around Product Integrator bug
55
+ - [`96b5112590b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96b5112590b) - Updated dependencies
44
56
 
45
57
  ## 16.7.1
46
58
 
@@ -62,7 +74,7 @@
62
74
 
63
75
  ### Patch Changes
64
76
 
65
- - [`23a850fe471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/23a850fe471) - DUMMY changeset to fix PI
77
+ - [`23a850fe471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/23a850fe471) - Updated dependencies
66
78
 
67
79
  ## 16.6.0
68
80
 
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _button = _interopRequireDefault(require("./button"));
12
12
  var _loadingSpinner = _interopRequireDefault(require("./shared/loading-spinner"));
13
- var _excluded = ["isLoading"];
13
+ var _excluded = ["appearance", "isDisabled", "isSelected", "isLoading", "spacing"];
14
14
  /**
15
15
  * __Loading button__
16
16
  *
@@ -19,14 +19,27 @@ var _excluded = ["isLoading"];
19
19
  * - [Examples](https://atlassian.design/components/button/examples#loading-button)
20
20
  */
21
21
  var LoadingButton = /*#__PURE__*/_react.default.forwardRef(function LoadingButton(_ref, ref) {
22
- var _ref$isLoading = _ref.isLoading,
22
+ var appearance = _ref.appearance,
23
+ isDisabled = _ref.isDisabled,
24
+ isSelected = _ref.isSelected,
25
+ _ref$isLoading = _ref.isLoading,
23
26
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
27
+ spacing = _ref.spacing,
24
28
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
25
29
  // Button already has React.memo, so just leaning on that
26
30
  return /*#__PURE__*/_react.default.createElement(_button.default, (0, _extends2.default)({}, rest, {
27
31
  ref: ref,
32
+ appearance: appearance,
28
33
  "aria-busy": isLoading,
29
- overlay: isLoading ? /*#__PURE__*/_react.default.createElement(_loadingSpinner.default, rest) : null
34
+ isDisabled: isDisabled,
35
+ isSelected: isSelected,
36
+ overlay: isLoading ? /*#__PURE__*/_react.default.createElement(_loadingSpinner.default, {
37
+ spacing: spacing,
38
+ appearance: appearance,
39
+ isDisabled: isDisabled,
40
+ isSelected: isSelected
41
+ }) : null,
42
+ spacing: spacing
30
43
  }));
31
44
  });
32
45
 
@@ -94,7 +94,7 @@ var _default = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(props,
94
94
  action: 'clicked',
95
95
  componentName: 'button',
96
96
  packageName: "@atlaskit/button",
97
- packageVersion: "16.8.1",
97
+ packageVersion: "16.8.3",
98
98
  analyticsData: analyticsContext
99
99
  });
100
100
 
@@ -5,10 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = LoadingSpinner;
8
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
11
- var _excluded = ["spacing"];
12
10
  function getSpinnerAppearance(_ref) {
13
11
  var appearance = _ref.appearance,
14
12
  isDisabled = _ref.isDisabled,
@@ -25,12 +23,18 @@ function getSpinnerAppearance(_ref) {
25
23
  return 'inherit';
26
24
  }
27
25
  function LoadingSpinner(_ref2) {
28
- var _ref2$spacing = _ref2.spacing,
29
- spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
30
- rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
26
+ var appearance = _ref2.appearance,
27
+ isDisabled = _ref2.isDisabled,
28
+ isSelected = _ref2.isSelected,
29
+ _ref2$spacing = _ref2.spacing,
30
+ spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing;
31
31
  var size = spacing === 'default' ? 'medium' : 'small';
32
32
  return /*#__PURE__*/_react.default.createElement(_spinner.default, {
33
33
  size: size,
34
- appearance: getSpinnerAppearance(rest)
34
+ appearance: getSpinnerAppearance({
35
+ appearance: appearance,
36
+ isDisabled: isDisabled,
37
+ isSelected: isSelected
38
+ })
35
39
  });
36
40
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.1",
3
+ "version": "16.8.3",
4
4
  "sideEffects": false
5
5
  }
@@ -10,14 +10,27 @@ import LoadingSpinner from './shared/loading-spinner';
10
10
  * - [Examples](https://atlassian.design/components/button/examples#loading-button)
11
11
  */
12
12
  const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton({
13
+ appearance,
14
+ isDisabled,
15
+ isSelected,
13
16
  isLoading = false,
17
+ spacing,
14
18
  ...rest
15
19
  }, ref) {
16
20
  // Button already has React.memo, so just leaning on that
17
21
  return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
18
22
  ref: ref,
23
+ appearance: appearance,
19
24
  "aria-busy": isLoading,
20
- overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, rest) : null
25
+ isDisabled: isDisabled,
26
+ isSelected: isSelected,
27
+ overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, {
28
+ spacing: spacing,
29
+ appearance: appearance,
30
+ isDisabled: isDisabled,
31
+ isSelected: isSelected
32
+ }) : null,
33
+ spacing: spacing
21
34
  }));
22
35
  });
23
36
 
@@ -80,7 +80,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
80
80
  action: 'clicked',
81
81
  componentName: 'button',
82
82
  packageName: "@atlaskit/button",
83
- packageVersion: "16.8.1",
83
+ packageVersion: "16.8.3",
84
84
  analyticsData: analyticsContext
85
85
  });
86
86
 
@@ -17,12 +17,18 @@ function getSpinnerAppearance({
17
17
  return 'inherit';
18
18
  }
19
19
  export default function LoadingSpinner({
20
- spacing = 'default',
21
- ...rest
20
+ appearance,
21
+ isDisabled,
22
+ isSelected,
23
+ spacing = 'default'
22
24
  }) {
23
25
  const size = spacing === 'default' ? 'medium' : 'small';
24
26
  return /*#__PURE__*/React.createElement(Spinner, {
25
27
  size: size,
26
- appearance: getSpinnerAppearance(rest)
28
+ appearance: getSpinnerAppearance({
29
+ appearance,
30
+ isDisabled,
31
+ isSelected
32
+ })
27
33
  });
28
34
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.1",
3
+ "version": "16.8.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["isLoading"];
3
+ var _excluded = ["appearance", "isDisabled", "isSelected", "isLoading", "spacing"];
4
4
  import React from 'react';
5
5
  import Button from './button';
6
6
  import LoadingSpinner from './shared/loading-spinner';
@@ -12,14 +12,27 @@ import LoadingSpinner from './shared/loading-spinner';
12
12
  * - [Examples](https://atlassian.design/components/button/examples#loading-button)
13
13
  */
14
14
  var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(_ref, ref) {
15
- var _ref$isLoading = _ref.isLoading,
15
+ var appearance = _ref.appearance,
16
+ isDisabled = _ref.isDisabled,
17
+ isSelected = _ref.isSelected,
18
+ _ref$isLoading = _ref.isLoading,
16
19
  isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
20
+ spacing = _ref.spacing,
17
21
  rest = _objectWithoutProperties(_ref, _excluded);
18
22
  // Button already has React.memo, so just leaning on that
19
23
  return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
20
24
  ref: ref,
25
+ appearance: appearance,
21
26
  "aria-busy": isLoading,
22
- overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, rest) : null
27
+ isDisabled: isDisabled,
28
+ isSelected: isSelected,
29
+ overlay: isLoading ? /*#__PURE__*/React.createElement(LoadingSpinner, {
30
+ spacing: spacing,
31
+ appearance: appearance,
32
+ isDisabled: isDisabled,
33
+ isSelected: isSelected
34
+ }) : null,
35
+ spacing: spacing
23
36
  }));
24
37
  });
25
38
 
@@ -85,7 +85,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
85
85
  action: 'clicked',
86
86
  componentName: 'button',
87
87
  packageName: "@atlaskit/button",
88
- packageVersion: "16.8.1",
88
+ packageVersion: "16.8.3",
89
89
  analyticsData: analyticsContext
90
90
  });
91
91
 
@@ -1,5 +1,3 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- var _excluded = ["spacing"];
3
1
  import React from 'react';
4
2
  import Spinner from '@atlaskit/spinner';
5
3
  function getSpinnerAppearance(_ref) {
@@ -18,12 +16,18 @@ function getSpinnerAppearance(_ref) {
18
16
  return 'inherit';
19
17
  }
20
18
  export default function LoadingSpinner(_ref2) {
21
- var _ref2$spacing = _ref2.spacing,
22
- spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing,
23
- rest = _objectWithoutProperties(_ref2, _excluded);
19
+ var appearance = _ref2.appearance,
20
+ isDisabled = _ref2.isDisabled,
21
+ isSelected = _ref2.isSelected,
22
+ _ref2$spacing = _ref2.spacing,
23
+ spacing = _ref2$spacing === void 0 ? 'default' : _ref2$spacing;
24
24
  var size = spacing === 'default' ? 'medium' : 'small';
25
25
  return /*#__PURE__*/React.createElement(Spinner, {
26
26
  size: size,
27
- appearance: getSpinnerAppearance(rest)
27
+ appearance: getSpinnerAppearance({
28
+ appearance: appearance,
29
+ isDisabled: isDisabled,
30
+ isSelected: isSelected
31
+ })
28
32
  });
29
33
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.1",
3
+ "version": "16.8.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseProps } from '../types';
3
3
  type LoadingSpinnerProps = Pick<BaseProps, 'appearance' | 'isDisabled' | 'isSelected' | 'spacing'>;
4
- export default function LoadingSpinner({ spacing, ...rest }: LoadingSpinnerProps): JSX.Element;
4
+ export default function LoadingSpinner({ appearance, isDisabled, isSelected, spacing, }: LoadingSpinnerProps): JSX.Element;
5
5
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { BaseProps } from '../types';
3
3
  type LoadingSpinnerProps = Pick<BaseProps, 'appearance' | 'isDisabled' | 'isSelected' | 'spacing'>;
4
- export default function LoadingSpinner({ spacing, ...rest }: LoadingSpinnerProps): JSX.Element;
4
+ export default function LoadingSpinner({ appearance, isDisabled, isSelected, spacing, }: LoadingSpinnerProps): JSX.Element;
5
5
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.1",
3
+ "version": "16.8.3",
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/"
@@ -23,7 +23,7 @@
23
23
  "sideEffects": false,
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
- "team": "Design System Team",
26
+ "team": "Design System Maker Experience",
27
27
  "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Button",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/platform-feature-flags": "^0.2.0",
52
52
  "@atlaskit/spinner": "^15.5.0",
53
53
  "@atlaskit/theme": "^12.5.0",
54
- "@atlaskit/tokens": "^1.11.0",
54
+ "@atlaskit/tokens": "^1.13.0",
55
55
  "@babel/runtime": "^7.0.0",
56
56
  "@emotion/react": "^11.7.1"
57
57
  },
@@ -59,12 +59,9 @@
59
59
  "react": "^16.8.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@atlaskit/checkbox": "^12.6.0",
63
- "@atlaskit/docs": "*",
62
+ "@af/accessibility-testing": "*",
63
+ "@af/integration-testing": "*",
64
64
  "@atlaskit/icon": "^21.12.0",
65
- "@atlaskit/logo": "^13.14.0",
66
- "@atlaskit/section-message": "^6.4.0",
67
- "@atlaskit/select": "^16.5.0",
68
65
  "@atlaskit/ssr": "*",
69
66
  "@atlaskit/visual-regression": "*",
70
67
  "@atlaskit/webdriver-runner": "*",
@@ -73,7 +70,6 @@
73
70
  "@types/react-router-dom": "^4.3.1",
74
71
  "ast-types": "^0.13.3",
75
72
  "bind-event-listener": "^2.1.1",
76
- "jest-axe": "^4.0.0",
77
73
  "jest-emotion": "^10.0.32",
78
74
  "jest-in-case": "^1.0.2",
79
75
  "jscodeshift": "^0.13.0",