@atlaskit/share 3.3.1 → 3.4.2

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 (45) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/components/CopyLinkButton.js +21 -19
  3. package/dist/cjs/components/IntegrationButton.js +10 -10
  4. package/dist/cjs/components/IntegrationForm.js +7 -6
  5. package/dist/cjs/components/LazyShareForm/LazyShareForm.js +5 -0
  6. package/dist/cjs/components/LazyShareForm/lazy.js +9 -2
  7. package/dist/cjs/components/ShareDialogWithTrigger.js +49 -33
  8. package/dist/cjs/components/ShareForm.js +53 -42
  9. package/dist/cjs/components/ShareHeader.js +14 -7
  10. package/dist/cjs/components/SplitButton.js +19 -15
  11. package/dist/cjs/components/analytics/analytics.js +1 -1
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/components/CopyLinkButton.js +20 -13
  14. package/dist/es2019/components/IntegrationButton.js +11 -8
  15. package/dist/es2019/components/IntegrationForm.js +6 -3
  16. package/dist/es2019/components/LazyShareForm/LazyShareForm.js +4 -0
  17. package/dist/es2019/components/LazyShareForm/lazy.js +14 -7
  18. package/dist/es2019/components/ShareDialogWithTrigger.js +39 -21
  19. package/dist/es2019/components/ShareForm.js +51 -31
  20. package/dist/es2019/components/ShareHeader.js +13 -5
  21. package/dist/es2019/components/SplitButton.js +21 -13
  22. package/dist/es2019/components/analytics/analytics.js +1 -1
  23. package/dist/es2019/version.json +1 -1
  24. package/dist/esm/components/CopyLinkButton.js +19 -13
  25. package/dist/esm/components/IntegrationButton.js +11 -9
  26. package/dist/esm/components/IntegrationForm.js +6 -3
  27. package/dist/esm/components/LazyShareForm/LazyShareForm.js +4 -0
  28. package/dist/esm/components/LazyShareForm/lazy.js +7 -2
  29. package/dist/esm/components/ShareDialogWithTrigger.js +51 -31
  30. package/dist/esm/components/ShareForm.js +50 -30
  31. package/dist/esm/components/ShareHeader.js +12 -4
  32. package/dist/esm/components/SplitButton.js +20 -13
  33. package/dist/esm/components/analytics/analytics.js +1 -1
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/components/CopyLinkButton.d.ts +5 -3
  36. package/dist/types/components/IntegrationButton.d.ts +1 -0
  37. package/dist/types/components/IntegrationForm.d.ts +4 -2
  38. package/dist/types/components/LazyShareForm/LazyShareForm.d.ts +1 -0
  39. package/dist/types/components/ShareDialogWithTrigger.d.ts +5 -1
  40. package/dist/types/components/ShareForm.d.ts +3 -2
  41. package/dist/types/components/ShareHeader.d.ts +3 -1
  42. package/dist/types/components/SplitButton.d.ts +1 -0
  43. package/dist/types/types/ShareDialogWithTrigger.d.ts +1 -0
  44. package/package.json +4 -3
  45. package/tsconfig.json +0 -1
@@ -1,8 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
+
4
+ /** @jsx jsx */
3
5
  import React from 'react';
6
+ import { css, jsx } from '@emotion/react';
4
7
  import { FormattedMessage, injectIntl } from 'react-intl-next';
5
- import styled from 'styled-components';
6
8
  import { AnalyticsContext } from '@atlaskit/analytics-next';
7
9
  import Button from '@atlaskit/button/custom-theme-button';
8
10
  import Form from '@atlaskit/form';
@@ -20,11 +22,11 @@ import CopyLinkButton from './CopyLinkButton';
20
22
  import { IntegrationForm } from './IntegrationForm';
21
23
  import { ShareHeader } from './ShareHeader';
22
24
  import { UserPickerField } from './UserPickerField';
23
- const SubmitButtonWrapper = styled.div`
25
+ const submitButtonWrapperStyles = css`
24
26
  display: flex;
25
27
  margin-left: auto;
