@atlaskit/share 6.0.0 → 6.1.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/clients/package.json +3 -0
  3. package/copy-link-button/package.json +3 -0
  4. package/dist/cjs/components/LazyShareForm/LazyShareForm.js +9 -0
  5. package/dist/cjs/components/LazyShareForm/LazyShareFormNext.compiled.css +2 -1
  6. package/dist/cjs/components/LazyShareForm/LazyShareFormNext.js +8 -1
  7. package/dist/cjs/components/ShareDialogContainer.js +3 -0
  8. package/dist/cjs/components/ShareDialogWithTrigger.js +2 -0
  9. package/dist/cjs/components/ShareDialogWithTriggerNext.js +2 -0
  10. package/dist/cjs/components/ShareFormWrapper/ShareFormWrapper.js +3 -1
  11. package/dist/cjs/components/analytics/analytics.js +1 -1
  12. package/dist/es2019/components/LazyShareForm/LazyShareForm.js +9 -0
  13. package/dist/es2019/components/LazyShareForm/LazyShareFormNext.compiled.css +2 -1
  14. package/dist/es2019/components/LazyShareForm/LazyShareFormNext.js +8 -1
  15. package/dist/es2019/components/ShareDialogContainer.js +3 -0
  16. package/dist/es2019/components/ShareDialogWithTrigger.js +2 -0
  17. package/dist/es2019/components/ShareDialogWithTriggerNext.js +2 -0
  18. package/dist/es2019/components/ShareFormWrapper/ShareFormWrapper.js +2 -1
  19. package/dist/es2019/components/analytics/analytics.js +1 -1
  20. package/dist/esm/components/LazyShareForm/LazyShareForm.js +9 -0
  21. package/dist/esm/components/LazyShareForm/LazyShareFormNext.compiled.css +2 -1
  22. package/dist/esm/components/LazyShareForm/LazyShareFormNext.js +8 -1
  23. package/dist/esm/components/ShareDialogContainer.js +3 -0
  24. package/dist/esm/components/ShareDialogWithTrigger.js +2 -0
  25. package/dist/esm/components/ShareDialogWithTriggerNext.js +2 -0
  26. package/dist/esm/components/ShareFormWrapper/ShareFormWrapper.js +3 -1
  27. package/dist/esm/components/analytics/analytics.js +1 -1
  28. package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -1
  29. package/dist/types/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
  30. package/dist/types/components/ShareDialogContainer.d.ts +1 -0
  31. package/dist/types/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -1
  32. package/dist/types/types/ShareDialogContainer.d.ts +4 -0
  33. package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -1
  34. package/dist/types-ts4.5/components/LazyShareForm/LazyShareForm.d.ts +1 -1
  35. package/dist/types-ts4.5/components/LazyShareForm/LazyShareFormNext.d.ts +1 -1
  36. package/dist/types-ts4.5/components/ShareDialogContainer.d.ts +1 -0
  37. package/dist/types-ts4.5/components/ShareFormWrapper/ShareFormWrapper.d.ts +2 -1
  38. package/dist/types-ts4.5/types/ShareDialogContainer.d.ts +4 -0
  39. package/dist/types-ts4.5/types/ShareDialogWithTrigger.d.ts +1 -1
  40. package/package.json +15 -9
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#119860](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119860)
8
+ [`03cfc1c9186b8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/03cfc1c9186b8) -
9
+ [ux] Add optional custom header prop
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 6.0.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
20
+ [`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
21
+ Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
22
+ future to avoid an accidental regression.
23
+
24
+ This is related to
25
+ https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
26
+
3
27
  ## 6.0.0
4
28
 
5
29
  ### Major Changes
@@ -3,6 +3,9 @@
3
3
  "main": "../dist/cjs/clients/index.js",
4
4
  "module": "../dist/esm/clients/index.js",
5
5
  "module:es2019": "../dist/es2019/clients/index.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
6
9
  "types": "../dist/types/clients/index.d.ts",
7
10
  "typesVersions": {
8
11
  ">=4.5 <5.4": {
@@ -3,6 +3,9 @@
3
3
  "main": "../dist/cjs/components/CopyLinkButton.js",
4
4
  "module": "../dist/esm/components/CopyLinkButton.js",
5
5
  "module:es2019": "../dist/es2019/components/CopyLinkButton.js",
6
+ "sideEffects": [
7
+ "*.compiled.css"
8
+ ],
6
9
  "types": "../dist/types/components/CopyLinkButton.d.ts",
7
10
  "typesVersions": {
8
11
  ">=4.5 <5.4": {
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _analyticsNext = require("@atlaskit/analytics-next");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _primitives = require("@atlaskit/primitives");
13
14
  var _constants = require("@atlaskit/theme/constants");
14
15
  var _i18n = require("../../i18n");
@@ -34,6 +35,9 @@ var footerBottomMessageStyles = (0, _react2.css)({
34
35
  var footerCustomStyles = (0, _react2.css)({
35
36
  margin: "0 ".concat("var(--ds-space-negative-300, -24px)", " ", "var(--ds-space-negative-200, -16px)", " ", "var(--ds-space-negative-300, -24px)")
36
37
  });
38
+ var headerCustomStyles = (0, _react2.css)({
39
+ marginBottom: "var(--ds-space-200, 16px)"
40
+ });
37
41
 
38
42
  /**
39
43
  * A Share form content which is lazy-loaded.
@@ -51,6 +55,7 @@ function LazyShareForm(props) {
51
55
  submitButtonLabel = props.submitButtonLabel,
52
56
  product = props.product,
53
57
  productAttributes = props.productAttributes,
58
+ customHeader = props.customHeader,
54
59
  customFooter = props.customFooter,
55
60
  enableSmartUserPicker = props.enableSmartUserPicker,
56
61
  loggedInAccountId = props.loggedInAccountId,
@@ -81,6 +86,9 @@ function LazyShareForm(props) {
81
86
  isBrowseUsersDisabled = props.isBrowseUsersDisabled,
82
87
  userPickerOptions = props.userPickerOptions,
83
88
  isSubmitShareDisabled = props.isSubmitShareDisabled;
89
+ var header = customHeader ? (0, _react2.jsx)("div", {
90
+ css: headerCustomStyles
91
+ }, customHeader) : null;
84
92
  var footer = (0, _react2.jsx)("div", null, bottomMessage ? (0, _react2.jsx)("div", {
85
93
  css: footerBottomMessageStyles
86
94
  }, bottomMessage) : null, customFooter && selectedIntegration === null && (0, _react2.jsx)("div", {
@@ -91,6 +99,7 @@ function LazyShareForm(props) {
91
99
  });
92
100
  var allowEmail = (0, _utils.allowEmails)(config);
93
101
  return (0, _react2.jsx)(_ShareFormWrapper.ShareFormWrapper, {
102
+ header: (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && header,
94
103
  footer: footer
95
104
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
96
105
  // so we don't need to show title via ShareFormWrapper
@@ -2,4 +2,5 @@
2
2
  ._19pkidpf{margin-top:0}
3
3
  ._1bsb1j89{width:22pc}
4
4
  ._2hwx10v4{margin-right:var(--ds-space-negative-300,-24px)}
5
- ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
5
+ ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
6
+ ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -12,6 +12,7 @@ var _react = _interopRequireDefault(require("react"));
12
12
  var _reactIntlNext = require("react-intl-next");
13
13
  var _analyticsNext = require("@atlaskit/analytics-next");
14
14
  var _css = require("@atlaskit/css");
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _primitives = require("@atlaskit/primitives");
16
17
  var _compiled = require("@atlaskit/primitives/compiled");
17
18
  var _i18n = require("../../i18n");
@@ -22,7 +23,8 @@ var _ShareFormWrapper = require("../ShareFormWrapper");
22
23
  var _utils = require("../utils");
23
24
  var styles = {
24
25
  footerBottomMessageStyles: "_1bsb1j89",
25
- footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4"
26
+ footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4",
27
+ headerCustomStyles: "_otyrpxbi"
26
28
  };
27
29
 
28
30
  /**
@@ -41,6 +43,7 @@ function LazyShareForm(props) {
41
43
  submitButtonLabel = props.submitButtonLabel,
42
44
  product = props.product,
43
45
  productAttributes = props.productAttributes,
46
+ customHeader = props.customHeader,
44
47
  customFooter = props.customFooter,
45
48
  enableSmartUserPicker = props.enableSmartUserPicker,
46
49
  loggedInAccountId = props.loggedInAccountId,
@@ -71,6 +74,9 @@ function LazyShareForm(props) {
71
74
  isBrowseUsersDisabled = props.isBrowseUsersDisabled,
72
75
  userPickerOptions = props.userPickerOptions,
73
76
  isSubmitShareDisabled = props.isSubmitShareDisabled;
77
+ var header = customHeader ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
78
+ xcss: styles.headerCustomStyles
79
+ }, customHeader) : null;
74
80
  var footer = /*#__PURE__*/_react.default.createElement("div", null, bottomMessage ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
75
81
  xcss: (0, _css.cx)(styles.footerBottomMessageStyles)
76
82
  }, bottomMessage) : null, customFooter && selectedIntegration === null && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
@@ -81,6 +87,7 @@ function LazyShareForm(props) {
81
87
  });
82
88
  var allowEmail = (0, _utils.allowEmails)(config);
83
89
  return /*#__PURE__*/_react.default.createElement(_ShareFormWrapper.ShareFormWrapper, {
90
+ header: (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && header,
84
91
  footer: footer
85
92
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
86
93
  // so we don't need to show title via ShareFormWrapper
@@ -21,6 +21,7 @@ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
21
21
  var _reactIntlNext = require("react-intl-next");
22
22
  var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
23
23
  var _analyticsNext = require("@atlaskit/analytics-next");
24
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
25
  var _AtlassianUrlShortenerClient = require("../clients/AtlassianUrlShortenerClient");
25
26
  var _ShareServiceClient = require("../clients/ShareServiceClient");
26
27
  var _i18n = require("../i18n");
@@ -343,6 +344,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
343
344
  shareeAction = _this$props2.shareeAction,
344
345
  product = _this$props2.product,
345
346
  productAttributes = _this$props2.productAttributes,
347
+ customHeader = _this$props2.customHeader,
346
348
  customFooter = _this$props2.customFooter,
347
349
  onTriggerButtonClick = _this$props2.onTriggerButtonClick,
348
350
  onUserSelectionChange = _this$props2.onUserSelectionChange,
@@ -397,6 +399,7 @@ var ShareDialogContainerInternal = exports.ShareDialogContainerInternal = /*#__P
397
399
  submitButtonLabel: shareeAction === 'edit' && /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _i18n.messages.inviteTriggerButtonText),
398
400
  product: product,
399
401
  productAttributes: productAttributes,
402
+ customHeader: (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && customHeader,
400
403
  customFooter: customFooter,
401
404
  onUserSelectionChange: onUserSelectionChange,
402
405
  shareFieldsFooter: shareFieldsFooter,
@@ -559,6 +559,7 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
559
559
  submitButtonLabel = _this$props7.submitButtonLabel,
560
560
  product = _this$props7.product,
561
561
  productAttributes = _this$props7.productAttributes,
562
+ customHeader = _this$props7.customHeader,
562
563
  customFooter = _this$props7.customFooter,
563
564
  enableSmartUserPicker = _this$props7.enableSmartUserPicker,
564
565
  loggedInAccountId = _this$props7.loggedInAccountId,
@@ -601,6 +602,7 @@ var ShareDialogWithTriggerInternalLegacy = exports.ShareDialogWithTriggerInterna
601
602
  copyLink: copyLink,
602
603
  showIntegrationForm: showIntegrationForm,
603
604
  bottomMessage: bottomMessage,
605
+ customHeader: (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && customHeader,
604
606
  customFooter: footer,
605
607
  loadOptions: loadUserOptions,
606
608
  isSharing: isSharing,
@@ -542,6 +542,7 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
542
542
  submitButtonLabel = _this$props7.submitButtonLabel,
543
543
  product = _this$props7.product,
544
544
  productAttributes = _this$props7.productAttributes,
545
+ customHeader = _this$props7.customHeader,
545
546
  customFooter = _this$props7.customFooter,
546
547
  enableSmartUserPicker = _this$props7.enableSmartUserPicker,
547
548
  loggedInAccountId = _this$props7.loggedInAccountId,
@@ -576,6 +577,7 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
576
577
  copyLink: copyLink,
577
578
  showIntegrationForm: showIntegrationForm,
578
579
  bottomMessage: bottomMessage,
580
+ customHeader: (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && customHeader,
579
581
  customFooter: footer,
580
582
  loadOptions: loadUserOptions,
581
583
  isSharing: isSharing,
@@ -17,6 +17,8 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
17
17
  shouldShowTitle = _ref.shouldShowTitle,
18
18
  _ref$children = _ref.children,
19
19
  children = _ref$children === void 0 ? null : _ref$children,
20
+ _ref$header = _ref.header,
21
+ header = _ref$header === void 0 ? null : _ref$header,
20
22
  _ref$footer = _ref.footer,
21
23
  footer = _ref$footer === void 0 ? null : _ref$footer,
22
24
  _ref$integrationMode = _ref.integrationMode,
@@ -29,7 +31,7 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
29
31
  var FormWrapper = (0, _platformFeatureFlags.fg)('share-compiled-migration') ? _compiled.InlineDialogFormWrapper : _styled.InlineDialogFormWrapper;
30
32
  return /*#__PURE__*/_react.default.createElement(ContentWrapper, {
31
33
  label: formatMessage(_i18n.messages.formTitle)
32
- }, /*#__PURE__*/_react.default.createElement(FormWrapper, {
34
+ }, (0, _platformFeatureFlags.fg)('platform_share_custom_header_prop') && header, /*#__PURE__*/_react.default.createElement(FormWrapper, {
33
35
  integrationMode: integrationMode,
34
36
  isMenuItemSelected: isMenuItemSelected
35
37
  }, shouldShowTitle && /*#__PURE__*/_react.default.createElement(_ShareHeader.ShareHeader, {
@@ -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: "6.0.0"
16
+ packageVersion: "6.1.0"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -9,6 +9,7 @@ import React from 'react';
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import { AnalyticsContext } from '@atlaskit/analytics-next';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { Text } from '@atlaskit/primitives';
13
14
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
14
15
  import { gridSize } from '@atlaskit/theme/constants';
@@ -25,6 +26,9 @@ const footerBottomMessageStyles = css({
25
26
  const footerCustomStyles = css({
26
27
  margin: `0 ${"var(--ds-space-negative-300, -24px)"} ${"var(--ds-space-negative-200, -16px)"} ${"var(--ds-space-negative-300, -24px)"}`
27
28
  });
29
+ const headerCustomStyles = css({
30
+ marginBottom: `${"var(--ds-space-200, 16px)"}`
31
+ });
28
32
 
29
33
  /**
30
34
  * A Share form content which is lazy-loaded.
@@ -43,6 +47,7 @@ function LazyShareForm(props) {
43
47
  submitButtonLabel,
44
48
  product,
45
49
  productAttributes,
50
+ customHeader,
46
51
  customFooter,
47
52
  enableSmartUserPicker,
48
53
  loggedInAccountId,
@@ -77,6 +82,9 @@ function LazyShareForm(props) {
77
82
  userPickerOptions,
78
83
  isSubmitShareDisabled
79
84
  } = props;
85
+ const header = customHeader ? jsx("div", {
86
+ css: headerCustomStyles
87
+ }, customHeader) : null;
80
88
  const footer = jsx("div", null, bottomMessage ? jsx("div", {
81
89
  css: footerBottomMessageStyles
82
90
  }, bottomMessage) : null, customFooter && selectedIntegration === null && jsx("div", {
@@ -87,6 +95,7 @@ function LazyShareForm(props) {
87
95
  });
88
96
  const allowEmail = allowEmails(config);
89
97
  return jsx(ShareFormWrapper, {
98
+ header: fg('platform_share_custom_header_prop') && header,
90
99
  footer: footer
91
100
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
92
101
  // so we don't need to show title via ShareFormWrapper
@@ -2,4 +2,5 @@
2
2
  ._19pkidpf{margin-top:0}
3
3
  ._1bsb1j89{width:22pc}
4
4
  ._2hwx10v4{margin-right:var(--ds-space-negative-300,-24px)}
5
- ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
5
+ ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
6
+ ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -5,6 +5,7 @@ import React from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import { AnalyticsContext } from '@atlaskit/analytics-next';
7
7
  import { cx } from '@atlaskit/css';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { Text } from '@atlaskit/primitives';
9
10
  import { Box } from '@atlaskit/primitives/compiled';
10
11
  import { messages } from '../../i18n';
@@ -15,7 +16,8 @@ import { ShareFormWrapper } from '../ShareFormWrapper';
15
16
  import { allowEmails } from '../utils';
16
17
  const styles = {
17
18
  footerBottomMessageStyles: "_1bsb1j89",
18
- footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4"
19
+ footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4",
20
+ headerCustomStyles: "_otyrpxbi"
19
21
  };
20
22
 
21
23
  /**
@@ -35,6 +37,7 @@ function LazyShareForm(props) {
35
37
  submitButtonLabel,
36
38
  product,
37
39
  productAttributes,
40
+ customHeader,
38
41
  customFooter,
39
42
  enableSmartUserPicker,
40
43
  loggedInAccountId,
@@ -69,6 +72,9 @@ function LazyShareForm(props) {
69
72
  userPickerOptions,
70
73
  isSubmitShareDisabled
71
74
  } = props;
75
+ const header = customHeader ? /*#__PURE__*/React.createElement(Box, {
76
+ xcss: styles.headerCustomStyles
77
+ }, customHeader) : null;
72
78
  const footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(Box, {
73
79
  xcss: cx(styles.footerBottomMessageStyles)
74
80
  }, bottomMessage) : null, customFooter && selectedIntegration === null && /*#__PURE__*/React.createElement(Box, {
@@ -79,6 +85,7 @@ function LazyShareForm(props) {
79
85
  });
80
86
  const allowEmail = allowEmails(config);
81
87
  return /*#__PURE__*/React.createElement(ShareFormWrapper, {
88
+ header: fg('platform_share_custom_header_prop') && header,
82
89
  footer: footer
83
90
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
84
91
  // so we don't need to show title via ShareFormWrapper
@@ -5,6 +5,7 @@ import memoizeOne from 'memoize-one';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import assert from 'tiny-invariant';
7
7
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
9
10
  import { ShareServiceClient } from '../clients/ShareServiceClient';
10
11
  import { messages } from '../i18n';
@@ -291,6 +292,7 @@ export class ShareDialogContainerInternal extends React.Component {
291
292
  shareeAction,
292
293
  product,
293
294
  productAttributes,
295
+ customHeader,
294
296
  customFooter,
295
297
  onTriggerButtonClick,
296
298
  onUserSelectionChange,
@@ -347,6 +349,7 @@ export class ShareDialogContainerInternal extends React.Component {
347
349
  submitButtonLabel: shareeAction === 'edit' && /*#__PURE__*/React.createElement(FormattedMessage, messages.inviteTriggerButtonText),
348
350
  product: product,
349
351
  productAttributes: productAttributes,
352
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
350
353
  customFooter: customFooter,
351
354
  onUserSelectionChange: onUserSelectionChange,
352
355
  shareFieldsFooter: shareFieldsFooter,
@@ -507,6 +507,7 @@ export class ShareDialogWithTriggerInternalLegacy extends React.PureComponent {
507
507
  submitButtonLabel,
508
508
  product,
509
509
  productAttributes,
510
+ customHeader,
510
511
  customFooter,
511
512
  enableSmartUserPicker,
512
513
  loggedInAccountId,
@@ -549,6 +550,7 @@ export class ShareDialogWithTriggerInternalLegacy extends React.PureComponent {
549
550
  copyLink: copyLink,
550
551
  showIntegrationForm: showIntegrationForm,
551
552
  bottomMessage: bottomMessage,
553
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
552
554
  customFooter: footer,
553
555
  loadOptions: loadUserOptions,
554
556
  isSharing: isSharing,
@@ -484,6 +484,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
484
484
  submitButtonLabel,
485
485
  product,
486
486
  productAttributes,
487
+ customHeader,
487
488
  customFooter,
488
489
  enableSmartUserPicker,
489
490
  loggedInAccountId,
@@ -518,6 +519,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
518
519
  copyLink: copyLink,
519
520
  showIntegrationForm: showIntegrationForm,
520
521
  bottomMessage: bottomMessage,
522
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
521
523
  customFooter: footer,
522
524
  loadOptions: loadUserOptions,
523
525
  isSharing: isSharing,
@@ -9,6 +9,7 @@ const ShareFormWrapper = ({
9
9
  shareFormTitle,
10
10
  shouldShowTitle,
11
11
  children = null,
12
+ header = null,
12
13
  footer = null,
13
14
  integrationMode = 'off',
14
15
  isMenuItemSelected = false
@@ -20,7 +21,7 @@ const ShareFormWrapper = ({
20
21
  const FormWrapper = fg('share-compiled-migration') ? InlineDialogFormWrapperCompiled : InlineDialogFormWrapper;
21
22
  return /*#__PURE__*/React.createElement(ContentWrapper, {
22
23
  label: formatMessage(messages.formTitle)
23
- }, /*#__PURE__*/React.createElement(FormWrapper, {
24
+ }, fg('platform_share_custom_header_prop') && header, /*#__PURE__*/React.createElement(FormWrapper, {
24
25
  integrationMode: integrationMode,
25
26
  isMenuItemSelected: isMenuItemSelected
26
27
  }, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
@@ -1,7 +1,7 @@
1
1
  import { isEmail, isExternalUser, isGroup, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
  const buildAttributes = (attributes = {}) => ({
3
3
  packageName: "@atlaskit/share",
4
- packageVersion: "6.0.0",
4
+ packageVersion: "6.1.0",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -9,6 +9,7 @@ import React from 'react';
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import { AnalyticsContext } from '@atlaskit/analytics-next';
12
+ import { fg } from '@atlaskit/platform-feature-flags';
12
13
  import { Text } from '@atlaskit/primitives';
13
14
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
14
15
  import { gridSize } from '@atlaskit/theme/constants';
@@ -25,6 +26,9 @@ var footerBottomMessageStyles = css({
25
26
  var footerCustomStyles = css({
26
27
  margin: "0 ".concat("var(--ds-space-negative-300, -24px)", " ", "var(--ds-space-negative-200, -16px)", " ", "var(--ds-space-negative-300, -24px)")
27
28
  });
29
+ var headerCustomStyles = css({
30
+ marginBottom: "var(--ds-space-200, 16px)"
31
+ });
28
32
 
29
33
  /**
30
34
  * A Share form content which is lazy-loaded.
@@ -42,6 +46,7 @@ function LazyShareForm(props) {
42
46
  submitButtonLabel = props.submitButtonLabel,
43
47
  product = props.product,
44
48
  productAttributes = props.productAttributes,
49
+ customHeader = props.customHeader,
45
50
  customFooter = props.customFooter,
46
51
  enableSmartUserPicker = props.enableSmartUserPicker,
47
52
  loggedInAccountId = props.loggedInAccountId,
@@ -72,6 +77,9 @@ function LazyShareForm(props) {
72
77
  isBrowseUsersDisabled = props.isBrowseUsersDisabled,
73
78
  userPickerOptions = props.userPickerOptions,
74
79
  isSubmitShareDisabled = props.isSubmitShareDisabled;
80
+ var header = customHeader ? jsx("div", {
81
+ css: headerCustomStyles
82
+ }, customHeader) : null;
75
83
  var footer = jsx("div", null, bottomMessage ? jsx("div", {
76
84
  css: footerBottomMessageStyles
77
85
  }, bottomMessage) : null, customFooter && selectedIntegration === null && jsx("div", {
@@ -82,6 +90,7 @@ function LazyShareForm(props) {
82
90
  });
83
91
  var allowEmail = allowEmails(config);
84
92
  return jsx(ShareFormWrapper, {
93
+ header: fg('platform_share_custom_header_prop') && header,
85
94
  footer: footer
86
95
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
87
96
  // so we don't need to show title via ShareFormWrapper
@@ -2,4 +2,5 @@
2
2
  ._19pkidpf{margin-top:0}
3
3
  ._1bsb1j89{width:22pc}
4
4
  ._2hwx10v4{margin-right:var(--ds-space-negative-300,-24px)}
5
- ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
5
+ ._otyrmgjw{margin-bottom:var(--ds-space-negative-200,-1pc)}
6
+ ._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
@@ -5,6 +5,7 @@ import React from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import { AnalyticsContext } from '@atlaskit/analytics-next';
7
7
  import { cx } from '@atlaskit/css';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { Text } from '@atlaskit/primitives';
9
10
  import { Box } from '@atlaskit/primitives/compiled';
10
11
  import { messages } from '../../i18n';
@@ -15,7 +16,8 @@ import { ShareFormWrapper } from '../ShareFormWrapper';
15
16
  import { allowEmails } from '../utils';
16
17
  var styles = {
17
18
  footerBottomMessageStyles: "_1bsb1j89",
18
- footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4"
19
+ footerCustomStyles: "_19pkidpf _2hwx10v4 _otyrmgjw _18u010v4",
20
+ headerCustomStyles: "_otyrpxbi"
19
21
  };
20
22
 
21
23
  /**
@@ -34,6 +36,7 @@ function LazyShareForm(props) {
34
36
  submitButtonLabel = props.submitButtonLabel,
35
37
  product = props.product,
36
38
  productAttributes = props.productAttributes,
39
+ customHeader = props.customHeader,
37
40
  customFooter = props.customFooter,
38
41
  enableSmartUserPicker = props.enableSmartUserPicker,
39
42
  loggedInAccountId = props.loggedInAccountId,
@@ -64,6 +67,9 @@ function LazyShareForm(props) {
64
67
  isBrowseUsersDisabled = props.isBrowseUsersDisabled,
65
68
  userPickerOptions = props.userPickerOptions,
66
69
  isSubmitShareDisabled = props.isSubmitShareDisabled;
70
+ var header = customHeader ? /*#__PURE__*/React.createElement(Box, {
71
+ xcss: styles.headerCustomStyles
72
+ }, customHeader) : null;
67
73
  var footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(Box, {
68
74
  xcss: cx(styles.footerBottomMessageStyles)
69
75
  }, bottomMessage) : null, customFooter && selectedIntegration === null && /*#__PURE__*/React.createElement(Box, {
@@ -74,6 +80,7 @@ function LazyShareForm(props) {
74
80
  });
75
81
  var allowEmail = allowEmails(config);
76
82
  return /*#__PURE__*/React.createElement(ShareFormWrapper, {
83
+ header: fg('platform_share_custom_header_prop') && header,
77
84
  footer: footer
78
85
  // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
79
86
  // so we don't need to show title via ShareFormWrapper
@@ -18,6 +18,7 @@ import memoizeOne from 'memoize-one';
18
18
  import { FormattedMessage } from 'react-intl-next';
19
19
  import assert from 'tiny-invariant';
20
20
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
21
+ import { fg } from '@atlaskit/platform-feature-flags';
21
22
  import { AtlassianUrlShortenerClient } from '../clients/AtlassianUrlShortenerClient';
22
23
  import { ShareServiceClient } from '../clients/ShareServiceClient';
23
24
  import { messages } from '../i18n';
@@ -336,6 +337,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
336
337
  shareeAction = _this$props2.shareeAction,
337
338
  product = _this$props2.product,
338
339
  productAttributes = _this$props2.productAttributes,
340
+ customHeader = _this$props2.customHeader,
339
341
  customFooter = _this$props2.customFooter,
340
342
  onTriggerButtonClick = _this$props2.onTriggerButtonClick,
341
343
  onUserSelectionChange = _this$props2.onUserSelectionChange,
@@ -390,6 +392,7 @@ export var ShareDialogContainerInternal = /*#__PURE__*/function (_React$Componen
390
392
  submitButtonLabel: shareeAction === 'edit' && /*#__PURE__*/React.createElement(FormattedMessage, messages.inviteTriggerButtonText),
391
393
  product: product,
392
394
  productAttributes: productAttributes,
395
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
393
396
  customFooter: customFooter,
394
397
  onUserSelectionChange: onUserSelectionChange,
395
398
  shareFieldsFooter: shareFieldsFooter,
@@ -558,6 +558,7 @@ export var ShareDialogWithTriggerInternalLegacy = /*#__PURE__*/function (_React$
558
558
  submitButtonLabel = _this$props7.submitButtonLabel,
559
559
  product = _this$props7.product,
560
560
  productAttributes = _this$props7.productAttributes,
561
+ customHeader = _this$props7.customHeader,
561
562
  customFooter = _this$props7.customFooter,
562
563
  enableSmartUserPicker = _this$props7.enableSmartUserPicker,
563
564
  loggedInAccountId = _this$props7.loggedInAccountId,
@@ -600,6 +601,7 @@ export var ShareDialogWithTriggerInternalLegacy = /*#__PURE__*/function (_React$
600
601
  copyLink: copyLink,
601
602
  showIntegrationForm: showIntegrationForm,
602
603
  bottomMessage: bottomMessage,
604
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
603
605
  customFooter: footer,
604
606
  loadOptions: loadUserOptions,
605
607
  isSharing: isSharing,
@@ -535,6 +535,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
535
535
  submitButtonLabel = _this$props7.submitButtonLabel,
536
536
  product = _this$props7.product,
537
537
  productAttributes = _this$props7.productAttributes,
538
+ customHeader = _this$props7.customHeader,
538
539
  customFooter = _this$props7.customFooter,
539
540
  enableSmartUserPicker = _this$props7.enableSmartUserPicker,
540
541
  loggedInAccountId = _this$props7.loggedInAccountId,
@@ -569,6 +570,7 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
569
570
  copyLink: copyLink,
570
571
  showIntegrationForm: showIntegrationForm,
571
572
  bottomMessage: bottomMessage,
573
+ customHeader: fg('platform_share_custom_header_prop') && customHeader,
572
574
  customFooter: footer,
573
575
  loadOptions: loadUserOptions,
574
576
  isSharing: isSharing,
@@ -10,6 +10,8 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
10
10
  shouldShowTitle = _ref.shouldShowTitle,
11
11
  _ref$children = _ref.children,
12
12
  children = _ref$children === void 0 ? null : _ref$children,
13
+ _ref$header = _ref.header,
14
+ header = _ref$header === void 0 ? null : _ref$header,
13
15
  _ref$footer = _ref.footer,
14
16
  footer = _ref$footer === void 0 ? null : _ref$footer,
15
17
  _ref$integrationMode = _ref.integrationMode,
@@ -22,7 +24,7 @@ var ShareFormWrapper = function ShareFormWrapper(_ref) {
22
24
  var FormWrapper = fg('share-compiled-migration') ? InlineDialogFormWrapperCompiled : InlineDialogFormWrapper;
23
25
  return /*#__PURE__*/React.createElement(ContentWrapper, {
24
26
  label: formatMessage(messages.formTitle)
25
- }, /*#__PURE__*/React.createElement(FormWrapper, {
27
+ }, fg('platform_share_custom_header_prop') && header, /*#__PURE__*/React.createElement(FormWrapper, {
26
28
  integrationMode: integrationMode,
27
29
  isMenuItemSelected: isMenuItemSelected
28
30
  }, shouldShowTitle && /*#__PURE__*/React.createElement(ShareHeader, {
@@ -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: "6.0.0"
9
+ packageVersion: "6.1.0"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
2
2
  import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
- export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
5
+ export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
6
  onLinkCopy: () => void;
7
7
  onDismiss: (data: ShareData) => void;
8
8
  onSubmit: (data: ShareData) => void;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
- export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
5
+ export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
6
  onLinkCopy: () => void;
7
7
  onDismiss: (data: ShareData) => void;
8
8
  onSubmit: (data: ShareData) => void;
@@ -76,6 +76,7 @@ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<
76
76
  cloudId?: string | undefined;
77
77
  bottomMessage?: React.ReactNode;
78
78
  product?: import("../types").ProductName | undefined;
79
+ customHeader?: React.ReactNode;
79
80
  customFooter?: React.ReactNode;
80
81
  isCopyDisabled?: boolean | undefined;
81
82
  isPublicLink?: boolean | undefined;
@@ -4,9 +4,10 @@ import { type IntegrationMode } from '../../types/ShareEntities';
4
4
  export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
5
5
  shouldShowTitle?: boolean;
6
6
  children?: ReactNode;
7
+ header?: ReactNode;
7
8
  footer?: ReactNode;
8
9
  integrationMode?: IntegrationMode;
9
10
  isMenuItemSelected?: boolean;
10
11
  };
11
- declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
12
+ declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
12
13
  export default ShareFormWrapper;
@@ -135,6 +135,10 @@ export type ShareDialogContainerProps = {
135
135
  */
136
136
  product?: ProductName;
137
137
  productAttributes?: SmartUserPickerProps['productAttributes'];
138
+ /**
139
+ * Header for the share dialog.
140
+ */
141
+ customHeader?: React.ReactNode;
138
142
  /**
139
143
  * Footer for the share dialog.
140
144
  */
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
19
19
  * with the demo page and clearly visible options on that page.
20
20
  */
21
21
  export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
- export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
22
+ export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
23
23
  config?: ConfigResponse;
24
24
  isFetchingConfig?: boolean;
25
25
  children?: RenderCustomTriggerButton;
@@ -2,7 +2,7 @@ import { jsx } from '@emotion/react';
2
2
  import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
- export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
5
+ export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
6
  onLinkCopy: () => void;
7
7
  onDismiss: (data: ShareData) => void;
8
8
  onSubmit: (data: ShareData) => void;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { LoadOptions } from '@atlaskit/smart-user-picker';
3
3
  import type { MenuType, ShareData, ShareDialogWithTriggerProps, ShareDialogWithTriggerStates } from '../../types';
4
4
  import { type IntegrationFormProps } from '../IntegrationForm';
5
- export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
5
+ export type LazyShareFormProps = Pick<ShareDialogWithTriggerProps, 'copyLink' | 'config' | 'isFetchingConfig' | 'loadUserOptions' | 'shareFormTitle' | 'shareFormHelperMessage' | 'bottomMessage' | 'submitButtonLabel' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'cloudId' | 'shareFieldsFooter' | 'onUserSelectionChange' | 'isPublicLink' | 'copyTooltipText' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'integrationMode' | 'onDialogClose' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isMenuItemSelected' | 'isSubmitShareDisabled'> & Pick<ShareDialogWithTriggerStates, 'showIntegrationForm' | 'selectedIntegration' | 'isSharing' | 'shareError' | 'defaultValue'> & Pick<IntegrationFormProps, 'Content'> & {
6
6
  onLinkCopy: () => void;
7
7
  onDismiss: (data: ShareData) => void;
8
8
  onSubmit: (data: ShareData) => void;
@@ -76,6 +76,7 @@ export declare const ShareDialogContainer: React.ForwardRefExoticComponent<Omit<
76
76
  cloudId?: string | undefined;
77
77
  bottomMessage?: React.ReactNode;
78
78
  product?: import("../types").ProductName | undefined;
79
+ customHeader?: React.ReactNode;
79
80
  customFooter?: React.ReactNode;
80
81
  isCopyDisabled?: boolean | undefined;
81
82
  isPublicLink?: boolean | undefined;
@@ -4,9 +4,10 @@ import { type IntegrationMode } from '../../types/ShareEntities';
4
4
  export type ShareFormWrapperProps = Pick<ShareDialogWithTriggerProps, 'shareFormTitle'> & {
5
5
  shouldShowTitle?: boolean;
6
6
  children?: ReactNode;
7
+ header?: ReactNode;
7
8
  footer?: ReactNode;
8
9
  integrationMode?: IntegrationMode;
9
10
  isMenuItemSelected?: boolean;
10
11
  };
11
- declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
12
+ declare const ShareFormWrapper: ({ shareFormTitle, shouldShowTitle, children, header, footer, integrationMode, isMenuItemSelected, }: ShareFormWrapperProps) => React.JSX.Element;
12
13
  export default ShareFormWrapper;
@@ -135,6 +135,10 @@ export type ShareDialogContainerProps = {
135
135
  */
136
136
  product?: ProductName;
137
137
  productAttributes?: SmartUserPickerProps['productAttributes'];
138
+ /**
139
+ * Header for the share dialog.
140
+ */
141
+ customHeader?: React.ReactNode;
138
142
  /**
139
143
  * Footer for the share dialog.
140
144
  */
@@ -19,7 +19,7 @@ export type DialogPlacement = Placement;
19
19
  * with the demo page and clearly visible options on that page.
20
20
  */
21
21
  export type DialogBoundariesElement = 'viewport' | 'window' | 'scrollParent';
22
- export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
22
+ export type ShareDialogWithTriggerProps = Pick<ShareDialogContainerProps, 'onTriggerButtonClick' | 'isAutoOpenDialog' | 'shouldCloseOnEscapePress' | 'dialogPlacement' | 'loadUserOptions' | 'onDialogOpen' | 'onDialogClose' | 'onUserSelectionChange' | 'renderCustomTriggerButton' | 'shareContentType' | 'shareContentSubType' | 'shareContentId' | 'shareFormTitle' | 'shareFormHelperMessage' | 'showFlags' | 'enableSmartUserPicker' | 'loggedInAccountId' | 'triggerButtonAppearance' | 'triggerButtonIcon' | 'triggerButtonStyle' | 'triggerButtonTooltipPosition' | 'triggerButtonTooltipText' | 'cloudId' | 'bottomMessage' | 'product' | 'productAttributes' | 'customHeader' | 'customFooter' | 'isCopyDisabled' | 'isPublicLink' | 'integrationMode' | 'isMenuItemSelected' | 'shareFieldsFooter' | 'shareIntegrations' | 'additionalTabs' | 'builtInTabContentWidth' | 'shareAri' | 'tabIndex' | 'copyTooltipText' | 'dialogZIndex' | 'orgId' | 'isBrowseUsersDisabled' | 'userPickerOptions' | 'isSubmitShareDisabled'> & {
23
23
  config?: ConfigResponse;
24
24
  isFetchingConfig?: boolean;
25
25
  children?: RenderCustomTriggerButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,25 +39,25 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@atlaskit/analytics-next": "^11.0.0",
42
- "@atlaskit/button": "^21.0.0",
42
+ "@atlaskit/button": "^21.1.0",
43
43
  "@atlaskit/css": "^0.10.0",
44
44
  "@atlaskit/dropdown-menu": "^13.0.0",
45
45
  "@atlaskit/form": "^12.0.0",
46
- "@atlaskit/heading": "^5.0.0",
47
- "@atlaskit/icon": "^24.0.0",
46
+ "@atlaskit/heading": "^5.1.0",
47
+ "@atlaskit/icon": "^24.1.0",
48
48
  "@atlaskit/link": "^3.0.0",
49
- "@atlaskit/menu": "^3.0.0",
49
+ "@atlaskit/menu": "^3.1.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/popper": "^7.0.0",
52
52
  "@atlaskit/popup": "^2.0.0",
53
53
  "@atlaskit/portal": "^5.0.0",
54
- "@atlaskit/primitives": "^14.0.0",
54
+ "@atlaskit/primitives": "^14.1.0",
55
55
  "@atlaskit/smart-user-picker": "^8.0.0",
56
56
  "@atlaskit/spinner": "^18.0.0",
57
57
  "@atlaskit/tabs": "^18.0.0",
58
58
  "@atlaskit/textarea": "^8.0.0",
59
59
  "@atlaskit/theme": "^17.0.0",
60
- "@atlaskit/tokens": "^4.0.0",
60
+ "@atlaskit/tokens": "^4.3.0",
61
61
  "@atlaskit/tooltip": "^20.0.0",
62
62
  "@atlaskit/ufo": "^0.4.0",
63
63
  "@atlaskit/user-picker": "^11.0.0",
@@ -74,7 +74,7 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@atlaskit/editor-test-helpers": "^22.0.0",
77
- "@atlaskit/flag": "^16.0.0",
77
+ "@atlaskit/flag": "^16.1.0",
78
78
  "@atlassian/feature-flags-test-utils": "^0.3.0",
79
79
  "@testing-library/react": "^13.4.0",
80
80
  "@testing-library/user-event": "^14.4.3",
@@ -133,6 +133,12 @@
133
133
  },
134
134
  "share-compiled-migration": {
135
135
  "type": "boolean"
136
+ },
137
+ "platform_share_custom_header_prop": {
138
+ "type": "boolean"
136
139
  }
137
- }
140
+ },
141
+ "sideEffects": [
142
+ "*.compiled.css"
143
+ ]
138
144
  }