@atlaskit/button 17.17.1 → 17.17.2
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 +1215 -1221
- package/dist/cjs/new-button/variants/default/button.js +28 -28
- package/dist/cjs/new-button/variants/default/link.js +26 -26
- package/dist/cjs/new-button/variants/default/use-default-button.js +11 -11
- package/dist/cjs/new-button/variants/icon/button.js +6 -6
- package/dist/cjs/new-button/variants/icon/link.js +5 -5
- package/dist/cjs/new-button/variants/icon/use-icon-button.js +6 -6
- package/dist/cjs/old-button/shared/button-base.js +4 -2
- package/dist/es2019/new-button/variants/default/button.js +27 -27
- package/dist/es2019/new-button/variants/default/link.js +25 -25
- package/dist/es2019/new-button/variants/default/use-default-button.js +11 -11
- package/dist/es2019/new-button/variants/icon/button.js +6 -6
- package/dist/es2019/new-button/variants/icon/link.js +5 -5
- package/dist/es2019/new-button/variants/icon/use-icon-button.js +6 -6
- package/dist/es2019/old-button/shared/button-base.js +4 -2
- package/dist/esm/new-button/variants/default/button.js +28 -28
- package/dist/esm/new-button/variants/default/link.js +26 -26
- package/dist/esm/new-button/variants/default/use-default-button.js +11 -11
- package/dist/esm/new-button/variants/icon/button.js +6 -6
- package/dist/esm/new-button/variants/icon/link.js +5 -5
- package/dist/esm/new-button/variants/icon/use-icon-button.js +6 -6
- package/dist/esm/old-button/shared/button-base.js +4 -2
- package/dist/types/new-button/containers/split-button/index.d.ts +2 -2
- package/dist/types/new-button/containers/split-button/split-button.d.ts +1 -1
- package/dist/types/new-button/variants/default/link.d.ts +1 -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/content.d.ts +1 -1
- package/dist/types-ts4.5/new-button/containers/split-button/index.d.ts +2 -2
- 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/link.d.ts +1 -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/content.d.ts +1 -1
- package/package.json +4 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["analyticsContext", "
|
|
3
|
+
var _excluded = ["analyticsContext", "appearance", "autoFocus", "children", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isLoading", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shouldFitContainer", "spacing", "testId", "type", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import Pressable from '@atlaskit/primitives/pressable';
|
|
6
6
|
import useDefaultButton from './use-default-button';
|
|
@@ -15,33 +15,33 @@ import useDefaultButton from './use-default-button';
|
|
|
15
15
|
*/
|
|
16
16
|
var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
17
17
|
var analyticsContext = _ref.analyticsContext,
|
|
18
|
-
interactionName = _ref.interactionName,
|
|
19
|
-
autoFocus = _ref.autoFocus,
|
|
20
18
|
appearance = _ref.appearance,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
autoFocus = _ref.autoFocus,
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
iconAfter = _ref.iconAfter,
|
|
24
22
|
iconBefore = _ref.iconBefore,
|
|
23
|
+
interactionName = _ref.interactionName,
|
|
24
|
+
isDisabled = _ref.isDisabled,
|
|
25
25
|
isLoading = _ref.isLoading,
|
|
26
|
-
|
|
27
|
-
iconAfter = _ref.iconAfter,
|
|
28
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
29
|
-
children = _ref.children,
|
|
30
|
-
shouldFitContainer = _ref.shouldFitContainer,
|
|
31
|
-
overlay = _ref.overlay,
|
|
26
|
+
isSelected = _ref.isSelected,
|
|
32
27
|
onClick = _ref.onClick,
|
|
33
|
-
|
|
34
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
28
|
+
onClickCapture = _ref.onClickCapture,
|
|
35
29
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
36
30
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
32
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
39
33
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
40
34
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
41
|
-
|
|
35
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
36
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
37
|
+
overlay = _ref.overlay,
|
|
38
|
+
shouldFitContainer = _ref.shouldFitContainer,
|
|
39
|
+
spacing = _ref.spacing,
|
|
40
|
+
testId = _ref.testId,
|
|
42
41
|
_ref$type = _ref.type,
|
|
43
42
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
44
|
-
|
|
43
|
+
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
44
|
+
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
46
46
|
var baseProps = useDefaultButton({
|
|
47
47
|
analyticsContext: analyticsContext,
|
|
@@ -49,28 +49,28 @@ var Button = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function But
|
|
|
49
49
|
autoFocus: autoFocus,
|
|
50
50
|
buttonType: 'button',
|
|
51
51
|
children: children,
|
|
52
|
-
iconBefore: iconBefore,
|
|
53
|
-
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size,
|
|
54
52
|
iconAfter: iconAfter,
|
|
55
|
-
|
|
53
|
+
iconBefore: iconBefore,
|
|
56
54
|
interactionName: interactionName,
|
|
57
55
|
isDisabled: isDisabled,
|
|
58
|
-
isSelected: isSelected,
|
|
59
56
|
isLoading: isLoading,
|
|
57
|
+
isSelected: isSelected,
|
|
60
58
|
onClick: onClick,
|
|
61
|
-
|
|
62
|
-
onMouseUpCapture: onMouseUpCapture,
|
|
59
|
+
onClickCapture: onClickCapture,
|
|
63
60
|
onKeyDownCapture: onKeyDownCapture,
|
|
64
61
|
onKeyUpCapture: onKeyUpCapture,
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
onMouseDownCapture: onMouseDownCapture,
|
|
63
|
+
onMouseUpCapture: onMouseUpCapture,
|
|
67
64
|
onPointerDownCapture: onPointerDownCapture,
|
|
68
65
|
onPointerUpCapture: onPointerUpCapture,
|
|
69
|
-
|
|
66
|
+
onTouchEndCapture: onTouchEndCapture,
|
|
67
|
+
onTouchStartCapture: onTouchStartCapture,
|
|
70
68
|
overlay: overlay,
|
|
71
69
|
ref: ref,
|
|
72
70
|
shouldFitContainer: shouldFitContainer,
|
|
73
|
-
spacing: spacing
|
|
71
|
+
spacing: spacing,
|
|
72
|
+
UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
|
|
73
|
+
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
|
|
74
74
|
});
|
|
75
75
|
return /*#__PURE__*/React.createElement(Pressable
|
|
76
76
|
// TODO: Remove spread props
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["analyticsContext", "
|
|
3
|
+
var _excluded = ["analyticsContext", "appearance", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shouldFitContainer", "spacing", "testId", "UNSAFE_iconAfter_size", "UNSAFE_iconBefore_size"];
|
|
4
4
|
import React, { forwardRef, memo } from 'react';
|
|
5
5
|
import UNSAFE_ANCHOR from '@atlaskit/primitives/anchor';
|
|
6
6
|
import useDefaultButton from './use-default-button';
|
|
7
7
|
var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
8
8
|
var analyticsContext = _ref.analyticsContext,
|
|
9
|
-
interactionName = _ref.interactionName,
|
|
10
|
-
autoFocus = _ref.autoFocus,
|
|
11
9
|
appearance = _ref.appearance,
|
|
12
|
-
|
|
10
|
+
autoFocus = _ref.autoFocus,
|
|
11
|
+
children = _ref.children,
|
|
12
|
+
href = _ref.href,
|
|
13
|
+
iconAfter = _ref.iconAfter,
|
|
14
|
+
iconBefore = _ref.iconBefore,
|
|
15
|
+
interactionName = _ref.interactionName,
|
|
13
16
|
isDisabled = _ref.isDisabled,
|
|
14
17
|
isSelected = _ref.isSelected,
|
|
15
|
-
iconBefore = _ref.iconBefore,
|
|
16
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
17
|
-
iconAfter = _ref.iconAfter,
|
|
18
|
-
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
19
|
-
children = _ref.children,
|
|
20
|
-
shouldFitContainer = _ref.shouldFitContainer,
|
|
21
|
-
overlay = _ref.overlay,
|
|
22
18
|
onClick = _ref.onClick,
|
|
23
|
-
|
|
24
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
19
|
+
onClickCapture = _ref.onClickCapture,
|
|
25
20
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
26
21
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
23
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
29
24
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
30
25
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
31
|
-
|
|
26
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
27
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
28
|
+
overlay = _ref.overlay,
|
|
29
|
+
shouldFitContainer = _ref.shouldFitContainer,
|
|
30
|
+
spacing = _ref.spacing,
|
|
32
31
|
testId = _ref.testId,
|
|
33
|
-
|
|
32
|
+
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
33
|
+
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
34
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
35
|
var baseProps = useDefaultButton({
|
|
36
36
|
analyticsContext: analyticsContext,
|
|
@@ -38,27 +38,27 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
|
|
|
38
38
|
autoFocus: autoFocus,
|
|
39
39
|
buttonType: 'link',
|
|
40
40
|
children: children,
|
|
41
|
-
iconBefore: iconBefore,
|
|
42
|
-
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size,
|
|
43
41
|
iconAfter: iconAfter,
|
|
44
|
-
|
|
42
|
+
iconBefore: iconBefore,
|
|
45
43
|
interactionName: interactionName,
|
|
46
44
|
isDisabled: isDisabled,
|
|
47
45
|
isSelected: isSelected,
|
|
48
46
|
onClick: onClick,
|
|
49
|
-
|
|
50
|
-
onMouseUpCapture: onMouseUpCapture,
|
|
47
|
+
onClickCapture: onClickCapture,
|
|
51
48
|
onKeyDownCapture: onKeyDownCapture,
|
|
52
49
|
onKeyUpCapture: onKeyUpCapture,
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
onMouseDownCapture: onMouseDownCapture,
|
|
51
|
+
onMouseUpCapture: onMouseUpCapture,
|
|
55
52
|
onPointerDownCapture: onPointerDownCapture,
|
|
56
53
|
onPointerUpCapture: onPointerUpCapture,
|
|
57
|
-
|
|
54
|
+
onTouchEndCapture: onTouchEndCapture,
|
|
55
|
+
onTouchStartCapture: onTouchStartCapture,
|
|
58
56
|
overlay: overlay,
|
|
59
57
|
ref: ref,
|
|
60
58
|
shouldFitContainer: shouldFitContainer,
|
|
61
|
-
spacing: spacing
|
|
59
|
+
spacing: spacing,
|
|
60
|
+
UNSAFE_iconAfter_size: UNSAFE_iconAfter_size,
|
|
61
|
+
UNSAFE_iconBefore_size: UNSAFE_iconBefore_size
|
|
62
62
|
});
|
|
63
63
|
return /*#__PURE__*/React.createElement(UNSAFE_ANCHOR
|
|
64
64
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -16,30 +16,30 @@ var useDefaultButton = function useDefaultButton(_ref) {
|
|
|
16
16
|
appearance = _ref.appearance,
|
|
17
17
|
autoFocus = _ref.autoFocus,
|
|
18
18
|
buttonType = _ref.buttonType,
|
|
19
|
-
|
|
20
|
-
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size,
|
|
19
|
+
children = _ref.children,
|
|
21
20
|
IconAfter = _ref.iconAfter,
|
|
22
|
-
|
|
21
|
+
IconBefore = _ref.iconBefore,
|
|
23
22
|
interactionName = _ref.interactionName,
|
|
24
23
|
isDisabled = _ref.isDisabled,
|
|
25
|
-
isSelected = _ref.isSelected,
|
|
26
24
|
_ref$isLoading = _ref.isLoading,
|
|
27
25
|
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
28
|
-
|
|
26
|
+
isSelected = _ref.isSelected,
|
|
29
27
|
onClick = _ref.onClick,
|
|
30
|
-
|
|
31
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
28
|
+
onClickCapture = _ref.onClickCapture,
|
|
32
29
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
33
30
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
32
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
36
33
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
37
34
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
38
|
-
|
|
35
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
36
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
39
37
|
overlay = _ref.overlay,
|
|
40
38
|
ref = _ref.ref,
|
|
41
39
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
42
|
-
spacing = _ref.spacing
|
|
40
|
+
spacing = _ref.spacing,
|
|
41
|
+
UNSAFE_iconAfter_size = _ref.UNSAFE_iconAfter_size,
|
|
42
|
+
UNSAFE_iconBefore_size = _ref.UNSAFE_iconBefore_size;
|
|
43
43
|
var hasOverlay = Boolean(overlay || isLoading);
|
|
44
44
|
var baseProps = useButtonBase({
|
|
45
45
|
analyticsContext: analyticsContext,
|
|
@@ -58,19 +58,19 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
58
58
|
icon: icon,
|
|
59
59
|
interactionName: interactionName,
|
|
60
60
|
isDisabled: isDisabled,
|
|
61
|
-
isSelected: isSelected,
|
|
62
61
|
isLoading: isLoading,
|
|
62
|
+
isSelected: isSelected,
|
|
63
63
|
label: label,
|
|
64
64
|
onClick: onClick,
|
|
65
|
-
|
|
66
|
-
onMouseUpCapture: onMouseUpCapture,
|
|
65
|
+
onClickCapture: onClickCapture,
|
|
67
66
|
onKeyDownCapture: onKeyDownCapture,
|
|
68
67
|
onKeyUpCapture: onKeyUpCapture,
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
onMouseDownCapture: onMouseDownCapture,
|
|
69
|
+
onMouseUpCapture: onMouseUpCapture,
|
|
71
70
|
onPointerDownCapture: onPointerDownCapture,
|
|
72
71
|
onPointerUpCapture: onPointerUpCapture,
|
|
73
|
-
|
|
72
|
+
onTouchEndCapture: onTouchEndCapture,
|
|
73
|
+
onTouchStartCapture: onTouchStartCapture,
|
|
74
74
|
overlay: overlay,
|
|
75
75
|
ref: ref,
|
|
76
76
|
shape: shape,
|
|
@@ -46,15 +46,15 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
46
46
|
isSelected: isSelected,
|
|
47
47
|
label: label,
|
|
48
48
|
onClick: onClick,
|
|
49
|
-
|
|
50
|
-
onMouseUpCapture: onMouseUpCapture,
|
|
49
|
+
onClickCapture: onClickCapture,
|
|
51
50
|
onKeyDownCapture: onKeyDownCapture,
|
|
52
51
|
onKeyUpCapture: onKeyUpCapture,
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
onMouseDownCapture: onMouseDownCapture,
|
|
53
|
+
onMouseUpCapture: onMouseUpCapture,
|
|
55
54
|
onPointerDownCapture: onPointerDownCapture,
|
|
56
55
|
onPointerUpCapture: onPointerUpCapture,
|
|
57
|
-
|
|
56
|
+
onTouchEndCapture: onTouchEndCapture,
|
|
57
|
+
onTouchStartCapture: onTouchStartCapture,
|
|
58
58
|
overlay: overlay,
|
|
59
59
|
ref: ref,
|
|
60
60
|
shape: shape,
|
|
@@ -20,19 +20,19 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
20
20
|
Icon = _ref.icon,
|
|
21
21
|
interactionName = _ref.interactionName,
|
|
22
22
|
isDisabled = _ref.isDisabled,
|
|
23
|
-
isSelected = _ref.isSelected,
|
|
24
23
|
isLoading = _ref.isLoading,
|
|
24
|
+
isSelected = _ref.isSelected,
|
|
25
25
|
label = _ref.label,
|
|
26
26
|
onClick = _ref.onClick,
|
|
27
|
-
|
|
28
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
27
|
+
onClickCapture = _ref.onClickCapture,
|
|
29
28
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
30
29
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
31
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
33
32
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
34
33
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
35
|
-
|
|
34
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
35
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
36
36
|
overlay = _ref.overlay,
|
|
37
37
|
ref = _ref.ref,
|
|
38
38
|
shape = _ref.shape,
|
|
@@ -120,7 +120,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
120
120
|
action: 'clicked',
|
|
121
121
|
componentName: 'button',
|
|
122
122
|
packageName: "@atlaskit/button",
|
|
123
|
-
packageVersion: "17.17.
|
|
123
|
+
packageVersion: "17.17.2",
|
|
124
124
|
analyticsData: analyticsContext
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -159,7 +159,9 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
return jsx(FocusRing, null, jsx(Component, _extends({}, rest, {
|
|
162
|
-
ref: setRef
|
|
162
|
+
ref: setRef
|
|
163
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
164
|
+
,
|
|
163
165
|
className: className,
|
|
164
166
|
css: [buttonCss, isInteractive ? null : noPointerEventsOnChildrenCss]
|
|
165
167
|
// using undefined so that the property doesn't exist when false
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SplitButton, SplitButtonWithSlots, Divider, SplitButtonContainer
|
|
1
|
+
export { SplitButton, SplitButtonWithSlots, Divider, SplitButtonContainer } from './split-button';
|
|
2
2
|
export { getActions } from './utils';
|
|
3
|
-
export { SplitButtonContext, useSplitButtonContext
|
|
3
|
+
export { SplitButtonContext, useSplitButtonContext } from './split-button-context';
|
|
@@ -10,7 +10,7 @@ type DividerProps = {
|
|
|
10
10
|
/**
|
|
11
11
|
* TODO: Add JSDoc
|
|
12
12
|
*/
|
|
13
|
-
export declare const Divider: ({ appearance, spacing, isDisabled
|
|
13
|
+
export declare const Divider: ({ appearance, spacing, isDisabled }: DividerProps) => jsx.JSX.Element;
|
|
14
14
|
/**
|
|
15
15
|
* TODO: Add JSdoc
|
|
16
16
|
*/
|
|
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
|
|
|
2
2
|
import { type AdditionalDefaultLinkVariantProps, type CommonLinkVariantProps } from '../types';
|
|
3
3
|
import { type CommonDefaultButtonProps } from './types';
|
|
4
4
|
export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
|
|
5
|
-
declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext,
|
|
5
|
+
declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, ...rest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
6
6
|
/**
|
|
7
7
|
* __Link Button__
|
|
8
8
|
*
|
|
@@ -11,5 +11,5 @@ type UseButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>
|
|
|
11
11
|
*
|
|
12
12
|
* @private
|
|
13
13
|
*/
|
|
14
|
-
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType,
|
|
14
|
+
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, children, iconAfter: IconAfter, iconBefore: IconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shouldFitContainer, spacing, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
|
|
15
15
|
export default useDefaultButton;
|
|
@@ -11,5 +11,5 @@ type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagN
|
|
|
11
11
|
*
|
|
12
12
|
* @private
|
|
13
13
|
*/
|
|
14
|
-
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled,
|
|
14
|
+
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shape, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
15
15
|
export default useIconButton;
|
|
@@ -10,5 +10,5 @@ type ContentProps = {
|
|
|
10
10
|
*
|
|
11
11
|
* Used for slots within a Button, including icons and text content.
|
|
12
12
|
*/
|
|
13
|
-
declare const Content: ({ children, type, hasOverlay, position
|
|
13
|
+
declare const Content: ({ children, type, hasOverlay, position }: ContentProps) => JSX.Element;
|
|
14
14
|
export default Content;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { SplitButton, SplitButtonWithSlots, Divider, SplitButtonContainer
|
|
1
|
+
export { SplitButton, SplitButtonWithSlots, Divider, SplitButtonContainer } from './split-button';
|
|
2
2
|
export { getActions } from './utils';
|
|
3
|
-
export { SplitButtonContext, useSplitButtonContext
|
|
3
|
+
export { SplitButtonContext, useSplitButtonContext } from './split-button-context';
|
|
@@ -10,7 +10,7 @@ type DividerProps = {
|
|
|
10
10
|
/**
|
|
11
11
|
* TODO: Add JSDoc
|
|
12
12
|
*/
|
|
13
|
-
export declare const Divider: ({ appearance, spacing, isDisabled
|
|
13
|
+
export declare const Divider: ({ appearance, spacing, isDisabled }: DividerProps) => jsx.JSX.Element;
|
|
14
14
|
/**
|
|
15
15
|
* TODO: Add JSdoc
|
|
16
16
|
*/
|
|
@@ -2,7 +2,7 @@ import { type Ref } from 'react';
|
|
|
2
2
|
import { type AdditionalDefaultLinkVariantProps, type CommonLinkVariantProps } from '../types';
|
|
3
3
|
import { type CommonDefaultButtonProps } from './types';
|
|
4
4
|
export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonDefaultButtonProps & CommonLinkVariantProps<RouterLinkConfig> & AdditionalDefaultLinkVariantProps;
|
|
5
|
-
declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext,
|
|
5
|
+
declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, shouldFitContainer, spacing, testId, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, ...rest }: LinkButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
6
6
|
/**
|
|
7
7
|
* __Link Button__
|
|
8
8
|
*
|
|
@@ -11,5 +11,5 @@ type UseButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>
|
|
|
11
11
|
*
|
|
12
12
|
* @private
|
|
13
13
|
*/
|
|
14
|
-
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType,
|
|
14
|
+
declare const useDefaultButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, children, iconAfter: IconAfter, iconBefore: IconBefore, interactionName, isDisabled, isLoading, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shouldFitContainer, spacing, UNSAFE_iconAfter_size, UNSAFE_iconBefore_size, }: UseDefaultButtonArgs<TagName>) => UseButtonReturn<TagName>;
|
|
15
15
|
export default useDefaultButton;
|
|
@@ -11,5 +11,5 @@ type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagN
|
|
|
11
11
|
*
|
|
12
12
|
* @private
|
|
13
13
|
*/
|
|
14
|
-
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled,
|
|
14
|
+
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled, isLoading, isSelected, label, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, overlay, ref, shape, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
15
15
|
export default useIconButton;
|
|
@@ -10,5 +10,5 @@ type ContentProps = {
|
|
|
10
10
|
*
|
|
11
11
|
* Used for slots within a Button, including icons and text content.
|
|
12
12
|
*/
|
|
13
|
-
declare const Content: ({ children, type, hasOverlay, position
|
|
13
|
+
declare const Content: ({ children, type, hasOverlay, position }: ContentProps) => JSX.Element;
|
|
14
14
|
export default Content;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/button",
|
|
3
|
-
"version": "17.17.
|
|
3
|
+
"version": "17.17.2",
|
|
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/"
|
|
@@ -135,9 +135,9 @@
|
|
|
135
135
|
"@atlaskit/icon": "^22.3.0",
|
|
136
136
|
"@atlaskit/interaction-context": "^2.1.0",
|
|
137
137
|
"@atlaskit/platform-feature-flags": "^0.2.5",
|
|
138
|
-
"@atlaskit/primitives": "^
|
|
138
|
+
"@atlaskit/primitives": "^7.0.0",
|
|
139
139
|
"@atlaskit/spinner": "^16.1.0",
|
|
140
|
-
"@atlaskit/theme": "^12.
|
|
140
|
+
"@atlaskit/theme": "^12.9.0",
|
|
141
141
|
"@atlaskit/tokens": "^1.49.0",
|
|
142
142
|
"@atlaskit/tooltip": "^18.4.0",
|
|
143
143
|
"@atlaskit/visually-hidden": "^1.3.0",
|
|
@@ -153,11 +153,10 @@
|
|
|
153
153
|
"@af/visual-regression": "*",
|
|
154
154
|
"@atlaskit/app-provider": "^1.3.0",
|
|
155
155
|
"@atlaskit/calendar": "^14.2.0",
|
|
156
|
-
"@atlaskit/checkbox": "^13.
|
|
156
|
+
"@atlaskit/checkbox": "^13.4.0",
|
|
157
157
|
"@atlaskit/ssr": "*",
|
|
158
158
|
"@atlaskit/toggle": "^13.1.0",
|
|
159
159
|
"@atlaskit/visual-regression": "*",
|
|
160
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
161
160
|
"@testing-library/react": "^12.1.5",
|
|
162
161
|
"@testing-library/user-event": "^14.4.3",
|
|
163
162
|
"@types/react-router-dom": "^4.3.1",
|
|
@@ -195,7 +194,6 @@
|
|
|
195
194
|
}
|
|
196
195
|
},
|
|
197
196
|
"homepage": "https://atlassian.design/components/button/",
|
|
198
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
199
197
|
"platform-feature-flags": {
|
|
200
198
|
"platform.design-system-team.button-tokenised-typography-styles": {
|
|
201
199
|
"type": "boolean"
|