cozy-sharing 33.6.1 → 34.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/OpenSharingLinkButton.js +1 -1
  3. package/dist/actions/addToCozySharingLink.js +2 -3
  4. package/dist/actions/createCozySharingLink.js +2 -3
  5. package/dist/actions/shareNative.js +2 -3
  6. package/dist/actions/syncToCozySharingLink.js +2 -3
  7. package/dist/components/Avatar/AvatarList.js +2 -3
  8. package/dist/components/Avatar/GroupAvatar.js +2 -3
  9. package/dist/components/Recipient/GroupRecipientDetailWithoutAccess.js +2 -3
  10. package/dist/components/Recipient/GroupRecipientPermissions.js +2 -3
  11. package/dist/components/Recipient/LinkRecipient.js +2 -4
  12. package/dist/components/Recipient/LinkRecipientLite.js +2 -3
  13. package/dist/components/Recipient/MemberRecipientPermissions.js +2 -3
  14. package/dist/components/Recipient/actions/revokeLink.js +3 -4
  15. package/dist/components/ShareButton.js +4 -5
  16. package/dist/components/ShareByLink.js +5 -7
  17. package/dist/components/ShareRestrictionModal/BoxDate.js +2 -3
  18. package/dist/components/ShareRestrictionModal/BoxEditingRights.js +3 -5
  19. package/dist/components/ShareRestrictionModal/BoxPassword.js +3 -5
  20. package/dist/components/ShareRestrictionModal/ShareRestrictionModal.js +2 -3
  21. package/dist/components/SharedBadge.js +2 -3
  22. package/dist/components/SharedDrive/SharedDriveHeader.js +1 -1
  23. package/dist/helpers/sharings.js +4 -6
  24. package/jest.config.js +3 -2
  25. package/jestHelpers/mocks/twake-icons.js +23 -0
  26. package/package.json +4 -2
  27. package/src/OpenSharingLinkButton.jsx +1 -1
  28. package/src/actions/addToCozySharingLink.js +2 -3
  29. package/src/actions/createCozySharingLink.js +2 -3
  30. package/src/actions/shareNative.js +2 -3
  31. package/src/actions/syncToCozySharingLink.js +2 -3
  32. package/src/components/Avatar/AvatarList.jsx +2 -3
  33. package/src/components/Avatar/GroupAvatar.jsx +2 -3
  34. package/src/components/Recipient/GroupRecipientDetailWithoutAccess.jsx +2 -3
  35. package/src/components/Recipient/GroupRecipientPermissions.jsx +2 -3
  36. package/src/components/Recipient/LinkRecipient.jsx +2 -4
  37. package/src/components/Recipient/LinkRecipientLite.jsx +2 -3
  38. package/src/components/Recipient/MemberRecipientPermissions.jsx +2 -3
  39. package/src/components/Recipient/actions/revokeLink.js +3 -4
  40. package/src/components/ShareButton.jsx +4 -5
  41. package/src/components/ShareByLink.jsx +5 -7
  42. package/src/components/ShareRestrictionModal/BoxDate.jsx +2 -3
  43. package/src/components/ShareRestrictionModal/BoxEditingRights.jsx +3 -5
  44. package/src/components/ShareRestrictionModal/BoxPassword.jsx +3 -5
  45. package/src/components/ShareRestrictionModal/ShareRestrictionModal.jsx +2 -3
  46. package/src/components/SharedBadge.jsx +2 -4
  47. package/src/components/SharedDrive/SharedDriveHeader.jsx +1 -1
  48. package/src/helpers/sharings.js +5 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
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
+ # [34.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@33.6.1...cozy-sharing@34.0.0) (2026-06-24)
7
+
8
+ ### Features
9
+
10
+ - **cozy-sharing:** Add twake-icons ([7f2432a](https://github.com/cozy/cozy-libs/commit/7f2432a601ca02a72f0b792726c6c70919c6036a))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - **cozy-sharing:** You must add `@linagora/twake-icons >= 2.6.2`
15
+
6
16
  ## [33.6.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@33.6.0...cozy-sharing@33.6.1) (2026-06-22)
7
17
 
8
18
  ### Bug Fixes
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["link", "isSharingShortcutCreated", "isShortLabel"];
4
+ import { Icon } from '@linagora/twake-icons';
4
5
  import PropTypes from 'prop-types';
5
6
  import React from 'react';
6
7
  import Button from 'cozy-ui/transpiled/react/Buttons';
7
- import Icon from 'cozy-ui/transpiled/react/Icon';
8
8
  import { useI18n } from 'twake-i18n';
9
9
  import { getIconWithlabel, openExternalLink } from './helpers/sharings';
10
10
  import withLocales from './hoc/withLocales';
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, CloudPlusOutlined } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -36,7 +35,7 @@ export var addToCozySharingLink = function addToCozySharingLink(_ref) {
36
35
  var label = t('Share.banner.add_to_mine', {
37
36
  smart_count: isShortLabel ? 1 : 2
38
37
  });
39
- var icon = CloudPlusOutlinedIcon;
38
+ var icon = CloudPlusOutlined;
40
39
  return {
41
40
  name: 'addToCozySharingLink',
42
41
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, ToTheCloud } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -35,7 +34,7 @@ export var createCozySharingLink = function createCozySharingLink(_ref) {
35
34
  var label = t('Share.create-cozy', {
36
35
  smart_count: isShortLabel ? 1 : 2
37
36
  });
38
- var icon = ToTheCloudIcon;
37
+ var icon = ToTheCloud;
39
38
  return {
40
39
  name: 'createCozySharingLink',
41
40
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Reply } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ReplyIcon from 'cozy-ui/transpiled/react/Icons/Reply';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { getActionsI18n } from '../hoc/withLocales';
@@ -29,7 +28,7 @@ export var shareNative = function shareNative(_ref) {
29
28
  t = _getActionsI18n.t;
30
29
 
31
30
  var label = t('Share.send');
32
- var icon = ReplyIcon;
31
+ var icon = Reply;
33
32
  return {
34
33
  name: 'shareNative',
35
34
  label: label,
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Sync } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import { openExternalLink } from '../helpers/sharings';
@@ -35,7 +34,7 @@ export var syncToCozySharingLink = function syncToCozySharingLink(_ref) {
35
34
  var label = t('Share.banner.sync_to_mine', {
36
35
  smart_count: isShortLabel ? 1 : 2
37
36
  });
38
- var icon = SyncIcon;
37
+ var icon = Sync;
39
38
  return {
40
39
  name: 'syncToCozySharingLink',
41
40
  label: label,
@@ -1,10 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { Icon, Link } from '@linagora/twake-icons';
2
3
  import cx from 'classnames';
3
4
  import React from 'react';
4
5
  import { useClient } from 'cozy-client';
5
6
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
8
7
  import { ExtraAvatar } from './ExtraAvatar';
9
8
  import { GroupAvatar } from './GroupAvatar';
10
9
  import { MemberAvatar } from './MemberAvatar';
@@ -77,7 +76,7 @@ var AvatarList = function AvatarList(_ref2) {
77
76
  innerBorder: true,
78
77
  size: size
79
78
  }, /*#__PURE__*/React.createElement(Icon, {
80
- icon: LinkIcon
79
+ icon: Link
81
80
  }))), hasExtraRecipients && /*#__PURE__*/React.createElement("span", {
82
81
  "data-testid": "AvatarList-plusX"
83
82
  }, /*#__PURE__*/React.createElement(ExtraAvatar, {
@@ -1,7 +1,6 @@
1
+ import { Icon, Team } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
3
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
3
- import Icon from 'cozy-ui/transpiled/react/Icon';
4
- import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team';
5
4
 
6
5
  var GroupAvatar = function GroupAvatar(_ref) {
7
6
  var size = _ref.size,
@@ -11,7 +10,7 @@ var GroupAvatar = function GroupAvatar(_ref) {
11
10
  className: className,
12
11
  border: true
13
12
  }, /*#__PURE__*/React.createElement(Icon, {
14
- icon: TeamIcon
13
+ icon: Team
15
14
  }));
16
15
  };
17
16
 
@@ -1,7 +1,6 @@
1
+ import { Icon, Forbidden } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
3
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
3
- import Icon from 'cozy-ui/transpiled/react/Icon';
4
- import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden';
5
4
  import List from 'cozy-ui/transpiled/react/List';
6
5
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
7
6
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -21,7 +20,7 @@ var GroupRecipientDetailWithoutAccess = function GroupRecipientDetailWithoutAcce
21
20
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Typography, {
22
21
  variant: "subtitle2"
23
22
  }, t('GroupRecipientDetail.withoutAccess.title')), /*#__PURE__*/React.createElement(List, null, withoutAccess.map(function (recipient) {
24
- var icon = recipient.status === 'revoked' ? ForbiddenIcon : null;
23
+ var icon = recipient.status === 'revoked' ? Forbidden : null;
25
24
  var defaultDisplayName = t(DEFAULT_DISPLAY_NAME);
26
25
  var name = getDisplayName(recipient, defaultDisplayName);
27
26
  return /*#__PURE__*/React.createElement(ListItem, {
@@ -1,14 +1,13 @@
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';
4
5
  import React, { useState, useRef } from 'react';
5
6
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
6
7
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
7
8
  import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader';
8
9
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
9
- import Icon from 'cozy-ui/transpiled/react/Icon';
10
10
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
11
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline';
12
11
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
13
12
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
14
13
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
@@ -127,7 +126,7 @@ var GroupRecipientPermissions = function GroupRecipientPermissions(_ref) {
127
126
  className: "u-ml-half",
128
127
  "aria-label": t('Share.members.revoke')
129
128
  }, /*#__PURE__*/React.createElement(Icon, {
130
- icon: CrossCircleOutlineIcon
129
+ icon: CrossCircleOutline
131
130
  }))));
132
131
  };
133
132
 
@@ -1,12 +1,10 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { Icon, Gear, Link } from '@linagora/twake-icons';
2
3
  import PropTypes from 'prop-types';
3
4
  import React, { useState } from 'react';
4
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
5
6
  import Fade from 'cozy-ui/transpiled/react/Fade';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
7
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
8
- import Gear from 'cozy-ui/transpiled/react/Icons/Gear';
9
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
10
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
11
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
12
10
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
@@ -98,7 +96,7 @@ var LinkRecipient = function LinkRecipient(props) {
98
96
  border: true,
99
97
  innerBorder: true
100
98
  }, /*#__PURE__*/React.createElement(Icon, {
101
- icon: LinkIcon
99
+ icon: Link
102
100
  }))), isReadOnly ? /*#__PURE__*/React.createElement(LinkRecipientTextReadOnly, {
103
101
  textPrimary: textPrimary,
104
102
  textSecondary: textSecondary
@@ -1,8 +1,7 @@
1
+ import { Icon, Link } from '@linagora/twake-icons';
1
2
  import PropTypes from 'prop-types';
2
3
  import React from 'react';
3
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
6
5
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
7
6
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
8
7
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
@@ -29,7 +28,7 @@ var LinkRecipientLite = function LinkRecipientLite(_ref) {
29
28
  border: true,
30
29
  innerBorder: true
31
30
  }, /*#__PURE__*/React.createElement(Icon, {
32
- icon: LinkIcon
31
+ icon: Link
33
32
  }))), /*#__PURE__*/React.createElement(ListItemText, {
34
33
  primary: t('Share.recipients.anyoneWithTheLink'),
35
34
  secondary: link
@@ -1,15 +1,14 @@
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';
4
5
  import React, { useState, useRef, useCallback } from 'react';
5
6
  import { useClient } from 'cozy-client';
6
7
  import minilog from 'cozy-minilog';
7
8
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
8
9
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
9
10
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton';
10
- import Icon from 'cozy-ui/transpiled/react/Icon';
11
11
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
12
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline';
13
12
  import Spinner from 'cozy-ui/transpiled/react/Spinner';
14
13
  import Typography from 'cozy-ui/transpiled/react/Typography';
15
14
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
@@ -167,7 +166,7 @@ var MemberRecipientPermissions = function MemberRecipientPermissions(_ref) {
167
166
  className: "u-ml-half",
168
167
  "aria-label": t('Share.members.revoke')
169
168
  }, /*#__PURE__*/React.createElement(Icon, {
170
- icon: CrossCircleOutlineIcon
169
+ icon: CrossCircleOutline
171
170
  }))));
172
171
  };
173
172
 
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import { Icon, Trash } from '@linagora/twake-icons';
2
3
  import React, { forwardRef } from 'react';
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
8
7
  import Typography from 'cozy-ui/transpiled/react/Typography';
@@ -14,13 +13,13 @@ var revokeLink = function revokeLink(_ref) {
14
13
  return {
15
14
  name: 'revokeLink',
16
15
  label: title,
17
- icon: TrashIcon,
16
+ icon: Trash,
18
17
  action: handleRevocation,
19
18
  Component: /*#__PURE__*/forwardRef(function RevokeLinkItem(props, ref) {
20
19
  return /*#__PURE__*/React.createElement(ActionsMenuItem, _extends({}, props, {
21
20
  ref: ref
22
21
  }), /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
23
- icon: TrashIcon,
22
+ icon: Trash,
24
23
  color: "var(--errorColor)"
25
24
  })), /*#__PURE__*/React.createElement(ListItemText, {
26
25
  primary: /*#__PURE__*/React.createElement(Typography, {
@@ -3,11 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["label", "onClick", "className"],
4
4
  _excluded2 = ["label", "onClick", "className"],
5
5
  _excluded3 = ["label", "onClick", "className"];
6
+ import { Icon, Share } from '@linagora/twake-icons';
6
7
  import classNames from 'classnames';
7
8
  import React from 'react';
8
9
  import Button from 'cozy-ui/transpiled/react/Buttons';
9
- import Icon from 'cozy-ui/transpiled/react/Icon';
10
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
11
10
  var styles = {
12
11
  "coz-btn-shared": "button__coz-btn-shared___9MFbY",
13
12
  "coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___25PBh"
@@ -26,7 +25,7 @@ export var ShareButton = function ShareButton(_ref) {
26
25
  return _onClick();
27
26
  },
28
27
  startIcon: /*#__PURE__*/React.createElement(Icon, {
29
- icon: ShareIcon
28
+ icon: Share
30
29
  }),
31
30
  label: label
32
31
  }, props));
@@ -44,7 +43,7 @@ export var SharedByMeButton = function SharedByMeButton(_ref2) {
44
43
  return _onClick2();
45
44
  },
46
45
  icon: /*#__PURE__*/React.createElement(Icon, {
47
- icon: ShareIcon
46
+ icon: Share
48
47
  }),
49
48
  label: label
50
49
  }, props));
@@ -61,7 +60,7 @@ export var SharedWithMeButton = function SharedWithMeButton(_ref3) {
61
60
  return _onClick3();
62
61
  },
63
62
  startIcon: /*#__PURE__*/React.createElement(Icon, {
64
- icon: ShareIcon
63
+ icon: Share
65
64
  }),
66
65
  label: label
67
66
  }, props));