26
28
  `;
27
- const CenterAlignedIconWrapper = styled.div`
29
+ const centerAlignedIconWrapperStyles = css`
28
30
  display: flex;
29
31
  align-self: center;
30
32
  padding: 0 10px;
@@ -33,7 +35,7 @@ const CenterAlignedIconWrapper = styled.div`
33
35
  line-height: 1;
34
36
  }
35
37
  `;
36
- export const FormWrapper = styled.div`
38
+ export const formWrapperStyles = css`
37
39
  margin-top: ${gridSize()}px;
38
40
  width: 100%;
39
41
 
@@ -42,24 +44,23 @@ export const FormWrapper = styled.div`
42
44
  margin-top: 0;
43
45
  }
44
46
  `;
45
- export const FormFooter = styled.div`
46
- margin-bottom: ${gridSize}px;
47
+ export const formFooterStyles = css`
47
48
  display: flex;
48
49
  justify-content: flex-start;
49
50
  `;
50
- const FormField = styled.div`
51
+ const formFieldStyles = css`
51
52
  margin-bottom: 12px;
52
53
  `;
53
- const IntegrationWrapper = styled.div`
54
+ const integrationWrapperStyles = css`
54
55
  display: flex;
55
56
  align-items: center;
56
57
  `;
57
- const IntegrationIconWrapper = styled.span`
58
+ const integrationIconWrapperStyles = css`
58
59
  margin-bottom: -6px;
59
60
  margin-right: 5px;
