@atlaskit/button 17.9.0 → 17.11.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 +18 -0
- package/dist/cjs/new-button/variants/default/use-default-button.js +1 -0
- package/dist/cjs/new-button/variants/icon/button.js +105 -15
- package/dist/cjs/new-button/variants/icon/link.js +111 -14
- package/dist/cjs/new-button/variants/icon/use-icon-button.js +1 -0
- package/dist/cjs/new-button/variants/shared/loading-overlay.js +1 -4
- package/dist/cjs/new-button/variants/shared/use-button-base.js +4 -1
- package/dist/cjs/new-button/variants/shared/xcss.js +9 -3
- package/dist/cjs/old-button/shared/button-base.js +1 -1
- package/dist/es2019/new-button/variants/default/use-default-button.js +1 -0
- package/dist/es2019/new-button/variants/icon/button.js +101 -14
- package/dist/es2019/new-button/variants/icon/link.js +107 -13
- package/dist/es2019/new-button/variants/icon/use-icon-button.js +1 -0
- package/dist/es2019/new-button/variants/shared/loading-overlay.js +1 -4
- package/dist/es2019/new-button/variants/shared/use-button-base.js +3 -1
- package/dist/es2019/new-button/variants/shared/xcss.js +8 -2
- package/dist/es2019/old-button/shared/button-base.js +1 -1
- package/dist/esm/new-button/variants/default/use-default-button.js +1 -0
- package/dist/esm/new-button/variants/icon/button.js +105 -15
- package/dist/esm/new-button/variants/icon/link.js +111 -14
- package/dist/esm/new-button/variants/icon/use-icon-button.js +1 -0
- package/dist/esm/new-button/variants/shared/loading-overlay.js +1 -4
- package/dist/esm/new-button/variants/shared/use-button-base.js +4 -1
- package/dist/esm/new-button/variants/shared/xcss.js +9 -3
- package/dist/esm/old-button/shared/button-base.js +1 -1
- package/dist/types/containers/button-group.d.ts +4 -4
- package/dist/types/new-button/variants/default/types.d.ts +0 -4
- package/dist/types/new-button/variants/icon/link.d.ts +1 -1
- package/dist/types/new-button/variants/icon/types.d.ts +16 -6
- package/dist/types/new-button/variants/icon/use-icon-button.d.ts +1 -1
- 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/new-button/variants/types.d.ts +4 -0
- package/dist/types/old-button/types.d.ts +20 -20
- package/dist/types/utils/variants.d.ts +2 -2
- package/dist/types-ts4.5/containers/button-group.d.ts +4 -4
- package/dist/types-ts4.5/new-button/variants/default/types.d.ts +0 -4
- 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 +16 -6
- 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/use-button-base.d.ts +2 -1
- package/dist/types-ts4.5/new-button/variants/shared/xcss.d.ts +2 -1
- package/dist/types-ts4.5/new-button/variants/types.d.ts +4 -0
- package/dist/types-ts4.5/old-button/types.d.ts +20 -20
- package/dist/types-ts4.5/utils/variants.d.ts +2 -2
- package/extract-react-types/new-button/variants/default/{common-props.tsx → common-default-button-props.tsx} +1 -1
- package/extract-react-types/new-button/variants/icon-button/icon-button-props.tsx +5 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/button
|
|
2
2
|
|
|
3
|
+
## 17.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#85696](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85696) [`3f4e688ce636`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f4e688ce636) - Tooltips are now included within icon buttons. They are disabled by default. To enable set `isTooltipDisabled` to false.
|
|
8
|
+
|
|
9
|
+
## 17.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#88036](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88036) [`c1d62ce0679e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c1d62ce0679e) - - Fixed a bug in new loading buttons where the spinner color was incorrect in selected state.
|
|
14
|
+
- Fixed a bug where the `isLoading` prop on new buttons was mistakenly added to unsupported link buttons.
|
|
15
|
+
- New loading buttons now display a loading cursor (`cursor: progress`), rather than a disabled cursor (`cursor: not-allowed`).
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#87335](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87335) [`4bb74bb023d4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4bb74bb023d4) - Added explicit `text-decoration` styles to new button focus states. This ensures button styles are not interfered with by global styles.
|
|
20
|
+
|
|
3
21
|
## 17.9.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -9,8 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _pressable = _interopRequireDefault(require("@atlaskit/primitives/pressable"));
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
12
13
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
13
|
-
var _excluded = ["analyticsContext", "
|
|
14
|
+
var _excluded = ["aria-label", "analyticsContext", "appearance", "autoFocus", "icon", "interactionName", "isDisabled", "isLoading", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shape", "spacing", "testId", "tooltip", "type", "UNSAFE_size"];
|
|
14
15
|
/**
|
|
15
16
|
* __Icon Button__
|
|
16
17
|
*
|
|
@@ -21,33 +22,36 @@ var _excluded = ["analyticsContext", "interactionName", "autoFocus", "appearance
|
|
|
21
22
|
* - [Usage](https://atlassian.design/components/button/usage)
|
|
22
23
|
*/
|
|
23
24
|
var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function Button(_ref, ref) {
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
autoFocus = _ref.autoFocus,
|
|
25
|
+
var preventedAriaLabel = _ref['aria-label'],
|
|
26
|
+
analyticsContext = _ref.analyticsContext,
|
|
27
27
|
appearance = _ref.appearance,
|
|
28
|
-
|
|
28
|
+
autoFocus = _ref.autoFocus,
|
|
29
|
+
icon = _ref.icon,
|
|
30
|
+
interactionName = _ref.interactionName,
|
|
29
31
|
isDisabled = _ref.isDisabled,
|
|
30
|
-
isSelected = _ref.isSelected,
|
|
31
32
|
isLoading = _ref.isLoading,
|
|
32
|
-
|
|
33
|
+
isSelected = _ref.isSelected,
|
|
34
|
+
_ref$isTooltipDisable = _ref.isTooltipDisabled,
|
|
35
|
+
isTooltipDisabled = _ref$isTooltipDisable === void 0 ? true : _ref$isTooltipDisable,
|
|
33
36
|
label = _ref.label,
|
|
34
|
-
overlay = _ref.overlay,
|
|
35
37
|
onClick = _ref.onClick,
|
|
36
|
-
|
|
37
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
38
|
+
onClickCapture = _ref.onClickCapture,
|
|
38
39
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
39
40
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
42
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
42
43
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
43
44
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
44
|
-
|
|
45
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
46
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
47
|
+
overlay = _ref.overlay,
|
|
45
48
|
shape = _ref.shape,
|
|
49
|
+
spacing = _ref.spacing,
|
|
50
|
+
testId = _ref.testId,
|
|
51
|
+
tooltip = _ref.tooltip,
|
|
46
52
|
_ref$type = _ref.type,
|
|
47
53
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
48
|
-
testId = _ref.testId,
|
|
49
54
|
UNSAFE_size = _ref.UNSAFE_size,
|
|
50
|
-
preventedAriaLabel = _ref['aria-label'],
|
|
51
55
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
52
56
|
/**
|
|
53
57
|
* TODO: At some stage I'll look into re-using more logic across 'default' and 'icon'
|
|
@@ -80,6 +84,92 @@ var IconButton = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.f
|
|
|
80
84
|
spacing: spacing,
|
|
81
85
|
UNSAFE_size: UNSAFE_size
|
|
82
86
|
});
|
|
87
|
+
if (!isTooltipDisabled) {
|
|
88
|
+
var _tooltip$content;
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
90
|
+
content: (_tooltip$content = tooltip === null || tooltip === void 0 ? void 0 : tooltip.content) !== null && _tooltip$content !== void 0 ? _tooltip$content : label,
|
|
91
|
+
testId: tooltip === null || tooltip === void 0 ? void 0 : tooltip.testId,
|
|
92
|
+
position: tooltip === null || tooltip === void 0 ? void 0 : tooltip.position,
|
|
93
|
+
delay: tooltip === null || tooltip === void 0 ? void 0 : tooltip.delay,
|
|
94
|
+
onShow: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onShow,
|
|
95
|
+
onHide: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onHide,
|
|
96
|
+
mousePosition: tooltip === null || tooltip === void 0 ? void 0 : tooltip.mousePosition,
|
|
97
|
+
analyticsContext: tooltip === null || tooltip === void 0 ? void 0 : tooltip.analyticsContext,
|
|
98
|
+
strategy: tooltip === null || tooltip === void 0 ? void 0 : tooltip.strategy,
|
|
99
|
+
tag: tooltip === null || tooltip === void 0 ? void 0 : tooltip.tag,
|
|
100
|
+
truncate: tooltip === null || tooltip === void 0 ? void 0 : tooltip.truncate,
|
|
101
|
+
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
102
|
+
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
103
|
+
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
104
|
+
}, function (triggerProps) {
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(_pressable.default
|
|
106
|
+
// Top level props
|
|
107
|
+
, (0, _extends2.default)({}, rest, {
|
|
108
|
+
type: type,
|
|
109
|
+
testId: testId,
|
|
110
|
+
componentName: "IconButton",
|
|
111
|
+
analyticsContext: analyticsContext,
|
|
112
|
+
interactionName: interactionName
|
|
113
|
+
// Shared between tooltip and native props
|
|
114
|
+
,
|
|
115
|
+
onMouseOver: function onMouseOver(e) {
|
|
116
|
+
var _triggerProps$onMouse, _rest$onMouseOver;
|
|
117
|
+
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
118
|
+
(_rest$onMouseOver = rest.onMouseOver) === null || _rest$onMouseOver === void 0 || _rest$onMouseOver.call(rest, e);
|
|
119
|
+
},
|
|
120
|
+
onMouseOut: function onMouseOut(e) {
|
|
121
|
+
var _triggerProps$onMouse2, _rest$onMouseOut;
|
|
122
|
+
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
123
|
+
(_rest$onMouseOut = rest.onMouseOut) === null || _rest$onMouseOut === void 0 || _rest$onMouseOut.call(rest, e);
|
|
124
|
+
},
|
|
125
|
+
onMouseMove: function onMouseMove(e) {
|
|
126
|
+
var _triggerProps$onMouse3, _rest$onMouseMove;
|
|
127
|
+
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
128
|
+
(_rest$onMouseMove = rest.onMouseMove) === null || _rest$onMouseMove === void 0 || _rest$onMouseMove.call(rest, e);
|
|
129
|
+
},
|
|
130
|
+
onMouseDown: function onMouseDown(e) {
|
|
131
|
+
var _triggerProps$onMouse4, _rest$onMouseDown;
|
|
132
|
+
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
133
|
+
(_rest$onMouseDown = rest.onMouseDown) === null || _rest$onMouseDown === void 0 || _rest$onMouseDown.call(rest, e);
|
|
134
|
+
},
|
|
135
|
+
onFocus: function onFocus(e) {
|
|
136
|
+
var _triggerProps$onFocus, _rest$onFocus;
|
|
137
|
+
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
138
|
+
(_rest$onFocus = rest.onFocus) === null || _rest$onFocus === void 0 || _rest$onFocus.call(rest, e);
|
|
139
|
+
},
|
|
140
|
+
onBlur: function onBlur(e) {
|
|
141
|
+
var _triggerProps$onBlur, _rest$onBlur;
|
|
142
|
+
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
143
|
+
(_rest$onBlur = rest.onBlur) === null || _rest$onBlur === void 0 || _rest$onBlur.call(rest, e);
|
|
144
|
+
}
|
|
145
|
+
// Shared between tooltip and base props
|
|
146
|
+
,
|
|
147
|
+
onClick: function onClick(event, analyticsEvent) {
|
|
148
|
+
var _baseProps$onClick, _triggerProps$onClick;
|
|
149
|
+
baseProps === null || baseProps === void 0 || (_baseProps$onClick = baseProps.onClick) === null || _baseProps$onClick === void 0 || _baseProps$onClick.call(baseProps, event, analyticsEvent);
|
|
150
|
+
triggerProps === null || triggerProps === void 0 || (_triggerProps$onClick = triggerProps.onClick) === null || _triggerProps$onClick === void 0 || _triggerProps$onClick.call(triggerProps, event);
|
|
151
|
+
},
|
|
152
|
+
ref: function ref(_ref2) {
|
|
153
|
+
var _triggerProps$ref;
|
|
154
|
+
baseProps.ref(_ref2);
|
|
155
|
+
triggerProps === null || triggerProps === void 0 || (_triggerProps$ref = triggerProps.ref) === null || _triggerProps$ref === void 0 || _triggerProps$ref.call(triggerProps, _ref2);
|
|
156
|
+
}
|
|
157
|
+
// Base props only
|
|
158
|
+
,
|
|
159
|
+
xcss: baseProps.xcss,
|
|
160
|
+
isDisabled: baseProps.isDisabled,
|
|
161
|
+
onMouseDownCapture: baseProps.onMouseDownCapture,
|
|
162
|
+
onMouseUpCapture: baseProps.onMouseUpCapture,
|
|
163
|
+
onKeyDownCapture: baseProps.onKeyDownCapture,
|
|
164
|
+
onKeyUpCapture: baseProps.onKeyUpCapture,
|
|
165
|
+
onTouchStartCapture: baseProps.onTouchStartCapture,
|
|
166
|
+
onTouchEndCapture: baseProps.onTouchEndCapture,
|
|
167
|
+
onPointerDownCapture: baseProps.onPointerDownCapture,
|
|
168
|
+
onPointerUpCapture: baseProps.onPointerUpCapture,
|
|
169
|
+
onClickCapture: baseProps.onClickCapture
|
|
170
|
+
}), baseProps.children);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
83
173
|
return /*#__PURE__*/_react.default.createElement(_pressable.default, (0, _extends2.default)({}, rest, {
|
|
84
174
|
ref: baseProps.ref,
|
|
85
175
|
xcss: baseProps.xcss,
|
|
@@ -10,36 +10,40 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _anchor = _interopRequireDefault(require("@atlaskit/primitives/anchor"));
|
|
13
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
14
|
var _useIconButton = _interopRequireDefault(require("./use-icon-button"));
|
|
14
|
-
var _excluded = ["analyticsContext", "
|
|
15
|
+
var _excluded = ["aria-label", "analyticsContext", "appearance", "autoFocus", "href", "icon", "interactionName", "isDisabled", "isSelected", "isTooltipDisabled", "label", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "overlay", "shape", "spacing", "testId", "tooltip", "UNSAFE_size"];
|
|
15
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
18
|
var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
autoFocus = _ref.autoFocus,
|
|
19
|
+
var preventedAriaLabel = _ref['aria-label'],
|
|
20
|
+
analyticsContext = _ref.analyticsContext,
|
|
21
21
|
appearance = _ref.appearance,
|
|
22
|
-
|
|
22
|
+
autoFocus = _ref.autoFocus,
|
|
23
|
+
href = _ref.href,
|
|
24
|
+
icon = _ref.icon,
|
|
25
|
+
interactionName = _ref.interactionName,
|
|
23
26
|
isDisabled = _ref.isDisabled,
|
|
24
27
|
isSelected = _ref.isSelected,
|
|
25
|
-
|
|
28
|
+
_ref$isTooltipDisable = _ref.isTooltipDisabled,
|
|
29
|
+
isTooltipDisabled = _ref$isTooltipDisable === void 0 ? true : _ref$isTooltipDisable,
|
|
26
30
|
label = _ref.label,
|
|
27
|
-
overlay = _ref.overlay,
|
|
28
31
|
onClick = _ref.onClick,
|
|
29
|
-
|
|
30
|
-
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
32
|
+
onClickCapture = _ref.onClickCapture,
|
|
31
33
|
onKeyDownCapture = _ref.onKeyDownCapture,
|
|
32
34
|
onKeyUpCapture = _ref.onKeyUpCapture,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
onMouseDownCapture = _ref.onMouseDownCapture,
|
|
36
|
+
onMouseUpCapture = _ref.onMouseUpCapture,
|
|
35
37
|
onPointerDownCapture = _ref.onPointerDownCapture,
|
|
36
38
|
onPointerUpCapture = _ref.onPointerUpCapture,
|
|
37
|
-
|
|
39
|
+
onTouchEndCapture = _ref.onTouchEndCapture,
|
|
40
|
+
onTouchStartCapture = _ref.onTouchStartCapture,
|
|
41
|
+
overlay = _ref.overlay,
|
|
38
42
|
shape = _ref.shape,
|
|
43
|
+
spacing = _ref.spacing,
|
|
39
44
|
testId = _ref.testId,
|
|
45
|
+
tooltip = _ref.tooltip,
|
|
40
46
|
UNSAFE_size = _ref.UNSAFE_size,
|
|
41
|
-
href = _ref.href,
|
|
42
|
-
preventedAriaLabel = _ref['aria-label'],
|
|
43
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
48
|
var baseProps = (0, _useIconButton.default)({
|
|
45
49
|
analyticsContext: analyticsContext,
|
|
@@ -67,6 +71,99 @@ var LinkIconButtonBase = function LinkIconButtonBase(_ref, ref) {
|
|
|
67
71
|
spacing: spacing,
|
|
68
72
|
UNSAFE_size: UNSAFE_size
|
|
69
73
|
});
|
|
74
|
+
if (!isTooltipDisabled) {
|
|
75
|
+
var _tooltip$content;
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
77
|
+
content: (_tooltip$content = tooltip === null || tooltip === void 0 ? void 0 : tooltip.content) !== null && _tooltip$content !== void 0 ? _tooltip$content : label,
|
|
78
|
+
testId: tooltip === null || tooltip === void 0 ? void 0 : tooltip.testId,
|
|
79
|
+
position: tooltip === null || tooltip === void 0 ? void 0 : tooltip.position,
|
|
80
|
+
delay: tooltip === null || tooltip === void 0 ? void 0 : tooltip.delay,
|
|
81
|
+
onShow: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onShow,
|
|
82
|
+
onHide: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onHide,
|
|
83
|
+
mousePosition: tooltip === null || tooltip === void 0 ? void 0 : tooltip.mousePosition,
|
|
84
|
+
analyticsContext: tooltip === null || tooltip === void 0 ? void 0 : tooltip.analyticsContext,
|
|
85
|
+
strategy: tooltip === null || tooltip === void 0 ? void 0 : tooltip.strategy,
|
|
86
|
+
tag: tooltip === null || tooltip === void 0 ? void 0 : tooltip.tag,
|
|
87
|
+
truncate: tooltip === null || tooltip === void 0 ? void 0 : tooltip.truncate,
|
|
88
|
+
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
89
|
+
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
90
|
+
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
91
|
+
}, function (triggerProps) {
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
93
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
94
|
+
, (0, _extends2.default)({}, rest, {
|
|
95
|
+
testId: testId,
|
|
96
|
+
componentName: "LinkIconButton",
|
|
97
|
+
analyticsContext: analyticsContext,
|
|
98
|
+
interactionName: interactionName
|
|
99
|
+
// Shared between tooltip and native props
|
|
100
|
+
,
|
|
101
|
+
onMouseOver: function onMouseOver(e) {
|
|
102
|
+
var _triggerProps$onMouse, _rest$onMouseOver;
|
|
103
|
+
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 || _triggerProps$onMouse.call(triggerProps, e);
|
|
104
|
+
(_rest$onMouseOver = rest.onMouseOver) === null || _rest$onMouseOver === void 0 || _rest$onMouseOver.call(rest, e);
|
|
105
|
+
},
|
|
106
|
+
onMouseOut: function onMouseOut(e) {
|
|
107
|
+
var _triggerProps$onMouse2, _rest$onMouseOut;
|
|
108
|
+
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 || _triggerProps$onMouse2.call(triggerProps, e);
|
|
109
|
+
(_rest$onMouseOut = rest.onMouseOut) === null || _rest$onMouseOut === void 0 || _rest$onMouseOut.call(rest, e);
|
|
110
|
+
},
|
|
111
|
+
onMouseMove: function onMouseMove(e) {
|
|
112
|
+
var _triggerProps$onMouse3, _rest$onMouseMove;
|
|
113
|
+
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 || _triggerProps$onMouse3.call(triggerProps, e);
|
|
114
|
+
(_rest$onMouseMove = rest.onMouseMove) === null || _rest$onMouseMove === void 0 || _rest$onMouseMove.call(rest, e);
|
|
115
|
+
},
|
|
116
|
+
onMouseDown: function onMouseDown(e) {
|
|
117
|
+
var _triggerProps$onMouse4, _rest$onMouseDown;
|
|
118
|
+
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 || _triggerProps$onMouse4.call(triggerProps, e);
|
|
119
|
+
(_rest$onMouseDown = rest.onMouseDown) === null || _rest$onMouseDown === void 0 || _rest$onMouseDown.call(rest, e);
|
|
120
|
+
},
|
|
121
|
+
onFocus: function onFocus(e) {
|
|
122
|
+
var _triggerProps$onFocus, _rest$onFocus;
|
|
123
|
+
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 || _triggerProps$onFocus.call(triggerProps, e);
|
|
124
|
+
(_rest$onFocus = rest.onFocus) === null || _rest$onFocus === void 0 || _rest$onFocus.call(rest, e);
|
|
125
|
+
},
|
|
126
|
+
onBlur: function onBlur(e) {
|
|
127
|
+
var _triggerProps$onBlur, _rest$onBlur;
|
|
128
|
+
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 || _triggerProps$onBlur.call(triggerProps, e);
|
|
129
|
+
(_rest$onBlur = rest.onBlur) === null || _rest$onBlur === void 0 || _rest$onBlur.call(rest, e);
|
|
130
|
+
}
|
|
131
|
+
// Shared between tooltip and base props
|
|
132
|
+
,
|
|
133
|
+
onClick: function onClick(event, analyticsEvent) {
|
|
134
|
+
var _baseProps$onClick, _triggerProps$onClick;
|
|
135
|
+
baseProps === null || baseProps === void 0 || (_baseProps$onClick = baseProps.onClick) === null || _baseProps$onClick === void 0 || _baseProps$onClick.call(baseProps, event, analyticsEvent);
|
|
136
|
+
triggerProps === null || triggerProps === void 0 || (_triggerProps$onClick = triggerProps.onClick) === null || _triggerProps$onClick === void 0 || _triggerProps$onClick.call(triggerProps, event);
|
|
137
|
+
},
|
|
138
|
+
ref: function ref(_ref2) {
|
|
139
|
+
var _triggerProps$ref;
|
|
140
|
+
baseProps.ref(_ref2);
|
|
141
|
+
triggerProps === null || triggerProps === void 0 || (_triggerProps$ref = triggerProps.ref) === null || _triggerProps$ref === void 0 || _triggerProps$ref.call(triggerProps, _ref2);
|
|
142
|
+
}
|
|
143
|
+
// Base props only
|
|
144
|
+
,
|
|
145
|
+
xcss: baseProps.xcss,
|
|
146
|
+
onMouseDownCapture: baseProps.onMouseDownCapture,
|
|
147
|
+
onMouseUpCapture: baseProps.onMouseUpCapture,
|
|
148
|
+
onKeyDownCapture: baseProps.onKeyDownCapture,
|
|
149
|
+
onKeyUpCapture: baseProps.onKeyUpCapture,
|
|
150
|
+
onTouchStartCapture: baseProps.onTouchStartCapture,
|
|
151
|
+
onTouchEndCapture: baseProps.onTouchEndCapture,
|
|
152
|
+
onPointerDownCapture: baseProps.onPointerDownCapture,
|
|
153
|
+
onPointerUpCapture: baseProps.onPointerUpCapture,
|
|
154
|
+
onClickCapture: baseProps.onClickCapture
|
|
155
|
+
/**
|
|
156
|
+
* Disable link in an accessible way using `href`, `role`, and `aria-disabled`.
|
|
157
|
+
* @see https://a11y-guidelines.orange.com/en/articles/disable-elements/#disable-a-link
|
|
158
|
+
*/
|
|
159
|
+
// @ts-expect-error (`href` is required, we could make it optional but don't want to encourage this pattern elsewhere)
|
|
160
|
+
,
|
|
161
|
+
href: baseProps.isDisabled ? undefined : href,
|
|
162
|
+
role: baseProps.isDisabled ? 'link' : undefined,
|
|
163
|
+
"aria-disabled": baseProps.isDisabled === true ? true : undefined
|
|
164
|
+
}), baseProps.children);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
70
167
|
return /*#__PURE__*/_react.default.createElement(_anchor.default
|
|
71
168
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
72
169
|
, (0, _extends2.default)({}, rest, {
|
|
@@ -62,6 +62,7 @@ var useIconButton = function useIconButton(_ref) {
|
|
|
62
62
|
}), /*#__PURE__*/_react.default.createElement(_visuallyHidden.default, null, label)),
|
|
63
63
|
interactionName: interactionName,
|
|
64
64
|
isDisabled: isDisabled,
|
|
65
|
+
isLoading: isLoading,
|
|
65
66
|
isSelected: isSelected,
|
|
66
67
|
isIconButton: true,
|
|
67
68
|
isCircle: isCircle,
|
|
@@ -21,12 +21,9 @@ function getSpinnerAppearance(_ref) {
|
|
|
21
21
|
var appearance = _ref.appearance,
|
|
22
22
|
isDisabled = _ref.isDisabled,
|
|
23
23
|
isSelected = _ref.isSelected;
|
|
24
|
-
if (isDisabled) {
|
|
24
|
+
if (isDisabled || isSelected) {
|
|
25
25
|
return 'inherit';
|
|
26
26
|
}
|
|
27
|
-
if (isSelected) {
|
|
28
|
-
return 'invert';
|
|
29
|
-
}
|
|
30
27
|
if (appearance === 'primary' || appearance === 'danger') {
|
|
31
28
|
return 'invert';
|
|
32
29
|
}
|
|
@@ -49,6 +49,8 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
49
49
|
buttonType = _ref.buttonType,
|
|
50
50
|
_ref$isDisabled = _ref.isDisabled,
|
|
51
51
|
propIsDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
52
|
+
_ref$isLoading = _ref.isLoading,
|
|
53
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
52
54
|
_ref$isSelected = _ref.isSelected,
|
|
53
55
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
54
56
|
_ref$isIconButton = _ref.isIconButton,
|
|
@@ -104,6 +106,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
104
106
|
appearance: appearance,
|
|
105
107
|
spacing: spacing,
|
|
106
108
|
isDisabled: isDisabled,
|
|
109
|
+
isLoading: isLoading,
|
|
107
110
|
isSelected: isSelected,
|
|
108
111
|
isHighlighted: isHighlighted,
|
|
109
112
|
isActiveOverSelected: isActiveOverSelected,
|
|
@@ -117,7 +120,7 @@ var useButtonBase = function useButtonBase(_ref) {
|
|
|
117
120
|
isSplit: isSplitButton,
|
|
118
121
|
isNavigationSplit: isNavigationSplitButton
|
|
119
122
|
});
|
|
120
|
-
}, [appearance, buttonType, spacing, isDisabled, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
123
|
+
}, [appearance, buttonType, spacing, isDisabled, isLoading, isSelected, isHighlighted, isActiveOverSelected, isIconButton, isCircle, shouldFitContainer, overlay, hasIconBefore, hasIconAfter, isSplitButton, isNavigationSplitButton]);
|
|
121
124
|
var isEffectivelyDisabled = isDisabled || Boolean(overlay);
|
|
122
125
|
return _objectSpread({
|
|
123
126
|
ref: setRef,
|
|
@@ -90,6 +90,7 @@ function getXCSS(_ref3) {
|
|
|
90
90
|
spacing = _ref3.spacing,
|
|
91
91
|
isDisabled = _ref3.isDisabled,
|
|
92
92
|
isSelected = _ref3.isSelected,
|
|
93
|
+
isLoading = _ref3.isLoading,
|
|
93
94
|
isHighlighted = _ref3.isHighlighted,
|
|
94
95
|
isActiveOverSelected = _ref3.isActiveOverSelected,
|
|
95
96
|
isIconButton = _ref3.isIconButton,
|
|
@@ -162,8 +163,8 @@ function getXCSS(_ref3) {
|
|
|
162
163
|
width: width,
|
|
163
164
|
// justifyContent required for shouldFitContainer buttons with an icon inside
|
|
164
165
|
justifyContent: 'center'
|
|
165
|
-
}, combinedBaseColorStyles), isDisabled || hasOverlay ? {
|
|
166
|
-
cursor: 'not-allowed'
|
|
166
|
+
}, combinedBaseColorStyles), isDisabled || hasOverlay || isLoading ? {
|
|
167
|
+
cursor: isLoading ? 'progress' : 'not-allowed'
|
|
167
168
|
} : {}), {}, {
|
|
168
169
|
':hover': _objectSpread(_objectSpread({}, getColors({
|
|
169
170
|
appearance: appearance,
|
|
@@ -187,6 +188,11 @@ function getXCSS(_ref3) {
|
|
|
187
188
|
})), {}, {
|
|
188
189
|
// background, box-shadow
|
|
189
190
|
transitionDuration: '0s, 0s'
|
|
190
|
-
})
|
|
191
|
+
}),
|
|
192
|
+
':focus': {
|
|
193
|
+
// Required due to Jira's AUI CSS reset
|
|
194
|
+
// See https://product-fabric.atlassian.net/browse/DSP-15687
|
|
195
|
+
textDecoration: !isSelected && (appearance === 'link' || appearance === 'subtle-link') ? 'underline' : 'none'
|
|
196
|
+
}
|
|
191
197
|
}, splitButtonStyles));
|
|
192
198
|
}
|
|
@@ -117,7 +117,7 @@ var _default = exports.default = /*#__PURE__*/_react.default.forwardRef(function
|
|
|
117
117
|
action: 'clicked',
|
|
118
118
|
componentName: 'button',
|
|
119
119
|
packageName: "@atlaskit/button",
|
|
120
|
-
packageVersion: "17.
|
|
120
|
+
packageVersion: "17.11.0",
|
|
121
121
|
analyticsData: analyticsContext
|
|
122
122
|
});
|
|
123
123
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import UNSAFE_PRESSABLE from '@atlaskit/primitives/pressable';
|
|
4
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
4
5
|
import useIconButton from './use-icon-button';
|
|
5
6
|
/**
|
|
6
7
|
* __Icon Button__
|
|
@@ -12,33 +13,35 @@ import useIconButton from './use-icon-button';
|
|
|
12
13
|
* - [Usage](https://atlassian.design/components/button/usage)
|
|
13
14
|
*/
|
|
14
15
|
const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function Button({
|
|
16
|
+
// Prevent duplicate labels being added.
|
|
17
|
+
'aria-label': preventedAriaLabel,
|
|
15
18
|
analyticsContext,
|
|
16
|
-
interactionName,
|
|
17
|
-
autoFocus,
|
|
18
19
|
appearance,
|
|
19
|
-
|
|
20
|
+
autoFocus,
|
|
21
|
+
icon,
|
|
22
|
+
interactionName,
|
|
20
23
|
isDisabled,
|
|
21
|
-
isSelected,
|
|
22
24
|
isLoading,
|
|
23
|
-
|
|
25
|
+
isSelected,
|
|
26
|
+
isTooltipDisabled = true,
|
|
24
27
|
label,
|
|
25
|
-
overlay,
|
|
26
28
|
onClick,
|
|
27
|
-
|
|
28
|
-
onMouseUpCapture,
|
|
29
|
+
onClickCapture,
|
|
29
30
|
onKeyDownCapture,
|
|
30
31
|
onKeyUpCapture,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
onMouseDownCapture,
|
|
33
|
+
onMouseUpCapture,
|
|
33
34
|
onPointerDownCapture,
|
|
34
35
|
onPointerUpCapture,
|
|
35
|
-
|
|
36
|
+
onTouchEndCapture,
|
|
37
|
+
onTouchStartCapture,
|
|
38
|
+
overlay,
|
|
36
39
|
shape,
|
|
37
|
-
|
|
40
|
+
spacing,
|
|
38
41
|
testId,
|
|
42
|
+
tooltip,
|
|
43
|
+
type = 'button',
|
|
39
44
|
UNSAFE_size,
|
|
40
|
-
// Prevent duplicate labels being added.
|
|
41
|
-
'aria-label': preventedAriaLabel,
|
|
42
45
|
...rest
|
|
43
46
|
}, ref) {
|
|
44
47
|
/**
|
|
@@ -72,6 +75,90 @@ const IconButton = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(functi
|
|
|
72
75
|
spacing,
|
|
73
76
|
UNSAFE_size
|
|
74
77
|
});
|
|
78
|
+
if (!isTooltipDisabled) {
|
|
79
|
+
var _tooltip$content;
|
|
80
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
81
|
+
content: (_tooltip$content = tooltip === null || tooltip === void 0 ? void 0 : tooltip.content) !== null && _tooltip$content !== void 0 ? _tooltip$content : label,
|
|
82
|
+
testId: tooltip === null || tooltip === void 0 ? void 0 : tooltip.testId,
|
|
83
|
+
position: tooltip === null || tooltip === void 0 ? void 0 : tooltip.position,
|
|
84
|
+
delay: tooltip === null || tooltip === void 0 ? void 0 : tooltip.delay,
|
|
85
|
+
onShow: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onShow,
|
|
86
|
+
onHide: tooltip === null || tooltip === void 0 ? void 0 : tooltip.onHide,
|
|
87
|
+
mousePosition: tooltip === null || tooltip === void 0 ? void 0 : tooltip.mousePosition,
|
|
88
|
+
analyticsContext: tooltip === null || tooltip === void 0 ? void 0 : tooltip.analyticsContext,
|
|
89
|
+
strategy: tooltip === null || tooltip === void 0 ? void 0 : tooltip.strategy,
|
|
90
|
+
tag: tooltip === null || tooltip === void 0 ? void 0 : tooltip.tag,
|
|
91
|
+
truncate: tooltip === null || tooltip === void 0 ? void 0 : tooltip.truncate,
|
|
92
|
+
component: tooltip === null || tooltip === void 0 ? void 0 : tooltip.component,
|
|
93
|
+
hideTooltipOnClick: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnClick,
|
|
94
|
+
hideTooltipOnMouseDown: tooltip === null || tooltip === void 0 ? void 0 : tooltip.hideTooltipOnMouseDown
|
|
95
|
+
}, triggerProps => /*#__PURE__*/React.createElement(UNSAFE_PRESSABLE
|
|
96
|
+
// Top level props
|
|
97
|
+
, _extends({}, rest, {
|
|
98
|
+
type: type,
|
|
99
|
+
testId: testId,
|
|
100
|
+
componentName: "IconButton",
|
|
101
|
+
analyticsContext: analyticsContext,
|
|
102
|
+
interactionName: interactionName
|
|
103
|
+
// Shared between tooltip and native props
|
|
104
|
+
,
|
|
105
|
+
onMouseOver: e => {
|
|
106
|
+
var _triggerProps$onMouse, _rest$onMouseOver;
|
|
107
|
+
(_triggerProps$onMouse = triggerProps.onMouseOver) === null || _triggerProps$onMouse === void 0 ? void 0 : _triggerProps$onMouse.call(triggerProps, e);
|
|
108
|
+
(_rest$onMouseOver = rest.onMouseOver) === null || _rest$onMouseOver === void 0 ? void 0 : _rest$onMouseOver.call(rest, e);
|
|
109
|
+
},
|
|
110
|
+
onMouseOut: e => {
|
|
111
|
+
var _triggerProps$onMouse2, _rest$onMouseOut;
|
|
112
|
+
(_triggerProps$onMouse2 = triggerProps.onMouseOut) === null || _triggerProps$onMouse2 === void 0 ? void 0 : _triggerProps$onMouse2.call(triggerProps, e);
|
|
113
|
+
(_rest$onMouseOut = rest.onMouseOut) === null || _rest$onMouseOut === void 0 ? void 0 : _rest$onMouseOut.call(rest, e);
|
|
114
|
+
},
|
|
115
|
+
onMouseMove: e => {
|
|
116
|
+
var _triggerProps$onMouse3, _rest$onMouseMove;
|
|
117
|
+
(_triggerProps$onMouse3 = triggerProps.onMouseMove) === null || _triggerProps$onMouse3 === void 0 ? void 0 : _triggerProps$onMouse3.call(triggerProps, e);
|
|
118
|
+
(_rest$onMouseMove = rest.onMouseMove) === null || _rest$onMouseMove === void 0 ? void 0 : _rest$onMouseMove.call(rest, e);
|
|
119
|
+
},
|
|
120
|
+
onMouseDown: e => {
|
|
121
|
+
var _triggerProps$onMouse4, _rest$onMouseDown;
|
|
122
|
+
(_triggerProps$onMouse4 = triggerProps.onMouseDown) === null || _triggerProps$onMouse4 === void 0 ? void 0 : _triggerProps$onMouse4.call(triggerProps, e);
|
|
123
|
+
(_rest$onMouseDown = rest.onMouseDown) === null || _rest$onMouseDown === void 0 ? void 0 : _rest$onMouseDown.call(rest, e);
|
|
124
|
+
},
|
|
125
|
+
onFocus: e => {
|
|
126
|
+
var _triggerProps$onFocus, _rest$onFocus;
|
|
127
|
+
(_triggerProps$onFocus = triggerProps.onFocus) === null || _triggerProps$onFocus === void 0 ? void 0 : _triggerProps$onFocus.call(triggerProps, e);
|
|
128
|
+
(_rest$onFocus = rest.onFocus) === null || _rest$onFocus === void 0 ? void 0 : _rest$onFocus.call(rest, e);
|
|
129
|
+
},
|
|
130
|
+
onBlur: e => {
|
|
131
|
+
var _triggerProps$onBlur, _rest$onBlur;
|
|
132
|
+
(_triggerProps$onBlur = triggerProps.onBlur) === null || _triggerProps$onBlur === void 0 ? void 0 : _triggerProps$onBlur.call(triggerProps, e);
|
|
133
|
+
(_rest$onBlur = rest.onBlur) === null || _rest$onBlur === void 0 ? void 0 : _rest$onBlur.call(rest, e);
|
|
134
|
+
}
|
|
135
|
+
// Shared between tooltip and base props
|
|
136
|
+
,
|
|
137
|
+
onClick: (event, analyticsEvent) => {
|
|
138
|
+
var _baseProps$onClick, _triggerProps$onClick;
|
|
139
|
+
baseProps === null || baseProps === void 0 ? void 0 : (_baseProps$onClick = baseProps.onClick) === null || _baseProps$onClick === void 0 ? void 0 : _baseProps$onClick.call(baseProps, event, analyticsEvent);
|
|
140
|
+
triggerProps === null || triggerProps === void 0 ? void 0 : (_triggerProps$onClick = triggerProps.onClick) === null || _triggerProps$onClick === void 0 ? void 0 : _triggerProps$onClick.call(triggerProps, event);
|
|
141
|
+
},
|
|
142
|
+
ref: ref => {
|
|
143
|
+
var _triggerProps$ref;
|
|
144
|
+
baseProps.ref(ref);
|
|
145
|
+
triggerProps === null || triggerProps === void 0 ? void 0 : (_triggerProps$ref = triggerProps.ref) === null || _triggerProps$ref === void 0 ? void 0 : _triggerProps$ref.call(triggerProps, ref);
|
|
146
|
+
}
|
|
147
|
+
// Base props only
|
|
148
|
+
,
|
|
149
|
+
xcss: baseProps.xcss,
|
|
150
|
+
isDisabled: baseProps.isDisabled,
|
|
151
|
+
onMouseDownCapture: baseProps.onMouseDownCapture,
|
|
152
|
+
onMouseUpCapture: baseProps.onMouseUpCapture,
|
|
153
|
+
onKeyDownCapture: baseProps.onKeyDownCapture,
|
|
154
|
+
onKeyUpCapture: baseProps.onKeyUpCapture,
|
|
155
|
+
onTouchStartCapture: baseProps.onTouchStartCapture,
|
|
156
|
+
onTouchEndCapture: baseProps.onTouchEndCapture,
|
|
157
|
+
onPointerDownCapture: baseProps.onPointerDownCapture,
|
|
158
|
+
onPointerUpCapture: baseProps.onPointerUpCapture,
|
|
159
|
+
onClickCapture: baseProps.onClickCapture
|
|
160
|
+
}), baseProps.children));
|
|
161
|
+
}
|
|
75
162
|
return /*#__PURE__*/React.createElement(UNSAFE_PRESSABLE, _extends({}, rest, {
|
|
76
163
|
ref: baseProps.ref,
|
|
77
164
|
xcss: baseProps.xcss,
|