@atlaskit/button 23.3.2 → 23.4.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/button-group/package.json +1 -1
  3. package/custom-theme-button/package.json +1 -1
  4. package/dist/cjs/new-button/variants/shared/button-base.compiled.css +2 -0
  5. package/dist/cjs/new-button/variants/shared/button-base.js +1 -1
  6. package/dist/cjs/new-button/variants/shared/icon-renderer.js +11 -7
  7. package/dist/cjs/old-button/shared/button-base.js +1 -1
  8. package/dist/es2019/new-button/variants/shared/button-base.compiled.css +2 -0
  9. package/dist/es2019/new-button/variants/shared/button-base.js +1 -1
  10. package/dist/es2019/new-button/variants/shared/icon-renderer.js +11 -7
  11. package/dist/es2019/old-button/shared/button-base.js +1 -1
  12. package/dist/esm/new-button/variants/shared/button-base.compiled.css +2 -0
  13. package/dist/esm/new-button/variants/shared/button-base.js +1 -1
  14. package/dist/esm/new-button/variants/shared/icon-renderer.js +11 -7
  15. package/dist/esm/old-button/shared/button-base.js +1 -1
  16. package/dist/types/new-button/containers/split-button/split-button-context.d.ts +0 -1
  17. package/dist/types/new-button/containers/split-button/split-button.d.ts +1 -1
  18. package/dist/types/new-button/variants/default/button.d.ts +1 -1
  19. package/dist/types/new-button/variants/default/link.d.ts +1 -2
  20. package/dist/types/new-button/variants/default/types.d.ts +0 -1
  21. package/dist/types/new-button/variants/icon/button.d.ts +1 -1
  22. package/dist/types/new-button/variants/icon/link.d.ts +4 -3
  23. package/dist/types/new-button/variants/icon/types.d.ts +0 -1
  24. package/dist/types/old-button/custom-theme-button/theme.d.ts +0 -1
  25. package/dist/types/old-button/shared/block-events.d.ts +0 -1
  26. package/dist/types/old-button/shared/button-base.d.ts +2 -2
  27. package/dist/types/utils/variants.d.ts +6 -6
  28. package/dist/types-ts4.5/new-button/containers/split-button/split-button-context.d.ts +0 -1
  29. package/dist/types-ts4.5/new-button/containers/split-button/split-button.d.ts +1 -1
  30. package/dist/types-ts4.5/new-button/variants/default/button.d.ts +1 -1
  31. package/dist/types-ts4.5/new-button/variants/default/link.d.ts +1 -2
  32. package/dist/types-ts4.5/new-button/variants/default/types.d.ts +0 -1
  33. package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +1 -1
  34. package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +4 -3
  35. package/dist/types-ts4.5/new-button/variants/icon/types.d.ts +0 -1
  36. package/dist/types-ts4.5/old-button/custom-theme-button/theme.d.ts +0 -1
  37. package/dist/types-ts4.5/old-button/shared/block-events.d.ts +0 -1
  38. package/dist/types-ts4.5/old-button/shared/button-base.d.ts +2 -2
  39. package/dist/types-ts4.5/utils/variants.d.ts +6 -6
  40. package/loading-button/package.json +1 -1
  41. package/new/package.json +1 -1
  42. package/package.json +6 -7
  43. package/standard-button/package.json +1 -1
  44. package/types/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 23.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 23.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`6c62bb96f6bdf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c62bb96f6bdf) -
14
+ Updates to loading animation overlay not to overflow in scrollable containers.
15
+
3
16
  ## 23.3.2
4
17
 
5
18
  ### Patch Changes
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/button-group.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/button-group.d.ts"
14
14
  ]
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/custom-theme-button.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/custom-theme-button.d.ts"
14
14
  ]
@@ -15,6 +15,7 @@
15
15
  ._8l3mmuej:after{border-color:var(--ds-border,#091e4224)}
16
16
  ._11fnglyw:after{pointer-events:none}
17
17
  ._152tze3t{inset-block-start:var(--ds-space-0,0)}
18
+ ._18m915vq{overflow-y:hidden}
18
19
  ._18postnw:after{position:absolute}
19
20
  ._1bah1h6o{justify-content:center}
20
21
  ._1bsb1k8s{width:1.5rem}
@@ -28,6 +29,7 @@
28
29
  ._1hmsglyw{text-decoration-line:none}
29
30
  ._1o9zidpf{flex-shrink:0}
30
31
  ._1pbycs5v{z-index:2}
32
+ ._1reo15vq{overflow-x:hidden}
31
33
  ._4bfu1r31{text-decoration-color:currentColor}
32
34
  ._4cvr1h6o{align-items:center}
33
35
  ._4cvr1q9y{align-items:baseline}
@@ -40,7 +40,7 @@ var styles = {
40
40
  buttonIconBefore: "_bozgu2gc",
41
41
  buttonIconAfter: "_y4tiu2gc",
42
42
  splitButton: "_g0pbb4wl",
43
- loadingOverlay: "_1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
43
+ loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
44
44
  navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
45
45
  };
46
46
  var defaultStyles = {
@@ -23,12 +23,16 @@ function isIconRenderProp(func) {
23
23
  */
24
24
  var IconRenderer = function IconRenderer(_ref) {
25
25
  var Icon = _ref.icon;
26
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isIconRenderProp(Icon) ? Icon({
27
- label: '',
28
- color: 'currentColor'
29
- }) : /*#__PURE__*/_react.default.createElement(Icon, {
30
- label: "",
31
- color: 'currentColor'
32
- }));
26
+ return (
27
+ /*#__PURE__*/
28
+ // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
29
+ _react.default.createElement(_react.default.Fragment, null, isIconRenderProp(Icon) ? Icon({
30
+ label: '',
31
+ color: 'currentColor'
32
+ }) : /*#__PURE__*/_react.default.createElement(Icon, {
33
+ label: "",
34
+ color: 'currentColor'
35
+ }))
36
+ );
33
37
  };
34
38
  var _default = exports.default = IconRenderer;
@@ -132,7 +132,7 @@ var ButtonBase = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(prop
132
132
  action: 'clicked',
133
133
  componentName: 'button',
134
134
  packageName: "@atlaskit/button",
135
- packageVersion: "23.3.1",
135
+ packageVersion: "23.4.0",
136
136
  analyticsData: analyticsContext
137
137
  });
138
138
 
@@ -15,6 +15,7 @@
15
15
  ._8l3mmuej:after{border-color:var(--ds-border,#091e4224)}
16
16
  ._11fnglyw:after{pointer-events:none}
17
17
  ._152tze3t{inset-block-start:var(--ds-space-0,0)}
18
+ ._18m915vq{overflow-y:hidden}
18
19
  ._18postnw:after{position:absolute}
19
20
  ._1bah1h6o{justify-content:center}
20
21
  ._1bsb1k8s{width:1.5rem}
@@ -28,6 +29,7 @@
28
29
  ._1hmsglyw{text-decoration-line:none}
29
30
  ._1o9zidpf{flex-shrink:0}
30
31
  ._1pbycs5v{z-index:2}
32
+ ._1reo15vq{overflow-x:hidden}
31
33
  ._4bfu1r31{text-decoration-color:currentColor}
32
34
  ._4cvr1h6o{align-items:center}
33
35
  ._4cvr1q9y{align-items:baseline}
@@ -28,7 +28,7 @@ const styles = {
28
28
  buttonIconBefore: "_bozgu2gc",
29
29
  buttonIconAfter: "_y4tiu2gc",
30
30
  splitButton: "_g0pbb4wl",
31
- loadingOverlay: "_1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
31
+ loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
32
32
  navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
33
33
  };
34
34
  const defaultStyles = {
@@ -17,12 +17,16 @@ function isIconRenderProp(func) {
17
17
  const IconRenderer = ({
18
18
  icon: Icon
19
19
  }) => {
20
- return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
21
- label: '',
22
- color: 'currentColor'
23
- }) : /*#__PURE__*/React.createElement(Icon, {
24
- label: "",
25
- color: 'currentColor'
26
- }));
20
+ return (
21
+ /*#__PURE__*/
22
+ // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
23
+ React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
24
+ label: '',
25
+ color: 'currentColor'
26
+ }) : /*#__PURE__*/React.createElement(Icon, {
27
+ label: "",
28
+ color: 'currentColor'
29
+ }))
30
+ );
27
31
  };
28
32
  export default IconRenderer;
@@ -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: "23.3.1",
122
+ packageVersion: "23.4.0",
123
123
  analyticsData: analyticsContext
124
124
  });
125
125
 
@@ -15,6 +15,7 @@
15
15
  ._8l3mmuej:after{border-color:var(--ds-border,#091e4224)}
16
16
  ._11fnglyw:after{pointer-events:none}
17
17
  ._152tze3t{inset-block-start:var(--ds-space-0,0)}
18
+ ._18m915vq{overflow-y:hidden}
18
19
  ._18postnw:after{position:absolute}
19
20
  ._1bah1h6o{justify-content:center}
20
21
  ._1bsb1k8s{width:1.5rem}
@@ -28,6 +29,7 @@
28
29
  ._1hmsglyw{text-decoration-line:none}
29
30
  ._1o9zidpf{flex-shrink:0}
30
31
  ._1pbycs5v{z-index:2}
32
+ ._1reo15vq{overflow-x:hidden}
31
33
  ._4bfu1r31{text-decoration-color:currentColor}
32
34
  ._4cvr1h6o{align-items:center}
33
35
  ._4cvr1q9y{align-items:baseline}
@@ -31,7 +31,7 @@ var styles = {
31
31
  buttonIconBefore: "_bozgu2gc",
32
32
  buttonIconAfter: "_y4tiu2gc",
33
33
  splitButton: "_g0pbb4wl",
34
- loadingOverlay: "_1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
34
+ loadingOverlay: "_1reo15vq _18m915vq _1e0c1txw _kqswstnw _4cvr1h6o _1bah1h6o _u7coze3t _152tze3t _rjxpze3t _1e02ze3t",
35
35
  navigationSplitButton: "_1bsb1tcg _bfhksm61 _y4ti12x7 _bozg12x7"
36
36
  };
37
37
  var defaultStyles = {
@@ -16,12 +16,16 @@ function isIconRenderProp(func) {
16
16
  */
17
17
  var IconRenderer = function IconRenderer(_ref) {
18
18
  var Icon = _ref.icon;
19
- return /*#__PURE__*/React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
20
- label: '',
21
- color: 'currentColor'
22
- }) : /*#__PURE__*/React.createElement(Icon, {
23
- label: "",
24
- color: 'currentColor'
25
- }));
19
+ return (
20
+ /*#__PURE__*/
21
+ // @ts-ignore - TS2322 TypeScript 5.9.2 upgrade
22
+ React.createElement(React.Fragment, null, isIconRenderProp(Icon) ? Icon({
23
+ label: '',
24
+ color: 'currentColor'
25
+ }) : /*#__PURE__*/React.createElement(Icon, {
26
+ label: "",
27
+ color: 'currentColor'
28
+ }))
29
+ );
26
30
  };
27
31
  export default IconRenderer;
@@ -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: "23.3.1",
128
+ packageVersion: "23.4.0",
129
129
  analyticsData: analyticsContext
130
130
  });
131
131
 
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type SplitButtonAppearance, type SplitButtonSpacing } from './types';
3
2
  type NavigationSplitButtonContextProps = {
4
3
  appearance: 'navigation';
@@ -19,7 +19,7 @@ export declare const Divider: ({ appearance, spacing, isDisabled }: DividerProps
19
19
  export declare const SplitButtonContainer: ({ appearance, children, isDisabled, }: {
20
20
  appearance: SplitButtonAppearance;
21
21
  children: ReactNode;
22
- isDisabled?: boolean | undefined;
22
+ isDisabled?: boolean;
23
23
  }) => JSX.Element;
24
24
  /**
25
25
  * __Split Button__
@@ -12,7 +12,7 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
12
12
  * - [Usage](https://atlassian.design/components/button/usage)
13
13
  */
14
14
  declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className">, "data-testid"> & {
15
- 'data-testid'?: undefined;
15
+ 'data-testid'?: never;
16
16
  }, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
17
17
  onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
18
18
  onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AdditionalDefaultLinkVariantProps, CommonLinkVariantProps } from '../types';
3
2
  import type { CommonDefaultButtonProps } from './types';
4
3
  export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
@@ -24,6 +23,6 @@ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = ne
24
23
  declare const LinkButton: (<RouterLinkConfig extends Record<string, any> = never>(props: LinkButtonProps<RouterLinkConfig> & {
25
24
  ref?: React.Ref<HTMLAnchorElement>;
26
25
  }) => ReturnType<typeof LinkButtonBase>) & {
27
- displayName?: string | undefined;
26
+ displayName?: string;
28
27
  };
29
28
  export default LinkButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type ButtonSpacing, type IconProp } from '../types';
3
2
  export type CommonDefaultButtonProps = {
4
3
  /**
@@ -12,7 +12,7 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
12
12
  * - [Usage](https://atlassian.design/components/button/icon-button/usage)
13
13
  */
14
14
  declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className">, "data-testid"> & {
15
- 'data-testid'?: undefined;
15
+ 'data-testid'?: never;
16
16
  }, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
17
17
  onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
18
18
  onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
@@ -7,6 +7,9 @@ import type { CommonAnchorProps, CommonLinkVariantProps } from '../types';
7
7
  import { type CommonIconButtonProps } from './types';
8
8
  export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & CommonLinkVariantProps<RouterLinkConfig> & CommonAnchorProps<RouterLinkConfig>;
9
9
  declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
10
+ declare const WithRef: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
11
+ ref?: Ref<HTMLAnchorElement>;
12
+ }) => ReturnType<typeof LinkIconButtonBase>;
10
13
  /**
11
14
  * __Link Icon Button__
12
15
  *
@@ -16,7 +19,5 @@ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any>
16
19
  * - [Code](https://atlassian.design/components/button/link-icon-button/code)
17
20
  * - [Usage](https://atlassian.design/components/button/link-icon-button/usage)
18
21
  */
19
- declare const LinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
20
- ref?: Ref<HTMLAnchorElement>;
21
- }) => ReturnType<typeof LinkIconButtonBase>;
22
+ declare const LinkIconButton: typeof WithRef;
22
23
  export default LinkIconButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type TooltipProps } from '@atlaskit/tooltip';
3
2
  import { type IconButtonAppearance, type IconButtonSpacing, type IconProp } from '../types';
4
3
  export type CommonIconButtonProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type CSSObject } from '@emotion/react';
3
2
  import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
4
3
  export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function blockEvents({ isInteractive, }: {
3
2
  isInteractive: boolean;
4
3
  }): React.DOMAttributes<HTMLElement>;
@@ -5,8 +5,8 @@
5
5
  import React from 'react';
6
6
  import { type CSSObject } from '@emotion/react';
7
7
  declare const ButtonBase: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.AllHTMLAttributes<HTMLElement>, "disabled">, "data-testid" | "data-has-overlay"> & {
8
- 'data-testid'?: undefined;
9
- 'data-has-overlay'?: undefined;
8
+ 'data-testid'?: never;
9
+ 'data-has-overlay'?: never;
10
10
  }, keyof import("../types").BaseOwnProps> & import("../types").BaseOwnProps & {
11
11
  buttonCss: CSSObject;
12
12
  } & React.RefAttributes<HTMLElement>>;
@@ -42,16 +42,16 @@ type LinkButtonVariants = LinkButtonVariant | LinkIconButtonVariant;
42
42
  type IconButtonVariants = IconButtonVariant | LinkIconButtonVariant;
43
43
  export type Variant = DefaultButtonVariant | LinkButtonVariant | IconButtonVariant | LinkIconButtonVariant;
44
44
  declare const LinkButtonRender: React.ForwardRefExoticComponent<Omit<LinkButtonProps, "href"> & {
45
- href?: string | undefined;
45
+ href?: LinkButtonProps["href"];
46
46
  } & React.RefAttributes<HTMLAnchorElement>>;
47
47
  declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps, "label" | "icon"> & {
48
- icon?: import("../entry-points/new").IconProp | undefined;
49
- label?: IconButtonProps['label'];
48
+ icon?: IconButtonProps["icon"];
49
+ label?: IconButtonProps["label"];
50
50
  } & React.RefAttributes<HTMLButtonElement>>;
51
51
  declare const LinkIconButtonRender: React.ForwardRefExoticComponent<Omit<LinkIconButtonProps, "label" | "href" | "icon"> & {
52
- href?: string | undefined;
53
- icon?: import("../entry-points/new").IconProp | undefined;
54
- label?: LinkIconButtonProps['label'];
52
+ href?: LinkIconButtonProps["href"];
53
+ icon?: LinkIconButtonProps["icon"];
54
+ label?: LinkIconButtonProps["label"];
55
55
  } & React.RefAttributes<HTMLAnchorElement>>;
56
56
  declare const variants: Variant[];
57
57
  export declare const defaultButtonVariants: DefaultButtonVariants[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type SplitButtonAppearance, type SplitButtonSpacing } from './types';
3
2
  type NavigationSplitButtonContextProps = {
4
3
  appearance: 'navigation';
@@ -19,7 +19,7 @@ export declare const Divider: ({ appearance, spacing, isDisabled }: DividerProps
19
19
  export declare const SplitButtonContainer: ({ appearance, children, isDisabled, }: {
20
20
  appearance: SplitButtonAppearance;
21
21
  children: ReactNode;
22
- isDisabled?: boolean | undefined;
22
+ isDisabled?: boolean;
23
23
  }) => JSX.Element;
24
24
  /**
25
25
  * __Split Button__
@@ -12,7 +12,7 @@ export type ButtonProps = CommonDefaultButtonProps & CommonButtonVariantProps;
12
12
  * - [Usage](https://atlassian.design/components/button/usage)
13
13
  */
14
14
  declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonDefaultButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className">, "data-testid"> & {
15
- 'data-testid'?: undefined;
15
+ 'data-testid'?: never;
16
16
  }, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
17
17
  onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
18
18
  onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { AdditionalDefaultLinkVariantProps, CommonLinkVariantProps } from '../types';
3
2
  import type { CommonDefaultButtonProps } from './types';
4
3
  export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
@@ -24,6 +23,6 @@ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = ne
24
23
  declare const LinkButton: (<RouterLinkConfig extends Record<string, any> = never>(props: LinkButtonProps<RouterLinkConfig> & {
25
24
  ref?: React.Ref<HTMLAnchorElement>;
26
25
  }) => ReturnType<typeof LinkButtonBase>) & {
27
- displayName?: string | undefined;
26
+ displayName?: string;
28
27
  };
29
28
  export default LinkButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type ButtonSpacing, type IconProp } from '../types';
3
2
  export type CommonDefaultButtonProps = {
4
3
  /**
@@ -12,7 +12,7 @@ export type IconButtonProps = CommonIconButtonProps & CommonButtonVariantProps;
12
12
  * - [Usage](https://atlassian.design/components/button/icon-button/usage)
13
13
  */
14
14
  declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<CommonIconButtonProps & import("../types").AdditionalButtonVariantProps & Omit<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children">, "style" | "disabled" | "className">, "data-testid"> & {
15
- 'data-testid'?: undefined;
15
+ 'data-testid'?: never;
16
16
  }, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
17
17
  onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
18
18
  onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
@@ -7,6 +7,9 @@ import type { CommonAnchorProps, CommonLinkVariantProps } from '../types';
7
7
  import { type CommonIconButtonProps } from './types';
8
8
  export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & CommonLinkVariantProps<RouterLinkConfig> & CommonAnchorProps<RouterLinkConfig>;
9
9
  declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ "aria-label": preventedAriaLabel, "aria-labelledby": ariaLabelledBy, analyticsContext, appearance, autoFocus, href, icon, interactionName, isDisabled, isSelected, isTooltipDisabled, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shape, spacing, testId, tooltip, ...unsafeRest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
10
+ declare const WithRef: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
11
+ ref?: Ref<HTMLAnchorElement>;
12
+ }) => ReturnType<typeof LinkIconButtonBase>;
10
13
  /**
11
14
  * __Link Icon Button__
12
15
  *
@@ -16,7 +19,5 @@ declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any>
16
19
  * - [Code](https://atlassian.design/components/button/link-icon-button/code)
17
20
  * - [Usage](https://atlassian.design/components/button/link-icon-button/usage)
18
21
  */
19
- declare const LinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: LinkIconButtonProps<RouterLinkConfig> & {
20
- ref?: Ref<HTMLAnchorElement>;
21
- }) => ReturnType<typeof LinkIconButtonBase>;
22
+ declare const LinkIconButton: typeof WithRef;
22
23
  export default LinkIconButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type TooltipProps } from '@atlaskit/tooltip';
3
2
  import { type IconButtonAppearance, type IconButtonSpacing, type IconProp } from '../types';
4
3
  export type CommonIconButtonProps = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type CSSObject } from '@emotion/react';
3
2
  import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
4
3
  export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export default function blockEvents({ isInteractive, }: {
3
2
  isInteractive: boolean;
4
3
  }): React.DOMAttributes<HTMLElement>;
@@ -5,8 +5,8 @@
5
5
  import React from 'react';
6
6
  import { type CSSObject } from '@emotion/react';
7
7
  declare const ButtonBase: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.AllHTMLAttributes<HTMLElement>, "disabled">, "data-testid" | "data-has-overlay"> & {
8
- 'data-testid'?: undefined;
9
- 'data-has-overlay'?: undefined;
8
+ 'data-testid'?: never;
9
+ 'data-has-overlay'?: never;
10
10
  }, keyof import("../types").BaseOwnProps> & import("../types").BaseOwnProps & {
11
11
  buttonCss: CSSObject;
12
12
  } & React.RefAttributes<HTMLElement>>;
@@ -42,16 +42,16 @@ type LinkButtonVariants = LinkButtonVariant | LinkIconButtonVariant;
42
42
  type IconButtonVariants = IconButtonVariant | LinkIconButtonVariant;
43
43
  export type Variant = DefaultButtonVariant | LinkButtonVariant | IconButtonVariant | LinkIconButtonVariant;
44
44
  declare const LinkButtonRender: React.ForwardRefExoticComponent<Omit<LinkButtonProps, "href"> & {
45
- href?: string | undefined;
45
+ href?: LinkButtonProps["href"];
46
46
  } & React.RefAttributes<HTMLAnchorElement>>;
47
47
  declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps, "label" | "icon"> & {
48
- icon?: import("../entry-points/new").IconProp | undefined;
49
- label?: IconButtonProps['label'];
48
+ icon?: IconButtonProps["icon"];
49
+ label?: IconButtonProps["label"];
50
50
  } & React.RefAttributes<HTMLButtonElement>>;
51
51
  declare const LinkIconButtonRender: React.ForwardRefExoticComponent<Omit<LinkIconButtonProps, "label" | "href" | "icon"> & {
52
- href?: string | undefined;
53
- icon?: import("../entry-points/new").IconProp | undefined;
54
- label?: LinkIconButtonProps['label'];
52
+ href?: LinkIconButtonProps["href"];
53
+ icon?: LinkIconButtonProps["icon"];
54
+ label?: LinkIconButtonProps["label"];
55
55
  } & React.RefAttributes<HTMLAnchorElement>>;
56
56
  declare const variants: Variant[];
57
57
  export declare const defaultButtonVariants: DefaultButtonVariants[];
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/loading-button.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/loading-button.d.ts"
14
14
  ]
package/new/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/new.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/new.d.ts"
14
14
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "23.3.2",
3
+ "version": "23.4.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/"
@@ -87,7 +87,7 @@
87
87
  "@atlaskit/css": "^0.12.0",
88
88
  "@atlaskit/ds-lib": "^5.0.0",
89
89
  "@atlaskit/focus-ring": "^3.0.0",
90
- "@atlaskit/icon": "^27.9.0",
90
+ "@atlaskit/icon": "^28.0.0",
91
91
  "@atlaskit/interaction-context": "^3.0.0",
92
92
  "@atlaskit/platform-feature-flags": "^1.1.0",
93
93
  "@atlaskit/primitives": "^14.11.0",
@@ -107,14 +107,14 @@
107
107
  "@af/accessibility-testing": "workspace:^",
108
108
  "@af/integration-testing": "workspace:^",
109
109
  "@af/visual-regression": "workspace:^",
110
- "@atlaskit/app-provider": "^3.0.0",
110
+ "@atlaskit/app-provider": "^3.1.0",
111
111
  "@atlaskit/checkbox": "^17.1.0",
112
112
  "@atlaskit/docs": "^11.0.0",
113
113
  "@atlaskit/dropdown-menu": "^16.3.0",
114
- "@atlaskit/form": "^12.0.0",
114
+ "@atlaskit/form": "^12.1.0",
115
115
  "@atlaskit/heading": "^5.2.0",
116
116
  "@atlaskit/link": "^3.2.0",
117
- "@atlaskit/logo": "^19.6.0",
117
+ "@atlaskit/logo": "^19.7.0",
118
118
  "@atlaskit/modal-dialog": "^14.3.0",
119
119
  "@atlaskit/section-message": "^8.5.0",
120
120
  "@atlaskit/select": "^21.2.0",
@@ -127,8 +127,7 @@
127
127
  "ast-types": "^0.13.3",
128
128
  "jscodeshift": "^17.0.0",
129
129
  "lodash": "^4.17.21",
130
- "react-dom": "^18.2.0",
131
- "typescript": "~5.4.2"
130
+ "react-dom": "^18.2.0"
132
131
  },
133
132
  "homepage": "https://atlassian.design/components/button/",
134
133
  "platform-feature-flags": {
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/standard-button.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/standard-button.d.ts"
14
14
  ]
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/entry-points/types.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/entry-points/types.d.ts"
14
14
  ]