@atlaskit/media-ui 27.2.0 → 27.3.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 +14 -0
- package/abuseModal/package.json +17 -0
- package/dist/cjs/MediaInlineCard/Frame/styled-compiled.js +1 -1
- package/dist/cjs/MediaInlineCard/Frame/styled-emotion.js +1 -0
- package/dist/cjs/MediaInlineCard/Icon-compiled.js +1 -1
- package/dist/cjs/MediaInlineCard/IconAndTitleLayout/styled-compiled.js +1 -1
- package/dist/cjs/MediaInlineCard/LoadingView/styled-compiled.js +1 -1
- package/dist/cjs/MediaInlineCard/styled-compiled.js +1 -1
- package/dist/cjs/abuseModal/abuseModal.js +72 -0
- package/dist/cjs/abuseModal/index.js +12 -0
- package/dist/cjs/customMediaPlayer/index-compiled.js +1 -1
- package/dist/cjs/customMediaPlayer/index.js +1 -1
- package/dist/cjs/customMediaPlayer/playPauseBlanket-compiled.js +1 -1
- package/dist/cjs/customMediaPlayer/styled-compiled.js +1 -1
- package/dist/cjs/ellipsify-compiled.js +1 -1
- package/dist/cjs/inactivityDetector/styled-compiled.js +1 -1
- package/dist/cjs/media-type-icon-compiled.js +1 -1
- package/dist/cjs/mime-type-icon.js +1 -1
- package/dist/cjs/modalSpinner-compiled.js +1 -1
- package/dist/cjs/truncateText-compiled.js +1 -1
- package/dist/es2019/MediaInlineCard/Frame/styled-compiled.js +1 -1
- package/dist/es2019/MediaInlineCard/Frame/styled-emotion.js +1 -0
- package/dist/es2019/MediaInlineCard/Icon-compiled.js +1 -1
- package/dist/es2019/MediaInlineCard/IconAndTitleLayout/styled-compiled.js +1 -1
- package/dist/es2019/MediaInlineCard/LoadingView/styled-compiled.js +1 -1
- package/dist/es2019/MediaInlineCard/styled-compiled.js +1 -1
- package/dist/es2019/abuseModal/abuseModal.js +55 -0
- package/dist/es2019/abuseModal/index.js +4 -0
- package/dist/es2019/customMediaPlayer/index-compiled.js +1 -1
- package/dist/es2019/customMediaPlayer/index.js +1 -1
- package/dist/es2019/customMediaPlayer/playPauseBlanket-compiled.js +1 -1
- package/dist/es2019/customMediaPlayer/styled-compiled.js +1 -1
- package/dist/es2019/ellipsify-compiled.js +1 -1
- package/dist/es2019/inactivityDetector/styled-compiled.js +1 -1
- package/dist/es2019/media-type-icon-compiled.js +1 -1
- package/dist/es2019/mime-type-icon.js +1 -1
- package/dist/es2019/modalSpinner-compiled.js +1 -1
- package/dist/es2019/truncateText-compiled.js +1 -1
- package/dist/esm/MediaInlineCard/Frame/styled-compiled.js +1 -1
- package/dist/esm/MediaInlineCard/Frame/styled-emotion.js +1 -0
- package/dist/esm/MediaInlineCard/Icon-compiled.js +1 -1
- package/dist/esm/MediaInlineCard/IconAndTitleLayout/styled-compiled.js +1 -1
- package/dist/esm/MediaInlineCard/LoadingView/styled-compiled.js +1 -1
- package/dist/esm/MediaInlineCard/styled-compiled.js +1 -1
- package/dist/esm/abuseModal/abuseModal.js +62 -0
- package/dist/esm/abuseModal/index.js +4 -0
- package/dist/esm/customMediaPlayer/index-compiled.js +1 -1
- package/dist/esm/customMediaPlayer/index.js +1 -1
- package/dist/esm/customMediaPlayer/playPauseBlanket-compiled.js +1 -1
- package/dist/esm/customMediaPlayer/styled-compiled.js +1 -1
- package/dist/esm/ellipsify-compiled.js +1 -1
- package/dist/esm/inactivityDetector/styled-compiled.js +1 -1
- package/dist/esm/media-type-icon-compiled.js +1 -1
- package/dist/esm/mime-type-icon.js +1 -1
- package/dist/esm/modalSpinner-compiled.js +1 -1
- package/dist/esm/truncateText-compiled.js +1 -1
- package/dist/types/abuseModal/abuseModal.d.ts +7 -0
- package/dist/types/abuseModal/index.d.ts +4 -0
- package/dist/types-ts4.5/abuseModal/abuseModal.d.ts +7 -0
- package/dist/types-ts4.5/abuseModal/index.d.ts +4 -0
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/media-ui
|
|
2
2
|
|
|
3
|
+
## 27.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 27.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#97492](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97492)
|
|
14
|
+
[`5195c4fd974a3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5195c4fd974a3) -
|
|
15
|
+
Exported common modal dialog for for abuse-classified file downloads
|
|
16
|
+
|
|
3
17
|
## 27.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/media-ui/abuseModal",
|
|
3
|
+
"main": "../dist/cjs/abuseModal/index.js",
|
|
4
|
+
"module": "../dist/esm/abuseModal/index.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/abuseModal/index.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/abuseModal/index.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.4": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/abuseModal/index.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -33,6 +33,7 @@ var isSelected = function isSelected(_ref) {
|
|
|
33
33
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
34
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
35
|
var Wrapper = exports.Wrapper = _styled.default.span({
|
|
36
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
36
37
|
lineHeight: '16px',
|
|
37
38
|
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-025, 2px)", " ", "var(--ds-space-050, 4px)"),
|
|
38
39
|
boxDecorationBreak: 'clone',
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.AbuseModal = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
|
|
12
|
+
var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
|
|
13
|
+
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
14
|
+
var _primitives = require("@atlaskit/primitives");
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
var gridStyles = (0, _primitives.xcss)({
|
|
18
|
+
width: '100%'
|
|
19
|
+
});
|
|
20
|
+
var closeContainerStyles = (0, _primitives.xcss)({
|
|
21
|
+
gridArea: 'close'
|
|
22
|
+
});
|
|
23
|
+
var titleContainerStyles = (0, _primitives.xcss)({
|
|
24
|
+
gridArea: 'title'
|
|
25
|
+
});
|
|
26
|
+
var AbuseModal = exports.AbuseModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
27
|
+
var onConfirm = _ref.onConfirm,
|
|
28
|
+
shouldMount = _ref.shouldMount;
|
|
29
|
+
var _useState = (0, _react.useState)(false),
|
|
30
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
31
|
+
isOpen = _useState2[0],
|
|
32
|
+
setIsOpen = _useState2[1];
|
|
33
|
+
var closeModal = (0, _react.useCallback)(function () {
|
|
34
|
+
return setIsOpen(false);
|
|
35
|
+
}, []);
|
|
36
|
+
var confirm = (0, _react.useCallback)(function () {
|
|
37
|
+
onConfirm === null || onConfirm === void 0 || onConfirm();
|
|
38
|
+
closeModal();
|
|
39
|
+
}, [onConfirm, closeModal]);
|
|
40
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
41
|
+
return function () {
|
|
42
|
+
return setIsOpen(true);
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
return !shouldMount ? null : /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
46
|
+
onClose: closeModal,
|
|
47
|
+
testId: "mediaAbuseModal"
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_primitives.Grid, {
|
|
49
|
+
gap: "space.200",
|
|
50
|
+
templateAreas: ['title close'],
|
|
51
|
+
xcss: gridStyles
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
53
|
+
xcss: closeContainerStyles,
|
|
54
|
+
justifyContent: "end"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
56
|
+
appearance: "subtle",
|
|
57
|
+
icon: _closeCross.default,
|
|
58
|
+
label: "Close Modal",
|
|
59
|
+
onClick: closeModal
|
|
60
|
+
})), /*#__PURE__*/_react.default.createElement(_primitives.Flex, {
|
|
61
|
+
xcss: titleContainerStyles,
|
|
62
|
+
justifyContent: "start"
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
|
|
64
|
+
appearance: "warning"
|
|
65
|
+
}, "Warning")))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, "This file has been labelled as abusive. Please proceed with caution."), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
66
|
+
appearance: "subtle",
|
|
67
|
+
onClick: closeModal
|
|
68
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
69
|
+
appearance: "warning",
|
|
70
|
+
onClick: confirm
|
|
71
|
+
}, "Proceed with download"))));
|
|
72
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AbuseModal", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _abuseModal.AbuseModal;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _abuseModal = require("./abuseModal");
|
|
@@ -16,7 +16,7 @@ var CustomMediaPlayerBase = exports.CustomMediaPlayerBase = function CustomMedia
|
|
|
16
16
|
return (0, _platformFeatureFlags.fg)('platform_media_compiled') ? /*#__PURE__*/_react.default.createElement(_indexCompiled.CustomMediaPlayerBase, props) : /*#__PURE__*/_react.default.createElement(_indexEmotion.CustomMediaPlayerBase, props);
|
|
17
17
|
};
|
|
18
18
|
var packageName = "@atlaskit/media-ui";
|
|
19
|
-
var packageVersion = "27.
|
|
19
|
+
var packageVersion = "27.3.1";
|
|
20
20
|
|
|
21
21
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
22
22
|
var CustomMediaPlayer = exports.CustomMediaPlayer = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -35,6 +35,7 @@ const isSelected = ({
|
|
|
35
35
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
36
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
37
37
|
export const Wrapper = styled.span({
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
38
39
|
lineHeight: '16px',
|
|
39
40
|
padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`,
|
|
40
41
|
boxDecorationBreak: 'clone',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React, { useCallback, useState, useImperativeHandle, forwardRef } from 'react';
|
|
2
|
+
import Button, { IconButton } from '@atlaskit/button/new';
|
|
3
|
+
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
4
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
5
|
+
import { Flex, Grid, xcss } from '@atlaskit/primitives';
|
|
6
|
+
const gridStyles = xcss({
|
|
7
|
+
width: '100%'
|
|
8
|
+
});
|
|
9
|
+
const closeContainerStyles = xcss({
|
|
10
|
+
gridArea: 'close'
|
|
11
|
+
});
|
|
12
|
+
const titleContainerStyles = xcss({
|
|
13
|
+
gridArea: 'title'
|
|
14
|
+
});
|
|
15
|
+
export const AbuseModal = /*#__PURE__*/forwardRef(({
|
|
16
|
+
onConfirm,
|
|
17
|
+
shouldMount
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
20
|
+
const closeModal = useCallback(() => setIsOpen(false), []);
|
|
21
|
+
const confirm = useCallback(() => {
|
|
22
|
+
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
23
|
+
closeModal();
|
|
24
|
+
}, [onConfirm, closeModal]);
|
|
25
|
+
useImperativeHandle(ref, () => {
|
|
26
|
+
return () => setIsOpen(true);
|
|
27
|
+
}, []);
|
|
28
|
+
return !shouldMount ? null : /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(Modal, {
|
|
29
|
+
onClose: closeModal,
|
|
30
|
+
testId: "mediaAbuseModal"
|
|
31
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(Grid, {
|
|
32
|
+
gap: "space.200",
|
|
33
|
+
templateAreas: ['title close'],
|
|
34
|
+
xcss: gridStyles
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
36
|
+
xcss: closeContainerStyles,
|
|
37
|
+
justifyContent: "end"
|
|
38
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
39
|
+
appearance: "subtle",
|
|
40
|
+
icon: CrossIcon,
|
|
41
|
+
label: "Close Modal",
|
|
42
|
+
onClick: closeModal
|
|
43
|
+
})), /*#__PURE__*/React.createElement(Flex, {
|
|
44
|
+
xcss: titleContainerStyles,
|
|
45
|
+
justifyContent: "start"
|
|
46
|
+
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
47
|
+
appearance: "warning"
|
|
48
|
+
}, "Warning")))), /*#__PURE__*/React.createElement(ModalBody, null, "This file has been labelled as abusive. Please proceed with caution."), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
49
|
+
appearance: "subtle",
|
|
50
|
+
onClick: closeModal
|
|
51
|
+
}, "Cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
52
|
+
appearance: "warning",
|
|
53
|
+
onClick: confirm
|
|
54
|
+
}, "Proceed with download"))));
|
|
55
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import "./index-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -7,7 +7,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
7
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
8
8
|
export const CustomMediaPlayerBase = props => fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(CompiledCustomMediaPlayerBase, props) : /*#__PURE__*/React.createElement(EmotionCustomMediaPlayerBase, props);
|
|
9
9
|
const packageName = "@atlaskit/media-ui";
|
|
10
|
-
const packageVersion = "27.
|
|
10
|
+
const packageVersion = "27.3.1";
|
|
11
11
|
|
|
12
12
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
13
13
|
export const CustomMediaPlayer = withMediaAnalyticsContext({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* playPauseBlanket-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* playPauseBlanket-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./playPauseBlanket-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ellipsify-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ellipsify-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import "./ellipsify-compiled.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./styled-compiled.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* media-type-icon-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* media-type-icon-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import "./media-type-icon-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modalSpinner-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* modalSpinner-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import "./modalSpinner-compiled.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* truncateText-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* truncateText-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./truncateText-compiled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["isSelected", "children"];
|
|
@@ -25,6 +25,7 @@ var isSelected = function isSelected(_ref) {
|
|
|
25
25
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
27
|
export var Wrapper = styled.span({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
28
29
|
lineHeight: '16px',
|
|
29
30
|
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-025, 2px)", " ", "var(--ds-space-050, 4px)"),
|
|
30
31
|
boxDecorationBreak: 'clone',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Icon-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* Icon-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["alt"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children"];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useCallback, useState, useImperativeHandle, forwardRef } from 'react';
|
|
3
|
+
import Button, { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
5
|
+
import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
6
|
+
import { Flex, Grid, xcss } from '@atlaskit/primitives';
|
|
7
|
+
var gridStyles = xcss({
|
|
8
|
+
width: '100%'
|
|
9
|
+
});
|
|
10
|
+
var closeContainerStyles = xcss({
|
|
11
|
+
gridArea: 'close'
|
|
12
|
+
});
|
|
13
|
+
var titleContainerStyles = xcss({
|
|
14
|
+
gridArea: 'title'
|
|
15
|
+
});
|
|
16
|
+
export var AbuseModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
17
|
+
var onConfirm = _ref.onConfirm,
|
|
18
|
+
shouldMount = _ref.shouldMount;
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
isOpen = _useState2[0],
|
|
22
|
+
setIsOpen = _useState2[1];
|
|
23
|
+
var closeModal = useCallback(function () {
|
|
24
|
+
return setIsOpen(false);
|
|
25
|
+
}, []);
|
|
26
|
+
var confirm = useCallback(function () {
|
|
27
|
+
onConfirm === null || onConfirm === void 0 || onConfirm();
|
|
28
|
+
closeModal();
|
|
29
|
+
}, [onConfirm, closeModal]);
|
|
30
|
+
useImperativeHandle(ref, function () {
|
|
31
|
+
return function () {
|
|
32
|
+
return setIsOpen(true);
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
return !shouldMount ? null : /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(Modal, {
|
|
36
|
+
onClose: closeModal,
|
|
37
|
+
testId: "mediaAbuseModal"
|
|
38
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(Grid, {
|
|
39
|
+
gap: "space.200",
|
|
40
|
+
templateAreas: ['title close'],
|
|
41
|
+
xcss: gridStyles
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
43
|
+
xcss: closeContainerStyles,
|
|
44
|
+
justifyContent: "end"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
46
|
+
appearance: "subtle",
|
|
47
|
+
icon: CrossIcon,
|
|
48
|
+
label: "Close Modal",
|
|
49
|
+
onClick: closeModal
|
|
50
|
+
})), /*#__PURE__*/React.createElement(Flex, {
|
|
51
|
+
xcss: titleContainerStyles,
|
|
52
|
+
justifyContent: "start"
|
|
53
|
+
}, /*#__PURE__*/React.createElement(ModalTitle, {
|
|
54
|
+
appearance: "warning"
|
|
55
|
+
}, "Warning")))), /*#__PURE__*/React.createElement(ModalBody, null, "This file has been labelled as abusive. Please proceed with caution."), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
56
|
+
appearance: "subtle",
|
|
57
|
+
onClick: closeModal
|
|
58
|
+
}, "Cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
59
|
+
appearance: "warning",
|
|
60
|
+
onClick: confirm
|
|
61
|
+
}, "Proceed with download"))));
|
|
62
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
@@ -9,7 +9,7 @@ export var CustomMediaPlayerBase = function CustomMediaPlayerBase(props) {
|
|
|
9
9
|
return fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(CompiledCustomMediaPlayerBase, props) : /*#__PURE__*/React.createElement(EmotionCustomMediaPlayerBase, props);
|
|
10
10
|
};
|
|
11
11
|
var packageName = "@atlaskit/media-ui";
|
|
12
|
-
var packageVersion = "27.
|
|
12
|
+
var packageVersion = "27.3.1";
|
|
13
13
|
|
|
14
14
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
15
15
|
export var CustomMediaPlayer = withMediaAnalyticsContext({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* playPauseBlanket-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* playPauseBlanket-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["showSlider", "children"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ellipsify-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ellipsify-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import "./ellipsify-compiled.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["controlsAreVisible", "children"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* media-type-icon-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* media-type-icon-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* modalSpinner-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* modalSpinner-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import "./modalSpinner-compiled.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* truncateText-compiled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* truncateText-compiled.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["fontSizePX", "startFixedChars", "endFixedChars", "children"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-ui",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.3.1",
|
|
4
4
|
"description": "Includes common components and utilities used by other media packages",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,18 +28,19 @@
|
|
|
28
28
|
"@atlaskit/button": "^20.3.0",
|
|
29
29
|
"@atlaskit/code": "^15.6.0",
|
|
30
30
|
"@atlaskit/css": "^0.7.0",
|
|
31
|
-
"@atlaskit/icon": "^23.
|
|
31
|
+
"@atlaskit/icon": "^23.3.0",
|
|
32
32
|
"@atlaskit/icon-file-type": "^6.8.0",
|
|
33
33
|
"@atlaskit/legacy-custom-icons": "^0.20.0",
|
|
34
34
|
"@atlaskit/locale": "^2.8.0",
|
|
35
35
|
"@atlaskit/media-common": "^11.7.0",
|
|
36
|
+
"@atlaskit/modal-dialog": "^12.18.0",
|
|
36
37
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
37
38
|
"@atlaskit/primitives": "^13.3.0",
|
|
38
39
|
"@atlaskit/range": "^8.0.0",
|
|
39
40
|
"@atlaskit/select": "^18.9.0",
|
|
40
41
|
"@atlaskit/spinner": "^16.3.0",
|
|
41
42
|
"@atlaskit/theme": "^14.0.0",
|
|
42
|
-
"@atlaskit/tokens": "^
|
|
43
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
43
44
|
"@atlaskit/tooltip": "^19.0.0",
|
|
44
45
|
"@atlaskit/width-detector": "^4.3.0",
|
|
45
46
|
"@babel/runtime": "^7.0.0",
|
|
@@ -127,6 +128,7 @@
|
|
|
127
128
|
"./types": "./src/types.ts",
|
|
128
129
|
"./formatDate": "./src/formatDate.ts",
|
|
129
130
|
"./locales": "./src/locales.ts",
|
|
131
|
+
"./abuseModal": "./src/abuseModal/index.ts",
|
|
130
132
|
".": "./src/index.ts"
|
|
131
133
|
}
|
|
132
134
|
}
|