@atlaskit/share 4.22.1 → 4.23.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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/components/ShareForm.js +15 -3
- package/dist/cjs/components/ShareFormWrapper/styled.js +6 -0
- package/dist/cjs/components/analytics/analytics.js +1 -1
- package/dist/es2019/components/ShareForm.js +13 -3
- package/dist/es2019/components/ShareFormWrapper/styled.js +6 -0
- package/dist/es2019/components/analytics/analytics.js +1 -1
- package/dist/esm/components/ShareForm.js +15 -3
- package/dist/esm/components/ShareFormWrapper/styled.js +6 -0
- package/dist/esm/components/analytics/analytics.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/share
|
|
2
2
|
|
|
3
|
+
## 4.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#166181](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166181)
|
|
8
|
+
[`21e43f81fb5aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/21e43f81fb5aa) -
|
|
9
|
+
[ux] Added additional tab prop
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#167430](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167430)
|
|
14
|
+
[`c01f64d7d85f5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c01f64d7d85f5) -
|
|
15
|
+
Replace hard-coded font size with design tokens
|
|
16
|
+
|
|
3
17
|
## 4.22.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -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
|
-
|
|
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
|
-
},
|
|
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.
|
|
16
|
+
packageVersion: "4.23.0"
|
|
17
17
|
}, attributes);
|
|
18
18
|
};
|
|
19
19
|
var createEvent = function createEvent(eventType, source, action, actionSubject, actionSubjectId) {
|
|
@@ -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
|
-
|
|
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
|
-
},
|
|
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.
|
|
4
|
+
packageVersion: "4.23.0",
|
|
5
5
|
...attributes
|
|
6
6
|
});
|
|
7
7
|
const createEvent = (eventType, source, action, actionSubject, actionSubjectId, attributes = {}) => ({
|
|
@@ -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
|
-
|
|
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
|
-
},
|
|
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.
|
|
9
|
+
packageVersion: "4.23.0"
|
|
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.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "Fabric Share Element",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@atlaskit/button": "^20.3.0",
|
|
43
43
|
"@atlaskit/dropdown-menu": "^12.22.0",
|
|
44
44
|
"@atlaskit/form": "^10.5.0",
|
|
45
|
-
"@atlaskit/heading": "^3.
|
|
46
|
-
"@atlaskit/icon": "^22.
|
|
45
|
+
"@atlaskit/heading": "^3.1.0",
|
|
46
|
+
"@atlaskit/icon": "^22.25.0",
|
|
47
47
|
"@atlaskit/link": "^1.2.0",
|
|
48
48
|
"@atlaskit/menu": "^2.13.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
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.
|
|
59
|
+
"@atlaskit/tokens": "^2.3.0",
|
|
60
60
|
"@atlaskit/tooltip": "^18.9.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.3.0",
|
|
62
62
|
"@atlaskit/user-picker": "^10.27.0",
|