@atlaskit/button 20.3.8 → 20.3.9

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/old-button/shared/button-base.js +1 -1
  3. package/dist/es2019/old-button/shared/button-base.js +1 -1
  4. package/dist/esm/old-button/shared/button-base.js +1 -1
  5. package/dist/types/new-button/variants/default/button.d.ts +3 -1
  6. package/dist/types/new-button/variants/icon/button.d.ts +3 -1
  7. package/dist/types/new-button/variants/types.d.ts +3 -4
  8. package/dist/types/old-button/shared/colors.d.ts +1 -1
  9. package/dist/types/old-button/shared/css.d.ts +2 -1
  10. package/dist/types-ts4.5/new-button/variants/default/button.d.ts +3 -1
  11. package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +3 -1
  12. package/dist/types-ts4.5/new-button/variants/types.d.ts +3 -4
  13. package/dist/types-ts4.5/old-button/shared/colors.d.ts +1 -1
  14. package/dist/types-ts4.5/old-button/shared/css.d.ts +2 -1
  15. package/package.json +13 -10
  16. package/extract-react-types/custom-theme-button-props.tsx +0 -5
  17. package/extract-react-types/legacy-button/custom-theme-button-props.tsx +0 -5
  18. package/extract-react-types/legacy-button/loading-button-props.tsx +0 -5
  19. package/extract-react-types/legacy-button/shared-props.tsx +0 -5
  20. package/extract-react-types/loading-button-props.tsx +0 -5
  21. package/extract-react-types/new-button/containers/split-button/split-button-props.tsx +0 -5
  22. package/extract-react-types/new-button/variants/default/button-props.tsx +0 -5
  23. package/extract-react-types/new-button/variants/default/common-default-button-props.tsx +0 -11
  24. package/extract-react-types/new-button/variants/default/link-button-props.tsx +0 -10
  25. package/extract-react-types/new-button/variants/icon-button/common-icon-button-props.tsx +0 -11
  26. package/extract-react-types/new-button/variants/icon-button/icon-button-props.tsx +0 -5
  27. package/extract-react-types/new-button/variants/icon-button/link-icon-button-props.tsx +0 -5
  28. package/extract-react-types/shared-props.tsx +0 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 20.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#103751](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103751)
8
+ [`868078aed0479`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/868078aed0479) -
9
+ Remove unused exports and update dev dependencies.
10
+
3
11
  ## 20.3.8
4
12
 
5
13
  ### Patch Changes
@@ -133,7 +133,7 @@ var ButtonBase = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(prop
133
133
  action: 'clicked',
134
134
  componentName: 'button',
135
135
  packageName: "@atlaskit/button",
136
- packageVersion: "20.3.8",
136
+ packageVersion: "20.3.9",
137
137
  analyticsData: analyticsContext
138
138
  });
139
139
 
@@ -119,7 +119,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref)
119
119
  action: 'clicked',
120
120
  componentName: 'button',
121
121
  packageName: "@atlaskit/button",
122
- packageVersion: "20.3.8",
122
+ packageVersion: "20.3.9",
123
123
  analyticsData: analyticsContext
124
124
  });
125
125
 
@@ -125,7 +125,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
125
125
  action: 'clicked',
126
126
  componentName: 'button',
127
127
  packageName: "@atlaskit/button",
128
- packageVersion: "20.3.8",
128
+ packageVersion: "20.3.9",
129
129
  analyticsData: analyticsContext
130
130
  });
131
131
 
