@atlaskit/share 3.2.6 → 3.4.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 (38) hide show
  1. package/CHANGELOG.md +19 -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/ShareDialogWithTrigger.js +15 -15
  6. package/dist/cjs/components/ShareForm.js +54 -43
  7. package/dist/cjs/components/ShareHeader.js +14 -7
  8. package/dist/cjs/components/SplitButton.js +19 -15
  9. package/dist/cjs/components/analytics/analytics.js +1 -1
  10. package/dist/cjs/version.json +1 -1
  11. package/dist/es2019/components/CopyLinkButton.js +20 -13
  12. package/dist/es2019/components/IntegrationButton.js +11 -8
  13. package/dist/es2019/components/IntegrationForm.js +6 -3
  14. package/dist/es2019/components/ShareDialogWithTrigger.js +16 -13
  15. package/dist/es2019/components/ShareForm.js +52 -32
  16. package/dist/es2019/components/ShareHeader.js +13 -5
  17. package/dist/es2019/components/SplitButton.js +21 -13
  18. package/dist/es2019/components/analytics/analytics.js +1 -1
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/components/CopyLinkButton.js +19 -13
  21. package/dist/esm/components/IntegrationButton.js +11 -9
  22. package/dist/esm/components/IntegrationForm.js +6 -3
  23. package/dist/esm/components/ShareDialogWithTrigger.js +15 -13
  24. package/dist/esm/components/ShareForm.js +51 -31
  25. package/dist/esm/components/ShareHeader.js +12 -4
  26. package/dist/esm/components/SplitButton.js +20 -13
  27. package/dist/esm/components/analytics/analytics.js +1 -1
  28. package/dist/esm/version.json +1 -1
  29. package/dist/types/components/CopyLinkButton.d.ts +5 -3
  30. package/dist/types/components/IntegrationButton.d.ts +1 -0
  31. package/dist/types/components/IntegrationForm.d.ts +4 -2
  32. package/dist/types/components/ShareDialogWithTrigger.d.ts +3 -1
  33. package/dist/types/components/ShareForm.d.ts +3 -2
  34. package/dist/types/components/ShareHeader.d.ts +3 -1
  35. package/dist/types/components/SplitButton.d.ts +1 -0
  36. package/package.json +9 -8
  37. package/report.api.md +177 -68
  38. package/tsconfig.json +0 -1
@@ -19,7 +19,7 @@ var buildAttributes = function buildAttributes() {
19
19
  var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
20
20
  return _objectSpread({
21
21
  packageName: "@atlaskit/share",
22
- packageVersion: "3.2.6"
22
+ packageVersion: "3.4.0"
23
23
  }, attributes);
24
24
  };
25
25
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.6"
3
+ "version": "3.4.0"
4
4
  }
@@ -1,8 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
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 CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
7
9
  import LinkFilledIcon from '@atlaskit/icon/glyph/link-filled';
8
10
  import Popup from '@atlaskit/popup';
@@ -16,17 +18,17 @@ import Button from './styles';
16
18
  const Z_INDEX = layers.modal();
17
19
  const AUTO_DISMISS_SECONDS = 8;
18
20
  export const AUTO_DISMISS_MS = AUTO_DISMISS_SECONDS * 1000;
19
- export const MessageContainer = styled.div`
21
+ export const messageContainerStyle = css`
20
22
  display: flex;
21
23
  align-items: center;
22
24
  margin: -8px -16px;
23
25
  `;
24
26
  const isSafari = navigator.userAgent.indexOf('Safari');
25
- const MessageSpan = styled.span`
27
+ const messageTextStyle = css`
26
28
  text-indent: 6px;
27
29
  `;
