cozy-ui 121.1.2 → 121.3.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 +17 -0
- package/assets/icons/twake/illus/twake_workplace.svg +1 -0
- package/dist/cozy-ui.min.css +1 -1
- package/package.json +1 -1
- package/react/Buttons/Readme.md +37 -2
- package/react/Buttons/index.jsx +16 -3
- package/react/Icon/Readme.md +3 -1
- package/react/Icons/TwakeWorkplace.jsx +83 -0
- package/react/Layout/Layout.jsx +3 -1
- package/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +24 -3
- package/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.js +16 -1
- package/react/Sidebar/index.jsx +7 -1
- package/react/UploadQueue/FileUploadProgress.jsx +49 -0
- package/react/UploadQueue/Item.jsx +99 -0
- package/react/UploadQueue/Pending.jsx +12 -0
- package/react/UploadQueue/Readme.md +10 -3
- package/react/UploadQueue/RemainingTime.jsx +26 -0
- package/react/UploadQueue/helpers.js +3 -0
- package/react/UploadQueue/index.jsx +3 -172
- package/react/UploadQueue/styles.styl +4 -2
- package/react/UploadQueue/useStatusIcon.js +34 -0
- package/stylus/objects/layouts.styl +12 -2
- package/stylus/objects/sidebar.styl +6 -1
- package/transpiled/react/Buttons/index.js +7 -4
- package/transpiled/react/Icons/TwakeWorkplace.js +86 -0
- package/transpiled/react/Layout/Layout.js +6 -2
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkInvertedOverrides.d.ts +24 -3
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkNormalOverrides.d.ts +24 -3
- package/transpiled/react/MuiCozyTheme/overrides/makeLightInvertedOverrides.d.ts +24 -3
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.d.ts +24 -3
- package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +24 -3
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkInvertedOverrides.d.ts +40 -4
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkNormalOverrides.d.ts +40 -4
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightInvertedOverrides.d.ts +40 -4
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.d.ts +40 -4
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.js +16 -1
- package/transpiled/react/Sidebar/index.js +6 -2
- package/transpiled/react/UploadQueue/FileUploadProgress.js +66 -0
- package/transpiled/react/UploadQueue/Item.js +106 -0
- package/transpiled/react/UploadQueue/Pending.js +10 -0
- package/transpiled/react/UploadQueue/RemainingTime.js +43 -0
- package/transpiled/react/UploadQueue/helpers.js +4 -0
- package/transpiled/react/UploadQueue/index.js +5 -169
- package/transpiled/react/UploadQueue/useStatusIcon.js +45 -0
- package/transpiled/react/stylesheet.css +1 -1
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
import LinearProgress from '@material-ui/core/LinearProgress'
|
|
2
2
|
import cx from 'classnames'
|
|
3
|
-
import React, { Component
|
|
4
|
-
import { useIntervalWhen } from 'rooks'
|
|
5
|
-
|
|
6
|
-
import { splitFilename } from 'cozy-client/dist/models/file'
|
|
3
|
+
import React, { Component } from 'react'
|
|
7
4
|
|
|
5
|
+
import Item from './Item'
|
|
8
6
|
import localeEn from './locales/en.json'
|
|
9
7
|
import localeEs from './locales/es.json'
|
|
10
8
|
import localeFr from './locales/fr.json'
|
|
11
9
|
import styles from './styles.styl'
|
|
12
|
-
import Icon from '../Icon'
|
|
13
|
-
import CheckIcon from '../Icons/Check'
|
|
14
|
-
import CrossIcon from '../Icons/Cross'
|
|
15
|
-
import WarningIcon from '../Icons/Warning'
|
|
16
|
-
import Spinner from '../Spinner'
|
|
17
|
-
import Typography from '../Typography'
|
|
18
10
|
import List from '../List'
|
|
19
|
-
import
|
|
20
|
-
import ListItemText from '../ListItemText'
|
|
21
|
-
import ListItemIcon from '../ListItemIcon'
|
|
22
|
-
import { Img } from '../deprecated/Media'
|
|
11
|
+
import Typography from '../Typography'
|
|
23
12
|
import Button from '../deprecated/Button'
|
|
24
|
-
import { translate, useI18n } from '../providers/I18n'
|
|
25
13
|
import { formatLocallyDistanceToNow } from '../providers/I18n/format'
|
|
26
14
|
import withLocales from '../providers/I18n/withLocales'
|
|
27
15
|
import { withStyles } from '../styles'
|
|
@@ -58,174 +46,17 @@ export const uploadStatus = {
|
|
|
58
46
|
ERROR_STATUSES
|
|
59
47
|
}
|
|
60
48
|
|
|
61
|
-
const Pending = translate()(props => (
|
|
62
|
-
<Typography variant="subtitle1" color="primary">
|
|
63
|
-
{props.t('item.pending')}
|
|
64
|
-
</Typography>
|
|
65
|
-
))
|
|
66
|
-
|
|
67
49
|
export const formatRemainingTime = durationInSec => {
|
|
68
50
|
const later = Date.now() + durationInSec * 1000
|
|
69
51
|
return formatLocallyDistanceToNow(later)
|
|
70
52
|
}
|
|
71
53
|
|
|
72
|
-
// https://date-fns.org/v2.28.0/docs/formatDistanceToNow
|
|
73
|
-
const numberOfReferencesForPluralForm = durationInSec =>
|
|
74
|
-
durationInSec < 90 || (durationInSec > 2670 && durationInSec < 5370) ? 1 : 2
|
|
75
|
-
|
|
76
|
-
const RemainingTime = ({ durationInSec }) => {
|
|
77
|
-
const { t } = useI18n()
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<Typography
|
|
81
|
-
variant="caption"
|
|
82
|
-
className={cx(styles['upload-queue__progress-caption'], 'u-ellipsis')}
|
|
83
|
-
>
|
|
84
|
-
{t('item.remainingTime', {
|
|
85
|
-
time: formatRemainingTime(durationInSec),
|
|
86
|
-
smart_count: numberOfReferencesForPluralForm(durationInSec)
|
|
87
|
-
})}
|
|
88
|
-
</Typography>
|
|
89
|
-
)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const FileLinearProgress = withStyles(theme => ({
|
|
93
|
-
root: {
|
|
94
|
-
borderRadius: theme.shape.borderRadius
|
|
95
|
-
},
|
|
96
|
-
colorPrimary: {
|
|
97
|
-
backgroundColor: theme.palette.background.default
|
|
98
|
-
},
|
|
99
|
-
barColorPrimary: {
|
|
100
|
-
backgroundColor: 'var(--emerald)'
|
|
101
|
-
}
|
|
102
|
-
}))(LinearProgress)
|
|
103
|
-
|
|
104
54
|
const QueueLinearProgress = withStyles({
|
|
105
55
|
root: {
|
|
106
56
|
height: '2px'
|
|
107
57
|
}
|
|
108
58
|
})(LinearProgress)
|
|
109
59
|
|
|
110
|
-
const FileUploadProgress = ({ progress: progressProps }) => {
|
|
111
|
-
const [progress, setProgress] = useState(progressProps)
|
|
112
|
-
useIntervalWhen(
|
|
113
|
-
() => {
|
|
114
|
-
setProgress(progressProps)
|
|
115
|
-
},
|
|
116
|
-
1000,
|
|
117
|
-
true,
|
|
118
|
-
true
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<div className={styles['upload-queue__upload-progress']}>
|
|
123
|
-
<div className="u-flex-grow-1 u-pr-1">
|
|
124
|
-
<FileLinearProgress
|
|
125
|
-
variant="determinate"
|
|
126
|
-
value={(progress.loaded / progress.total) * 100}
|
|
127
|
-
/>
|
|
128
|
-
</div>
|
|
129
|
-
<div className="u-flex-shrink">
|
|
130
|
-
{progress.remainingTime ? (
|
|
131
|
-
<RemainingTime durationInSec={progress.remainingTime} />
|
|
132
|
-
) : null}
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const Item = translate()(
|
|
139
|
-
({ file, status, isDirectory, progress, getMimeTypeIcon }) => {
|
|
140
|
-
const { CANCEL, LOADING, DONE_STATUSES, ERROR_STATUSES } = uploadStatus
|
|
141
|
-
const { filename, extension } = splitFilename(file)
|
|
142
|
-
let statusIcon
|
|
143
|
-
let done = false
|
|
144
|
-
let error = false
|
|
145
|
-
/**
|
|
146
|
-
* Status came from the Upload Queue, but sometimes we're using
|
|
147
|
-
* manual upload without using the Upload Queue system but we're still
|
|
148
|
-
* using the UI component. When this is the case, the file handles on
|
|
149
|
-
* his own its status.
|
|
150
|
-
*/
|
|
151
|
-
const statusToUse = file.status ? file.status : status
|
|
152
|
-
|
|
153
|
-
if (statusToUse === LOADING) {
|
|
154
|
-
statusIcon = !progress ? (
|
|
155
|
-
<Spinner className="u-ml-half" color="var(--primaryColor)" />
|
|
156
|
-
) : null
|
|
157
|
-
} else if (statusToUse === CANCEL) {
|
|
158
|
-
statusIcon = (
|
|
159
|
-
<Icon
|
|
160
|
-
className="u-ml-half"
|
|
161
|
-
icon={CrossIcon}
|
|
162
|
-
color="var(--errorColor)"
|
|
163
|
-
/>
|
|
164
|
-
)
|
|
165
|
-
} else if (ERROR_STATUSES.includes(statusToUse)) {
|
|
166
|
-
error = true
|
|
167
|
-
statusIcon = (
|
|
168
|
-
<Icon
|
|
169
|
-
className="u-ml-half"
|
|
170
|
-
icon={WarningIcon}
|
|
171
|
-
color="var(--errorColor)"
|
|
172
|
-
/>
|
|
173
|
-
)
|
|
174
|
-
} else if (DONE_STATUSES.includes(statusToUse)) {
|
|
175
|
-
done = true
|
|
176
|
-
statusIcon = (
|
|
177
|
-
<Icon
|
|
178
|
-
className="u-ml-half"
|
|
179
|
-
icon={CheckIcon}
|
|
180
|
-
color="var(--successColor)"
|
|
181
|
-
/>
|
|
182
|
-
)
|
|
183
|
-
} else if (statusToUse === PENDING) {
|
|
184
|
-
statusIcon = <Pending />
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return (
|
|
188
|
-
<ListItem
|
|
189
|
-
divider
|
|
190
|
-
data-testid="upload-queue-item"
|
|
191
|
-
className={cx('u-ph-1', {
|
|
192
|
-
[styles['upload-queue-item--done']]: done,
|
|
193
|
-
[styles['upload-queue-item--error']]: error
|
|
194
|
-
})}
|
|
195
|
-
>
|
|
196
|
-
{getMimeTypeIcon ? (
|
|
197
|
-
<ListItemIcon className="u-ta-center">
|
|
198
|
-
<Icon
|
|
199
|
-
icon={getMimeTypeIcon(isDirectory, file.name, file.type)}
|
|
200
|
-
size={32}
|
|
201
|
-
className="u-mr-1"
|
|
202
|
-
/>
|
|
203
|
-
</ListItemIcon>
|
|
204
|
-
) : null}
|
|
205
|
-
<ListItemText disableTypography>
|
|
206
|
-
<div data-testid="upload-queue-item-name" className="u-ellipsis">
|
|
207
|
-
<Typography variant="body1" className="u-ellipsis">
|
|
208
|
-
{filename}
|
|
209
|
-
{extension && (
|
|
210
|
-
<Typography
|
|
211
|
-
component="span"
|
|
212
|
-
variant="body1"
|
|
213
|
-
color="textSecondary"
|
|
214
|
-
className="u-dib"
|
|
215
|
-
>
|
|
216
|
-
{extension}
|
|
217
|
-
</Typography>
|
|
218
|
-
)}
|
|
219
|
-
</Typography>
|
|
220
|
-
</div>
|
|
221
|
-
{progress ? <FileUploadProgress progress={progress} /> : null}
|
|
222
|
-
</ListItemText>
|
|
223
|
-
<Img className={styles['item-status']}>{statusIcon}</Img>
|
|
224
|
-
</ListItem>
|
|
225
|
-
)
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
|
|
229
60
|
export class UploadQueue extends Component {
|
|
230
61
|
state = {
|
|
231
62
|
collapsed: false
|
|
@@ -7,12 +7,13 @@ $coz-bar-size=3rem
|
|
|
7
7
|
|
|
8
8
|
.upload-queue
|
|
9
9
|
border .0625rem solid var(--dividerColor)
|
|
10
|
-
border-radius .
|
|
10
|
+
border-radius .5rem
|
|
11
11
|
background-color var(--paperBackgroundColor)
|
|
12
12
|
display flex
|
|
13
13
|
flex-direction column
|
|
14
14
|
max-width 90%
|
|
15
15
|
width 30rem
|
|
16
|
+
overflow hidden
|
|
16
17
|
|
|
17
18
|
.upload-queue__threshold-bar
|
|
18
19
|
min-width 10rem
|
|
@@ -31,7 +32,7 @@ $coz-bar-size=3rem
|
|
|
31
32
|
.upload-queue--popover
|
|
32
33
|
z-index var(--zIndex-popover)
|
|
33
34
|
border rem(1) solid var(--dividerColor)
|
|
34
|
-
border-radius
|
|
35
|
+
border-radius .5rem
|
|
35
36
|
box-shadow rem(0 1 3 0) rgba(50, 54, 63, .19), rem(0 6 18 0) rgba(50, 54, 63, .19)
|
|
36
37
|
background-color var(--paperBackgroundColor)
|
|
37
38
|
position fixed
|
|
@@ -54,6 +55,7 @@ $coz-bar-size=3rem
|
|
|
54
55
|
flex-direction column
|
|
55
56
|
justify-content center
|
|
56
57
|
height 2rem
|
|
58
|
+
min-height 2rem
|
|
57
59
|
background-color var(--defaultBackgroundColor)
|
|
58
60
|
font-weight bold
|
|
59
61
|
margin 0
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { uploadStatus } from './index'
|
|
4
|
+
import Icon from '../Icon'
|
|
5
|
+
import CheckIcon from '../Icons/Check'
|
|
6
|
+
import CheckCircleIcon from '../Icons/CheckCircle'
|
|
7
|
+
import CrossIcon from '../Icons/Cross'
|
|
8
|
+
import CrossCircleIcon from '../Icons/CrossCircle'
|
|
9
|
+
import WarningIcon from '../Icons/Warning'
|
|
10
|
+
import Spinner from '../Spinner'
|
|
11
|
+
import { isTwakeTheme } from '../helpers/isTwakeTheme'
|
|
12
|
+
|
|
13
|
+
export const useStatusIcon = (statusToUse, progress) => {
|
|
14
|
+
const { CANCEL, LOADING, DONE_STATUSES, ERROR_STATUSES, PENDING } =
|
|
15
|
+
uploadStatus
|
|
16
|
+
const SuccessIcon = isTwakeTheme() ? CheckCircleIcon : CheckIcon
|
|
17
|
+
const ErrorIcon = isTwakeTheme() ? CrossCircleIcon : CrossIcon
|
|
18
|
+
|
|
19
|
+
let statusIcon
|
|
20
|
+
|
|
21
|
+
if (statusToUse === LOADING) {
|
|
22
|
+
statusIcon = !progress ? <Spinner color="var(--primaryColor)" /> : null
|
|
23
|
+
} else if (statusToUse === CANCEL) {
|
|
24
|
+
statusIcon = <Icon icon={ErrorIcon} color="var(--errorColor)" />
|
|
25
|
+
} else if (ERROR_STATUSES.includes(statusToUse)) {
|
|
26
|
+
statusIcon = <Icon icon={WarningIcon} color="var(--errorColor)" />
|
|
27
|
+
} else if (DONE_STATUSES.includes(statusToUse)) {
|
|
28
|
+
statusIcon = <Icon icon={SuccessIcon} color="var(--successColor)" />
|
|
29
|
+
} else if (statusToUse === PENDING) {
|
|
30
|
+
statusIcon = null
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return statusIcon
|
|
34
|
+
}
|
|
@@ -77,7 +77,17 @@ $app
|
|
|
77
77
|
overflow-x hidden
|
|
78
78
|
overflow-y auto
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
&--rounded
|
|
81
|
+
+medium-screen('min') // desktop only
|
|
82
|
+
main
|
|
83
|
+
background-color var(--defaultBackgroundColor)
|
|
84
|
+
|
|
85
|
+
& > [role=main]
|
|
86
|
+
margin 1rem 1rem 1rem 0
|
|
87
|
+
border-radius 1rem
|
|
88
|
+
background-color var(--paperBackgroundColor)
|
|
89
|
+
|
|
90
|
+
+medium-screen() // mobile + tablet
|
|
81
91
|
display block
|
|
82
92
|
|
|
83
93
|
// iPhone X environment tweak
|
|
@@ -122,7 +132,7 @@ $app-2panes-sticky
|
|
|
122
132
|
main > [role=main]
|
|
123
133
|
height auto
|
|
124
134
|
|
|
125
|
-
+medium-screen()
|
|
135
|
+
+medium-screen() // mobile + tablet
|
|
126
136
|
> aside
|
|
127
137
|
position fixed
|
|
128
138
|
bottom 0
|
|
@@ -10,11 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
$sidebar
|
|
12
12
|
width rem(220)
|
|
13
|
-
border-right rem(1) solid var(--dividerColor)
|
|
14
13
|
background-color var(--defaultBackgroundColor)
|
|
15
14
|
overflow-y auto
|
|
16
15
|
overflow-x hidden
|
|
17
16
|
|
|
17
|
+
&--border
|
|
18
|
+
border-right rem(1) solid var(--dividerColor)
|
|
19
|
+
|
|
20
|
+
&--large
|
|
21
|
+
width rem(236)
|
|
22
|
+
|
|
18
23
|
+medium-screen()
|
|
19
24
|
justify-content space-between
|
|
20
25
|
border 0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["variant", "className", "color", "label", "busy", "disabled", "endIcon"],
|
|
4
|
+
var _excluded = ["variant", "className", "color", "label", "busy", "disabled", "height", "endIcon"],
|
|
5
5
|
_excluded2 = ["variant", "className"];
|
|
6
6
|
import MuiButton from '@material-ui/core/Button';
|
|
7
7
|
import cx from 'classnames';
|
|
@@ -17,6 +17,7 @@ var DefaultButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
17
17
|
label = _ref.label,
|
|
18
18
|
busy = _ref.busy,
|
|
19
19
|
disabled = _ref.disabled,
|
|
20
|
+
height = _ref.height,
|
|
20
21
|
endIcon = _ref.endIcon,
|
|
21
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
23
|
|
|
@@ -27,7 +28,7 @@ var DefaultButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
27
28
|
return /*#__PURE__*/React.createElement(MuiButton, _extends({}, props, {
|
|
28
29
|
variant: variant,
|
|
29
30
|
ref: ref,
|
|
30
|
-
className: cx(_defineProperty({}, "customColor-".concat(customColor), customColor), className),
|
|
31
|
+
className: cx(_defineProperty({}, "customColor-".concat(customColor), customColor), _defineProperty({}, "customSize-".concat(height), height), className),
|
|
31
32
|
color: _color,
|
|
32
33
|
disabled: disabled || busy,
|
|
33
34
|
endIcon: busy ? /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -93,9 +94,11 @@ var Buttons = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
93
94
|
Buttons.displayName = 'Buttons';
|
|
94
95
|
Buttons.propTypes = {
|
|
95
96
|
variant: PropTypes.oneOf(['primary', 'secondary', 'ghost', 'text']),
|
|
96
|
-
color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'success', 'error', 'warning', 'info'])
|
|
97
|
+
color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary', 'success', 'error', 'warning', 'info']),
|
|
98
|
+
height: PropTypes.oneOf(['default', 'auto'])
|
|
97
99
|
};
|
|
98
100
|
Buttons.defaultProps = {
|
|
99
|
-
variant: 'primary'
|
|
101
|
+
variant: 'primary',
|
|
102
|
+
height: 'default'
|
|
100
103
|
};
|
|
101
104
|
export default Buttons;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/twake/illus/workplace_twake.svg` to regenerate;
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
function SvgTwakeWorkplace(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
viewBox: "0 0 22 22",
|
|
8
|
+
fill: "none"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("rect", {
|
|
10
|
+
x: 0.498,
|
|
11
|
+
y: 0.495,
|
|
12
|
+
width: 21.51,
|
|
13
|
+
height: 21.51,
|
|
14
|
+
rx: 6.563,
|
|
15
|
+
fill: "#fff"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
17
|
+
x: 0.498,
|
|
18
|
+
y: 0.495,
|
|
19
|
+
width: 21.51,
|
|
20
|
+
height: 21.51,
|
|
21
|
+
rx: 6.563,
|
|
22
|
+
fill: "url(#workplace_twake_svg__paint0_linear_1573_14803)"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
24
|
+
x: 0.498,
|
|
25
|
+
y: 0.495,
|
|
26
|
+
width: 21.51,
|
|
27
|
+
height: 21.51,
|
|
28
|
+
rx: 6.563,
|
|
29
|
+
fill: "url(#workplace_twake_svg__paint1_linear_1573_14803)"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
31
|
+
x: 0.498,
|
|
32
|
+
y: 0.495,
|
|
33
|
+
width: 21.51,
|
|
34
|
+
height: 21.51,
|
|
35
|
+
rx: 6.563,
|
|
36
|
+
fill: "url(#workplace_twake_svg__paint2_linear_1573_14803)"
|
|
37
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
38
|
+
d: "M11.281 3.7c.008.006.017.01.027.012l.014.002a.405.405 0 01.156.05c.015.007.03.016.044.024l1.068.605 1.25.707.906.512.056.032a.487.487 0 01.229.363l.002.1v3.145a.489.489 0 01-.71.401c-.017-.008-.034-.018-.05-.027l-1.606-.909-1.138-.642-.056-.032a.542.542 0 00-.178-.051h-.058a.462.462 0 00-.213.053c-.02.01-.038.021-.056.032l-1.215.696-1.458.835a3.52 3.52 0 01-.063.036.533.533 0 01-.176.058l-.07.002a.433.433 0 01-.195-.046.48.48 0 01-.283-.433V6.05a.483.483 0 01.224-.404l.05-.029.86-.493 1.021-.585 1.033-.59.256-.147.056-.032a.553.553 0 01.107-.044.53.53 0 01.071-.013.048.048 0 00.025-.012l.07-.002zm-7.514 8.774a.036.036 0 00.026-.032.487.487 0 01.27-.389l.652-.376 1.455-.84.566-.326.063-.036a.49.49 0 01.702.418v3.209a.49.49 0 00.213.394.671.671 0 00.068.04l.62.348 1.278.714.792.442.062.035c.11.064.188.168.22.29a.463.463 0 01.013.192.476.476 0 01-.224.35c-.02.013-.042.024-.063.036L8.411 18.08l-.704.386c-.019.01-.036.022-.057.031a.494.494 0 01-.48-.016l-.217-.127-2.877-1.692a.533.533 0 01-.055-.033.487.487 0 01-.219-.306c-.005-.02-.007-.043-.01-.064a.028.028 0 00-.018-.02.04.04 0 00-.007-.003v-3.763zm11.207 6.103a.078.078 0 00-.017-.012.533.533 0 00-.055-.016.47.47 0 01-.127-.049l-.069-.04-1.063-.613-1.573-.907-.05-.03a.477.477 0 01-.224-.4.477.477 0 01.27-.448l.896-.514 1.21-.692.566-.325.074-.043a.487.487 0 00.227-.35 1.02 1.02 0 00.006-.115v-3.092c0-.024 0-.04.002-.058a.481.481 0 01.356-.43.471.471 0 01.113-.019.492.492 0 01.285.084l.722.415 1.268.733.665.383.062.036a.469.469 0 01.19.218.15.15 0 01.015.048.083.083 0 00.016.032v3.964a.032.032 0 00-.015.023.178.178 0 01-.017.055.48.48 0 01-.18.208.67.67 0 01-.062.035l-.978.56-2.18 1.25a.376.376 0 01-.055.032.468.468 0 01-.127.05.389.389 0 00-.048.013.03.03 0 00-.016.014h-.087z",
|
|
39
|
+
fill: "#fff"
|
|
40
|
+
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
41
|
+
id: "workplace_twake_svg__paint0_linear_1573_14803",
|
|
42
|
+
x1: 22.008,
|
|
43
|
+
y1: 13.042,
|
|
44
|
+
x2: 0.498,
|
|
45
|
+
y2: 13.042,
|
|
46
|
+
gradientUnits: "userSpaceOnUse"
|
|
47
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
48
|
+
offset: 0.13,
|
|
49
|
+
stopColor: "#A033FF"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
51
|
+
offset: 0.61,
|
|
52
|
+
stopColor: "#0094FF"
|
|
53
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
54
|
+
offset: 1,
|
|
55
|
+
stopColor: "#4FB500"
|
|
56
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
57
|
+
id: "workplace_twake_svg__paint1_linear_1573_14803",
|
|
58
|
+
x1: 10.356,
|
|
59
|
+
y1: 7.217,
|
|
60
|
+
x2: 3.634,
|
|
61
|
+
y2: 20.66,
|
|
62
|
+
gradientUnits: "userSpaceOnUse"
|
|
63
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
64
|
+
stopColor: "#FFD600",
|
|
65
|
+
stopOpacity: 0
|
|
66
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
67
|
+
offset: 0.563,
|
|
68
|
+
stopColor: "#FFC700"
|
|
69
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
70
|
+
id: "workplace_twake_svg__paint2_linear_1573_14803",
|
|
71
|
+
x1: 12.149,
|
|
72
|
+
y1: 13.042,
|
|
73
|
+
x2: 19.767,
|
|
74
|
+
y2: 21.109,
|
|
75
|
+
gradientUnits: "userSpaceOnUse"
|
|
76
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
77
|
+
offset: 0.03,
|
|
78
|
+
stopColor: "#FF3B30",
|
|
79
|
+
stopOpacity: 0
|
|
80
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
81
|
+
offset: 0.843,
|
|
82
|
+
stopColor: "#E73B2D"
|
|
83
|
+
}))));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default SvgTwakeWorkplace;
|
|
@@ -4,6 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
import _extends from "@babel/runtime/helpers/extends";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
8
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
8
9
|
var _excluded = ["children", "className", "monoColumn"],
|
|
9
10
|
_excluded2 = ["children"],
|
|
@@ -18,8 +19,11 @@ import PropTypes from 'prop-types';
|
|
|
18
19
|
import React, { Component } from 'react';
|
|
19
20
|
var styles = {
|
|
20
21
|
"o-layout": "styles__o-layout___3TSz9",
|
|
21
|
-
"o-layout-2panes": "styles__o-layout-2panes___1CDQw"
|
|
22
|
+
"o-layout-2panes": "styles__o-layout-2panes___1CDQw",
|
|
23
|
+
"o-layout--rounded": "styles__o-layout--rounded___1WX4D",
|
|
24
|
+
"o-layout-2panes--rounded": "styles__o-layout-2panes--rounded___1FuZT"
|
|
22
25
|
};
|
|
26
|
+
import { isTwakeTheme } from "cozy-ui/transpiled/react/helpers/isTwakeTheme";
|
|
23
27
|
export var Layout = function Layout(_ref) {
|
|
24
28
|
var children = _ref.children,
|
|
25
29
|
className = _ref.className,
|
|
@@ -27,7 +31,7 @@ export var Layout = function Layout(_ref) {
|
|
|
27
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
32
|
|
|
29
33
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
30
|
-
className: cx(monoColumn ? styles['o-layout'] : styles['o-layout-2panes'], className)
|
|
34
|
+
className: cx(monoColumn ? styles['o-layout'] : styles['o-layout-2panes'], className, _defineProperty({}, styles['o-layout--rounded'], isTwakeTheme()))
|
|
31
35
|
}, rest), children);
|
|
32
36
|
};
|
|
33
37
|
export var Main = function Main(_ref2) {
|
|
@@ -139,9 +139,16 @@ export function makeDarkInvertedOverrides(theme: any): {
|
|
|
139
139
|
MuiButton: {
|
|
140
140
|
root: {
|
|
141
141
|
borderRadius: number;
|
|
142
|
-
height: string;
|
|
143
142
|
lineHeight: string;
|
|
144
143
|
padding: string;
|
|
144
|
+
'&.customSize': {
|
|
145
|
+
'&-default': {
|
|
146
|
+
height: string;
|
|
147
|
+
};
|
|
148
|
+
'&-auto': {
|
|
149
|
+
minHeight: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
145
152
|
'&.ghost': {
|
|
146
153
|
borderStyle: string;
|
|
147
154
|
'&:hover': {
|
|
@@ -150,15 +157,29 @@ export function makeDarkInvertedOverrides(theme: any): {
|
|
|
150
157
|
};
|
|
151
158
|
};
|
|
152
159
|
sizeSmall: {
|
|
153
|
-
height: string;
|
|
154
160
|
padding: string;
|
|
161
|
+
'&.customSize': {
|
|
162
|
+
'&-default': {
|
|
163
|
+
height: string;
|
|
164
|
+
};
|
|
165
|
+
'&-auto': {
|
|
166
|
+
minHeight: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
155
169
|
'&$text': {
|
|
156
170
|
padding: string;
|
|
157
171
|
};
|
|
158
172
|
};
|
|
159
173
|
sizeLarge: {
|
|
160
|
-
height: string;
|
|
161
174
|
padding: string;
|
|
175
|
+
'&.customSize': {
|
|
176
|
+
'&-default': {
|
|
177
|
+
height: string;
|
|
178
|
+
};
|
|
179
|
+
'&-auto': {
|
|
180
|
+
minHeight: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
162
183
|
'&$text': {
|
|
163
184
|
padding: string;
|
|
164
185
|
};
|
|
@@ -139,9 +139,16 @@ export function makeDarkNormalOverrides(theme: any): {
|
|
|
139
139
|
MuiButton: {
|
|
140
140
|
root: {
|
|
141
141
|
borderRadius: number;
|
|
142
|
-
height: string;
|
|
143
142
|
lineHeight: string;
|
|
144
143
|
padding: string;
|
|
144
|
+
'&.customSize': {
|
|
145
|
+
'&-default': {
|
|
146
|
+
height: string;
|
|
147
|
+
};
|
|
148
|
+
'&-auto': {
|
|
149
|
+
minHeight: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
145
152
|
'&.ghost': {
|
|
146
153
|
borderStyle: string;
|
|
147
154
|
'&:hover': {
|
|
@@ -150,15 +157,29 @@ export function makeDarkNormalOverrides(theme: any): {
|
|
|
150
157
|
};
|
|
151
158
|
};
|
|
152
159
|
sizeSmall: {
|
|
153
|
-
height: string;
|
|
154
160
|
padding: string;
|
|
161
|
+
'&.customSize': {
|
|
162
|
+
'&-default': {
|
|
163
|
+
height: string;
|
|
164
|
+
};
|
|
165
|
+
'&-auto': {
|
|
166
|
+
minHeight: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
155
169
|
'&$text': {
|
|
156
170
|
padding: string;
|
|
157
171
|
};
|
|
158
172
|
};
|
|
159
173
|
sizeLarge: {
|
|
160
|
-
height: string;
|
|
161
174
|
padding: string;
|
|
175
|
+
'&.customSize': {
|
|
176
|
+
'&-default': {
|
|
177
|
+
height: string;
|
|
178
|
+
};
|
|
179
|
+
'&-auto': {
|
|
180
|
+
minHeight: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
162
183
|
'&$text': {
|
|
163
184
|
padding: string;
|
|
164
185
|
};
|
|
@@ -139,9 +139,16 @@ export function makeLightInvertedOverrides(theme: any): {
|
|
|
139
139
|
MuiButton: {
|
|
140
140
|
root: {
|
|
141
141
|
borderRadius: number;
|
|
142
|
-
height: string;
|
|
143
142
|
lineHeight: string;
|
|
144
143
|
padding: string;
|
|
144
|
+
'&.customSize': {
|
|
145
|
+
'&-default': {
|
|
146
|
+
height: string;
|
|
147
|
+
};
|
|
148
|
+
'&-auto': {
|
|
149
|
+
minHeight: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
145
152
|
'&.ghost': {
|
|
146
153
|
borderStyle: string;
|
|
147
154
|
'&:hover': {
|
|
@@ -150,15 +157,29 @@ export function makeLightInvertedOverrides(theme: any): {
|
|
|
150
157
|
};
|
|
151
158
|
};
|
|
152
159
|
sizeSmall: {
|
|
153
|
-
height: string;
|
|
154
160
|
padding: string;
|
|
161
|
+
'&.customSize': {
|
|
162
|
+
'&-default': {
|
|
163
|
+
height: string;
|
|
164
|
+
};
|
|
165
|
+
'&-auto': {
|
|
166
|
+
minHeight: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
155
169
|
'&$text': {
|
|
156
170
|
padding: string;
|
|
157
171
|
};
|
|
158
172
|
};
|
|
159
173
|
sizeLarge: {
|
|
160
|
-
height: string;
|
|
161
174
|
padding: string;
|
|
175
|
+
'&.customSize': {
|
|
176
|
+
'&-default': {
|
|
177
|
+
height: string;
|
|
178
|
+
};
|
|
179
|
+
'&-auto': {
|
|
180
|
+
minHeight: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
162
183
|
'&$text': {
|
|
163
184
|
padding: string;
|
|
164
185
|
};
|
|
@@ -139,9 +139,16 @@ export function makeLightNormalOverrides(theme: any): {
|
|
|
139
139
|
MuiButton: {
|
|
140
140
|
root: {
|
|
141
141
|
borderRadius: number;
|
|
142
|
-
height: string;
|
|
143
142
|
lineHeight: string;
|
|
144
143
|
padding: string;
|
|
144
|
+
'&.customSize': {
|
|
145
|
+
'&-default': {
|
|
146
|
+
height: string;
|
|
147
|
+
};
|
|
148
|
+
'&-auto': {
|
|
149
|
+
minHeight: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
145
152
|
'&.ghost': {
|
|
146
153
|
borderStyle: string;
|
|
147
154
|
'&:hover': {
|
|
@@ -150,15 +157,29 @@ export function makeLightNormalOverrides(theme: any): {
|
|
|
150
157
|
};
|
|
151
158
|
};
|
|
152
159
|
sizeSmall: {
|
|
153
|
-
height: string;
|
|
154
160
|
padding: string;
|
|
161
|
+
'&.customSize': {
|
|
162
|
+
'&-default': {
|
|
163
|
+
height: string;
|
|
164
|
+
};
|
|
165
|
+
'&-auto': {
|
|
166
|
+
minHeight: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
155
169
|
'&$text': {
|
|
156
170
|
padding: string;
|
|
157
171
|
};
|
|
158
172
|
};
|
|
159
173
|
sizeLarge: {
|
|
160
|
-
height: string;
|
|
161
174
|
padding: string;
|
|
175
|
+
'&.customSize': {
|
|
176
|
+
'&-default': {
|
|
177
|
+
height: string;
|
|
178
|
+
};
|
|
179
|
+
'&-auto': {
|
|
180
|
+
minHeight: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
162
183
|
'&$text': {
|
|
163
184
|
padding: string;
|
|
164
185
|
};
|