60
61
  `;
61
62
 
62
- const integrationTabText = integrationName => /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
63
+ const integrationTabText = integrationName => jsx(FormattedMessage, _extends({}, messages.shareInIntegrationButtonText, {
63
64
  values: {
64
65
  integrationName
65
66
  }
@@ -99,13 +100,15 @@ class InternalForm extends React.PureComponent {
99
100
  helperMessage,
100
101
  orgId
101
102
  } = this.props;
102
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
103
+ return jsx(AnalyticsContext, {
103
104
  data: {
104
105
  source: ANALYTICS_SOURCE
105
106
  }
106
- }, /*#__PURE__*/React.createElement("form", formProps, showTitle && /*#__PURE__*/React.createElement(ShareHeader, {
107
+ }, jsx("form", formProps, showTitle && jsx(ShareHeader, {
107
108
  title: title
108
- }), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(UserPickerField, {
109
+ }), jsx("div", {
110
+ css: formFieldStyles
111
+ }, jsx(UserPickerField, {
109
112
  onInputChange: onUserInputChange,
110
113
  onChange: onUserSelectionChange,
111
114
  loadOptions: loadOptions,
@@ -120,9 +123,14 @@ class InternalForm extends React.PureComponent {
120
123
  isPublicLink: isPublicLink,
121
124
  helperMessage: helperMessage,
122
125
  orgId: orgId
123
- })), /*#__PURE__*/React.createElement(FormField, null, /*#__PURE__*/React.createElement(CommentField, {
126
+ })), jsx("div", {
127
+ css: formFieldStyles
128
+ }, jsx(CommentField, {
124
129
  defaultValue: defaultValue && defaultValue.comment
125
- })), fieldsFooter, /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(CopyLinkButton, {
130
+ })), fieldsFooter, jsx("div", {
131
+ css: formFooterStyles,
132
+ "data-testid": "form-footer"
133
+ }, jsx(CopyLinkButton, {
126
134
  isDisabled: isDisabled,
127
135
  onLinkCopy: onLinkCopy,
128
136
  link: copyLink,
@@ -151,18 +159,22 @@ class InternalForm extends React.PureComponent {
151
159
  const sendLabel = isPublicLink ? formPublicLabel : formSendLabel;
152
160
  const buttonLabel = shareError ? messages.formRetry : sendLabel;
153
161
  const ButtonLabelWrapper = buttonAppearance === 'warning' ? 'strong' : React.Fragment;
154
- return /*#__PURE__*/React.createElement(SubmitButtonWrapper, null, /*#__PURE__*/React.createElement(CenterAlignedIconWrapper, null, shouldShowWarning && /*#__PURE__*/React.createElement(Tooltip, {
155
- content: /*#__PURE__*/React.createElement(FormattedMessage, messages.shareFailureMessage),
162
+ return jsx("div", {
163
+ css: submitButtonWrapperStyles
164
+ }, jsx("div", {
165
+ css: centerAlignedIconWrapperStyles
166
+ }, shouldShowWarning && jsx(Tooltip, {
167
+ content: jsx(FormattedMessage, messages.shareFailureMessage),
156
168
  position: "top"
157
- }, /*#__PURE__*/React.createElement(ErrorIcon, {
169
+ }, jsx(ErrorIcon, {
158
170
  label: formatMessage(messages.shareFailureIconLabel),
159
171
  primaryColor: token('color.icon.danger', R400)
160
- }))), /*#__PURE__*/React.createElement(Button, {
172
+ }))), jsx(Button, {
161
173
  appearance: buttonAppearance,
162
174
  type: "submit",
163
175
  isLoading: isSharing,
164
176
  isDisabled: isDisabled
165
- }, /*#__PURE__*/React.createElement(ButtonLabelWrapper, null, submitButtonLabel || /*#__PURE__*/React.createElement(FormattedMessage, buttonLabel))));
177
+ }, jsx(ButtonLabelWrapper, null, submitButtonLabel || jsx(FormattedMessage, buttonLabel))));
166
178
  });
167
179
 
168
180
  _defineProperty(this, "renderMainTabTitle", () => {
@@ -176,13 +188,13 @@ class InternalForm extends React.PureComponent {
176
188
  }
177
189
 
178
190
  if (!product) {
179
- return /*#__PURE__*/React.createElement(FormattedMessage, messages.formTitle);
191
+ return jsx(FormattedMessage, messages.formTitle);
180
192
  }
181
193
 
182
194
  const productShareType = product === 'jira' ? { ...messages.shareMainTabTextJira
183
195
  } : { ...messages.shareMainTabTextConfluence
184
196
  };
185
- return /*#__PURE__*/React.createElement(FormattedMessage, productShareType);
197
+ return jsx(FormattedMessage, productShareType);
186
198
  });
187
199
 
188
200
  _defineProperty(this, "changeTab", tab => {
@@ -220,23 +232,31 @@ class InternalForm extends React.PureComponent {
220
232
  const firstIntegration = shareIntegrations[0];
221
233
 
222
234
  if (integrationMode === 'tabs') {
223
- return /*#__PURE__*/React.createElement(Tabs, {
235
+ return jsx(Tabs, {
224
236
  id: "ShareForm-Tabs-Integrations",
225
237
  onChange: this.changeTab,
226
238
  selected: this.state.selectedTab
227
- }, /*#__PURE__*/React.createElement(TabList, null, /*#__PURE__*/React.createElement(Tab, {
239
+ }, jsx(TabList, null, jsx(Tab, {
228
240
  key: `share-tab-default`
229
- }, this.renderMainTabTitle()), /*#__PURE__*/React.createElement(Tab, {
241
+ }, this.renderMainTabTitle()), jsx(Tab, {
230
242
  key: `share-tab-${firstIntegration.type}`
231
- }, /*#__PURE__*/React.createElement(IntegrationWrapper, null, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), /*#__PURE__*/React.createElement(TabPanel, {
243
+ }, jsx("div", {
244
+ css: integrationWrapperStyles
245
+ }, jsx("span", {
246
+ css: integrationIconWrapperStyles
247
+ }, jsx(firstIntegration.Icon, null)), integrationTabText(firstIntegration.type)))), jsx(TabPanel, {
232
248
  key: `share-tabPanel-default`
233
- }, /*#__PURE__*/React.createElement(FormWrapper, null, this.renderShareForm())), /*#__PURE__*/React.createElement(TabPanel, {
249
+ }, jsx("div", {
250
+ css: formWrapperStyles
251
+ }, this.renderShareForm())), jsx(TabPanel, {
234
252
  key: `share-tabPanel-integration`
235
- }, /*#__PURE__*/React.createElement(AnalyticsContext, {
253
+ }, jsx(AnalyticsContext, {
236
254
  data: {
237
255
  source: INTEGRATION_MODAL_SOURCE
238
256
  }
239
- }, /*#__PURE__*/React.createElement(FormWrapper, null, /*#__PURE__*/React.createElement(IntegrationForm, {
257
+ }, jsx("div", {
258
+ css: formWrapperStyles
259
+ }, jsx(IntegrationForm, {
240
260
  Content: firstIntegration.Content,
241
261
  onIntegrationClose: () => handleCloseDialog === null || handleCloseDialog === void 0 ? void 0 : handleCloseDialog(),
242
262
  changeTab: this.changeTab
@@ -253,12 +273,12 @@ _defineProperty(InternalForm, "defaultProps", {
253
273
  });
254
274
 
255
275
  const InternalFormWithIntl = injectIntl(InternalForm);
256
- export const ShareForm = props => /*#__PURE__*/React.createElement(Form, {
276
+ export const ShareForm = props => jsx(Form, {
257
277
  onSubmit: props.onSubmit
258
278
  }, ({
259
279
  formProps,
260
280
  getValues
261
- }) => /*#__PURE__*/React.createElement(InternalFormWithIntl, _extends({}, props, {
281
+ }) => jsx(InternalFormWithIntl, _extends({}, props, {
262
282
  formProps: formProps,
263
283
  getValues: getValues
264
284
  })));
@@ -1,15 +1,16 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
3
+ import { css, jsx, useTheme } from '@emotion/react';
2
4
  import { FormattedMessage } from 'react-intl-next';
3
- import styled from 'styled-components';
4
5
  import { gridSize } from '@atlaskit/theme/constants';
5
6
  import { h500 } from '@atlaskit/theme/typography';
6
7
  import { messages } from '../i18n';
7
- const HeaderWrapper = styled.div`
8
+ const headerWrapperStyles = css`
8
9
  display: flex;
9
10
  justify-content: space-between;
10
11
  `;