28
30
  export const HiddenInput = /*#__PURE__*/React.forwardRef( // we need a hidden input to reliably copy to clipboard across all browsers.
29
- (props, ref) => /*#__PURE__*/React.createElement("input", {
31
+ (props, ref) => jsx("input", {
30
32
  style: {
31
33
  position: 'absolute',
32
34
  left: '-9999px'
@@ -90,16 +92,16 @@ export class CopyLinkButton extends React.Component {
90
92
  isDisabled,
91
93
  isPublicLink
92
94
  } = this.props;
93
- return /*#__PURE__*/React.createElement(Button, _extends({
95
+ return jsx(Button, _extends({
94
96
  "aria-label": formatMessage(isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText),
95
97
  isDisabled: isDisabled,
96
98
  appearance: "subtle-link",
97
- iconBefore: /*#__PURE__*/React.createElement(LinkFilledIcon, {
99
+ iconBefore: jsx(LinkFilledIcon, {
98
100
  label: "",
99
101
  size: "medium"
100
102
  }),
101
103
  onClick: this.handleClick
102
- }, triggerProps), /*#__PURE__*/React.createElement(FormattedMessage, isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText));
104
+ }, triggerProps), jsx(FormattedMessage, isPublicLink ? messages.copyPublicLinkButtonText : messages.copyLinkButtonText));
103
105
  });
104
106
  }
105
107
 
@@ -117,22 +119,27 @@ export class CopyLinkButton extends React.Component {
117
119
  },
118
120
  copyTooltipText
119
121
  } = this.props;
120
- return /*#__PURE__*/React.createElement(React.Fragment, null, isSafari && /*#__PURE__*/React.createElement("div", {
122
+ return jsx(React.Fragment, null, isSafari && jsx("div", {
121
123
  className: "assistive",
122
124
  "aria-live": "assertive"
123
- }, shouldShowCopiedMessage && formatMessage(messages.copiedToClipboardMessage)), /*#__PURE__*/React.createElement(HiddenInput, {
125
+ }, shouldShowCopiedMessage && formatMessage(messages.copiedToClipboardMessage)), jsx(HiddenInput, {
124
126
  ref: this.inputRef,
125
127
  text: this.props.link
126
- }), /*#__PURE__*/React.createElement(Popup, {
128
+ }), jsx(Popup, {
127
129
  zIndex: Z_INDEX,
128
- content: () => /*#__PURE__*/React.createElement(InlineDialogContentWrapper, null, /*#__PURE__*/React.createElement(MessageContainer, null, /*#__PURE__*/React.createElement(CheckCircleIcon, {
130
+ content: () => jsx(InlineDialogContentWrapper, null, jsx("div", {
131
+ css: messageContainerStyle,
132
+ "data-testid": "message-container"
133
+ }, jsx(CheckCircleIcon, {
129
134
  label: "",
130
135
  primaryColor: token('color.icon.success', G300)
131
- }), /*#__PURE__*/React.createElement(MessageSpan, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.copiedToClipboardMessage)))),
136
+ }), jsx("span", {
137
+ css: messageTextStyle
138
+ }, jsx(FormattedMessage, messages.copiedToClipboardMessage)))),
132
139
  isOpen: shouldShowCopiedMessage,
133
140
  onClose: this.handleDismissCopiedMessage,
134
141
  placement: "top-start",
135
- trigger: triggerProps => copyTooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
142
+ trigger: triggerProps => copyTooltipText ? jsx(Tooltip, {
136
143
  content: copyTooltipText,
137
144
  position: "bottom-start"
138
145
  }, this.renderTriggerButton(triggerProps)) : this.renderTriggerButton(triggerProps)
@@ -1,14 +1,14 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
2
- import styled from 'styled-components';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import Button from '@atlaskit/button/custom-theme-button';
4
5
  import { N500 } from '@atlaskit/theme/colors';
5
6
  import { token } from '@atlaskit/tokens';
6
- const IntegrationButtonCopyWrapper = styled.span`
7
- color: ${props => props.theme.textColor || token('color.text', N500)};
7
+ const integrationButtonCopyWrapperStyle = css`
8
8
  display: flex;
9
9
  justify-content: left;
10
10
  `;
11
- const IntegrationIconWrapper = styled.span`
11
+ const integrationIconWrapperStyle = css`
12
12
  margin: 1px 8px 0 0;
13
13
  `;
14
14
 
@@ -19,11 +19,14 @@ const IntegrationButton = props => {
19
19
  IntegrationIcon,
20
20
  ...restProps
21
21
  } = props;
22
- return /*#__PURE__*/React.createElement(Button, restProps, /*#__PURE__*/React.createElement(IntegrationButtonCopyWrapper, {
23
- theme: {
24
- textColor: textColor
22
+ return jsx(Button, restProps, jsx("span", {
23
+ css: integrationButtonCopyWrapperStyle,
24
+ style: {
25
+ color: textColor || token('color.text', N500)
25
26
  }
26
- }, /*#__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)));
27
30
  };
28
31
 
29
32
  IntegrationButton.displayName = 'IntegrationButton';
@@ -1,7 +1,8 @@
1
+ /** @jsx jsx */
1
2
  import React from 'react';
2
- import styled from 'styled-components';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { h500 } from '@atlaskit/theme/typography';
4
- export const FormWrapper = styled.div`
5
+ export const formWrapperStyle = css`
5
6
  [class^='FormHeader__FormHeaderWrapper'] {
6
7
  h1:first-child {
7
8
  ${h500()}
@@ -33,7 +34,9 @@ export const IntegrationForm = ({
33
34
  Content,
34
35
  onIntegrationClose = () => undefined,
35
36
  changeTab = () => undefined
36
- }) => /*#__PURE__*/React.createElement(FormWrapper, null, Content && /*#__PURE__*/React.createElement(Content, {
37
+ }) => jsx("div", {
38
+ css: formWrapperStyle
39
+ }, Content && jsx(Content, {
37
40
  onClose: onIntegrationClose,
38
41
  changeTab: changeTab
39
42
  }));
@@ -1,8 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
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 { withAnalyticsEvents } from '@atlaskit/analytics-next';
7
9
  import ShareIcon from '@atlaskit/icon/glyph/share';
8
10
  import Popup from '@atlaskit/popup';
@@ -20,7 +22,7 @@ import LazyShareFormLazy from './LazyShareForm/lazy';
20
22
  import ShareButton from './ShareButton';
21
23
  import SplitButton from './SplitButton';
22
24
  import { generateSelectZIndex, resolveShareFooter } from './utils';
23
- const ShareButtonWrapper = styled.div`
25
+ const shareButtonWrapperStyles = css`
24
26
  display: inline-flex;
25
27
  outline: none;
26
28
  `;
@@ -326,12 +328,12 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
326
328
  onClick: this.onTriggerClick
327
329
  }, triggerProps);
328
330
  } else {
329
- button = /*#__PURE__*/React.createElement(ShareButton, _extends({
331
+ button = jsx(ShareButton, _extends({
330
332
  appearance: triggerButtonAppearance,
331
- text: triggerButtonStyle !== 'icon-only' ? /*#__PURE__*/React.createElement(FormattedMessage, messages.shareTriggerButtonText) : null,
333
+ text: triggerButtonStyle !== 'icon-only' ? jsx(FormattedMessage, messages.shareTriggerButtonText) : null,
332
334
  "aria-label": formatMessage(messages.shareTriggerButtonText),
333
335
  onClick: this.onTriggerClick,
334
- iconBefore: triggerButtonStyle !== 'text-only' ? /*#__PURE__*/React.createElement(ShareButtonIcon, {
336
+ iconBefore: triggerButtonStyle !== 'text-only' ? jsx(ShareButtonIcon, {
335
337
  label: ""
336
338
  }) : undefined,
337
339
  isSelected: isDialogOpen,
@@ -341,7 +343,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
341
343
 
342
344
 
343
345
  if (triggerButtonStyle === 'icon-only') {
344
- button = /*#__PURE__*/React.createElement(Aktooltip, {
346
+ button = jsx(Aktooltip, {
345
347
  content: !isUsingSplitButton ? triggerButtonTooltipText || formatMessage(messages.shareTriggerButtonTooltipText) : null,
346
348
  position: triggerButtonTooltipPosition,
347
349
  hideTooltipOnClick: true
@@ -350,7 +352,7 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
350
352
 
351
353
 
352
354
  if (integrationMode === 'split' && shareIntegrations !== null && shareIntegrations !== void 0 && shareIntegrations.length) {
353
- button = /*#__PURE__*/React.createElement(SplitButton, {
355
+ button = jsx(SplitButton, {
354
356
  shareButton: button,
355
357
  handleOpenSplitButton: this.handleOpenSplitButton,
356
358
  handleCloseSplitButton: this.handleCloseSplitButton,
@@ -432,14 +434,15 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
432
434
  } : undefined;
433
435
  const footer = resolveShareFooter(integrationMode, this.state.tabIndex, customFooter); // for performance purposes, we may want to have a loadable content i.e. ShareForm
434
436
 
435
- return /*#__PURE__*/React.createElement(ShareButtonWrapper, {
437
+ return jsx("div", {
438
+ css: shareButtonWrapperStyles,
436
439
  tabIndex: tabIndex,
437
440
  onKeyDown: this.handleKeyDown,
438
441
  style: style
439
- }, /*#__PURE__*/React.createElement(Popup, {
440
- content: () => /*#__PURE__*/React.createElement("div", {
442
+ }, jsx(Popup, {
443
+ content: () => jsx("div", {
441
444
  ref: this.containerRef
442
- }, /*#__PURE__*/React.createElement(LazyShareFormLazy, {
445
+ }, jsx(LazyShareFormLazy, {
443
446
  Content: selectedIntegration && selectedIntegration.Content,
444
447
  selectedIntegration: selectedIntegration,
445
448
  copyLink: copyLink,
@@ -481,9 +484,9 @@ export class ShareDialogWithTriggerInternal extends React.PureComponent {
481
484
  placement: dialogPlacement,
482
485
  trigger: this.renderShareTriggerButton,
483
486
  zIndex: dialogZIndex
484
- }), /*#__PURE__*/React.createElement(Portal, {
487
+ }), jsx(Portal, {
485
488
  zIndex: generateSelectZIndex(dialogZIndex)
486
- }, /*#__PURE__*/React.createElement("div", {
489
+ }, jsx("div", {
487
490
  ref: this.selectPortalRef
488
491
  })));
489
492
  }
@@ -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,
@@ -147,22 +155,26 @@ class InternalForm extends React.PureComponent {
147
155
  const buttonAppearance = !shouldShowWarning ? 'primary' : 'warning';
148
156
  const tabMode = integrationMode === 'tabs';
149
157
  const formPublicLabel = tabMode ? messages.formSharePublic : messages.formSendPublic;
150
- const formSendLabel = tabMode ? messages.formShare : messages.formSend;
158
+ const formSendLabel = messages.formShare;
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.2.6",
5
+ packageVersion: "3.4.0",
6
6
  ...attributes
7
7
  });
8
8
 
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/share",
3
- "version": "3.2.6"
3
+ "version": "3.4.0"
4
4
  }