@atlaskit/share 4.22.1 → 4.23.1

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,25 @@
1
1
  # @atlaskit/share
2
2
 
3
+ ## 4.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.23.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#166181](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166181)
14
+ [`21e43f81fb5aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/21e43f81fb5aa) -
15
+ [ux] Added additional tab prop
16
+
17
+ ### Patch Changes
18
+
19
+ - [#167430](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167430)
20
+ [`c01f64d7d85f5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c01f64d7d85f5) -
21
+ Replace hard-coded font size with design tokens
22
+
3
23
  ## 4.22.1
4
24
 
5
25
  ### Patch Changes
@@ -565,83 +565,86 @@ var ShareDialogWithTriggerInternal = exports.ShareDialogWithTriggerInternal = /*
565
565
  var footer = (0, _utils.resolveShareFooter)(integrationMode, this.state.tabIndex, customFooter);
566
566
 
567
567
  // for performance purposes, we may want to have a loadable content i.e. ShareForm
568
- return (0, _react2.jsx)("div", {
569
- css: shareButtonWrapperStyles,
570
- tabIndex: tabIndex,
571
- onKeyDown: this.handleKeyDown
572
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
573
- ,
574
- style: style
575
- }, (0, _react2.jsx)(_popup.default, {
576
- content: function content() {
577
- return (0, _react2.jsx)("div", {
578
- ref: _this2.containerRef
579
- }, (0, _react2.jsx)(_lazy.default, {
580
- Content: selectedIntegration && selectedIntegration.Content,
581
- selectedIntegration: selectedIntegration,
582
- copyLink: copyLink,
583
- showIntegrationForm: showIntegrationForm,
584
- bottomMessage: bottomMessage,
585
- customFooter: footer,
586
- loadOptions: loadUserOptions,
587
- isSharing: isSharing,
588
- shareFormTitle: shareFormTitle,
589
- showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
590
- shareFormHelperMessage: shareFormHelperMessage,
591
- shareError: shareError,
592
- defaultValue: defaultValue,
593
- config: config,
594
- isFetchingConfig: isFetchingConfig,
595
- setIsLoading: _this2.setIsLoading,
596
- submitButtonLabel: submitButtonLabel,
597
- product: product,
598
- productAttributes: productAttributes,
599
- enableSmartUserPicker: enableSmartUserPicker,
600
- loggedInAccountId: loggedInAccountId,
601
- cloudId: cloudId,
602
- orgId: orgId,
603
- onUserSelectionChange: _this2.handleOnUserSelectionChange,
604
- shareFieldsFooter: shareFieldsFooter,
605
- isPublicLink: isPublicLink,
606
- copyTooltipText: copyTooltipText,
607
- integrationMode: integrationMode,
608
- shareIntegrations: shareIntegrations,
609
- additionalTabs: additionalTabs,
610
- isMenuItemSelected: isMenuItemSelected
611
- // actions
612
- ,
613
- onLinkCopy: _this2.handleCopyLink,
614
- onSubmit: _this2.handleShareSubmit,
615
- onDismiss: _this2.handleFormDismiss,
616
- onDialogClose: _this2.handleCloseDialog,
617
- onTabChange: _this2.onTabChange,
618
- onMenuItemChange: _this2.onMenuItemChange
619
- //ref
620
- ,
621
- selectPortalRef: _this2.selectPortalRef,
622
- isBrowseUsersDisabled: isBrowseUsersDisabled,
623
- userPickerOptions: userPickerOptions
624
- }));
625
- },
626
- isOpen: isDialogOpen,
627
- onClose: this.handleCloseDialog,
628
- placement: dialogPlacement,
629
- trigger: this.renderShareTriggerButton,
630
- zIndex: dialogZIndex,
631
- label: this.props.intl.formatMessage(_i18n.messages.sharePopupLabel),
632
- role: "dialog"
633
- // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
634
- ,
635
- offset: this.calculatePopupOffset({
636
- isMenuItemSelected: isMenuItemSelected,
637
- dialogPlacement: dialogPlacement
638
- }),
639
- shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable-appropriate-reading-order-in-share-dialog')
640
- }), (0, _react2.jsx)(_portal.default, {
641
- zIndex: (0, _utils.generateSelectZIndex)(dialogZIndex)
642
- }, (0, _react2.jsx)("div", {
643
- ref: this.selectPortalRef
644
- })));
568
+ return (
569
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
570
+ (0, _react2.jsx)("div", {
571
+ css: shareButtonWrapperStyles,
572
+ tabIndex: tabIndex,
573
+ onKeyDown: this.handleKeyDown
574
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
575
+ ,
576
+ style: style
577
+ }, (0, _react2.jsx)(_popup.default, {
578
+ content: function content() {
579
+ return (0, _react2.jsx)("div", {
580
+ ref: _this2.containerRef
581
+ }, (0, _react2.jsx)(_lazy.default, {
582
+ Content: selectedIntegration && selectedIntegration.Content,
583
+ selectedIntegration: selectedIntegration,
584
+ copyLink: copyLink,
585
+ showIntegrationForm: showIntegrationForm,
586
+ bottomMessage: bottomMessage,
587
+ customFooter: footer,
588
+ loadOptions: loadUserOptions,
589
+ isSharing: isSharing,
590
+ shareFormTitle: shareFormTitle,
591
+ showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
592
+ shareFormHelperMessage: shareFormHelperMessage,
593
+ shareError: shareError,
594
+ defaultValue: defaultValue,
595
+ config: config,
596
+ isFetchingConfig: isFetchingConfig,
597
+ setIsLoading: _this2.setIsLoading,
598
+ submitButtonLabel: submitButtonLabel,
599
+ product: product,
600
+ productAttributes: productAttributes,
601
+ enableSmartUserPicker: enableSmartUserPicker,
602
+ loggedInAccountId: loggedInAccountId,
603
+ cloudId: cloudId,
604
+ orgId: orgId,
605
+ onUserSelectionChange: _this2.handleOnUserSelectionChange,
606
+ shareFieldsFooter: shareFieldsFooter,
607
+ isPublicLink: isPublicLink,
608
+ copyTooltipText: copyTooltipText,
609
+ integrationMode: integrationMode,
610
+ shareIntegrations: shareIntegrations,
611
+ additionalTabs: additionalTabs,
612
+ isMenuItemSelected: isMenuItemSelected
613
+ // actions
614
+ ,
615
+ onLinkCopy: _this2.handleCopyLink,
616
+ onSubmit: _this2.handleShareSubmit,
617
+ onDismiss: _this2.handleFormDismiss,
618
+ onDialogClose: _this2.handleCloseDialog,
619
+ onTabChange: _this2.onTabChange,
620
+ onMenuItemChange: _this2.onMenuItemChange
621
+ //ref
622
+ ,
623
+ selectPortalRef: _this2.selectPortalRef,
624
+ isBrowseUsersDisabled: isBrowseUsersDisabled,
625
+ userPickerOptions: userPickerOptions
626
+ }));
627
+ },
628
+ isOpen: isDialogOpen,
629
+ onClose: this.handleCloseDialog,
630
+ placement: dialogPlacement,
631
+ trigger: this.renderShareTriggerButton,
632
+ zIndex: dialogZIndex,
633
+ label: this.props.intl.formatMessage(_i18n.messages.sharePopupLabel),
634
+ role: "dialog"
635
+ // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
636
+ ,
637
+ offset: this.calculatePopupOffset({
638
+ isMenuItemSelected: isMenuItemSelected,
639
+ dialogPlacement: dialogPlacement
640
+ }),
641
+ shouldRenderToParent: (0, _platformFeatureFlags.fg)('enable-appropriate-reading-order-in-share-dialog')
642
+ }), (0, _react2.jsx)(_portal.default, {
643
+ zIndex: (0, _utils.generateSelectZIndex)(dialogZIndex)
644
+ }, (0, _react2.jsx)("div", {
645
+ ref: this.selectPortalRef
646
+ })))
647
+ );
645
648
  }
646
649
  }]);
647
650
  return ShareDialogWithTriggerInternal;
@@ -27,7 +27,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
27
27
  var _primitives = require("@atlaskit/primitives");
28
28
  var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
29
29
  var _colors = require("@atlaskit/theme/colors");
30
- var _constants = require("@atlaskit/theme/constants");
31
30
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
32
31
  var _i18n = require("../i18n");
33
32
  var _types = require("../types");
@@ -91,7 +90,7 @@ var integrationIconWrapperStyles = (0, _react2.css)({
91
90
  var requiredFieldInfoStyles = (0, _react2.css)({
92
91
  marginBottom: "var(--ds-space-200, 16px)",
93
92
  color: "var(--ds-text-subtle, ".concat(_colors.N300, ")"),
94
- fontSize: "".concat((0, _constants.fontSizeSmall)(), "px")
93
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
95
94
  });
96
95
  var menuGroupContainerStyles = (0, _primitives.xcss)({
97
96
  color: 'color.text',
@@ -345,7 +344,9 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
345
344
  key: "share-tabPanel-default"
346
345
  }, (0, _react2.jsx)("div", {
347
346
  css: formWrapperStyles
348
- }, this.renderShareForm())), (0, _react2.jsx)(_tabs.TabPanel, {
347
+ }, (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') ? (0, _react2.jsx)(_primitives.Box, {
348
+ xcss: platformTabWrapper
349
+ }, this.renderShareForm()) : this.renderShareForm())), (0, _react2.jsx)(_tabs.TabPanel, {
349
350
  key: "share-tabPanel-integration"
350
351
  }, (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
351
352
  data: {
@@ -353,12 +354,20 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
353
354
  }
354
355
  }, (0, _react2.jsx)("div", {
355
356
  css: formWrapperStyles
357
+ }, (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') ? (0, _react2.jsx)(_primitives.Box, {
358
+ xcss: platformTabWrapper
356
359
  }, (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
357
360
  Content: firstIntegration.Content,
358
361
  onIntegrationClose: function onIntegrationClose() {
359
362
  return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
360
363
  },
361
364
  changeTab: this.changeTab
365
+ })) : (0, _react2.jsx)(_IntegrationForm.IntegrationForm, {
366
+ Content: firstIntegration.Content,
367
+ onIntegrationClose: function onIntegrationClose() {
368
+ return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
369
+ },
370
+ changeTab: this.changeTab
362
371
  })))), (0, _platformFeatureFlags.fg)('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
363
372
  return (0, _react2.jsx)(_tabs.TabPanel, {
364
373
  key: "share-tabPanel-".concat(tab.label)
@@ -394,6 +403,9 @@ var ShareForm = exports.ShareForm = function ShareForm(props) {
394
403
  }));
395
404
  });
396
405
  };
406
+ var platformTabWrapper = (0, _primitives.xcss)({
407
+ width: '304px'
408
+ });
397
409
  ShareForm.defaultProps = {
398
410
  isSharing: false,
399
411
  product: 'confluence',
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.InlineDialogFormWrapper = exports.InlineDialogContentWrapper = void 0;
7
7
  var _react = require("@emotion/react");
8
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
9
  var _ShareMenuItem = require("../ShareMenuItem");
9
10
  /**
10
11
  * @jsxRuntime classic
@@ -25,6 +26,11 @@ var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
25
26
  if (!isMenuItemSelected && integrationMode === 'menu') {
26
27
  return _ShareMenuItem.menuWrapperWidth;
27
28
  }
29
+ if ((0, _platformFeatureFlags.fg)('smart_links_for_plans_platform')) {
30
+ if (integrationMode === 'tabs') {
31
+ return 'auto';
32
+ }
33
+ }
28
34
  return formWidth;
29
35
  };
30
36
  var InlineDialogFormWrapper = exports.InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref2) {
@@ -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.22.1"
16
+ packageVersion: "4.23.1"
17
17
  }, attributes);
18
18
  };
19
19
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
@@ -512,81 +512,84 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
512
512
  const footer = resolveShareFooter(integrationMode, this.state.tabIndex, customFooter);
513
513
 
514
514
  // for performance purposes, we may want to have a loadable content i.e. ShareForm
515
- return jsx("div", {
516
- css: shareButtonWrapperStyles,
517
- tabIndex: tabIndex,
518
- onKeyDown: this.handleKeyDown
519
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
520
- ,
521
- style: style
522
- }, jsx(Popup, {
523
- content: () => jsx("div", {
524
- ref: this.containerRef
525
- }, jsx(LazyShareFormLazy, {
526
- Content: selectedIntegration && selectedIntegration.Content,
527
- selectedIntegration: selectedIntegration,
528
- copyLink: copyLink,
529
- showIntegrationForm: showIntegrationForm,
530
- bottomMessage: bottomMessage,
531
- customFooter: footer,
532
- loadOptions: loadUserOptions,
533
- isSharing: isSharing,
534
- shareFormTitle: shareFormTitle,
535
- showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
536
- shareFormHelperMessage: shareFormHelperMessage,
537
- shareError: shareError,
538
- defaultValue: defaultValue,
539
- config: config,
540
- isFetchingConfig: isFetchingConfig,
541
- setIsLoading: this.setIsLoading,
542
- submitButtonLabel: submitButtonLabel,
543
- product: product,
544
- productAttributes: productAttributes,
545
- enableSmartUserPicker: enableSmartUserPicker,
546
- loggedInAccountId: loggedInAccountId,
547
- cloudId: cloudId,
548
- orgId: orgId,
549
- onUserSelectionChange: this.handleOnUserSelectionChange,
550
- shareFieldsFooter: shareFieldsFooter,
551
- isPublicLink: isPublicLink,
552
- copyTooltipText: copyTooltipText,
553
- integrationMode: integrationMode,
554
- shareIntegrations: shareIntegrations,
555
- additionalTabs: additionalTabs,
556
- isMenuItemSelected: isMenuItemSelected
557
- // actions
515
+ return (
516
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
517
+ jsx("div", {
518
+ css: shareButtonWrapperStyles,
519
+ tabIndex: tabIndex,
520
+ onKeyDown: this.handleKeyDown
521
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
558
522
  ,
559
- onLinkCopy: this.handleCopyLink,
560
- onSubmit: this.handleShareSubmit,
561
- onDismiss: this.handleFormDismiss,
562
- onDialogClose: this.handleCloseDialog,
563
- onTabChange: this.onTabChange,
564
- onMenuItemChange: this.onMenuItemChange
565
- //ref
523
+ style: style
524
+ }, jsx(Popup, {
525
+ content: () => jsx("div", {
526
+ ref: this.containerRef
527
+ }, jsx(LazyShareFormLazy, {
528
+ Content: selectedIntegration && selectedIntegration.Content,
529
+ selectedIntegration: selectedIntegration,
530
+ copyLink: copyLink,
531
+ showIntegrationForm: showIntegrationForm,
532
+ bottomMessage: bottomMessage,
533
+ customFooter: footer,
534
+ loadOptions: loadUserOptions,
535
+ isSharing: isSharing,
536
+ shareFormTitle: shareFormTitle,
537
+ showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
538
+ shareFormHelperMessage: shareFormHelperMessage,
539
+ shareError: shareError,
540
+ defaultValue: defaultValue,
541
+ config: config,
542
+ isFetchingConfig: isFetchingConfig,
543
+ setIsLoading: this.setIsLoading,
544
+ submitButtonLabel: submitButtonLabel,
545
+ product: product,
546
+ productAttributes: productAttributes,
547
+ enableSmartUserPicker: enableSmartUserPicker,
548
+ loggedInAccountId: loggedInAccountId,
549
+ cloudId: cloudId,
550
+ orgId: orgId,
551
+ onUserSelectionChange: this.handleOnUserSelectionChange,
552
+ shareFieldsFooter: shareFieldsFooter,
553
+ isPublicLink: isPublicLink,
554
+ copyTooltipText: copyTooltipText,
555
+ integrationMode: integrationMode,
556
+ shareIntegrations: shareIntegrations,
557
+ additionalTabs: additionalTabs,
558
+ isMenuItemSelected: isMenuItemSelected
559
+ // actions
560
+ ,
561
+ onLinkCopy: this.handleCopyLink,
562
+ onSubmit: this.handleShareSubmit,
563
+ onDismiss: this.handleFormDismiss,
564
+ onDialogClose: this.handleCloseDialog,
565
+ onTabChange: this.onTabChange,
566
+ onMenuItemChange: this.onMenuItemChange
567
+ //ref
568
+ ,
569
+ selectPortalRef: this.selectPortalRef,
570
+ isBrowseUsersDisabled: isBrowseUsersDisabled,
571
+ userPickerOptions: userPickerOptions
572
+ })),
573
+ isOpen: isDialogOpen,
574
+ onClose: this.handleCloseDialog,
575
+ placement: dialogPlacement,
576
+ trigger: this.renderShareTriggerButton,
577
+ zIndex: dialogZIndex,
578
+ label: this.props.intl.formatMessage(messages.sharePopupLabel),
579
+ role: "dialog"
580
+ // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
566
581
  ,
567
- selectPortalRef: this.selectPortalRef,
568
- isBrowseUsersDisabled: isBrowseUsersDisabled,
569
- userPickerOptions: userPickerOptions
570
- })),
571
- isOpen: isDialogOpen,
572
- onClose: this.handleCloseDialog,
573
- placement: dialogPlacement,
574
- trigger: this.renderShareTriggerButton,
575
- zIndex: dialogZIndex,
576
- label: this.props.intl.formatMessage(messages.sharePopupLabel),
577
- role: "dialog"
578
- // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
579
- ,
580
- offset: this.calculatePopupOffset({
581
- isMenuItemSelected,
582
- dialogPlacement
583
- }),
584
- shouldRenderToParent: fg('enable-appropriate-reading-order-in-share-dialog')
585
- }), jsx(Portal, {
586
- zIndex: generateSelectZIndex(dialogZIndex)
587
- }, jsx("div", {
588
- ref: this.selectPortalRef
589
- })));
582
+ offset: this.calculatePopupOffset({
583
+ isMenuItemSelected,
584
+ dialogPlacement
585
+ }),
586
+ shouldRenderToParent: fg('enable-appropriate-reading-order-in-share-dialog')
587
+ }), jsx(Portal, {
588
+ zIndex: generateSelectZIndex(dialogZIndex)
589
+ }, jsx("div", {
590
+ ref: this.selectPortalRef
591
+ })))
592
+ );
590
593
  }
591
594
  }
592
595
  _defineProperty(ShareDialogWithTriggerInternal, "defaultProps", {
@@ -19,7 +19,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
19
19
  import { Box, xcss } from '@atlaskit/primitives';
20
20
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
21
21
  import { N300, R400 } from '@atlaskit/theme/colors';
22
- import { fontSizeSmall } from '@atlaskit/theme/constants';
23
22
  import Tooltip from '@atlaskit/tooltip';
24
23
  import { messages } from '../i18n';
25
24
  import { TabType } from '../types';
@@ -74,7 +73,7 @@ const integrationIconWrapperStyles = css({
74
73
  const requiredFieldInfoStyles = css({
75
74
  marginBottom: "var(--ds-space-200, 16px)",
76
75
  color: `var(--ds-text-subtle, ${N300})`,
77
- fontSize: `${fontSizeSmall()}px`
76
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
78
77
  });
79
78
  const menuGroupContainerStyles = xcss({
80
79
  color: 'color.text',
@@ -318,7 +317,9 @@ class InternalForm extends React.PureComponent {
318
317
  key: `share-tabPanel-default`
319
318
  }, jsx("div", {
320
319
  css: formWrapperStyles
321
- }, this.renderShareForm())), jsx(TabPanel, {
320
+ }, fg('smart_links_for_plans_platform') ? jsx(Box, {
321
+ xcss: platformTabWrapper
322
+ }, this.renderShareForm()) : this.renderShareForm())), jsx(TabPanel, {
322
323
  key: `share-tabPanel-integration`
323
324
  }, jsx(AnalyticsContext, {
324
325
  data: {
@@ -326,10 +327,16 @@ class InternalForm extends React.PureComponent {
326
327
  }
327
328
  }, jsx("div", {
328
329
  css: formWrapperStyles
330
+ }, fg('smart_links_for_plans_platform') ? jsx(Box, {
331
+ xcss: platformTabWrapper
329
332
  }, jsx(IntegrationForm, {
330
333
  Content: firstIntegration.Content,
331
334
  onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
332
335
  changeTab: this.changeTab
336
+ })) : jsx(IntegrationForm, {
337
+ Content: firstIntegration.Content,
338
+ onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
339
+ changeTab: this.changeTab
333
340
  })))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(tab => jsx(TabPanel, {
334
341
  key: `share-tabPanel-${tab.label}`
335
342
  }, jsx("div", {
@@ -356,6 +363,9 @@ export const ShareForm = props => jsx(Form, {
356
363
  formProps: formProps,
357
364
  getValues: getValues
358
365
  })));
366
+ const platformTabWrapper = xcss({
367
+ width: '304px'
368
+ });
359
369
  ShareForm.defaultProps = {
360
370
  isSharing: false,
361
371
  product: 'confluence',
@@ -5,6 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { menuWrapperWidth } from '../ShareMenuItem';
9
10
 
10
11
  /**
@@ -20,6 +21,11 @@ const calculateFormWrapperWidth = ({
20
21
  if (!isMenuItemSelected && integrationMode === 'menu') {
21
22
  return menuWrapperWidth;
22
23
  }
24
+ if (fg('smart_links_for_plans_platform')) {
25
+ if (integrationMode === 'tabs') {
26
+ return 'auto';
27
+ }
28
+ }
23
29
  return formWidth;
24
30
  };
25
31
  export const InlineDialogFormWrapper = ({
@@ -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: "4.22.1",
4
+ packageVersion: "4.23.1",
5
5
  ...attributes
6
6
  });
7
7
  const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
@@ -564,83 +564,86 @@ export var ShareDialogWithTriggerInternal = /*#__PURE__*/function (_React$PureCo
564
564
  var footer = resolveShareFooter(integrationMode, this.state.tabIndex, customFooter);
565
565
 
566
566
  // for performance purposes, we may want to have a loadable content i.e. ShareForm
567
- return jsx("div", {
568
- css: shareButtonWrapperStyles,
569
- tabIndex: tabIndex,
570
- onKeyDown: this.handleKeyDown
571
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
572
- ,
573
- style: style
574
- }, jsx(Popup, {
575
- content: function content() {
576
- return jsx("div", {
577
- ref: _this2.containerRef
578
- }, jsx(LazyShareFormLazy, {
579
- Content: selectedIntegration && selectedIntegration.Content,
580
- selectedIntegration: selectedIntegration,
581
- copyLink: copyLink,
582
- showIntegrationForm: showIntegrationForm,
583
- bottomMessage: bottomMessage,
584
- customFooter: footer,
585
- loadOptions: loadUserOptions,
586
- isSharing: isSharing,
587
- shareFormTitle: shareFormTitle,
588
- showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
589
- shareFormHelperMessage: shareFormHelperMessage,
590
- shareError: shareError,
591
- defaultValue: defaultValue,
592
- config: config,
593
- isFetchingConfig: isFetchingConfig,
594
- setIsLoading: _this2.setIsLoading,
595
- submitButtonLabel: submitButtonLabel,
596
- product: product,
597
- productAttributes: productAttributes,
598
- enableSmartUserPicker: enableSmartUserPicker,
599
- loggedInAccountId: loggedInAccountId,
600
- cloudId: cloudId,
601
- orgId: orgId,
602
- onUserSelectionChange: _this2.handleOnUserSelectionChange,
603
- shareFieldsFooter: shareFieldsFooter,
604
- isPublicLink: isPublicLink,
605
- copyTooltipText: copyTooltipText,
606
- integrationMode: integrationMode,
607
- shareIntegrations: shareIntegrations,
608
- additionalTabs: additionalTabs,
609
- isMenuItemSelected: isMenuItemSelected
610
- // actions
611
- ,
612
- onLinkCopy: _this2.handleCopyLink,
613
- onSubmit: _this2.handleShareSubmit,
614
- onDismiss: _this2.handleFormDismiss,
615
- onDialogClose: _this2.handleCloseDialog,
616
- onTabChange: _this2.onTabChange,
617
- onMenuItemChange: _this2.onMenuItemChange
618
- //ref
619
- ,
620
- selectPortalRef: _this2.selectPortalRef,
621
- isBrowseUsersDisabled: isBrowseUsersDisabled,
622
- userPickerOptions: userPickerOptions
623
- }));
624
- },
625
- isOpen: isDialogOpen,
626
- onClose: this.handleCloseDialog,
627
- placement: dialogPlacement,
628
- trigger: this.renderShareTriggerButton,
629
- zIndex: dialogZIndex,
630
- label: this.props.intl.formatMessage(messages.sharePopupLabel),
631
- role: "dialog"
632
- // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
633
- ,
634
- offset: this.calculatePopupOffset({
635
- isMenuItemSelected: isMenuItemSelected,
636
- dialogPlacement: dialogPlacement
637
- }),
638
- shouldRenderToParent: fg('enable-appropriate-reading-order-in-share-dialog')
639
- }), jsx(Portal, {
640
- zIndex: generateSelectZIndex(dialogZIndex)
641
- }, jsx("div", {
642
- ref: this.selectPortalRef
643
- })));
567
+ return (
568
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
569
+ jsx("div", {
570
+ css: shareButtonWrapperStyles,
571
+ tabIndex: tabIndex,
572
+ onKeyDown: this.handleKeyDown
573
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
574
+ ,
575
+ style: style
576
+ }, jsx(Popup, {
577
+ content: function content() {
578
+ return jsx("div", {
579
+ ref: _this2.containerRef
580
+ }, jsx(LazyShareFormLazy, {
581
+ Content: selectedIntegration && selectedIntegration.Content,
582
+ selectedIntegration: selectedIntegration,
583
+ copyLink: copyLink,
584
+ showIntegrationForm: showIntegrationForm,
585
+ bottomMessage: bottomMessage,
586
+ customFooter: footer,
587
+ loadOptions: loadUserOptions,
588
+ isSharing: isSharing,
589
+ shareFormTitle: shareFormTitle,
590
+ showTitle: integrationMode !== 'tabs' || !shareIntegrations || !shareIntegrations.length,
591
+ shareFormHelperMessage: shareFormHelperMessage,
592
+ shareError: shareError,
593
+ defaultValue: defaultValue,
594
+ config: config,
595
+ isFetchingConfig: isFetchingConfig,
596
+ setIsLoading: _this2.setIsLoading,
597
+ submitButtonLabel: submitButtonLabel,
598
+ product: product,
599
+ productAttributes: productAttributes,
600
+ enableSmartUserPicker: enableSmartUserPicker,
601
+ loggedInAccountId: loggedInAccountId,
602
+ cloudId: cloudId,
603
+ orgId: orgId,
604
+ onUserSelectionChange: _this2.handleOnUserSelectionChange,
605
+ shareFieldsFooter: shareFieldsFooter,
606
+ isPublicLink: isPublicLink,
607
+ copyTooltipText: copyTooltipText,
608
+ integrationMode: integrationMode,
609
+ shareIntegrations: shareIntegrations,
610
+ additionalTabs: additionalTabs,
611
+ isMenuItemSelected: isMenuItemSelected
612
+ // actions
613
+ ,
614
+ onLinkCopy: _this2.handleCopyLink,
615
+ onSubmit: _this2.handleShareSubmit,
616
+ onDismiss: _this2.handleFormDismiss,
617
+ onDialogClose: _this2.handleCloseDialog,
618
+ onTabChange: _this2.onTabChange,
619
+ onMenuItemChange: _this2.onMenuItemChange
620
+ //ref
621
+ ,
622
+ selectPortalRef: _this2.selectPortalRef,
623
+ isBrowseUsersDisabled: isBrowseUsersDisabled,
624
+ userPickerOptions: userPickerOptions
625
+ }));
626
+ },
627
+ isOpen: isDialogOpen,
628
+ onClose: this.handleCloseDialog,
629
+ placement: dialogPlacement,
630
+ trigger: this.renderShareTriggerButton,
631
+ zIndex: dialogZIndex,
632
+ label: this.props.intl.formatMessage(messages.sharePopupLabel),
633
+ role: "dialog"
634
+ // TODO: remove after https://hello.atlassian.net/wiki/x/SoEGzQ experiment is finished
635
+ ,
636
+ offset: this.calculatePopupOffset({
637
+ isMenuItemSelected: isMenuItemSelected,
638
+ dialogPlacement: dialogPlacement
639
+ }),
640
+ shouldRenderToParent: fg('enable-appropriate-reading-order-in-share-dialog')
641
+ }), jsx(Portal, {
642
+ zIndex: generateSelectZIndex(dialogZIndex)
643
+ }, jsx("div", {
644
+ ref: this.selectPortalRef
645
+ })))
646
+ );
644
647
  }
