@atlaskit/button 23.4.10 → 23.5.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 +15 -0
- package/dist/cjs/new-button/variants/icon/button.js +2 -1
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/icon/button.js +2 -1
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/icon/button.js +2 -1
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/variants/default/button.d.ts +1 -7
- package/dist/types/new-button/variants/icon/button.d.ts +1 -7
- package/dist/types/old-button/custom-theme-button/theme.d.ts +2 -10
- package/dist/types-ts4.5/new-button/variants/default/button.d.ts +1 -7
- package/dist/types-ts4.5/new-button/variants/icon/button.d.ts +1 -7
- package/dist/types-ts4.5/old-button/custom-theme-button/theme.d.ts +2 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 23.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3ea3fab89f015`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3ea3fab89f015) -
|
|
8
|
+
`IconButton` now passes through the `tooltip.shortcut` prop to the Tooltip component.
|
|
9
|
+
|
|
10
|
+
## 23.4.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
|
|
15
|
+
Add explicit types to a number of DST components
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 23.4.10
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -114,7 +114,8 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
114
114
|
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
115
115
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
116
116
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown,
|
|
117
|
-
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents
|
|
117
|
+
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents,
|
|
118
|
+
shortcut: tooltip === null || tooltip === void 0 ? void 0 : tooltip.shortcut
|
|
118
119
|
}, function (triggerProps) {
|
|
119
120
|
return /*#__PURE__*/_react.default.createElement(_buttonBase.default, (0, _extends2.default)({}, saferRest, {
|
|
120
121
|
appearance: appearance,
|
|
@@ -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: "
|
|
135
|
+
packageVersion: "0.0.0-development",
|
|
136
136
|
analyticsData: analyticsContext
|
|
137
137
|
});
|
|
138
138
|
|
|
@@ -105,7 +105,8 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
105
105
|
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
106
106
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
107
107
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown,
|
|
108
|
-
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents
|
|
108
|
+
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents,
|
|
109
|
+
shortcut: tooltip === null || tooltip === void 0 ? void 0 : tooltip.shortcut
|
|
109
110
|
}, triggerProps => /*#__PURE__*/React.createElement(ButtonBase, _extends({}, saferRest, {
|
|
110
111
|
appearance: appearance,
|
|
111
112
|
autoFocus: autoFocus,
|
|
@@ -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: "
|
|
122
|
+
packageVersion: "0.0.0-development",
|
|
123
123
|
analyticsData: analyticsContext
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -107,7 +107,8 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
107
107
|
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
108
108
|
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
109
109
|
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown,
|
|
110
|
-
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents
|
|
110
|
+
ignoreTooltipPointerEvents: tooltip === null || tooltip === void 0 ? void 0 : tooltip.ignoreTooltipPointerEvents,
|
|
111
|
+
shortcut: tooltip === null || tooltip === void 0 ? void 0 : tooltip.shortcut
|
|
111
112
|
}, function (triggerProps) {
|
|
112
113
|
return /*#__PURE__*/React.createElement(ButtonBase, _extends({}, saferRest, {
|
|
113
114
|
appearance: appearance,
|
|
@@ -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: "
|
|
128
|
+
packageVersion: "0.0.0-development",
|
|
129
129
|
analyticsData: analyticsContext
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -11,11 +11,5 @@ 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<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default Button;
|
|
@@ -11,11 +11,5 @@ 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<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<IconButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default IconButton;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { createTheme } from '@atlaskit/theme/components';
|
|
2
3
|
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
3
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
4
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
5
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
6
|
-
declare const Theme:
|
|
7
|
-
Consumer: import("react").ComponentType<{
|
|
8
|
-
children: (tokens: ThemeTokens) => import("react").ReactNode;
|
|
9
|
-
} & Omit<ThemeProps, "children">>;
|
|
10
|
-
Provider: import("react").ComponentType<{
|
|
11
|
-
children?: import("react").ReactNode;
|
|
12
|
-
value?: import("@atlaskit/theme/components").ThemeProp<ThemeTokens, ThemeProps> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
15
|
-
};
|
|
7
|
+
declare const Theme: ReturnType<typeof createTheme<ThemeTokens, ThemeProps>>;
|
|
16
8
|
export default Theme;
|
|
@@ -11,11 +11,5 @@ 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<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const Button: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default Button;
|
|
@@ -11,11 +11,5 @@ 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<
|
|
15
|
-
'data-testid'?: never;
|
|
16
|
-
}, "onFocus" | "onBlur" | "onClick" | keyof import("../types").CommonBaseProps> & import("../types").CommonBaseProps & {
|
|
17
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
18
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement> | undefined;
|
|
19
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement, MouseEvent>, analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => void) | undefined;
|
|
20
|
-
} & React.RefAttributes<HTMLButtonElement>>>;
|
|
14
|
+
declare const IconButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<IconButtonProps> & React.RefAttributes<HTMLButtonElement>>>;
|
|
21
15
|
export default IconButton;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { type CSSObject } from '@emotion/react';
|
|
2
|
+
import { createTheme } from '@atlaskit/theme/components';
|
|
2
3
|
import { type ThemeProps, type ThemeTokens } from './custom-theme-button-types';
|
|
3
4
|
export declare function getCustomCss({ appearance, spacing, mode, isSelected, shouldFitContainer, iconIsOnlyChild, isLoading, state, }: ThemeProps): CSSObject;
|
|
4
5
|
export declare function getSpecifiers(styles: CSSObject): CSSObject;
|
|
5
6
|
export declare function defaultThemeFn(current: (values: ThemeProps) => ThemeTokens, values: ThemeProps): ThemeTokens;
|
|
6
|
-
declare const Theme:
|
|
7
|
-
Consumer: import("react").ComponentType<{
|
|
8
|
-
children: (tokens: ThemeTokens) => import("react").ReactNode;
|
|
9
|
-
} & Omit<ThemeProps, "children">>;
|
|
10
|
-
Provider: import("react").ComponentType<{
|
|
11
|
-
children?: import("react").ReactNode;
|
|
12
|
-
value?: import("@atlaskit/theme/components").ThemeProp<ThemeTokens, ThemeProps> | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
useTheme: (props: ThemeProps) => ThemeTokens;
|
|
15
|
-
};
|
|
7
|
+
declare const Theme: ReturnType<typeof createTheme<ThemeTokens, ThemeProps>>;
|
|
16
8
|
export default Theme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.5.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/"
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@atlaskit/form": "^14.2.0",
|
|
106
106
|
"@atlaskit/heading": "^5.2.0",
|
|
107
107
|
"@atlaskit/link": "^3.2.0",
|
|
108
|
-
"@atlaskit/logo": "^19.
|
|
108
|
+
"@atlaskit/logo": "^19.8.0",
|
|
109
109
|
"@atlaskit/modal-dialog": "^14.4.0",
|
|
110
110
|
"@atlaskit/section-message": "^8.7.0",
|
|
111
111
|
"@atlaskit/select": "^21.3.0",
|