@atlaskit/button 16.8.0 → 16.8.2

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.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`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.
8
+
9
+ ## 16.8.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ba43427b3e8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba43427b3e8) - Internal changes to account for introduction of shape/radius tokens.
14
+
3
15
  ## 16.8.0
4
16
 
5
17
  ### Minor Changes
@@ -10,13 +22,13 @@
10
22
 
11
23
  ### Patch Changes
12
24
 
13
- - [`687e9b93266`](https://bitbucket.org/atlassian/atlassian-frontend/commits/687e9b93266) - DUMMY changeset to fix version resolution
25
+ - [`687e9b93266`](https://bitbucket.org/atlassian/atlassian-frontend/commits/687e9b93266) - Updated dependencies
14
26
 
15
27
  ## 16.7.5
16
28
 
17
29
  ### Patch Changes
18
30
 
19
- - [`3a14ab26d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a14ab26d19) - Workaround for product intgegrator
31
+ - [`3a14ab26d19`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a14ab26d19) - Updated dependencies
20
32
 
21
33
  ## 16.7.4
22
34
 
@@ -34,7 +46,7 @@
34
46
 
35
47
  ### Patch Changes
36
48
 
37
- - [`96b5112590b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96b5112590b) - DUMMY CHANGESET to work around Product Integrator bug
49
+ - [`96b5112590b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96b5112590b) - Updated dependencies
38
50
 
39
51
  ## 16.7.1
40
52
 
@@ -56,7 +68,7 @@
56
68
 
57
69
  ### Patch Changes
58
70
 
