cozy-sharing 25.3.1 → 25.4.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 CHANGED
@@ -3,6 +3,12 @@
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.4.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.3.1...cozy-sharing@25.4.0) (2025-05-14)
7
+
8
+ ### Features
9
+
10
+ - Replace `isTwakeTheme` by truthy condition ([3a54804](https://github.com/cozy/cozy-libs/commit/3a54804decee80ed2a39b8d9910bd879df1e9473))
11
+
6
12
  ## [25.3.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@25.3.0...cozy-sharing@25.3.1) (2025-05-07)
7
13
 
8
14
  ### Bug Fixes
@@ -5,7 +5,6 @@ import { useClient } from 'cozy-client';
5
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
6
6
  import Icon from 'cozy-ui/transpiled/react/Icon';
7
7
  import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link';
8
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
9
8
  import { ExtraAvatar } from './ExtraAvatar';
10
9
  import { GroupAvatar } from './GroupAvatar';
11
10
  import { MemberAvatar } from './MemberAvatar';
@@ -75,7 +74,7 @@ var AvatarList = function AvatarList(_ref2) {
75
74
  }, /*#__PURE__*/React.createElement(Avatar, {
76
75
  color: "none",
77
76
  border: true,
78
- innerBorder: isTwakeTheme(),
77
+ innerBorder: true,
79
78
  size: size
80
79
  }, /*#__PURE__*/React.createElement(Icon, {
81
80
  icon: LinkIcon
@@ -2,7 +2,6 @@ import uniqueId from 'lodash/uniqueId';
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
4
  import Avatar from 'cozy-ui/transpiled/react/Avatar';
5
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
6
5
  import { SharingTooltip, TooltipRecipientList } from '../Tooltip';
7
6
 
8
7
  var ExtraAvatar = function ExtraAvatar(_ref) {
@@ -20,7 +19,7 @@ var ExtraAvatar = function ExtraAvatar(_ref) {
20
19
  size: size,
21
20
  color: "none",
22
21
  border: true,
23
- innerBorder: isTwakeTheme()
22
+ innerBorder: true
24
23
  }, "+".concat(Math.min(extraRecipients.length, 99))), /*#__PURE__*/React.createElement(SharingTooltip, {
25
24
  id: sharingTooltipId
26
25
  }, /*#__PURE__*/React.createElement(TooltipRecipientList, {
@@ -9,7 +9,6 @@ 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';
13
12
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints';
14
13
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
15
14
  import LinkRecipientPermissions from './LinkRecipientPermissions';
@@ -59,7 +58,7 @@ var LinkRecipient = function LinkRecipient(props) {
59
58
  size: "m",
60
59
  color: "none",
61
60
  border: true,
62
- innerBorder: isTwakeTheme()
61
+ innerBorder: true
63
62
  }, /*#__PURE__*/React.createElement(Icon, {
64
63
  icon: LinkIcon
65
64
  }))), /*#__PURE__*/React.createElement(ListItemText, {
@@ -7,7 +7,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';
11
10
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
12
11
  import { checkIsReadOnlyPermissions } from '../../helpers/permissions';
13
12
  import withLocales from '../../hoc/withLocales';
@@ -28,7 +27,7 @@ var LinkRecipientLite = function LinkRecipientLite(_ref) {
28
27
  size: "m",
29
28
  color: "none",
30
29
  border: true,
31
- innerBorder: isTwakeTheme()
30
+ innerBorder: true
32
31
  }, /*#__PURE__*/React.createElement(Icon, {
33
32
  icon: LinkIcon
34
33
  }))), /*#__PURE__*/React.createElement(ListItemText, {
@@ -11,7 +11,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon';
11
11
  import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction';
12
12
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
13
13
  import Switch from 'cozy-ui/transpiled/react/Switch';
14
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
15
14
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
16
15
  export var BoxDate = function BoxDate(_ref) {
17
16
  var onChange = _ref.onChange,
@@ -49,7 +48,7 @@ export var BoxDate = function BoxDate(_ref) {
49
48
  })), /*#__PURE__*/React.createElement(ListItemText, {
50
49
  primary: t('BoxDate.text')
51
50
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
52
- edge: isTwakeTheme() ? 'start' : 'end',
51
+ edge: "start",
53
52
  color: "primary",
54
53
  checked: toggle,
55
54
  onChange: handleDateToggle
@@ -16,7 +16,6 @@ import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryA
16
16
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText';
17
17
  import Switch from 'cozy-ui/transpiled/react/Switch';
18
18
  import TextField from 'cozy-ui/transpiled/react/TextField';
19
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme';
20
19
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert';
21
20
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
22
21
  import { copyToClipboard } from './helpers';
@@ -113,7 +112,7 @@ export var BoxPassword = function BoxPassword(_ref) {
113
112
  })), /*#__PURE__*/React.createElement(ListItemText, {
114
113
  primary: t('BoxPassword.text')
115
114
  }), /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(Switch, {
116
- edge: isTwakeTheme() ? 'start' : 'end',
115
+ edge: "start",
117
116
  color: "primary",
118
117
  checked: toggle,
119
118
  onChange: handlePasswordToggle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-sharing",
3
- "version": "25.3.1",
3
+ "version": "25.4.0",
4
4
  "description": "Provides sharing login for React applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -79,5 +79,5 @@
79
79
  "sideEffects": [
80
80
  "*.css"
81
81
  ],
82
- "gitHead": "61ca8961df0f9a50cf58348d90fbfdd67f36b22b"
82
+ "gitHead": "2d27645288f99baf8de1a8e6fce88ef8dc9be01b"
83
83
  }
@@ -5,7 +5,6 @@ import { useClient } from 'cozy-client'
5
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
6
6
  import Icon from 'cozy-ui/transpiled/react/Icon'
7
7
  import LinkIcon from 'cozy-ui/transpiled/react/Icons/Link'
8
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
9
8
 
10
9
  import { ExtraAvatar } from './ExtraAvatar'
11
10
  import { GroupAvatar } from './GroupAvatar'
@@ -75,7 +74,7 @@ const AvatarList = ({
75
74
  >
76
75
  {link && (
77
76
  <span data-testid="AvatarList-link">
78
- <Avatar color="none" border innerBorder={isTwakeTheme()} size={size}>
77
+ <Avatar color="none" border innerBorder size={size}>
79
78
  <Icon icon={LinkIcon} />
80
79
  </Avatar>
81
80
  </span>
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types'
3
3
  import React from 'react'
4
4
 
5
5
  import Avatar from 'cozy-ui/transpiled/react/Avatar'
6
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
7
6
 
8
7
  import { SharingTooltip, TooltipRecipientList } from '../Tooltip'
9
8
 
@@ -12,13 +11,7 @@ const ExtraAvatar = ({ className, size, extraRecipients = [] }) => {
12
11
 
13
12
  return (
14
13
  <span data-tip data-for={sharingTooltipId} className="u-db">
15
- <Avatar
16
- className={className}
17
- size={size}
18
- color="none"
19
- border
20
- innerBorder={isTwakeTheme()}
21
- >
14
+ <Avatar className={className} size={size} color="none" border innerBorder>
22
15
  {`+${Math.min(extraRecipients.length, 99)}`}
23
16
  </Avatar>
24
17
  <SharingTooltip id={sharingTooltipId}>
@@ -9,7 +9,6 @@ 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'
13
12
  import useBreakpoints from 'cozy-ui/transpiled/react/providers/Breakpoints'
14
13
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
15
14
 
@@ -60,7 +59,7 @@ const LinkRecipient = props => {
60
59
  <Fade in timeout={fadeIn ? FADE_IN_DURATION : 0}>
61
60
  <ListItem gutters={isMobile ? 'default' : 'double'} size="small">
62
61
  <ListItemIcon>
63
- <Avatar size="m" color="none" border innerBorder={isTwakeTheme()}>
62
+ <Avatar size="m" color="none" border innerBorder>
64
63
  <Icon icon={LinkIcon} />
65
64
  </Avatar>
66
65
  </ListItemIcon>
@@ -8,7 +8,6 @@ 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'
12
11
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
13
12
 
14
13
  import { checkIsReadOnlyPermissions } from '../../helpers/permissions'
@@ -24,7 +23,7 @@ const LinkRecipientLite = ({ permissions, link }) => {
24
23
  return (
25
24
  <ListItem size="small" ellipsis>
26
25
  <ListItemIcon>
27
- <Avatar size="m" color="none" border innerBorder={isTwakeTheme()}>
26
+ <Avatar size="m" color="none" border innerBorder>
28
27
  <Icon icon={LinkIcon} />
29
28
  </Avatar>
30
29
  </ListItemIcon>
@@ -12,7 +12,6 @@ import ListItemIcon from 'cozy-ui/transpiled/react/ListItemIcon'
12
12
  import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryAction'
13
13
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
14
14
  import Switch from 'cozy-ui/transpiled/react/Switch'
15
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
16
15
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
17
16
 
18
17
  export const BoxDate = ({ onChange, date, toggle, onToggle }) => {
@@ -39,7 +38,7 @@ export const BoxDate = ({ onChange, date, toggle, onToggle }) => {
39
38
  <ListItemText primary={t('BoxDate.text')} />
40
39
  <ListItemSecondaryAction>
41
40
  <Switch
42
- edge={isTwakeTheme() ? 'start' : 'end'}
41
+ edge="start"
43
42
  color="primary"
44
43
  checked={toggle}
45
44
  onChange={handleDateToggle}
@@ -13,7 +13,6 @@ import ListItemSecondaryAction from 'cozy-ui/transpiled/react/ListItemSecondaryA
13
13
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
14
14
  import Switch from 'cozy-ui/transpiled/react/Switch'
15
15
  import TextField from 'cozy-ui/transpiled/react/TextField'
16
- import { isTwakeTheme } from 'cozy-ui/transpiled/react/helpers/isTwakeTheme'
17
16
  import { useAlert } from 'cozy-ui/transpiled/react/providers/Alert'
18
17
  import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
19
18
 
@@ -75,7 +74,7 @@ export const BoxPassword = ({
75
74
  <ListItemText primary={t('BoxPassword.text')} />
76
75
  <ListItemSecondaryAction>
77
76
  <Switch
78
- edge={isTwakeTheme() ? 'start' : 'end'}
77
+ edge="start"
79
78
  color="primary"
80
79
  checked={toggle}
81
80
  onChange={handlePasswordToggle}