cozy-ui 125.1.0 → 126.1.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 +20 -0
- package/assets/icons/illus/only-office.svg +1 -0
- package/package.json +1 -1
- package/react/Icon/Readme.md +3 -1
- package/react/Icons/OnlyOffice.jsx +71 -0
- package/react/QualificationIcon/Readme.md +14 -0
- package/react/{QualificationIconStack → QualificationIcon}/index.jsx +7 -34
- package/react/QualificationModal/helpers.js +6 -6
- package/react/index.js +1 -1
- package/transpiled/react/Icon/icons-sprite.d.ts +1 -1
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/OnlyOffice.d.ts +2 -0
- package/transpiled/react/Icons/OnlyOffice.js +67 -0
- package/transpiled/react/{QualificationIconStack → QualificationIcon}/index.d.ts +3 -3
- package/transpiled/react/{QualificationIconStack → QualificationIcon}/index.js +14 -38
- package/transpiled/react/QualificationModal/helpers.js +8 -7
- package/transpiled/react/index.d.ts +1 -1
- package/transpiled/react/index.js +1 -1
- package/react/QualificationIconStack/Readme.md +0 -14
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/illus/only-office.svg` to regenerate;
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
function SvgOnlyOffice(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
viewBox: "0 0 16 16",
|
|
8
|
+
fill: "none"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("g", {
|
|
10
|
+
clipPath: "url(#only-office_svg__clip0_6882_51948)",
|
|
11
|
+
fillRule: "evenodd",
|
|
12
|
+
clipRule: "evenodd"
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
d: "M7 15.172l-6.58-3.02c-.56-.264-.56-.672 0-.912l2.291-1.055 4.265 1.966c.56.264 1.463.264 1.999 0l4.265-1.966 2.29 1.055c.561.264.561.671 0 .911l-6.58 3.021c-.511.24-1.413.24-1.95 0z",
|
|
15
|
+
fill: "url(#only-office_svg__paint0_linear_6882_51948)"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
d: "M7 11.456L.42 8.436c-.56-.265-.56-.672 0-.912l2.243-1.03L7 8.483c.56.263 1.462.263 1.998 0l4.338-1.99 2.242 1.03c.561.264.561.671 0 .911L9 11.456c-.56.264-1.462.264-1.998 0z",
|
|
18
|
+
fill: "url(#only-office_svg__paint1_linear_6882_51948)"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M7 7.836L.42 4.815c-.56-.264-.56-.672 0-.911L7 .883c.561-.264 1.463-.264 2 0l6.58 3.02c.56.264.56.672 0 .912L9 7.835c-.561.24-1.463.24-2 0z",
|
|
21
|
+
fill: "url(#only-office_svg__paint2_linear_6882_51948)"
|
|
22
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
23
|
+
id: "only-office_svg__paint0_linear_6882_51948",
|
|
24
|
+
x1: 7.994,
|
|
25
|
+
y1: 18.035,
|
|
26
|
+
x2: 7.994,
|
|
27
|
+
y2: 7.007,
|
|
28
|
+
gradientUnits: "userSpaceOnUse"
|
|
29
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
30
|
+
stopColor: "#FCC2B1"
|
|
31
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
32
|
+
offset: 0.885,
|
|
33
|
+
stopColor: "#D9420B"
|
|
34
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
35
|
+
id: "only-office_svg__paint1_linear_6882_51948",
|
|
36
|
+
x1: 7.994,
|
|
37
|
+
y1: 13.26,
|
|
38
|
+
x2: 7.994,
|
|
39
|
+
y2: 6.007,
|
|
40
|
+
gradientUnits: "userSpaceOnUse"
|
|
41
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
42
|
+
stopColor: "#DEEDC9"
|
|
43
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
44
|
+
offset: 0.661,
|
|
45
|
+
stopColor: "#8BBA25"
|
|
46
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
47
|
+
id: "only-office_svg__paint2_linear_6882_51948",
|
|
48
|
+
x1: 7.994,
|
|
49
|
+
y1: 10.323,
|
|
50
|
+
x2: 7.994,
|
|
51
|
+
y2: 0.453,
|
|
52
|
+
gradientUnits: "userSpaceOnUse"
|
|
53
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
54
|
+
stopColor: "#C2EBFA"
|
|
55
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
56
|
+
offset: 1,
|
|
57
|
+
stopColor: "#26A8DE"
|
|
58
|
+
})), /*#__PURE__*/React.createElement("clipPath", {
|
|
59
|
+
id: "only-office_svg__clip0_6882_51948"
|
|
60
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
61
|
+
fill: "#fff",
|
|
62
|
+
transform: "translate(0 .556)",
|
|
63
|
+
d: "M0 0h16v14.889H0z"
|
|
64
|
+
}))));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export default SvgOnlyOffice;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default
|
|
2
|
-
declare function
|
|
1
|
+
export default QualificationIcon;
|
|
2
|
+
declare function QualificationIcon({ theme, qualification, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
theme: any;
|
|
5
5
|
qualification: any;
|
|
6
6
|
}): JSX.Element;
|
|
7
|
-
declare namespace
|
|
7
|
+
declare namespace QualificationIcon {
|
|
8
8
|
namespace propTypes {
|
|
9
9
|
const qualification: PropTypes.Requireable<string>;
|
|
10
10
|
const theme: PropTypes.Requireable<string>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["theme", "qualification"];
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { getIconByLabel } from 'cozy-client/dist/models/document/qualification';
|
|
7
7
|
import Icon from "cozy-ui/transpiled/react/Icon";
|
|
8
|
-
import IconStack from "cozy-ui/transpiled/react/IconStack";
|
|
9
8
|
import BankIcon from "cozy-ui/transpiled/react/Icons/Bank";
|
|
10
9
|
import BankCheckIcon from "cozy-ui/transpiled/react/Icons/BankCheck";
|
|
11
10
|
import BenefitIcon from "cozy-ui/transpiled/react/Icons/Benefit";
|
|
@@ -17,8 +16,6 @@ import DotsIcon from "cozy-ui/transpiled/react/Icons/Dots";
|
|
|
17
16
|
import EmailIcon from "cozy-ui/transpiled/react/Icons/Email";
|
|
18
17
|
import EuroIcon from "cozy-ui/transpiled/react/Icons/Euro";
|
|
19
18
|
import ExchangeIcon from "cozy-ui/transpiled/react/Icons/Exchange";
|
|
20
|
-
import FileDuotoneIcon from "cozy-ui/transpiled/react/Icons/FileDuotone";
|
|
21
|
-
import FileTypeNoteIcon from "cozy-ui/transpiled/react/Icons/FileTypeNote";
|
|
22
19
|
import FitnessIcon from "cozy-ui/transpiled/react/Icons/Fitness";
|
|
23
20
|
import GlobeIcon from "cozy-ui/transpiled/react/Icons/Globe";
|
|
24
21
|
import GouvIcon from "cozy-ui/transpiled/react/Icons/Gouv";
|
|
@@ -28,6 +25,7 @@ import ImageIcon from "cozy-ui/transpiled/react/Icons/Image";
|
|
|
28
25
|
import JusticeIcon from "cozy-ui/transpiled/react/Icons/Justice";
|
|
29
26
|
import LaudryIcon from "cozy-ui/transpiled/react/Icons/Laudry";
|
|
30
27
|
import LightningIcon from "cozy-ui/transpiled/react/Icons/Lightning";
|
|
28
|
+
import NoteIcon from "cozy-ui/transpiled/react/Icons/Note";
|
|
31
29
|
import PeopleIcon from "cozy-ui/transpiled/react/Icons/People";
|
|
32
30
|
import PlaneIcon from "cozy-ui/transpiled/react/Icons/Plane";
|
|
33
31
|
import RemboursementIcon from "cozy-ui/transpiled/react/Icons/Remboursement";
|
|
@@ -38,19 +36,7 @@ import TeamIcon from "cozy-ui/transpiled/react/Icons/Team";
|
|
|
38
36
|
import TelecomIcon from "cozy-ui/transpiled/react/Icons/Telecom";
|
|
39
37
|
import TelephoneIcon from "cozy-ui/transpiled/react/Icons/Telephone";
|
|
40
38
|
import WaterIcon from "cozy-ui/transpiled/react/Icons/Water";
|
|
41
|
-
import WorkIcon from "cozy-ui/transpiled/react/Icons/Work";
|
|
42
|
-
|
|
43
|
-
function FileDuotoneWhite(props) {
|
|
44
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
45
|
-
viewBox: "0 0 26 32"
|
|
46
|
-
}, props), /*#__PURE__*/React.createElement("g", {
|
|
47
|
-
fillRule: "evenodd"
|
|
48
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
49
|
-
d: "M0 2.002C0 .896.89 0 1.997 0H19l7 7v22.996A2 2 0 0124.003 32H1.997A1.995 1.995 0 010 29.998C.048 16 0 16 0 2.002z",
|
|
50
|
-
fill: "#ffffff"
|
|
51
|
-
})));
|
|
52
|
-
}
|
|
53
|
-
|
|
39
|
+
import WorkIcon from "cozy-ui/transpiled/react/Icons/Work";
|
|
54
40
|
var IconByLabel = {
|
|
55
41
|
'bank-check': BankCheckIcon,
|
|
56
42
|
bank: BankIcon,
|
|
@@ -63,7 +49,7 @@ var IconByLabel = {
|
|
|
63
49
|
email: EmailIcon,
|
|
64
50
|
euro: EuroIcon,
|
|
65
51
|
exchange: ExchangeIcon,
|
|
66
|
-
'file-type-note':
|
|
52
|
+
'file-type-note': NoteIcon,
|
|
67
53
|
fitness: FitnessIcon,
|
|
68
54
|
globe: GlobeIcon,
|
|
69
55
|
gouv: GouvIcon,
|
|
@@ -98,35 +84,25 @@ var themeIconByLabel = {
|
|
|
98
84
|
others: 'dots'
|
|
99
85
|
};
|
|
100
86
|
|
|
101
|
-
var
|
|
87
|
+
var QualificationIcon = function QualificationIcon(_ref) {
|
|
102
88
|
var theme = _ref.theme,
|
|
103
89
|
qualification = _ref.qualification,
|
|
104
90
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
105
91
|
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
icon: FileDuotoneIcon,
|
|
114
|
-
color: "#E049BF",
|
|
115
|
-
size: 32
|
|
116
|
-
})),
|
|
117
|
-
foregroundIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
118
|
-
icon: ForegroundIcon,
|
|
119
|
-
color: "#E049BF",
|
|
120
|
-
size: 16
|
|
121
|
-
})
|
|
122
|
-
}));
|
|
92
|
+
var _Icon = qualification ? IconByLabel[getIconByLabel(qualification)] : theme ? IconByLabel[themeIconByLabel[theme]] : null;
|
|
93
|
+
|
|
94
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
95
|
+
icon: _Icon,
|
|
96
|
+
color: "#E049BF",
|
|
97
|
+
size: 16
|
|
98
|
+
}, props));
|
|
123
99
|
};
|
|
124
100
|
|
|
125
|
-
|
|
101
|
+
QualificationIcon.propTypes = {
|
|
126
102
|
/** The name of the qualification (isp\_invoice, family\_record\_book, etc.) */
|
|
127
103
|
qualification: PropTypes.string,
|
|
128
104
|
|
|
129
105
|
/** The name of the qualification theme (indentity, family, etc.) */
|
|
130
106
|
theme: PropTypes.string
|
|
131
107
|
};
|
|
132
|
-
export default
|
|
108
|
+
export default QualificationIcon;
|
|
@@ -4,20 +4,20 @@ import { themesList } from 'cozy-client/dist/models/document/documentTypeData';
|
|
|
4
4
|
import { isQualificationNote } from 'cozy-client/dist/models/document/documentTypeDataHelpers';
|
|
5
5
|
import { getBoundT } from 'cozy-client/dist/models/document/locales';
|
|
6
6
|
import Icon from "cozy-ui/transpiled/react/Icon";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import NoteIcon from "cozy-ui/transpiled/react/Icons/Note";
|
|
8
|
+
import QualificationIcon from "cozy-ui/transpiled/react/QualificationIcon";
|
|
9
9
|
export var makeOptions = function makeOptions(lang) {
|
|
10
10
|
var qualifT = getBoundT(lang);
|
|
11
11
|
return {
|
|
12
12
|
children: [{
|
|
13
13
|
id: 'none',
|
|
14
14
|
title: qualifT('Scan.themes.none'),
|
|
15
|
-
icon: /*#__PURE__*/React.createElement(
|
|
15
|
+
icon: /*#__PURE__*/React.createElement(QualificationIcon, null)
|
|
16
16
|
}].concat(_toConsumableArray(themesList.map(function (theme) {
|
|
17
17
|
return {
|
|
18
18
|
id: theme.id,
|
|
19
19
|
title: qualifT("Scan.themes.".concat(theme.label)),
|
|
20
|
-
icon: /*#__PURE__*/React.createElement(
|
|
20
|
+
icon: /*#__PURE__*/React.createElement(QualificationIcon, {
|
|
21
21
|
theme: theme.label
|
|
22
22
|
}),
|
|
23
23
|
children: theme.items.map(function (item) {
|
|
@@ -26,9 +26,10 @@ export var makeOptions = function makeOptions(lang) {
|
|
|
26
26
|
item: item,
|
|
27
27
|
title: qualifT("Scan.items.".concat(item.label)),
|
|
28
28
|
icon: isQualificationNote(item) ? /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
-
icon:
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
icon: NoteIcon,
|
|
30
|
+
color: "#E049BF",
|
|
31
|
+
size: 16
|
|
32
|
+
}) : /*#__PURE__*/React.createElement(QualificationIcon, {
|
|
32
33
|
qualification: item.label
|
|
33
34
|
})
|
|
34
35
|
};
|
|
@@ -84,7 +84,7 @@ export { default as Thumbnail } from "./Thumbnail";
|
|
|
84
84
|
export { default as ButtonBase } from "./ButtonBase";
|
|
85
85
|
export { default as QualificationGrid } from "./QualificationGrid";
|
|
86
86
|
export { default as QualificationItem } from "./QualificationItem";
|
|
87
|
-
export { default as
|
|
87
|
+
export { default as QualificationIcon } from "./QualificationIcon";
|
|
88
88
|
export { default as QualificationModal } from "./QualificationModal";
|
|
89
89
|
export { default as Timeline } from "./Timeline";
|
|
90
90
|
export { default as TimelineConnector } from "./TimelineConnector";
|
|
@@ -98,7 +98,7 @@ export { default as Thumbnail } from './Thumbnail';
|
|
|
98
98
|
export { default as ButtonBase } from './ButtonBase';
|
|
99
99
|
export { default as QualificationGrid } from './QualificationGrid';
|
|
100
100
|
export { default as QualificationItem } from './QualificationItem';
|
|
101
|
-
export { default as
|
|
101
|
+
export { default as QualificationIcon } from './QualificationIcon';
|
|
102
102
|
export { default as QualificationModal } from './QualificationModal';
|
|
103
103
|
export { default as Timeline } from './Timeline';
|
|
104
104
|
export { default as TimelineConnector } from './TimelineConnector';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
```jsx
|
|
2
|
-
import QualificationIconStack from 'cozy-ui/transpiled/react/QualificationIconStack'
|
|
3
|
-
|
|
4
|
-
;
|
|
5
|
-
|
|
6
|
-
<>
|
|
7
|
-
<QualificationIconStack className="u-mr-1" />
|
|
8
|
-
<QualificationIconStack className="u-mr-1" qualification="isp_invoice" />
|
|
9
|
-
<QualificationIconStack className="u-mr-1" qualification="phone_invoice" />
|
|
10
|
-
<QualificationIconStack className="u-mr-1" qualification="family_record_book" />
|
|
11
|
-
<QualificationIconStack className="u-mr-1" theme="identity" />
|
|
12
|
-
<QualificationIconStack theme="transport" />
|
|
13
|
-
</>
|
|
14
|
-
```
|