11
- export const FormHeaderTitle = styled.h1`
12
- ${h500};
12
+ export const getFormHeaderTitleStyles = theme => css`
13
+ ${h500(theme)}
13
14
  line-height: ${gridSize() * 4}px;
14
15
  margin-right: ${gridSize() * 4}px;
15
16
  margin-top: ${gridSize() * 4}px;
@@ -23,4 +24,11 @@ export const FormHeaderTitle = styled.h1`
23
24
  `;
24
25
  export const ShareHeader = ({
25
26
  title
26
- }) => /*#__PURE__*/React.createElement(HeaderWrapper, null, /*#__PURE__*/React.createElement(FormHeaderTitle, null, title || /*#__PURE__*/React.createElement(FormattedMessage, messages.formTitle)));
27
+ }) => {
28
+ const theme = useTheme();
29
+ return jsx("div", {
30
+ css: headerWrapperStyles
31
+ }, jsx("h1", {
32
+ css: getFormHeaderTitleStyles(theme)
33
+ }, title || jsx(FormattedMessage, messages.formTitle)));
34
+ };
@@ -1,7 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+
3
+ /** @jsx jsx */
2
4
  import React, { useCallback } from 'react';
5
+ import { css, jsx } from '@emotion/react';
3
6
  import { FormattedMessage } from 'react-intl-next';
4
- import styled from 'styled-components';
5
7
  import Button from '@atlaskit/button/standard-button';
6
8
  import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
7
9
  import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
@@ -11,7 +13,7 @@ import { token } from '@atlaskit/tokens';
11
13
  import { messages } from '../i18n';
12
14
  import { shareIntegrationButtonEvent } from './analytics/analytics';
13
15
  import IntegrationButton from './IntegrationButton';
14
- const SplitButtonWrapper = styled.div`
16
+ const splitButtonWrapperStyles = css`
15
17
  display: flex;
