@atlaskit/media-avatar-picker 24.6.16 → 24.8.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 (67) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/avatar-picker-dialog/avatar-picker-dialog-error-boundary.js +22 -0
  3. package/dist/cjs/avatar-picker-dialog/avatar-picker-dialog-loader.js +18 -91
  4. package/dist/cjs/avatar-picker-dialog/custom-spinner.js +15 -0
  5. package/dist/cjs/avatar-picker-dialog/index.js +2 -2
  6. package/dist/cjs/avatar-picker-dialog/styles.js +1 -2
  7. package/dist/cjs/image-cropper/index.js +2 -2
  8. package/dist/cjs/image-navigator/index.js +5 -5
  9. package/dist/cjs/image-navigator/slider.js +1 -1
  10. package/dist/cjs/image-placer/container.js +5 -5
  11. package/dist/cjs/image-placer/image.js +1 -1
  12. package/dist/cjs/image-placer/index.js +1 -1
  13. package/dist/cjs/image-placer/margin.js +1 -1
  14. package/dist/cjs/predefined-avatar-view/styles.js +1 -2
  15. package/dist/es2019/avatar-picker-dialog/avatar-picker-dialog-error-boundary.js +10 -0
  16. package/dist/es2019/avatar-picker-dialog/avatar-picker-dialog-loader.js +9 -42
  17. package/dist/es2019/avatar-picker-dialog/custom-spinner.js +8 -0
  18. package/dist/es2019/avatar-picker-dialog/styles.js +1 -2
  19. package/dist/es2019/predefined-avatar-view/styles.js +1 -2
  20. package/dist/esm/avatar-picker-dialog/avatar-picker-dialog-error-boundary.js +12 -0
  21. package/dist/esm/avatar-picker-dialog/avatar-picker-dialog-loader.js +13 -87
  22. package/dist/esm/avatar-picker-dialog/custom-spinner.js +8 -0
  23. package/dist/esm/avatar-picker-dialog/index.js +1 -1
  24. package/dist/esm/avatar-picker-dialog/styles.js +1 -2
  25. package/dist/esm/image-cropper/index.js +1 -1
  26. package/dist/esm/image-navigator/index.js +4 -4
  27. package/dist/esm/image-navigator/slider.js +1 -1
  28. package/dist/esm/image-placer/container.js +5 -5
  29. package/dist/esm/image-placer/image.js +1 -1
  30. package/dist/esm/image-placer/index.js +1 -1
  31. package/dist/esm/image-placer/margin.js +1 -1
  32. package/dist/esm/predefined-avatar-view/styles.js +1 -2
  33. package/dist/types/avatar-picker-dialog/avatar-picker-dialog-error-boundary.d.ts +6 -0
  34. package/dist/types/avatar-picker-dialog/avatar-picker-dialog-loader.d.ts +4 -19
  35. package/dist/types/avatar-picker-dialog/custom-spinner.d.ts +2 -0
  36. package/dist/types-ts4.5/avatar-picker-dialog/avatar-picker-dialog-error-boundary.d.ts +6 -0
  37. package/dist/types-ts4.5/avatar-picker-dialog/avatar-picker-dialog-loader.d.ts +4 -19
  38. package/dist/types-ts4.5/avatar-picker-dialog/custom-spinner.d.ts +2 -0
  39. package/example-helpers/index.ts +6 -5
  40. package/example-helpers/samples/avatar-1.svg +32 -0
  41. package/example-helpers/samples/avatar-10.svg +29 -0
  42. package/example-helpers/samples/avatar-11.svg +37 -0
  43. package/example-helpers/samples/avatar-12.svg +38 -0
  44. package/example-helpers/samples/avatar-13.svg +32 -0
  45. package/example-helpers/samples/avatar-14.svg +28 -0
  46. package/example-helpers/samples/avatar-15.svg +27 -0
  47. package/example-helpers/samples/avatar-16.svg +25 -0
  48. package/example-helpers/samples/avatar-17.svg +47 -0
  49. package/example-helpers/samples/avatar-18.svg +30 -0
  50. package/example-helpers/samples/avatar-19.svg +35 -0
  51. package/example-helpers/samples/avatar-2.svg +31 -0
  52. package/example-helpers/samples/avatar-20.svg +25 -0
  53. package/example-helpers/samples/avatar-21.svg +27 -0
  54. package/example-helpers/samples/avatar-22.svg +36 -0
  55. package/example-helpers/samples/avatar-23.svg +25 -0
  56. package/example-helpers/samples/avatar-24.svg +22 -0
  57. package/example-helpers/samples/avatar-25.svg +23 -0
  58. package/example-helpers/samples/avatar-26.svg +26 -0
  59. package/example-helpers/samples/avatar-3.svg +30 -0
  60. package/example-helpers/samples/avatar-4.svg +33 -0
  61. package/example-helpers/samples/avatar-5.svg +34 -0
  62. package/example-helpers/samples/avatar-6.svg +35 -0
  63. package/example-helpers/samples/avatar-7.svg +32 -0
  64. package/example-helpers/samples/avatar-8.svg +35 -0
  65. package/example-helpers/samples/avatar-9.svg +27 -0
  66. package/example-helpers/samples/index.ts +55 -0
  67. package/package.json +10 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/media-avatar-picker