645
648
  }]);
646
649
  return ShareDialogWithTriggerInternal;
@@ -29,7 +29,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
29
29
  import { Box, xcss } from '@atlaskit/primitives';
30
30
  import Tabs, { Tab, TabList, TabPanel } from '@atlaskit/tabs';
31
31
  import { N300, R400 } from '@atlaskit/theme/colors';
32
- import { fontSizeSmall } from '@atlaskit/theme/constants';
33
32
  import Tooltip from '@atlaskit/tooltip';
34
33
  import { messages } from '../i18n';
35
34
  import { TabType } from '../types';
@@ -84,7 +83,7 @@ var integrationIconWrapperStyles = css({
84
83
  var requiredFieldInfoStyles = css({
85
84
  marginBottom: "var(--ds-space-200, 16px)",
86
85
  color: "var(--ds-text-subtle, ".concat(N300, ")"),
87
- fontSize: "".concat(fontSizeSmall(), "px")
86
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
88
87
  });
89
88
  var menuGroupContainerStyles = xcss({
90
89
  color: 'color.text',
@@ -338,7 +337,9 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
338
337
  key: "share-tabPanel-default"
339
338
  }, jsx("div", {
340
339
  css: formWrapperStyles
341
- }, this.renderShareForm())), jsx(TabPanel, {
340
+ }, fg('smart_links_for_plans_platform') ? jsx(Box, {
341
+ xcss: platformTabWrapper
342
+ }, this.renderShareForm()) : this.renderShareForm())), jsx(TabPanel, {
342
343
  key: "share-tabPanel-integration"
343
344
  }, jsx(AnalyticsContext, {
344
345
  data: {
@@ -346,12 +347,20 @@ var InternalForm = /*#__PURE__*/function (_React$PureComponent) {
346
347
  }
347
348
  }, jsx("div", {
348
349
  css: formWrapperStyles
350
+ }, fg('smart_links_for_plans_platform') ? jsx(Box, {
351
+ xcss: platformTabWrapper
349
352
  }, jsx(IntegrationForm, {
350
353
  Content: firstIntegration.Content,
351
354
  onIntegrationClose: function onIntegrationClose() {
352
355
  return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
353
356
  },
354
357
  changeTab: this.changeTab
358
+ })) : jsx(IntegrationForm, {
359
+ Content: firstIntegration.Content,
360
+ onIntegrationClose: function onIntegrationClose() {
361
+ return handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog();
362
+ },
363
+ changeTab: this.changeTab
355
364
  })))), fg('smart_links_for_plans_platform') && (additionalTabs === null || additionalTabs === void 0 ? void 0 : additionalTabs.map(function (tab) {
356
365
  return jsx(TabPanel, {
357
366
  key: "share-tabPanel-".concat(tab.label)
@@ -387,6 +396,9 @@ export var ShareForm = function ShareForm(props) {
387
396
  }));
388
397
  });
389
398
  };
399
+ var platformTabWrapper = xcss({
400
+ width: '304px'
401
+ });
390
402
  ShareForm.defaultProps = {
391
403
  isSharing: false,
392
404
  product: 'confluence',
@@ -5,6 +5,7 @@
5
5
 
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { menuWrapperWidth } from '../ShareMenuItem';
9
10
 
10
11
  /**
@@ -19,6 +20,11 @@ var calculateFormWrapperWidth = function calculateFormWrapperWidth(_ref) {
19
20
  if (!isMenuItemSelected && integrationMode === 'menu') {
20
21
  return menuWrapperWidth;
21
22
  }
23
+ if (fg('smart_links_for_plans_platform')) {
24
+ if (integrationMode === 'tabs') {
25
+ return 'auto';
26
+ }
27
+ }
22
28
  return formWidth;
23
29
  };
24
30
  export var InlineDialogFormWrapper = function InlineDialogFormWrapper(_ref2) {
@@ -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.22.1"
9
+ packageVersion: "4.23.1"
10
10
  }, attributes);
11
11
  };
12
12
  var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "4.22.1",
3
+ "version": "4.23.1",
4
4
  "description": "Fabric Share Element",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -40,23 +40,23 @@
40
40
  "dependencies": {
41
41
  "@atlaskit/analytics-next": "^10.1.0",
42
42
  "@atlaskit/button": "^20.3.0",
43
- "@atlaskit/dropdown-menu": "^12.22.0",
44
- "@atlaskit/form": "^10.5.0",
45
- "@atlaskit/heading": "^3.0.0",
46
- "@atlaskit/icon": "^22.24.0",
43
+ "@atlaskit/dropdown-menu": "^12.23.0",
44
+ "@atlaskit/form": "^10.6.0",
45
+ "@atlaskit/heading": "^4.0.0",
46
+ "@atlaskit/icon": "^22.28.0",
47
47
  "@atlaskit/link": "^1.2.0",
48
48
  "@atlaskit/menu": "^2.13.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.3.0",
50
50
  "@atlaskit/popper": "^6.3.0",
51
51
  "@atlaskit/popup": "^1.29.0",
52
52
  "@atlaskit/portal": "^4.9.0",
53
- "@atlaskit/primitives": "^13.2.0",
53
+ "@atlaskit/primitives": "^13.3.0",
54
54
  "@atlaskit/smart-user-picker": "^6.11.0",
55
55
  "@atlaskit/spinner": "^16.3.0",
56
56
  "@atlaskit/tabs": "^16.5.0",
57
57
  "@atlaskit/textarea": "^5.6.0",
58
58
  "@atlaskit/theme": "^14.0.0",
59
- "@atlaskit/tokens": "^2.2.0",
59
+ "@atlaskit/tokens": "^2.4.0",
60
60
  "@atlaskit/tooltip": "^18.9.0",
61
61
  "@atlaskit/ufo": "^0.3.0",
62
62
  "@atlaskit/user-picker": "^10.27.0",