cozy-ui 119.0.3 → 119.2.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/twake/cloud_twake.svg +1 -0
- package/assets/icons/twake/company_twake.svg +1 -1
- package/assets/icons/twake/from-user_twake.svg +1 -1
- package/package.json +1 -1
- package/react/Icons/Cloud.jsx +4 -0
- package/react/Icons/Cloud_twake.jsx +12 -0
- package/react/Icons/Company_twake.jsx +2 -2
- package/react/Icons/FromUser_twake.jsx +2 -5
- package/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.js +54 -0
- package/react/Switch/Readme.md +47 -20
- package/react/Switch/index.jsx +20 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Cloud.js +3 -0
- package/transpiled/react/Icons/Cloud_twake.js +13 -0
- package/transpiled/react/Icons/Company_twake.js +2 -2
- package/transpiled/react/Icons/FromUser_twake.js +3 -3
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkInvertedOverrides.d.ts +54 -0
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkNormalOverrides.d.ts +54 -0
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightInvertedOverrides.d.ts +54 -0
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.d.ts +54 -0
- package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.js +54 -0
- package/transpiled/react/Switch/index.js +25 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
// Automatically created, please run `scripts/generate-svg-icon.sh assets/icons/ui/cloud.svg` to regenerate;
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import SvgCloudTwake from "cozy-ui/transpiled/react/Icons/Cloud_twake";
|
|
5
|
+
import { isTwakeTheme } from "cozy-ui/transpiled/react/helpers/isTwakeTheme";
|
|
4
6
|
|
|
5
7
|
function SvgCloud(props) {
|
|
8
|
+
if (isTwakeTheme()) return SvgCloudTwake(props);
|
|
6
9
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
10
|
viewBox: "0 0 16 16"
|
|
8
11
|
}, props), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/twake/cloud_twake.svg` to regenerate;
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
function SvgCloudTwake(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
viewBox: "0 0 16 11"
|
|
8
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
9
|
+
d: "M8 1.333a3.669 3.669 0 013.593 2.954l.2 1 1.02.073c1.04.067 1.854.94 1.854 1.973 0 1.1-.9 2-2 2H4a2.666 2.666 0 01-2.667-2.666A2.649 2.649 0 013.707 4.02l.713-.073.333-.634A3.646 3.646 0 018 1.333zM8 0a4.997 4.997 0 00-4.433 2.693A3.996 3.996 0 000 6.667c0 2.206 1.793 4 4 4h8.667A3.335 3.335 0 0016 7.333a3.317 3.317 0 00-3.1-3.306A4.993 4.993 0 008 0z"
|
|
10
|
+
}));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default SvgCloudTwake;
|
|
@@ -4,9 +4,9 @@ import React from 'react';
|
|
|
4
4
|
|
|
5
5
|
function SvgCompanyTwake(props) {
|
|
6
6
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
-
viewBox: "0 0
|
|
7
|
+
viewBox: "0 0 16 16"
|
|
8
8
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
9
|
-
d: "
|
|
9
|
+
d: "M12.444 7.111V0H3.556v3.556H0V16h7.111v-3.556H8.89V16H16V7.111h-3.556zm-8.888 7.111H1.778v-1.778h1.778v1.778zm0-3.555H1.778V8.889h1.778v1.778zm0-3.556H1.778V5.333h1.778v1.778zm3.555 3.556H5.333V8.889h1.778v1.778zm0-3.556H5.333V5.333h1.778v1.778zm0-3.555H5.333V1.778h1.778v1.778zm3.556 7.11H8.889V8.89h1.778v1.778zm0-3.555H8.889V5.333h1.778v1.778zm0-3.555H8.889V1.778h1.778v1.778zm3.555 10.666h-1.778v-1.778h1.778v1.778zm0-3.555h-1.778V8.889h1.778v1.778z"
|
|
10
10
|
}));
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -6,9 +6,9 @@ function SvgFromUserTwake(props) {
|
|
|
6
6
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
7
|
viewBox: "0 0 16 16"
|
|
8
8
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
d: "M8
|
|
9
|
+
d: "M8 0C3.584 0 0 3.584 0 8s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8zM4.28 13.2A6.353 6.353 0 018 12c1.392 0 2.672.448 3.72 1.2A6.353 6.353 0 018 14.4a6.353 6.353 0 01-3.72-1.2zm8.632-1.104a7.957 7.957 0 00-9.824 0A6.365 6.365 0 011.6 8c0-3.536 2.864-6.4 6.4-6.4 3.536 0 6.4 2.864 6.4 6.4 0 1.56-.56 2.984-1.488 4.096z"
|
|
10
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M8 3.2A2.803 2.803 0 005.2 6c0 1.544 1.256 2.8 2.8 2.8 1.544 0 2.8-1.256 2.8-2.8 0-1.544-1.256-2.8-2.8-2.8zm0 4c-.664 0-1.2-.536-1.2-1.2 0-.664.536-1.2 1.2-1.2.664 0 1.2.536 1.2 1.2 0 .664-.536 1.2-1.2 1.2z"
|
|
12
12
|
}));
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -1417,6 +1417,60 @@ export function makeDarkInvertedTwakeOverrides(theme: any): {
|
|
|
1417
1417
|
padding: number;
|
|
1418
1418
|
};
|
|
1419
1419
|
};
|
|
1420
|
+
MuiSwitch: {
|
|
1421
|
+
root: {
|
|
1422
|
+
width: number;
|
|
1423
|
+
height: number;
|
|
1424
|
+
padding: string;
|
|
1425
|
+
};
|
|
1426
|
+
switchBase: {
|
|
1427
|
+
padding: number;
|
|
1428
|
+
top: number;
|
|
1429
|
+
color: any;
|
|
1430
|
+
'& .cozySwitchThumb': {
|
|
1431
|
+
display: string;
|
|
1432
|
+
alignItems: string;
|
|
1433
|
+
justifyContent: string;
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
borderRadius: string;
|
|
1437
|
+
boxShadow: any;
|
|
1438
|
+
backgroundColor: any;
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
track: {
|
|
1442
|
+
width: number;
|
|
1443
|
+
height: string;
|
|
1444
|
+
borderRadius: number;
|
|
1445
|
+
};
|
|
1446
|
+
thumb: {
|
|
1447
|
+
width: number;
|
|
1448
|
+
height: number;
|
|
1449
|
+
};
|
|
1450
|
+
colorPrimary: {
|
|
1451
|
+
'&$disabled + $track': {
|
|
1452
|
+
opacity: number;
|
|
1453
|
+
backgroundColor: any;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
colorSecondary: {
|
|
1457
|
+
'&$checked': {
|
|
1458
|
+
color: any;
|
|
1459
|
+
};
|
|
1460
|
+
'&$disabled + $track': {
|
|
1461
|
+
opacity: number;
|
|
1462
|
+
backgroundColor: any;
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
disabled: {
|
|
1466
|
+
'&$checked + $track': {
|
|
1467
|
+
backgroundColor: any;
|
|
1468
|
+
};
|
|
1469
|
+
'& .cozySwitchThumb': {
|
|
1470
|
+
backgroundColor: any;
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1420
1474
|
MuiButton: {
|
|
1421
1475
|
root: {
|
|
1422
1476
|
borderRadius: number;
|
|
@@ -1417,6 +1417,60 @@ export function makeDarkNormalTwakeOverrides(theme: any): {
|
|
|
1417
1417
|
padding: number;
|
|
1418
1418
|
};
|
|
1419
1419
|
};
|
|
1420
|
+
MuiSwitch: {
|
|
1421
|
+
root: {
|
|
1422
|
+
width: number;
|
|
1423
|
+
height: number;
|
|
1424
|
+
padding: string;
|
|
1425
|
+
};
|
|
1426
|
+
switchBase: {
|
|
1427
|
+
padding: number;
|
|
1428
|
+
top: number;
|
|
1429
|
+
color: any;
|
|
1430
|
+
'& .cozySwitchThumb': {
|
|
1431
|
+
display: string;
|
|
1432
|
+
alignItems: string;
|
|
1433
|
+
justifyContent: string;
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
borderRadius: string;
|
|
1437
|
+
boxShadow: any;
|
|
1438
|
+
backgroundColor: any;
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
track: {
|
|
1442
|
+
width: number;
|
|
1443
|
+
height: string;
|
|
1444
|
+
borderRadius: number;
|
|
1445
|
+
};
|
|
1446
|
+
thumb: {
|
|
1447
|
+
width: number;
|
|
1448
|
+
height: number;
|
|
1449
|
+
};
|
|
1450
|
+
colorPrimary: {
|
|
1451
|
+
'&$disabled + $track': {
|
|
1452
|
+
opacity: number;
|
|
1453
|
+
backgroundColor: any;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
colorSecondary: {
|
|
1457
|
+
'&$checked': {
|
|
1458
|
+
color: any;
|
|
1459
|
+
};
|
|
1460
|
+
'&$disabled + $track': {
|
|
1461
|
+
opacity: number;
|
|
1462
|
+
backgroundColor: any;
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
disabled: {
|
|
1466
|
+
'&$checked + $track': {
|
|
1467
|
+
backgroundColor: any;
|
|
1468
|
+
};
|
|
1469
|
+
'& .cozySwitchThumb': {
|
|
1470
|
+
backgroundColor: any;
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1420
1474
|
MuiButton: {
|
|
1421
1475
|
root: {
|
|
1422
1476
|
borderRadius: number;
|
|
@@ -1417,6 +1417,60 @@ export function makeLightInvertedTwakeOverrides(theme: any): {
|
|
|
1417
1417
|
padding: number;
|
|
1418
1418
|
};
|
|
1419
1419
|
};
|
|
1420
|
+
MuiSwitch: {
|
|
1421
|
+
root: {
|
|
1422
|
+
width: number;
|
|
1423
|
+
height: number;
|
|
1424
|
+
padding: string;
|
|
1425
|
+
};
|
|
1426
|
+
switchBase: {
|
|
1427
|
+
padding: number;
|
|
1428
|
+
top: number;
|
|
1429
|
+
color: any;
|
|
1430
|
+
'& .cozySwitchThumb': {
|
|
1431
|
+
display: string;
|
|
1432
|
+
alignItems: string;
|
|
1433
|
+
justifyContent: string;
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
borderRadius: string;
|
|
1437
|
+
boxShadow: any;
|
|
1438
|
+
backgroundColor: any;
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
track: {
|
|
1442
|
+
width: number;
|
|
1443
|
+
height: string;
|
|
1444
|
+
borderRadius: number;
|
|
1445
|
+
};
|
|
1446
|
+
thumb: {
|
|
1447
|
+
width: number;
|
|
1448
|
+
height: number;
|
|
1449
|
+
};
|
|
1450
|
+
colorPrimary: {
|
|
1451
|
+
'&$disabled + $track': {
|
|
1452
|
+
opacity: number;
|
|
1453
|
+
backgroundColor: any;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
colorSecondary: {
|
|
1457
|
+
'&$checked': {
|
|
1458
|
+
color: any;
|
|
1459
|
+
};
|
|
1460
|
+
'&$disabled + $track': {
|
|
1461
|
+
opacity: number;
|
|
1462
|
+
backgroundColor: any;
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
disabled: {
|
|
1466
|
+
'&$checked + $track': {
|
|
1467
|
+
backgroundColor: any;
|
|
1468
|
+
};
|
|
1469
|
+
'& .cozySwitchThumb': {
|
|
1470
|
+
backgroundColor: any;
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1420
1474
|
MuiButton: {
|
|
1421
1475
|
root: {
|
|
1422
1476
|
borderRadius: number;
|
|
@@ -1417,6 +1417,60 @@ export function makeLightNormalTwakeOverrides(theme: any): {
|
|
|
1417
1417
|
padding: number;
|
|
1418
1418
|
};
|
|
1419
1419
|
};
|
|
1420
|
+
MuiSwitch: {
|
|
1421
|
+
root: {
|
|
1422
|
+
width: number;
|
|
1423
|
+
height: number;
|
|
1424
|
+
padding: string;
|
|
1425
|
+
};
|
|
1426
|
+
switchBase: {
|
|
1427
|
+
padding: number;
|
|
1428
|
+
top: number;
|
|
1429
|
+
color: any;
|
|
1430
|
+
'& .cozySwitchThumb': {
|
|
1431
|
+
display: string;
|
|
1432
|
+
alignItems: string;
|
|
1433
|
+
justifyContent: string;
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
borderRadius: string;
|
|
1437
|
+
boxShadow: any;
|
|
1438
|
+
backgroundColor: any;
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
track: {
|
|
1442
|
+
width: number;
|
|
1443
|
+
height: string;
|
|
1444
|
+
borderRadius: number;
|
|
1445
|
+
};
|
|
1446
|
+
thumb: {
|
|
1447
|
+
width: number;
|
|
1448
|
+
height: number;
|
|
1449
|
+
};
|
|
1450
|
+
colorPrimary: {
|
|
1451
|
+
'&$disabled + $track': {
|
|
1452
|
+
opacity: number;
|
|
1453
|
+
backgroundColor: any;
|
|
1454
|
+
};
|
|
1455
|
+
};
|
|
1456
|
+
colorSecondary: {
|
|
1457
|
+
'&$checked': {
|
|
1458
|
+
color: any;
|
|
1459
|
+
};
|
|
1460
|
+
'&$disabled + $track': {
|
|
1461
|
+
opacity: number;
|
|
1462
|
+
backgroundColor: any;
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
disabled: {
|
|
1466
|
+
'&$checked + $track': {
|
|
1467
|
+
backgroundColor: any;
|
|
1468
|
+
};
|
|
1469
|
+
'& .cozySwitchThumb': {
|
|
1470
|
+
backgroundColor: any;
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1420
1474
|
MuiButton: {
|
|
1421
1475
|
root: {
|
|
1422
1476
|
borderRadius: number;
|
|
@@ -9,6 +9,60 @@ export var makeLightNormalTwakeOverrides = function makeLightNormalTwakeOverride
|
|
|
9
9
|
padding: 8
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
+
MuiSwitch: {
|
|
13
|
+
root: {
|
|
14
|
+
width: 50,
|
|
15
|
+
height: 40,
|
|
16
|
+
padding: '6px 1px'
|
|
17
|
+
},
|
|
18
|
+
switchBase: {
|
|
19
|
+
padding: 5,
|
|
20
|
+
top: 5,
|
|
21
|
+
color: theme.palette.text.icon,
|
|
22
|
+
'& .cozySwitchThumb': {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
width: 20,
|
|
27
|
+
height: 20,
|
|
28
|
+
borderRadius: '50%',
|
|
29
|
+
boxShadow: theme.shadows[1],
|
|
30
|
+
backgroundColor: theme.palette.common.white
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
track: {
|
|
34
|
+
width: 44,
|
|
35
|
+
height: '100%',
|
|
36
|
+
borderRadius: 100
|
|
37
|
+
},
|
|
38
|
+
thumb: {
|
|
39
|
+
width: 20,
|
|
40
|
+
height: 20
|
|
41
|
+
},
|
|
42
|
+
colorPrimary: {
|
|
43
|
+
'&$disabled + $track': {
|
|
44
|
+
opacity: 1,
|
|
45
|
+
backgroundColor: theme.palette.action.disabledBackground
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
colorSecondary: {
|
|
49
|
+
'&$checked': {
|
|
50
|
+
color: theme.palette.success.main
|
|
51
|
+
},
|
|
52
|
+
'&$disabled + $track': {
|
|
53
|
+
opacity: 1,
|
|
54
|
+
backgroundColor: theme.palette.action.disabledBackground
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
'&$checked + $track': {
|
|
59
|
+
backgroundColor: theme.palette.action.disabledBackground
|
|
60
|
+
},
|
|
61
|
+
'& .cozySwitchThumb': {
|
|
62
|
+
backgroundColor: theme.palette.background.default
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
12
66
|
MuiButton: {
|
|
13
67
|
root: {
|
|
14
68
|
borderRadius: 100,
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["icon"];
|
|
4
|
+
import MuiSwitch from '@material-ui/core/Switch';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import Icon from "cozy-ui/transpiled/react/Icon";
|
|
7
|
+
import { isTwakeTheme } from "cozy-ui/transpiled/react/helpers/isTwakeTheme";
|
|
8
|
+
|
|
9
|
+
var Switch = function Switch(_ref) {
|
|
10
|
+
var icon = _ref.icon,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
|
|
13
|
+
var _icon = /*#__PURE__*/React.createElement("span", {
|
|
14
|
+
className: "cozySwitchThumb"
|
|
15
|
+
}, !!icon && /*#__PURE__*/React.createElement(Icon, {
|
|
16
|
+
icon: icon,
|
|
17
|
+
size: 14
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
return /*#__PURE__*/React.createElement(MuiSwitch, _extends({}, props, isTwakeTheme() && {
|
|
21
|
+
icon: _icon,
|
|
22
|
+
checkedIcon: _icon
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
2
26
|
export default Switch;
|