2
2
 
3
+ ## 24.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#140915](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140915)
8
+ [`36b5acc412af5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/36b5acc412af5) -
9
+ Design system typography uplift
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 24.7.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#136440](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136440)
20
+ [`57f424ae5180e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/57f424ae5180e) -
21
+ Added compatibility with React 18
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 24.6.16
4
28
 
5
29
  ### Patch Changes
@@ -0,0 +1,22 @@
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.default = AvatarPickerDialogErrorBoundary;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _reactErrorBoundary = require("react-error-boundary");
11
+ var _ = _interopRequireDefault(require("./"));
12
+ var _customSpinner = require("./custom-spinner");
13
+ 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); }
14
+ 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; }
15
+ function AvatarPickerDialogErrorBoundary(props) {
16
+ var ErrorBoundaryFallback = (0, _react.useCallback)(function () {
17
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.placeholder || /*#__PURE__*/_react.default.createElement(_customSpinner.CustomSpinner, null));
18
+ }, [props.placeholder]);
19
+ return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
20
+ FallbackComponent: ErrorBoundaryFallback
21
+ }, /*#__PURE__*/_react.default.createElement(_.default, props));
22
+ }
@@ -1,98 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
- exports.default = void 0;
9
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
14
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
17
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
- var _react = _interopRequireDefault(require("react"));
19
- var _mediaUi = require("@atlaskit/media-ui");
7
+ exports.default = AsyncAvatarPickerDialog;
8
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _customSpinner = require("./custom-spinner");
20
11
  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); }