16
18
  button {
17
19
  border-radius: ${borderRadius()}px 0 0 ${borderRadius()}px;
@@ -20,7 +22,7 @@ const SplitButtonWrapper = styled.div`
20
22
  border-radius: ${borderRadius()}px 0 0 ${borderRadius()}px;
21
23
  }
22
24
  `;
23
- const DropdownMenuWrapper = styled.div`
25
+ const dropdownMenuWrapperStyles = css`
24
26
  margin-left: 1px;
25
27
  button {
26
28
  border-radius: 0 ${borderRadius()}px ${borderRadius()}px 0;
@@ -28,14 +30,15 @@ const DropdownMenuWrapper = styled.div`
28
30
  button:hover {
29
31
  border-radius: 0 ${borderRadius()}px ${borderRadius()}px 0;
30
32
  }
31
- `;
32
- const DropDownIntegrationButtonWrapper = styled.span`
33
+ `; // span
34
+
35
+ const dropDownIntegrationButtonWrapperStyles = css`
33
36
  button:hover {
34
37
  background: transparent;
35
38
  }
36
39
  `;
37
40
 
38
- const integrationButtonText = integrationName => /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.shareToIntegrationButtonText, {
41
+ const integrationButtonText = integrationName => jsx(FormattedMessage, _extends({}, messages.shareToIntegrationButtonText, {
39
42
  values: {
40
43
  integrationName
41
44
  }
@@ -64,14 +67,16 @@ const SplitButtonDropdown = props => {
64
67
  onIntegrationClick(integration);
65
68
  createAndFireEvent(shareIntegrationButtonEvent(integration.type));
66
69
  }, [createAndFireEvent, onIntegrationClick]);
67
- return /*#__PURE__*/React.createElement(DropdownMenuWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
70
+ return jsx("div", {
71
+ css: dropdownMenuWrapperStyles
72
+ }, jsx(DropdownMenu, {
68
73
  testId: "split-button-dropdown",
69
74
  trigger: ({
70
75
  triggerRef,
71
76
  ...providedProps
72
- }) => /*#__PURE__*/React.createElement(Button, _extends({}, providedProps, {
77
+ }) => jsx(Button, _extends({}, providedProps, {
73
78
  ref: triggerRef,
74
- iconBefore: /*#__PURE__*/React.createElement(ChevronDownIcon, {
79
+ iconBefore: jsx(ChevronDownIcon, {
75
80
  label: ""
76
81
  }),
77
82
  appearance: triggerButtonAppearance
@@ -79,10 +84,12 @@ const SplitButtonDropdown = props => {
79
84
  placement: "bottom-end",
80
85
  isOpen: isUsingSplitButton,
81
86
  onOpenChange: onOpenChange
82
- }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, shareIntegrations.map(integration => /*#__PURE__*/React.createElement(DropdownItem, {
87
+ }, jsx(DropdownItemGroup, null, shareIntegrations.map(integration => jsx(DropdownItem, {
83
88
  key: integration.type,
84
89
  testId: `split-button-dropdownitem-${integration.type}`
85
- }, /*#__PURE__*/React.createElement(DropDownIntegrationButtonWrapper, null, /*#__PURE__*/React.createElement(IntegrationButton, {
90
+ }, jsx("span", {
91
+ css: dropDownIntegrationButtonWrapperStyles
92
+ }, jsx(IntegrationButton, {
86
93
  textColor: token('color.text', N800),
87
94
  appearance: "subtle",
88
95
  onClick: () => onIntegrationButtonClick(integration),
@@ -105,9 +112,10 @@ export default function SplitButton({
105
112
  dialogPlacement,
106
113
  createAndFireEvent
107
114
  }) {
108
- return /*#__PURE__*/React.createElement(SplitButtonWrapper, {
115
+ return jsx("div", {
116
+ css: splitButtonWrapperStyles,
109
117
  "data-testid": "split-button"
110
- }, shareButton, /*#__PURE__*/React.createElement(SplitButtonDropdown, {
118
+ }, shareButton, jsx(SplitButtonDropdown, {
111
119
  shareIntegrations: shareIntegrations,
112
120
  triggerButtonAppearance: triggerButtonAppearance,
113
121
  isUsingSplitButton: isUsingSplitButton,
@@ -2,7 +2,7 @@ import { isEmail, isTeam, isUser } from '@atlaskit/smart-user-picker';
2
2
 
3
3
  const buildAttributes = (attributes = {}) => ({
4
4
  packageName: "@atlaskit/share",
5
- packageVersion: "3.3.1",
5
+ packageVersion: "3.4.2",
6
6
  ...attributes
7
7
  });
8
8
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.3.1"
3
+ "version": "3.4.2"
4
4
  }
@@ -14,9 +14,10 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
14
14
 
15
15
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
16
16
 
17
+ /** @jsx jsx */
17
18
  import React from 'react';
19
+ import { css, jsx } from '@emotion/react';
18
20
  import { FormattedMessage, injectIntl } from 'react-intl-next';
19
- import styled from 'styled-components';
20
21
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
21
22
  import LinkFilledIcon from '@atlaskit/icon/glyph/link-filled';
22
23
  import Popup from '@atlaskit/popup';
@@ -30,12 +31,12 @@ import Button from './styles';
30
31
  var Z_INDEX = layers.modal();
31
32
  var AUTO_DISMISS_SECONDS = 8;
32
33
  export var AUTO_DISMISS_MS = AUTO_DISMISS_SECONDS * 1000;
33
- export var MessageContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: -8px -16px;\n"])));
34
+ export var messageContainerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: -8px -16px;\n"])));
34
35
  var isSafari = navigator.userAgent.indexOf('Safari');
35
- var MessageSpan = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-indent: 6px;\n"])));
36
+ var messageTextStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-indent: 6px;\n"])));
36
37
  export var HiddenInput = /*#__PURE__*/React.forwardRef( // we need a hidden input to reliably copy to clipboard across all browsers.
37
38
  function (props, ref) {
38
- return /*#__PURE__*/React.createElement("input", {
39
+ return jsx("input", {
39
40
  style: {
40
41
  position: 'absolute',
41
42
  left: '-9999px'
@@ -112,16 +113,16 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
112
113
  formatMessage = _this$props.intl.formatMessage,
113
114
  isDisabled = _this$props.isDisabled,
114
115
  isPublicLink = _this$props.isPublicLink;
115
- return /*#__PURE__*/React.createElement(Button, _extends({
116
+ return jsx(Button, _extends({
116
117
  "aria-label": formatMessage(isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText),
117
118
  isDisabled: isDisabled,
118
119
  appearance: "subtle-link",
119
- iconBefore: /*#__PURE__*/React.createElement(LinkFilledIcon, {
120
+ iconBefore: jsx(LinkFilledIcon, {
120
121
  label: "",
121
122
  size: "medium"
122
123
  }),
123
124
  onClick: _this.handleClick
124
- }, triggerProps), /*#__PURE__*/React.createElement(FormattedMessage, isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText));
125
+ }, triggerProps), jsx(FormattedMessage, isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText));
125
126
  });
126
127
 
127
128
  return _this;
@@ -141,25 +142,30 @@ export var CopyLinkButton = /*#__PURE__*/function (_React$Component) {
141
142
  var _this$props2 = this.props,
142
143
  formatMessage = _this$props2.intl.formatMessage,
143
144
  copyTooltipText = _this$props2.copyTooltipText;
144
- return /*#__PURE__*/React.createElement(React.Fragment, null, isSafari && /*#__PURE__*/React.createElement("div", {
145
+ return jsx(React.Fragment, null, isSafari && jsx("div", {
145
146
  className: "assistive",
146
147
  "aria-live": "assertive"
147
- }, shouldShowCopiedMessage && formatMessage(messages.copiedToClipboardMessage)), /*#__PURE__*/React.createElement(HiddenInput, {
148
+ }, shouldShowCopiedMessage && formatMessage(messages.copiedToClipboardMessage)), jsx(HiddenInput, {
148
149
  ref: this.inputRef,
149
150
  text: this.props.link
150
- }), /*#__PURE__*/React.createElement(Popup, {
151
+ }), jsx(Popup, {
151
152
  zIndex: Z_INDEX,
152
153
  content: function content() {
153
- return /*#__PURE__*/React.createElement(InlineDialogContentWrapper, null, /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(CheckCircleIcon, {
154
+ return jsx(InlineDialogContentWrapper, null, jsx("div", {
155
+ css: messageContainerStyle,
156
+ "data-testid": "message-container"
157
+ }, jsx(CheckCircleIcon, {
154
158
  label: "",
155
159
  primaryColor: token('color.icon.success', G300)
156
- }), /*#__PURE__*/React.createElement(MessageSpan, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.copiedToClipboardMessage))));
160
+ }), jsx("span", {
161
+ css: messageTextStyle
162
+ }, jsx(FormattedMessage, messages.copiedToClipboardMessage))));
157
163
  },
158
164
  isOpen: shouldShowCopiedMessage,
159
165
  onClose: this.handleDismissCopiedMessage,
160
166
  placement: "top-start",
161
167
  trigger: function trigger(triggerProps) {
162
- return copyTooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
168
+ return copyTooltipText ? jsx(Tooltip, {
163
169
  content: copyTooltipText,
164
170
  position: "bottom-start"
165
171
  }, _this2.renderTriggerButton(triggerProps)) : _this2.renderTriggerButton(triggerProps);
@@ -4,15 +4,14 @@ var _excluded = ["text", "textColor", "IntegrationIcon"];
4
4
 
5
5
  var _templateObject, _templateObject2;
6
6
 
7
+ /** @jsx jsx */
7
8
  import React from 'react';
8
- import styled from 'styled-components';
9
+ import { css, jsx } from '@emotion/react';
9
10
  import Button from '@atlaskit/button/custom-theme-button';
10
11
  import { N500 } from '@atlaskit/theme/colors';
11
12
  import { token } from '@atlaskit/tokens';
12
- var IntegrationButtonCopyWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n display: flex;\n justify-content: left;\n"])), function (props) {
13
- return props.theme.textColor || token('color.text', N500);
14
- });
15
- var IntegrationIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 1px 8px 0 0;\n"])));
13
+ var integrationButtonCopyWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: left;\n"])));
14
+ var integrationIconWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 1px 8px 0 0;\n"])));
16
15
 
17
16
  var IntegrationButton = function IntegrationButton(props) {
18
17
  var text = props.text,
@@ -20,11 +19,14 @@ var IntegrationButton = function IntegrationButton(props) {
20
19
  IntegrationIcon = props.IntegrationIcon,
21
20
  restProps = _objectWithoutProperties(props, _excluded);
22
21
 
23
- return /*#__PURE__*/React.createElement(Button, restProps, /*#__PURE__*/React.createElement(IntegrationButtonCopyWrapper, {
24
- theme: {
25
- textColor: textColor
22
+ return jsx(Button, restProps, jsx("span", {
23
+ css: integrationButtonCopyWrapperStyle,
24
+ style: {
25
+ color: textColor || token('color.text', N500)
26
26
  }
27
- }, /*#__PURE__*/React.createElement(IntegrationIconWrapper, null, /*#__PURE__*/React.createElement(IntegrationIcon, null)), /*#__PURE__*/React.createElement("span", null, text)));
27
+ }, jsx("span", {
28
+ css: integrationIconWrapperStyle
29
+ }, jsx(IntegrationIcon, null)), jsx("span", null, text)));
28
30
  };
29
31
 
30
32
  IntegrationButton.displayName = 'IntegrationButton';
@@ -2,10 +2,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
+ /** @jsx jsx */
5
6
  import React from 'react';
6
- import styled from 'styled-components';
7
+ import { css, jsx } from '@emotion/react';
7
8
  import { h500 } from '@atlaskit/theme/typography';
8
- export var FormWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [class^='FormHeader__FormHeaderWrapper'] {\n h1:first-child {\n ", "\n\n > span {\n /* jira has a class override font settings on h1 > span in gh-custom-field-pickers.css */\n font-size: inherit !important;\n line-height: inherit !important;\n letter-spacing: inherit !important;\n }\n }\n }\n\n [class^='FormSection__FormSectionWrapper'] {\n margin-top: 0px;\n }\n\n [class^='FormFooter__FormFooterWrapper'] {\n justify-content: space-between;\n margin-top: 12px;\n margin-bottom: 24px;\n }\n\n [class^='Field__FieldWrapper']:not(:first-child) {\n margin-top: 12px;\n }\n"])), h500());
9
+ export var formWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [class^='FormHeader__FormHeaderWrapper'] {\n h1:first-child {\n ", "\n\n > span {\n /* jira has a class override font settings on h1 > span in gh-custom-field-pickers.css */\n font-size: inherit !important;\n line-height: inherit !important;\n letter-spacing: inherit !important;\n }\n }\n }\n\n [class^='FormSection__FormSectionWrapper'] {\n margin-top: 0px;\n }\n\n [class^='FormFooter__FormFooterWrapper'] {\n justify-content: space-between;\n margin-top: 12px;\n margin-bottom: 24px;\n }\n\n [class^='Field__FieldWrapper']:not(:first-child) {\n margin-top: 12px;\n }\n"])), h500());
9
10
  export var IntegrationForm = function IntegrationForm(_ref) {
10
11
  var Content = _ref.Content,
11
12
  _ref$onIntegrationClo = _ref.onIntegrationClose,
@@ -16,7 +17,9 @@ export var IntegrationForm = function IntegrationForm(_ref) {
16
17
  changeTab = _ref$changeTab === void 0 ? function () {
17
18
  return undefined;
18
19
  } : _ref$changeTab;
19
- return /*#__PURE__*/React.createElement(FormWrapper, null, Content && /*#__PURE__*/React.createElement(Content, {
20
+ return jsx("div", {
21
+ css: formWrapperStyle
22
+ }, Content && jsx(Content, {
20
23
  onClose: onIntegrationClose,
21
24
  changeTab: changeTab
22
25
  }));
@@ -14,6 +14,7 @@ function LazyShareForm(props) {
14
14
  var copyLink = props.copyLink,
15
15
  config = props.config,
16
16
  isFetchingConfig = props.isFetchingConfig,
17
+ setIsLoading = props.setIsLoading,
17
18
  loadOptions = props.loadOptions,
18
19
  shareFormTitle = props.shareFormTitle,
19
20
  shareFormHelperMessage = props.shareFormHelperMessage,
@@ -44,6 +45,9 @@ function LazyShareForm(props) {
44
45
  showTitle = props.showTitle,
45
46
  orgId = props.orgId;
46
47
  var footer = /*#__PURE__*/React.createElement("div", null, bottomMessage ? /*#__PURE__*/React.createElement(BottomMessageWrapper, null, bottomMessage) : null, customFooter && selectedIntegration === null && /*#__PURE__*/React.createElement(CustomFooterWrapper, null, customFooter));
48
+ React.useEffect(function () {
49
+ setIsLoading(false);
50
+ });
47
51
  return /*#__PURE__*/React.createElement(ShareFormWrapper, {
48
52
  footer: footer // form title will be determined by `title` and `showTitle` prop passed to `ShareForm`,
49
53
  // so we don't need to show title via ShareFormWrapper
@@ -13,7 +13,11 @@ var LazyShareFormLazy = lazyForPaint(function () {
13
13
 
14
14
  var LoadingDialog = function LoadingDialog(_ref) {
15
15
  var shareFormTitle = _ref.shareFormTitle,
16
- showTitle = _ref.showTitle;
16
+ showTitle = _ref.showTitle,
17
+ setIsLoading = _ref.setIsLoading;
18
+ React.useEffect(function () {
19
+ setIsLoading(true);
20
+ });
17
21
  return /*#__PURE__*/React.createElement(ShareFormWrapper, {
18
22
  shareFormTitle: shareFormTitle // if `showTitle` is passed, we use it. Otherwise, we will show title for loading dialog.
19
23
  ,
@@ -25,7 +29,8 @@ export default (function (props) {
25
29
  return /*#__PURE__*/React.createElement(LazySuspense, {
26
30
  fallback: /*#__PURE__*/React.createElement(LoadingDialog, {
27
31
  shareFormTitle: props.shareFormTitle,
28
- showTitle: props.showTitle
32
+ showTitle: props.showTitle,
33
+ setIsLoading: props.setIsLoading
29
34
  })
30
35
  }, /*#__PURE__*/React.createElement(LazyShareFormLazy, props));
31
36
  });