@@ -11,5 +11,7 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
11
11
  * - [Code](https://atlassian.design/components/button/code)
12
12
  * - [Usage](https://atlassian.design/components/button/usage)
13
13
  */
14
- declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<import("../types").AdditionalHTMLElementPropsExtender<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">>, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
14
+ declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className" | "role">, "data-testid"> & {
15
+ 'data-testid'?: undefined;
16
+ }, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
15
17
  export default Button;
@@ -11,5 +11,7 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
11
11
  * - [Code](https://atlassian.design/components/button/icon-button/code)
12
12
  * - [Usage](https://atlassian.design/components/button/icon-button/usage)
13
13
  */
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>>>;
14
+ declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className" | "role">, "data-testid"> & {
15
+ 'data-testid'?: undefined;
16
+ }, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
15
17
  export default IconButton;
@@ -49,9 +49,8 @@ export type CommonButtonProps<TagName extends HTMLElement> = {
49
49
  */
50
50
  interactionName?: string;
51
51
  };
52
- export type SupportedElements = HTMLButtonElement | HTMLAnchorElement;
53
52
  type SupportedElementAttributes = React.ButtonHTMLAttributes<HTMLButtonElement> | React.AnchorHTMLAttributes<HTMLAnchorElement>;
54
- export type AdditionalHTMLElementPropsExtender<Props extends SupportedElementAttributes> = Combine<Omit<Props, 'className' | 'style' | 'role' | 'disabled'>, {
53
+ type AdditionalHTMLElementPropsExtender<Props extends SupportedElementAttributes> = Combine<Omit<Props, 'className' | 'style' | 'role' | 'disabled'>, {
55
54
  'data-testid'?: never;
56
55
  }>;
57
56
  /**
@@ -70,7 +69,7 @@ export type AdditionalButtonVariantProps = {
70
69
  /**
71
70
  * Combines common button props with additional HTML attributes
72
71
  */
73
- export type CombinedButtonProps<TagName extends HTMLElement, HTMLAttributes extends SupportedElementAttributes> = Combine<HTMLAttributes, CommonButtonProps<TagName>>;
72
+ type CombinedButtonProps<TagName extends HTMLElement, HTMLAttributes extends SupportedElementAttributes> = Combine<HTMLAttributes, CommonButtonProps<TagName>>;
74
73
  /**
75
74
  * Common props for Button `<button>` variants
76
75
  */
@@ -78,7 +77,7 @@ export type CommonButtonVariantProps = AdditionalButtonVariantProps & CombinedBu
78
77
  /**
79
78
  * Common additional props for Link `<a>` Button variants, including icon and default buttons
80
79
  */
81
- export type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
80
+ type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
82
81
  /**
83
82
  * 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.
84
83
  */
@@ -12,7 +12,7 @@ export type ColorGroup = {
12
12
  focus?: ColorRule;
13
13
  focusSelected?: ColorRule;
14
14
  };
15
- export type ColorPreset = {
15
+ type ColorPreset = {
16
16
  [key in Appearance]: ColorGroup;
17
17
  };
18
18
  type Values = {
@@ -1,7 +1,7 @@
1
1
  import { type CSSObject } from '@emotion/react';
2
2
  import { type ThemeModes } from '@atlaskit/theme/types';
3
3
  import { type Appearance, type Spacing } from '../types';
4
- export type GetCssArgs = {
4
+ type GetCssArgs = {
5
5
  appearance: Appearance;
6
6
  spacing: Spacing;
7
7
  mode: ThemeModes;
@@ -20,3 +20,4 @@ export declare function getFadingCss({ hasOverlay }: {
20
20
  hasOverlay: boolean;
21
21
  }): import("@emotion/react").SerializedStyles;
22
22
  export declare const overlayCss: CSSObject;
23
+ export {};
@@ -11,5 +11,7 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
11
11
  * - [Code](https://atlassian.design/components/button/code)
12
12
  * - [Usage](https://atlassian.design/components/button/usage)
13
13
  */
14
- declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<import("../types").AdditionalHTMLElementPropsExtender<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">>, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
14
+ declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className" | "role">, "data-testid"> & {
15
+ 'data-testid'?: undefined;
16
+ }, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
15
17
  export default Button;
@@ -11,5 +11,7 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
11
11
  * - [Code](https://atlassian.design/components/button/icon-button/code)
12
12
  * - [Usage](https://atlassian.design/components/button/icon-button/usage)
13
13
  */
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>>>;
14
+ declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className" | "role">, "data-testid"> & {
15
+ 'data-testid'?: undefined;
16
+ }, keyof import("../types").CommonButtonProps<TagName>> & import("../types").CommonButtonProps<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>>;
15
17
  export default IconButton;
@@ -49,9 +49,8 @@ export type CommonButtonProps<TagName extends HTMLElement> = {
49
49
  */
50
50
  interactionName?: string;
51
51
  };
52
- export type SupportedElements = HTMLButtonElement | HTMLAnchorElement;
53
52
  type SupportedElementAttributes = React.ButtonHTMLAttributes<HTMLButtonElement> | React.AnchorHTMLAttributes<HTMLAnchorElement>;
54
- export type AdditionalHTMLElementPropsExtender<Props extends SupportedElementAttributes> = Combine<Omit<Props, 'className' | 'style' | 'role' | 'disabled'>, {
53
+ type AdditionalHTMLElementPropsExtender<Props extends SupportedElementAttributes> = Combine<Omit<Props, 'className' | 'style' | 'role' | 'disabled'>, {
55
54
  'data-testid'?: never;
56
55
  }>;
57
56
  /**
@@ -70,7 +69,7 @@ export type AdditionalButtonVariantProps = {
70
69
  /**
71
70
  * Combines common button props with additional HTML attributes
72
71
  */
73
- export type CombinedButtonProps<TagName extends HTMLElement, HTMLAttributes extends SupportedElementAttributes> = Combine<HTMLAttributes, CommonButtonProps<TagName>>;
72
+ type CombinedButtonProps<TagName extends HTMLElement, HTMLAttributes extends SupportedElementAttributes> = Combine<HTMLAttributes, CommonButtonProps<TagName>>;
74
73
  /**
75
74
  * Common props for Button `<button>` variants
76
75
  */
@@ -78,7 +77,7 @@ export type CommonButtonVariantProps = AdditionalButtonVariantProps & CombinedBu
78
77
  /**
79
78
  * Common additional props for Link `<a>` Button variants, including icon and default buttons
80
79
  */
81
- export type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
80
+ type AdditionalCommonLinkVariantProps<RouterLinkConfig extends Record<string, any> = never> = {
82
81
  /**
83
82
  * 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.
84
83
  */
@@ -12,7 +12,7 @@ export type ColorGroup = {
12
12
  focus?: ColorRule;
13
13
  focusSelected?: ColorRule;
14
14
  };
15
- export type ColorPreset = {
15
+ type ColorPreset = {
16
16
  [key in Appearance]: ColorGroup;
17
17
  };
18
18
  type Values = {
@@ -1,7 +1,7 @@
1
1
  import { type CSSObject } from '@emotion/react';
2
2
  import { type ThemeModes } from '@atlaskit/theme/types';
3
3
  import { type Appearance, type Spacing } from '../types';
4
- export type GetCssArgs = {
4
+ type GetCssArgs = {
5
5
  appearance: Appearance;
6
6
  spacing: Spacing;
7
7
  mode: ThemeModes;
@@ -20,3 +20,4 @@ export declare function getFadingCss({ hasOverlay }: {
20
20
  hasOverlay: boolean;
21
21
  }): import("@emotion/react").SerializedStyles;
22
22
  export declare const overlayCss: CSSObject;
23
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "20.3.8",
3
+ "version": "20.3.9",
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/"
@@ -87,13 +87,13 @@
87
87
  "@atlaskit/analytics-next": "^10.2.0",
88
88
  "@atlaskit/ds-lib": "^3.3.0",
89
89
  "@atlaskit/focus-ring": "^2.0.0",
90
- "@atlaskit/icon": "^23.3.0",
90
+ "@atlaskit/icon": "^23.4.0",
91
91
  "@atlaskit/interaction-context": "^2.4.0",
92
92
  "@atlaskit/platform-feature-flags": "^0.3.0",
93
93
  "@atlaskit/primitives": "^13.3.0",
94
94
  "@atlaskit/spinner": "^16.3.0",
95
95
  "@atlaskit/theme": "^14.0.0",
96
- "@atlaskit/tokens": "^3.0.0",
96
+ "@atlaskit/tokens": "^3.1.0",
97
97
  "@atlaskit/tooltip": "^19.0.0",
98
98
  "@atlaskit/visually-hidden": "^1.5.0",
99
99
  "@babel/runtime": "^7.0.0",
@@ -106,26 +106,29 @@
106
106
  "@af/accessibility-testing": "*",
107
107
  "@af/integration-testing": "*",
108
108
  "@af/visual-regression": "*",
109
- "@atlaskit/app-provider": "^1.5.0",
110
- "@atlaskit/calendar": "^16.1.0",
109
+ "@atlaskit/app-provider": "^1.6.0",
111
110
  "@atlaskit/checkbox": "^15.2.0",
111
+ "@atlaskit/docs": "*",
112
112
  "@atlaskit/dropdown-menu": "^12.24.0",
113
+ "@atlaskit/form": "^11.0.1",
114
+ "@atlaskit/heading": "*",
115
+ "@atlaskit/link": "*",
116
+ "@atlaskit/logo": "^15.1.1",
117
+ "@atlaskit/modal-dialog": "^12.19.1",
118
+ "@atlaskit/section-message": "*",
119
+ "@atlaskit/select": "^18.9.1",
113
120
  "@atlaskit/ssr": "*",
114
121
  "@atlaskit/toggle": "^14.0.0",
115
122
  "@atlaskit/visual-regression": "*",
116
- "@atlassian/feature-flags-test-utils": "^0.2.1",
117
123
  "@testing-library/react": "^12.1.5",
118
124
  "@testing-library/user-event": "^14.4.3",
119
125
  "ast-types": "^0.13.3",
120
126
  "bind-event-listener": "^3.0.0",
121
- "jest-emotion": "^10.0.32",
122
- "jest-in-case": "^1.0.2",
123
127
  "jscodeshift": "^0.13.0",
124
128
  "lodash": "^4.17.21",
125
129
  "react-dom": "^16.8.0",
126
130
  "storybook-addon-performance": "^0.17.3",
127
- "typescript": "~5.4.2",
128
- "wait-for-expect": "^1.2.0"
131
+ "typescript": "~5.4.2"
129
132
  },
130
133
  "homepage": "https://atlassian.design/components/button/",
131
134
  "platform-feature-flags": {
@@ -1,5 +0,0 @@
1
- import { type CustomThemeButtonOwnProps } from '../src/old-button/custom-theme-button/custom-theme-button-types';
2
-
3
- export default function CustomThemeButtonProps(props: CustomThemeButtonOwnProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type CustomThemeButtonOwnProps } from '../../src/old-button/custom-theme-button/custom-theme-button-types';
2
-
3
- export default function CustomThemeButtonProps(props: CustomThemeButtonOwnProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type LoadingButtonOwnProps } from '../../src/old-button/loading-button';
2
-
3
- export default function LoadingButtonProps(props: LoadingButtonOwnProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type BaseOwnProps } from '../../src/old-button/types';
2
-
3
- export default function SharedProps(props: BaseOwnProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type LoadingButtonOwnProps } from '../src/old-button/loading-button';
2
-
3
- export default function LoadingButtonProps(props: LoadingButtonOwnProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import type { SplitButtonProps } from '../../../../src/new-button/containers/split-button/types';
2
-
3
- export default function SplitProps(props: SplitButtonProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
2
-
3
- export default function ButtonProps(props: AdditionalButtonVariantProps) {
4
- return null;
5
- }
@@ -1,11 +0,0 @@
1
- import { type CommonDefaultButtonProps } from '../../../../src/new-button/variants/default/types';
2
- import {
3
- type CommonButtonProps,
4
- type SupportedElements,
5
- } from '../../../../src/new-button/variants/types';
6
-
7
- export default function CommonDefaultButtonProps(
8
- props: CommonButtonProps<SupportedElements> & CommonDefaultButtonProps,
9
- ) {
10
- return null;
11
- }
@@ -1,10 +0,0 @@
1
- import {
2
- type AdditionalCommonLinkVariantProps,
3
- type AdditionalDefaultLinkVariantProps,
4
- } from '../../../../src/new-button/variants/types';
5
-
6
- export default function LinkButtonProps(
7
- props: AdditionalCommonLinkVariantProps & AdditionalDefaultLinkVariantProps,
8
- ) {
9
- return null;
10
- }
@@ -1,11 +0,0 @@
1
- import { type CommonIconButtonProps } from '../../../../src/new-button/variants/icon/types';
2
- import {
3
- type CommonButtonProps,
4
- type SupportedElements,
5
- } from '../../../../src/new-button/variants/types';
6
-
7
- export default function CommonProps(
8
- props: CommonButtonProps<SupportedElements> & CommonIconButtonProps,
9
- ) {
10
- return null;
11
- }
@@ -1,5 +0,0 @@
1
- import { type AdditionalButtonVariantProps } from '../../../../src/new-button/variants/types';
2
-
3
- export default function IconButtonProps(props: AdditionalButtonVariantProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type AdditionalCommonLinkVariantProps } from '../../../../src/new-button/variants/types';
2
-
3
- export default function LinkButtonProps(props: AdditionalCommonLinkVariantProps) {
4
- return null;
5
- }
@@ -1,5 +0,0 @@
1
- import { type BaseOwnProps } from '../src/old-button/types';
2
-
3
- export default function SharedProps(props: BaseOwnProps) {
4
- return null;
5
- }