21
- 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 && Object.prototype.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; }
22
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
23
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
- var AsyncAvatarPickerDialog = exports.default = /*#__PURE__*/function (_React$PureComponent) {
25
- (0, _inherits2.default)(AsyncAvatarPickerDialog, _React$PureComponent);
26
- var _super = _createSuper(AsyncAvatarPickerDialog);
27
- function AsyncAvatarPickerDialog() {
28
- var _this;
29
- (0, _classCallCheck2.default)(this, AsyncAvatarPickerDialog);
30
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
31
- args[_key] = arguments[_key];
32
- }
33
- _this = _super.call.apply(_super, [this].concat(args));
34
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
35
- // Set state value to equal to current static value of this class.
36
- AvatarPickerDialog: AsyncAvatarPickerDialog.AvatarPickerDialog
37
- });
38
- return _this;
39
- }
40
- (0, _createClass2.default)(AsyncAvatarPickerDialog, [{
41
- key: "UNSAFE_componentWillMount",
42
- value: function () {
43
- var _UNSAFE_componentWillMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
44
- var module;
45
- return _regenerator.default.wrap(function _callee$(_context) {
46
- while (1) switch (_context.prev = _context.next) {
47
- case 0:
48
- if (this.state.AvatarPickerDialog) {
49
- _context.next = 11;
50
- break;
51
- }
52
- _context.prev = 1;
53
- _context.next = 4;
54
- return Promise.resolve().then(function () {
55
- return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */
56
- '.'));
57
- });
58
- case 4:
59
- module = _context.sent;
60
- AsyncAvatarPickerDialog.AvatarPickerDialog = module.default;
61
- this.setState({
62
- AvatarPickerDialog: module.default
63
- });
64
- _context.next = 11;
65
- break;
66
- case 9:
67
- _context.prev = 9;
68
- _context.t0 = _context["catch"](1);
69
- case 11:
70
- case "end":
71
- return _context.stop();
72
- }
73
- }, _callee, this, [[1, 9]]);
74
- }));
75
- function UNSAFE_componentWillMount() {
76
- return _UNSAFE_componentWillMount.apply(this, arguments);
77
- }
78
- return UNSAFE_componentWillMount;
79
- }()
80
- }, {
81
- key: "render",
82
- value: function render() {
83
- if (!this.state.AvatarPickerDialog) {
84
- var placeholder = this.props.placeholder;
85
- if (placeholder) {
86
- return placeholder;
87
- }
88
- return /*#__PURE__*/_react.default.createElement(_mediaUi.ModalSpinner, {
89
- blankedColor: "var(--ds-blanket, rgba(255, 255, 255, 0.53))",
90
- invertSpinnerColor: false
91
- });
92
- }
93
- return /*#__PURE__*/_react.default.createElement(this.state.AvatarPickerDialog, this.props);
94
- }
95
- }]);
96
- return AsyncAvatarPickerDialog;
97
- }(_react.default.PureComponent);
98
- (0, _defineProperty2.default)(AsyncAvatarPickerDialog, "displayName", 'AsyncAvatarPickerDialog');
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(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; }
13
+ var AvatarPickerDialogErrorBoundary = /*#__PURE__*/(0, _react.lazy)(function () {
14
+ return Promise.resolve().then(function () {
15
+ return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */'./avatar-picker-dialog-error-boundary'));
16
+ });
17
+ });
18
+ function AsyncAvatarPickerDialog(props) {
19
+ var SuspenseFallback = (0, _react.useCallback)(function () {
20
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.placeholder || /*#__PURE__*/_react.default.createElement(_customSpinner.CustomSpinner, null));
21
+ }, [props.placeholder]);
22
+ return /*#__PURE__*/_react.default.createElement(_react.Suspense, {
23
+ fallback: /*#__PURE__*/_react.default.createElement(SuspenseFallback, null)
24
+ }, /*#__PURE__*/_react.default.createElement(AvatarPickerDialogErrorBoundary, props));
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.CustomSpinner = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _mediaUi = require("@atlaskit/media-ui");
10
+ var CustomSpinner = exports.CustomSpinner = function CustomSpinner() {
11
+ return /*#__PURE__*/_react.default.createElement(_mediaUi.ModalSpinner, {
12
+ blankedColor: "var(--ds-blanket, rgba(255, 255, 255, 0.53))",
13
+ invertSpinnerColor: false
14
+ });
15
+ };
@@ -36,8 +36,8 @@ var _SRLiveTitle = require("./SRLiveTitle");
36
36
  var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
37
37
  var _SubmitErrorDialog = require("./SubmitErrorDialog");
38
38
  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); }
39
- 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 && Object.prototype.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; }
40
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
39
+ 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; }
40
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
41
41
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
42
42
  * @jsxRuntime classic
43
43
  * @jsx jsx
