cozy-ui 138.4.0 → 138.6.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 +14 -0
- package/assets/icons/illus/cloud-sync.svg +1 -8
- package/package.json +1 -1
- package/react/Chips/Readme.md +55 -0
- package/react/Icons/CloudSync.jsx +2 -11
- package/react/MuiCozyTheme/helpers.js +9 -18
- package/react/ProgressionBanner/Readme.md +24 -18
- package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/CloudSync.js +4 -11
- package/transpiled/react/MuiCozyTheme/helpers.d.ts +5 -8
- package/transpiled/react/MuiCozyTheme/helpers.js +6 -9
- package/transpiled/react/MuiCozyTheme/overrides/makeDarkOverrides.d.ts +25 -40
- package/transpiled/react/MuiCozyTheme/overrides/makeLightOverrides.d.ts +25 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [138.6.0](https://github.com/cozy/cozy-ui/compare/v138.5.0...v138.6.0) (2026-04-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **Chip:** Adjust ghost style ([02758c2](https://github.com/cozy/cozy-ui/commit/02758c2))
|
|
7
|
+
|
|
8
|
+
# [138.5.0](https://github.com/cozy/cozy-ui/compare/v138.4.0...v138.5.0) (2026-04-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Change the CloudSync icon ([a4ad3a0](https://github.com/cozy/cozy-ui/commit/a4ad3a0))
|
|
14
|
+
|
|
1
15
|
# [138.4.0](https://github.com/cozy/cozy-ui/compare/v138.3.0...v138.4.0) (2026-04-09)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<g fill="none" fill-rule="evenodd">
|
|
3
|
-
<g>
|
|
4
|
-
<path fill="#B2D3FF" d="M8.889 27.892c-4.91 0-8.889-3.98-8.889-8.889 0-4.353 3.129-7.975 7.26-8.74.765-4.13 4.387-7.26 8.74-7.26 4.353 0 7.975 3.13 8.74 7.26 4.131.765 7.26 4.387 7.26 8.74 0 4.822-3.839 8.747-8.627 8.885l-.262.004H8.89z"/>
|
|
5
|
-
<path fill="#297EF1" d="M22.052 19.17c.44.217.621.75.405 1.19-1.201 2.435-3.707 4.032-6.457 4.032-2.103 0-4.04-.962-5.373-2.471-.091.394-.427.693-.85.693-.49 0-.888-.398-.888-.889V18.17c0-.056.014-.106.023-.158.005-.024.004-.048.01-.071.028-.106.072-.201.132-.285l.022-.024c.056-.073.124-.134.198-.186.022-.016.044-.03.068-.043.184-.104.399-.142.613-.098.024.005.047.012.07.018.077.022.149.057.22.102.024.015.048.026.071.043.01.008.021.011.031.02l2.667 2.221c.377.314.427.875.113 1.252-.166.2-.4.301-.64.313.96.832 2.198 1.34 3.513 1.34 2.065 0 3.958-1.206 4.862-3.04.217-.44.75-.621 1.19-.404zm1.031-2.589c-.003.018-.002.036-.007.053-.03.105-.077.198-.138.28-.011.016-.024.026-.035.039-.055.067-.12.124-.19.171-.023.016-.043.03-.067.043-.092.05-.191.087-.295.103-.003 0-.005.002-.007.003-.008 0-.015-.003-.023-.002-.096.012-.194.004-.292-.018-.024-.005-.046-.01-.07-.018-.077-.024-.153-.062-.225-.11-.02-.014-.042-.023-.06-.038-.007-.005-.015-.006-.02-.012l-2.668-2.223c-.376-.313-.428-.874-.113-1.251.183-.22.449-.314.713-.305-.96-.838-2.22-1.348-3.586-1.348-2.103 0-4.007 1.213-4.89 3.06-.21.444-.741.631-1.184.42-.443-.211-.631-.742-.42-1.184C10.682 11.78 13.21 10.17 16 10.17c2.127 0 4.061.93 5.385 2.412.11-.364.436-.634.837-.634.49 0 .889.398.889.888v3.556c0 .068-.014.128-.028.19z"/>
|
|
6
|
-
</g>
|
|
7
|
-
</g>
|
|
8
|
-
</svg>
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 9.987c-.013 0-.02 0-.033.006A2.327 2.327 0 0 0 10.667 8 2.33 2.33 0 0 0 8.56 9.347a1.992 1.992 0 0 0-1.893 1.986c0 1.107.893 2 2 2L13 13.32a1.667 1.667 0 0 0 0-3.333ZM13.007 12h-4.34A.669.669 0 0 1 8 11.333c0-.366.3-.666.667-.666H9.5V10.5c0-.647.52-1.167 1.167-1.167.646 0 1.167.52 1.167 1.167v.833h1.173a.33.33 0 0 1 .333.334.343.343 0 0 1-.333.333ZM5.334 2.84v1.393A4 4 0 0 0 2.667 8c0 1.18.52 2.227 1.333 2.96V9.333h1.333v4h-4V12h1.82a5.295 5.295 0 0 1-1.82-4 5.33 5.33 0 0 1 4-5.16ZM12 4h-1.82a5.32 5.32 0 0 1 1.774 3.333h-1.347A4.002 4.002 0 0 0 9.334 5.04v1.627H8v-4h4V4Z"/></svg>
|
package/package.json
CHANGED
package/react/Chips/Readme.md
CHANGED
|
@@ -166,3 +166,58 @@ const initialVariants = [{ default: true, active: false, ghost: false }]
|
|
|
166
166
|
)}
|
|
167
167
|
</Variants>
|
|
168
168
|
```
|
|
169
|
+
|
|
170
|
+
### Small size
|
|
171
|
+
|
|
172
|
+
```jsx
|
|
173
|
+
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
174
|
+
import Chip from 'cozy-ui/transpiled/react/Chips'
|
|
175
|
+
import Stack from 'cozy-ui/transpiled/react/Stack'
|
|
176
|
+
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
177
|
+
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
178
|
+
import FileOutlineIcon from "cozy-ui/transpiled/react/Icons/FileOutline"
|
|
179
|
+
import RightIcon from "cozy-ui/transpiled/react/Icons/Right"
|
|
180
|
+
import OpenwithIcon from "cozy-ui/transpiled/react/Icons/Openwith"
|
|
181
|
+
import Divider from "cozy-ui/transpiled/react/Divider"
|
|
182
|
+
import Variants from 'cozy-ui/docs/components/Variants'
|
|
183
|
+
|
|
184
|
+
const colors = ['success', 'error', 'warning', 'info']
|
|
185
|
+
const initialVariants = [{ default: true, active: false, ghost: false }]
|
|
186
|
+
|
|
187
|
+
;
|
|
188
|
+
|
|
189
|
+
<Variants initialVariants={initialVariants} radio={true} screenshotAllVariants>
|
|
190
|
+
{variant => (
|
|
191
|
+
<Grid container>
|
|
192
|
+
{colors.map(color =>
|
|
193
|
+
<Grid item xs={12} sm={6} md={3} className="u-mb-1" key={JSON.stringify(color)}>
|
|
194
|
+
<Stack spacing="s">
|
|
195
|
+
<Typography>{color}</Typography>
|
|
196
|
+
<div>
|
|
197
|
+
<Chip
|
|
198
|
+
label="1 invoice"
|
|
199
|
+
onClick={() => alert('You clicked')}
|
|
200
|
+
clickable
|
|
201
|
+
color={color}
|
|
202
|
+
size="small"
|
|
203
|
+
variant={Object.keys(variant).find(key => variant[key])}
|
|
204
|
+
/>
|
|
205
|
+
</div>
|
|
206
|
+
<div>
|
|
207
|
+
<Chip
|
|
208
|
+
label="1 invoice"
|
|
209
|
+
onClick={() => alert('You clicked')}
|
|
210
|
+
clickable
|
|
211
|
+
color={color}
|
|
212
|
+
size="small"
|
|
213
|
+
disabled
|
|
214
|
+
variant={Object.keys(variant).find(key => variant[key])}
|
|
215
|
+
/>
|
|
216
|
+
</div>
|
|
217
|
+
</Stack>
|
|
218
|
+
</Grid>
|
|
219
|
+
)}
|
|
220
|
+
</Grid>
|
|
221
|
+
)}
|
|
222
|
+
</Variants>
|
|
223
|
+
```
|
|
@@ -3,17 +3,8 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
function SvgCloudSync(props) {
|
|
5
5
|
return (
|
|
6
|
-
<svg viewBox="0 0
|
|
7
|
-
<
|
|
8
|
-
<path
|
|
9
|
-
fill="#B2D3FF"
|
|
10
|
-
d="M8.889 27.892A8.889 8.889 0 010 19.003a8.892 8.892 0 017.26-8.74c.765-4.13 4.387-7.26 8.74-7.26 4.353 0 7.975 3.13 8.74 7.26a8.892 8.892 0 017.26 8.74 8.888 8.888 0 01-8.627 8.885l-.262.004H8.89z"
|
|
11
|
-
/>
|
|
12
|
-
<path
|
|
13
|
-
fill="#297EF1"
|
|
14
|
-
d="M22.052 19.17a.89.89 0 01.405 1.19c-1.201 2.435-3.707 4.032-6.457 4.032-2.103 0-4.04-.962-5.373-2.471a.875.875 0 01-.85.693.889.889 0 01-.888-.889V18.17c0-.056.014-.106.023-.158.005-.024.004-.048.01-.071a.866.866 0 01.132-.285l.022-.024a.896.896 0 01.879-.327c.024.005.047.012.07.018a.842.842 0 01.22.102c.024.015.048.026.071.043.01.008.021.011.031.02l2.667 2.221a.89.89 0 01.113 1.252c-.166.2-.4.301-.64.313.96.832 2.198 1.34 3.513 1.34 2.065 0 3.958-1.206 4.862-3.04a.889.889 0 011.19-.404zm1.031-2.589c-.003.018-.002.036-.007.053a.862.862 0 01-.138.28c-.011.016-.024.026-.035.039a.88.88 0 01-.19.171c-.023.016-.043.03-.067.043a.91.91 0 01-.295.103c-.003 0-.005.002-.007.003-.008 0-.015-.003-.023-.002a.85.85 0 01-.362-.036.884.884 0 01-.225-.11c-.02-.014-.042-.023-.06-.038-.007-.005-.015-.006-.02-.012l-2.668-2.223a.888.888 0 01-.113-1.251.872.872 0 01.713-.305A5.448 5.448 0 0016 11.948c-2.103 0-4.007 1.213-4.89 3.06a.887.887 0 11-1.604-.764C10.682 11.78 13.21 10.17 16 10.17c2.127 0 4.061.93 5.385 2.412a.876.876 0 01.837-.634.89.89 0 01.889.888v3.556c0 .068-.014.128-.028.19z"
|
|
15
|
-
/>
|
|
16
|
-
</g>
|
|
6
|
+
<svg viewBox="0 0 16 16" {...props}>
|
|
7
|
+
<path d="M13 9.987c-.013 0-.02 0-.033.006A2.327 2.327 0 0010.667 8 2.33 2.33 0 008.56 9.347a1.992 1.992 0 00-1.893 1.986c0 1.107.893 2 2 2L13 13.32a1.667 1.667 0 000-3.333zM13.007 12h-4.34A.669.669 0 018 11.333c0-.366.3-.666.667-.666H9.5V10.5c0-.647.52-1.167 1.167-1.167.646 0 1.167.52 1.167 1.167v.833h1.173a.33.33 0 01.333.334.343.343 0 01-.333.333zM5.334 2.84v1.393A4 4 0 002.667 8c0 1.18.52 2.227 1.333 2.96V9.333h1.333v4h-4V12h1.82a5.295 5.295 0 01-1.82-4 5.33 5.33 0 014-5.16zM12 4h-1.82a5.32 5.32 0 011.774 3.333h-1.347A4.002 4.002 0 009.334 5.04v1.627H8v-4h4V4z" />
|
|
17
8
|
</svg>
|
|
18
9
|
)
|
|
19
10
|
}
|
|
@@ -111,28 +111,19 @@ export const makeChipStyleByColor = (theme, color) => ({
|
|
|
111
111
|
},
|
|
112
112
|
'&.ghost': {
|
|
113
113
|
borderWidth: '1px',
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
color: theme.palette[color].main,
|
|
115
|
+
borderColor: alpha(theme.palette[color].main, 0),
|
|
116
|
+
backgroundColor: alpha(
|
|
117
|
+
theme.palette[color].main,
|
|
118
|
+
theme.palette.action.ghostOpacity
|
|
119
|
+
),
|
|
120
|
+
'& $icon, & $deleteIcon': {
|
|
116
121
|
color: theme.palette[color].main,
|
|
117
|
-
|
|
118
|
-
theme.palette[color].main,
|
|
119
|
-
theme.palette.border.ghostOpacity
|
|
120
|
-
),
|
|
121
|
-
backgroundColor: alpha(
|
|
122
|
-
theme.palette[color].main,
|
|
123
|
-
theme.palette.action.ghostOpacity
|
|
124
|
-
),
|
|
125
|
-
'& $icon, & $deleteIcon': {
|
|
126
|
-
color: theme.palette[color].main,
|
|
127
|
-
fill: theme.palette[color].main
|
|
128
|
-
}
|
|
122
|
+
fill: theme.palette[color].main
|
|
129
123
|
},
|
|
130
124
|
'&$clickable, &$deletable': {
|
|
131
125
|
'&:hover, &:focus': {
|
|
132
|
-
borderColor: alpha(
|
|
133
|
-
theme.palette[color].main,
|
|
134
|
-
theme.palette.border.ghostOpacity
|
|
135
|
-
),
|
|
126
|
+
borderColor: alpha(theme.palette[color].main, 0),
|
|
136
127
|
backgroundColor: alpha(
|
|
137
128
|
theme.palette[color].main,
|
|
138
129
|
theme.palette.action.hoverGhostOpacity
|
|
@@ -1,35 +1,41 @@
|
|
|
1
1
|
A banner with a progress bar at the bottom.
|
|
2
2
|
|
|
3
3
|
```jsx
|
|
4
|
-
import useProgression from
|
|
5
|
-
import ProgressionBanner from
|
|
6
|
-
import Icon from
|
|
7
|
-
import CloudSync from
|
|
8
|
-
import Variants from
|
|
9
|
-
import MuiButton from
|
|
10
|
-
import { BreakpointsProvider } from
|
|
4
|
+
import useProgression from "cozy-ui/transpiled/react/helpers/useProgression";
|
|
5
|
+
import ProgressionBanner from "cozy-ui/transpiled/react/ProgressionBanner";
|
|
6
|
+
import Icon from "cozy-ui/transpiled/react/Icon";
|
|
7
|
+
import CloudSync from "cozy-ui/transpiled/react/Icons/CloudSync2";
|
|
8
|
+
import Variants from "cozy-ui/docs/components/Variants";
|
|
9
|
+
import MuiButton from "cozy-ui/transpiled/react/Button";
|
|
10
|
+
import { BreakpointsProvider } from "cozy-ui/transpiled/react/providers/Breakpoints";
|
|
11
11
|
|
|
12
|
-
const { progression } = useProgression()
|
|
12
|
+
const { progression } = useProgression();
|
|
13
13
|
|
|
14
14
|
const initialVariants = [
|
|
15
|
-
{ withValue: true, progressBar: true, withButton: false }
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
;
|
|
15
|
+
{ withValue: true, progressBar: true, withButton: false },
|
|
16
|
+
];
|
|
19
17
|
|
|
20
18
|
<BreakpointsProvider>
|
|
21
19
|
<Variants initialVariants={initialVariants}>
|
|
22
|
-
{variant => (
|
|
20
|
+
{(variant) => (
|
|
23
21
|
<ProgressionBanner
|
|
24
22
|
progressBar={variant.progressBar}
|
|
25
23
|
value={variant.withValue && progression}
|
|
26
|
-
text={
|
|
24
|
+
text={
|
|
25
|
+
variant.withButton
|
|
26
|
+
? "Storage limit nearly reached"
|
|
27
|
+
: "4 remaining items"
|
|
28
|
+
}
|
|
27
29
|
icon={<Icon icon={CloudSync} />}
|
|
28
|
-
button={
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
button={
|
|
31
|
+
variant.withButton && (
|
|
32
|
+
<MuiButton color="primary" onClick={() => alert("Clicked!")}>
|
|
33
|
+
Manage your storage space
|
|
34
|
+
</MuiButton>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
31
37
|
/>
|
|
32
38
|
)}
|
|
33
39
|
</Variants>
|
|
34
|
-
</BreakpointsProvider
|
|
40
|
+
</BreakpointsProvider>;
|
|
35
41
|
```
|