@atlaskit/button 17.20.0 → 17.22.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 +16 -0
- package/dist/cjs/new-button/containers/split-button/split-button.js +23 -6
- package/dist/cjs/new-button/variants/default/use-default-button.js +13 -14
- package/dist/cjs/new-button/variants/icon/use-icon-button.js +5 -5
- package/dist/cjs/new-button/variants/shared/icon-renderer.js +38 -0
- package/dist/cjs/new-button/variants/shared/use-button-base.js +79 -18
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/containers/split-button/split-button.js +22 -5
- package/dist/es2019/new-button/variants/default/use-default-button.js +13 -14
- package/dist/es2019/new-button/variants/icon/use-icon-button.js +5 -5
- package/dist/es2019/new-button/variants/shared/icon-renderer.js +32 -0
- package/dist/es2019/new-button/variants/shared/use-button-base.js +79 -18
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/containers/split-button/split-button.js +23 -6
- package/dist/esm/new-button/variants/default/use-default-button.js +13 -14
- package/dist/esm/new-button/variants/icon/use-icon-button.js +5 -5
- package/dist/esm/new-button/variants/shared/icon-renderer.js +31 -0
- package/dist/esm/new-button/variants/shared/use-button-base.js +79 -18
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/containers/split-button/split-button.d.ts +2 -1
- package/dist/types/new-button/variants/default/use-default-button.d.ts +1 -1
- package/dist/types/new-button/variants/icon/use-icon-button.d.ts +1 -1
- package/dist/types/new-button/variants/shared/icon-renderer.d.ts +14 -0
- package/dist/types/new-button/variants/shared/use-button-base.d.ts +1 -1
- package/dist/types-ts4.5/new-button/containers/split-button/split-button.d.ts +2 -1
- package/dist/types-ts4.5/new-button/variants/default/use-default-button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/icon/use-icon-button.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/shared/icon-renderer.d.ts +14 -0
- package/dist/types-ts4.5/new-button/variants/shared/use-button-base.d.ts +1 -1
- package/package.json +9 -1
|
@@ -12,5 +12,5 @@ type UseButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>
|
|
|
12
12
|
*
|
|
13
13
|
* @private
|
|
14
14
|
*/
|
|
15
|
-
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter
|
|
15
|
+
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, children, iconAfter, iconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
|
|
16
16
|
export default useDefaultButton;
|
|
@@ -12,5 +12,5 @@ type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagN
|
|
|
12
12
|
*
|
|
13
13
|
* @private
|
|
14
14
|
*/
|
|
15
|
-
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon
|
|
15
|
+
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, ariaLabel, ariaLabelledBy, autoFocus, buttonType, icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shape, shouldFitContainer, spacing, testId, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
16
16
|
export default useIconButton;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type IconProps, type UNSAFE_NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
import { type IconProp } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* __Icon renderer__
|
|
6
|
+
*
|
|
7
|
+
* Used to support render props with icons.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
declare const IconRenderer: ({ icon: Icon, size, }: {
|
|
11
|
+
icon: IconProp;
|
|
12
|
+
size: IconProps['size'] | UNSAFE_NewIconProps['LEGACY_size'];
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export default IconRenderer;
|
|
@@ -42,5 +42,5 @@ export type UseButtonBaseReturn<TagName extends HTMLElement> = {
|
|
|
42
42
|
*
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
|
-
declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, isDisabled: propIsDisabled, isLoading, isSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
45
|
+
declare const useButtonBase: <TagName extends HTMLElement>({ appearance: propAppearance, autoFocus, isDisabled: propIsDisabled, isLoading, isSelected: propIsSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, ariaLabel, ariaLabelledBy, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
46
46
|
export default useButtonBase;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.22.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/"
|
|
@@ -155,9 +155,11 @@
|
|
|
155
155
|
"@atlaskit/app-provider": "^1.3.0",
|
|
156
156
|
"@atlaskit/calendar": "^14.3.0",
|
|
157
157
|
"@atlaskit/checkbox": "^13.5.0",
|
|
158
|
+
"@atlaskit/dropdown-menu": "^12.12.0",
|
|
158
159
|
"@atlaskit/ssr": "*",
|
|
159
160
|
"@atlaskit/toggle": "^13.2.0",
|
|
160
161
|
"@atlaskit/visual-regression": "*",
|
|
162
|
+
"@atlassian/feature-flags-test-utils": "^0.2.1",
|
|
161
163
|
"@testing-library/react": "^12.1.5",
|
|
162
164
|
"@testing-library/user-event": "^14.4.3",
|
|
163
165
|
"@types/react-router-dom": "^4.3.1",
|
|
@@ -198,6 +200,12 @@
|
|
|
198
200
|
"platform-feature-flags": {
|
|
199
201
|
"platform.design-system-team.button-tokenised-typography-styles": {
|
|
200
202
|
"type": "boolean"
|
|
203
|
+
},
|
|
204
|
+
"platform.design-system-team.component-visual-refresh_t8zbo": {
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"platform.design-system-team.button-render-prop-fix_lyo55": {
|
|
208
|
+
"type": "boolean"
|
|
201
209
|
}
|
|
202
210
|
}
|
|
203
211
|
}
|