cozy-sharing 24.0.0 → 25.0.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 +11 -0
- package/dist/SharedStatus.js +1 -1
- package/dist/components/Avatar/AvatarList.js +11 -12
- package/dist/components/Avatar/ExtraAvatar.js +7 -8
- package/dist/components/Avatar/GroupAvatar.js +7 -4
- package/dist/components/Avatar/MemberAvatar.js +4 -5
- package/dist/components/ContactSuggestion.js +5 -6
- package/dist/components/Identity/ExtraIdentity.js +0 -3
- package/dist/components/Identity/Identity.js +0 -3
- package/dist/components/Identity/MemberIdentity.js +2 -8
- package/dist/components/Identity/OwnerIdentity.js +3 -8
- package/dist/components/Recipient/GroupRecipient.js +1 -1
- package/dist/components/Recipient/GroupRecipientDetailWithAccess.js +3 -5
- package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +3 -5
- package/dist/components/Recipient/GroupRecipientPermissions.js +1 -1
- package/dist/components/Recipient/LinkRecipient.js +7 -20
- package/dist/components/Recipient/LinkRecipientLite.js +7 -20
- package/dist/components/Recipient/MemberRecipient.js +1 -1
- package/dist/components/Recipient/MemberRecipientLite.js +1 -1
- package/dist/components/ShareAutosuggest.js +4 -5
- package/dist/components/SharedDrive/SharedDriveRecipient.js +2 -2
- package/dist/components/WhoHasAccessLight.js +0 -3
- package/dist/styles/recipient.styl +0 -12
- package/dist/stylesheet.css +0 -13
- package/package.json +4 -4
- package/src/SharedStatus.jsx +1 -1
- package/src/components/Avatar/AvatarList.jsx +9 -20
- package/src/components/Avatar/ExtraAvatar.jsx +9 -8
- package/src/components/Avatar/GroupAvatar.jsx +7 -2
- package/src/components/Avatar/MemberAvatar.jsx +6 -5
- package/src/components/ContactSuggestion.jsx +4 -4
- package/src/components/Identity/MemberIdentity.jsx +2 -2
- package/src/components/Identity/OwnerIdentity.jsx +2 -6
- package/src/components/Recipient/GroupRecipient.jsx +1 -1
- package/src/components/Recipient/GroupRecipientDetailWithAccess.jsx +2 -6
- package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +2 -6
- package/src/components/Recipient/GroupRecipientPermissions.jsx +1 -1
- package/src/components/Recipient/LinkRecipient.jsx +4 -4
- package/src/components/Recipient/LinkRecipientLite.jsx +4 -4
- package/src/components/Recipient/MemberRecipient.jsx +1 -1
- package/src/components/Recipient/MemberRecipientLite.jsx +1 -1
- package/src/components/ShareAutosuggest.jsx +3 -3
- package/src/components/SharedDrive/SharedDriveRecipient.jsx +2 -2
- package/src/styles/recipient.styl +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [25.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@24.0.0...cozy-sharing@25.0.0) (2025-03-17)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **Sharing:** Replace legacy Avatars by modern Avatars ([480a092](https://github.com/cozy/cozy-libs/commit/480a0927521f818635022a74edf8a0b199b896a9))
|
|
11
|
+
- **Sharing:** Upgrade cozy-ui ([732cde5](https://github.com/cozy/cozy-libs/commit/732cde5537c3c1142352c806c3af9b6e7b5d9031))
|
|
12
|
+
|
|
13
|
+
### BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
- **Sharing:** You must have `cozy-ui >= 121.1.1`
|
|
16
|
+
|
|
6
17
|
# [24.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@23.2.0...cozy-sharing@24.0.0) (2025-03-12)
|
|
7
18
|
|
|
8
19
|
### Features
|
package/dist/SharedStatus.js
CHANGED
|
@@ -2,8 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useClient } from 'cozy-client';
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
6
|
+
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
5
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
6
|
-
import
|
|
8
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
|
|
7
9
|
import { ExtraAvatar } from './ExtraAvatar';
|
|
8
10
|
import { GroupAvatar } from './GroupAvatar';
|
|
9
11
|
import { MemberAvatar } from './MemberAvatar';
|
|
@@ -18,9 +20,6 @@ var styles = {
|
|
|
18
20
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
19
21
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
20
22
|
"--interactive": "recipient__--interactive___160Bp",
|
|
21
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
22
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
23
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
24
23
|
"spin": "recipient__spin___2tYv3",
|
|
25
24
|
"shake": "recipient__shake___TGyPp"
|
|
26
25
|
};
|
|
@@ -74,13 +73,15 @@ var AvatarList = function AvatarList(_ref2) {
|
|
|
74
73
|
}, link && /*#__PURE__*/React.createElement("span", {
|
|
75
74
|
"data-testid": "AvatarList-link"
|
|
76
75
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
color: "none",
|
|
77
|
+
border: true,
|
|
78
|
+
innerBorder: isTwakeTheme(),
|
|
79
79
|
size: size
|
|
80
|
-
}
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
81
|
+
icon: LinkIcon
|
|
82
|
+
}))), hasExtraRecipients && /*#__PURE__*/React.createElement("span", {
|
|
81
83
|
"data-testid": "AvatarList-plusX"
|
|
82
84
|
}, /*#__PURE__*/React.createElement(ExtraAvatar, {
|
|
83
|
-
className: styles['recipients-avatars--plusX'],
|
|
84
85
|
extraRecipients: extraRecipients,
|
|
85
86
|
size: size
|
|
86
87
|
})), shownRecipients.map(function (recipient) {
|
|
@@ -89,8 +90,7 @@ var AvatarList = function AvatarList(_ref2) {
|
|
|
89
90
|
"data-testid": "AvatarList-avatar".concat(recipient.status === 'owner' ? '-owner' : ''),
|
|
90
91
|
key: recipient.index
|
|
91
92
|
}, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
92
|
-
size: size
|
|
93
|
-
className: cx(styles['recipients-avatars--avatar'])
|
|
93
|
+
size: size
|
|
94
94
|
}));
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -99,8 +99,7 @@ var AvatarList = function AvatarList(_ref2) {
|
|
|
99
99
|
key: recipient.index
|
|
100
100
|
}, /*#__PURE__*/React.createElement(MemberAvatar, {
|
|
101
101
|
recipient: recipient,
|
|
102
|
-
size: size
|
|
103
|
-
className: cx(styles['recipients-avatars--avatar'])
|
|
102
|
+
size: size
|
|
104
103
|
}));
|
|
105
104
|
}));
|
|
106
105
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import uniqueId from 'lodash/uniqueId';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
5
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
|
|
5
6
|
import { SharingTooltip, TooltipRecipientList } from '../Tooltip';
|
|
6
7
|
|
|
7
8
|
var ExtraAvatar = function ExtraAvatar(_ref) {
|
|
@@ -17,12 +18,10 @@ var ExtraAvatar = function ExtraAvatar(_ref) {
|
|
|
17
18
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
18
19
|
className: className,
|
|
19
20
|
size: size,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}), /*#__PURE__*/React.createElement(SharingTooltip, {
|
|
21
|
+
color: "none",
|
|
22
|
+
border: true,
|
|
23
|
+
innerBorder: isTwakeTheme()
|
|
24
|
+
}, "+".concat(Math.min(extraRecipients.length, 99))), /*#__PURE__*/React.createElement(SharingTooltip, {
|
|
26
25
|
id: sharingTooltipId
|
|
27
26
|
}, /*#__PURE__*/React.createElement(TooltipRecipientList, {
|
|
28
27
|
recipientNames: extraRecipients
|
|
@@ -36,6 +35,6 @@ ExtraAvatar.propTypes = {
|
|
|
36
35
|
};
|
|
37
36
|
ExtraAvatar.defaultProps = {
|
|
38
37
|
extraRecipients: [],
|
|
39
|
-
size: '
|
|
38
|
+
size: 'm'
|
|
40
39
|
};
|
|
41
40
|
export { ExtraAvatar };
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
3
|
+
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
2
4
|
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team';
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
4
5
|
|
|
5
6
|
var GroupAvatar = function GroupAvatar(_ref) {
|
|
6
7
|
var size = _ref.size,
|
|
7
8
|
className = _ref.className;
|
|
8
9
|
return /*#__PURE__*/React.createElement(Avatar, {
|
|
9
|
-
icon: TeamIcon,
|
|
10
10
|
size: size,
|
|
11
|
-
className: className
|
|
12
|
-
|
|
11
|
+
className: className,
|
|
12
|
+
border: true
|
|
13
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
14
|
+
icon: TeamIcon
|
|
15
|
+
}));
|
|
13
16
|
};
|
|
14
17
|
|
|
15
18
|
export { GroupAvatar };
|
|
@@ -8,9 +8,9 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
8
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
9
|
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
11
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
12
12
|
import logger from '../../logger';
|
|
13
|
-
import {
|
|
13
|
+
import { getInitials } from '../../models';
|
|
14
14
|
|
|
15
15
|
var MemberAvatar = function MemberAvatar(_ref) {
|
|
16
16
|
var recipient = _ref.recipient,
|
|
@@ -46,10 +46,9 @@ var MemberAvatar = function MemberAvatar(_ref) {
|
|
|
46
46
|
|
|
47
47
|
return /*#__PURE__*/React.createElement(Avatar // image={image}
|
|
48
48
|
, _extends({
|
|
49
|
-
|
|
50
|
-
textId: getDisplayName(recipient),
|
|
49
|
+
border: true,
|
|
51
50
|
disabled: recipient.status === 'pending' || recipient.status === 'mail-not-send'
|
|
52
|
-
}, rest));
|
|
51
|
+
}, rest), getInitials(recipient));
|
|
53
52
|
};
|
|
54
53
|
|
|
55
54
|
export { MemberAvatar };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { models } from 'cozy-client';
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
5
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
5
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
6
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
7
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
8
8
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
|
-
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
10
9
|
import { Contact, Group, getDisplayName, getInitials } from '../models';
|
|
10
|
+
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
11
11
|
var ContactModel = models.contact;
|
|
12
12
|
export var ContactSuggestion = function ContactSuggestion(_ref) {
|
|
13
13
|
var contactOrGroup = _ref.contactOrGroup;
|
|
@@ -33,11 +33,10 @@ export var ContactSuggestion = function ContactSuggestion(_ref) {
|
|
|
33
33
|
return /*#__PURE__*/React.createElement(ListItem, {
|
|
34
34
|
button: true
|
|
35
35
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, isContactGroup ? /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
36
|
-
size: "
|
|
36
|
+
size: "m"
|
|
37
37
|
}) : /*#__PURE__*/React.createElement(Avatar, {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
38
|
+
size: "m"
|
|
39
|
+
}, avatarText)), /*#__PURE__*/React.createElement(ListItemText, {
|
|
41
40
|
primary: name,
|
|
42
41
|
secondary: details && details !== '' ? details : '-'
|
|
43
42
|
}));
|
|
@@ -12,9 +12,6 @@ var styles = {
|
|
|
12
12
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
13
13
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
14
14
|
"--interactive": "recipient__--interactive___160Bp",
|
|
15
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
16
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
17
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
18
15
|
"spin": "recipient__spin___2tYv3",
|
|
19
16
|
"shake": "recipient__shake___TGyPp"
|
|
20
17
|
};
|
|
@@ -11,9 +11,6 @@ var styles = {
|
|
|
11
11
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
12
12
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
13
13
|
"--interactive": "recipient__--interactive___160Bp",
|
|
14
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
15
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
16
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
17
14
|
"spin": "recipient__spin___2tYv3",
|
|
18
15
|
"shake": "recipient__shake___TGyPp"
|
|
19
16
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["instance"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
5
5
|
import Identity from './Identity';
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models';
|
|
7
7
|
var styles = {
|
|
@@ -14,9 +14,6 @@ var styles = {
|
|
|
14
14
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
15
15
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
16
16
|
"--interactive": "recipient__--interactive___160Bp",
|
|
17
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
18
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
19
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
20
17
|
"spin": "recipient__spin___2tYv3",
|
|
21
18
|
"shake": "recipient__shake___TGyPp"
|
|
22
19
|
};
|
|
@@ -28,10 +25,7 @@ var MemberIdentity = function MemberIdentity(_ref) {
|
|
|
28
25
|
var name = getDisplayName(rest);
|
|
29
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
30
27
|
className: styles['recipient']
|
|
31
|
-
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
32
|
-
text: getInitials(rest),
|
|
33
|
-
textId: name
|
|
34
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Avatar, null, getInitials(rest)), /*#__PURE__*/React.createElement("div", {
|
|
35
29
|
className: styles['recipient-ident-status']
|
|
36
30
|
}, /*#__PURE__*/React.createElement(Identity, {
|
|
37
31
|
name: name,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
2
|
var _excluded = ["url", "size"];
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
5
5
|
import Identity from './Identity';
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models';
|
|
7
7
|
var styles = {
|
|
@@ -14,9 +14,6 @@ var styles = {
|
|
|
14
14
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
15
15
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
16
16
|
"--interactive": "recipient__--interactive___160Bp",
|
|
17
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
18
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
19
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
20
17
|
"spin": "recipient__spin___2tYv3",
|
|
21
18
|
"shake": "recipient__shake___TGyPp"
|
|
22
19
|
};
|
|
@@ -29,10 +26,8 @@ var OwnerIdentity = function OwnerIdentity(_ref) {
|
|
|
29
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
30
27
|
className: styles['avatar']
|
|
31
28
|
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
textId: getDisplayName(rest)
|
|
35
|
-
}), /*#__PURE__*/React.createElement(Identity, {
|
|
29
|
+
size: size
|
|
30
|
+
}, getInitials(rest)), /*#__PURE__*/React.createElement(Identity, {
|
|
36
31
|
name: getDisplayName(rest),
|
|
37
32
|
details: url
|
|
38
33
|
}));
|
|
@@ -60,7 +60,7 @@ var GroupRecipient = function GroupRecipient(props) {
|
|
|
60
60
|
gutters: isMobile ? 'default' : 'double',
|
|
61
61
|
size: "small"
|
|
62
62
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
63
|
-
size: "
|
|
63
|
+
size: "m"
|
|
64
64
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
65
65
|
primary: /*#__PURE__*/React.createElement(Typography, {
|
|
66
66
|
variant: "body1"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useClient } from 'cozy-client';
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
3
4
|
import List from 'cozy-ui/transpiled/react/List';
|
|
4
5
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
5
6
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
6
7
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
7
8
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
8
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
9
9
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
10
10
|
import MemberRecipientStatus from './MemberRecipientStatus';
|
|
11
11
|
import { getInitials, getDisplayName } from '../../models';
|
|
@@ -27,10 +27,8 @@ var GroupRecipientDetailWithAccess = function GroupRecipientDetailWithAccess(_re
|
|
|
27
27
|
key: recipient.index,
|
|
28
28
|
size: "small"
|
|
29
29
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
30
|
-
size: "
|
|
31
|
-
|
|
32
|
-
textId: name
|
|
33
|
-
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
30
|
+
size: "m"
|
|
31
|
+
}, getInitials(recipient))), /*#__PURE__*/React.createElement(ListItemText, {
|
|
34
32
|
primary: name,
|
|
35
33
|
secondary: /*#__PURE__*/React.createElement(MemberRecipientStatus, {
|
|
36
34
|
status: recipient.status,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
2
3
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
3
4
|
import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden';
|
|
4
5
|
import List from 'cozy-ui/transpiled/react/List';
|
|
@@ -6,7 +7,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
|
6
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
7
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
8
9
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
9
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
10
10
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
11
11
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients';
|
|
12
12
|
import { getInitials, getDisplayName } from '../../models';
|
|
@@ -30,10 +30,8 @@ var GroupRecipientDetailWithoutAccess = function GroupRecipientDetailWithoutAcce
|
|
|
30
30
|
ellipsis: false,
|
|
31
31
|
size: "small"
|
|
32
32
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
33
|
-
size: "
|
|
34
|
-
|
|
35
|
-
textId: name
|
|
36
|
-
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
33
|
+
size: "m"
|
|
34
|
+
}, getInitials(recipient))), /*#__PURE__*/React.createElement(ListItemText, {
|
|
37
35
|
primary: name,
|
|
38
36
|
secondary: /*#__PURE__*/React.createElement("div", {
|
|
39
37
|
className: "u-flex u-flex-items-center"
|
|
@@ -115,7 +115,7 @@ var GroupRecipientPermissions = function GroupRecipientPermissions(_ref) {
|
|
|
115
115
|
autoClose: true,
|
|
116
116
|
onClose: hideMenu
|
|
117
117
|
}, /*#__PURE__*/React.createElement(ActionsMenuMobileHeader, null, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
118
|
-
size: "
|
|
118
|
+
size: "m"
|
|
119
119
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
120
120
|
primary: name,
|
|
121
121
|
primaryTypographyProps: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
5
5
|
import Fade from 'cozy-ui/transpiled/react/Fade';
|
|
6
6
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
7
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
@@ -9,6 +9,7 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
|
9
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
10
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
11
11
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
12
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
|
|
12
13
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
|
|
13
14
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
14
15
|
import LinkRecipientPermissions from './LinkRecipientPermissions';
|
|
@@ -16,22 +17,6 @@ import RecipientConfirm from './RecipientConfirm';
|
|
|
16
17
|
import { checkIsPermissionHasPassword, getPermissionExpiresDate } from '../../helpers/permissions';
|
|
17
18
|
import { FADE_IN_DURATION } from '../../helpers/recipients';
|
|
18
19
|
import { useSharingContext } from '../../hooks/useSharingContext';
|
|
19
|
-
var styles = {
|
|
20
|
-
"recipient": "recipient__recipient___2DmZI",
|
|
21
|
-
"recipients-list-light": "recipient__recipients-list-light___Vq4op",
|
|
22
|
-
"recipient-idents": "recipient__recipient-idents___3s7rw",
|
|
23
|
-
"recipient-user": "recipient__recipient-user___1THIU",
|
|
24
|
-
"recipient-details": "recipient__recipient-details___2fZfc",
|
|
25
|
-
"avatar": "recipient__avatar___2LnIV",
|
|
26
|
-
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
27
|
-
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
28
|
-
"--interactive": "recipient__--interactive___160Bp",
|
|
29
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
30
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
31
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
32
|
-
"spin": "recipient__spin___2tYv3",
|
|
33
|
-
"shake": "recipient__shake___TGyPp"
|
|
34
|
-
};
|
|
35
20
|
|
|
36
21
|
var LinkRecipient = function LinkRecipient(props) {
|
|
37
22
|
var _useI18n = useI18n(),
|
|
@@ -70,9 +55,11 @@ var LinkRecipient = function LinkRecipient(props) {
|
|
|
70
55
|
}, /*#__PURE__*/React.createElement(ListItem, {
|
|
71
56
|
gutters: isMobile ? 'default' : 'double',
|
|
72
57
|
size: "small"
|
|
73
|
-
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(
|
|
74
|
-
size: "
|
|
75
|
-
|
|
58
|
+
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
59
|
+
size: "m",
|
|
60
|
+
color: "none",
|
|
61
|
+
border: true,
|
|
62
|
+
innerBorder: isTwakeTheme()
|
|
76
63
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
77
64
|
icon: LinkIcon
|
|
78
65
|
}))), /*#__PURE__*/React.createElement(ListItemText, {
|
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
4
4
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
5
5
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
|
|
6
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem';
|
|
7
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
|
|
8
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
|
|
9
9
|
import Typography from 'cozy-ui/transpiled/react/Typography';
|
|
10
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
|
|
10
11
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
11
12
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions';
|
|
12
13
|
import withLocales from '../../hoc/withLocales';
|
|
13
|
-
var styles = {
|
|
14
|
-
"recipient": "recipient__recipient___2DmZI",
|
|
15
|
-
"recipients-list-light": "recipient__recipients-list-light___Vq4op",
|
|
16
|
-
"recipient-idents": "recipient__recipient-idents___3s7rw",
|
|
17
|
-
"recipient-user": "recipient__recipient-user___1THIU",
|
|
18
|
-
"recipient-details": "recipient__recipient-details___2fZfc",
|
|
19
|
-
"avatar": "recipient__avatar___2LnIV",
|
|
20
|
-
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
21
|
-
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
22
|
-
"--interactive": "recipient__--interactive___160Bp",
|
|
23
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
24
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
25
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
26
|
-
"spin": "recipient__spin___2tYv3",
|
|
27
|
-
"shake": "recipient__shake___TGyPp"
|
|
28
|
-
};
|
|
29
14
|
|
|
30
15
|
var LinkRecipientLite = function LinkRecipientLite(_ref) {
|
|
31
16
|
var permissions = _ref.permissions,
|
|
@@ -39,9 +24,11 @@ var LinkRecipientLite = function LinkRecipientLite(_ref) {
|
|
|
39
24
|
return /*#__PURE__*/React.createElement(ListItem, {
|
|
40
25
|
size: "small",
|
|
41
26
|
ellipsis: true
|
|
42
|
-
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(
|
|
43
|
-
size: "
|
|
44
|
-
|
|
27
|
+
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
28
|
+
size: "m",
|
|
29
|
+
color: "none",
|
|
30
|
+
border: true,
|
|
31
|
+
innerBorder: isTwakeTheme()
|
|
45
32
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
46
33
|
icon: LinkIcon
|
|
47
34
|
}))), /*#__PURE__*/React.createElement(ListItemText, {
|
|
@@ -51,7 +51,7 @@ var MemberRecipient = function MemberRecipient(props) {
|
|
|
51
51
|
gutters: isMobile ? 'default' : 'double',
|
|
52
52
|
size: "small"
|
|
53
53
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(MemberAvatar, {
|
|
54
|
-
size: "
|
|
54
|
+
size: "m",
|
|
55
55
|
recipient: props
|
|
56
56
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
57
57
|
primary: /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -32,7 +32,7 @@ var MemberRecipientLite = function MemberRecipientLite(_ref) {
|
|
|
32
32
|
size: "small",
|
|
33
33
|
ellipsis: true
|
|
34
34
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(MemberAvatar, _extends({
|
|
35
|
-
size: "
|
|
35
|
+
size: "m",
|
|
36
36
|
recipient: recipient
|
|
37
37
|
}, props))), /*#__PURE__*/React.createElement(ListItemText, {
|
|
38
38
|
primary: isMe ? t('Share.recipients.you') : getDisplayName(recipient, t(DEFAULT_DISPLAY_NAME)),
|
|
@@ -3,9 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React, { useState, useRef } from 'react';
|
|
5
5
|
import Autosuggest from 'react-autosuggest';
|
|
6
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
6
7
|
import Chip from 'cozy-ui/transpiled/react/Chips';
|
|
7
8
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner';
|
|
8
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar';
|
|
9
9
|
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion';
|
|
11
11
|
import { extractEmails, validateEmail } from '../helpers/email';
|
|
@@ -160,11 +160,10 @@ var ShareAutocomplete = function ShareAutocomplete(_ref) {
|
|
|
160
160
|
id: "recipient_".concat(idx),
|
|
161
161
|
key: "key_recipient_".concat(idx),
|
|
162
162
|
avatar: isContactGroup ? /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
163
|
-
size: "
|
|
163
|
+
size: "xs"
|
|
164
164
|
}) : /*#__PURE__*/React.createElement(Avatar, {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}),
|
|
165
|
+
size: "xs"
|
|
166
|
+
}, avatarText),
|
|
168
167
|
label: name,
|
|
169
168
|
onDelete: function onDelete() {
|
|
170
169
|
onAutosuggestRemove(recipient);
|
|
@@ -37,9 +37,9 @@ var SharedDriveRecipient = function SharedDriveRecipient(props) {
|
|
|
37
37
|
gutters: isMobile ? 'default' : 'double',
|
|
38
38
|
size: "small"
|
|
39
39
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, members ? /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
40
|
-
size: "
|
|
40
|
+
size: "m"
|
|
41
41
|
}) : /*#__PURE__*/React.createElement(MemberAvatar, {
|
|
42
|
-
size: "
|
|
42
|
+
size: "m",
|
|
43
43
|
recipient: props
|
|
44
44
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
45
45
|
primary: /*#__PURE__*/React.createElement(Typography, {
|
|
@@ -13,9 +13,6 @@ var styles = {
|
|
|
13
13
|
"link-recipient-icon-circle": "recipient__link-recipient-icon-circle___3ZTU-",
|
|
14
14
|
"recipients-avatars": "recipient__recipients-avatars___1npjD",
|
|
15
15
|
"--interactive": "recipient__--interactive___160Bp",
|
|
16
|
-
"recipients-avatars--link": "recipient__recipients-avatars--link___1qeON",
|
|
17
|
-
"recipients-avatars--plusX": "recipient__recipients-avatars--plusX___3-6_l",
|
|
18
|
-
"recipients-avatars--avatar": "recipient__recipients-avatars--avatar___-owjC",
|
|
19
16
|
"spin": "recipient__spin___2tYv3",
|
|
20
17
|
"shake": "recipient__shake___TGyPp"
|
|
21
18
|
};
|
|
@@ -61,17 +61,5 @@
|
|
|
61
61
|
&.--interactive
|
|
62
62
|
cursor pointer
|
|
63
63
|
|
|
64
|
-
&--link,
|
|
65
|
-
&--plusX,
|
|
66
|
-
&--avatar
|
|
67
|
-
border-width 2px
|
|
68
|
-
border-style solid
|
|
69
|
-
border-color var(--paperBackgroundColor)
|
|
70
|
-
|
|
71
|
-
&--link
|
|
72
|
-
background-color var(--genericRecipientBackground)
|
|
73
|
-
svg
|
|
74
|
-
fill: var(--genericRecipientColor)
|
|
75
|
-
|
|
76
64
|
& > *:not(:first-child)
|
|
77
65
|
margin-right -0.6rem
|
package/dist/stylesheet.css
CHANGED
|
@@ -151,19 +151,6 @@
|
|
|
151
151
|
.recipient__recipients-avatars___1npjD.recipient__--interactive___160Bp {
|
|
152
152
|
cursor: pointer;
|
|
153
153
|
}
|
|
154
|
-
.recipient__recipients-avatars--link___1qeON,
|
|
155
|
-
.recipient__recipients-avatars--plusX___3-6_l,
|
|
156
|
-
.recipient__recipients-avatars--avatar___-owjC {
|
|
157
|
-
border-width: 2px;
|
|
158
|
-
border-style: solid;
|
|
159
|
-
border-color: var(--paperBackgroundColor);
|
|
160
|
-
}
|
|
161
|
-
.recipient__recipients-avatars--link___1qeON {
|
|
162
|
-
background-color: var(--genericRecipientBackground);
|
|
163
|
-
}
|
|
164
|
-
.recipient__recipients-avatars--link___1qeON svg {
|
|
165
|
-
fill: var(--genericRecipientColor);
|
|
166
|
-
}
|
|
167
154
|
.recipient__recipients-avatars___1npjD > *:not(:first-child) {
|
|
168
155
|
margin-right: -0.6rem;
|
|
169
156
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"cozy-device-helper": "^3.7.1",
|
|
59
59
|
"cozy-intent": "^2.30.0",
|
|
60
60
|
"cozy-minilog": "^3.10.0",
|
|
61
|
-
"cozy-ui": "^
|
|
61
|
+
"cozy-ui": "^121.1.1",
|
|
62
62
|
"jest": "26.6.3",
|
|
63
63
|
"jest-environment-jsdom": "26.6.2",
|
|
64
64
|
"react": "16.12.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cozy-device-helper": ">=3.7.1",
|
|
72
72
|
"cozy-intent": ">=2.29.1",
|
|
73
73
|
"cozy-minilog": ">=3.9.1",
|
|
74
|
-
"cozy-ui": ">=
|
|
74
|
+
"cozy-ui": ">=121.1.1",
|
|
75
75
|
"prop-types": "^15.7.2",
|
|
76
76
|
"react": "^16.12.0",
|
|
77
77
|
"react-router": "^5.0.1"
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"sideEffects": [
|
|
80
80
|
"*.css"
|
|
81
81
|
],
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "33dab08dabe1d4d7367cc83642c749d3af9edefa"
|
|
83
83
|
}
|
package/src/SharedStatus.jsx
CHANGED
|
@@ -2,8 +2,10 @@ import cx from 'classnames'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { useClient } from 'cozy-client'
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
6
|
-
import
|
|
8
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
|
|
7
9
|
|
|
8
10
|
import { ExtraAvatar } from './ExtraAvatar'
|
|
9
11
|
import { GroupAvatar } from './GroupAvatar'
|
|
@@ -73,20 +75,14 @@ const AvatarList = ({
|
|
|
73
75
|
>
|
|
74
76
|
{link && (
|
|
75
77
|
<span data-testid="AvatarList-link">
|
|
76
|
-
<Avatar
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
size={size}
|
|
80
|
-
/>
|
|
78
|
+
<Avatar color="none" border innerBorder={isTwakeTheme()} size={size}>
|
|
79
|
+
<Icon icon={LinkIcon} />
|
|
80
|
+
</Avatar>
|
|
81
81
|
</span>
|
|
82
82
|
)}
|
|
83
83
|
{hasExtraRecipients && (
|
|
84
84
|
<span data-testid="AvatarList-plusX">
|
|
85
|
-
<ExtraAvatar
|
|
86
|
-
className={styles['recipients-avatars--plusX']}
|
|
87
|
-
extraRecipients={extraRecipients}
|
|
88
|
-
size={size}
|
|
89
|
-
/>
|
|
85
|
+
<ExtraAvatar extraRecipients={extraRecipients} size={size} />
|
|
90
86
|
</span>
|
|
91
87
|
)}
|
|
92
88
|
{shownRecipients.map(recipient => {
|
|
@@ -98,10 +94,7 @@ const AvatarList = ({
|
|
|
98
94
|
}`}
|
|
99
95
|
key={recipient.index}
|
|
100
96
|
>
|
|
101
|
-
<GroupAvatar
|
|
102
|
-
size={size}
|
|
103
|
-
className={cx(styles['recipients-avatars--avatar'])}
|
|
104
|
-
/>
|
|
97
|
+
<GroupAvatar size={size} />
|
|
105
98
|
</span>
|
|
106
99
|
)
|
|
107
100
|
}
|
|
@@ -113,11 +106,7 @@ const AvatarList = ({
|
|
|
113
106
|
}`}
|
|
114
107
|
key={recipient.index}
|
|
115
108
|
>
|
|
116
|
-
<MemberAvatar
|
|
117
|
-
recipient={recipient}
|
|
118
|
-
size={size}
|
|
119
|
-
className={cx(styles['recipients-avatars--avatar'])}
|
|
120
|
-
/>
|
|
109
|
+
<MemberAvatar recipient={recipient} size={size} />
|
|
121
110
|
</span>
|
|
122
111
|
)
|
|
123
112
|
})}
|
|
@@ -2,7 +2,8 @@ import uniqueId from 'lodash/uniqueId'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
|
|
5
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
|
|
6
7
|
|
|
7
8
|
import { SharingTooltip, TooltipRecipientList } from '../Tooltip'
|
|
8
9
|
|
|
@@ -14,12 +15,12 @@ const ExtraAvatar = ({ className, size, extraRecipients = [] }) => {
|
|
|
14
15
|
<Avatar
|
|
15
16
|
className={className}
|
|
16
17
|
size={size}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}}
|
|
22
|
-
|
|
18
|
+
color="none"
|
|
19
|
+
border
|
|
20
|
+
innerBorder={isTwakeTheme()}
|
|
21
|
+
>
|
|
22
|
+
{`+${Math.min(extraRecipients.length, 99)}`}
|
|
23
|
+
</Avatar>
|
|
23
24
|
<SharingTooltip id={sharingTooltipId}>
|
|
24
25
|
<TooltipRecipientList recipientNames={extraRecipients} />
|
|
25
26
|
</SharingTooltip>
|
|
@@ -35,7 +36,7 @@ ExtraAvatar.propTypes = {
|
|
|
35
36
|
|
|
36
37
|
ExtraAvatar.defaultProps = {
|
|
37
38
|
extraRecipients: [],
|
|
38
|
-
size: '
|
|
39
|
+
size: 'm'
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export { ExtraAvatar }
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
3
5
|
import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
|
|
4
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
5
6
|
|
|
6
7
|
const GroupAvatar = ({ size, className }) => {
|
|
7
|
-
return
|
|
8
|
+
return (
|
|
9
|
+
<Avatar size={size} className={className} border>
|
|
10
|
+
<Icon icon={TeamIcon} />
|
|
11
|
+
</Avatar>
|
|
12
|
+
)
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
export { GroupAvatar }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
4
|
|
|
5
5
|
import logger from '../../logger'
|
|
6
|
-
import {
|
|
6
|
+
import { getInitials } from '../../models'
|
|
7
7
|
|
|
8
8
|
const MemberAvatar = ({ recipient, ...rest }) => {
|
|
9
9
|
// There are cases when due to apparent memory leaks, the recipient does not exist
|
|
@@ -35,13 +35,14 @@ const MemberAvatar = ({ recipient, ...rest }) => {
|
|
|
35
35
|
return (
|
|
36
36
|
<Avatar
|
|
37
37
|
// image={image}
|
|
38
|
-
|
|
39
|
-
textId={getDisplayName(recipient)}
|
|
38
|
+
border
|
|
40
39
|
disabled={
|
|
41
40
|
recipient.status === 'pending' || recipient.status === 'mail-not-send'
|
|
42
41
|
}
|
|
43
42
|
{...rest}
|
|
44
|
-
|
|
43
|
+
>
|
|
44
|
+
{getInitials(recipient)}
|
|
45
|
+
</Avatar>
|
|
45
46
|
)
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -2,14 +2,14 @@ import PropTypes from 'prop-types'
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { models } from 'cozy-client'
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
6
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
7
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
8
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
9
9
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
10
10
|
|
|
11
|
-
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
12
11
|
import { Contact, Group, getDisplayName, getInitials } from '../models'
|
|
12
|
+
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
13
13
|
|
|
14
14
|
const ContactModel = models.contact
|
|
15
15
|
|
|
@@ -33,9 +33,9 @@ export const ContactSuggestion = ({ contactOrGroup }) => {
|
|
|
33
33
|
<ListItem button>
|
|
34
34
|
<ListItemIcon>
|
|
35
35
|
{isContactGroup ? (
|
|
36
|
-
<GroupAvatar size="
|
|
36
|
+
<GroupAvatar size="m" />
|
|
37
37
|
) : (
|
|
38
|
-
<Avatar
|
|
38
|
+
<Avatar size="m">{avatarText}</Avatar>
|
|
39
39
|
)}
|
|
40
40
|
</ListItemIcon>
|
|
41
41
|
<ListItemText
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
4
|
|
|
5
5
|
import Identity from './Identity'
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models'
|
|
@@ -10,7 +10,7 @@ const MemberIdentity = ({ instance, ...rest }) => {
|
|
|
10
10
|
const name = getDisplayName(rest)
|
|
11
11
|
return (
|
|
12
12
|
<div className={styles['recipient']}>
|
|
13
|
-
<Avatar
|
|
13
|
+
<Avatar>{getInitials(rest)}</Avatar>
|
|
14
14
|
<div className={styles['recipient-ident-status']}>
|
|
15
15
|
<Identity name={name} details={instance} />
|
|
16
16
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import Avatar from 'cozy-ui/transpiled/react/
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
4
|
|
|
5
5
|
import Identity from './Identity'
|
|
6
6
|
import { getDisplayName, getInitials } from '../../models'
|
|
@@ -8,11 +8,7 @@ import styles from '../../styles/recipient.styl'
|
|
|
8
8
|
|
|
9
9
|
const OwnerIdentity = ({ url, size, ...rest }) => (
|
|
10
10
|
<div className={styles['avatar']}>
|
|
11
|
-
<Avatar
|
|
12
|
-
text={getInitials(rest)}
|
|
13
|
-
size={size}
|
|
14
|
-
textId={getDisplayName(rest)}
|
|
15
|
-
/>
|
|
11
|
+
<Avatar size={size}>{getInitials(rest)}</Avatar>
|
|
16
12
|
<Identity name={getDisplayName(rest)} details={url} />
|
|
17
13
|
</div>
|
|
18
14
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
import { useClient } from 'cozy-client'
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
4
5
|
import List from 'cozy-ui/transpiled/react/List'
|
|
5
6
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
6
7
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
7
8
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
8
9
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
9
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
10
10
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
11
11
|
|
|
12
12
|
import MemberRecipientStatus from './MemberRecipientStatus'
|
|
@@ -29,11 +29,7 @@ const GroupRecipientDetailWithAccess = ({ withAccess }) => {
|
|
|
29
29
|
return (
|
|
30
30
|
<ListItem disableGutters key={recipient.index} size="small">
|
|
31
31
|
<ListItemIcon>
|
|
32
|
-
<Avatar
|
|
33
|
-
size="small"
|
|
34
|
-
text={getInitials(recipient)}
|
|
35
|
-
textId={name}
|
|
36
|
-
/>
|
|
32
|
+
<Avatar size="m">{getInitials(recipient)}</Avatar>
|
|
37
33
|
</ListItemIcon>
|
|
38
34
|
<ListItemText
|
|
39
35
|
primary={name}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
3
4
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
4
5
|
import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden'
|
|
5
6
|
import List from 'cozy-ui/transpiled/react/List'
|
|
@@ -7,7 +8,6 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
7
8
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
8
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
9
10
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
10
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
11
11
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
12
|
|
|
13
13
|
import { DEFAULT_DISPLAY_NAME } from '../../helpers/recipients'
|
|
@@ -35,11 +35,7 @@ const GroupRecipientDetailWithoutAccess = ({ withoutAccess, isOwner }) => {
|
|
|
35
35
|
size="small"
|
|
36
36
|
>
|
|
37
37
|
<ListItemIcon>
|
|
38
|
-
<Avatar
|
|
39
|
-
size="small"
|
|
40
|
-
text={getInitials(recipient)}
|
|
41
|
-
textId={name}
|
|
42
|
-
/>
|
|
38
|
+
<Avatar size="m">{getInitials(recipient)}</Avatar>
|
|
43
39
|
</ListItemIcon>
|
|
44
40
|
<ListItemText
|
|
45
41
|
primary={name}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
5
|
import Fade from 'cozy-ui/transpiled/react/Fade'
|
|
6
6
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
7
7
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
@@ -9,6 +9,7 @@ import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
|
9
9
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
10
10
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
11
11
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
12
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
|
|
12
13
|
import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
|
|
13
14
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
14
15
|
|
|
@@ -20,7 +21,6 @@ import {
|
|
|
20
21
|
} from '../../helpers/permissions'
|
|
21
22
|
import { FADE_IN_DURATION } from '../../helpers/recipients'
|
|
22
23
|
import { useSharingContext } from '../../hooks/useSharingContext'
|
|
23
|
-
import styles from '../../styles/recipient.styl'
|
|
24
24
|
|
|
25
25
|
const LinkRecipient = props => {
|
|
26
26
|
const { t, f, lang } = useI18n()
|
|
@@ -60,9 +60,9 @@ const LinkRecipient = props => {
|
|
|
60
60
|
<Fade in timeout={fadeIn ? FADE_IN_DURATION : 0}>
|
|
61
61
|
<ListItem gutters={isMobile ? 'default' : 'double'} size="small">
|
|
62
62
|
<ListItemIcon>
|
|
63
|
-
<
|
|
63
|
+
<Avatar size="m" color="none" border innerBorder={isTwakeTheme()}>
|
|
64
64
|
<Icon icon={LinkIcon} />
|
|
65
|
-
</
|
|
65
|
+
</Avatar>
|
|
66
66
|
</ListItemIcon>
|
|
67
67
|
<ListItemText
|
|
68
68
|
primary={<Typography variant="body1">{textPrimary}</Typography>}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
5
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
6
6
|
import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
|
|
7
7
|
import ListItem from 'cozy-ui/transpiled/react/ListItem'
|
|
8
8
|
import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
|
|
9
9
|
import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
|
|
10
10
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
11
|
+
import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
|
|
11
12
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
12
13
|
|
|
13
14
|
import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
|
|
14
15
|
import withLocales from '../../hoc/withLocales'
|
|
15
|
-
import styles from '../../styles/recipient.styl'
|
|
16
16
|
|
|
17
17
|
const LinkRecipientLite = ({ permissions, link }) => {
|
|
18
18
|
const { t } = useI18n()
|
|
@@ -24,9 +24,9 @@ const LinkRecipientLite = ({ permissions, link }) => {
|
|
|
24
24
|
return (
|
|
25
25
|
<ListItem size="small" ellipsis>
|
|
26
26
|
<ListItemIcon>
|
|
27
|
-
<
|
|
27
|
+
<Avatar size="m" color="none" border innerBorder={isTwakeTheme()}>
|
|
28
28
|
<Icon icon={LinkIcon} />
|
|
29
|
-
</
|
|
29
|
+
</Avatar>
|
|
30
30
|
</ListItemIcon>
|
|
31
31
|
<ListItemText
|
|
32
32
|
primary={t('Share.recipients.anyoneWithTheLink')}
|
|
@@ -53,7 +53,7 @@ const MemberRecipient = props => {
|
|
|
53
53
|
<Fade in timeout={fadeIn ? FADE_IN_DURATION : 0}>
|
|
54
54
|
<ListItem gutters={isMobile ? 'default' : 'double'} size="small">
|
|
55
55
|
<ListItemIcon>
|
|
56
|
-
<MemberAvatar size="
|
|
56
|
+
<MemberAvatar size="m" recipient={props} />
|
|
57
57
|
</ListItemIcon>
|
|
58
58
|
<ListItemText
|
|
59
59
|
primary={
|
|
@@ -25,7 +25,7 @@ const MemberRecipientLite = ({ recipient, isOwner, ...props }) => {
|
|
|
25
25
|
return (
|
|
26
26
|
<ListItem size="small" ellipsis>
|
|
27
27
|
<ListItemIcon>
|
|
28
|
-
<MemberAvatar size="
|
|
28
|
+
<MemberAvatar size="m" recipient={recipient} {...props} />
|
|
29
29
|
</ListItemIcon>
|
|
30
30
|
<ListItemText
|
|
31
31
|
primary={
|
|
@@ -2,9 +2,9 @@ import PropTypes from 'prop-types'
|
|
|
2
2
|
import React, { useState, useRef } from 'react'
|
|
3
3
|
import Autosuggest from 'react-autosuggest'
|
|
4
4
|
|
|
5
|
+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
5
6
|
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
6
7
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner'
|
|
7
|
-
import Avatar from 'cozy-ui/transpiled/react/legacy/Avatar'
|
|
8
8
|
|
|
9
9
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
10
10
|
import ContactSuggestion from './ContactSuggestion'
|
|
@@ -149,9 +149,9 @@ const ShareAutocomplete = ({
|
|
|
149
149
|
key={`key_recipient_${idx}`}
|
|
150
150
|
avatar={
|
|
151
151
|
isContactGroup ? (
|
|
152
|
-
<GroupAvatar size="
|
|
152
|
+
<GroupAvatar size="xs" />
|
|
153
153
|
) : (
|
|
154
|
-
<Avatar
|
|
154
|
+
<Avatar size="xs">{avatarText}</Avatar>
|
|
155
155
|
)
|
|
156
156
|
}
|
|
157
157
|
label={name}
|
|
@@ -33,9 +33,9 @@ const SharedDriveRecipient = props => {
|
|
|
33
33
|
<ListItem gutters={isMobile ? 'default' : 'double'} size="small">
|
|
34
34
|
<ListItemIcon>
|
|
35
35
|
{members ? (
|
|
36
|
-
<GroupAvatar size="
|
|
36
|
+
<GroupAvatar size="m" />
|
|
37
37
|
) : (
|
|
38
|
-
<MemberAvatar size="
|
|
38
|
+
<MemberAvatar size="m" recipient={props} />
|
|
39
39
|
)}
|
|
40
40
|
</ListItemIcon>
|
|
41
41
|
<ListItemText
|
|
@@ -61,17 +61,5 @@
|
|
|
61
61
|
&.--interactive
|
|
62
62
|
cursor pointer
|
|
63
63
|
|
|
64
|
-
&--link,
|
|
65
|
-
&--plusX,
|
|
66
|
-
&--avatar
|
|
67
|
-
border-width 2px
|
|
68
|
-
border-style solid
|
|
69
|
-
border-color var(--paperBackgroundColor)
|
|
70
|
-
|
|
71
|
-
&--link
|
|
72
|
-
background-color var(--genericRecipientBackground)
|
|
73
|
-
svg
|
|
74
|
-
fill: var(--genericRecipientColor)
|
|
75
|
-
|
|
76
64
|
& > *:not(:first-child)
|
|
77
65
|
margin-right -0.6rem
|