@@ -32,7 +32,6 @@ var modalHeaderStyles = exports.modalHeaderStyles = (0, _react.css)({
32
32
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
33
33
  '&&': {
34
34
  margin: "var(--ds-space-200, 16px)",
35
- fontWeight: 500,
36
- fontSize: '20px'
35
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
37
36
  }
38
37
  });
@@ -25,8 +25,8 @@ var _primitives = require("@atlaskit/primitives");
25
25
  var _avatarPickerDialog = require("../avatar-picker-dialog");
26
26
  var _layoutConst = require("../avatar-picker-dialog/layout-const");
27
27
  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); }
28
- 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 && Object.prototype.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; }
29
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
28
+ 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; }
29
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
30
30
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
31
31
  var removeImageContainerStyles = (0, _primitives.xcss)({
32
32
  position: 'absolute',
@@ -34,8 +34,8 @@ var _layoutConst = require("../avatar-picker-dialog/layout-const");
34
34
  var _dragZone = require("./dragZone");
35
35
  var _exportCroppedImage = require("./exportCroppedImage");
36
36
  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); }
37
- 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 && Object.prototype.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; }
38
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
37
+ 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; }
38
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
39
39
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
40
40
  * @jsxRuntime classic
41
41
  * @jsx jsx
@@ -149,12 +149,12 @@ var ImageNavigator = exports.ImageNavigator = /*#__PURE__*/function (_Component)
149
149
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onFileChange", function (e) {
150
150
  e.stopPropagation();
151
151
  if (e.currentTarget.files && e.currentTarget.files.length) {
152
- var _file = e.currentTarget.files[0];
153
- var validationError = _this.validateFile(_file);
152
+ var file = e.currentTarget.files[0];
153
+ var validationError = _this.validateFile(file);
154
154
  if (validationError) {
155
155
  _this.props.onImageError(validationError);
156
156
  } else {
157
- _this.readFile(_file);
157
+ _this.readFile(file);
158
158
  }
159
159
  }
160
160
  });
@@ -18,7 +18,7 @@ var _scaleLarge = _interopRequireDefault(require("@atlaskit/icon/glyph/media-ser
18
18
  var _scaleSmall = _interopRequireDefault(require("@atlaskit/icon/glyph/media-services/scale-small"));
19
19
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
20
20
  var _styles = require("./styles");
21
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
22
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
23
23
  * @jsxRuntime classic
24
24
  * @jsx jsx
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _mediaUi = require("@atlaskit/media-ui");
17
17
  var _containerWrapper = require("./containerWrapper");
18
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
18
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
19
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
20
20
  * The Container is responsible for implementing the mouse/touch events.
21
21
  * This way, you can still move the image without clicking directly on it.
@@ -48,8 +48,8 @@ var ImagePlacerContainer = exports.ImagePlacerContainer = /*#__PURE__*/function
48
48
  var _assertThisInitialize = (0, _assertThisInitialized2.default)(_this),
49
49
  dragClientStart = _assertThisInitialize.dragClientStart;
50
50
  if (dragClientStart) {
51
- var _delta = new _mediaUi.Vector2(e.clientX - dragClientStart.x, e.clientY - dragClientStart.y);
52
- _this.props.onDragMove(_delta);
51
+ var delta = new _mediaUi.Vector2(e.clientX - dragClientStart.x, e.clientY - dragClientStart.y);
52
+ _this.props.onDragMove(delta);
53
53
  }
54
54
  });
55
55
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onTouchMove", function (e) {
@@ -58,8 +58,8 @@ var ImagePlacerContainer = exports.ImagePlacerContainer = /*#__PURE__*/function
58
58
  if (e.touches && e.touches.length >= 1) {
59
59
  var touch = e.touches[0];
60
60
  if (touch && dragClientStart) {
61
- var _delta2 = new _mediaUi.Vector2(touch.clientX - dragClientStart.x, touch.clientY - dragClientStart.y);
62
- _this.props.onDragMove(_delta2);
61
+ var delta = new _mediaUi.Vector2(touch.clientX - dragClientStart.x, touch.clientY - dragClientStart.y);
62
+ _this.props.onDragMove(delta);
63
63
  }
64
64
  }
