@atlaskit/button 23.3.1 → 23.4.0
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 +13 -0
- package/button-group/package.json +1 -1
- package/custom-theme-button/package.json +1 -1
- package/dist/cjs/new-button/variants/shared/button-base.compiled.css +2 -0
- package/dist/cjs/new-button/variants/shared/button-base.js +1 -1
- package/dist/cjs/new-button/variants/shared/icon-renderer.js +11 -7
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/shared/button-base.compiled.css +2 -0
- package/dist/es2019/new-button/variants/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/shared/icon-renderer.js +11 -7
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/shared/button-base.compiled.css +2 -0
- package/dist/esm/new-button/variants/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/shared/icon-renderer.js +11 -7
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/containers/split-button/split-button-context.d.ts +0 -1
- package/dist/types/new-button/containers/split-button/split-button.d.ts +1 -1
- package/dist/types/new-button/variants/default/button.d.ts +1 -1
- package/dist/types/new-button/variants/default/link.d.ts +1 -2
- package/dist/types/new-button/variants/default/types.d.ts +0 -1
- package/dist/types/new-button/variants/icon/button.d.ts +1 -1
- package/dist/types/new-button/variants/icon/link.d.ts +4 -3
- package/dist/types/new-button/variants/icon/types.d.ts +0 -1
- package/dist/types/old-button/custom-theme-button/theme.d.ts +0 -1
- package/dist/types/old-button/shared/block-events.d.ts +0 -1
- package/dist/types/old-button/shared/button-base.d.ts +2 -2
- package/dist/types/utils/variants.d.ts +6 -6
- package/dist/types-ts4.5/new-button/containers/split-button/split-button-context.d.ts +0 -1
- package/dist/types-ts4.5/new-button/containers/split-button/split-button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/default/button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/default/link.d.ts +1 -2
- package/dist/types-ts4.5/new-button/variants/default/types.d.ts +0 -1
- package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +4 -3
- package/dist/types-ts4.5/new-button/variants/icon/types.d.ts +0 -1
- package/dist/types-ts4.5/old-button/custom-theme-button/theme.d.ts +0 -1
- package/dist/types-ts4.5/old-button/shared/block-events.d.ts +0 -1
- package/dist/types-ts4.5/old-button/shared/button-base.d.ts +2 -2
- package/dist/types-ts4.5/utils/variants.d.ts +6 -6
- package/loading-button/package.json +1 -1
- package/new/package.json +1 -1
- package/package.json +8 -9
- package/standard-button/package.json +1 -1
- package/types/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 23.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6c62bb96f6bdf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6c62bb96f6bdf) -
|
|
8
|
+
Updates to loading animation overlay not to overflow in scrollable containers.
|
|
9
|
+
|
|
10
|
+
## 23.3.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 23.3.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -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
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
135
|
+
packageVersion: "23.3.2",
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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.
|
|
122
|
+
packageVersion: "23.3.2",
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
128
|
+
packageVersion: "23.3.2",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -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
|
|
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'?:
|
|
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
|
|
26
|
+
displayName?: string;
|
|
28
27
|
};
|
|
29
28
|
export default LinkButton;
|
|
@@ -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'?:
|
|
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:
|
|
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 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;
|
|
@@ -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'?:
|
|
9
|
-
'data-has-overlay'?:
|
|
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?:
|
|
45
|
+
href?: LinkButtonProps["href"];
|
|
46
46
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
47
|
declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps, "label" | "icon"> & {
|
|
48
|
-
icon?:
|
|
49
|
-
label?: IconButtonProps[
|
|
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?:
|
|
53
|
-
icon?:
|
|
54
|
-
label?: LinkIconButtonProps[
|
|
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[];
|
|
@@ -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
|
|
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'?:
|
|
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
|
|
26
|
+
displayName?: string;
|
|
28
27
|
};
|
|
29
28
|
export default LinkButton;
|
|
@@ -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'?:
|
|
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:
|
|
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 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;
|
|
@@ -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'?:
|
|
9
|
-
'data-has-overlay'?:
|
|
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?:
|
|
45
|
+
href?: LinkButtonProps["href"];
|
|
46
46
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
47
47
|
declare const IconButtonRender: React.ForwardRefExoticComponent<Omit<IconButtonProps, "label" | "icon"> & {
|
|
48
|
-
icon?:
|
|
49
|
-
label?: IconButtonProps[
|
|
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?:
|
|
53
|
-
icon?:
|
|
54
|
-
label?: LinkIconButtonProps[
|
|
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[];
|
package/new/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.4.0",
|
|
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/css": "^0.12.0",
|
|
88
88
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
89
89
|
"@atlaskit/focus-ring": "^3.0.0",
|
|
90
|
-
"@atlaskit/icon": "^27.
|
|
90
|
+
"@atlaskit/icon": "^27.12.0",
|
|
91
91
|
"@atlaskit/interaction-context": "^3.0.0",
|
|
92
92
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
93
|
-
"@atlaskit/primitives": "^14.
|
|
93
|
+
"@atlaskit/primitives": "^14.11.0",
|
|
94
94
|
"@atlaskit/spinner": "^19.0.0",
|
|
95
95
|
"@atlaskit/theme": "^19.0.0",
|
|
96
|
-
"@atlaskit/tokens": "^
|
|
96
|
+
"@atlaskit/tokens": "^6.0.0",
|
|
97
97
|
"@atlaskit/tooltip": "^20.4.0",
|
|
98
98
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
99
99
|
"@babel/runtime": "^7.0.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": "^
|
|
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.
|
|
114
|
+
"@atlaskit/form": "^12.1.0",
|
|
115
115
|
"@atlaskit/heading": "^5.2.0",
|
|
116
116
|
"@atlaskit/link": "^3.2.0",
|
|
117
|
-
"@atlaskit/logo": "^19.
|
|
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": {
|