@atlaskit/share 4.16.5 → 4.16.6
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 +6 -0
- package/dist/cjs/components/ShareForm.js +40 -12
- package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +7 -1
- package/dist/cjs/components/ShareFormWrapper/styled.js +4 -2
- package/dist/cjs/components/ShareHeader.js +16 -4
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/ShareForm.js +37 -40
- package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +12 -3
- package/dist/es2019/components/ShareFormWrapper/styled.js +4 -2
- package/dist/es2019/components/ShareHeader.js +14 -16
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/ShareForm.js +39 -10
- package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +7 -1
- package/dist/esm/components/ShareFormWrapper/styled.js +4 -2
- package/dist/esm/components/ShareHeader.js +15 -4
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/dist/types/components/ShareFormWrapper/styled.d.ts +3 -1
- package/dist/types-ts4.5/components/ShareFormWrapper/styled.d.ts +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 4.16.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#88791](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88791) [`f0006aeb4509`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f0006aeb4509) - PTC-8940 Add aria-label for InlineDialogContentWrapper
|
|
8
|
+
|
|
3
9
|
## 4.16.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
14
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
17
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
18
17
|
var _react = _interopRequireDefault(require("react"));
|
|
19
18
|
var _react2 = require("@emotion/react");
|
|
20
19
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -34,22 +33,51 @@ var _CopyLinkButton = _interopRequireDefault(require("./CopyLinkButton"));
|
|
|
34
33
|
var _IntegrationForm = require("./IntegrationForm");
|
|
35
34
|
var _ShareHeader = require("./ShareHeader");
|
|
36
35
|
var _UserPickerField = require("./UserPickerField");
|
|
37
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
38
|
-
/** @jsx jsx */
|
|
39
36
|
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); }
|
|
40
37
|
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; }
|
|
41
38
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
39
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
43
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
44
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
45
|
-
var submitButtonWrapperStyles = (0, _react2.css)(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
42
|
+
var submitButtonWrapperStyles = (0, _react2.css)({
|
|
43
|
+
display: 'flex',
|
|
44
|
+
marginLeft: 'auto'
|
|
45
|
+
});
|
|
46
|
+
var centerAlignedIconWrapperStyles = (0, _react2.css)({
|
|
47
|
+
display: 'flex',
|
|
48
|
+
alignSelf: 'center',
|
|
49
|
+
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-150, 12px)"),
|
|
50
|
+
'> div': {
|
|
51
|
+
lineHeight: 1
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
var formWrapperStyles = exports.formWrapperStyles = (0, _react2.css)({
|
|
55
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
56
|
+
width: '100%',
|
|
57
|
+
'#ghx-modes-tools #ghx-share & h1:first-child': {
|
|
58
|
+
marginTop: 0
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var formFooterStyles = exports.formFooterStyles = (0, _react2.css)({
|
|
62
|
+
display: 'flex',
|
|
63
|
+
justifyContent: 'flex-start'
|
|
64
|
+
});
|
|
65
|
+
var formFieldStyles = (0, _react2.css)({
|
|
66
|
+
marginBottom: "var(--ds-space-150, 12px)"
|
|
67
|
+
});
|
|
68
|
+
var integrationWrapperStyles = (0, _react2.css)({
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center'
|
|
71
|
+
});
|
|
72
|
+
var integrationIconWrapperStyles = (0, _react2.css)({
|
|
73
|
+
marginBottom: "var(--ds-space-negative-075, -6px)",
|
|
74
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
75
|
+
});
|
|
76
|
+
var requiredFieldInfoStyles = (0, _react2.css)({
|
|
77
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
78
|
+
color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
|
|
79
|
+
fontSize: "".concat((0, _constants.fontSizeSmall)(), "px")
|
|
80
|
+
});
|
|
53
81
|
var integrationTabText = function integrationTabText(integrationName) {
|
|
54
82
|
return (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _i18n.messages.shareInIntegrationButtonText, {
|
|
55
83
|
values: {
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactIntlNext = require("react-intl-next");
|
|
10
|
+
var _i18n = require("../../i18n");
|
|
9
11
|
var _ShareHeader = require("../ShareHeader");
|
|
10
12
|
var _styled = require("./styled");
|
|
11
13
|
var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
@@ -15,7 +17,11 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
15
17
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
16
18
|
_ref$footer = _ref.footer,
|
|
17
19
|
footer = _ref$footer === void 0 ? null : _ref$footer;
|
|
18
|
-
|
|
20
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
21
|
+
formatMessage = _useIntl.formatMessage;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_styled.InlineDialogContentWrapper, {
|
|
23
|
+
label: formatMessage(_i18n.messages.formTitle)
|
|
24
|
+
}, /*#__PURE__*/_react.default.createElement(_styled.InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
|
|
19
25
|
title: shareFormTitle
|
|
20
26
|
}), children), footer);
|
|
21
27
|
};
|
|
@@ -23,10 +23,12 @@ var InlineDialogFormWrapper = exports.InlineDialogFormWrapper = function InlineD
|
|
|
23
23
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
24
24
|
*/
|
|
25
25
|
var InlineDialogContentWrapper = exports.InlineDialogContentWrapper = function InlineDialogContentWrapper(_ref2) {
|
|
26
|
-
var children = _ref2.children
|
|
26
|
+
var children = _ref2.children,
|
|
27
|
+
label = _ref2.label;
|
|
27
28
|
return (0, _react.jsx)("div", {
|
|
28
29
|
css: {
|
|
29
30
|
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)")
|
|
30
|
-
}
|
|
31
|
+
},
|
|
32
|
+
"aria-label": label
|
|
31
33
|
}, children);
|
|
32
34
|
};
|
|
@@ -5,17 +5,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.getFormHeaderTitleStyles = exports.ShareHeader = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _react2 = require("@emotion/react");
|
|
11
10
|
var _reactIntlNext = require("react-intl-next");
|
|
12
11
|
var _typography = require("@atlaskit/theme/typography");
|
|
13
12
|
var _i18n = require("../i18n");
|
|
14
|
-
var _templateObject, _templateObject2;
|
|
15
13
|
/** @jsx jsx */
|
|
16
|
-
|
|
14
|
+
|
|
15
|
+
var headerWrapperStyles = (0, _react2.css)({
|
|
16
|
+
display: 'flex',
|
|
17
|
+
justifyContent: 'space-between'
|
|
18
|
+
});
|
|
17
19
|
var getFormHeaderTitleStyles = exports.getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
|
|
18
|
-
return (0, _react2.css)(
|
|
20
|
+
return (0, _react2.css)((0, _typography.h500)(theme), {
|
|
21
|
+
lineHeight: "var(--ds-space-400, 32px)",
|
|
22
|
+
marginRight: "var(--ds-space-400, 32px)",
|
|
23
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textOverflow: 'ellipsis',
|
|
26
|
+
whiteSpace: 'nowrap',
|
|
27
|
+
'> span': {
|
|
28
|
+
fontSize: 'initial'
|
|
29
|
+
}
|
|
30
|
+
});
|
|
19
31
|
};
|
|
20
32
|
var ShareHeader = exports.ShareHeader = function ShareHeader(_ref) {
|
|
21
33
|
var title = _ref.title;
|
|
@@ -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.
|
|
16
|
+
packageVersion: "4.16.6"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -20,48 +20,45 @@ import CopyLinkButton from './CopyLinkButton';
|
|
|
20
20
|
import { IntegrationForm } from './IntegrationForm';
|
|
21
21
|
import { ShareHeader } from './ShareHeader';
|
|
22
22
|
import { UserPickerField } from './UserPickerField';
|
|
23
|
-
const submitButtonWrapperStyles = css
|
|
24
|
-
display: flex
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const centerAlignedIconWrapperStyles = css
|
|
28
|
-
display: flex
|
|
29
|
-
|
|
30
|
-
padding:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
line-height: 1;
|
|
23
|
+
const submitButtonWrapperStyles = css({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
marginLeft: 'auto'
|
|
26
|
+
});
|
|
27
|
+
const centerAlignedIconWrapperStyles = css({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
alignSelf: 'center',
|
|
30
|
+
padding: `${"var(--ds-space-0, 0px)"} ${"var(--ds-space-150, 12px)"}`,
|
|
31
|
+
'> div': {
|
|
32
|
+
lineHeight: 1
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
export const formWrapperStyles = css
|
|
37
|
-
|
|
38
|
-
width: 100
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
#ghx-modes-tools #ghx-share & h1:first-child {
|
|
42
|
-
margin-top: 0;
|
|
34
|
+
});
|
|
35
|
+
export const formWrapperStyles = css({
|
|
36
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
37
|
+
width: '100%',
|
|
38
|
+
'#ghx-modes-tools #ghx-share & h1:first-child': {
|
|
39
|
+
marginTop: 0
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
export const formFooterStyles = css
|
|
46
|
-
display: flex
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const formFieldStyles = css
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const integrationWrapperStyles = css
|
|
53
|
-
display: flex
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const integrationIconWrapperStyles = css
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const requiredFieldInfoStyles = css
|
|
61
|
-
|
|
62
|
-
color:
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
});
|
|
42
|
+
export const formFooterStyles = css({
|
|
43
|
+
display: 'flex',
|
|
44
|
+
justifyContent: 'flex-start'
|
|
45
|
+
});
|
|
46
|
+
const formFieldStyles = css({
|
|
47
|
+
marginBottom: "var(--ds-space-150, 12px)"
|
|
48
|
+
});
|
|
49
|
+
const integrationWrapperStyles = css({
|
|
50
|
+
display: 'flex',
|
|
51
|
+
alignItems: 'center'
|
|
52
|
+
});
|
|
53
|
+
const integrationIconWrapperStyles = css({
|
|
54
|
+
marginBottom: "var(--ds-space-negative-075, -6px)",
|
|
55
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
56
|
+
});
|
|
57
|
+
const requiredFieldInfoStyles = css({
|
|
58
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
59
|
+
color: `var(--ds-text-subtle, ${N300})`,
|
|
60
|
+
fontSize: `${fontSizeSmall()}px`
|
|
61
|
+
});
|
|
65
62
|
const integrationTabText = integrationName => jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
|
|
66
63
|
values: {
|
|
67
64
|
integrationName
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { messages } from '../../i18n';
|
|
2
4
|
import { ShareHeader } from '../ShareHeader';
|
|
3
5
|
import { InlineDialogContentWrapper, InlineDialogFormWrapper } from './styled';
|
|
4
6
|
const ShareFormWrapper = ({
|
|
@@ -6,7 +8,14 @@ const ShareFormWrapper = ({
|
|
|
6
8
|
shouldShowTitle,
|
|
7
9
|
children = null,
|
|
8
10
|
footer = null
|
|
9
|
-
}) =>
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
}) => {
|
|
12
|
+
const {
|
|
13
|
+
formatMessage
|
|
14
|
+
} = useIntl();
|
|
15
|
+
return /*#__PURE__*/React.createElement(InlineDialogContentWrapper, {
|
|
16
|
+
label: formatMessage(messages.formTitle)
|
|
17
|
+
}, /*#__PURE__*/React.createElement(InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
18
|
+
title: shareFormTitle
|
|
19
|
+
}), children), footer);
|
|
20
|
+
};
|
|
12
21
|
export default ShareFormWrapper;
|
|
@@ -16,9 +16,11 @@ export const InlineDialogFormWrapper = ({
|
|
|
16
16
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
17
17
|
*/
|
|
18
18
|
export const InlineDialogContentWrapper = ({
|
|
19
|
-
children
|
|
19
|
+
children,
|
|
20
|
+
label
|
|
20
21
|
}) => jsx("div", {
|
|
21
22
|
css: {
|
|
22
23
|
padding: `${"var(--ds-space-200, 16px)"} ${"var(--ds-space-300, 24px)"}`
|
|
23
|
-
}
|
|
24
|
+
},
|
|
25
|
+
"aria-label": label
|
|
24
26
|
}, children);
|
|
@@ -4,23 +4,21 @@ import { css, jsx, useTheme } from '@emotion/react';
|
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
5
|
import { h500 } from '@atlaskit/theme/typography';
|
|
6
6
|
import { messages } from '../i18n';
|
|
7
|
-
const headerWrapperStyles = css
|
|
8
|
-
display: flex
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const getFormHeaderTitleStyles = theme => css
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
> span {
|
|
21
|
-
font-size: initial;
|
|
7
|
+
const headerWrapperStyles = css({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
justifyContent: 'space-between'
|
|
10
|
+
});
|
|
11
|
+
export const getFormHeaderTitleStyles = theme => css(h500(theme), {
|
|
12
|
+
lineHeight: "var(--ds-space-400, 32px)",
|
|
13
|
+
marginRight: "var(--ds-space-400, 32px)",
|
|
14
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
15
|
+
overflow: 'hidden',
|
|
16
|
+
textOverflow: 'ellipsis',
|
|
17
|
+
whiteSpace: 'nowrap',
|
|
18
|
+
'> span': {
|
|
19
|
+
fontSize: 'initial'
|
|
22
20
|
}
|
|
23
|
-
|
|
21
|
+
});
|
|
24
22
|
export const ShareHeader = ({
|
|
25
23
|
title
|
|
26
24
|
}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isEmail, isExternalUser, isTeam, isUser } from '@atlaskit/smart-user-picker';
|
|
2
2
|
const buildAttributes = (attributes = {}) => ({
|
|
3
3
|
packageName: "@atlaskit/share",
|
|
4
|
-
packageVersion: "4.16.
|
|
4
|
+
packageVersion: "4.16.6",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -6,8 +6,6 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
import _extends from "@babel/runtime/helpers/extends";
|
|
9
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
11
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -32,14 +30,45 @@ import CopyLinkButton from './CopyLinkButton';
|
|
|
32
30
|
import { IntegrationForm } from './IntegrationForm';
|
|
33
31
|
import { ShareHeader } from './ShareHeader';
|
|
34
32
|
import { UserPickerField } from './UserPickerField';
|
|
35
|
-
var submitButtonWrapperStyles = css(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
var submitButtonWrapperStyles = css({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
marginLeft: 'auto'
|
|
36
|
+
});
|
|
37
|
+
var centerAlignedIconWrapperStyles = css({
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignSelf: 'center',
|
|
40
|
+
padding: "var(--ds-space-0, 0px)".concat(" ", "var(--ds-space-150, 12px)"),
|
|
41
|
+
'> div': {
|
|
42
|
+
lineHeight: 1
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export var formWrapperStyles = css({
|
|
46
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
47
|
+
width: '100%',
|
|
48
|
+
'#ghx-modes-tools #ghx-share & h1:first-child': {
|
|
49
|
+
marginTop: 0
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export var formFooterStyles = css({
|
|
53
|
+
display: 'flex',
|
|
54
|
+
justifyContent: 'flex-start'
|
|
55
|
+
});
|
|
56
|
+
var formFieldStyles = css({
|
|
57
|
+
marginBottom: "var(--ds-space-150, 12px)"
|
|
58
|
+
});
|
|
59
|
+
var integrationWrapperStyles = css({
|
|
60
|
+
display: 'flex',
|
|
61
|
+
alignItems: 'center'
|
|
62
|
+
});
|
|
63
|
+
var integrationIconWrapperStyles = css({
|
|
64
|
+
marginBottom: "var(--ds-space-negative-075, -6px)",
|
|
65
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
66
|
+
});
|
|
67
|
+
var requiredFieldInfoStyles = css({
|
|
68
|
+
marginBottom: "var(--ds-space-200, 16px)",
|
|
69
|
+
color: "var(--ds-text-subtle, ".concat(N300, ")"),
|
|
70
|
+
fontSize: "".concat(fontSizeSmall(), "px")
|
|
71
|
+
});
|
|
43
72
|
var integrationTabText = function integrationTabText(integrationName) {
|
|
44
73
|
return jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
|
|
45
74
|
values: {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { messages } from '../../i18n';
|
|
2
4
|
import { ShareHeader } from '../ShareHeader';
|
|
3
5
|
import { InlineDialogContentWrapper, InlineDialogFormWrapper } from './styled';
|
|
4
6
|
var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
@@ -8,7 +10,11 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
|
|
|
8
10
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
9
11
|
_ref$footer = _ref.footer,
|
|
10
12
|
footer = _ref$footer === void 0 ? null : _ref$footer;
|
|
11
|
-
|
|
13
|
+
var _useIntl = useIntl(),
|
|
14
|
+
formatMessage = _useIntl.formatMessage;
|
|
15
|
+
return /*#__PURE__*/React.createElement(InlineDialogContentWrapper, {
|
|
16
|
+
label: formatMessage(messages.formTitle)
|
|
17
|
+
}, /*#__PURE__*/React.createElement(InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
|
|
12
18
|
title: shareFormTitle
|
|
13
19
|
}), children), footer);
|
|
14
20
|
};
|
|
@@ -17,10 +17,12 @@ export var InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref) {
|
|
|
17
17
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
18
18
|
*/
|
|
19
19
|
export var InlineDialogContentWrapper = function InlineDialogContentWrapper(_ref2) {
|
|
20
|
-
var children = _ref2.children
|
|
20
|
+
var children = _ref2.children,
|
|
21
|
+
label = _ref2.label;
|
|
21
22
|
return jsx("div", {
|
|
22
23
|
css: {
|
|
23
24
|
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-300, 24px)")
|
|
24
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"aria-label": label
|
|
25
27
|
}, children);
|
|
26
28
|
};
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { css, jsx, useTheme } from '@emotion/react';
|
|
6
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
5
|
import { h500 } from '@atlaskit/theme/typography';
|
|
8
6
|
import { messages } from '../i18n';
|
|
9
|
-
var headerWrapperStyles = css(
|
|
7
|
+
var headerWrapperStyles = css({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
justifyContent: 'space-between'
|
|
10
|
+
});
|
|
10
11
|
export var getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
|
|
11
|
-
return css(
|
|
12
|
+
return css(h500(theme), {
|
|
13
|
+
lineHeight: "var(--ds-space-400, 32px)",
|
|
14
|
+
marginRight: "var(--ds-space-400, 32px)",
|
|
15
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
16
|
+
overflow: 'hidden',
|
|
17
|
+
textOverflow: 'ellipsis',
|
|
18
|
+
whiteSpace: 'nowrap',
|
|
19
|
+
'> span': {
|
|
20
|
+
fontSize: 'initial'
|
|
21
|
+
}
|
|
22
|
+
});
|
|
12
23
|
};
|
|
13
24
|
export var ShareHeader = function ShareHeader(_ref) {
|
|
14
25
|
var title = _ref.title;
|
|
@@ -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.16.
|
|
9
|
+
packageVersion: "4.16.6"
|
|
10
10
|
}, attributes);
|
|
11
11
|
};
|
|
12
12
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -8,4 +8,6 @@ export declare const InlineDialogFormWrapper: ({ children, }: PropsWithChildren<
|
|
|
8
8
|
*
|
|
9
9
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
10
10
|
*/
|
|
11
|
-
export declare const InlineDialogContentWrapper: ({ children, }: PropsWithChildren<{
|
|
11
|
+
export declare const InlineDialogContentWrapper: ({ children, label, }: PropsWithChildren<{
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
}>) => jsx.JSX.Element;
|
|
@@ -8,4 +8,6 @@ export declare const InlineDialogFormWrapper: ({ children, }: PropsWithChildren<
|
|
|
8
8
|
*
|
|
9
9
|
* packages/design-system/inline-dialog/src/InlineDialog/styled.ts:20:3
|
|
10
10
|
*/
|
|
11
|
-
export declare const InlineDialogContentWrapper: ({ children, }: PropsWithChildren<{
|
|
11
|
+
export declare const InlineDialogContentWrapper: ({ children, label, }: PropsWithChildren<{
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
}>) => jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/share",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.6",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/analytics-next": "^9.2.0",
|
|
45
|
-
"@atlaskit/button": "^17.
|
|
45
|
+
"@atlaskit/button": "^17.11.0",
|
|
46
46
|
"@atlaskit/dropdown-menu": "^12.8.0",
|
|
47
47
|
"@atlaskit/form": "^9.1.0",
|
|
48
48
|
"@atlaskit/icon": "^22.1.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/tabs": "^14.0.0",
|
|
55
55
|
"@atlaskit/textarea": "^5.2.0",
|
|
56
56
|
"@atlaskit/theme": "^12.7.0",
|
|
57
|
-
"@atlaskit/tokens": "^1.
|
|
57
|
+
"@atlaskit/tokens": "^1.43.0",
|
|
58
58
|
"@atlaskit/tooltip": "^18.1.0",
|
|
59
59
|
"@atlaskit/ufo": "^0.2.0",
|
|
60
60
|
"@atlaskit/user-picker": "^10.19.0",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@atlaskit/editor-test-helpers": "^18.20.0",
|
|
76
|
-
"@atlaskit/flag": "^15.
|
|
76
|
+
"@atlaskit/flag": "^15.3.0",
|
|
77
77
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
78
78
|
"@testing-library/react": "^12.1.5",
|
|
79
79
|
"@testing-library/user-event": "^14.4.3",
|