65
65
  });
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _isImageRemote = require("../image-cropper/isImageRemote");
17
17
  var _imageWrapper = require("./imageWrapper");
18
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
18
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
19
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
20
  // TODO: i18n https://product-fabric.atlassian.net/browse/MS-1261
21
21
  var IMAGE_ERRORS = exports.IMAGE_ERRORS = {
@@ -25,7 +25,7 @@ var _styles = require("./styles");
25
25
  var _imageProcessor = require("./imageProcessor");
26
26
  var _constraints = require("./constraints");
27
27
  var _imagePlacerErrorWrapper = require("./imagePlacerErrorWrapper");
28
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
28
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
29
29
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
30
30
  * @jsxRuntime classic
31
31
  * @jsx jsx
@@ -14,7 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _react = require("@emotion/react");
15
15
  var _react2 = _interopRequireDefault(require("react"));
16
16
  var _styles = require("./styles");
17
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
17
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
18
18
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
19
19
  * @jsxRuntime classic
20
20
  * @jsx jsx
@@ -49,8 +49,7 @@ var predefinedAvatarViewWrapperStyles = exports.predefinedAvatarViewWrapperStyle
49
49
  '.description': {
50
50
  paddingLeft: "var(--ds-space-100, 8px)",
51
51
  margin: 0,
52
- fontSize: '14px',
53
- fontWeight: 400
52
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
54
53
  },
55
54
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
56
55
  '.back-button': {
@@ -0,0 +1,10 @@
1
+ import React, { useCallback } from 'react';
2
+ import { ErrorBoundary } from 'react-error-boundary';
3
+ import AvatarPickerDialog from './';
4
+ import { CustomSpinner } from './custom-spinner';
5
+ export default function AvatarPickerDialogErrorBoundary(props) {
6
+ const ErrorBoundaryFallback = useCallback(() => /*#__PURE__*/React.createElement(React.Fragment, null, props.placeholder || /*#__PURE__*/React.createElement(CustomSpinner, null)), [props.placeholder]);
7
+ return /*#__PURE__*/React.createElement(ErrorBoundary, {
8
+ FallbackComponent: ErrorBoundaryFallback
9
+ }, /*#__PURE__*/React.createElement(AvatarPickerDialog, props));
10
+ }
@@ -1,42 +1,9 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import React from 'react';
3
- import { ModalSpinner } from '@atlaskit/media-ui';
4
- export default class AsyncAvatarPickerDialog extends React.PureComponent {
5
- constructor(...args) {
6
- super(...args);
7
- _defineProperty(this, "state", {
8
- // Set state value to equal to current static value of this class.
9
- AvatarPickerDialog: AsyncAvatarPickerDialog.AvatarPickerDialog
10
- });
11
- }
12
- async UNSAFE_componentWillMount() {
13
- if (!this.state.AvatarPickerDialog) {
14
- try {
15
- const module = await import( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */
16
- '.');
17
- AsyncAvatarPickerDialog.AvatarPickerDialog = module.default;
18
- this.setState({
19
- AvatarPickerDialog: module.default
20
- });
21
- } catch (error) {
22
- // TODO [MS-2272]: Add operational error to catch async import error
23
- }
24
- }
25
- }
26
- render() {
27
- if (!this.state.AvatarPickerDialog) {
28
- const {
29
- placeholder
30
- } = this.props;
31
- if (placeholder) {
32
- return placeholder;
33
- }
34
- return /*#__PURE__*/React.createElement(ModalSpinner, {
35
- blankedColor: `${"var(--ds-blanket, rgba(255, 255, 255, 0.53))"}`,
36
- invertSpinnerColor: false
37
- });
38
- }
39
- return /*#__PURE__*/React.createElement(this.state.AvatarPickerDialog, this.props);
40
- }
41
- }
42
- _defineProperty(AsyncAvatarPickerDialog, "displayName", 'AsyncAvatarPickerDialog');
1
+ import React, { lazy, Suspense, useCallback } from 'react';
2
+ import { CustomSpinner } from './custom-spinner';
3
+ const AvatarPickerDialogErrorBoundary = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */'./avatar-picker-dialog-error-boundary'));
4
+ export default function AsyncAvatarPickerDialog(props) {
5
+ const SuspenseFallback = useCallback(() => /*#__PURE__*/React.createElement(React.Fragment, null, props.placeholder || /*#__PURE__*/React.createElement(CustomSpinner, null)), [props.placeholder]);
6
+ return /*#__PURE__*/React.createElement(Suspense, {
7
+ fallback: /*#__PURE__*/React.createElement(SuspenseFallback, null)
8
+ }, /*#__PURE__*/React.createElement(AvatarPickerDialogErrorBoundary, props));
9
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ModalSpinner } from '@atlaskit/media-ui';
3
+ export const CustomSpinner = () => {
4
+ return /*#__PURE__*/React.createElement(ModalSpinner, {
5
+ blankedColor: `${"var(--ds-blanket, rgba(255, 255, 255, 0.53))"}`,
6
+ invertSpinnerColor: false
7
+ });
8
+ };
@@ -26,7 +26,6 @@ export const modalHeaderStyles = css({
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
27
27
  '&&': {
28
28
  margin: "var(--ds-space-200, 16px)",
29
- fontWeight: 500,
30
- fontSize: '20px'
29
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
31
30
  }
32
31
  });
