cozy-sharing 13.3.1 → 14.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 +19 -0
- package/dist/components/Recipient/RecipientConfirm.js +2 -2
- package/dist/components/ShareAutosuggest.js +1 -2
- package/dist/components/ShareButton.js +4 -4
- package/dist/components/ShareDialogTwoStepsConfirmationContainer.js +4 -5
- package/dist/components/SharedBadge.js +1 -2
- package/dist/components/SharedStatus.js +1 -2
- package/dist/components/Sharesubmit.js +2 -1
- package/dist/components/Sharetypeselect.js +6 -6
- package/dist/components/SharingBanner/components/PublicBanner.js +7 -6
- package/dist/styles/actionmenu.styl +1 -1
- package/dist/styles/autosuggest.styl +2 -2
- package/dist/styles/badge.styl +6 -8
- package/dist/styles/button.styl +10 -11
- package/dist/styles/recipient.styl +3 -3
- package/dist/styles/share.styl +5 -5
- package/dist/stylesheet.css +30 -30
- package/package.json +4 -4
- package/src/components/Recipient/RecipientConfirm.jsx +2 -2
- package/src/components/ShareAutosuggest.jsx +1 -2
- package/src/components/ShareButton.jsx +4 -4
- package/src/components/ShareDialogTwoStepsConfirmationContainer.jsx +5 -9
- package/src/components/SharedBadge.jsx +1 -2
- package/src/components/SharedStatus.jsx +1 -2
- package/src/components/Sharesubmit.jsx +2 -1
- package/src/components/Sharetypeselect.jsx +11 -6
- package/src/components/SharingBanner/components/PublicBanner.jsx +7 -6
- package/src/components/__snapshots__/SharedStatus.spec.js.snap +2 -2
- package/src/styles/actionmenu.styl +1 -1
- package/src/styles/autosuggest.styl +2 -2
- package/src/styles/badge.styl +6 -8
- package/src/styles/button.styl +10 -11
- package/src/styles/recipient.styl +3 -3
- package/src/styles/share.styl +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
# [14.0.0](https://github.com/cozy/cozy-libs/compare/cozy-sharing@13.3.1...cozy-sharing@14.0.0) (2024-05-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Replace deprecated buttons by actual ones ([6be1c73](https://github.com/cozy/cozy-libs/commit/6be1c734cc4fcb13ffc2dd1137edec064c0c842e))
|
|
12
|
+
* Replace direct import of palette by colors or variables colors ([4dc9eb7](https://github.com/cozy/cozy-libs/commit/4dc9eb7d56b875acb156eeef037b252237c2cfa5))
|
|
13
|
+
* **sharing:** Replace var colors by semantic var colors ([79c2e70](https://github.com/cozy/cozy-libs/commit/79c2e70430f64973e38d40ea215a23be2ca3a2a0))
|
|
14
|
+
* **sharing:** Upgrade cozy-ui 105.3.1 to 106.8.0 ([b731089](https://github.com/cozy/cozy-libs/commit/b731089dc71325bb80d9cb2687583516596f2b8a))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* **sharing:** you must have `cozy-ui >= 106.8.0`
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [13.3.1](https://github.com/cozy/cozy-libs/compare/cozy-sharing@13.3.0...cozy-sharing@13.3.1) (2024-05-27)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import Button from 'cozy-ui/transpiled/react/
|
|
3
|
+
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
4
4
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
5
|
var modalStyles = {
|
|
6
6
|
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
@@ -45,7 +45,7 @@ var RecipientConfirm = function RecipientConfirm(_ref) {
|
|
|
45
45
|
position: 'initial'
|
|
46
46
|
} // fix z-index bug on iOS when under a BottomDrawer due to relative position
|
|
47
47
|
,
|
|
48
|
-
|
|
48
|
+
variant: "text",
|
|
49
49
|
className: modalStyles['aligned-dropdown-button'],
|
|
50
50
|
onClick: verify,
|
|
51
51
|
label: t("Share.twoStepsConfirmation.verify")
|
|
@@ -6,7 +6,6 @@ import Autosuggest from 'react-autosuggest';
|
|
|
6
6
|
import Avatar from 'cozy-ui/transpiled/react/Avatar';
|
|
7
7
|
import Chip from 'cozy-ui/transpiled/react/Chips';
|
|
8
8
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner';
|
|
9
|
-
import palette from 'cozy-ui/transpiled/react/palette';
|
|
10
9
|
import { GroupAvatar } from './Avatar/GroupAvatar';
|
|
11
10
|
import ContactSuggestion from './ContactSuggestion';
|
|
12
11
|
import { extractEmails, validateEmail } from '../helpers/email';
|
|
@@ -176,7 +175,7 @@ var ShareAutocomplete = function ShareAutocomplete(_ref) {
|
|
|
176
175
|
onKeyPress: onKeyPress,
|
|
177
176
|
onKeyUp: onKeyUp
|
|
178
177
|
})), loading && isLoadingDisplayed ? /*#__PURE__*/React.createElement(Spinner, {
|
|
179
|
-
color:
|
|
178
|
+
color: "var(--primaryColor)"
|
|
180
179
|
}) : null);
|
|
181
180
|
};
|
|
182
181
|
|
|
@@ -5,9 +5,9 @@ var _excluded = ["label", "onClick", "className"],
|
|
|
5
5
|
_excluded3 = ["label", "onClick", "className"];
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
8
9
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
9
10
|
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
|
|
10
|
-
import { Button } from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
11
11
|
var styles = {
|
|
12
12
|
"coz-btn-shared": "button__coz-btn-shared___9MFbY",
|
|
13
13
|
"coz-btn-sharedWithMe": "button__coz-btn-sharedWithMe___25PBh"
|
|
@@ -20,12 +20,12 @@ export var ShareButton = function ShareButton(_ref) {
|
|
|
20
20
|
|
|
21
21
|
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
22
22
|
"data-test-id": "share-button",
|
|
23
|
-
|
|
23
|
+
variant: "secondary",
|
|
24
24
|
className: className,
|
|
25
25
|
onClick: function onClick() {
|
|
26
26
|
return _onClick();
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
startIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
29
29
|
icon: ShareIcon
|
|
30
30
|
}),
|
|
31
31
|
label: label
|
|
@@ -60,7 +60,7 @@ export var SharedWithMeButton = function SharedWithMeButton(_ref3) {
|
|
|
60
60
|
onClick: function onClick() {
|
|
61
61
|
return _onClick3();
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
startIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
64
64
|
icon: ShareIcon
|
|
65
65
|
}),
|
|
66
66
|
label: label
|
|
@@ -2,9 +2,9 @@ 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
4
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
|
+
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
5
6
|
import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs';
|
|
6
7
|
import Spinner from 'cozy-ui/transpiled/react/Spinner';
|
|
7
|
-
import Button from 'cozy-ui/transpiled/react/deprecated/Button';
|
|
8
8
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
9
9
|
import { useSafeState } from '../helpers/hooks';
|
|
10
10
|
/**
|
|
@@ -43,11 +43,11 @@ var ConfirmRecipientActions = function ConfirmRecipientActions(_ref) {
|
|
|
43
43
|
t = _useI18n2.t;
|
|
44
44
|
|
|
45
45
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
46
|
-
|
|
46
|
+
variant: "secondary",
|
|
47
|
+
color: "error",
|
|
47
48
|
label: t("Share.twoStepsConfirmation.reject"),
|
|
48
49
|
onClick: reject
|
|
49
50
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
50
|
-
theme: "primary",
|
|
51
51
|
label: t("Share.twoStepsConfirmation.confirm"),
|
|
52
52
|
onClick: confirm
|
|
53
53
|
}));
|
|
@@ -83,11 +83,10 @@ var RejectRecipientActions = function RejectRecipientActions(_ref3) {
|
|
|
83
83
|
t = _useI18n4.t;
|
|
84
84
|
|
|
85
85
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
86
|
-
|
|
86
|
+
variant: "secondary",
|
|
87
87
|
label: t("Share.twoStepsConfirmation.cancel"),
|
|
88
88
|
onClick: cancel
|
|
89
89
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
90
|
-
theme: "primary",
|
|
91
90
|
label: t("Share.twoStepsConfirmation.reject"),
|
|
92
91
|
onClick: reject
|
|
93
92
|
}));
|
|
@@ -3,7 +3,6 @@ import classNames from 'classnames';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
5
5
|
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share';
|
|
6
|
-
import palette from 'cozy-ui/transpiled/react/palette';
|
|
7
6
|
var styles = {
|
|
8
7
|
"shared-badge": "badge__shared-badge___2jGsy",
|
|
9
8
|
"--small": "badge__--small___2VMyY",
|
|
@@ -22,7 +21,7 @@ var SharedBadge = function SharedBadge(_ref) {
|
|
|
22
21
|
className: classNames(styles['shared-badge'], className, _defineProperty({}, styles['--small'], small), _defineProperty({}, styles['--xsmall'], xsmall), styles[byMe ? '--by-me' : '--with-me'])
|
|
23
22
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
24
23
|
icon: ShareIcon,
|
|
25
|
-
color:
|
|
24
|
+
color: "var(--primaryContrastTextColor)",
|
|
26
25
|
className: styles['shared-badge-icon']
|
|
27
26
|
}));
|
|
28
27
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import cx from 'classnames';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import palette from 'cozy-ui/transpiled/react/palette';
|
|
4
3
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
5
4
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip';
|
|
6
5
|
|
|
@@ -51,7 +50,7 @@ export var SharedStatus = function SharedStatus(_ref) {
|
|
|
51
50
|
})
|
|
52
51
|
})), link && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
53
52
|
style: {
|
|
54
|
-
fill:
|
|
53
|
+
fill: 'var(--iconTextColor)'
|
|
55
54
|
},
|
|
56
55
|
"data-tip": true,
|
|
57
56
|
"data-for": "linkfor".concat(docId)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
4
4
|
|
|
5
5
|
var ShareSubmit = function ShareSubmit(props) {
|
|
6
6
|
return /*#__PURE__*/React.createElement(Button, {
|
|
7
7
|
onClick: function onClick() {
|
|
8
8
|
props.onSubmit();
|
|
9
9
|
},
|
|
10
|
+
size: "large",
|
|
10
11
|
busy: props.loading,
|
|
11
12
|
label: props.label,
|
|
12
13
|
disabled: props.disabled
|
|
@@ -11,7 +11,6 @@ import Icon from 'cozy-ui/transpiled/react/Icon';
|
|
|
11
11
|
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom';
|
|
12
12
|
import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check';
|
|
13
13
|
import SelectBox, { components } from 'cozy-ui/transpiled/react/SelectBox';
|
|
14
|
-
import palette from 'cozy-ui/transpiled/react/palette';
|
|
15
14
|
import logger from '../logger';
|
|
16
15
|
var styles = {
|
|
17
16
|
"share-modal-content": "share__share-modal-content___1iqEq",
|
|
@@ -40,7 +39,7 @@ var styles = {
|
|
|
40
39
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
41
40
|
return /*#__PURE__*/React.createElement(components.DropdownIndicator, props, /*#__PURE__*/React.createElement(Icon, {
|
|
42
41
|
icon: BottomIcon,
|
|
43
|
-
color:
|
|
42
|
+
color: "var(--iconTextColor)"
|
|
44
43
|
}));
|
|
45
44
|
};
|
|
46
45
|
|
|
@@ -49,7 +48,7 @@ var Option = function Option(props) {
|
|
|
49
48
|
className: cx(styles['select-option'])
|
|
50
49
|
}, props.isSelected && /*#__PURE__*/React.createElement(Icon, {
|
|
51
50
|
icon: CheckIcon,
|
|
52
|
-
color:
|
|
51
|
+
color: "var(--primaryColor)"
|
|
53
52
|
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
54
53
|
className: styles['select-option-label']
|
|
55
54
|
}, props.label), /*#__PURE__*/React.createElement("div", {
|
|
@@ -60,16 +59,17 @@ var Option = function Option(props) {
|
|
|
60
59
|
var customStyles = {
|
|
61
60
|
option: function option(base, state) {
|
|
62
61
|
return _objectSpread(_objectSpread({}, base), {}, {
|
|
63
|
-
color: '
|
|
64
|
-
backgroundColor: state.isFocused ?
|
|
62
|
+
color: 'var(--primaryTextColor)',
|
|
63
|
+
backgroundColor: state.isFocused ? 'var(--actionColorHover)' : null,
|
|
65
64
|
padding: 0,
|
|
66
65
|
borderBottom: state.options.findIndex(function (o) {
|
|
67
66
|
return o.value === state.value;
|
|
68
|
-
}) === 0 ?
|
|
67
|
+
}) === 0 ? '1px solid var(--borderMainColor)' : null
|
|
69
68
|
});
|
|
70
69
|
},
|
|
71
70
|
menu: function menu(base) {
|
|
72
71
|
return _objectSpread(_objectSpread({}, base), {}, {
|
|
72
|
+
backgroundColor: 'var(--paperBackgroundColor)',
|
|
73
73
|
width: '204%'
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import snarkdown from 'snarkdown';
|
|
4
4
|
import { useClient } from 'cozy-client';
|
|
5
5
|
import Banner from 'cozy-ui/transpiled/react/Banner';
|
|
6
|
-
import Button
|
|
6
|
+
import Button from 'cozy-ui/transpiled/react/Buttons';
|
|
7
7
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n';
|
|
8
8
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon';
|
|
9
9
|
var styles = {
|
|
@@ -84,13 +84,13 @@ var SharingBannerCozyToCozy = function SharingBannerCozyToCozy(_ref2) {
|
|
|
84
84
|
sharing: sharing
|
|
85
85
|
}),
|
|
86
86
|
buttonOne: /*#__PURE__*/React.createElement(Button, {
|
|
87
|
-
|
|
87
|
+
variant: "text",
|
|
88
88
|
label: buttonOne.label,
|
|
89
89
|
icon: buttonOne.icon,
|
|
90
90
|
onClick: buttonOne.action
|
|
91
91
|
}),
|
|
92
92
|
buttonTwo: /*#__PURE__*/React.createElement(Button, {
|
|
93
|
-
|
|
93
|
+
variant: "text",
|
|
94
94
|
label: t('Share.banner.close'),
|
|
95
95
|
onClick: onClose
|
|
96
96
|
}),
|
|
@@ -125,14 +125,15 @@ var SharingBannerByLink = function SharingBannerByLink(_ref3) {
|
|
|
125
125
|
return /*#__PURE__*/React.createElement(Banner, {
|
|
126
126
|
bgcolor: "var(--defaultBackgroundColor)",
|
|
127
127
|
text: /*#__PURE__*/React.createElement(SharingBannerByLinkText, null),
|
|
128
|
-
buttonOne: /*#__PURE__*/React.createElement(
|
|
129
|
-
|
|
128
|
+
buttonOne: /*#__PURE__*/React.createElement(Button, {
|
|
129
|
+
component: "a",
|
|
130
|
+
variant: "text",
|
|
130
131
|
label: t('Share.create-cozy'),
|
|
131
132
|
icon: CozyHomeLinkIcon,
|
|
132
133
|
href: HOME_LINK_HREF
|
|
133
134
|
}),
|
|
134
135
|
buttonTwo: /*#__PURE__*/React.createElement(Button, {
|
|
135
|
-
|
|
136
|
+
variant: "text",
|
|
136
137
|
label: t('Share.banner.close'),
|
|
137
138
|
onClick: onClose
|
|
138
139
|
}),
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
overflow hidden
|
|
12
12
|
box-shadow 0px 0px 0px 0.5px rgba(29, 33, 42, 0.12), 0px 2px 4px rgba(29, 33, 42, 0.0793047), 0px 4px 16px rgba(29, 33, 42, 0.06)
|
|
13
13
|
border-radius .5rem
|
|
14
|
-
background var(--
|
|
14
|
+
background var(--paperBackgroundColor)
|
|
15
15
|
display none
|
|
16
16
|
|
|
17
17
|
.suggestionsContainerOpen
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
overflow auto
|
|
43
43
|
|
|
44
44
|
&:hover
|
|
45
|
-
border 1px solid var(--
|
|
45
|
+
border 1px solid var(--borderMainColor)
|
|
46
46
|
|
|
47
47
|
&:focus-within
|
|
48
48
|
border 1px solid var(--primaryColor)
|
package/dist/styles/badge.styl
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
palette=json('settings/palette.json', { hash: true })
|
|
2
|
-
|
|
3
1
|
.shared-badge
|
|
4
2
|
display flex
|
|
5
3
|
align-items center
|
|
@@ -8,8 +6,8 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
8
6
|
background-clip padding-box
|
|
9
7
|
|
|
10
8
|
&.--small
|
|
11
|
-
border .125rem solid
|
|
12
|
-
border-color:
|
|
9
|
+
border .125rem solid
|
|
10
|
+
border-color: var(--primaryContrastTextColor)
|
|
13
11
|
width 1.5rem
|
|
14
12
|
height 1.5rem
|
|
15
13
|
|
|
@@ -18,8 +16,8 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
18
16
|
height .75rem
|
|
19
17
|
|
|
20
18
|
&.--xsmall
|
|
21
|
-
border .0625rem solid
|
|
22
|
-
border-color:
|
|
19
|
+
border .0625rem solid
|
|
20
|
+
border-color: var(--primaryContrastTextColor)
|
|
23
21
|
width .75rem
|
|
24
22
|
height .75rem
|
|
25
23
|
|
|
@@ -28,7 +26,7 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
28
26
|
height .375rem
|
|
29
27
|
|
|
30
28
|
&.--by-me
|
|
31
|
-
background-color:
|
|
29
|
+
background-color: var(--emerald)
|
|
32
30
|
|
|
33
31
|
&.--with-me
|
|
34
|
-
background-color:
|
|
32
|
+
background-color: #9169F2
|
package/dist/styles/button.styl
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
palette=json('settings/palette.json', { hash: true })
|
|
2
1
|
.coz-btn-shared
|
|
3
|
-
border-color:
|
|
4
|
-
background-color:
|
|
5
|
-
color:
|
|
2
|
+
border-color: var(--emerald)
|
|
3
|
+
background-color: var(--emerald)
|
|
4
|
+
color: var(--primaryContrastTextColor)
|
|
6
5
|
transition all .2s ease-out
|
|
7
6
|
|
|
8
7
|
&:focus
|
|
9
8
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
10
|
-
border-color:
|
|
11
|
-
background-color:
|
|
9
|
+
border-color: var(--malachite)
|
|
10
|
+
background-color: var(--malachite)
|
|
12
11
|
|
|
13
12
|
.coz-btn-sharedWithMe
|
|
14
|
-
border-color:
|
|
15
|
-
background-color:
|
|
16
|
-
color:
|
|
13
|
+
border-color: #B449E7
|
|
14
|
+
background-color: #B449E7
|
|
15
|
+
color: var(--primaryContrastTextColor)
|
|
17
16
|
transition all .2s ease-out
|
|
18
17
|
|
|
19
18
|
&:focus
|
|
20
19
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
21
|
-
border-color:
|
|
22
|
-
background-color:
|
|
20
|
+
border-color: #922BC2
|
|
21
|
+
background-color: #922BC2
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@require 'settings/breakpoints.styl'
|
|
3
3
|
|
|
4
4
|
:root
|
|
5
|
-
--genericRecipientBackground: var(--
|
|
6
|
-
--genericRecipientColor: var(--
|
|
5
|
+
--genericRecipientBackground: var(--secondaryColor)
|
|
6
|
+
--genericRecipientColor: var(--secondaryContrastTextColor)
|
|
7
7
|
|
|
8
8
|
.recipient
|
|
9
9
|
display flex
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
.recipient-details
|
|
43
43
|
font-size .875rem
|
|
44
|
-
color var(--
|
|
44
|
+
color var(--secondaryTextColor)
|
|
45
45
|
|
|
46
46
|
.avatar
|
|
47
47
|
display flex
|
package/dist/styles/share.styl
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@require 'settings/breakpoints.styl'
|
|
4
4
|
|
|
5
5
|
.share-byemail-onlybylink
|
|
6
|
-
background var(--
|
|
6
|
+
background var(--defaultBackgroundColor)
|
|
7
7
|
padding 1rem 2rem
|
|
8
8
|
margin -1.5rem -2rem 1rem
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
margin 0
|
|
37
37
|
|
|
38
38
|
.coz-form-desc
|
|
39
|
-
color var(--
|
|
39
|
+
color var(--secondaryTextColor)
|
|
40
40
|
|
|
41
41
|
.share-type-control
|
|
42
42
|
display flex
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
.select-option-desc
|
|
65
65
|
line-height 1.5
|
|
66
66
|
font-size .8125rem
|
|
67
|
-
color var(--
|
|
67
|
+
color var(--secondaryTextColor)
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
:global
|
|
76
76
|
// dirty hack for react-select: its API doesn't allow to make change to active styles
|
|
77
77
|
.react-select__option:active
|
|
78
|
-
background-color var(--
|
|
78
|
+
background-color var(--defaultBackgroundColor) !important
|
|
79
79
|
|
|
80
80
|
input[type=text]
|
|
81
81
|
width 100%
|
|
@@ -100,4 +100,4 @@ input[type=text]
|
|
|
100
100
|
margin 0 0 0.5rem 3.5rem
|
|
101
101
|
padding-left 1.5rem
|
|
102
102
|
line-height 1.5
|
|
103
|
-
color var(--
|
|
103
|
+
color var(--secondaryTextColor)
|
package/dist/stylesheet.css
CHANGED
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
@media (pointer: coarse) {
|
|
92
92
|
}
|
|
93
93
|
:root {
|
|
94
|
-
--genericRecipientBackground: var(--
|
|
95
|
-
--genericRecipientColor: var(--
|
|
94
|
+
--genericRecipientBackground: var(--secondaryColor);
|
|
95
|
+
--genericRecipientColor: var(--secondaryContrastTextColor);
|
|
96
96
|
}
|
|
97
97
|
.recipient__recipient___2DmZI {
|
|
98
98
|
display: flex;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
.recipient__recipient-details___2fZfc {
|
|
133
133
|
font-size: 0.875rem;
|
|
134
|
-
color: var(--
|
|
134
|
+
color: var(--secondaryTextColor);
|
|
135
135
|
}
|
|
136
136
|
.recipient__avatar___2LnIV {
|
|
137
137
|
display: flex;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
}
|
|
189
189
|
.share__share-modal-content___1iqEq .share__coz-form___1ICST a,
|
|
190
190
|
.share__share-modal-content___1iqEq .share__coz-form___1ICST a:visited {
|
|
191
|
-
color: var(--
|
|
191
|
+
color: var(--primaryColor);
|
|
192
192
|
text-decoration: none;
|
|
193
193
|
}
|
|
194
194
|
.share__share-modal-content___1iqEq .share__coz-form___1ICST a:hover,
|
|
@@ -208,17 +208,17 @@
|
|
|
208
208
|
.share__share-modal-content___1iqEq .share__coz-form-label___bogBw {
|
|
209
209
|
display: block;
|
|
210
210
|
text-transform: uppercase;
|
|
211
|
-
color: var(--
|
|
211
|
+
color: var(--secondaryTextColor);
|
|
212
212
|
font-size: 0.75rem;
|
|
213
213
|
padding: 0.563rem 0;
|
|
214
214
|
margin-top: 1rem;
|
|
215
215
|
}
|
|
216
216
|
.share__share-modal-content___1iqEq .share__coz-form-label--error___3YPkf {
|
|
217
217
|
display: none;
|
|
218
|
-
color: var(--
|
|
218
|
+
color: var(--errorColor);
|
|
219
219
|
}
|
|
220
220
|
.share__share-modal-content___1iqEq .share__coz-form-errors___2xYRz {
|
|
221
|
-
color: var(--
|
|
221
|
+
color: var(--errorColor);
|
|
222
222
|
}
|
|
223
223
|
.share__share-modal-content___1iqEq .share__coz-form-controls___H8kGc {
|
|
224
224
|
display: flex;
|
|
@@ -260,42 +260,42 @@
|
|
|
260
260
|
padding: 0.875rem 0.75rem 0.75rem 0.875rem;
|
|
261
261
|
box-sizing: border-box;
|
|
262
262
|
border-radius: 0.125rem;
|
|
263
|
-
background: var(--
|
|
264
|
-
border: 0.063rem solid var(--
|
|
265
|
-
color: var(--
|
|
263
|
+
background: var(--paperBackgroundColor);
|
|
264
|
+
border: 0.063rem solid var(--borderMainColor);
|
|
265
|
+
color: var(--primaryTextColor);
|
|
266
266
|
}
|
|
267
267
|
.share__share-modal-content___1iqEq input[type=text]::placeholder,
|
|
268
268
|
.share__share-modal-content___1iqEq input[type=password]::placeholder,
|
|
269
269
|
.share__share-modal-content___1iqEq input[type=email]::placeholder,
|
|
270
270
|
.share__share-modal-content___1iqEq input[type=url]::placeholder {
|
|
271
|
-
color: var(--
|
|
271
|
+
color: var(--secondaryTextColor);
|
|
272
272
|
font-size: 1rem;
|
|
273
273
|
}
|
|
274
274
|
.share__share-modal-content___1iqEq input[type=text]:focus,
|
|
275
275
|
.share__share-modal-content___1iqEq input[type=password]:focus,
|
|
276
276
|
.share__share-modal-content___1iqEq input[type=email]:focus,
|
|
277
277
|
.share__share-modal-content___1iqEq input[type=url]:focus {
|
|
278
|
-
border: 0.063rem solid var(--
|
|
278
|
+
border: 0.063rem solid var(--primaryColor);
|
|
279
279
|
outline: 0;
|
|
280
280
|
}
|
|
281
281
|
.share__share-modal-content___1iqEq input[type=text]:hover,
|
|
282
282
|
.share__share-modal-content___1iqEq input[type=password]:hover,
|
|
283
283
|
.share__share-modal-content___1iqEq input[type=email]:hover,
|
|
284
284
|
.share__share-modal-content___1iqEq input[type=url]:hover {
|
|
285
|
-
border: 0.063rem solid var(--
|
|
285
|
+
border: 0.063rem solid var(--hintTextColor);
|
|
286
286
|
}
|
|
287
287
|
.share__share-modal-content___1iqEq input[type=text].share__error___pwqPO,
|
|
288
288
|
.share__share-modal-content___1iqEq input[type=password].share__error___pwqPO,
|
|
289
289
|
.share__share-modal-content___1iqEq input[type=email].share__error___pwqPO,
|
|
290
290
|
.share__share-modal-content___1iqEq input[type=url].share__error___pwqPO {
|
|
291
|
-
border: 0.063rem solid var(--
|
|
291
|
+
border: 0.063rem solid var(--errorColor);
|
|
292
292
|
}
|
|
293
293
|
@media (max-width: 48rem) {
|
|
294
294
|
}
|
|
295
295
|
@media (max-width: 48rem) {
|
|
296
296
|
}
|
|
297
297
|
.share__share-byemail-onlybylink___29W-t {
|
|
298
|
-
background: var(--
|
|
298
|
+
background: var(--defaultBackgroundColor);
|
|
299
299
|
padding: 1rem 2rem;
|
|
300
300
|
margin: -1.5rem -2rem 1rem;
|
|
301
301
|
}
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
margin: 0;
|
|
328
328
|
}
|
|
329
329
|
.share__coz-form-group___VsQp7 .share__coz-form-desc___2mYN4 {
|
|
330
|
-
color: var(--
|
|
330
|
+
color: var(--secondaryTextColor);
|
|
331
331
|
}
|
|
332
332
|
.share__share-type-control___1YoRr {
|
|
333
333
|
display: flex;
|
|
@@ -354,14 +354,14 @@
|
|
|
354
354
|
.share__share-type-control___1YoRr .share__select-wrapper___3XBKC .share__select-option-desc___3jOnr {
|
|
355
355
|
line-height: 1.5;
|
|
356
356
|
font-size: 0.8125rem;
|
|
357
|
-
color: var(--
|
|
357
|
+
color: var(--secondaryTextColor);
|
|
358
358
|
}
|
|
359
359
|
.share__share-type-control___1YoRr button {
|
|
360
360
|
flex: 0 0 49%;
|
|
361
361
|
margin: 0;
|
|
362
362
|
}
|
|
363
363
|
.react-select__option:active {
|
|
364
|
-
background-color: var(--
|
|
364
|
+
background-color: var(--defaultBackgroundColor) !important;
|
|
365
365
|
}
|
|
366
366
|
input[type=text] {
|
|
367
367
|
width: 100%;
|
|
@@ -386,7 +386,7 @@ input[type=text] {
|
|
|
386
386
|
margin: 0 0 0.5rem 3.5rem;
|
|
387
387
|
padding-left: 1.5rem;
|
|
388
388
|
line-height: 1.5;
|
|
389
|
-
color: var(--
|
|
389
|
+
color: var(--secondaryTextColor);
|
|
390
390
|
}
|
|
391
391
|
/* imported from autosuggest.styl */
|
|
392
392
|
|
|
@@ -403,7 +403,7 @@ input[type=text] {
|
|
|
403
403
|
overflow: hidden;
|
|
404
404
|
box-shadow: 0px 0px 0px 0.5px rgba(29,33,42,0.12), 0px 2px 4px rgba(29,33,42,0.079), 0px 4px 16px rgba(29,33,42,0.06);
|
|
405
405
|
border-radius: 0.5rem;
|
|
406
|
-
background: var(--
|
|
406
|
+
background: var(--paperBackgroundColor);
|
|
407
407
|
display: none;
|
|
408
408
|
}
|
|
409
409
|
.autosuggest__suggestionsContainerOpen___35OCI {
|
|
@@ -434,7 +434,7 @@ input[type=text] {
|
|
|
434
434
|
overflow: auto;
|
|
435
435
|
}
|
|
436
436
|
.autosuggest__recipientsContainer___1JYxA:hover {
|
|
437
|
-
border: 1px solid var(--
|
|
437
|
+
border: 1px solid var(--borderMainColor);
|
|
438
438
|
}
|
|
439
439
|
.autosuggest__recipientsContainer___1JYxA:focus-within {
|
|
440
440
|
border: 1px solid var(--primaryColor);
|
|
@@ -459,20 +459,20 @@ input[type=text] {
|
|
|
459
459
|
/* imported from button.styl */
|
|
460
460
|
|
|
461
461
|
.button__coz-btn-shared___9MFbY {
|
|
462
|
-
border-color:
|
|
463
|
-
background-color:
|
|
464
|
-
color: var(--
|
|
462
|
+
border-color: var(--emerald);
|
|
463
|
+
background-color: var(--emerald);
|
|
464
|
+
color: var(--primaryContrastTextColor);
|
|
465
465
|
transition: all 0.2s ease-out;
|
|
466
466
|
}
|
|
467
467
|
.button__coz-btn-shared___9MFbY:focus,
|
|
468
468
|
.button__coz-btn-shared___9MFbY:not([disabled]):not([aria-disabled=true]):hover {
|
|
469
|
-
border-color:
|
|
470
|
-
background-color:
|
|
469
|
+
border-color: var(--malachite);
|
|
470
|
+
background-color: var(--malachite);
|
|
471
471
|
}
|
|
472
472
|
.button__coz-btn-sharedWithMe___25PBh {
|
|
473
473
|
border-color: #b449e7;
|
|
474
474
|
background-color: #b449e7;
|
|
475
|
-
color: var(--
|
|
475
|
+
color: var(--primaryContrastTextColor);
|
|
476
476
|
transition: all 0.2s ease-out;
|
|
477
477
|
}
|
|
478
478
|
.button__coz-btn-sharedWithMe___25PBh:focus,
|
|
@@ -491,7 +491,7 @@ input[type=text] {
|
|
|
491
491
|
}
|
|
492
492
|
.badge__shared-badge___2jGsy.badge__--small___2VMyY {
|
|
493
493
|
border: 0.125rem solid;
|
|
494
|
-
border-color: var(--
|
|
494
|
+
border-color: var(--primaryContrastTextColor);
|
|
495
495
|
width: 1.5rem;
|
|
496
496
|
height: 1.5rem;
|
|
497
497
|
}
|
|
@@ -501,7 +501,7 @@ input[type=text] {
|
|
|
501
501
|
}
|
|
502
502
|
.badge__shared-badge___2jGsy.badge__--xsmall___2cEGG {
|
|
503
503
|
border: 0.0625rem solid;
|
|
504
|
-
border-color: var(--
|
|
504
|
+
border-color: var(--primaryContrastTextColor);
|
|
505
505
|
width: 0.75rem;
|
|
506
506
|
height: 0.75rem;
|
|
507
507
|
}
|
|
@@ -510,7 +510,7 @@ input[type=text] {
|
|
|
510
510
|
height: 0.375rem;
|
|
511
511
|
}
|
|
512
512
|
.badge__shared-badge___2jGsy.badge__--by-me___3aTHb {
|
|
513
|
-
background-color:
|
|
513
|
+
background-color: var(--emerald);
|
|
514
514
|
}
|
|
515
515
|
.badge__shared-badge___2jGsy.badge__--with-me___3jW7R {
|
|
516
516
|
background-color: #9169f2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-sharing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Provides sharing login for React applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "Cozy",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"babel-plugin-css-modules-transform": "1.6.2",
|
|
51
51
|
"babel-plugin-inline-react-svg": "1.1.2",
|
|
52
52
|
"cozy-client": "46.1.0",
|
|
53
|
-
"cozy-ui": "
|
|
53
|
+
"cozy-ui": "106.8.0",
|
|
54
54
|
"enzyme": "3.11.0",
|
|
55
55
|
"enzyme-adapter-react-16": "1.15.6",
|
|
56
56
|
"enzyme-to-json": "3.6.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"cozy-client": ">=46.1.0",
|
|
65
65
|
"cozy-realtime": "^3.11.0",
|
|
66
|
-
"cozy-ui": ">=
|
|
66
|
+
"cozy-ui": ">=106.8.0",
|
|
67
67
|
"prop-types": "^15.7.2",
|
|
68
68
|
"react": "^16.12.0",
|
|
69
69
|
"react-router": "^5.0.1"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"sideEffects": [
|
|
72
72
|
"*.css"
|
|
73
73
|
],
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "077aefb7a6fc6037a5b9acb957eae5558cba4ae0"
|
|
75
75
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import Button from 'cozy-ui/transpiled/react/
|
|
4
|
+
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
6
|
|
|
7
7
|
import modalStyles from '../../styles/share.styl'
|
|
@@ -19,7 +19,7 @@ const RecipientConfirm = ({ recipientConfirmationData, verifyRecipient }) => {
|
|
|
19
19
|
return (
|
|
20
20
|
<Button
|
|
21
21
|
style={{ position: 'initial' }} // fix z-index bug on iOS when under a BottomDrawer due to relative position
|
|
22
|
-
|
|
22
|
+
variant="text"
|
|
23
23
|
className={modalStyles['aligned-dropdown-button']}
|
|
24
24
|
onClick={verify}
|
|
25
25
|
label={t(`Share.twoStepsConfirmation.verify`)}
|
|
@@ -5,7 +5,6 @@ import Autosuggest from 'react-autosuggest'
|
|
|
5
5
|
import Avatar from 'cozy-ui/transpiled/react/Avatar'
|
|
6
6
|
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
7
7
|
import { Spinner } from 'cozy-ui/transpiled/react/Spinner'
|
|
8
|
-
import palette from 'cozy-ui/transpiled/react/palette'
|
|
9
8
|
|
|
10
9
|
import { GroupAvatar } from './Avatar/GroupAvatar'
|
|
11
10
|
import ContactSuggestion from './ContactSuggestion'
|
|
@@ -165,7 +164,7 @@ const ShareAutocomplete = ({
|
|
|
165
164
|
})}
|
|
166
165
|
<input {...inputProps} onKeyPress={onKeyPress} onKeyUp={onKeyUp} />
|
|
167
166
|
{loading && isLoadingDisplayed ? (
|
|
168
|
-
<Spinner color=
|
|
167
|
+
<Spinner color="var(--primaryColor)" />
|
|
169
168
|
) : null}
|
|
170
169
|
</div>
|
|
171
170
|
)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import classNames from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
+
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
4
5
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
6
|
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
|
|
6
|
-
import { Button } from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
7
7
|
|
|
8
8
|
import styles from '../styles/button.styl'
|
|
9
9
|
|
|
10
10
|
export const ShareButton = ({ label, onClick, className, ...props }) => (
|
|
11
11
|
<Button
|
|
12
12
|
data-test-id="share-button"
|
|
13
|
-
|
|
13
|
+
variant="secondary"
|
|
14
14
|
className={className}
|
|
15
15
|
onClick={() => onClick()}
|
|
16
|
-
|
|
16
|
+
startIcon={<Icon icon={ShareIcon} />}
|
|
17
17
|
label={label}
|
|
18
18
|
{...props}
|
|
19
19
|
/>
|
|
@@ -34,7 +34,7 @@ export const SharedWithMeButton = ({ label, onClick, className, ...props }) => (
|
|
|
34
34
|
<Button
|
|
35
35
|
className={classNames(styles['coz-btn-sharedWithMe'], className)}
|
|
36
36
|
onClick={() => onClick()}
|
|
37
|
-
|
|
37
|
+
startIcon={<Icon icon={ShareIcon} />}
|
|
38
38
|
label={label}
|
|
39
39
|
{...props}
|
|
40
40
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
|
+
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
3
4
|
import { FixedDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
|
|
4
5
|
import Spinner from 'cozy-ui/transpiled/react/Spinner'
|
|
5
|
-
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
|
|
6
6
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
7
7
|
|
|
8
8
|
import { useSafeState } from '../helpers/hooks'
|
|
@@ -36,12 +36,12 @@ const ConfirmRecipientActions = ({ confirm, reject }) => {
|
|
|
36
36
|
return (
|
|
37
37
|
<>
|
|
38
38
|
<Button
|
|
39
|
-
|
|
39
|
+
variant="secondary"
|
|
40
|
+
color="error"
|
|
40
41
|
label={t(`Share.twoStepsConfirmation.reject`)}
|
|
41
42
|
onClick={reject}
|
|
42
43
|
/>
|
|
43
44
|
<Button
|
|
44
|
-
theme="primary"
|
|
45
45
|
label={t(`Share.twoStepsConfirmation.confirm`)}
|
|
46
46
|
onClick={confirm}
|
|
47
47
|
/>
|
|
@@ -73,15 +73,11 @@ const RejectRecipientActions = ({ reject, cancel }) => {
|
|
|
73
73
|
return (
|
|
74
74
|
<>
|
|
75
75
|
<Button
|
|
76
|
-
|
|
76
|
+
variant="secondary"
|
|
77
77
|
label={t(`Share.twoStepsConfirmation.cancel`)}
|
|
78
78
|
onClick={cancel}
|
|
79
79
|
/>
|
|
80
|
-
<Button
|
|
81
|
-
theme="primary"
|
|
82
|
-
label={t(`Share.twoStepsConfirmation.reject`)}
|
|
83
|
-
onClick={reject}
|
|
84
|
-
/>
|
|
80
|
+
<Button label={t(`Share.twoStepsConfirmation.reject`)} onClick={reject} />
|
|
85
81
|
</>
|
|
86
82
|
)
|
|
87
83
|
}
|
|
@@ -3,7 +3,6 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
5
5
|
import ShareIcon from 'cozy-ui/transpiled/react/Icons/Share'
|
|
6
|
-
import palette from 'cozy-ui/transpiled/react/palette'
|
|
7
6
|
|
|
8
7
|
import styles from '../styles/badge.styl'
|
|
9
8
|
|
|
@@ -19,7 +18,7 @@ const SharedBadge = ({ byMe, className, small, xsmall }) => (
|
|
|
19
18
|
>
|
|
20
19
|
<Icon
|
|
21
20
|
icon={ShareIcon}
|
|
22
|
-
color=
|
|
21
|
+
color="var(--primaryContrastTextColor)"
|
|
23
22
|
className={styles['shared-badge-icon']}
|
|
24
23
|
/>
|
|
25
24
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import cx from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import palette from 'cozy-ui/transpiled/react/palette'
|
|
5
4
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
6
5
|
|
|
7
6
|
import { SharingTooltip, TooltipRecipientList } from './Tooltip'
|
|
@@ -34,7 +33,7 @@ export const SharedStatus = ({ className, docId, recipients, link }) => {
|
|
|
34
33
|
{link && (
|
|
35
34
|
<>
|
|
36
35
|
<LinkIcon
|
|
37
|
-
style={{ fill:
|
|
36
|
+
style={{ fill: 'var(--iconTextColor)' }}
|
|
38
37
|
data-tip
|
|
39
38
|
data-for={`linkfor${docId}`}
|
|
40
39
|
/>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import PropTypes from 'prop-types'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
5
5
|
|
|
6
6
|
const ShareSubmit = props => (
|
|
7
7
|
<Button
|
|
8
8
|
onClick={() => {
|
|
9
9
|
props.onSubmit()
|
|
10
10
|
}}
|
|
11
|
+
size="large"
|
|
11
12
|
busy={props.loading}
|
|
12
13
|
label={props.label}
|
|
13
14
|
disabled={props.disabled}
|
|
@@ -6,20 +6,22 @@ import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
|
6
6
|
import BottomIcon from 'cozy-ui/transpiled/react/Icons/Bottom'
|
|
7
7
|
import CheckIcon from 'cozy-ui/transpiled/react/Icons/Check'
|
|
8
8
|
import SelectBox, { components } from 'cozy-ui/transpiled/react/SelectBox'
|
|
9
|
-
import palette from 'cozy-ui/transpiled/react/palette'
|
|
10
9
|
|
|
11
10
|
import logger from '../logger'
|
|
12
11
|
import styles from '../styles/share.styl'
|
|
13
12
|
|
|
14
13
|
const DropdownIndicator = props => (
|
|
15
14
|
<components.DropdownIndicator {...props}>
|
|
16
|
-
<Icon icon={BottomIcon} color=
|
|
15
|
+
<Icon icon={BottomIcon} color="var(--iconTextColor)" />
|
|
17
16
|
</components.DropdownIndicator>
|
|
18
17
|
)
|
|
18
|
+
|
|
19
19
|
const Option = props => (
|
|
20
20
|
<components.Option {...props}>
|
|
21
21
|
<div className={cx(styles['select-option'])}>
|
|
22
|
-
{props.isSelected &&
|
|
22
|
+
{props.isSelected && (
|
|
23
|
+
<Icon icon={CheckIcon} color="var(--primaryColor)" />
|
|
24
|
+
)}
|
|
23
25
|
<div>
|
|
24
26
|
<div className={styles['select-option-label']}>{props.label}</div>
|
|
25
27
|
<div className={styles['select-option-desc']}>{props.data.desc}</div>
|
|
@@ -27,22 +29,25 @@ const Option = props => (
|
|
|
27
29
|
</div>
|
|
28
30
|
</components.Option>
|
|
29
31
|
)
|
|
32
|
+
|
|
30
33
|
const customStyles = {
|
|
31
34
|
option: (base, state) => ({
|
|
32
35
|
...base,
|
|
33
|
-
color: '
|
|
34
|
-
backgroundColor: state.isFocused ?
|
|
36
|
+
color: 'var(--primaryTextColor)',
|
|
37
|
+
backgroundColor: state.isFocused ? 'var(--actionColorHover)' : null,
|
|
35
38
|
padding: 0,
|
|
36
39
|
borderBottom:
|
|
37
40
|
state.options.findIndex(o => o.value === state.value) === 0
|
|
38
|
-
?
|
|
41
|
+
? '1px solid var(--borderMainColor)'
|
|
39
42
|
: null
|
|
40
43
|
}),
|
|
41
44
|
menu: base => ({
|
|
42
45
|
...base,
|
|
46
|
+
backgroundColor: 'var(--paperBackgroundColor)',
|
|
43
47
|
width: '204%'
|
|
44
48
|
})
|
|
45
49
|
}
|
|
50
|
+
|
|
46
51
|
const ShareTypeSelect = ({ options, onChange }) => (
|
|
47
52
|
<div className={styles['select-wrapper']}>
|
|
48
53
|
<SelectBox
|
|
@@ -4,7 +4,7 @@ import snarkdown from 'snarkdown'
|
|
|
4
4
|
|
|
5
5
|
import { useClient } from 'cozy-client'
|
|
6
6
|
import Banner from 'cozy-ui/transpiled/react/Banner'
|
|
7
|
-
import Button
|
|
7
|
+
import Button from 'cozy-ui/transpiled/react/Buttons'
|
|
8
8
|
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
|
|
9
9
|
|
|
10
10
|
import CozyHomeLinkIcon from './CozyHomeLinkIcon'
|
|
@@ -97,7 +97,7 @@ const SharingBannerCozyToCozy = ({
|
|
|
97
97
|
}
|
|
98
98
|
buttonOne={
|
|
99
99
|
<Button
|
|
100
|
-
|
|
100
|
+
variant="text"
|
|
101
101
|
label={buttonOne.label}
|
|
102
102
|
icon={buttonOne.icon}
|
|
103
103
|
onClick={buttonOne.action}
|
|
@@ -105,7 +105,7 @@ const SharingBannerCozyToCozy = ({
|
|
|
105
105
|
}
|
|
106
106
|
buttonTwo={
|
|
107
107
|
<Button
|
|
108
|
-
|
|
108
|
+
variant="text"
|
|
109
109
|
label={t('Share.banner.close')}
|
|
110
110
|
onClick={onClose}
|
|
111
111
|
/>
|
|
@@ -142,8 +142,9 @@ const SharingBannerByLink = ({ onClose }) => {
|
|
|
142
142
|
bgcolor="var(--defaultBackgroundColor)"
|
|
143
143
|
text={<SharingBannerByLinkText />}
|
|
144
144
|
buttonOne={
|
|
145
|
-
<
|
|
146
|
-
|
|
145
|
+
<Button
|
|
146
|
+
component="a"
|
|
147
|
+
variant="text"
|
|
147
148
|
label={t('Share.create-cozy')}
|
|
148
149
|
icon={CozyHomeLinkIcon}
|
|
149
150
|
href={HOME_LINK_HREF}
|
|
@@ -151,7 +152,7 @@ const SharingBannerByLink = ({ onClose }) => {
|
|
|
151
152
|
}
|
|
152
153
|
buttonTwo={
|
|
153
154
|
<Button
|
|
154
|
-
|
|
155
|
+
variant="text"
|
|
155
156
|
label={t('Share.banner.close')}
|
|
156
157
|
onClick={onClose}
|
|
157
158
|
/>
|
|
@@ -15,7 +15,7 @@ exports[`SharedStatus component should display the link if there is a link 1`] =
|
|
|
15
15
|
height="16"
|
|
16
16
|
style={
|
|
17
17
|
Object {
|
|
18
|
-
"fill": "var(--
|
|
18
|
+
"fill": "var(--iconTextColor)",
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
viewBox="0 0 16 16"
|
|
@@ -29,7 +29,7 @@ exports[`SharedStatus component should display the link if there is a link 1`] =
|
|
|
29
29
|
height="16"
|
|
30
30
|
style={
|
|
31
31
|
Object {
|
|
32
|
-
"fill": "var(--
|
|
32
|
+
"fill": "var(--iconTextColor)",
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
viewBox="0 0 16 16"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
overflow hidden
|
|
12
12
|
box-shadow 0px 0px 0px 0.5px rgba(29, 33, 42, 0.12), 0px 2px 4px rgba(29, 33, 42, 0.0793047), 0px 4px 16px rgba(29, 33, 42, 0.06)
|
|
13
13
|
border-radius .5rem
|
|
14
|
-
background var(--
|
|
14
|
+
background var(--paperBackgroundColor)
|
|
15
15
|
display none
|
|
16
16
|
|
|
17
17
|
.suggestionsContainerOpen
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
overflow auto
|
|
43
43
|
|
|
44
44
|
&:hover
|
|
45
|
-
border 1px solid var(--
|
|
45
|
+
border 1px solid var(--borderMainColor)
|
|
46
46
|
|
|
47
47
|
&:focus-within
|
|
48
48
|
border 1px solid var(--primaryColor)
|
package/src/styles/badge.styl
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
palette=json('settings/palette.json', { hash: true })
|
|
2
|
-
|
|
3
1
|
.shared-badge
|
|
4
2
|
display flex
|
|
5
3
|
align-items center
|
|
@@ -8,8 +6,8 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
8
6
|
background-clip padding-box
|
|
9
7
|
|
|
10
8
|
&.--small
|
|
11
|
-
border .125rem solid
|
|
12
|
-
border-color:
|
|
9
|
+
border .125rem solid
|
|
10
|
+
border-color: var(--primaryContrastTextColor)
|
|
13
11
|
width 1.5rem
|
|
14
12
|
height 1.5rem
|
|
15
13
|
|
|
@@ -18,8 +16,8 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
18
16
|
height .75rem
|
|
19
17
|
|
|
20
18
|
&.--xsmall
|
|
21
|
-
border .0625rem solid
|
|
22
|
-
border-color:
|
|
19
|
+
border .0625rem solid
|
|
20
|
+
border-color: var(--primaryContrastTextColor)
|
|
23
21
|
width .75rem
|
|
24
22
|
height .75rem
|
|
25
23
|
|
|
@@ -28,7 +26,7 @@ palette=json('settings/palette.json', { hash: true })
|
|
|
28
26
|
height .375rem
|
|
29
27
|
|
|
30
28
|
&.--by-me
|
|
31
|
-
background-color:
|
|
29
|
+
background-color: var(--emerald)
|
|
32
30
|
|
|
33
31
|
&.--with-me
|
|
34
|
-
background-color:
|
|
32
|
+
background-color: #9169F2
|
package/src/styles/button.styl
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
palette=json('settings/palette.json', { hash: true })
|
|
2
1
|
.coz-btn-shared
|
|
3
|
-
border-color:
|
|
4
|
-
background-color:
|
|
5
|
-
color:
|
|
2
|
+
border-color: var(--emerald)
|
|
3
|
+
background-color: var(--emerald)
|
|
4
|
+
color: var(--primaryContrastTextColor)
|
|
6
5
|
transition all .2s ease-out
|
|
7
6
|
|
|
8
7
|
&:focus
|
|
9
8
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
10
|
-
border-color:
|
|
11
|
-
background-color:
|
|
9
|
+
border-color: var(--malachite)
|
|
10
|
+
background-color: var(--malachite)
|
|
12
11
|
|
|
13
12
|
.coz-btn-sharedWithMe
|
|
14
|
-
border-color:
|
|
15
|
-
background-color:
|
|
16
|
-
color:
|
|
13
|
+
border-color: #B449E7
|
|
14
|
+
background-color: #B449E7
|
|
15
|
+
color: var(--primaryContrastTextColor)
|
|
17
16
|
transition all .2s ease-out
|
|
18
17
|
|
|
19
18
|
&:focus
|
|
20
19
|
&:not([disabled]):not([aria-disabled=true]):hover
|
|
21
|
-
border-color:
|
|
22
|
-
background-color:
|
|
20
|
+
border-color: #922BC2
|
|
21
|
+
background-color: #922BC2
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@require 'settings/breakpoints.styl'
|
|
3
3
|
|
|
4
4
|
:root
|
|
5
|
-
--genericRecipientBackground: var(--
|
|
6
|
-
--genericRecipientColor: var(--
|
|
5
|
+
--genericRecipientBackground: var(--secondaryColor)
|
|
6
|
+
--genericRecipientColor: var(--secondaryContrastTextColor)
|
|
7
7
|
|
|
8
8
|
.recipient
|
|
9
9
|
display flex
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
.recipient-details
|
|
43
43
|
font-size .875rem
|
|
44
|
-
color var(--
|
|
44
|
+
color var(--secondaryTextColor)
|
|
45
45
|
|
|
46
46
|
.avatar
|
|
47
47
|
display flex
|
package/src/styles/share.styl
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@require 'settings/breakpoints.styl'
|
|
4
4
|
|
|
5
5
|
.share-byemail-onlybylink
|
|
6
|
-
background var(--
|
|
6
|
+
background var(--defaultBackgroundColor)
|
|
7
7
|
padding 1rem 2rem
|
|
8
8
|
margin -1.5rem -2rem 1rem
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
margin 0
|
|
37
37
|
|
|
38
38
|
.coz-form-desc
|
|
39
|
-
color var(--
|
|
39
|
+
color var(--secondaryTextColor)
|
|
40
40
|
|
|
41
41
|
.share-type-control
|
|
42
42
|
display flex
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
.select-option-desc
|
|
65
65
|
line-height 1.5
|
|
66
66
|
font-size .8125rem
|
|
67
|
-
color var(--
|
|
67
|
+
color var(--secondaryTextColor)
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
:global
|
|
76
76
|
// dirty hack for react-select: its API doesn't allow to make change to active styles
|
|
77
77
|
.react-select__option:active
|
|
78
|
-
background-color var(--
|
|
78
|
+
background-color var(--defaultBackgroundColor) !important
|
|
79
79
|
|
|
80
80
|
input[type=text]
|
|
81
81
|
width 100%
|
|
@@ -100,4 +100,4 @@ input[type=text]
|
|
|
100
100
|
margin 0 0 0.5rem 3.5rem
|
|
101
101
|
padding-left 1.5rem
|
|
102
102
|
line-height 1.5
|
|
103
|
-
color var(--
|
|
103
|
+
color var(--secondaryTextColor)
|