cozy-ui 122.14.0 → 122.14.1
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 +7 -0
- package/package.json +2 -2
- package/react/Icon/Readme.md +141 -94
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [122.14.1](https://github.com/cozy/cozy-ui/compare/v122.14.0...v122.14.1) (2025-05-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Allow cozy-device-helper >= 2.0.0 ([958b2e0](https://github.com/cozy/cozy-ui/commit/958b2e0))
|
|
7
|
+
|
|
1
8
|
# [122.14.0](https://github.com/cozy/cozy-ui/compare/v122.13.0...v122.14.0) (2025-05-13)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "122.14.
|
|
3
|
+
"version": "122.14.1",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
},
|
|
184
184
|
"peerDependencies": {
|
|
185
185
|
"cozy-client": ">=52.1.0",
|
|
186
|
-
"cozy-device-helper": "
|
|
186
|
+
"cozy-device-helper": ">=2.0.0",
|
|
187
187
|
"cozy-flags": ">=2.10.1",
|
|
188
188
|
"cozy-intent": ">=2.29.1",
|
|
189
189
|
"react": "^16.8.6",
|
package/react/Icon/Readme.md
CHANGED
|
@@ -57,6 +57,7 @@ import Album from 'cozy-ui/transpiled/react/Icons/Album'
|
|
|
57
57
|
|
|
58
58
|
```jsx
|
|
59
59
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
60
|
+
import Grid from 'cozy-ui/transpiled/react/Grid/index.js'
|
|
60
61
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
61
62
|
import Dialog from 'cozy-ui/transpiled/react/CozyDialogs/Dialog'
|
|
62
63
|
import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
|
|
@@ -188,7 +189,7 @@ import Gear from 'cozy-ui/transpiled/react/Icons/Gear'
|
|
|
188
189
|
import Globe from 'cozy-ui/transpiled/react/Icons/Globe'
|
|
189
190
|
import Gouv from 'cozy-ui/transpiled/react/Icons/Gouv'
|
|
190
191
|
import GraphCircle from 'cozy-ui/transpiled/react/Icons/GraphCircle'
|
|
191
|
-
import
|
|
192
|
+
import GridIcon from 'cozy-ui/transpiled/react/Icons/Grid'
|
|
192
193
|
import GroupList from 'cozy-ui/transpiled/react/Icons/GroupList'
|
|
193
194
|
import Groups from 'cozy-ui/transpiled/react/Icons/Groups'
|
|
194
195
|
import Growth from 'cozy-ui/transpiled/react/Icons/Growth'
|
|
@@ -463,7 +464,7 @@ const icons = [
|
|
|
463
464
|
Globe,
|
|
464
465
|
Gouv,
|
|
465
466
|
GraphCircle,
|
|
466
|
-
|
|
467
|
+
GridIcon,
|
|
467
468
|
GroupList,
|
|
468
469
|
Groups,
|
|
469
470
|
Growth,
|
|
@@ -613,13 +614,7 @@ const icons = [
|
|
|
613
614
|
Work
|
|
614
615
|
]
|
|
615
616
|
const locale = {}
|
|
616
|
-
|
|
617
|
-
fontSize: '2rem',
|
|
618
|
-
display: 'grid',
|
|
619
|
-
gridTemplateColumns: 'repeat(6, 1fr)'
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
initialState = { size: 16 };
|
|
617
|
+
initialState = { size: 16 }
|
|
623
618
|
|
|
624
619
|
const handleInputRangeChange = ev => {
|
|
625
620
|
setState({ size: parseInt(ev.target.value, 10) })
|
|
@@ -647,34 +642,34 @@ const InfoModal = ({ icon }) => {
|
|
|
647
642
|
/>
|
|
648
643
|
}
|
|
649
644
|
|
|
650
|
-
const Example = () => {
|
|
651
|
-
return (
|
|
652
|
-
<DemoProvider>
|
|
653
|
-
<Typography component='p' variant='body1' className='u-mb-1'>
|
|
654
|
-
Font size: <input type='range' min='8' max='48' value={state.size} onChange={handleInputRangeChange} /> {state.size}px
|
|
655
|
-
</Typography>
|
|
656
|
-
<div style={wrapperStyle}>
|
|
657
|
-
{
|
|
658
|
-
icons.map(icon => <div
|
|
659
|
-
key={icon}
|
|
660
|
-
className="u-c-pointer u-ta-center u-mb-1"
|
|
661
|
-
onClick={() => setState({ selected: icon })}
|
|
662
|
-
>
|
|
663
|
-
<Icon icon={ icon } size={state.size} />
|
|
664
|
-
<Typography variant='body1' className='u-mt-half'>
|
|
665
|
-
{ getNameFromIcon(icon) }
|
|
666
|
-
</Typography>
|
|
667
|
-
</div>
|
|
668
|
-
)}
|
|
669
|
-
{ state.selected ? <InfoModal icon={state.selected} /> : null }
|
|
670
|
-
</div>
|
|
671
|
-
</DemoProvider>
|
|
672
|
-
)
|
|
673
|
-
}
|
|
674
|
-
|
|
675
645
|
;
|
|
676
646
|
|
|
677
|
-
<
|
|
647
|
+
<DemoProvider>
|
|
648
|
+
<Typography component='p' variant='body1' className='u-mb-1'>
|
|
649
|
+
Font size: <input type='range' min='8' max='48' value={state.size} onChange={handleInputRangeChange} /> {state.size}px
|
|
650
|
+
</Typography>
|
|
651
|
+
|
|
652
|
+
<Grid container spacing={2}>
|
|
653
|
+
{icons.map(icon =>
|
|
654
|
+
<Grid
|
|
655
|
+
key={icon}
|
|
656
|
+
item
|
|
657
|
+
className="u-c-pointer u-ta-center u-mb-1"
|
|
658
|
+
xs={6}
|
|
659
|
+
md={3}
|
|
660
|
+
xl={2}
|
|
661
|
+
onClick={() => setState({ selected: icon })}
|
|
662
|
+
>
|
|
663
|
+
<Icon icon={icon} size={state.size} />
|
|
664
|
+
<Typography variant='body1' className='u-mt-half'>
|
|
665
|
+
{ getNameFromIcon(icon) }
|
|
666
|
+
</Typography>
|
|
667
|
+
</Grid>
|
|
668
|
+
)}
|
|
669
|
+
{state.selected ? <InfoModal icon={state.selected} /> : null}
|
|
670
|
+
</Grid>
|
|
671
|
+
</DemoProvider>
|
|
672
|
+
|
|
678
673
|
```
|
|
679
674
|
|
|
680
675
|
### SVGr illustrations
|
|
@@ -682,6 +677,10 @@ const Example = () => {
|
|
|
682
677
|
```jsx
|
|
683
678
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
684
679
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
680
|
+
import Grid from 'cozy-ui/transpiled/react/Grid/index.js'
|
|
681
|
+
import Dialog from 'cozy-ui/transpiled/react/CozyDialogs/Dialog'
|
|
682
|
+
import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
|
|
683
|
+
import cx from 'classnames'
|
|
685
684
|
|
|
686
685
|
import AccountIcon from 'cozy-ui/transpiled/react/Icons/Account'
|
|
687
686
|
import BottomSelectIcon from 'cozy-ui/transpiled/react/Icons/BottomSelect'
|
|
@@ -785,33 +784,61 @@ const icons = [
|
|
|
785
784
|
...(isTwakeTheme() ? [TwakeWorkplace] : []),
|
|
786
785
|
]
|
|
787
786
|
|
|
788
|
-
const wrapperStyle = {
|
|
789
|
-
fontSize: '2rem',
|
|
790
|
-
display: 'grid',
|
|
791
|
-
gridTemplateColumns: 'repeat(6, 1fr)'
|
|
792
|
-
}
|
|
793
|
-
|
|
794
787
|
initialState = { size: 16 }
|
|
795
788
|
|
|
796
789
|
const handleInputRangeChange = ev => {
|
|
797
790
|
setState({ size: parseInt(ev.target.value, 10) })
|
|
798
791
|
}
|
|
799
792
|
|
|
793
|
+
const getNameFromIcon = icon => {
|
|
794
|
+
return icon.name.replace(/^Svg/, '')
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
const InfoModal = ({ icon }) => {
|
|
798
|
+
const iconName = getNameFromIcon(icon)
|
|
799
|
+
return <Dialog
|
|
800
|
+
size='large'
|
|
801
|
+
open={true}
|
|
802
|
+
title={<div className='u-ta-center'>{ iconName }</div>}
|
|
803
|
+
onClose={() => setState({ selected: null })}
|
|
804
|
+
content={
|
|
805
|
+
<>
|
|
806
|
+
<Typography variant='body1'>To import {iconName}, copy/paste the following line:</Typography>
|
|
807
|
+
<pre>
|
|
808
|
+
import {iconName}Icon from 'cozy-ui/transpiled/react/Icons/{iconName}'
|
|
809
|
+
</pre>
|
|
810
|
+
</>
|
|
811
|
+
}
|
|
812
|
+
/>
|
|
813
|
+
}
|
|
814
|
+
|
|
800
815
|
;
|
|
801
816
|
|
|
802
|
-
<
|
|
817
|
+
<DemoProvider>
|
|
803
818
|
<Typography component='p' variant='body1' className='u-mb-1'>
|
|
804
819
|
Font size: <input type='range' min='8' max='48' value={state.size} onChange={handleInputRangeChange} /> {state.size}px
|
|
805
820
|
</Typography>
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
icons.map(icon =>
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
821
|
+
|
|
822
|
+
<Grid container spacing={2}>
|
|
823
|
+
{icons.map(icon =>
|
|
824
|
+
<Grid
|
|
825
|
+
key={icon}
|
|
826
|
+
item
|
|
827
|
+
className="u-c-pointer u-ta-center u-mb-1"
|
|
828
|
+
xs={6}
|
|
829
|
+
md={3}
|
|
830
|
+
xl={2}
|
|
831
|
+
onClick={() => setState({ selected: icon })}
|
|
832
|
+
>
|
|
833
|
+
<Icon icon={icon} size={state.size} />
|
|
834
|
+
<Typography variant='body1' className='u-mt-half'>
|
|
835
|
+
{ getNameFromIcon(icon) }
|
|
836
|
+
</Typography>
|
|
837
|
+
</Grid>
|
|
812
838
|
)}
|
|
813
|
-
|
|
814
|
-
</
|
|
839
|
+
{state.selected ? <InfoModal icon={state.selected} /> : null}
|
|
840
|
+
</Grid>
|
|
841
|
+
</DemoProvider>
|
|
815
842
|
```
|
|
816
843
|
|
|
817
844
|
### SVGr permissions icons
|
|
@@ -819,6 +846,7 @@ const handleInputRangeChange = ev => {
|
|
|
819
846
|
```jsx
|
|
820
847
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
821
848
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
849
|
+
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
822
850
|
import Dialog from 'cozy-ui/transpiled/react/CozyDialogs/Dialog'
|
|
823
851
|
import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
|
|
824
852
|
import cx from 'classnames'
|
|
@@ -872,13 +900,8 @@ import Versioning from 'cozy-ui/transpiled/react/Icons/Versioning'
|
|
|
872
900
|
|
|
873
901
|
const icons = [Accounts, Apps, BankAccounts, BankGroups, BankOperations, BankRecurrence, BillPermissions, BugReport, CalendarPermissions, Category, CertifiedPermissions, ConnectedClients, Consumption, ContactsAccounts, ContactsGroups, Contacts, Contract, Ecolyo, Energy, Energybreakdown, Fallback, Family, FilesPen, FilesVersions, Files, HomePermissions, Identities, KonnectorsResult, Konnectors, LocationPermissions, Notifications, Opinions, Passwords, Permissions, PhotosAlbum, PhotosSettings, Profile, SafePermissions, Settings, Sharings, Sinister, Tags,TaskToEffectuate, Triggers, Versioning]
|
|
874
902
|
const locale = {}
|
|
875
|
-
const wrapperStyle = {
|
|
876
|
-
fontSize: '2rem',
|
|
877
|
-
display: 'grid',
|
|
878
|
-
gridTemplateColumns: 'repeat(6, 1fr)'
|
|
879
|
-
}
|
|
880
903
|
|
|
881
|
-
initialState = { size: 16 }
|
|
904
|
+
initialState = { size: 16 }
|
|
882
905
|
|
|
883
906
|
const handleInputRangeChange = ev => {
|
|
884
907
|
setState({ size: parseInt(ev.target.value, 10) })
|
|
@@ -906,34 +929,33 @@ const InfoModal = ({ icon }) => {
|
|
|
906
929
|
/>
|
|
907
930
|
}
|
|
908
931
|
|
|
909
|
-
const Example = () => {
|
|
910
|
-
return (
|
|
911
|
-
<DemoProvider>
|
|
912
|
-
<Typography component='p' variant='body1' className='u-mb-1'>
|
|
913
|
-
Font size: <input type='range' min='8' max='48' value={state.size} onChange={handleInputRangeChange} /> {state.size}px
|
|
914
|
-
</Typography>
|
|
915
|
-
<div style={wrapperStyle}>
|
|
916
|
-
{
|
|
917
|
-
icons.map(icon => <div
|
|
918
|
-
key={icon}
|
|
919
|
-
className="u-c-pointer u-ta-center u-mb-1"
|
|
920
|
-
onClick={() => setState({ selected: icon })}
|
|
921
|
-
>
|
|
922
|
-
<Icon icon={ icon } size={state.size} />
|
|
923
|
-
<Typography variant='body1' className='u-mt-half'>
|
|
924
|
-
{ getNameFromIcon(icon) }
|
|
925
|
-
</Typography>
|
|
926
|
-
</div>
|
|
927
|
-
)}
|
|
928
|
-
{ state.selected ? <InfoModal icon={state.selected} /> : null }
|
|
929
|
-
</div>
|
|
930
|
-
</DemoProvider>
|
|
931
|
-
)
|
|
932
|
-
}
|
|
933
|
-
|
|
934
932
|
;
|
|
935
933
|
|
|
936
|
-
<
|
|
934
|
+
<DemoProvider>
|
|
935
|
+
<Typography component='p' variant='body1' className='u-mb-1'>
|
|
936
|
+
Font size: <input type='range' min='8' max='48' value={state.size} onChange={handleInputRangeChange} /> {state.size}px
|
|
937
|
+
</Typography>
|
|
938
|
+
|
|
939
|
+
<Grid container spacing={2}>
|
|
940
|
+
{icons.map(icon =>
|
|
941
|
+
<Grid
|
|
942
|
+
key={icon}
|
|
943
|
+
item
|
|
944
|
+
className="u-c-pointer u-ta-center u-mb-1"
|
|
945
|
+
xs={6}
|
|
946
|
+
md={3}
|
|
947
|
+
xl={2}
|
|
948
|
+
onClick={() => setState({ selected: icon })}
|
|
949
|
+
>
|
|
950
|
+
<Icon icon={icon} size={state.size} />
|
|
951
|
+
<Typography variant='body1' className='u-mt-half'>
|
|
952
|
+
{ getNameFromIcon(icon) }
|
|
953
|
+
</Typography>
|
|
954
|
+
</Grid>
|
|
955
|
+
)}
|
|
956
|
+
{state.selected ? <InfoModal icon={state.selected} /> : null}
|
|
957
|
+
</Grid>
|
|
958
|
+
</DemoProvider>
|
|
937
959
|
```
|
|
938
960
|
|
|
939
961
|
### Available icons from Sprite
|
|
@@ -945,6 +967,7 @@ include via `Sprite`.
|
|
|
945
967
|
|
|
946
968
|
```jsx
|
|
947
969
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
970
|
+
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
948
971
|
// Sprite is necessary in order to add in the html rendering
|
|
949
972
|
import Sprite from 'cozy-ui/transpiled/react/Icon/Sprite'
|
|
950
973
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
@@ -953,14 +976,26 @@ const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
|
|
|
953
976
|
let i = 0
|
|
954
977
|
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-rainbow','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','desktop-download','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','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','person-add','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']
|
|
955
978
|
;
|
|
956
|
-
|
|
979
|
+
|
|
980
|
+
<Grid container spacing={2}>
|
|
957
981
|
<Sprite />
|
|
958
|
-
{availableIcons.map(icon =>
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
982
|
+
{availableIcons.map(icon =>
|
|
983
|
+
<Grid
|
|
984
|
+
key={icon}
|
|
985
|
+
item
|
|
986
|
+
className="u-c-pointer u-ta-center u-mb-1"
|
|
987
|
+
xs={6}
|
|
988
|
+
md={3}
|
|
989
|
+
xl={2}
|
|
990
|
+
onClick={() => setState({ selected: icon })}
|
|
991
|
+
>
|
|
992
|
+
<Icon icon={icon} color={colors[i++ % colors.length]} />
|
|
993
|
+
<Typography variant='body1' className='u-mt-half'>
|
|
994
|
+
{icon}
|
|
995
|
+
</Typography>
|
|
996
|
+
</Grid>
|
|
962
997
|
)}
|
|
963
|
-
</
|
|
998
|
+
</Grid>
|
|
964
999
|
```
|
|
965
1000
|
|
|
966
1001
|
### Available illustrations from Sprite
|
|
@@ -968,18 +1003,30 @@ const availableIcons = ['album-add','album-remove','album','answer','apple','arc
|
|
|
968
1003
|
```jsx
|
|
969
1004
|
import Icon from 'cozy-ui/transpiled/react/Icon'
|
|
970
1005
|
import Typography from 'cozy-ui/transpiled/react/Typography'
|
|
1006
|
+
import Grid from 'cozy-ui/transpiled/react/Grid'
|
|
971
1007
|
import Sprite from 'cozy-ui/transpiled/react/Icon/Sprite'
|
|
972
1008
|
|
|
973
1009
|
const availableIcons = ['account', 'bottom-select', 'check-white', 'cloud-broken', 'contacts', 'cozy-authentification', 'cozy-logo', 'cozy-upgrade', 'credit-card-large', 'dash-white', 'device-browser', 'device-laptop', 'device-phone', 'device-tablet', 'file-type-audio', 'file-type-banking-account' , 'file-type-bin', 'file-type-code', 'file-type-files', 'file-type-folder', 'file-type-server', 'file-type-image', 'file-type-note', 'file-type-pdf', 'file-type-sheet', 'file-type-slide', 'file-type-text', 'file-type-video', 'file-type-zip', 'forbidden-sign', 'google', 'keychain', 'logout-large', 'papers', 'store', 'top-select', 'trash-duotone', 'cozy']
|
|
974
1010
|
|
|
975
1011
|
;
|
|
976
1012
|
|
|
977
|
-
<
|
|
1013
|
+
<Grid container spacing={2}>
|
|
978
1014
|
<Sprite />
|
|
979
|
-
{availableIcons.map(icon =>
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1015
|
+
{availableIcons.map(icon =>
|
|
1016
|
+
<Grid
|
|
1017
|
+
key={icon}
|
|
1018
|
+
item
|
|
1019
|
+
className="u-c-pointer u-ta-center u-mb-1"
|
|
1020
|
+
xs={6}
|
|
1021
|
+
md={3}
|
|
1022
|
+
xl={2}
|
|
1023
|
+
onClick={() => setState({ selected: icon })}
|
|
1024
|
+
>
|
|
1025
|
+
<Icon icon={icon} />
|
|
1026
|
+
<Typography variant='body1' className='u-mt-half'>
|
|
1027
|
+
{icon}
|
|
1028
|
+
</Typography>
|
|
1029
|
+
</Grid>
|
|
983
1030
|
)}
|
|
984
|
-
</
|
|
1031
|
+
</Grid>
|
|
985
1032
|
```
|