cozy-ui 113.7.1 → 113.8.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.
@@ -0,0 +1,15 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/number.svg` to regenerate;
3
+ import React from 'react';
4
+
5
+ function SvgNumber(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ viewBox: "0 0 16 16"
8
+ }, props), /*#__PURE__*/React.createElement("path", {
9
+ fillRule: "evenodd",
10
+ clipRule: "evenodd",
11
+ d: "M4 12V4h-.452l-.117.024-2.73 1.177v1.883l1.323-.54V12H4zm11.245-7.363C14.8 4.21 14.192 4 13.44 4c-.437 0-.84.096-1.204.29a2.155 2.155 0 00-.864.816c-.17.29-.27.61-.298.957l-.021.527h2.08v-.318l.004-.09a.507.507 0 01.11-.28.276.276 0 01.233-.11c.111 0 .184.035.248.116.077.097.12.252.12.472 0 .24-.045.418-.128.54-.05.073-.118.111-.232.123l-.09.005h-.994v1.757h1.021l.08.004c.301.03.434.238.434.742 0 .228-.05.395-.144.512-.08.1-.178.144-.325.144-.108 0-.188-.04-.265-.137a.647.647 0 01-.132-.337l-.023-.431H11v.318l.007.206c.04.607.265 1.116.673 1.513.453.44 1.042.661 1.75.661.751 0 1.374-.22 1.85-.663.48-.446.72-1.04.72-1.762 0-.447-.098-.843-.296-1.182l-.094-.145-.107-.134a1.798 1.798 0 00-.252-.235l-.008-.006.014-.01.128-.133c.082-.092.157-.192.225-.3a2 2 0 00.305-1.07c0-.714-.222-1.296-.67-1.723zm-5.83-.007C8.996 4.208 8.417 4 7.696 4c-.475 0-.907.118-1.289.354a2.37 2.37 0 00-.888.99 2.98 2.98 0 00-.3 1.123L5.2 7.03h2.05v-.322l.004-.157c.015-.25.066-.44.146-.568.077-.122.157-.17.271-.17.096 0 .152.033.204.12.076.127.12.323.12.59 0 .192-.049.397-.148.618-.085.19-.211.41-.378.66L7.331 8 5.33 10.57V12h4.87v-1.815H8.05l.573-.824.185-.226c.417-.519.722-.98.906-1.374.215-.462.323-.923.323-1.38 0-.739-.205-1.328-.623-1.751z"
12
+ }));
13
+ }
14
+
15
+ export default SvgNumber;
@@ -0,0 +1,112 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ var _excluded = ["qualification"];
4
+ import PropTypes from 'prop-types';
5
+ import React from 'react';
6
+ import { getIconByLabel } from 'cozy-client/dist/models/document/qualification';
7
+ import Icon from "cozy-ui/transpiled/react/Icon";
8
+ import IconStack from "cozy-ui/transpiled/react/IconStack";
9
+ import BankIcon from "cozy-ui/transpiled/react/Icons/Bank";
10
+ import BankCheckIcon from "cozy-ui/transpiled/react/Icons/BankCheck";
11
+ import BenefitIcon from "cozy-ui/transpiled/react/Icons/Benefit";
12
+ import BillIcon from "cozy-ui/transpiled/react/Icons/Bill";
13
+ import CarIcon from "cozy-ui/transpiled/react/Icons/Car";
14
+ import ChildIcon from "cozy-ui/transpiled/react/Icons/Child";
15
+ import EmailIcon from "cozy-ui/transpiled/react/Icons/Email";
16
+ import EuroIcon from "cozy-ui/transpiled/react/Icons/Euro";
17
+ import ExchangeIcon from "cozy-ui/transpiled/react/Icons/Exchange";
18
+ import FileDuotoneIcon from "cozy-ui/transpiled/react/Icons/FileDuotone";
19
+ import FileTypeNoteIcon from "cozy-ui/transpiled/react/Icons/FileTypeNote";
20
+ import FitnessIcon from "cozy-ui/transpiled/react/Icons/Fitness";
21
+ import GlobeIcon from "cozy-ui/transpiled/react/Icons/Globe";
22
+ import GouvIcon from "cozy-ui/transpiled/react/Icons/Gouv";
23
+ import HeartIcon from "cozy-ui/transpiled/react/Icons/Heart";
24
+ import HomeIcon from "cozy-ui/transpiled/react/Icons/Home";
25
+ import ImageIcon from "cozy-ui/transpiled/react/Icons/Image";
26
+ import JusticeIcon from "cozy-ui/transpiled/react/Icons/Justice";
27
+ import LaudryIcon from "cozy-ui/transpiled/react/Icons/Laudry";
28
+ import LightningIcon from "cozy-ui/transpiled/react/Icons/Lightning";
29
+ import PeopleIcon from "cozy-ui/transpiled/react/Icons/People";
30
+ import PlaneIcon from "cozy-ui/transpiled/react/Icons/Plane";
31
+ import RemboursementIcon from "cozy-ui/transpiled/react/Icons/Remboursement";
32
+ import RestaurantIcon from "cozy-ui/transpiled/react/Icons/Restaurant";
33
+ import SchoolIcon from "cozy-ui/transpiled/react/Icons/School";
34
+ import ShopIcon from "cozy-ui/transpiled/react/Icons/Shop";
35
+ import TeamIcon from "cozy-ui/transpiled/react/Icons/Team";
36
+ import TelecomIcon from "cozy-ui/transpiled/react/Icons/Telecom";
37
+ import TelephoneIcon from "cozy-ui/transpiled/react/Icons/Telephone";
38
+ import WaterIcon from "cozy-ui/transpiled/react/Icons/Water";
39
+ import WorkIcon from "cozy-ui/transpiled/react/Icons/Work"; // this is a copy of FileDuotone without the flap and with a white background
40
+
41
+ function FileDuotoneWhite(props) {
42
+ return /*#__PURE__*/React.createElement("svg", _extends({
43
+ viewBox: "0 0 26 32"
44
+ }, props), /*#__PURE__*/React.createElement("g", {
45
+ fillRule: "evenodd"
46
+ }, /*#__PURE__*/React.createElement("path", {
47
+ 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",
48
+ fill: "#ffffff"
49
+ })));
50
+ }
51
+
52
+ var qualificationIcon = {
53
+ 'bank-check': BankCheckIcon,
54
+ bank: BankIcon,
55
+ benefit: BenefitIcon,
56
+ bill: BillIcon,
57
+ car: CarIcon,
58
+ child: ChildIcon,
59
+ email: EmailIcon,
60
+ euro: EuroIcon,
61
+ exchange: ExchangeIcon,
62
+ 'file-type-note': FileTypeNoteIcon,
63
+ fitness: FitnessIcon,
64
+ globe: GlobeIcon,
65
+ gouv: GouvIcon,
66
+ heart: HeartIcon,
67
+ home: HomeIcon,
68
+ image: ImageIcon,
69
+ justice: JusticeIcon,
70
+ laudry: LaudryIcon,
71
+ lightning: LightningIcon,
72
+ people: PeopleIcon,
73
+ plane: PlaneIcon,
74
+ remboursement: RemboursementIcon,
75
+ restaurant: RestaurantIcon,
76
+ school: SchoolIcon,
77
+ shop: ShopIcon,
78
+ team: TeamIcon,
79
+ telecom: TelecomIcon,
80
+ telephone: TelephoneIcon,
81
+ water: WaterIcon,
82
+ work: WorkIcon
83
+ };
84
+
85
+ var QualificationIconStack = function QualificationIconStack(_ref) {
86
+ var qualification = _ref.qualification,
87
+ props = _objectWithoutProperties(_ref, _excluded);
88
+
89
+ var QualificationIcon = qualificationIcon[getIconByLabel(qualification)];
90
+ return /*#__PURE__*/React.createElement(IconStack, _extends({}, props, {
91
+ backgroundIcon: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
92
+ className: "u-pos-absolute",
93
+ icon: FileDuotoneWhite,
94
+ size: 32
95
+ }), /*#__PURE__*/React.createElement(Icon, {
96
+ icon: FileDuotoneIcon,
97
+ color: "#E049BF",
98
+ size: 32
99
+ })),
100
+ foregroundIcon: /*#__PURE__*/React.createElement(Icon, {
101
+ icon: QualificationIcon,
102
+ color: "#E049BF",
103
+ size: 16
104
+ })
105
+ }));
106
+ };
107
+
108
+ QualificationIconStack.propTypes = {
109
+ /** The name of the qualification (isp\_invoice, family\_record\_book, etc.) */
110
+ qualification: PropTypes.string.isRequired
111
+ };
112
+ export default QualificationIconStack;