@atlaskit/media-avatar-picker 28.1.9 → 28.2.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 +26 -0
- package/dist/cjs/avatar-list/index.js +2 -2
- package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +1 -1
- package/dist/cjs/avatar-picker-dialog/index.js +15 -10
- package/dist/cjs/image-cropper/index.js +2 -2
- package/dist/cjs/image-navigator/index.js +1 -1
- package/dist/cjs/image-navigator/slider.js +1 -1
- package/dist/es2019/avatar-list/index.js +1 -1
- package/dist/es2019/avatar-picker-dialog/SubmitErrorDialog.js +1 -1
- package/dist/es2019/avatar-picker-dialog/index.js +8 -3
- package/dist/es2019/image-cropper/index.js +1 -1
- package/dist/es2019/image-navigator/index.js +1 -1
- package/dist/es2019/image-navigator/slider.js +1 -1
- package/dist/esm/avatar-list/index.js +1 -1
- package/dist/esm/avatar-picker-dialog/SubmitErrorDialog.js +1 -1
- package/dist/esm/avatar-picker-dialog/index.js +8 -3
- package/dist/esm/image-cropper/index.js +1 -1
- package/dist/esm/image-navigator/index.js +1 -1
- package/dist/esm/image-navigator/slider.js +1 -1
- package/example-helpers/StatefulAvatarPickerDialog.tsx +1 -1
- package/package.json +17 -16
- package/media-avatar-picker.docs.tsx +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 28.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d82e6f76528ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d82e6f76528ab) -
|
|
8
|
+
Add direct subpath package exports as part of the linking-platform, search, media, and
|
|
9
|
+
design-system barrel-removal (de-barrel) migration.
|
|
10
|
+
|
|
11
|
+
These packages now expose their individual modules via explicit `package.json` `exports` subpaths
|
|
12
|
+
so that consumers can import directly from the leaf module (e.g. `@atlaskit/pkg/thing`) instead of
|
|
13
|
+
the package barrel/index. This adds new public entry points without changing or removing any
|
|
14
|
+
existing exports, so it is a backwards-compatible additive change.
|
|
15
|
+
|
|
16
|
+
No runtime behaviour changes; this is an API-surface (entry-point) addition to support
|
|
17
|
+
tree-shaking and to unblock removal of the barrel index files.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 28.1.10
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 28.1.9
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
18
|
-
var
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
20
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -47,7 +47,7 @@ var AvatarList = exports.AvatarList = function AvatarList(_ref) {
|
|
|
47
47
|
};
|
|
48
48
|
var cards = avatars.map(function (avatar, idx) {
|
|
49
49
|
var elementKey = "predefined-avatar-".concat(idx);
|
|
50
|
-
var fallbackAvatarLabel = (0,
|
|
50
|
+
var fallbackAvatarLabel = (0, _fg.fg)('platform_media_a11y_avatar_radio_label') ? intl.formatMessage(_mediaUi.messages.select_an_avatar_option, {
|
|
51
51
|
number: idx + 1
|
|
52
52
|
}) : undefined;
|
|
53
53
|
return /*#__PURE__*/React.createElement("label", {
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
15
|
-
var _flag = _interopRequireDefault(require("@atlaskit/flag"));
|
|
15
|
+
var _flag = _interopRequireDefault(require("@atlaskit/flag/flag"));
|
|
16
16
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
17
17
|
var _reactIntl = require("react-intl");
|
|
18
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -19,13 +19,18 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
19
19
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
21
|
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
-
var _modalDialog =
|
|
22
|
+
var _modalDialog = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-dialog"));
|
|
23
|
+
var _modalBody = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-body"));
|
|
24
|
+
var _modalFooter = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-footer"));
|
|
25
|
+
var _modalHeader = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-header"));
|
|
26
|
+
var _modalTitle = _interopRequireDefault(require("@atlaskit/modal-dialog/modal-title"));
|
|
23
27
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
24
28
|
var _reactIntl = require("react-intl");
|
|
25
|
-
var
|
|
29
|
+
var _field = _interopRequireDefault(require("@atlaskit/form/field"));
|
|
30
|
+
var _helperMessage = require("@atlaskit/form/helper-message");
|
|
26
31
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
27
32
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
28
|
-
var
|
|
33
|
+
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
29
34
|
var _imageNavigator = _interopRequireDefault(require("../image-navigator"));
|
|
30
35
|
var _predefinedAvatarList = require("../predefined-avatar-list");
|
|
31
36
|
var _predefinedAvatarView = require("../predefined-avatar-view");
|
|
@@ -233,7 +238,7 @@ var AvatarPickerDialog = exports.AvatarPickerDialog = /*#__PURE__*/function (_Pu
|
|
|
233
238
|
primaryButtonText = _this$props2.primaryButtonText,
|
|
234
239
|
onCancel = _this$props2.onCancel,
|
|
235
240
|
isLoading = _this$props2.isLoading;
|
|
236
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
241
|
+
return /*#__PURE__*/_react.default.createElement(_modalFooter.default, {
|
|
237
242
|
testId: "avatar-picker-dialog-footer"
|
|
238
243
|
}, /*#__PURE__*/_react.default.createElement(_buttonGroup.default, null, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
239
244
|
appearance: "default",
|
|
@@ -257,14 +262,14 @@ var AvatarPickerDialog = exports.AvatarPickerDialog = /*#__PURE__*/function (_Pu
|
|
|
257
262
|
onClose: this.props.onCancel
|
|
258
263
|
}, this.props.avatars.length > 0 && /*#__PURE__*/_react.default.createElement(_SRLiveTitle.SRLiveTitle, {
|
|
259
264
|
mode: this.state.mode
|
|
260
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
265
|
+
}), /*#__PURE__*/_react.default.createElement(_modalHeader.default, {
|
|
261
266
|
testId: "modal-header",
|
|
262
267
|
hasCloseButton: true
|
|
263
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
268
|
+
}, /*#__PURE__*/_react.default.createElement(_modalTitle.default, null, this.props.title || /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _mediaUi.messages.upload_an_avatar))), this.state.isSubmitted && /*#__PURE__*/_react.default.createElement(_SubmitErrorDialog.SubmitErrorDialog, null), /*#__PURE__*/_react.default.createElement("form", {
|
|
264
269
|
"aria-label": "form",
|
|
265
270
|
onSubmit: this.onSave,
|
|
266
271
|
className: (0, _runtime.ax)(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf"])
|
|
267
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
272
|
+
}, /*#__PURE__*/_react.default.createElement(_modalBody.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
268
273
|
className: (0, _runtime.ax)(["_1e0c1txw _1bah1h6o _4cvr1y6m _y3gn1h6o _1tkeqbeb"])
|
|
269
274
|
}, this.renderBody())), this.footerContent()));
|
|
270
275
|
return this.props.intl ? content : /*#__PURE__*/_react.default.createElement(_reactIntl.IntlProvider, {
|
|
@@ -360,18 +365,18 @@ var AvatarPickerDialog = exports.AvatarPickerDialog = /*#__PURE__*/function (_Pu
|
|
|
360
365
|
var altText = this.state.altText;
|
|
361
366
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
362
367
|
xcss: altTextFieldStyles.root
|
|
363
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
368
|
+
}, /*#__PURE__*/_react.default.createElement(_field.default, {
|
|
364
369
|
name: "altText",
|
|
365
370
|
isRequired: true,
|
|
366
371
|
label: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _mediaUi.messages.alt_text)
|
|
367
372
|
}, function (_ref2) {
|
|
368
373
|
var fieldProps = _ref2.fieldProps;
|
|
369
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
374
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_textField.default, (0, _extends2.default)({}, fieldProps, {
|
|
370
375
|
onChange: function onChange(event) {
|
|
371
376
|
return _this2.updateAltText(event.currentTarget.value);
|
|
372
377
|
},
|
|
373
378
|
value: altText || ''
|
|
374
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
379
|
+
})), /*#__PURE__*/_react.default.createElement(_helperMessage.HelperMessage, null, /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _mediaUi.messages.alt_text_description)));
|
|
375
380
|
}));
|
|
376
381
|
}
|
|
377
382
|
}, {
|
|
@@ -21,7 +21,7 @@ var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
|
21
21
|
var _reactIntl = require("react-intl");
|
|
22
22
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
23
23
|
var _isImageRemote = require("./isImageRemote");
|
|
24
|
-
var
|
|
24
|
+
var _button = _interopRequireDefault(require("@atlaskit/button/icon/button"));
|
|
25
25
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
26
26
|
var _css = require("@atlaskit/css");
|
|
27
27
|
var _avatarPickerDialog = require("../avatar-picker-dialog");
|
|
@@ -224,7 +224,7 @@ var ImageCropper = exports.ImageCropper = /*#__PURE__*/function (_Component) {
|
|
|
224
224
|
}, this.state.liveMsg), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
225
225
|
id: "remove-image-container",
|
|
226
226
|
xcss: removeImageContainerStyles.root
|
|
227
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
227
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
228
228
|
id: "remove-image-button",
|
|
229
229
|
icon: function icon(iconProps) {
|
|
230
230
|
return /*#__PURE__*/_react.default.createElement(_cross.default, (0, _extends2.default)({}, iconProps, {
|
|
@@ -22,7 +22,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
22
22
|
var _reactIntl = require("react-intl");
|
|
23
23
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
24
24
|
var _imageCropper = _interopRequireDefault(require("../image-cropper"));
|
|
25
|
-
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
25
|
+
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
26
26
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
27
27
|
var exenv = _interopRequireWildcard(require("exenv"));
|
|
28
28
|
var _images = require("./images");
|
|
@@ -17,7 +17,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
17
17
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
18
18
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
var _range = _interopRequireDefault(require("@atlaskit/range"));
|
|
20
|
+
var _range = _interopRequireDefault(require("@atlaskit/range/range"));
|
|
21
21
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
22
22
|
var _image = _interopRequireDefault(require("@atlaskit/icon/core/image"));
|
|
23
23
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { messages } from '@atlaskit/media-ui';
|
|
7
7
|
import { useState } from 'react';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
9
|
const smallAvatarImageStyles = null;
|
|
10
10
|
const avatarListWrapperStyles = null;
|
|
11
11
|
const labelStyles = null;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useRef, useEffect } from 'react';
|
|
6
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
|
-
import Flag from '@atlaskit/flag';
|
|
7
|
+
import Flag from '@atlaskit/flag/flag';
|
|
8
8
|
import { messages } from '@atlaskit/media-ui';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
const avatarPickerErrorStyles = null;
|
|
@@ -5,13 +5,18 @@ import "./index.compiled.css";
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import React, { Fragment, createRef } from 'react';
|
|
7
7
|
import { PureComponent } from 'react';
|
|
8
|
-
import ModalDialog
|
|
8
|
+
import ModalDialog from '@atlaskit/modal-dialog/modal-dialog';
|
|
9
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
10
|
+
import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
|
|
11
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
12
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
9
13
|
import Button from '@atlaskit/button/standard-button';
|
|
10
14
|
import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl';
|
|
11
|
-
import
|
|
15
|
+
import Field from '@atlaskit/form/field';
|
|
16
|
+
import { HelperMessage } from '@atlaskit/form/helper-message';
|
|
12
17
|
import { fileToDataURI, dataURItoFile, messages } from '@atlaskit/media-ui';
|
|
13
18
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
|
-
import Textfield from '@atlaskit/textfield';
|
|
19
|
+
import Textfield from '@atlaskit/textfield/text-field';
|
|
15
20
|
import ImageNavigator from '../image-navigator';
|
|
16
21
|
import { PredefinedAvatarList } from '../predefined-avatar-list';
|
|
17
22
|
import { PredefinedAvatarView } from '../predefined-avatar-view';
|
|
@@ -9,7 +9,7 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import { messages, MediaImage } from '@atlaskit/media-ui';
|
|
11
11
|
import { isImageRemote } from './isImageRemote';
|
|
12
|
-
import
|
|
12
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
13
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import { cx } from '@atlaskit/css';
|
|
15
15
|
import { ERROR } from '../avatar-picker-dialog';
|
|
@@ -7,7 +7,7 @@ import { Component } from 'react';
|
|
|
7
7
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
8
8
|
import Button from '@atlaskit/button/standard-button';
|
|
9
9
|
import ImageCropper from '../image-cropper';
|
|
10
|
-
import Spinner from '@atlaskit/spinner';
|
|
10
|
+
import Spinner from '@atlaskit/spinner/spinner';
|
|
11
11
|
import { fileToDataURI, dataURItoFile, getOrientation, isRotated, Ellipsify, Vector2, messages } from '@atlaskit/media-ui';
|
|
12
12
|
import * as exenv from 'exenv';
|
|
13
13
|
import { uploadPlaceholder, errorIcon } from './images';
|
|
@@ -4,7 +4,7 @@ import "./slider.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { Component } from 'react';
|
|
7
|
-
import FieldRange from '@atlaskit/range';
|
|
7
|
+
import FieldRange from '@atlaskit/range/range';
|
|
8
8
|
import { messages } from '@atlaskit/media-ui';
|
|
9
9
|
import ScaleLargeIcon from '@atlaskit/icon/core/image';
|
|
10
10
|
import ScaleSmallIcon from '@atlaskit/icon/core/image';
|
|
@@ -9,7 +9,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import { messages } from '@atlaskit/media-ui';
|
|
11
11
|
import { useState } from 'react';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
13
|
var smallAvatarImageStyles = null;
|
|
14
14
|
var avatarListWrapperStyles = null;
|
|
15
15
|
var labelStyles = null;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useRef, useEffect } from 'react';
|
|
6
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
|
-
import Flag from '@atlaskit/flag';
|
|
7
|
+
import Flag from '@atlaskit/flag/flag';
|
|
8
8
|
import { messages } from '@atlaskit/media-ui';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
var avatarPickerErrorStyles = null;
|
|
@@ -14,13 +14,18 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
15
|
import React, { Fragment, createRef } from 'react';
|
|
16
16
|
import { PureComponent } from 'react';
|
|
17
|
-
import ModalDialog
|
|
17
|
+
import ModalDialog from '@atlaskit/modal-dialog/modal-dialog';
|
|
18
|
+
import ModalBody from '@atlaskit/modal-dialog/modal-body';
|
|
19
|
+
import ModalFooter from '@atlaskit/modal-dialog/modal-footer';
|
|
20
|
+
import ModalHeader from '@atlaskit/modal-dialog/modal-header';
|
|
21
|
+
import ModalTitle from '@atlaskit/modal-dialog/modal-title';
|
|
18
22
|
import Button from '@atlaskit/button/standard-button';
|
|
19
23
|
import { FormattedMessage, IntlProvider, injectIntl } from 'react-intl';
|
|
20
|
-
import
|
|
24
|
+
import Field from '@atlaskit/form/field';
|
|
25
|
+
import { HelperMessage } from '@atlaskit/form/helper-message';
|
|
21
26
|
import { fileToDataURI, dataURItoFile, messages } from '@atlaskit/media-ui';
|
|
22
27
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
23
|
-
import Textfield from '@atlaskit/textfield';
|
|
28
|
+
import Textfield from '@atlaskit/textfield/text-field';
|
|
24
29
|
import ImageNavigator from '../image-navigator';
|
|
25
30
|
import { PredefinedAvatarList } from '../predefined-avatar-list';
|
|
26
31
|
import { PredefinedAvatarView } from '../predefined-avatar-view';
|
|
@@ -18,7 +18,7 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
18
18
|
import { injectIntl } from 'react-intl';
|
|
19
19
|
import { messages, MediaImage } from '@atlaskit/media-ui';
|
|
20
20
|
import { isImageRemote } from './isImageRemote';
|
|
21
|
-
import
|
|
21
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
22
22
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
23
23
|
import { cx } from '@atlaskit/css';
|
|
24
24
|
import { ERROR } from '../avatar-picker-dialog';
|
|
@@ -17,7 +17,7 @@ import { Component } from 'react';
|
|
|
17
17
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
18
18
|
import Button from '@atlaskit/button/standard-button';
|
|
19
19
|
import ImageCropper from '../image-cropper';
|
|
20
|
-
import Spinner from '@atlaskit/spinner';
|
|
20
|
+
import Spinner from '@atlaskit/spinner/spinner';
|
|
21
21
|
import { fileToDataURI, dataURItoFile, getOrientation, isRotated, Ellipsify, Vector2, messages } from '@atlaskit/media-ui';
|
|
22
22
|
import * as exenv from 'exenv';
|
|
23
23
|
import { uploadPlaceholder, errorIcon } from './images';
|
|
@@ -11,7 +11,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
11
11
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, 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
|
import { Component } from 'react';
|
|
14
|
-
import FieldRange from '@atlaskit/range';
|
|
14
|
+
import FieldRange from '@atlaskit/range/range';
|
|
15
15
|
import { messages } from '@atlaskit/media-ui';
|
|
16
16
|
import ScaleLargeIcon from '@atlaskit/icon/core/image';
|
|
17
17
|
import ScaleSmallIcon from '@atlaskit/icon/core/image';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React, { type ReactNode } from 'react';
|
|
7
7
|
import { jsx, css } from '@compiled/react';
|
|
8
8
|
import Button from '@atlaskit/button/standard-button';
|
|
9
|
-
import
|
|
9
|
+
import ModalTransition from '@atlaskit/modal-dialog/modal-transition';
|
|
10
10
|
import { type Avatar, AvatarPickerDialog } from '../src';
|
|
11
11
|
import { generateAvatars } from '../example-helpers';
|
|
12
12
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
-
"version": "28.
|
|
3
|
+
"version": "28.2.0",
|
|
4
4
|
"description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,23 +30,23 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/button": "^25.
|
|
33
|
+
"@atlaskit/button": "^25.2.0",
|
|
34
34
|
"@atlaskit/css": "^1.0.0",
|
|
35
|
-
"@atlaskit/flag": "^18.
|
|
36
|
-
"@atlaskit/form": "^
|
|
37
|
-
"@atlaskit/icon": "^37.
|
|
38
|
-
"@atlaskit/media-ui": "^30.
|
|
39
|
-
"@atlaskit/modal-dialog": "^16.
|
|
35
|
+
"@atlaskit/flag": "^18.4.0",
|
|
36
|
+
"@atlaskit/form": "^17.1.0",
|
|
37
|
+
"@atlaskit/icon": "^37.5.0",
|
|
38
|
+
"@atlaskit/media-ui": "^30.12.0",
|
|
39
|
+
"@atlaskit/modal-dialog": "^16.5.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
41
|
-
"@atlaskit/primitives": "^22.
|
|
42
|
-
"@atlaskit/range": "^12.
|
|
41
|
+
"@atlaskit/primitives": "^22.4.0",
|
|
42
|
+
"@atlaskit/range": "^12.1.0",
|
|
43
43
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
44
|
-
"@atlaskit/spinner": "^20.
|
|
45
|
-
"@atlaskit/textfield": "^10.
|
|
46
|
-
"@atlaskit/tokens": "^16.
|
|
47
|
-
"@atlaskit/visually-hidden": "^4.
|
|
44
|
+
"@atlaskit/spinner": "^20.3.0",
|
|
45
|
+
"@atlaskit/textfield": "^10.1.0",
|
|
46
|
+
"@atlaskit/tokens": "^16.8.0",
|
|
47
|
+
"@atlaskit/visually-hidden": "^4.3.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
|
-
"@compiled/react": "^1.0.
|
|
49
|
+
"@compiled/react": "^1.0.2",
|
|
50
50
|
"exenv": "^1.2.2",
|
|
51
51
|
"react-error-boundary": "^3.1.3"
|
|
52
52
|
},
|
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@atlaskit/media-core": "^38.0.0",
|
|
60
|
-
"@atlaskit/media-test-helpers": "^42.
|
|
61
|
-
"@
|
|
60
|
+
"@atlaskit/media-test-helpers": "^42.3.0",
|
|
61
|
+
"@atlaskit/page": "^15.2.0",
|
|
62
|
+
"@atlassian/a11y-jest-testing": "^0.16.0",
|
|
62
63
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
63
64
|
"@atlassian/testing-library": "^0.11.0",
|
|
64
65
|
"@testing-library/react": "^16.3.0",
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structured MCP docs for `@atlaskit/media-avatar-picker`.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import path from 'path';
|
|
6
|
-
|
|
7
|
-
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
8
|
-
|
|
9
|
-
import packageJson from './package.json';
|
|
10
|
-
|
|
11
|
-
const packagePath = path.resolve(__dirname);
|
|
12
|
-
|
|
13
|
-
const documentation: StructuredContentSource = {
|
|
14
|
-
package: {
|
|
15
|
-
package: '@atlaskit/media-avatar-picker',
|
|
16
|
-
packagePath,
|
|
17
|
-
packageJson,
|
|
18
|
-
overview:
|
|
19
|
-
'A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.',
|
|
20
|
-
},
|
|
21
|
-
components: [
|
|
22
|
-
{
|
|
23
|
-
name: 'AvatarPickerDialog',
|
|
24
|
-
description: 'Main dialog component that orchestrates the avatar selection experience.',
|
|
25
|
-
status: 'general-availability',
|
|
26
|
-
import: {
|
|
27
|
-
name: 'AvatarPickerDialog',
|
|
28
|
-
package: '@atlaskit/media-avatar-picker',
|
|
29
|
-
type: 'named',
|
|
30
|
-
packagePath,
|
|
31
|
-
packageJson,
|
|
32
|
-
},
|
|
33
|
-
usageGuidelines: [
|
|
34
|
-
'Use `AvatarPickerDialog` when you need to allow users to upload or select an avatar.',
|
|
35
|
-
],
|
|
36
|
-
keywords: ['media', 'avatar', 'picker', 'upload'],
|
|
37
|
-
categories: ['media'],
|
|
38
|
-
examples: [
|
|
39
|
-
{
|
|
40
|
-
name: 'Avatar picker with source',
|
|
41
|
-
description: 'Basic usage of AvatarPickerDialog with an initial image source.',
|
|
42
|
-
source: path.resolve(packagePath, './examples/0-avatar-picker-with-source.tsx'),
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'ImageCropper',
|
|
48
|
-
description: 'Interactive component for cropping uploaded images.',
|
|
49
|
-
status: 'general-availability',
|
|
50
|
-
import: {
|
|
51
|
-
name: 'ImageCropper',
|
|
52
|
-
package: '@atlaskit/media-avatar-picker/image-cropper',
|
|
53
|
-
type: 'named',
|
|
54
|
-
packagePath,
|
|
55
|
-
packageJson,
|
|
56
|
-
},
|
|
57
|
-
usageGuidelines: ['Use `ImageCropper` for standalone image cropping functionality.'],
|
|
58
|
-
keywords: ['media', 'crop', 'image'],
|
|
59
|
-
categories: ['media'],
|
|
60
|
-
examples: [
|
|
61
|
-
{
|
|
62
|
-
name: 'Image cropper',
|
|
63
|
-
description: 'Basic usage of ImageCropper.',
|
|
64
|
-
source: path.resolve(packagePath, './examples/1-image-cropper.tsx'),
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default documentation;
|