@@ -43,8 +43,7 @@ export const predefinedAvatarViewWrapperStyles = css({
43
43
  '.description': {
44
44
  paddingLeft: "var(--ds-space-100, 8px)",
45
45
  margin: 0,
46
- fontSize: '14px',
47
- fontWeight: 400
46
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
48
47
  },
49
48
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
50
49
  '.back-button': {
@@ -0,0 +1,12 @@
1
+ import React, { useCallback } from 'react';
2
+ import { ErrorBoundary } from 'react-error-boundary';
3
+ import AvatarPickerDialog from './';
4
+ import { CustomSpinner } from './custom-spinner';
5
+ export default function AvatarPickerDialogErrorBoundary(props) {
6
+ var ErrorBoundaryFallback = useCallback(function () {
7
+ return /*#__PURE__*/React.createElement(React.Fragment, null, props.placeholder || /*#__PURE__*/React.createElement(CustomSpinner, null));
8
+ }, [props.placeholder]);
9
+ return /*#__PURE__*/React.createElement(ErrorBoundary, {
10
+ FallbackComponent: ErrorBoundaryFallback
11
+ }, /*#__PURE__*/React.createElement(AvatarPickerDialog, props));
12
+ }
@@ -1,87 +1,13 @@
1
- import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- import _regeneratorRuntime from "@babel/runtime/regenerator";
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
- import React from 'react';
13
- import { ModalSpinner } from '@atlaskit/media-ui';
14
- var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
15
- _inherits(AsyncAvatarPickerDialog, _React$PureComponent);
16
- var _super = _createSuper(AsyncAvatarPickerDialog);
17
- function AsyncAvatarPickerDialog() {
18
- var _this;
19
- _classCallCheck(this, AsyncAvatarPickerDialog);
20
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
21
- args[_key] = arguments[_key];
22
- }
23
- _this = _super.call.apply(_super, [this].concat(args));
24
- _defineProperty(_assertThisInitialized(_this), "state", {
25
- // Set state value to equal to current static value of this class.
26
- AvatarPickerDialog: AsyncAvatarPickerDialog.AvatarPickerDialog
27
- });
28
- return _this;
29
- }
30
- _createClass(AsyncAvatarPickerDialog, [{
31
- key: "UNSAFE_componentWillMount",
32
- value: function () {
33
- var _UNSAFE_componentWillMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
34
- var module;
35
- return _regeneratorRuntime.wrap(function _callee$(_context) {
36
- while (1) switch (_context.prev = _context.next) {
37
- case 0:
38
- if (this.state.AvatarPickerDialog) {
39
- _context.next = 11;
40
- break;
41
- }
42
- _context.prev = 1;
43
- _context.next = 4;
44
- return import( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */
45
- '.');
46
- case 4:
47
- module = _context.sent;
48
- AsyncAvatarPickerDialog.AvatarPickerDialog = module.default;
49
- this.setState({
50
- AvatarPickerDialog: module.default
51
- });
52
- _context.next = 11;
53
- break;
54
- case 9:
55
- _context.prev = 9;
56
- _context.t0 = _context["catch"](1);
57
- case 11:
58
- case "end":
59
- return _context.stop();
60
- }
61
- }, _callee, this, [[1, 9]]);
62
- }));
63
- function UNSAFE_componentWillMount() {
64
- return _UNSAFE_componentWillMount.apply(this, arguments);
65
- }
66
- return UNSAFE_componentWillMount;
67
- }()
68
- }, {
69
- key: "render",
70
- value: function render() {
71
- if (!this.state.AvatarPickerDialog) {
72
- var placeholder = this.props.placeholder;
73
- if (placeholder) {
74
- return placeholder;
75
- }
76
- return /*#__PURE__*/React.createElement(ModalSpinner, {
77
- blankedColor: "var(--ds-blanket, rgba(255, 255, 255, 0.53))",
78
- invertSpinnerColor: false
79
- });
80
- }
81
- return /*#__PURE__*/React.createElement(this.state.AvatarPickerDialog, this.props);
82
- }
83
- }]);
84
- return AsyncAvatarPickerDialog;
85
- }(React.PureComponent);
86
- _defineProperty(AsyncAvatarPickerDialog, "displayName", 'AsyncAvatarPickerDialog');
87
- export { AsyncAvatarPickerDialog as default };
1
+ import React, { lazy, Suspense, useCallback } from 'react';
2
+ import { CustomSpinner } from './custom-spinner';
3
+ var AvatarPickerDialogErrorBoundary = /*#__PURE__*/lazy(function () {
4
+ return import( /* webpackChunkName: "@atlaskit-internal_media-avatar-picker" */'./avatar-picker-dialog-error-boundary');
5
+ });
6
+ export default function AsyncAvatarPickerDialog(props) {
7
+ var SuspenseFallback = useCallback(function () {
8
+ return /*#__PURE__*/React.createElement(React.Fragment, null, props.placeholder || /*#__PURE__*/React.createElement(CustomSpinner, null));
9
+ }, [props.placeholder]);
10
+ return /*#__PURE__*/React.createElement(Suspense, {
11
+ fallback: /*#__PURE__*/React.createElement(SuspenseFallback, null)
12
+ }, /*#__PURE__*/React.createElement(AvatarPickerDialogErrorBoundary, props));
13
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ModalSpinner } from '@atlaskit/media-ui';
3
+ export var CustomSpinner = function CustomSpinner() {
4
+ return /*#__PURE__*/React.createElement(ModalSpinner, {
5
+ blankedColor: "var(--ds-blanket, rgba(255, 255, 255, 0.53))",
6
+ invertSpinnerColor: false
7
+ });
8
+ };
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  import _regeneratorRuntime from "@babel/runtime/regenerator";
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
12
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
13
  /**
14
14
  * @jsxRuntime classic
@@ -26,7 +26,6 @@ export var modalHeaderStyles = css({
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
27
27
  '&&': {
28
28
  margin: "var(--ds-space-200, 16px)",
29
- fontWeight: 500,
30
- fontSize: '20px'
29
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
31
30
  }
32
31
  });
@@ -6,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React from 'react';
12
12
  import { Component } from 'react';