@atlaskit/share 4.16.5 → 4.16.7

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.16.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#91429](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91429) [`3de462db1b3f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3de462db1b3f) - Minor changes to Typescript types to improve compatibility with React 18
8
+
9
+ ## 4.16.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [#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
14
+
3
15
  ## 4.16.5
4
16
 
5
17
  ### Patch Changes
@@ -48,7 +48,6 @@ var memoizedFormatCopyLink = (0, _memoizeOne.default)(function (origin, link) {
48
48
  function getCurrentPageUrl() {
49
49
  return window.location.href;
50
50
  }
51
-
52
51
  /**
53
52
  * This component serves as a Provider to provide customizable implementations
54
53
  * to ShareDialogTrigger component
@@ -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)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: auto;\n"])));
46
- var centerAlignedIconWrapperStyles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-self: center;\n padding: ", " ", ";\n\n > div {\n line-height: 1;\n }\n"])), "var(--ds-space-0, 0px)", "var(--ds-space-150, 12px)");
47
- var formWrapperStyles = exports.formWrapperStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)");
48
- var formFooterStyles = exports.formFooterStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n"])));
49
- var formFieldStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
50
- var integrationWrapperStyles = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
51
- var integrationIconWrapperStyles = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n margin-right: ", ";\n"])), "var(--ds-space-negative-075, -6px)", "var(--ds-space-050, 4px)");
52
- var requiredFieldInfoStyles = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(_colors.N300, ")"), (0, _constants.fontSizeSmall)());
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
- return /*#__PURE__*/_react.default.createElement(_styled.InlineDialogContentWrapper, null, /*#__PURE__*/_react.default.createElement(_styled.InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
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
- var headerWrapperStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
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)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), (0, _typography.h500)(theme), "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
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.5"
16
+ packageVersion: "4.16.7"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -25,7 +25,6 @@ const memoizedFormatCopyLink = memoizeOne((origin, link) => origin.addToUrl(link
25
25
  function getCurrentPageUrl() {
26
26
  return window.location.href;
27
27
  }
28
-
29
28
  /**
30
29
  * This component serves as a Provider to provide customizable implementations
31
30
  * to ShareDialogTrigger component
@@ -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
- margin-left: auto;
26
- `;
27
- const centerAlignedIconWrapperStyles = css`
28
- display: flex;
29
- align-self: center;
30
- padding: ${"var(--ds-space-0, 0px)"} ${"var(--ds-space-150, 12px)"};
31
-
32
- > div {
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
- margin-top: ${"var(--ds-space-100, 8px)"};
38
- width: 100%;
39
-
40
- /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */
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
- justify-content: flex-start;
48
- `;
49
- const formFieldStyles = css`
50
- margin-bottom: ${"var(--ds-space-150, 12px)"};
51
- `;
52
- const integrationWrapperStyles = css`
53
- display: flex;
54
- align-items: center;
55
- `;
56
- const integrationIconWrapperStyles = css`
57
- margin-bottom: ${"var(--ds-space-negative-075, -6px)"};
58
- margin-right: ${"var(--ds-space-050, 4px)"};
59
- `;
60
- const requiredFieldInfoStyles = css`
61
- margin-bottom: ${"var(--ds-space-200, 16px)"};
62
- color: ${`var(--ds-text-subtle, ${N300})`};
63
- font-size: ${fontSizeSmall()}px;
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
- }) => /*#__PURE__*/React.createElement(InlineDialogContentWrapper, null, /*#__PURE__*/React.createElement(InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
10
- title: shareFormTitle
11
- }), children), footer);
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
- justify-content: space-between;
10
- `;
11
- export const getFormHeaderTitleStyles = theme => css`
12
- ${h500(theme)}
13
- line-height: ${"var(--ds-space-400, 32px)"};
14
- margin-right: ${"var(--ds-space-400, 32px)"};
15
- margin-top: ${"var(--ds-space-400, 32px)"};
16
- overflow: hidden;
17
- text-overflow: ellipsis;
18
- white-space: nowrap;
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.5",
4
+ packageVersion: "4.16.7",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -41,7 +41,6 @@ var memoizedFormatCopyLink = memoizeOne(function (origin, link) {
41
41
  function getCurrentPageUrl() {
42
42
  return window.location.href;
43
43
  }
44
-
45
44
  /**
46
45
  * This component serves as a Provider to provide customizable implementations
47
46
  * to ShareDialogTrigger component
@@ -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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n"])));
36
- var centerAlignedIconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-self: center;\n padding: ", " ", ";\n\n > div {\n line-height: 1;\n }\n"])), "var(--ds-space-0, 0px)", "var(--ds-space-150, 12px)");
37
- export var formWrapperStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-top: ", ";\n width: 100%;\n\n /* jira has a class override font settings on h1 in gh-custom-field-pickers.css */\n #ghx-modes-tools #ghx-share & h1:first-child {\n margin-top: 0;\n }\n"])), "var(--ds-space-100, 8px)");
38
- export var formFooterStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-start;\n"])));
39
- var formFieldStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n"])), "var(--ds-space-150, 12px)");
40
- var integrationWrapperStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"])));
41
- var integrationIconWrapperStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n margin-right: ", ";\n"])), "var(--ds-space-negative-075, -6px)", "var(--ds-space-050, 4px)");
42
- var requiredFieldInfoStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin-bottom: ", ";\n color: ", ";\n font-size: ", "px;\n"])), "var(--ds-space-200, 16px)", "var(--ds-text-subtle, ".concat(N300, ")"), fontSizeSmall());
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
- return /*#__PURE__*/React.createElement(InlineDialogContentWrapper, null, /*#__PURE__*/React.createElement(InlineDialogFormWrapper, null, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
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(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
7
+ var headerWrapperStyles = css({
8
+ display: 'flex',
9
+ justifyContent: 'space-between'
10
+ });
10
11
  export var getFormHeaderTitleStyles = function getFormHeaderTitleStyles(theme) {
11
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n line-height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n > span {\n font-size: initial;\n }\n"])), h500(theme), "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)", "var(--ds-space-400, 32px)");
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.5"
9
+ packageVersion: "4.16.7"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -12,21 +12,18 @@ export type State = {
12
12
  shortenedCopyLink: null | string;
13
13
  shortenedCopyLinkData?: ShortenRequest;
14
14
  };
15
+ type ShareDialogContainerInternalProps = WithAnalyticsEventsProps & ShareDialogContainerProps;
15
16
  /**
16
17
  * This component serves as a Provider to provide customizable implementations
17
18
  * to ShareDialogTrigger component
18
19
  */
19
- export declare class ShareDialogContainerInternal extends React.Component<WithAnalyticsEventsProps & ShareDialogContainerProps, State> {
20
+ export declare class ShareDialogContainerInternal extends React.Component<ShareDialogContainerInternalProps, State> {
20
21
  private shareClient;
21
22
  private urlShortenerClient;
22
23
  private _isMounted;
23
24
  private _urlShorteningRequestCounter;
24
25
  private _lastUrlShorteningWasTooSlow;
25
- static defaultProps: {
26
- enableSmartUserPicker: boolean;
27
- shareeAction: "view" | "edit";
28
- product: string;
29
- };
26
+ static defaultProps: Partial<ShareDialogContainerInternalProps>;
30
27
  constructor(props: ShareDialogContainerProps);
31
28
  componentDidMount(): void;
32
29
  componentWillUnmount(): void;
@@ -50,8 +47,5 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
47
  getFormShareLink: () => string;
51
48
  render(): JSX.Element;
52
49
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "orgId" | "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
- enableSmartUserPicker: boolean;
55
- shareeAction: "view" | "edit";
56
- product: string;
57
- }, never>> & React.RefAttributes<any>>;
50
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Pick<Omit<ShareDialogContainerInternalProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ShareDialogContainerInternalProps, keyof WithAnalyticsEventsProps>, keyof ShareDialogContainerProps>> & Partial<Pick<Partial<ShareDialogContainerInternalProps>, keyof WithAnalyticsEventsProps>>, "createAnalyticsEvent" | keyof ShareDialogContainerProps> & React.RefAttributes<any>>;
51
+ export {};
@@ -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<{}>) => jsx.JSX.Element;
11
+ export declare const InlineDialogContentWrapper: ({ children, label, }: PropsWithChildren<{
12
+ label?: string | undefined;
13
+ }>) => jsx.JSX.Element;
@@ -12,21 +12,18 @@ export type State = {
12
12
  shortenedCopyLink: null | string;
13
13
  shortenedCopyLinkData?: ShortenRequest;
14
14
  };
15
+ type ShareDialogContainerInternalProps = WithAnalyticsEventsProps & ShareDialogContainerProps;
15
16
  /**
16
17
  * This component serves as a Provider to provide customizable implementations
17
18
  * to ShareDialogTrigger component
18
19
  */
19
- export declare class ShareDialogContainerInternal extends React.Component<WithAnalyticsEventsProps & ShareDialogContainerProps, State> {
20
+ export declare class ShareDialogContainerInternal extends React.Component<ShareDialogContainerInternalProps, State> {
20
21
  private shareClient;
21
22
  private urlShortenerClient;
22
23
  private _isMounted;
23
24
  private _urlShorteningRequestCounter;
24
25
  private _lastUrlShorteningWasTooSlow;
25
- static defaultProps: {
26
- enableSmartUserPicker: boolean;
27
- shareeAction: "view" | "edit";
28
- product: string;
29
- };
26
+ static defaultProps: Partial<ShareDialogContainerInternalProps>;
30
27
  constructor(props: ShareDialogContainerProps);
31
28
  componentDidMount(): void;
32
29
  componentWillUnmount(): void;
@@ -50,8 +47,5 @@ export declare class ShareDialogContainerInternal extends React.Component<WithAn
50
47
  getFormShareLink: () => string;
51
48
  render(): JSX.Element;
52
49
  }
53
- export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "orgId" | "onTriggerButtonClick" | "isAutoOpenDialog" | "shouldCloseOnEscapePress" | "dialogPlacement" | "loadUserOptions" | "onDialogOpen" | "onDialogClose" | "onUserSelectionChange" | "renderCustomTriggerButton" | "shareContentType" | "shareContentSubType" | "shareContentId" | "shareFormTitle" | "shareFormHelperMessage" | "showFlags" | "loggedInAccountId" | "triggerButtonAppearance" | "triggerButtonIcon" | "triggerButtonStyle" | "triggerButtonTooltipPosition" | "triggerButtonTooltipText" | "cloudId" | "bottomMessage" | "customFooter" | "isCopyDisabled" | "isPublicLink" | "integrationMode" | "shareFieldsFooter" | "shareIntegrations" | "shareAri" | "tabIndex" | "copyTooltipText" | "dialogZIndex" | "isBrowseUsersDisabled" | "userPickerOptions" | "shareClient" | "urlShortenerClient" | "shortLinkData" | "formatCopyLink" | "originTracingFactory" | "productId" | "shareLink" | "shareTitle" | "useUrlShortener" | "workspaceAri"> & Partial<Pick<Omit<WithAnalyticsEventsProps & ShareDialogContainerProps, keyof WithAnalyticsEventsProps>, "enableSmartUserPicker" | "product" | "shareeAction">> & Partial<Pick<{
54
- enableSmartUserPicker: boolean;
55
- shareeAction: "view" | "edit";
56
- product: string;
57
- }, never>> & React.RefAttributes<any>>;
50
+ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Pick<Pick<Omit<ShareDialogContainerInternalProps, keyof WithAnalyticsEventsProps>, never> & Partial<Pick<Omit<ShareDialogContainerInternalProps, keyof WithAnalyticsEventsProps>, keyof ShareDialogContainerProps>> & Partial<Pick<Partial<ShareDialogContainerInternalProps>, keyof WithAnalyticsEventsProps>>, "createAnalyticsEvent" | keyof ShareDialogContainerProps> & React.RefAttributes<any>>;
51
+ export {};
@@ -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<{}>) => jsx.JSX.Element;
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.5",
3
+ "version": "4.16.7",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,20 +42,20 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@atlaskit/analytics-next": "^9.2.0",
45
- "@atlaskit/button": "^17.8.0",
46
- "@atlaskit/dropdown-menu": "^12.8.0",
47
- "@atlaskit/form": "^9.1.0",
45
+ "@atlaskit/button": "^17.12.0",
46
+ "@atlaskit/dropdown-menu": "^12.9.0",
47
+ "@atlaskit/form": "^9.2.0",
48
48
  "@atlaskit/icon": "^22.1.0",
49
49
  "@atlaskit/popper": "^5.5.4",
50
50
  "@atlaskit/popup": "^1.14.0",
51
51
  "@atlaskit/portal": "^4.4.0",
52
52
  "@atlaskit/smart-user-picker": "^6.9.0",
53
53
  "@atlaskit/spinner": "^16.0.0",
54
- "@atlaskit/tabs": "^14.0.0",
54
+ "@atlaskit/tabs": "^14.1.0",
55
55
  "@atlaskit/textarea": "^5.2.0",
56
56
  "@atlaskit/theme": "^12.7.0",
57
- "@atlaskit/tokens": "^1.42.0",
58
- "@atlaskit/tooltip": "^18.1.0",
57
+ "@atlaskit/tokens": "^1.43.0",
58
+ "@atlaskit/tooltip": "^18.2.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
60
  "@atlaskit/user-picker": "^10.19.0",
61
61
  "@atlaskit/util-service-support": "^6.2.0",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "devDependencies": {
75
75
  "@atlaskit/editor-test-helpers": "^18.20.0",
76
- "@atlaskit/flag": "^15.2.0",
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",