cozy-sharing 36.5.0 → 37.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/components/Avatar/AvatarList.js +2 -1
- package/dist/components/Avatar/GroupAvatar.js +9 -5
- package/dist/components/ContactSuggestion.js +2 -1
- package/dist/components/Recipient/GroupRecipient.js +3 -1
- package/dist/components/Recipient/GroupRecipientPermissions.js +4 -2
- package/dist/components/ShareAutosuggest.js +2 -1
- package/package.json +5 -5
- package/src/components/Avatar/AvatarList.jsx +1 -1
- package/src/components/Avatar/GroupAvatar.jsx +8 -5
- package/src/components/ContactSuggestion.jsx +1 -1
- package/src/components/Recipient/GroupRecipient.jsx +2 -2
- package/src/components/Recipient/GroupRecipientPermissions.jsx +3 -2
- package/src/components/ShareAutosuggest.jsx +1 -1
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
|
+
# [37.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.5.0...cozy-sharing@37.0.0) (2026-07-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- Display correct icon and colors for group avatar ([e630c7a](https://github.com/cozy/cozy-libs/commit/e630c7a9c9cc2d3b784c3bce1848bdcbbf257c25))
|
|
11
|
+
- Update cozy-ui ([8d1d2a1](https://github.com/cozy/cozy-libs/commit/8d1d2a1a32963e7b1fc8efdc07ca76f3e48a430b))
|
|
12
|
+
|
|
13
|
+
### BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
- You need cozy-ui >= 140.5.0
|
|
16
|
+
|
|
6
17
|
# [36.5.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@36.4.2...cozy-sharing@36.5.0) (2026-07-09)
|
|
7
18
|
|
|
8
19
|
### Features
|
|
@@ -88,7 +88,8 @@ var AvatarList = function AvatarList(_ref2) {
|
|
|
88
88
|
"data-testid": "AvatarList-avatar".concat(recipient.status === 'owner' ? '-owner' : ''),
|
|
89
89
|
key: recipient.index
|
|
90
90
|
}, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
91
|
-
size: size
|
|
91
|
+
size: size,
|
|
92
|
+
color: recipient.color
|
|
92
93
|
}));
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Icon, Team } from '@linagora/twake-icons';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import
|
|
2
|
+
import { Icon, Peoples } from '@linagora/twake-icons';
|
|
3
|
+
import Avatar, { colorToGradient } from 'cozy-ui/transpiled/react/Avatar';
|
|
4
|
+
import { COLORS } from 'cozy-ui/transpiled/react/ColorList/helpers';
|
|
5
|
+
var DEFAULT_COLOR = COLORS[4];
|
|
4
6
|
|
|
5
7
|
var GroupAvatar = function GroupAvatar(_ref) {
|
|
6
8
|
var size = _ref.size,
|
|
9
|
+
_ref$color = _ref.color,
|
|
10
|
+
color = _ref$color === void 0 ? DEFAULT_COLOR : _ref$color,
|
|
7
11
|
className = _ref.className;
|
|
8
12
|
return /*#__PURE__*/React.createElement(Avatar, {
|
|
9
13
|
size: size,
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
color: colorToGradient(color),
|
|
15
|
+
className: className
|
|
12
16
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
13
|
-
icon:
|
|
17
|
+
icon: Peoples
|
|
14
18
|
}));
|
|
15
19
|
};
|
|
16
20
|
|
|
@@ -18,7 +18,8 @@ export var ContactSuggestion = function ContactSuggestion(_ref) {
|
|
|
18
18
|
return /*#__PURE__*/React.createElement(ListItem, {
|
|
19
19
|
button: true
|
|
20
20
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
21
|
-
size: "m"
|
|
21
|
+
size: "m",
|
|
22
|
+
color: contactOrGroup.color
|
|
22
23
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
23
24
|
primary: contactOrGroup.name,
|
|
24
25
|
secondary: t('Share.members.count', {
|
|
@@ -17,6 +17,7 @@ import { GroupAvatar } from '../Avatar/GroupAvatar';
|
|
|
17
17
|
|
|
18
18
|
var GroupRecipient = function GroupRecipient(props) {
|
|
19
19
|
var name = props.name,
|
|
20
|
+
color = props.color,
|
|
20
21
|
members = props.members,
|
|
21
22
|
fadeIn = props.fadeIn,
|
|
22
23
|
owner = props.owner,
|
|
@@ -60,7 +61,8 @@ var GroupRecipient = function GroupRecipient(props) {
|
|
|
60
61
|
gutters: isMobile ? 'default' : 'double',
|
|
61
62
|
size: "small"
|
|
62
63
|
}, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
63
|
-
size: "m"
|
|
64
|
+
size: "m",
|
|
65
|
+
color: color
|
|
64
66
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
65
67
|
primary: /*#__PURE__*/React.createElement(Typography, {
|
|
66
68
|
variant: "body1"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
import { Icon, CrossCircleOutline } from '@linagora/twake-icons';
|
|
5
4
|
import React, { useState, useRef } from 'react';
|
|
5
|
+
import { Icon, CrossCircleOutline } from '@linagora/twake-icons';
|
|
6
6
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
|
|
7
7
|
import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
|
|
8
8
|
import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader';
|
|
@@ -19,6 +19,7 @@ import { GroupAvatar } from '../Avatar/GroupAvatar';
|
|
|
19
19
|
|
|
20
20
|
var GroupRecipientPermissions = function GroupRecipientPermissions(_ref) {
|
|
21
21
|
var name = _ref.name,
|
|
22
|
+
color = _ref.color,
|
|
22
23
|
isOwner = _ref.isOwner,
|
|
23
24
|
isReadOnly = _ref.isReadOnly,
|
|
24
25
|
sharingId = _ref.sharingId,
|
|
@@ -118,7 +119,8 @@ var GroupRecipientPermissions = function GroupRecipientPermissions(_ref) {
|
|
|
118
119
|
autoClose: true,
|
|
119
120
|
onClose: hideMenu
|
|
120
121
|
}, /*#__PURE__*/React.createElement(ActionsMenuMobileHeader, null, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
121
|
-
size: "m"
|
|
122
|
+
size: "m",
|
|
123
|
+
color: color
|
|
122
124
|
})), /*#__PURE__*/React.createElement(ListItemText, {
|
|
123
125
|
primary: name,
|
|
124
126
|
primaryTypographyProps: {
|
|
@@ -188,7 +188,8 @@ var ShareAutosuggest = function ShareAutosuggest(_ref) {
|
|
|
188
188
|
id: "recipient_".concat(idx),
|
|
189
189
|
key: "key_recipient_".concat(idx),
|
|
190
190
|
avatar: isContactGroup ? /*#__PURE__*/React.createElement(GroupAvatar, {
|
|
191
|
-
size: "xs"
|
|
191
|
+
size: "xs",
|
|
192
|
+
color: recipient.color
|
|
192
193
|
}) : /*#__PURE__*/React.createElement(Avatar, {
|
|
193
194
|
size: "xs"
|
|
194
195
|
}, avatarText),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"cozy-device-helper": "^4.0.0",
|
|
59
59
|
"cozy-intent": "^2.31.1",
|
|
60
60
|
"cozy-minilog": "^3.10.1",
|
|
61
|
-
"cozy-ui": "^
|
|
62
|
-
"cozy-ui-plus": "^12.0.
|
|
61
|
+
"cozy-ui": "^140.5.0",
|
|
62
|
+
"cozy-ui-plus": "^12.0.2",
|
|
63
63
|
"jest": "30.3.0",
|
|
64
64
|
"jest-environment-jsdom": "30.3.0",
|
|
65
65
|
"react": "16.12.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"cozy-flags": ">=4.8.1",
|
|
76
76
|
"cozy-intent": ">=2.29.1",
|
|
77
77
|
"cozy-minilog": ">=3.9.1",
|
|
78
|
-
"cozy-ui": ">=
|
|
78
|
+
"cozy-ui": ">=140.5.0",
|
|
79
79
|
"cozy-ui-plus": ">=6.0.0",
|
|
80
80
|
"prop-types": ">=15.7.2",
|
|
81
81
|
"react": ">=16.12.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"sideEffects": [
|
|
86
86
|
"*.css"
|
|
87
87
|
],
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "58606cf6a38bd7dbfcf6708135c2a9df4a31f284"
|
|
89
89
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { Icon, Team } from '@linagora/twake-icons'
|
|
2
1
|
import React from 'react'
|
|
3
2
|
|
|
4
|
-
import
|
|
3
|
+
import { Icon, Peoples } from '@linagora/twake-icons'
|
|
4
|
+
import Avatar, { colorToGradient } from 'cozy-ui/transpiled/react/Avatar'
|
|
5
|
+
import { COLORS } from 'cozy-ui/transpiled/react/ColorList/helpers'
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
+
const DEFAULT_COLOR = COLORS[4]
|
|
8
|
+
|
|
9
|
+
const GroupAvatar = ({ size, color = DEFAULT_COLOR, className }) => {
|
|
7
10
|
return (
|
|
8
|
-
<Avatar size={size} className={className}
|
|
9
|
-
<Icon icon={
|
|
11
|
+
<Avatar size={size} color={colorToGradient(color)} className={className}>
|
|
12
|
+
<Icon icon={Peoples} />
|
|
10
13
|
</Avatar>
|
|
11
14
|
)
|
|
12
15
|
}
|
|
@@ -18,7 +18,7 @@ export const ContactSuggestion = ({ contactOrGroup }) => {
|
|
|
18
18
|
return (
|
|
19
19
|
<ListItem button>
|
|
20
20
|
<ListItemIcon>
|
|
21
|
-
<GroupAvatar size="m" />
|
|
21
|
+
<GroupAvatar size="m" color={contactOrGroup.color} />
|
|
22
22
|
</ListItemIcon>
|
|
23
23
|
<ListItemText
|
|
24
24
|
primary={contactOrGroup.name}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import { GroupAvatar } from '../Avatar/GroupAvatar'
|
|
20
20
|
|
|
21
21
|
const GroupRecipient = props => {
|
|
22
|
-
const { name, members, fadeIn, owner, isOwner } = props
|
|
22
|
+
const { name, color, members, fadeIn, owner, isOwner } = props
|
|
23
23
|
const { t } = useI18n()
|
|
24
24
|
const client = useClient()
|
|
25
25
|
const { isMobile } = useBreakpoints()
|
|
@@ -52,7 +52,7 @@ const GroupRecipient = props => {
|
|
|
52
52
|
size="small"
|
|
53
53
|
>
|
|
54
54
|
<ListItemIcon>
|
|
55
|
-
<GroupAvatar size="m" />
|
|
55
|
+
<GroupAvatar size="m" color={color} />
|
|
56
56
|
</ListItemIcon>
|
|
57
57
|
<ListItemText
|
|
58
58
|
primary={<Typography variant="body1">{name}</Typography>}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Icon, CrossCircleOutline } from '@linagora/twake-icons'
|
|
2
1
|
import React, { useState, useRef } from 'react'
|
|
3
2
|
|
|
3
|
+
import { Icon, CrossCircleOutline } from '@linagora/twake-icons'
|
|
4
4
|
import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
|
|
5
5
|
import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions'
|
|
6
6
|
import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader'
|
|
@@ -18,6 +18,7 @@ import { GroupAvatar } from '../Avatar/GroupAvatar'
|
|
|
18
18
|
|
|
19
19
|
const GroupRecipientPermissions = ({
|
|
20
20
|
name,
|
|
21
|
+
color,
|
|
21
22
|
isOwner,
|
|
22
23
|
isReadOnly,
|
|
23
24
|
sharingId,
|
|
@@ -83,7 +84,7 @@ const GroupRecipientPermissions = ({
|
|
|
83
84
|
>
|
|
84
85
|
<ActionsMenuMobileHeader>
|
|
85
86
|
<ListItemIcon>
|
|
86
|
-
<GroupAvatar size="m" />
|
|
87
|
+
<GroupAvatar size="m" color={color} />
|
|
87
88
|
</ListItemIcon>
|
|
88
89
|
<ListItemText
|
|
89
90
|
primary={name}
|