@@ -1,13 +1,11 @@
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, Copy, Link } from '@linagora/twake-icons';
4
5
  import PropTypes from 'prop-types';
5
6
  import React, { useReducer, useState } from 'react';
6
7
  import { useClient } from 'cozy-client';
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons';
8
- import Icon from 'cozy-ui/transpiled/react/Icon';
9
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy';
10
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
11
9
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
12
10
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
13
11
  import { useI18n } from 'twake-i18n';
@@ -284,13 +282,13 @@ var ShareByLink = function ShareByLink(_ref) {
284
282
  variant: "secondary",
285
283
  size: "medium",
286
284
  startIcon: /*#__PURE__*/React.createElement(Icon, {
287
- icon: LinkIcon
285
+ icon: Link
288
286
  }),
289
287
  onClick: shareLink,
290
288
  busy: isGenerating
291
289
  }), /*#__PURE__*/React.createElement(Button, {
292
290
  label: /*#__PURE__*/React.createElement(Icon, {
293
- icon: CopyIcon
291
+ icon: Copy
294
292
  }),
295
293
  variant: "secondary",
296
294
  size: "medium",
@@ -301,7 +299,7 @@ var ShareByLink = function ShareByLink(_ref) {
301
299
  variant: "secondary",
302
300
  size: "medium",
303
301
  startIcon: /*#__PURE__*/React.createElement(Icon, {
304
- icon: LinkIcon
302
+ icon: Link
305
303
  }),
306
304
  onClick: generateLinkAndCopyLinkToClipboard,
307
305
  busy: isGenerating
@@ -310,7 +308,7 @@ var ShareByLink = function ShareByLink(_ref) {
310
308
  variant: "secondary",
311
309
  size: "medium",
312
310
  startIcon: /*#__PURE__*/React.createElement(Icon, {
313
- icon: LinkIcon
311
+ icon: Link
314
312
  }),
315
313
  onClick: generateLinkSilently,
316
314
  busy: isGenerating
@@ -1,10 +1,9 @@
1
+ import { Icon, Calendar } from '@linagora/twake-icons';
1
2
  import { format } from 'date-fns';
2
3
  import PropTypes from 'prop-types';
3
4
  import React from 'react';
4
5
  import Box from 'cozy-ui/transpiled/react/Box';
5
6
  import DatePicker from 'cozy-ui/transpiled/react/DatePicker';
6
- import Icon from 'cozy-ui/transpiled/react/Icon';
7
- import CalendarIcon from 'cozy-ui/transpiled/react/Icons/Calendar';
8
7
  import List from 'cozy-ui/transpiled/react/List';
9
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
10
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -44,7 +43,7 @@ export var BoxDate = function BoxDate(_ref) {
44
43
  return handleDateToggle(!toggle);
45
44
  }
46
45
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
47
- icon: CalendarIcon
46
+ icon: Calendar
48
47
  })), /*#__PURE__*/React.createElement(ListItemText, {
49
48
  primary: t('BoxDate.text')
50
49
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
@@ -1,4 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { Icon, Bottom, People } from '@linagora/twake-icons';
2
3
  import PropTypes from 'prop-types';
3
4
  import React, { useReducer, useRef } from 'react';
4
5
  import { useClient } from 'cozy-client';
@@ -7,9 +8,6 @@ import flag from 'cozy-flags';
7
8
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu';
8
9
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions';
9
10
  import Box from 'cozy-ui/transpiled/react/Box';
10
- import Icon from 'cozy-ui/transpiled/react/Icon';
11
- import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom';
12
- import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People';
13
11
  import List from 'cozy-ui/transpiled/react/List';
14
12
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
15
13
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -62,14 +60,14 @@ export var BoxEditingRights = function BoxEditingRights(_ref) {
62
60
  ellipsis: false,
63
61
  onClick: toggleMenuDisplayed
64
62
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
65
- icon: PeopleIcon
63
+ icon: People
66
64
  })), /*#__PURE__*/React.createElement(ListItemText, {
67
65
  primary: textPrimary,
68
66
  secondary: textSecondary
69
67
  }), /*#__PURE__*/React.createElement(ListItemIcon, {
70
68
  className: "u-mr-half"
71
69
  }, /*#__PURE__*/React.createElement(Icon, {
72
- icon: BottomIcon
70
+ icon: Bottom
73
71
  }))))), /*#__PURE__*/React.createElement(ActionsMenu, {
74
72
  ref: buttonRef,
75
73
  open: isMenuDisplayed,
@@ -2,13 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _regeneratorRuntime from "@babel/runtime/regenerator";
5
+ import { Icon, Copy, Password } from '@linagora/twake-icons';
5
6
  import PropTypes from 'prop-types';
6
7
  import React, { useState } from 'react';
7
8
  import Box from 'cozy-ui/transpiled/react/Box';
8
- import Icon from 'cozy-ui/transpiled/react/Icon';
9
9
  import IconButton from 'cozy-ui/transpiled/react/IconButton';
10
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy';
11
- import PasswordIcon from 'cozy-ui/transpiled/react/Icons/Password';
12
10
  import List from 'cozy-ui/transpiled/react/List';
13
11
  import ListItem from 'cozy-ui/transpiled/react/ListItem';
14
12
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
@@ -108,7 +106,7 @@ export var BoxPassword = function BoxPassword(_ref) {
108
106
  return handlePasswordToggle(!toggle);
109
107
  }
110
108
  }, /*#__PURE__*/React.createElement(ListItemIcon, null, /*#__PURE__*/React.createElement(Icon, {
111
- icon: PasswordIcon
109
+ icon: Password
112
110
  })), /*#__PURE__*/React.createElement(ListItemText, {
113
111
  primary: t('BoxPassword.text')
114
112
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
@@ -141,7 +139,7 @@ export var BoxPassword = function BoxPassword(_ref) {
141
139
  endAdornment: /*#__PURE__*/React.createElement(IconButton, {
142
140
  onClick: handleCopy
143
141
  }, /*#__PURE__*/React.createElement(Icon, {
144
- icon: CopyIcon
142
+ icon: Copy
145
143
  }))
146
144
  },
147
145
  inputProps: inputProps
@@ -1,6 +1,7 @@
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, Trash } from '@linagora/twake-icons';
4
5
  import { addDays } from 'date-fns';
5
6
  import PropTypes from 'prop-types';
6
7
  import React, { useState } from 'react';
@@ -8,8 +9,6 @@ import { generateWebLink, useClient } from 'cozy-client';
8
9
  import flag from 'cozy-flags';
9
10
  import Button from 'cozy-ui/transpiled/react/Buttons';
10
11
  import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
11
- import Icon from 'cozy-ui/transpiled/react/Icon';
12
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash';
13
12
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
14
13
  import { useI18n } from 'twake-i18n';
15
14
  import { ShareRestrictionContentModal } from './ShareRestrictionContentModal';
@@ -232,7 +231,7 @@ export var ShareRestrictionModal = function ShareRestrictionModal(_ref) {
232
231
  variant: "secondary",
233
232
  color: "error",
234
233
  startIcon: /*#__PURE__*/React.createElement(Icon, {
235
- icon: TrashIcon
234
+ icon: Trash
236
235
  }),
237
236
  onClick: handleRevokeLink,
238
237
  busy: loading
@@ -1,8 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { Icon, Share } from '@linagora/twake-icons';
2
3
  import classNames from 'classnames';
3
4
  import React from 'react';
4
- import Icon from 'cozy-ui/transpiled/react/Icon';
5
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
6
5
  var styles = {
7
6
  "shared-badge": "badge__shared-badge___2jGsy",
8
7
  "--small": "badge__--small___2VMyY",
@@ -20,7 +19,7 @@ var SharedBadge = function SharedBadge(_ref) {
20
19
  return /*#__PURE__*/React.createElement("div", {
21
20
  className: classNames(styles['shared-badge'], className, _defineProperty({}, styles['--small'], small), _defineProperty({}, styles['--xsmall'], xsmall), styles[byMe ? '--by-me' : '--with-me'])
22
21
  }, /*#__PURE__*/React.createElement(Icon, {
23
- icon: ShareIcon,
22
+ icon: Share,
24
23
  color: "var(--primaryContrastTextColor)",
25
24
  className: styles['shared-badge-icon']
26
25
  }));
@@ -1,5 +1,5 @@
1
+ import { Icon } from '@linagora/twake-icons';
1
2
  import React from 'react';
2
- import Icon from 'cozy-ui/transpiled/react/Icon';
3
3
  import Typography from 'cozy-ui/transpiled/react/Typography';
4
4
 
5
5
  var SharedDriveIcon = function SharedDriveIcon(props) {
@@ -1,9 +1,7 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { CloudPlusOutlined, Sync, ToTheCloud } from '@linagora/twake-icons';
3
4
  import { Q } from 'cozy-client';
4
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined';
5
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync';
6
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud';
7
5
  import { fetchFilesPaths } from './files';
8
6
  import { updateInternalObjectFromRealtime, normalizeDocFromRealtime } from './realtime';
9
7
  import logger from '../logger';
@@ -135,7 +133,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
135
133
 
136
134
  if (link === CREATE_COZY_HREF) {
137
135
  return {
138
- icon: ToTheCloudIcon,
136
+ icon: ToTheCloud,
139
137
  label: t('Share.create-cozy', {
140
138
  smart_count: isShortLabel ? 1 : 2
141
139
  })
@@ -144,7 +142,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
144
142
 
145
143
  if (!isSharingShortcutCreated) {
146
144
  return {
147
- icon: CloudPlusOutlinedIcon,
145
+ icon: CloudPlusOutlined,
148
146
  label: t('Share.banner.add_to_mine', {
149
147
  smart_count: isShortLabel ? 1 : 2
150
148
  })
@@ -152,7 +150,7 @@ export var getIconWithlabel = function getIconWithlabel(_ref4) {
152
150
  }
153
151
 
154
152
  return {
155
- icon: SyncIcon,
153
+ icon: Sync,
156
154
  label: t('Share.banner.sync_to_mine', {
157
155
  smart_count: isShortLabel ? 1 : 2
158
156
  })
package/jest.config.js CHANGED
@@ -26,10 +26,11 @@ module.exports = {
26
26
  '^cozy-client$': '<rootDir>/node_modules/cozy-client/dist/index.js',
27
27
  '^cozy-client/dist/types$':
28
28
  '<rootDir>/node_modules/cozy-client/dist/types.js',
29
- '^twake-i18n$': '<rootDir>/../twake-i18n/dist/index.js'
29
+ '^twake-i18n$': '<rootDir>/../twake-i18n/dist/index.js',
30
+ '^@linagora/twake-icons$': '<rootDir>/jestHelpers/mocks/twake-icons.js'
30
31
  },
31
32
  transformIgnorePatterns: [
32
- '<rootDir>/node_modules/(?!(cozy-ui|cozy-harvest-lib))'
33
+ '<rootDir>/node_modules/(?!(cozy-ui|cozy-harvest-lib|cozy-ui-plus))'
33
34
  ],
34
35
  setupFilesAfterEnv: ['<rootDir>/jestHelpers/setup.js']
35
36
  }
@@ -0,0 +1,23 @@
1
+ const React = require('react')
2
+
3
+ const Icon = ({ icon, ...props }) =>
4
+ React.createElement('span', { 'data-icon': true, ...props })
5
+
6
+ const Sprite = () => null
7
+
8
+ const getFileTypeIcon = () =>
9
+ function FileTypeIcon() {
10
+ return React.createElement('svg', { 'data-filetypeicon': true })
11
+ }
12
+
13
+ const proxyHandler = {
14
+ get: function (target, prop) {
15
+ if (prop in target) return target[prop]
16
+ if (prop === 'default') return target.Icon
17
+ return function IconMock(props) {
18
+ return React.createElement('svg', { 'data-mock-icon': prop, ...props })
19
+ }
20
+ }
21
+ }
22
+
23
+ module.exports = new Proxy({ Icon, Sprite, getFileTypeIcon }, proxyHandler)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "33.6.1",
3
+ "version": "34.0.0",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -40,6 +40,7 @@
40
40
  "devDependencies": {
41
41
  "@babel/cli": "7.16.8",
42
42
  "@babel/core": "7.16.12",
43
+ "@linagora/twake-icons": "^2.6.2",
43
44
  "@storybook/addon-essentials": "7.6.0",
44
45
  "@storybook/addon-interactions": "7.6.0",
45
46
  "@storybook/addon-links": "7.6.0",
@@ -68,6 +69,7 @@
68
69
  "twake-i18n": "^0.4.1"
69
70
  },
70
71
  "peerDependencies": {
72
+ "@linagora/twake-icons": ">=2.6.2",
71
73
  "cozy-client": ">=60.28.0",
72
74
  "cozy-device-helper": ">=4.0.0",
73
75
  "cozy-flags": ">=4.8.1",
@@ -83,5 +85,5 @@
83
85
  "sideEffects": [
84
86
  "*.css"
85
87
  ],
86
- "gitHead": "10aa2298384087fd396bbfce29c1198d80244361"
88
+ "gitHead": "99a6d19a4f3f61c99cc785c87126e3e2f0bfa646"
87
89
  }
@@ -1,8 +1,8 @@
1
+ import { Icon } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React from 'react'
3
4
 
4
5
  import Button from 'cozy-ui/transpiled/react/Buttons'
5
- import Icon from 'cozy-ui/transpiled/react/Icon'
6
6
  import { useI18n } from 'twake-i18n'
7
7
 
8
8
  import { getIconWithlabel, openExternalLink } from './helpers/sharings'
@@ -1,8 +1,7 @@
1
+ import { Icon, CloudPlusOutlined } from '@linagora/twake-icons'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined'
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
7
 
@@ -35,7 +34,7 @@ export const addToCozySharingLink = ({
35
34
  const label = t('Share.banner.add_to_mine', {
36
35
  smart_count: isShortLabel ? 1 : 2
37
36
  })
38
- const icon = CloudPlusOutlinedIcon
37
+ const icon = CloudPlusOutlined
39
38
 
40
39
  return {
41
40
  name: 'addToCozySharingLink',
@@ -1,8 +1,7 @@
1
+ import { Icon, ToTheCloud } from '@linagora/twake-icons'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud'
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
7
 
@@ -32,7 +31,7 @@ export const createCozySharingLink = ({
32
31
  }) => {
33
32
  const { t } = getActionsI18n()
34
33
  const label = t('Share.create-cozy', { smart_count: isShortLabel ? 1 : 2 })
35
- const icon = ToTheCloudIcon
34
+ const icon = ToTheCloud
36
35
 
37
36
  return {
38
37
  name: 'createCozySharingLink',
@@ -1,8 +1,7 @@
1
+ import { Icon, Reply } from '@linagora/twake-icons'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import ReplyIcon from 'cozy-ui/transpiled/react/Icons/Reply'
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
7
 
@@ -31,7 +30,7 @@ export const shareNative = ({
31
30
  const { t } = getActionsI18n()
32
31
 
33
32
  const label = t('Share.send')
34
- const icon = ReplyIcon
33
+ const icon = Reply
35
34
 
36
35
  return {
37
36
  name: 'shareNative',
@@ -1,8 +1,7 @@
1
+ import { Icon, Sync } from '@linagora/twake-icons'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync'
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
7
 
@@ -34,7 +33,7 @@ export const syncToCozySharingLink = ({
34
33
  const label = t('Share.banner.sync_to_mine', {
35
34
  smart_count: isShortLabel ? 1 : 2
36
35
  })
37
- const icon = SyncIcon
36
+ const icon = Sync
38
37
 
39
38
  return {
40
39
  name: 'syncToCozySharingLink',
@@ -1,10 +1,9 @@
1
+ import { Icon, Link } from '@linagora/twake-icons'
1
2
  import cx from 'classnames'
2
3
  import React from 'react'
3
4
 
4
5
  import { useClient } from 'cozy-client'
5
6
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
6
- import Icon from 'cozy-ui/transpiled/react/Icon'
7
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
8
7
 
9
8
  import { ExtraAvatar } from './ExtraAvatar'
10
9
  import { GroupAvatar } from './GroupAvatar'
@@ -75,7 +74,7 @@ const AvatarList = ({
75
74
  {link && (
76
75
  <span data-testid="AvatarList-link">
77
76
  <Avatar color="none" border innerBorder size={size}>
78
- <Icon icon={LinkIcon} />
77
+ <Icon icon={Link} />
79
78
  </Avatar>
80
79
  </span>
81
80
  )}
@@ -1,13 +1,12 @@
1
+ import { Icon, Team } from '@linagora/twake-icons'
1
2
  import React from 'react'
2
3
 
3
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import TeamIcon from 'cozy-ui/transpiled/react/Icons/Team'
6
5
 
7
6
  const GroupAvatar = ({ size, className }) => {
8
7
  return (
9
8
  <Avatar size={size} className={className} border>
10
- <Icon icon={TeamIcon} />
9
+ <Icon icon={Team} />
11
10
  </Avatar>
12
11
  )
13
12
  }
@@ -1,8 +1,7 @@
1
+ import { Icon, Forbidden } from '@linagora/twake-icons'
1
2
  import React from 'react'
2
3
 
3
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import ForbiddenIcon from 'cozy-ui/transpiled/react/Icons/Forbidden'
6
5
  import List from 'cozy-ui/transpiled/react/List'
7
6
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
8
7
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
@@ -23,7 +22,7 @@ const GroupRecipientDetailWithoutAccess = ({ withoutAccess, isOwner }) => {
23
22
  </Typography>
24
23
  <List>
25
24
  {withoutAccess.map(recipient => {
26
- const icon = recipient.status === 'revoked' ? ForbiddenIcon : null
25
+ const icon = recipient.status === 'revoked' ? Forbidden : null
27
26
  const defaultDisplayName = t(DEFAULT_DISPLAY_NAME)
28
27
  const name = getDisplayName(recipient, defaultDisplayName)
29
28
 
@@ -1,12 +1,11 @@
1
+ import { Icon, CrossCircleOutline } from '@linagora/twake-icons'
1
2
  import React, { useState, useRef } from 'react'
2
3
 
3
4
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
4
5
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions'
5
6
  import ActionsMenuMobileHeader from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuMobileHeader'
6
7
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
7
- import Icon from 'cozy-ui/transpiled/react/Icon'
8
8
  import IconButton from 'cozy-ui/transpiled/react/IconButton'
9
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline'
10
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
11
10
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
12
11
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
@@ -92,7 +91,7 @@ const GroupRecipientPermissions = ({
92
91
  className="u-ml-half"
93
92
  aria-label={t('Share.members.revoke')}
94
93
  >
95
- <Icon icon={CrossCircleOutlineIcon} />
94
+ <Icon icon={CrossCircleOutline} />
96
95
  </IconButton>
97
96
  </>
98
97
  )}
@@ -1,12 +1,10 @@
1
+ import { Icon, Gear, Link } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React, { useState } from 'react'
3
4
 
4
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
5
6
  import Fade from 'cozy-ui/transpiled/react/Fade'
6
- import Icon from 'cozy-ui/transpiled/react/Icon'
7
7
  import IconButton from 'cozy-ui/transpiled/react/IconButton'
8
- import Gear from 'cozy-ui/transpiled/react/Icons/Gear'
9
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
10
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
11
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
12
10
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
@@ -100,7 +98,7 @@ const LinkRecipient = props => {
100
98
  <ListItem gutters={isMobile ? 'default' : 'double'} size="small">
101
99
  <ListItemIcon>
102
100
  <Avatar size="m" color="none" border innerBorder>
103
- <Icon icon={LinkIcon} />
101
+ <Icon icon={Link} />
104
102
  </Avatar>
105
103
  </ListItemIcon>
106
104
  {isReadOnly ? (
@@ -1,9 +1,8 @@
1
+ import { Icon, Link } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React from 'react'
3
4
 
4
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
5
- import Icon from 'cozy-ui/transpiled/react/Icon'
6
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
7
6
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
8
7
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
9
8
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
@@ -24,7 +23,7 @@ const LinkRecipientLite = ({ permissions, link }) => {
24
23
  <ListItem size="small" ellipsis>
25
24
  <ListItemIcon>
26
25
  <Avatar size="m" color="none" border innerBorder>
27
- <Icon icon={LinkIcon} />
26
+ <Icon icon={Link} />
28
27
  </Avatar>
29
28
  </ListItemIcon>
30
29
  <ListItemText
@@ -1,3 +1,4 @@
1
+ import { Icon, CrossCircleOutline } from '@linagora/twake-icons'
1
2
  import React, { useState, useRef, useCallback } from 'react'
2
3
 
3
4
  import { useClient } from 'cozy-client'
@@ -5,9 +6,7 @@ import minilog from 'cozy-minilog'
5
6
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
6
7
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions'
7
8
  import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
8
- import Icon from 'cozy-ui/transpiled/react/Icon'
9
9
  import IconButton from 'cozy-ui/transpiled/react/IconButton'
10
- import CrossCircleOutlineIcon from 'cozy-ui/transpiled/react/Icons/CrossCircleOutline'
11
10
  import Spinner from 'cozy-ui/transpiled/react/Spinner'
12
11
  import Typography from 'cozy-ui/transpiled/react/Typography'
13
12
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
@@ -141,7 +140,7 @@ const MemberRecipientPermissions = ({
141
140
  className="u-ml-half"
142
141
  aria-label={t('Share.members.revoke')}
143
142
  >
144
- <Icon icon={CrossCircleOutlineIcon} />
143
+ <Icon icon={CrossCircleOutline} />
145
144
  </IconButton>
146
145
  </>
147
146
  )}
@@ -1,8 +1,7 @@
1
+ import { Icon, Trash } from '@linagora/twake-icons'
1
2
  import React, { forwardRef } from 'react'
2
3
 
3
4
  import ActionsMenuItem from 'cozy-ui/transpiled/react/ActionsMenu/ActionsMenuItem'
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash'
6
5
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
7
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
8
7
  import Typography from 'cozy-ui/transpiled/react/Typography'
@@ -13,13 +12,13 @@ const revokeLink = ({ t, handleRevocation }) => {
13
12
  return {
14
13
  name: 'revokeLink',
15
14
  label: title,
16
- icon: TrashIcon,
15
+ icon: Trash,
17
16
  action: handleRevocation,
18
17
  Component: forwardRef(function RevokeLinkItem(props, ref) {
19
18
  return (
20
19
  <ActionsMenuItem {...props} ref={ref}>
21
20
  <ListItemIcon>
22
- <Icon icon={TrashIcon} color="var(--errorColor)" />
21
+ <Icon icon={Trash} color="var(--errorColor)" />
23
22
  </ListItemIcon>
24
23
  <ListItemText
25
24
  primary={<Typography color="error">{title}</Typography>}
@@ -1,9 +1,8 @@
1
+ import { Icon, Share } from '@linagora/twake-icons'
1
2
  import classNames from 'classnames'
2
3
  import React from 'react'
3
4
 
4
5
  import Button from 'cozy-ui/transpiled/react/Buttons'
5
- import Icon from 'cozy-ui/transpiled/react/Icon'
6
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
7
6
 
8
7
  import styles from '../styles/button.styl'
9
8
 
@@ -13,7 +12,7 @@ export const ShareButton = ({ label, onClick, className, ...props }) => (
13
12
  variant="secondary"
14
13
  className={className}
15
14
  onClick={() => onClick()}
16
- startIcon={<Icon icon={ShareIcon} />}
15
+ startIcon={<Icon icon={Share} />}
17
16
  label={label}
18
17
  {...props}
19
18
  />
@@ -24,7 +23,7 @@ export const SharedByMeButton = ({ label, onClick, className, ...props }) => (
24
23
  data-test-id="share-by-me-button"
25
24
  className={className}
26
25
  onClick={() => onClick()}
27
- icon={<Icon icon={ShareIcon} />}
26
+ icon={<Icon icon={Share} />}
28
27
  label={label}
29
28
  {...props}
30
29
  />
@@ -34,7 +33,7 @@ export const SharedWithMeButton = ({ label, onClick, className, ...props }) => (
34
33
  <Button
35
34
  className={classNames(styles['coz-btn-sharedWithMe'], className)}
36
35
  onClick={() => onClick()}
37
- startIcon={<Icon icon={ShareIcon} />}
36
+ startIcon={<Icon icon={Share} />}
38
37
  label={label}
39
38
  {...props}
40
39
  />
@@ -1,11 +1,9 @@
1
+ import { Icon, Copy, Link } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React, { useReducer, useState } from 'react'
3
4
 
4
5
  import { useClient } from 'cozy-client'
5
6
  import Button from 'cozy-ui/transpiled/react/Buttons'
6
- import Icon from 'cozy-ui/transpiled/react/Icon'
7
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
8
- import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
9
7
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
10
8
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
11
9
  import { useI18n } from 'twake-i18n'
@@ -144,12 +142,12 @@ const ShareByLink = ({
144
142
  label={t(`${documentType}.share.shareByLink.send`)}
145
143
  variant="secondary"
146
144
  size="medium"
147
- startIcon={<Icon icon={LinkIcon} />}
145
+ startIcon={<Icon icon={Link} />}
148
146
  onClick={shareLink}
149
147
  busy={isGenerating}
150
148
  />
151
149
  <Button
152
- label={<Icon icon={CopyIcon} />}
150
+ label={<Icon icon={Copy} />}
153
151
  variant="secondary"
154
152
  size="medium"
155
153
  onClick={generateLinkAndCopyLinkToClipboard}
@@ -162,7 +160,7 @@ const ShareByLink = ({
162
160
  label={t(`${documentType}.share.shareByLink.copy`)}
163
161
  variant="secondary"
164
162
  size="medium"
165
- startIcon={<Icon icon={LinkIcon} />}
163
+ startIcon={<Icon icon={Link} />}
166
164
  onClick={generateLinkAndCopyLinkToClipboard}
167
165
  busy={isGenerating}
168
166
  />
@@ -172,7 +170,7 @@ const ShareByLink = ({
172
170
  label={t(`${documentType}.share.shareByLink.create`)}
173
171
  variant="secondary"
174
172
  size="medium"
175
- startIcon={<Icon icon={LinkIcon} />}
173
+ startIcon={<Icon icon={Link} />}
176
174
  onClick={generateLinkSilently}
177
175
  busy={isGenerating}
178
176
  />
@@ -1,11 +1,10 @@
1
+ import { Icon, Calendar } from '@linagora/twake-icons'
1
2
  import { format } from 'date-fns'
2
3
  import PropTypes from 'prop-types'
3
4
  import React from 'react'
4
5
 
5
6
  import Box from 'cozy-ui/transpiled/react/Box'
6
7
  import DatePicker from 'cozy-ui/transpiled/react/DatePicker'
7
- import Icon from 'cozy-ui/transpiled/react/Icon'
8
- import CalendarIcon from 'cozy-ui/transpiled/react/Icons/Calendar'
9
8
  import List from 'cozy-ui/transpiled/react/List'
10
9
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
11
10
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
@@ -33,7 +32,7 @@ export const BoxDate = ({ onChange, date, toggle, onToggle }) => {
33
32
  onClick={() => handleDateToggle(!toggle)}
34
33
  >
35
34
  <ListItemIcon>
36
- <Icon icon={CalendarIcon} />
35
+ <Icon icon={Calendar} />
37
36
  </ListItemIcon>
38
37
  <ListItemText primary={t('BoxDate.text')} />
39
38
  <ListItemSecondaryAction>
@@ -1,3 +1,4 @@
1
+ import { Icon, Bottom, People } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React, { useReducer, useRef } from 'react'
3
4
 
@@ -7,9 +8,6 @@ import flag from 'cozy-flags'
7
8
  import ActionsMenu from 'cozy-ui/transpiled/react/ActionsMenu'
8
9
  import { makeActions } from 'cozy-ui/transpiled/react/ActionsMenu/Actions'
9
10
  import Box from 'cozy-ui/transpiled/react/Box'
10
- import Icon from 'cozy-ui/transpiled/react/Icon'
11
- import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
12
- import PeopleIcon from 'cozy-ui/transpiled/react/Icons/People'
13
11
  import List from 'cozy-ui/transpiled/react/List'
14
12
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
15
13
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
@@ -67,11 +65,11 @@ export const BoxEditingRights = ({ file, editingRights, setEditingRights }) => {
67
65
  onClick={toggleMenuDisplayed}
68
66
  >
69
67
  <ListItemIcon>
70
- <Icon icon={PeopleIcon} />
68
+ <Icon icon={People} />
71
69
  </ListItemIcon>
72
70
  <ListItemText primary={textPrimary} secondary={textSecondary} />
73
71
  <ListItemIcon className="u-mr-half">
74
- <Icon icon={BottomIcon} />
72
+ <Icon icon={Bottom} />
75
73
  </ListItemIcon>
76
74
  </ListItem>
77
75
  </List>
@@ -1,11 +1,9 @@
1
+ import { Icon, Copy, Password } from '@linagora/twake-icons'
1
2
  import PropTypes from 'prop-types'
2
3
  import React, { useState } from 'react'
3
4
 
4
5
  import Box from 'cozy-ui/transpiled/react/Box'
5
- import Icon from 'cozy-ui/transpiled/react/Icon'
6
6
  import IconButton from 'cozy-ui/transpiled/react/IconButton'
7
- import CopyIcon from 'cozy-ui/transpiled/react/Icons/Copy'
8
- import PasswordIcon from 'cozy-ui/transpiled/react/Icons/Password'
9
7
  import List from 'cozy-ui/transpiled/react/List'
10
8
  import ListItem from 'cozy-ui/transpiled/react/ListItem'
11
9
  import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
@@ -69,7 +67,7 @@ export const BoxPassword = ({
69
67
  onClick={() => handlePasswordToggle(!toggle)}
70
68
  >
71
69
  <ListItemIcon>
72
- <Icon icon={PasswordIcon} />
70
+ <Icon icon={Password} />
73
71
  </ListItemIcon>
74
72
  <ListItemText primary={t('BoxPassword.text')} />
75
73
  <ListItemSecondaryAction>
@@ -106,7 +104,7 @@ export const BoxPassword = ({
106
104
  InputProps={{
107
105
  endAdornment: (
108
106
  <IconButton onClick={handleCopy}>
109
- <Icon icon={CopyIcon} />
107
+ <Icon icon={Copy} />
110
108
  </IconButton>
111
109
  )
112
110
  }}
@@ -1,3 +1,4 @@
1
+ import { Icon, Trash } from '@linagora/twake-icons'
1
2
  import { addDays } from 'date-fns'
2
3
  import PropTypes from 'prop-types'
3
4
  import React, { useState } from 'react'
@@ -6,8 +7,6 @@ import { generateWebLink, useClient } from 'cozy-client'
6
7
  import flag from 'cozy-flags'
7
8
  import Button from 'cozy-ui/transpiled/react/Buttons'
8
9
  import { ConfirmDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
9
- import Icon from 'cozy-ui/transpiled/react/Icon'
10
- import TrashIcon from 'cozy-ui/transpiled/react/Icons/Trash'
11
10
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
12
11
  import { useI18n } from 'twake-i18n'
13
12
 
@@ -172,7 +171,7 @@ export const ShareRestrictionModal = ({ file, onClose }) => {
172
171
  label={t('Share.permissionLink.deactivate')}
173
172
  variant="secondary"
174
173
  color="error"
175
- startIcon={<Icon icon={TrashIcon} />}
174
+ startIcon={<Icon icon={Trash} />}
176
175
  onClick={handleRevokeLink}
177
176
  busy={loading}
178
177
  />
@@ -1,9 +1,7 @@
1
+ import { Icon, Share } from '@linagora/twake-icons'
1
2
  import classNames from 'classnames'
2
3
  import React from 'react'
3
4
 
4
- import Icon from 'cozy-ui/transpiled/react/Icon'
5
- import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
6
-
7
5
  import styles from '../styles/badge.styl'
8
6
 
9
7
  const SharedBadge = ({ byMe, className, small, xsmall }) => (
@@ -17,7 +15,7 @@ const SharedBadge = ({ byMe, className, small, xsmall }) => (
17
15
  )}
18
16
  >
19
17
  <Icon
20
- icon={ShareIcon}
18
+ icon={Share}
21
19
  color="var(--primaryContrastTextColor)"
22
20
  className={styles['shared-badge-icon']}
23
21
  />
@@ -1,6 +1,6 @@
1
+ import { Icon } from '@linagora/twake-icons'
1
2
  import React from 'react'
2
3
 
3
- import Icon from 'cozy-ui/transpiled/react/Icon'
4
4
  import Typography from 'cozy-ui/transpiled/react/Typography'
5
5
 
6
6
  import SharedDriveIcon from '../../assets/icons/shared-drive.svg'
@@ -1,7 +1,6 @@
1
+ import { CloudPlusOutlined, Sync, ToTheCloud } from '@linagora/twake-icons'
2
+
1
3
  import { Q } from 'cozy-client'
2
- import CloudPlusOutlinedIcon from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined'
3
- import SyncIcon from 'cozy-ui/transpiled/react/Icons/Sync'
4
- import ToTheCloudIcon from 'cozy-ui/transpiled/react/Icons/ToTheCloud'
5
4
 
6
5
  import { fetchFilesPaths } from './files'
7
6
  import {
@@ -78,20 +77,20 @@ export const getIconWithlabel = ({
78
77
  }) => {
79
78
  if (link === CREATE_COZY_HREF) {
80
79
  return {
81
- icon: ToTheCloudIcon,
80
+ icon: ToTheCloud,
82
81
  label: t('Share.create-cozy', { smart_count: isShortLabel ? 1 : 2 })
83
82
  }
84
83
  }
85
84
  if (!isSharingShortcutCreated) {
86
85
  return {
87
- icon: CloudPlusOutlinedIcon,
86
+ icon: CloudPlusOutlined,
88
87
  label: t('Share.banner.add_to_mine', {
89
88
  smart_count: isShortLabel ? 1 : 2
90
89
  })
91
90
  }
92
91
  }
93
92
  return {
94
- icon: SyncIcon,
93
+ icon: Sync,
95
94
  label: t('Share.banner.sync_to_mine', { smart_count: isShortLabel ? 1 : 2 })
96
95
  }
97
96
  }