@atlaskit/share 4.8.0 → 4.10.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 +12 -0
- package/dist/cjs/components/CopyLinkButton.js +1 -0
- package/dist/cjs/components/ShareButton.js +1 -1
- package/dist/cjs/components/ShareDialogWithTrigger.js +4 -4
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/CopyLinkButton.js +1 -0
- package/dist/es2019/components/ShareButton.js +1 -1
- package/dist/es2019/components/ShareDialogWithTrigger.js +4 -4
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/CopyLinkButton.js +1 -0
- package/dist/esm/components/ShareButton.js +1 -1
- package/dist/esm/components/ShareDialogWithTrigger.js +4 -4
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/ShareHeader.d.ts +1 -1
- package/dist/types-ts4.5/components/ShareHeader.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 4.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#67129](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67129) [`ecdf504e06ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ecdf504e06ab) - Removed aria-expanded from share button, added aria-haspopup='dialog' to share button
|
|
8
|
+
|
|
9
|
+
## 4.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#65564](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65564) [`a6abbb0d08f5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a6abbb0d08f5) - Set autoFoucus to false for CopyLinkButton status message
|
|
14
|
+
|
|
3
15
|
## 4.8.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -133,6 +133,7 @@ var CopyLinkButton = exports.CopyLinkButton = /*#__PURE__*/function (_React$Comp
|
|
|
133
133
|
text: this.props.link
|
|
134
134
|
}), (0, _react2.jsx)(_popup.default, {
|
|
135
135
|
zIndex: Z_INDEX,
|
|
136
|
+
autoFocus: false,
|
|
136
137
|
content: function content() {
|
|
137
138
|
return (0, _react2.jsx)(_styled.InlineDialogContentWrapper, null, (0, _react2.jsx)("div", {
|
|
138
139
|
css: messageContainerStyle,
|
|
@@ -18,7 +18,7 @@ function ShareButton(_ref, ref) {
|
|
|
18
18
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_customThemeButton.default, (0, _extends2.default)({
|
|
20
20
|
ref: ref,
|
|
21
|
-
"aria-
|
|
21
|
+
"aria-haspopup": "dialog"
|
|
22
22
|
}, props), text);
|
|
23
23
|
});
|
|
24
24
|
ShareButton.displayName = 'ShareButton';
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.defaultShareContentState = exports.ShareDialogWithTriggerInternal = exports.ShareDialogWithTrigger = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -360,7 +359,7 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
360
359
|
onClick: _this.onTriggerClick
|
|
361
360
|
}, triggerProps);
|
|
362
361
|
} else {
|
|
363
|
-
button = (0, _react2.jsx)(_ShareButton.default,
|
|
362
|
+
button = (0, _react2.jsx)(_ShareButton.default, {
|
|
364
363
|
appearance: triggerButtonAppearance,
|
|
365
364
|
text: triggerButtonStyle !== 'icon-only' ? (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _i18n.messages.shareTriggerButtonText) : null,
|
|
366
365
|
"aria-label": formatMessage(_i18n.messages.shareTriggerButtonText),
|
|
@@ -369,8 +368,9 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
|
|
|
369
368
|
label: ""
|
|
370
369
|
}) : undefined,
|
|
371
370
|
isSelected: isDialogOpen,
|
|
372
|
-
isDisabled: isDisabled
|
|
373
|
-
|
|
371
|
+
isDisabled: isDisabled,
|
|
372
|
+
ref: triggerProps.ref
|
|
373
|
+
});
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
// If the button only shows the icon, wrap it in a tooltip containing the button text.
|
|
@@ -13,7 +13,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
13
13
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14
14
|
return _objectSpread({
|
|
15
15
|
packageName: "@atlaskit/share",
|
|
16
|
-
packageVersion: "4.
|
|
16
|
+
packageVersion: "4.10.0"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -112,6 +112,7 @@ export class CopyLinkButton extends React.Component {
|
|
|
112
112
|
text: this.props.link
|
|
113
113
|
}), jsx(Popup, {
|
|
114
114
|
zIndex: Z_INDEX,
|
|
115
|
+
autoFocus: false,
|
|
115
116
|
content: () => jsx(InlineDialogContentWrapper, null, jsx("div", {
|
|
116
117
|
css: messageContainerStyle,
|
|
117
118
|
"data-testid": "message-container"
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
/** @jsx jsx */
|
|
4
3
|
import React from 'react';
|
|
@@ -341,7 +340,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
341
340
|
onClick: this.onTriggerClick
|
|
342
341
|
}, triggerProps);
|
|
343
342
|
} else {
|
|
344
|
-
button = jsx(ShareButton,
|
|
343
|
+
button = jsx(ShareButton, {
|
|
345
344
|
appearance: triggerButtonAppearance,
|
|
346
345
|
text: triggerButtonStyle !== 'icon-only' ? jsx(FormattedMessage, messages.shareTriggerButtonText) : null,
|
|
347
346
|
"aria-label": formatMessage(messages.shareTriggerButtonText),
|
|
@@ -350,8 +349,9 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
|
|
|
350
349
|
label: ""
|
|
351
350
|
}) : undefined,
|
|
352
351
|
isSelected: isDialogOpen,
|
|
353
|
-
isDisabled: isDisabled
|
|
354
|
-
|
|
352
|
+
isDisabled: isDisabled,
|
|
353
|
+
ref: triggerProps.ref
|
|
354
|
+
});
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
// If the button only shows the icon, wrap it in a tooltip containing the button text.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
2
|
const buildAttributes = (attributes = {}) => ({
|
|
3
3
|
packageName: "@atlaskit/share",
|
|
4
|
-
packageVersion: "4.
|
|
4
|
+
packageVersion: "4.10.0",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -126,6 +126,7 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
|
|
|
126
126
|
text: this.props.link
|
|
127
127
|
}), jsx(Popup, {
|
|
128
128
|
zIndex: Z_INDEX,
|
|
129
|
+
autoFocus: false,
|
|
129
130
|
content: function content() {
|
|
130
131
|
return jsx(InlineDialogContentWrapper, null, jsx("div", {
|
|
131
132
|
css: messageContainerStyle,
|
|
@@ -11,7 +11,7 @@ function ShareButton(_ref, ref) {
|
|
|
11
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
12
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
13
13
|
ref: ref,
|
|
14
|
-
"aria-
|
|
14
|
+
"aria-haspopup": "dialog"
|
|
15
15
|
}, props), text);
|
|
16
16
|
});
|
|
17
17
|
ShareButton.displayName = 'ShareButton';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
@@ -356,7 +355,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
356
355
|
onClick: _this.onTriggerClick
|
|
357
356
|
}, triggerProps);
|
|
358
357
|
} else {
|
|
359
|
-
button = jsx(ShareButton,
|
|
358
|
+
button = jsx(ShareButton, {
|
|
360
359
|
appearance: triggerButtonAppearance,
|
|
361
360
|
text: triggerButtonStyle !== 'icon-only' ? jsx(FormattedMessage, messages.shareTriggerButtonText) : null,
|
|
362
361
|
"aria-label": formatMessage(messages.shareTriggerButtonText),
|
|
@@ -365,8 +364,9 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
|
|
|
365
364
|
label: ""
|
|
366
365
|
}) : undefined,
|
|
367
366
|
isSelected: isDialogOpen,
|
|
368
|
-
isDisabled: isDisabled
|
|
369
|
-
|
|
367
|
+
isDisabled: isDisabled,
|
|
368
|
+
ref: triggerProps.ref
|
|
369
|
+
});
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
// If the button only shows the icon, wrap it in a tooltip containing the button text.
|
|
@@ -6,7 +6,7 @@ var buildAttributes = function buildAttributes() {
|
|
|
6
6
|
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
7
|
return _objectSpread({
|
|
8
8
|
packageName: "@atlaskit/share",
|
|
9
|
-
packageVersion: "4.
|
|
9
|
+
packageVersion: "4.10.0"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -5,4 +5,4 @@ export type Props = {
|
|
|
5
5
|
title?: React.ReactNode;
|
|
6
6
|
};
|
|
7
7
|
export declare const getFormHeaderTitleStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const ShareHeader: React.
|
|
8
|
+
export declare const ShareHeader: React.FunctionComponent<Props>;
|
|
@@ -5,4 +5,4 @@ export type Props = {
|
|
|
5
5
|
title?: React.ReactNode;
|
|
6
6
|
};
|
|
7
7
|
export declare const getFormHeaderTitleStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
8
|
-
export declare const ShareHeader: React.
|
|
8
|
+
export declare const ShareHeader: React.FunctionComponent<Props>;
|