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.
- package/.nvmrc +1 -1
- package/CHANGELOG.md +8 -0
- package/assets/icons/ui/number.svg +1 -0
- package/package.json +2 -2
- package/react/Icon/Readme.md +5 -1
- package/react/Icons/Number.jsx +16 -0
- package/react/QualificationIconStack/Readme.md +11 -0
- package/react/QualificationIconStack/index.jsx +111 -0
- package/transpiled/react/Icon/icons-sprite.js +1 -1
- package/transpiled/react/Icons/Number.js +15 -0
- package/transpiled/react/QualificationIconStack/index.js +112 -0
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
20
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [113.8.0](https://github.com/cozy/cozy-ui/compare/v113.7.1...v113.8.0) (2024-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Add QualificationIconStack component ([21b48f3](https://github.com/cozy/cozy-ui/commit/21b48f3))
|
|
7
|
+
* **Icon:** Add number ([5fd2bd7](https://github.com/cozy/cozy-ui/commit/5fd2bd7))
|
|
8
|
+
|
|
1
9
|
## [113.7.1](https://github.com/cozy/cozy-ui/compare/v113.7.0...v113.7.1) (2024-11-28)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" 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 0 0-.864.816c-.17.29-.27.61-.298.957l-.021.527h2.08v-.318l.004-.09a.507.507 0 0 1 .11-.28.276.276 0 0 1 .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 0 1-.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 0 0-.252-.235l-.008-.006.014-.01.128-.133c.082-.092.157-.192.225-.3.203-.328.305-.686.305-1.07 0-.714-.222-1.296-.67-1.723ZM9.415 4.63C8.996 4.208 8.417 4 7.696 4c-.475 0-.907.118-1.289.354-.382.236-.68.568-.888.99a2.98 2.98 0 0 0-.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"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "113.
|
|
3
|
+
"version": "113.8.0",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"travis-deploy-once": "travis-deploy-once",
|
|
56
56
|
"start:css": "yarn build:css --watch",
|
|
57
57
|
"prestart:doc": "yarn sprite",
|
|
58
|
-
"start:doc": "env BUILD_ENV=watch-styleguidist styleguidist server --config docs/styleguide.config.js",
|
|
58
|
+
"start:doc": "NODE_OPTIONS=--openssl-legacy-provider env BUILD_ENV=watch-styleguidist styleguidist server --config docs/styleguide.config.js",
|
|
59
59
|
"start:doc:kss": "nodemon --ext styl,md --watch stylus --exec 'yarn build:doc:kss && http-server build/styleguide -p 4242'",
|
|
60
60
|
"start": "yarn build --watch",
|
|
61
61
|
"removeEmptyCss": "node scripts/removeEmptyCss.js",
|
package/react/Icon/Readme.md
CHANGED
|
@@ -233,6 +233,7 @@ import New from 'cozy-ui/transpiled/react/Icons/New'
|
|
|
233
233
|
import Next from 'cozy-ui/transpiled/react/Icons/Next'
|
|
234
234
|
import Note from 'cozy-ui/transpiled/react/Icons/Note'
|
|
235
235
|
import NotificationEmail from 'cozy-ui/transpiled/react/Icons/NotificationEmail'
|
|
236
|
+
import Number from 'cozy-ui/transpiled/react/Icons/Number'
|
|
236
237
|
import Offline from 'cozy-ui/transpiled/react/Icons/Offline'
|
|
237
238
|
import Online from 'cozy-ui/transpiled/react/Icons/Online'
|
|
238
239
|
import Openapp from 'cozy-ui/transpiled/react/Icons/Openapp'
|
|
@@ -501,6 +502,7 @@ const icons = [
|
|
|
501
502
|
Next,
|
|
502
503
|
Note,
|
|
503
504
|
NotificationEmail,
|
|
505
|
+
Number,
|
|
504
506
|
Offline,
|
|
505
507
|
Online,
|
|
506
508
|
Openapp,
|
|
@@ -692,6 +694,7 @@ import FileTypeCodeIcon from 'cozy-ui/transpiled/react/Icons/FileTypeCode'
|
|
|
692
694
|
import FileTypeFilesIcon from 'cozy-ui/transpiled/react/Icons/FileTypeFiles'
|
|
693
695
|
import FileTypeFolderIcon from 'cozy-ui/transpiled/react/Icons/FileTypeFolder'
|
|
694
696
|
import FileTypeImageIcon from 'cozy-ui/transpiled/react/Icons/FileTypeImage'
|
|
697
|
+
import FileTypeNoteIcon from 'cozy-ui/transpiled/react/Icons/FileTypeNote'
|
|
695
698
|
import FileTypePdfIcon from 'cozy-ui/transpiled/react/Icons/FileTypePdf'
|
|
696
699
|
import FileTypeSheetIcon from 'cozy-ui/transpiled/react/Icons/FileTypeSheet'
|
|
697
700
|
import FileTypeSlideIcon from 'cozy-ui/transpiled/react/Icons/FileTypeSlide'
|
|
@@ -731,6 +734,7 @@ const icons = [
|
|
|
731
734
|
FileTypeFilesIcon,
|
|
732
735
|
FileTypeFolderIcon,
|
|
733
736
|
FileTypeImageIcon,
|
|
737
|
+
FileTypeNoteIcon,
|
|
734
738
|
FileTypePdfIcon,
|
|
735
739
|
FileTypeSheetIcon,
|
|
736
740
|
FileTypeSlideIcon,
|
|
@@ -935,7 +939,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
|
935
939
|
|
|
936
940
|
const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
|
|
937
941
|
let i = 0
|
|
938
|
-
const availableIcons = ['album-add','album-remove','album','answer','apple','archive','arrowUp','attachment','attention','bank-check','bank','banking-add','banking','bell','benefit','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','carpooling','categories','certified','check-circle','check-list','check-square','check','checkbox','chess','child','circle-filled','clock','clock-outline','cloud-happy','cloud-plus-outlined','cloud','collect','cocktail','comment','company','compare','compass','connector','contract','contrast','copy','cozy-circle','cozy-laugh', 'cozy-lock', 'cozy-text', 'cozy-release', 'credit-card-add','credit-card','credit','crop','cross-circle-outline','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','debit','devices','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','electric-bike','electric-car','electric-scooter','email-notification','email','eu','euro','exchange','eye-closed','eye','face-id','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder-moveto','folder-open','folder','forbidden','from-user','gear','globe','gouv','graph-circle','grid','group-list','groups','growth','hand','heart','help','help-outlined','history','home','hourglass','image','info-outlined','info','justice','key','label-outlined','laudry','laptop','left','library','lightbulb','lightning','link-out','link','list','list-min','location','lock', 'lock-screen', 'logout','magic-trick','magnet','magnifier','merge','moped','mosaic-min','motorcycle','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','offline','online', 'openapp', 'openwith','palette','paper','paperplane','password','pen','people','percent-circle','percent','personal-data','phone-download','phone-upload','phone','pie-chart','pin','plane','plus-small','plus', 'pop-inside', 'previous','printer','qualify','radio-checked','radio-unchecked','refresh','relationship','remboursement','rename','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','scooter','select-all','server','setting','share-circle','share','shield','shop','sound','spinner','sport-bag','stack','star','star-outline','stats','stop', 'subway', 'support', 'swap', 'sync-cozy','sync','tab','tag','target','task','team','telecom','telephone','text','text-info','to-the-cloud','top','train','tram','trash','trophy', 'uncloud', 'unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','water','wrench-circle','work']
|
|
942
|
+
const availableIcons = ['album-add','album-remove','album','answer','apple','archive','arrowUp','attachment','attention','bank-check','bank','banking-add','banking','bell','benefit','bike','bill','bottom','browser-brave','browser-chrome','browser-duckduckgo','browser-edge','browser-edge-chromium','browser-firefox','browser-ie','browser-opera','browser-safari','burger','bus','calendar','camera','car','carbonCopy','carpooling','categories','certified','check-circle','check-list','check-square','check','checkbox','chess','child','circle-filled','clock','clock-outline','cloud-happy','cloud-plus-outlined','cloud','collect','cocktail','comment','company','compare','compass','connector','contract','contrast','copy','cozy-circle','cozy-laugh', 'cozy-lock', 'cozy-text', 'cozy-release', 'credit-card-add','credit-card','credit','crop','cross-circle-outline','cross-circle','cross-medium','cross-small','cross','cube','dash','dashboard','data-control','debit','devices','dots','down','download','drawing-arrow-up','dropdown-close','dropdown-open','dropdown','dropup','electric-bike','electric-car','electric-scooter','email-notification','email','eu','euro','exchange','eye-closed','eye','face-id','file-add','file-duotone','file-new','file-none','file-outline','file','filter','fingerprint','fitness','flag-outlined','flag','flash-auto','flashlight','folder-add','folder-moveto','folder-open','folder','forbidden','from-user','gear','globe','gouv','graph-circle','grid','group-list','groups','growth','hand','heart','help','help-outlined','history','home','hourglass','image','info-outlined','info','justice','key','label-outlined','laudry','laptop','left','library','lightbulb','lightning','link-out','link','list','list-min','location','lock', 'lock-screen', 'logout','magic-trick','magnet','magnifier','merge','moped','mosaic-min','motorcycle','mountain','movement-in','movement-out','mouvement','moveto','multi-files','music','new','next','note','notification-email','number','offline','online', 'openapp', 'openwith','palette','paper','paperplane','password','pen','people','percent-circle','percent','personal-data','phone-download','phone-upload','phone','pie-chart','pin','plane','plus-small','plus', 'pop-inside', 'previous','printer','qualify','radio-checked','radio-unchecked','refresh','relationship','remboursement','rename','repare','reply','restaurant','restore-straight','restore','right','rise','rotate-left','rotate-right','sad-cozy','safe','school','scooter','select-all','server','setting','share-circle','share','shield','shop','sound','spinner','sport-bag','stack','star','star-outline','stats','stop', 'subway', 'support', 'swap', 'sync-cozy','sync','tab','tag','target','task','team','telecom','telephone','text','text-info','to-the-cloud','top','train','tram','trash','trophy', 'uncloud', 'unknow','unlink','unlock','up','upload','videos','walk','wallet-add','wallet-new','wallet','warn','warning-circle','warning','water','wrench-circle','work']
|
|
939
943
|
;
|
|
940
944
|
<div style={{ fontSize: '2rem', display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)' }}>
|
|
941
945
|
<Sprite />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/number.svg` to regenerate;
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
function SvgNumber(props) {
|
|
5
|
+
return (
|
|
6
|
+
<svg viewBox="0 0 16 16" {...props}>
|
|
7
|
+
<path
|
|
8
|
+
fillRule="evenodd"
|
|
9
|
+
clipRule="evenodd"
|
|
10
|
+
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"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default SvgNumber
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
```jsx
|
|
2
|
+
import QualificationIconStack from 'cozy-ui/transpiled/react/QualificationIconStack'
|
|
3
|
+
|
|
4
|
+
;
|
|
5
|
+
|
|
6
|
+
<>
|
|
7
|
+
<QualificationIconStack className="u-mr-1" qualification="isp_invoice" />
|
|
8
|
+
<QualificationIconStack className="u-mr-1" qualification="phone_invoice" />
|
|
9
|
+
<QualificationIconStack qualification="family_record_book" />
|
|
10
|
+
</>
|
|
11
|
+
```
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import PropTypes from 'prop-types'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
import { getIconByLabel } from 'cozy-client/dist/models/document/qualification'
|
|
5
|
+
|
|
6
|
+
import Icon from '../Icon'
|
|
7
|
+
import IconStack from '../IconStack'
|
|
8
|
+
import BankIcon from '../Icons/Bank'
|
|
9
|
+
import BankCheckIcon from '../Icons/BankCheck'
|
|
10
|
+
import BenefitIcon from '../Icons/Benefit'
|
|
11
|
+
import BillIcon from '../Icons/Bill'
|
|
12
|
+
import CarIcon from '../Icons/Car'
|
|
13
|
+
import ChildIcon from '../Icons/Child'
|
|
14
|
+
import EmailIcon from '../Icons/Email'
|
|
15
|
+
import EuroIcon from '../Icons/Euro'
|
|
16
|
+
import ExchangeIcon from '../Icons/Exchange'
|
|
17
|
+
import FileDuotoneIcon from '../Icons/FileDuotone'
|
|
18
|
+
import FileTypeNoteIcon from '../Icons/FileTypeNote'
|
|
19
|
+
import FitnessIcon from '../Icons/Fitness'
|
|
20
|
+
import GlobeIcon from '../Icons/Globe'
|
|
21
|
+
import GouvIcon from '../Icons/Gouv'
|
|
22
|
+
import HeartIcon from '../Icons/Heart'
|
|
23
|
+
import HomeIcon from '../Icons/Home'
|
|
24
|
+
import ImageIcon from '../Icons/Image'
|
|
25
|
+
import JusticeIcon from '../Icons/Justice'
|
|
26
|
+
import LaudryIcon from '../Icons/Laudry'
|
|
27
|
+
import LightningIcon from '../Icons/Lightning'
|
|
28
|
+
import PeopleIcon from '../Icons/People'
|
|
29
|
+
import PlaneIcon from '../Icons/Plane'
|
|
30
|
+
import RemboursementIcon from '../Icons/Remboursement'
|
|
31
|
+
import RestaurantIcon from '../Icons/Restaurant'
|
|
32
|
+
import SchoolIcon from '../Icons/School'
|
|
33
|
+
import ShopIcon from '../Icons/Shop'
|
|
34
|
+
import TeamIcon from '../Icons/Team'
|
|
35
|
+
import TelecomIcon from '../Icons/Telecom'
|
|
36
|
+
import TelephoneIcon from '../Icons/Telephone'
|
|
37
|
+
import WaterIcon from '../Icons/Water'
|
|
38
|
+
import WorkIcon from '../Icons/Work'
|
|
39
|
+
|
|
40
|
+
// this is a copy of FileDuotone without the flap and with a white background
|
|
41
|
+
function FileDuotoneWhite(props) {
|
|
42
|
+
return (
|
|
43
|
+
<svg viewBox="0 0 26 32" {...props}>
|
|
44
|
+
<g fillRule="evenodd">
|
|
45
|
+
<path
|
|
46
|
+
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"
|
|
47
|
+
fill="#ffffff"
|
|
48
|
+
/>
|
|
49
|
+
</g>
|
|
50
|
+
</svg>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const qualificationIcon = {
|
|
55
|
+
'bank-check': BankCheckIcon,
|
|
56
|
+
bank: BankIcon,
|
|
57
|
+
benefit: BenefitIcon,
|
|
58
|
+
bill: BillIcon,
|
|
59
|
+
car: CarIcon,
|
|
60
|
+
child: ChildIcon,
|
|
61
|
+
email: EmailIcon,
|
|
62
|
+
euro: EuroIcon,
|
|
63
|
+
exchange: ExchangeIcon,
|
|
64
|
+
'file-type-note': FileTypeNoteIcon,
|
|
65
|
+
fitness: FitnessIcon,
|
|
66
|
+
globe: GlobeIcon,
|
|
67
|
+
gouv: GouvIcon,
|
|
68
|
+
heart: HeartIcon,
|
|
69
|
+
home: HomeIcon,
|
|
70
|
+
image: ImageIcon,
|
|
71
|
+
justice: JusticeIcon,
|
|
72
|
+
laudry: LaudryIcon,
|
|
73
|
+
lightning: LightningIcon,
|
|
74
|
+
people: PeopleIcon,
|
|
75
|
+
plane: PlaneIcon,
|
|
76
|
+
remboursement: RemboursementIcon,
|
|
77
|
+
restaurant: RestaurantIcon,
|
|
78
|
+
school: SchoolIcon,
|
|
79
|
+
shop: ShopIcon,
|
|
80
|
+
team: TeamIcon,
|
|
81
|
+
telecom: TelecomIcon,
|
|
82
|
+
telephone: TelephoneIcon,
|
|
83
|
+
water: WaterIcon,
|
|
84
|
+
work: WorkIcon
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const QualificationIconStack = ({ qualification, ...props }) => {
|
|
88
|
+
const QualificationIcon = qualificationIcon[getIconByLabel(qualification)]
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<IconStack
|
|
92
|
+
{...props}
|
|
93
|
+
backgroundIcon={
|
|
94
|
+
<>
|
|
95
|
+
<Icon className="u-pos-absolute" icon={FileDuotoneWhite} size={32} />
|
|
96
|
+
<Icon icon={FileDuotoneIcon} color="#E049BF" size={32} />
|
|
97
|
+
</>
|
|
98
|
+
}
|
|
99
|
+
foregroundIcon={
|
|
100
|
+
<Icon icon={QualificationIcon} color="#E049BF" size={16} />
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
QualificationIconStack.propTypes = {
|
|
107
|
+
/** The name of the qualification (isp\_invoice, family\_record\_book, etc.) */
|
|
108
|
+
qualification: PropTypes.string.isRequired
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export default QualificationIconStack
|