@atlaskit/button 16.17.9 → 16.17.11
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 +12 -0
- package/dist/cjs/new-button/variants/icon/button.js +3 -3
- package/dist/cjs/new-button/variants/icon/link.js +3 -3
- package/dist/cjs/new-button/variants/icon/use-icon-button.js +3 -0
- package/dist/cjs/new-button/variants/shared/use-button-base.js +5 -2
- package/dist/cjs/new-button/variants/shared/xcss.js +2 -1
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/icon/button.js +2 -2
- package/dist/es2019/new-button/variants/icon/link.js +2 -2
- package/dist/es2019/new-button/variants/icon/use-icon-button.js +3 -0
- package/dist/es2019/new-button/variants/shared/use-button-base.js +4 -2
- package/dist/es2019/new-button/variants/shared/xcss.js +2 -1
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/icon/button.js +3 -3
- package/dist/esm/new-button/variants/icon/link.js +3 -3
- package/dist/esm/new-button/variants/icon/use-icon-button.js +3 -0
- package/dist/esm/new-button/variants/shared/use-button-base.js +5 -2
- package/dist/esm/new-button/variants/shared/xcss.js +2 -1
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/new-button/variants/icon/link.d.ts +1 -1
- package/dist/types/new-button/variants/icon/types.d.ts +4 -0
- package/dist/types/new-button/variants/icon/use-icon-button.d.ts +2 -2
- package/dist/types/new-button/variants/shared/use-button-base.d.ts +2 -1
- package/dist/types/new-button/variants/shared/xcss.d.ts +2 -1
- package/dist/types-ts4.5/new-button/variants/icon/link.d.ts +1 -1
- package/dist/types-ts4.5/new-button/variants/icon/types.d.ts +4 -0
- package/dist/types-ts4.5/new-button/variants/icon/use-icon-button.d.ts +2 -2
- package/dist/types-ts4.5/new-button/variants/shared/use-button-base.d.ts +2 -1
- package/dist/types-ts4.5/new-button/variants/shared/xcss.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 16.17.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
|
|
8
|
+
|
|
9
|
+
## 16.17.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#55666](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/55666) [`7be116fed51b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7be116fed51b) - Add support for shape to IconButton
|
|
14
|
+
|
|
3
15
|
## 16.17.9
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
12
12
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
13
|
-
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "type", "testId", "UNSAFE_size"];
|
|
13
|
+
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "shape", "type", "testId", "UNSAFE_size"];
|
|
14
14
|
/**
|
|
15
15
|
* __Icon Button__
|
|
16
16
|
*
|
|
@@ -43,6 +43,7 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
43
43
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
44
44
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
45
45
|
onClickCapture = _ref.onClickCapture,
|
|
46
|
+
shape = _ref.shape,
|
|
46
47
|
_ref$type = _ref.type,
|
|
47
48
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
48
49
|
testId = _ref.testId,
|
|
@@ -57,8 +58,6 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
57
58
|
appearance: appearance,
|
|
58
59
|
autoFocus: autoFocus,
|
|
59
60
|
buttonType: 'button',
|
|
60
|
-
children: null,
|
|
61
|
-
// Set in hook.
|
|
62
61
|
icon: icon,
|
|
63
62
|
interactionName: interactionName,
|
|
64
63
|
isDisabled: isDisabled,
|
|
@@ -76,6 +75,7 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
76
75
|
onClickCapture: onClickCapture,
|
|
77
76
|
overlay: overlay,
|
|
78
77
|
ref: ref,
|
|
78
|
+
shape: shape,
|
|
79
79
|
spacing: spacing,
|
|
80
80
|
UNSAFE_size: UNSAFE_size
|
|
81
81
|
});
|
|
@@ -11,7 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _link = _interopRequireDefault(require("@atlaskit/primitives/link"));
|
|
13
13
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
14
|
-
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "testId", "UNSAFE_size", "href"];
|
|
14
|
+
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "shape", "testId", "UNSAFE_size", "href"];
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
@@ -35,6 +35,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
35
35
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
36
36
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
37
37
|
onClickCapture = _ref.onClickCapture,
|
|
38
|
+
shape = _ref.shape,
|
|
38
39
|
testId = _ref.testId,
|
|
39
40
|
UNSAFE_size = _ref.UNSAFE_size,
|
|
40
41
|
href = _ref.href,
|
|
@@ -44,8 +45,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
44
45
|
appearance: appearance,
|
|
45
46
|
autoFocus: autoFocus,
|
|
46
47
|
buttonType: 'link',
|
|
47
|
-
children: null,
|
|
48
|
-
// Set in hook.
|
|
49
48
|
icon: icon,
|
|
50
49
|
interactionName: interactionName,
|
|
51
50
|
isDisabled: isDisabled,
|
|
@@ -63,6 +62,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
63
62
|
onClickCapture: onClickCapture,
|
|
64
63
|
overlay: overlay,
|
|
65
64
|
ref: ref,
|
|
65
|
+
shape: shape,
|
|
66
66
|
spacing: spacing,
|
|
67
67
|
UNSAFE_size: UNSAFE_size
|
|
68
68
|
});
|
|
@@ -40,10 +40,12 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
40
40
|
onClickCapture = _ref.onClickCapture,
|
|
41
41
|
overlay = _ref.overlay,
|
|
42
42
|
ref = _ref.ref,
|
|
43
|
+
shape = _ref.shape,
|
|
43
44
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
44
45
|
spacing = _ref.spacing,
|
|
45
46
|
UNSAFE_size = _ref.UNSAFE_size;
|
|
46
47
|
var hasOverlay = Boolean(overlay);
|
|
48
|
+
var isCircle = shape === 'circle';
|
|
47
49
|
var baseProps = (0, _useButtonBase.default)({
|
|
48
50
|
analyticsContext: analyticsContext,
|
|
49
51
|
appearance: appearance,
|
|
@@ -60,6 +62,7 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
60
62
|
isDisabled: isDisabled,
|
|
61
63
|
isSelected: isSelected,
|
|
62
64
|
isIconButton: true,
|
|
65
|
+
isCircle: isCircle,
|
|
63
66
|
onClick: onClick,
|
|
64
67
|
onMouseDownCapture: onMouseDownCapture,
|
|
65
68
|
onMouseUpCapture: onMouseUpCapture,
|
|
@@ -60,6 +60,8 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
60
60
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
61
61
|
_ref$isIconButton = _ref.isIconButton,
|
|
62
62
|
isIconButton = _ref$isIconButton === void 0 ? false : _ref$isIconButton,
|
|
63
|
+
_ref$isCircle = _ref.isCircle,
|
|
64
|
+
isCircle = _ref$isCircle === void 0 ? false : _ref$isCircle,
|
|
63
65
|
_ref$hasIconBefore = _ref.hasIconBefore,
|
|
64
66
|
hasIconBefore = _ref$hasIconBefore === void 0 ? false : _ref$hasIconBefore,
|
|
65
67
|
_ref$hasIconAfter = _ref.hasIconAfter,
|
|
@@ -115,7 +117,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
115
117
|
action: 'clicked',
|
|
116
118
|
componentName: 'button',
|
|
117
119
|
packageName: "@atlaskit/button",
|
|
118
|
-
packageVersion: "16.17.
|
|
120
|
+
packageVersion: "16.17.11",
|
|
119
121
|
analyticsData: analyticsContext,
|
|
120
122
|
actionSubject: buttonType
|
|
121
123
|
});
|
|
@@ -129,6 +131,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
129
131
|
isActiveOverSelected: isActiveOverSelected,
|
|
130
132
|
shouldFitContainer: shouldFitContainer,
|
|
131
133
|
isIconButton: isIconButton,
|
|
134
|
+
isCircle: isCircle,
|
|
132
135
|
hasOverlay: Boolean(overlay),
|
|
133
136
|
isLink: buttonType === 'link',
|
|
134
137
|
hasIconBefore: hasIconBefore,
|
|
@@ -136,7 +139,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
136
139
|
isSplit: isSplitButton,
|
|
137
140
|
isNavigationSplit: isNavigationSplitButton
|
|
138
141
|
});
|
|
139
|
-
}, [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
142
|
+
}, [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
140
143
|
var isEffectivelyDisabled = isDisabled || Boolean(overlay);
|
|
141
144
|
return _objectSpread({
|
|
142
145
|
ref: setRef,
|
|
@@ -91,6 +91,7 @@ function getXCSS(_ref3) {
|
|
|
91
91
|
isHighlighted = _ref3.isHighlighted,
|
|
92
92
|
isActiveOverSelected = _ref3.isActiveOverSelected,
|
|
93
93
|
isIconButton = _ref3.isIconButton,
|
|
94
|
+
isCircle = _ref3.isCircle,
|
|
94
95
|
shouldFitContainer = _ref3.shouldFitContainer,
|
|
95
96
|
isLink = _ref3.isLink,
|
|
96
97
|
isSplit = _ref3.isSplit,
|
|
@@ -136,7 +137,7 @@ function getXCSS(_ref3) {
|
|
|
136
137
|
return (0, _primitives.xcss)(_objectSpread(_objectSpread(_objectSpread({
|
|
137
138
|
alignItems: 'baseline',
|
|
138
139
|
borderWidth: 'border.width.0',
|
|
139
|
-
borderRadius: 'border.radius.100',
|
|
140
|
+
borderRadius: isCircle && !isSplit ? 'border.radius.circle' : 'border.radius.100',
|
|
140
141
|
boxSizing: 'border-box',
|
|
141
142
|
display: 'inline-flex',
|
|
142
143
|
fontSize: 'inherit',
|
|
@@ -118,7 +118,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
118
118
|
action: 'clicked',
|
|
119
119
|
componentName: 'button',
|
|
120
120
|
packageName: "@atlaskit/button",
|
|
121
|
-
packageVersion: "16.17.
|
|
121
|
+
packageVersion: "16.17.11",
|
|
122
122
|
analyticsData: analyticsContext
|
|
123
123
|
});
|
|
124
124
|
|
|
@@ -34,6 +34,7 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
34
34
|
onPointerDownCapture,
|
|
35
35
|
onPointerUpCapture,
|
|
36
36
|
onClickCapture,
|
|
37
|
+
shape,
|
|
37
38
|
type = 'button',
|
|
38
39
|
testId,
|
|
39
40
|
UNSAFE_size,
|
|
@@ -48,8 +49,6 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
48
49
|
appearance,
|
|
49
50
|
autoFocus,
|
|
50
51
|
buttonType: 'button',
|
|
51
|
-
children: null,
|
|
52
|
-
// Set in hook.
|
|
53
52
|
icon,
|
|
54
53
|
interactionName,
|
|
55
54
|
isDisabled,
|
|
@@ -67,6 +66,7 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
67
66
|
onClickCapture,
|
|
68
67
|
overlay,
|
|
69
68
|
ref,
|
|
69
|
+
shape,
|
|
70
70
|
spacing,
|
|
71
71
|
UNSAFE_size
|
|
72
72
|
});
|
|
@@ -23,6 +23,7 @@ const LinkIconButtonBase = ({
|
|
|
23
23
|
onPointerDownCapture,
|
|
24
24
|
onPointerUpCapture,
|
|
25
25
|
onClickCapture,
|
|
26
|
+
shape,
|
|
26
27
|
testId,
|
|
27
28
|
UNSAFE_size,
|
|
28
29
|
href,
|
|
@@ -33,8 +34,6 @@ const LinkIconButtonBase = ({
|
|
|
33
34
|
appearance,
|
|
34
35
|
autoFocus,
|
|
35
36
|
buttonType: 'link',
|
|
36
|
-
children: null,
|
|
37
|
-
// Set in hook.
|
|
38
37
|
icon,
|
|
39
38
|
interactionName,
|
|
40
39
|
isDisabled,
|
|
@@ -52,6 +51,7 @@ const LinkIconButtonBase = ({
|
|
|
52
51
|
onClickCapture,
|
|
53
52
|
overlay,
|
|
54
53
|
ref,
|
|
54
|
+
shape,
|
|
55
55
|
spacing,
|
|
56
56
|
UNSAFE_size
|
|
57
57
|
});
|
|
@@ -33,11 +33,13 @@ const useIconButton = ({
|
|
|
33
33
|
onClickCapture,
|
|
34
34
|
overlay,
|
|
35
35
|
ref,
|
|
36
|
+
shape,
|
|
36
37
|
shouldFitContainer,
|
|
37
38
|
spacing,
|
|
38
39
|
UNSAFE_size
|
|
39
40
|
}) => {
|
|
40
41
|
const hasOverlay = Boolean(overlay);
|
|
42
|
+
const isCircle = shape === 'circle';
|
|
41
43
|
const baseProps = useButtonBase({
|
|
42
44
|
analyticsContext,
|
|
43
45
|
appearance,
|
|
@@ -54,6 +56,7 @@ const useIconButton = ({
|
|
|
54
56
|
isDisabled,
|
|
55
57
|
isSelected,
|
|
56
58
|
isIconButton: true,
|
|
59
|
+
isCircle,
|
|
57
60
|
onClick,
|
|
58
61
|
onMouseDownCapture,
|
|
59
62
|
onMouseUpCapture,
|
|
@@ -45,6 +45,7 @@ const useButtonBase = ({
|
|
|
45
45
|
isSelected = false,
|
|
46
46
|
// TODO: Separate Icon Button styling from button base
|
|
47
47
|
isIconButton = false,
|
|
48
|
+
isCircle = false,
|
|
48
49
|
// TODO: Separate icon slot styling from button base
|
|
49
50
|
hasIconBefore = false,
|
|
50
51
|
hasIconAfter = false,
|
|
@@ -97,7 +98,7 @@ const useButtonBase = ({
|
|
|
97
98
|
action: 'clicked',
|
|
98
99
|
componentName: 'button',
|
|
99
100
|
packageName: "@atlaskit/button",
|
|
100
|
-
packageVersion: "16.17.
|
|
101
|
+
packageVersion: "16.17.11",
|
|
101
102
|
analyticsData: analyticsContext,
|
|
102
103
|
actionSubject: buttonType
|
|
103
104
|
});
|
|
@@ -110,13 +111,14 @@ const useButtonBase = ({
|
|
|
110
111
|
isActiveOverSelected,
|
|
111
112
|
shouldFitContainer,
|
|
112
113
|
isIconButton,
|
|
114
|
+
isCircle,
|
|
113
115
|
hasOverlay: Boolean(overlay),
|
|
114
116
|
isLink: buttonType === 'link',
|
|
115
117
|
hasIconBefore,
|
|
116
118
|
hasIconAfter,
|
|
117
119
|
isSplit: isSplitButton,
|
|
118
120
|
isNavigationSplit: isNavigationSplitButton
|
|
119
|
-
}), [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
121
|
+
}), [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
120
122
|
const isEffectivelyDisabled = isDisabled || Boolean(overlay);
|
|
121
123
|
return {
|
|
122
124
|
ref: setRef,
|
|
@@ -81,6 +81,7 @@ export function getXCSS({
|
|
|
81
81
|
isHighlighted,
|
|
82
82
|
isActiveOverSelected,
|
|
83
83
|
isIconButton,
|
|
84
|
+
isCircle,
|
|
84
85
|
shouldFitContainer,
|
|
85
86
|
isLink,
|
|
86
87
|
isSplit,
|
|
@@ -130,7 +131,7 @@ export function getXCSS({
|
|
|
130
131
|
return xcss({
|
|
131
132
|
alignItems: 'baseline',
|
|
132
133
|
borderWidth: 'border.width.0',
|
|
133
|
-
borderRadius: 'border.radius.100',
|
|
134
|
+
borderRadius: isCircle && !isSplit ? 'border.radius.circle' : 'border.radius.100',
|
|
134
135
|
boxSizing: 'border-box',
|
|
135
136
|
display: 'inline-flex',
|
|
136
137
|
fontSize: 'inherit',
|
|
@@ -103,7 +103,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
103
103
|
action: 'clicked',
|
|
104
104
|
componentName: 'button',
|
|
105
105
|
packageName: "@atlaskit/button",
|
|
106
|
-
packageVersion: "16.17.
|
|
106
|
+
packageVersion: "16.17.11",
|
|
107
107
|
analyticsData: analyticsContext
|
|
108
108
|
});
|
|
109
109
|
|
|
@@ -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", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "type", "testId", "UNSAFE_size"];
|
|
3
|
+
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "shape", "type", "testId", "UNSAFE_size"];
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import UNSAFE_PRESSABLE from '@atlaskit/primitives/pressable';
|
|
6
6
|
import useIconButton from './use-icon-button';
|
|
@@ -36,6 +36,7 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
36
36
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
37
37
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
38
38
|
onClickCapture = _ref.onClickCapture,
|
|
39
|
+
shape = _ref.shape,
|
|
39
40
|
_ref$type = _ref.type,
|
|
40
41
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
41
42
|
testId = _ref.testId,
|
|
@@ -50,8 +51,6 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
50
51
|
appearance: appearance,
|
|
51
52
|
autoFocus: autoFocus,
|
|
52
53
|
buttonType: 'button',
|
|
53
|
-
children: null,
|
|
54
|
-
// Set in hook.
|
|
55
54
|
icon: icon,
|
|
56
55
|
interactionName: interactionName,
|
|
57
56
|
isDisabled: isDisabled,
|
|
@@ -69,6 +68,7 @@ var IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function
|
|
|
69
68
|
onClickCapture: onClickCapture,
|
|
70
69
|
overlay: overlay,
|
|
71
70
|
ref: ref,
|
|
71
|
+
shape: shape,
|
|
72
72
|
spacing: spacing,
|
|
73
73
|
UNSAFE_size: UNSAFE_size
|
|
74
74
|
});
|
|
@@ -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", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "testId", "UNSAFE_size", "href"];
|
|
3
|
+
var _excluded = ["analyticsContext", "autoFocus", "appearance", "spacing", "isDisabled", "isSelected", "icon", "interactionName", "label", "overlay", "onClick", "onMouseDownCapture", "onMouseUpCapture", "onKeyDownCapture", "onKeyUpCapture", "onTouchStartCapture", "onTouchEndCapture", "onPointerDownCapture", "onPointerUpCapture", "onClickCapture", "shape", "testId", "UNSAFE_size", "href"];
|
|
4
4
|
import React, { forwardRef, memo } from 'react';
|
|
5
5
|
import UNSAFE_LINK from '@atlaskit/primitives/link';
|
|
6
6
|
import useIconButton from './use-icon-button';
|
|
@@ -25,6 +25,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
25
25
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
26
26
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
27
27
|
onClickCapture = _ref.onClickCapture,
|
|
28
|
+
shape = _ref.shape,
|
|
28
29
|
testId = _ref.testId,
|
|
29
30
|
UNSAFE_size = _ref.UNSAFE_size,
|
|
30
31
|
href = _ref.href,
|
|
@@ -34,8 +35,6 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
34
35
|
appearance: appearance,
|
|
35
36
|
autoFocus: autoFocus,
|
|
36
37
|
buttonType: 'link',
|
|
37
|
-
children: null,
|
|
38
|
-
// Set in hook.
|
|
39
38
|
icon: icon,
|
|
40
39
|
interactionName: interactionName,
|
|
41
40
|
isDisabled: isDisabled,
|
|
@@ -53,6 +52,7 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
53
52
|
onClickCapture: onClickCapture,
|
|
54
53
|
overlay: overlay,
|
|
55
54
|
ref: ref,
|
|
55
|
+
shape: shape,
|
|
56
56
|
spacing: spacing,
|
|
57
57
|
UNSAFE_size: UNSAFE_size
|
|
58
58
|
});
|
|
@@ -33,10 +33,12 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
33
33
|
onClickCapture = _ref.onClickCapture,
|
|
34
34
|
overlay = _ref.overlay,
|
|
35
35
|
ref = _ref.ref,
|
|
36
|
+
shape = _ref.shape,
|
|
36
37
|
shouldFitContainer = _ref.shouldFitContainer,
|
|
37
38
|
spacing = _ref.spacing,
|
|
38
39
|
UNSAFE_size = _ref.UNSAFE_size;
|
|
39
40
|
var hasOverlay = Boolean(overlay);
|
|
41
|
+
var isCircle = shape === 'circle';
|
|
40
42
|
var baseProps = useButtonBase({
|
|
41
43
|
analyticsContext: analyticsContext,
|
|
42
44
|
appearance: appearance,
|
|
@@ -53,6 +55,7 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
53
55
|
isDisabled: isDisabled,
|
|
54
56
|
isSelected: isSelected,
|
|
55
57
|
isIconButton: true,
|
|
58
|
+
isCircle: isCircle,
|
|
56
59
|
onClick: onClick,
|
|
57
60
|
onMouseDownCapture: onMouseDownCapture,
|
|
58
61
|
onMouseUpCapture: onMouseUpCapture,
|
|
@@ -52,6 +52,8 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
52
52
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
53
53
|
_ref$isIconButton = _ref.isIconButton,
|
|
54
54
|
isIconButton = _ref$isIconButton === void 0 ? false : _ref$isIconButton,
|
|
55
|
+
_ref$isCircle = _ref.isCircle,
|
|
56
|
+
isCircle = _ref$isCircle === void 0 ? false : _ref$isCircle,
|
|
55
57
|
_ref$hasIconBefore = _ref.hasIconBefore,
|
|
56
58
|
hasIconBefore = _ref$hasIconBefore === void 0 ? false : _ref$hasIconBefore,
|
|
57
59
|
_ref$hasIconAfter = _ref.hasIconAfter,
|
|
@@ -107,7 +109,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
107
109
|
action: 'clicked',
|
|
108
110
|
componentName: 'button',
|
|
109
111
|
packageName: "@atlaskit/button",
|
|
110
|
-
packageVersion: "16.17.
|
|
112
|
+
packageVersion: "16.17.11",
|
|
111
113
|
analyticsData: analyticsContext,
|
|
112
114
|
actionSubject: buttonType
|
|
113
115
|
});
|
|
@@ -121,6 +123,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
121
123
|
isActiveOverSelected: isActiveOverSelected,
|
|
122
124
|
shouldFitContainer: shouldFitContainer,
|
|
123
125
|
isIconButton: isIconButton,
|
|
126
|
+
isCircle: isCircle,
|
|
124
127
|
hasOverlay: Boolean(overlay),
|
|
125
128
|
isLink: buttonType === 'link',
|
|
126
129
|
hasIconBefore: hasIconBefore,
|
|
@@ -128,7 +131,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
128
131
|
isSplit: isSplitButton,
|
|
129
132
|
isNavigationSplit: isNavigationSplitButton
|
|
130
133
|
});
|
|
131
|
-
}, [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
134
|
+
}, [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
132
135
|
var isEffectivelyDisabled = isDisabled || Boolean(overlay);
|
|
133
136
|
return _objectSpread({
|
|
134
137
|
ref: setRef,
|
|
@@ -83,6 +83,7 @@ export function getXCSS(_ref3) {
|
|
|
83
83
|
isHighlighted = _ref3.isHighlighted,
|
|
84
84
|
isActiveOverSelected = _ref3.isActiveOverSelected,
|
|
85
85
|
isIconButton = _ref3.isIconButton,
|
|
86
|
+
isCircle = _ref3.isCircle,
|
|
86
87
|
shouldFitContainer = _ref3.shouldFitContainer,
|
|
87
88
|
isLink = _ref3.isLink,
|
|
88
89
|
isSplit = _ref3.isSplit,
|
|
@@ -128,7 +129,7 @@ export function getXCSS(_ref3) {
|
|
|
128
129
|
return xcss(_objectSpread(_objectSpread(_objectSpread({
|
|
129
130
|
alignItems: 'baseline',
|
|
130
131
|
borderWidth: 'border.width.0',
|
|
131
|
-
borderRadius: 'border.radius.100',
|
|
132
|
+
borderRadius: isCircle && !isSplit ? 'border.radius.circle' : 'border.radius.100',
|
|
132
133
|
boxSizing: 'border-box',
|
|
133
134
|
display: 'inline-flex',
|
|
134
135
|
fontSize: 'inherit',
|
|
@@ -109,7 +109,7 @@ export default /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
|
|
|
109
109
|
action: 'clicked',
|
|
110
110
|
componentName: 'button',
|
|
111
111
|
packageName: "@atlaskit/button",
|
|
112
|
-
packageVersion: "16.17.
|
|
112
|
+
packageVersion: "16.17.11",
|
|
113
113
|
analyticsData: analyticsContext
|
|
114
114
|
});
|
|
115
115
|
|
|
@@ -2,7 +2,7 @@ import React, { type Ref } from 'react';
|
|
|
2
2
|
import { type CommonLinkVariantProps } from '../types';
|
|
3
3
|
import { type CommonIconButtonProps } from './types';
|
|
4
4
|
export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & Omit<CommonLinkVariantProps<RouterLinkConfig>, 'children' | 'appearance'>;
|
|
5
|
-
declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, autoFocus, appearance, spacing, isDisabled, isSelected, icon, interactionName, label, overlay, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, testId, UNSAFE_size, href, ...rest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
5
|
+
declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, autoFocus, appearance, spacing, isDisabled, isSelected, icon, interactionName, label, overlay, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, shape, testId, UNSAFE_size, href, ...rest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
6
6
|
/**
|
|
7
7
|
* __Link Icon Button__
|
|
8
8
|
*
|
|
@@ -12,6 +12,10 @@ export type CommonIconButtonProps = {
|
|
|
12
12
|
* Provide an accessible label, often used by screen readers
|
|
13
13
|
*/
|
|
14
14
|
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Set the shape of the icon, defaults to square with rounded corners
|
|
17
|
+
*/
|
|
18
|
+
shape?: 'default' | 'circle';
|
|
15
19
|
/**
|
|
16
20
|
* Set the size of the icon. `medium` is default, so it does not need to be specified.
|
|
17
21
|
* This is UNSAFE as it will be removed in future in favor of a 100% bounded API
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UseButtonBaseArgs, type UseButtonBaseReturn } from '../shared/use-button-base';
|
|
2
2
|
import { type CommonIconButtonProps } from './types';
|
|
3
|
-
type UseIconButtonArgs<TagName extends HTMLElement> = UseButtonBaseArgs<TagName> & CommonIconButtonProps;
|
|
3
|
+
type UseIconButtonArgs<TagName extends HTMLElement> = Omit<UseButtonBaseArgs<TagName>, 'children'> & CommonIconButtonProps;
|
|
4
4
|
type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>;
|
|
5
5
|
/**
|
|
6
6
|
* __Use icon button__
|
|
@@ -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, isSelected, label, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
14
|
+
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled, isSelected, label, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shape, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
15
15
|
export default useIconButton;
|
|
@@ -10,6 +10,7 @@ export type UseButtonBaseArgs<TagName extends HTMLElement> = {
|
|
|
10
10
|
*/
|
|
11
11
|
buttonType: 'button' | 'link';
|
|
12
12
|
isIconButton?: boolean;
|
|
13
|
+
isCircle?: boolean;
|
|
13
14
|
hasIconBefore?: boolean;
|
|
14
15
|
hasIconAfter?: boolean;
|
|
15
16
|
shouldFitContainer?: boolean;
|
|
@@ -34,5 +35,5 @@ export type UseButtonBaseReturn<TagName extends HTMLElement> = {
|
|
|
34
35
|
*
|
|
35
36
|
* @private
|
|
36
37
|
*/
|
|
37
|
-
declare const useButtonBase: <TagName extends HTMLElement>({ analyticsContext, appearance: propAppearance, autoFocus, buttonType, interactionName, isDisabled: propIsDisabled, isSelected, isIconButton, hasIconBefore, hasIconAfter, children, onClick: providedOnClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
38
|
+
declare const useButtonBase: <TagName extends HTMLElement>({ analyticsContext, appearance: propAppearance, autoFocus, buttonType, interactionName, isDisabled: propIsDisabled, isSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick: providedOnClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
38
39
|
export default useButtonBase;
|
|
@@ -13,6 +13,7 @@ export type GetXCSSArgs = {
|
|
|
13
13
|
shouldFitContainer: boolean;
|
|
14
14
|
hasOverlay: boolean;
|
|
15
15
|
isIconButton: boolean;
|
|
16
|
+
isCircle: boolean;
|
|
16
17
|
hasIconBefore: boolean;
|
|
17
18
|
hasIconAfter: boolean;
|
|
18
19
|
/**
|
|
@@ -28,4 +29,4 @@ export type GetXCSSArgs = {
|
|
|
28
29
|
*/
|
|
29
30
|
isNavigationSplit: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare function getXCSS({ appearance, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, shouldFitContainer, isLink, isSplit, isNavigationSplit, hasOverlay, hasIconBefore, hasIconAfter, }: GetXCSSArgs): ReturnType<typeof xcss>;
|
|
32
|
+
export declare function getXCSS({ appearance, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, isLink, isSplit, isNavigationSplit, hasOverlay, hasIconBefore, hasIconAfter, }: GetXCSSArgs): ReturnType<typeof xcss>;
|
|
@@ -2,7 +2,7 @@ import React, { type Ref } from 'react';
|
|
|
2
2
|
import { type CommonLinkVariantProps } from '../types';
|
|
3
3
|
import { type CommonIconButtonProps } from './types';
|
|
4
4
|
export type LinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> = CommonIconButtonProps & Omit<CommonLinkVariantProps<RouterLinkConfig>, 'children' | 'appearance'>;
|
|
5
|
-
declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, autoFocus, appearance, spacing, isDisabled, isSelected, icon, interactionName, label, overlay, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, testId, UNSAFE_size, href, ...rest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
5
|
+
declare const LinkIconButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, autoFocus, appearance, spacing, isDisabled, isSelected, icon, interactionName, label, overlay, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, shape, testId, UNSAFE_size, href, ...rest }: LinkIconButtonProps<RouterLinkConfig>, ref: Ref<HTMLAnchorElement>) => JSX.Element;
|
|
6
6
|
/**
|
|
7
7
|
* __Link Icon Button__
|
|
8
8
|
*
|
|
@@ -12,6 +12,10 @@ export type CommonIconButtonProps = {
|
|
|
12
12
|
* Provide an accessible label, often used by screen readers
|
|
13
13
|
*/
|
|
14
14
|
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Set the shape of the icon, defaults to square with rounded corners
|
|
17
|
+
*/
|
|
18
|
+
shape?: 'default' | 'circle';
|
|
15
19
|
/**
|
|
16
20
|
* Set the size of the icon. `medium` is default, so it does not need to be specified.
|
|
17
21
|
* This is UNSAFE as it will be removed in future in favor of a 100% bounded API
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UseButtonBaseArgs, type UseButtonBaseReturn } from '../shared/use-button-base';
|
|
2
2
|
import { type CommonIconButtonProps } from './types';
|
|
3
|
-
type UseIconButtonArgs<TagName extends HTMLElement> = UseButtonBaseArgs<TagName> & CommonIconButtonProps;
|
|
3
|
+
type UseIconButtonArgs<TagName extends HTMLElement> = Omit<UseButtonBaseArgs<TagName>, 'children'> & CommonIconButtonProps;
|
|
4
4
|
type UseIconButtonReturn<TagName extends HTMLElement> = UseButtonBaseReturn<TagName>;
|
|
5
5
|
/**
|
|
6
6
|
* __Use icon button__
|
|
@@ -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, isSelected, label, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
14
|
+
declare const useIconButton: <TagName extends HTMLElement>({ analyticsContext, appearance, autoFocus, buttonType, icon: Icon, interactionName, isDisabled, isSelected, label, onClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shape, shouldFitContainer, spacing, UNSAFE_size, }: UseIconButtonArgs<TagName>) => UseIconButtonReturn<TagName>;
|
|
15
15
|
export default useIconButton;
|
|
@@ -10,6 +10,7 @@ export type UseButtonBaseArgs<TagName extends HTMLElement> = {
|
|
|
10
10
|
*/
|
|
11
11
|
buttonType: 'button' | 'link';
|
|
12
12
|
isIconButton?: boolean;
|
|
13
|
+
isCircle?: boolean;
|
|
13
14
|
hasIconBefore?: boolean;
|
|
14
15
|
hasIconAfter?: boolean;
|
|
15
16
|
shouldFitContainer?: boolean;
|
|
@@ -34,5 +35,5 @@ export type UseButtonBaseReturn<TagName extends HTMLElement> = {
|
|
|
34
35
|
*
|
|
35
36
|
* @private
|
|
36
37
|
*/
|
|
37
|
-
declare const useButtonBase: <TagName extends HTMLElement>({ analyticsContext, appearance: propAppearance, autoFocus, buttonType, interactionName, isDisabled: propIsDisabled, isSelected, isIconButton, hasIconBefore, hasIconAfter, children, onClick: providedOnClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
38
|
+
declare const useButtonBase: <TagName extends HTMLElement>({ analyticsContext, appearance: propAppearance, autoFocus, buttonType, interactionName, isDisabled: propIsDisabled, isSelected, isIconButton, isCircle, hasIconBefore, hasIconAfter, children, onClick: providedOnClick, onMouseDownCapture, onMouseUpCapture, onKeyDownCapture, onKeyUpCapture, onTouchStartCapture, onTouchEndCapture, onPointerDownCapture, onPointerUpCapture, onClickCapture, overlay, ref, shouldFitContainer, spacing: propSpacing, }: UseButtonBaseArgs<TagName>) => UseButtonBaseReturn<TagName>;
|
|
38
39
|
export default useButtonBase;
|
|
@@ -13,6 +13,7 @@ export type GetXCSSArgs = {
|
|
|
13
13
|
shouldFitContainer: boolean;
|
|
14
14
|
hasOverlay: boolean;
|
|
15
15
|
isIconButton: boolean;
|
|
16
|
+
isCircle: boolean;
|
|
16
17
|
hasIconBefore: boolean;
|
|
17
18
|
hasIconAfter: boolean;
|
|
18
19
|
/**
|
|
@@ -28,4 +29,4 @@ export type GetXCSSArgs = {
|
|
|
28
29
|
*/
|
|
29
30
|
isNavigationSplit: boolean;
|
|
30
31
|
};
|
|
31
|
-
export declare function getXCSS({ appearance, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, shouldFitContainer, isLink, isSplit, isNavigationSplit, hasOverlay, hasIconBefore, hasIconAfter, }: GetXCSSArgs): ReturnType<typeof xcss>;
|
|
32
|
+
export declare function getXCSS({ appearance, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, isLink, isSplit, isNavigationSplit, hasOverlay, hasIconBefore, hasIconAfter, }: GetXCSSArgs): ReturnType<typeof xcss>;
|
package/package.json
CHANGED