59
- - [`23a850fe471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/23a850fe471) - DUMMY changeset to fix PI
71
+ - [`23a850fe471`](https://bitbucket.org/atlassian/atlassian-frontend/commits/23a850fe471) - Updated dependencies
60
72
 
61
73
  ## 16.6.0
62
74
 
@@ -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.0",
97
+ packageVersion: "16.8.2",
98
98
  analyticsData: analyticsContext
99
99
  });
100
100
 
@@ -15,7 +15,6 @@ var _constants = require("@atlaskit/theme/constants");
15
15
  var _colors = _interopRequireDefault(require("./colors"));
16
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
17
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
- var borderRadius = (0, _constants.borderRadius)();
19
18
  var gridSize = (0, _constants.gridSize)();
20
19
  var fontSize = (0, _constants.fontSize)();
21
20
 
@@ -104,7 +103,7 @@ function getCss(_ref3) {
104
103
  // 0px margin added to css-reset
105
104
  alignItems: 'baseline',
106
105
  borderWidth: 0,
107
- borderRadius: borderRadius,
106
+ borderRadius: "var(--ds-border-radius, 3px)",
108
107
  boxSizing: 'border-box',
109
108
  display: 'inline-flex',
110
109
  fontSize: 'inherit',
@@ -197,7 +196,7 @@ function getIconStyle(_ref4) {
197
196
  return (0, _react.css)({
198
197
  display: 'flex',
199
198
  // icon size cannot grow and shrink
200
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
199
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
201
200
  margin: spacing === 'none' ? 0 : innerMargin.icon,
202
201
  flexGrow: 0,
203
202
  flexShrink: 0,
@@ -212,7 +211,7 @@ function getIconStyle(_ref4) {
212
211
  function getContentStyle(_ref5) {
213
212
  var spacing = _ref5.spacing;
214
213
  return (0, _react.css)({
215
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
214
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
216
215
  margin: spacing === 'none' ? 0 : innerMargin.content,
217
216
  // content can grow and shrink
218
217
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.0",
3
+ "version": "16.8.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0",
83
+ packageVersion: "16.8.2",
84
84
  analyticsData: analyticsContext
85
85
  });
86
86
 
@@ -1,9 +1,8 @@
1
1
  import { css } from '@emotion/react';
2
- import { borderRadius as getBorderRadius, fontSize as getFontSize,
2
+ import { fontSize as getFontSize,
3
3
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
4
4
  gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import colors from './colors';
6
- const borderRadius = getBorderRadius();
7
6
  const gridSize = getGridSize();
8
7
  const fontSize = getFontSize();
9
8
 
@@ -95,7 +94,7 @@ export function getCss({
95
94
  // 0px margin added to css-reset
96
95
  alignItems: 'baseline',
97
96
  borderWidth: 0,
98
- borderRadius,
97
+ borderRadius: "var(--ds-border-radius, 3px)",
99
98
  boxSizing: 'border-box',
100
99
  display: 'inline-flex',
101
100
  fontSize: 'inherit',
@@ -199,7 +198,7 @@ export function getIconStyle({
199
198
  return css({
200
199
  display: 'flex',
201
200
  // icon size cannot grow and shrink
202
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
201
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
203
202
  margin: spacing === 'none' ? 0 : innerMargin.icon,
204
203
  flexGrow: 0,
205
204
  flexShrink: 0,
@@ -215,7 +214,7 @@ export function getContentStyle({
215
214
  spacing
216
215
  }) {
217
216
  return css({
218
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
217
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
219
218
  margin: spacing === 'none' ? 0 : innerMargin.content,
220
219
  // content can grow and shrink
221
220
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.0",
3
+ "version": "16.8.2",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0",
88
+ packageVersion: "16.8.2",
89
89
  analyticsData: analyticsContext
90
90
  });
91
91
 
@@ -2,11 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
4
  import { css } from '@emotion/react';
5
- import { borderRadius as getBorderRadius, fontSize as getFontSize,
5
+ import { fontSize as getFontSize,
6
6
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
7
  gridSize as getGridSize } from '@atlaskit/theme/constants';
8
8
  import colors from './colors';
9
- var borderRadius = getBorderRadius();
10
9
  var gridSize = getGridSize();
11
10
  var fontSize = getFontSize();
12
11
 
@@ -95,7 +94,7 @@ export function getCss(_ref3) {
95
94
  // 0px margin added to css-reset
96
95
  alignItems: 'baseline',
97
96
  borderWidth: 0,
98
- borderRadius: borderRadius,
97
+ borderRadius: "var(--ds-border-radius, 3px)",
99
98
  boxSizing: 'border-box',
100
99
  display: 'inline-flex',
101
100
  fontSize: 'inherit',
@@ -188,7 +187,7 @@ export function getIconStyle(_ref4) {
188
187
  return css({
189
188
  display: 'flex',
190
189
  // icon size cannot grow and shrink
191
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
190
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
192
191
  margin: spacing === 'none' ? 0 : innerMargin.icon,
193
192
  flexGrow: 0,
194
193
  flexShrink: 0,
@@ -203,7 +202,7 @@ export function getIconStyle(_ref4) {
203
202
  export function getContentStyle(_ref5) {
204
203
  var spacing = _ref5.spacing;
205
204
  return css({
206
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
205
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
207
206
  margin: spacing === 'none' ? 0 : innerMargin.content,
208
207
  // content can grow and shrink
209
208
  flexGrow: 1,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.0",
3
+ "version": "16.8.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "16.8.0",
3
+ "version": "16.8.2",
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/"
@@ -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.8.0",
54
+ "@atlaskit/tokens": "^1.11.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",
@@ -1,133 +0,0 @@
1
- ## API Report File for "@atlaskit/button"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { ComponentType } from 'react';
10
- import { CSSObject } from '@emotion/react';
11
- import { jsx } from '@emotion/react';
12
- import { default as React_2 } from 'react';
13
- import { ReactNode } from 'react';
14
- import { ThemeModes } from '@atlaskit/theme/types';
15
- import { ThemeModes as ThemeModes_2 } from '@atlaskit/theme';
16
- import { ThemeProp } from '@atlaskit/theme/components';
17
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
18
-
19
- // @public (undocumented)
20
- export type Appearance = 'danger' | 'default' | 'link' | 'primary' | 'subtle' | 'subtle-link' | 'warning';
21
-
22
- // @public (undocumented)
23
- export type BaseOwnProps = {
24
- appearance?: Appearance;
25
- autoFocus?: boolean;
26
- className?: string;
27
- overlay?: React_2.ReactNode;
28
- href?: string;
29
- iconAfter?: React_2.ReactChild;
30
- iconBefore?: React_2.ReactChild;
31
- isDisabled?: boolean;
32
- isSelected?: boolean;
33
- onBlur?: React_2.FocusEventHandler<HTMLElement>;
34
- onClick?: (e: React_2.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
35
- onFocus?: React_2.FocusEventHandler<HTMLElement>;
36
- spacing?: Spacing;
37
- target?: React_2.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
38
- type?: React_2.ButtonHTMLAttributes<HTMLButtonElement>['type'];
39
- shouldFitContainer?: boolean;
40
- children?: React_2.ReactNode;
41
- testId?: string;
42
- component?: React_2.ComponentType<React_2.AllHTMLAttributes<HTMLElement>> | React_2.ElementType;
43
- interactionName?: string;
44
- analyticsContext?: Record<string, any>;
45
- };
46
-
47
- // @public (undocumented)
48
- export type BaseProps = Combine<Combine<Omit<React_2.AllHTMLAttributes<HTMLElement>, 'disabled'>, {
49
- 'data-testid'?: never;
50
- 'data-has-overlay'?: never;
51
- }>, BaseOwnProps>;
52
-
53
- // @public
54
- const Button: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLElement>>>;
55
- export default Button;
56
-
57
- // @public (undocumented)
58
- export function ButtonGroup({ appearance, children, }: ButtonGroupProps): jsx.JSX.Element;
59
-
60
- // @public (undocumented)
61
- type ButtonGroupProps = {
62
- appearance?: Appearance;
63
- children?: React_2.ReactNode;
64
- };
65
-
66
- // @public (undocumented)
67
- export interface ButtonProps extends BaseProps {
68
- }
69
-
70
- // @public (undocumented)
71
- type Combine<First, Second> = Omit<First, keyof Second> & Second;
72
-
73
- // @public
74
- export const CustomThemeButton: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<Omit<BaseProps, "overlay"> & CustomThemeButtonOwnProps & React_2.RefAttributes<HTMLElement>>>;
75
-
76
- // @public (undocumented)
77
- export type CustomThemeButtonOwnProps = {
78
- isLoading?: boolean;
79
- theme?: (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
80
- };
81
-
82
- // @public (undocumented)
83
- export type CustomThemeButtonProps = Omit<BaseProps, 'overlay'> & CustomThemeButtonOwnProps;
84
-
85
- // @public (undocumented)
86
- export type InteractionState = 'active' | 'default' | 'disabled' | 'focus' | 'focusSelected' | 'hover' | 'selected';
87
-
88
- // @public
89
- export const LoadingButton: React_2.ForwardRefExoticComponent<Omit<BaseProps, "overlay"> & LoadingButtonOwnProps & React_2.RefAttributes<HTMLElement>>;
90
-
91
- // @public (undocumented)
92
- export type LoadingButtonOwnProps = {
93
- isLoading?: boolean;
94
- };
95
-
96
- // @public (undocumented)
97
- export type LoadingButtonProps = Omit<BaseProps, 'overlay'> & LoadingButtonOwnProps;
98
-
99
- // @public (undocumented)
100
- export type Spacing = 'compact' | 'default' | 'none';
101
-
102
- // @public (undocumented)
103
- export const Theme: {
104
- Consumer: ComponentType< {
105
- children: (tokens: ThemeTokens) => ReactNode;
106
- } & Partial<CustomThemeButtonProps> & {
107
- state: InteractionState;
108
- iconIsOnlyChild?: boolean | undefined;
109
- mode?: ThemeModes_2 | undefined;
110
- }>;
111
- Provider: ComponentType< {
112
- children?: ReactNode;
113
- value?: ThemeProp<ThemeTokens, ThemeProps> | undefined;
114
- }>;
115
- useTheme: (props: ThemeProps) => ThemeTokens;
116
- };
117
-
118
- // @public (undocumented)
119
- export type ThemeProps = Partial<CustomThemeButtonProps> & {
120
- state: InteractionState;
121
- iconIsOnlyChild?: boolean;
122
- mode?: ThemeModes;
123
- };
124
-
125
- // @public (undocumented)
126
- export type ThemeTokens = {
127
- buttonStyles: CSSObject;
128
- spinnerStyles: CSSObject;
129
- };
130
-
131
- // (No @packageDocumentation comment for this package)
132
-
133
- ```