cozy-ui 121.6.0 → 121.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/assets/icons/ui/cloud-rainbow.svg +1 -0
  3. package/assets/icons/ui/mosaic.svg +1 -0
  4. package/assets/icons/ui/person-add.svg +1 -0
  5. package/dist/cozy-ui.min.css +1 -1
  6. package/dist/cozy-ui.utils.min.css +1 -1
  7. package/package.json +1 -1
  8. package/react/Badge/Readme.md +2 -2
  9. package/react/Icon/Readme.md +7 -1
  10. package/react/Icons/CloudRainbow.jsx +63 -0
  11. package/react/Icons/Mosaic.jsx +16 -0
  12. package/react/Icons/PersonAdd.jsx +12 -0
  13. package/react/InfosBadge/index.jsx +12 -9
  14. package/react/MuiCozyTheme/makeTheme.jsx +2 -0
  15. package/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +1 -0
  16. package/react/SquareAppIcon/Readme.md +9 -7
  17. package/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap +9 -9
  18. package/react/SquareAppIcon/index.jsx +42 -18
  19. package/react/SquareAppIcon/styles.styl +7 -1
  20. package/react/SquareAppIcon/styles_twake.styl +136 -0
  21. package/react/Typography/Readme.md +1 -0
  22. package/react/providers/CozyTheme/DumbCozyTheme.jsx +1 -0
  23. package/react/providers/CozyTheme/index.jsx +7 -2
  24. package/stylus/settings/themes/light-normal.styl +0 -2
  25. package/theme/palette_twake.json +1 -1
  26. package/transpiled/react/Icon/icons-sprite.js +1 -1
  27. package/transpiled/react/Icons/CloudRainbow.js +66 -0
  28. package/transpiled/react/Icons/Mosaic.js +15 -0
  29. package/transpiled/react/Icons/PersonAdd.js +13 -0
  30. package/transpiled/react/InfosBadge/index.js +19 -21
  31. package/transpiled/react/MuiCozyTheme/makeTheme.js +2 -0
  32. package/transpiled/react/MuiCozyTheme/overrides/makeDarkInvertedOverrides.d.ts +1 -0
  33. package/transpiled/react/MuiCozyTheme/overrides/makeDarkNormalOverrides.d.ts +1 -0
  34. package/transpiled/react/MuiCozyTheme/overrides/makeLightInvertedOverrides.d.ts +1 -0
  35. package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.d.ts +1 -0
  36. package/transpiled/react/MuiCozyTheme/overrides/makeLightNormalOverrides.js +1 -0
  37. package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkInvertedOverrides.d.ts +1 -0
  38. package/transpiled/react/MuiCozyTheme/overrides/twake/makeDarkNormalOverrides.d.ts +1 -0
  39. package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightInvertedOverrides.d.ts +1 -0
  40. package/transpiled/react/MuiCozyTheme/overrides/twake/makeLightNormalOverrides.d.ts +1 -0
  41. package/transpiled/react/SquareAppIcon/index.js +44 -18
  42. package/transpiled/react/providers/CozyTheme/DumbCozyTheme.js +1 -0
  43. package/transpiled/react/providers/CozyTheme/index.d.ts +1 -0
  44. package/transpiled/react/providers/CozyTheme/index.js +3 -2
  45. package/transpiled/react/stylesheet.css +1 -1
@@ -111,6 +111,7 @@ import Clock from 'cozy-ui/transpiled/react/Icons/Clock'
111
111
  import ClockOutline from 'cozy-ui/transpiled/react/Icons/ClockOutline'
112
112
  import Cloud from 'cozy-ui/transpiled/react/Icons/Cloud'
113
113
  import CloudHappy from 'cozy-ui/transpiled/react/Icons/CloudHappy'
114
+ import CloudRainbow from 'cozy-ui/transpiled/react/Icons/CloudRainbow'
114
115
  import CloudPlusOutlined from 'cozy-ui/transpiled/react/Icons/CloudPlusOutlined'
115
116
  import CloudSync from 'cozy-ui/transpiled/react/Icons/CloudSync'
116
117
  import Cocktail from 'cozy-ui/transpiled/react/Icons/Cocktail'
@@ -222,6 +223,7 @@ import Magnet from 'cozy-ui/transpiled/react/Icons/Magnet'
222
223
  import Magnifier from 'cozy-ui/transpiled/react/Icons/Magnifier'
223
224
  import Merge from 'cozy-ui/transpiled/react/Icons/Merge'
224
225
  import Moped from 'cozy-ui/transpiled/react/Icons/Moped'
226
+ import Mosaic from 'cozy-ui/transpiled/react/Icons/Mosaic'
225
227
  import MosaicMin from 'cozy-ui/transpiled/react/Icons/MosaicMin'
226
228
  import Motorcycle from 'cozy-ui/transpiled/react/Icons/Motorcycle'
227
229
  import Mountain from 'cozy-ui/transpiled/react/Icons/Mountain'
@@ -248,6 +250,7 @@ import Pen from 'cozy-ui/transpiled/react/Icons/Pen'
248
250
  import People from 'cozy-ui/transpiled/react/Icons/People'
249
251
  import Percent from 'cozy-ui/transpiled/react/Icons/Percent'
250
252
  import PercentCircle from 'cozy-ui/transpiled/react/Icons/PercentCircle'
253
+ import PersonAdd from 'cozy-ui/transpiled/react/Icons/PersonAdd'
251
254
  import PersonalData from 'cozy-ui/transpiled/react/Icons/PersonalData'
252
255
  import Phone from 'cozy-ui/transpiled/react/Icons/Phone'
253
256
  import PhoneDownload from 'cozy-ui/transpiled/react/Icons/PhoneDownload'
@@ -382,6 +385,7 @@ const icons = [
382
385
  ClockOutline,
383
386
  Cloud,
384
387
  CloudHappy,
388
+ ...(isTwakeTheme() ? [CloudRainbow] : []),
385
389
  CloudPlusOutlined,
386
390
  CloudSync,
387
391
  Cocktail,
@@ -493,6 +497,7 @@ const icons = [
493
497
  Magnifier,
494
498
  Merge,
495
499
  Moped,
500
+ ...(isTwakeTheme() ? [Mosaic] : []),
496
501
  MosaicMin,
497
502
  Motorcycle,
498
503
  Mountain,
@@ -519,6 +524,7 @@ const icons = [
519
524
  People,
520
525
  Percent,
521
526
  PercentCircle,
527
+ ...(isTwakeTheme() ? [PersonAdd] : []),
522
528
  PersonalData,
523
529
  PhoneDownload,
524
530
  PhoneUpload,
@@ -942,7 +948,7 @@ import Typography from 'cozy-ui/transpiled/react/Typography'
942
948
 
943
949
  const colors = ['#297EF2', '#08b442', '#B449E7', '#F52D2D', '#FF962F']
944
950
  let i = 0
945
- 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','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-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']
951
+ 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']
946
952
  ;
947
953
  <div style={{ fontSize: '2rem', display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)' }}>
948
954
  <Sprite />
@@ -0,0 +1,63 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/cloud-rainbow.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgCloudRainbow(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 11" {...props}>
7
+ <path
8
+ 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"
9
+ fill="#fff"
10
+ />
11
+ <path
12
+ 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"
13
+ fill="url(#cloud-rainbow_svg__paint0_linear_11512_6354)"
14
+ />
15
+ <path
16
+ 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"
17
+ fill="url(#cloud-rainbow_svg__paint1_linear_11512_6354)"
18
+ />
19
+ <path
20
+ 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"
21
+ fill="url(#cloud-rainbow_svg__paint2_linear_11512_6354)"
22
+ />
23
+ <defs>
24
+ <linearGradient
25
+ id="cloud-rainbow_svg__paint0_linear_11512_6354"
26
+ x1={16}
27
+ y1={6.222}
28
+ x2={0}
29
+ y2={6.222}
30
+ gradientUnits="userSpaceOnUse"
31
+ >
32
+ <stop offset={0.13} stopColor="#A033FF" />
33
+ <stop offset={0.61} stopColor="#0094FF" />
34
+ <stop offset={1} stopColor="#4FB500" />
35
+ </linearGradient>
36
+ <linearGradient
37
+ id="cloud-rainbow_svg__paint1_linear_11512_6354"
38
+ x1={7.333}
39
+ y1={3.333}
40
+ x2={4.833}
41
+ y2={10.833}
42
+ gradientUnits="userSpaceOnUse"
43
+ >
44
+ <stop stopColor="#FFD600" stopOpacity={0} />
45
+ <stop offset={0.563} stopColor="#FFC700" />
46
+ </linearGradient>
47
+ <linearGradient
48
+ id="cloud-rainbow_svg__paint2_linear_11512_6354"
49
+ x1={8.667}
50
+ y1={6.222}
51
+ x2={12.079}
52
+ y2={11.642}
53
+ gradientUnits="userSpaceOnUse"
54
+ >
55
+ <stop offset={0.03} stopColor="#FF3B30" stopOpacity={0} />
56
+ <stop offset={0.843} stopColor="#E73B2D" />
57
+ </linearGradient>
58
+ </defs>
59
+ </svg>
60
+ )
61
+ }
62
+
63
+ export default SvgCloudRainbow
@@ -0,0 +1,16 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/mosaic.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgMosaic(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 16" {...props}>
7
+ <path
8
+ fillRule="evenodd"
9
+ clipRule="evenodd"
10
+ d="M9.289 1.92l.02-.02.737-.737.02-.02c.241-.24.454-.453.645-.615a2.11 2.11 0 01.718-.426c.418-.136.87-.136 1.288 0 .286.093.515.253.718.426.191.162.404.374.644.615l.02.02.738.737.02.02c.24.241.454.454.615.645.173.203.333.432.426.718.136.419.136.87 0 1.288a2.117 2.117 0 01-.426.718c-.162.191-.374.404-.615.644l-.02.02-.737.738-.02.02c-.241.24-.454.454-.645.615a2.118 2.118 0 01-.718.426c-.418.136-.87.136-1.288 0a2.117 2.117 0 01-.718-.426 10.947 10.947 0 01-.644-.615l-.02-.02-.738-.737-.02-.02c-.24-.241-.454-.454-.615-.645a2.118 2.118 0 01-.426-.718 2.084 2.084 0 010-1.288 2.11 2.11 0 01.426-.718c.161-.191.374-.404.615-.644zm.576 1.657c-.11.129-.126.177-.13.189a.521.521 0 000 .322c.004.012.02.06.13.19.116.136.283.303.55.57l.737.737c.267.267.434.434.57.55.13.11.178.126.19.13a.521.521 0 00.322 0c.011-.004.06-.02.19-.13.136-.116.303-.283.57-.55l.737-.737c.267-.267.434-.434.55-.57.11-.13.126-.178.13-.19a.521.521 0 000-.322c-.004-.012-.02-.06-.13-.19a11.036 11.036 0 00-.55-.57l-.737-.737a10.98 10.98 0 00-.57-.55c-.13-.11-.178-.126-.19-.13a.521.521 0 00-.322 0c-.012.004-.06.02-.19.13a10.98 10.98 0 00-.57.55l-.737.737c-.267.267-.434.434-.55.57zM3.91 7.314h.028c.34 0 .641 0 .89-.02a2.12 2.12 0 00.81-.207c.392-.2.71-.519.91-.91a2.12 2.12 0 00.207-.81c.02-.249.02-.55.02-.89V3.376c0-.34 0-.64-.02-.89a2.119 2.119 0 00-.206-.808 2.085 2.085 0 00-.911-.911 2.118 2.118 0 00-.81-.207c-.249-.02-.55-.02-.89-.02H2.837c-.34 0-.64 0-.89.02a2.12 2.12 0 00-.809.207c-.392.2-.71.519-.91.91a2.118 2.118 0 00-.208.81c-.02.249-.02.55-.02.89v1.101c0 .34 0 .64.02.89.022.265.07.54.207.808.2.392.519.711.911.911.268.137.543.185.809.207.25.02.55.02.89.02H3.91zm1.018-1.62c-.011.006-.057.028-.226.042a11.01 11.01 0 01-.792.015H2.866c-.377 0-.614 0-.792-.015-.169-.014-.215-.036-.226-.042a.521.521 0 01-.228-.228c-.005-.01-.028-.057-.041-.226a10.986 10.986 0 01-.016-.792V3.406c0-.378.001-.614.016-.792.013-.17.036-.216.041-.226a.521.521 0 01.228-.228c.01-.006.057-.028.226-.042.178-.014.415-.015.792-.015H3.91c.377 0 .614 0 .792.015.169.014.215.036.226.042.098.05.178.13.228.228.005.01.027.057.041.226.015.178.015.414.015.792v1.042c0 .378 0 .614-.015.792-.014.17-.036.216-.041.226a.521.521 0 01-.228.228zM3.909 16h.028c.34 0 .642 0 .89-.02a2.12 2.12 0 00.81-.207c.392-.2.71-.519.91-.911.137-.268.186-.543.207-.809.02-.25.02-.55.02-.89v-1.101c0-.34 0-.64-.02-.89a2.119 2.119 0 00-.206-.809 2.085 2.085 0 00-.911-.91 2.117 2.117 0 00-.81-.207c-.248-.02-.55-.02-.89-.02H2.838c-.34 0-.64 0-.89.02-.266.021-.54.07-.809.206-.392.2-.71.52-.91.911a2.118 2.118 0 00-.208.81c-.02.248-.02.55-.02.89v1.099c0 .34 0 .64.02.89.022.266.07.54.207.809.2.392.519.71.911.91.268.137.543.186.809.208.25.02.55.02.89.02H3.91zm1.018-1.62c-.011.005-.057.028-.226.041a10.95 10.95 0 01-.792.016H2.866c-.377 0-.614-.001-.792-.016-.169-.013-.215-.036-.226-.041a.521.521 0 01-.228-.228c-.005-.01-.028-.057-.041-.226a10.985 10.985 0 01-.016-.792V12.09c0-.377.001-.614.016-.792.013-.168.036-.215.041-.226a.521.521 0 01.228-.228c.01-.005.057-.027.226-.041.178-.015.415-.015.792-.015H3.91c.377 0 .614 0 .792.015.169.014.215.036.226.041.098.05.178.13.228.228.005.01.027.057.041.226.015.178.015.415.015.793v1.042c0 .377 0 .614-.015.792-.014.169-.036.215-.041.226a.521.521 0 01-.228.228zM12.594 16h.03c.34 0 .64 0 .89-.02.265-.022.54-.07.808-.207.392-.2.711-.519.911-.911a2.12 2.12 0 00.207-.809c.02-.25.02-.55.02-.89v-1.101c0-.34 0-.64-.02-.89a2.12 2.12 0 00-.207-.809 2.085 2.085 0 00-.91-.91 2.117 2.117 0 00-.81-.207c-.249-.02-.55-.02-.89-.02h-1.101c-.34 0-.64 0-.89.02-.265.021-.54.07-.808.206-.392.2-.711.52-.911.911a2.118 2.118 0 00-.207.81c-.02.248-.02.55-.02.89v1.099c0 .34 0 .64.02.89.022.266.07.54.207.809.2.392.519.71.91.91.269.137.544.186.81.208.249.02.55.02.89.02h1.071zm1.018-1.62c-.01.005-.057.028-.226.041a10.6 10.6 0 01-.792.016h-1.042a10.6 10.6 0 01-.792-.016c-.17-.013-.216-.036-.226-.041a.521.521 0 01-.228-.228c-.006-.01-.028-.057-.042-.226a11.009 11.009 0 01-.015-.792V12.09c0-.377 0-.614.015-.792.014-.168.036-.215.042-.226a.521.521 0 01.228-.228c.01-.005.057-.027.226-.041.178-.015.414-.015.792-.015h1.042c.378 0 .614 0 .792.015.17.014.216.036.226.041.098.05.178.13.228.228.006.01.028.057.042.226.014.178.015.415.015.793v1.042c0 .377 0 .614-.015.792-.014.169-.036.215-.042.226a.521.521 0 01-.228.228z"
11
+ />
12
+ </svg>
13
+ )
14
+ }
15
+
16
+ export default SvgMosaic
@@ -0,0 +1,12 @@
1
+ // Automatically created, please run `scripts/generate-svgr-icon.sh assets/icons/ui/person-add.svg` to regenerate;
2
+ import React from 'react'
3
+
4
+ function SvgPersonAdd(props) {
5
+ return (
6
+ <svg viewBox="0 0 16 13" {...props}>
7
+ <path d="M12.768 5.398h-.905a.753.753 0 01-.553-.222.745.745 0 01-.223-.55.76.76 0 01.223-.554.746.746 0 01.553-.226h.905v-.904c0-.22.073-.404.221-.553a.745.745 0 01.55-.223.76.76 0 01.555.223c.15.149.226.333.226.553v.904h.904c.22 0 .404.074.553.222a.745.745 0 01.223.55.76.76 0 01-.223.554.746.746 0 01-.553.226h-.904v.905a.75.75 0 01-.222.552.745.745 0 01-.55.224.759.759 0 01-.554-.224.746.746 0 01-.226-.552v-.905zm-6.706.825c-.868 0-1.604-.302-2.208-.906-.604-.604-.906-1.34-.906-2.208 0-.868.302-1.603.906-2.205C4.458.3 5.194 0 6.062 0 6.93 0 7.665.301 8.27.904c.604.602.906 1.337.906 2.205 0 .868-.302 1.604-.906 2.208-.604.604-1.34.906-2.208.906zM0 10.753v-.36c0-.383.094-.734.281-1.055.188-.32.446-.576.774-.766.76-.44 1.563-.778 2.409-1.013a9.646 9.646 0 012.598-.353c.893 0 1.762.117 2.607.35.846.234 1.646.57 2.4 1.01.328.191.586.446.773.765.188.32.282.673.282 1.061v.36c0 .471-.166.872-.497 1.203a1.64 1.64 0 01-1.203.497h-8.73c-.472 0-.871-.166-1.2-.497A1.643 1.643 0 010 10.753z" />
8
+ </svg>
9
+ )
10
+ }
11
+
12
+ export default SvgPersonAdd
@@ -2,29 +2,32 @@ import cx from 'classnames'
2
2
  import React from 'react'
3
3
 
4
4
  import Badge from '../Badge'
5
- import { withStyles } from '../styles'
5
+ import { isTwakeTheme } from '../helpers/isTwakeTheme'
6
+ import { makeStyles } from '../styles'
6
7
 
7
- const customStyles = () => ({
8
+ const useStyles = makeStyles({
8
9
  qualifier: {
9
- height: '1.125rem', // compensation of the specific border size
10
- minWidth: '1.125rem',
10
+ height: isTwakeTheme() ? '24px' : '1.125rem', // compensation of the specific border size
11
+ minWidth: isTwakeTheme() ? '24px' : '1.125rem',
11
12
  backgroundColor: 'var(--paperBackgroundColor)',
12
13
  color: 'var(--iconTextColor)',
13
- border: '1px solid var(--borderMainColor)'
14
+ border: isTwakeTheme() ? undefined : '1px solid var(--borderMainColor)',
15
+ boxShadow: isTwakeTheme() ? 'var(--shadow3)' : undefined
14
16
  }
15
17
  })
16
18
 
17
- const InfosBadge = withStyles(customStyles)(({ classes, ...props }) => {
18
- const { qualifier, ...customClasses } = classes
19
+ const InfosBadge = ({ classes, ...props }) => {
20
+ const _classes = useStyles()
21
+
19
22
  return (
20
23
  <Badge
21
24
  classes={{
22
- badge: cx(qualifier, customClasses)
25
+ badge: cx(_classes.qualifier, classes)
23
26
  }}
24
27
  anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
25
28
  {...props}
26
29
  />
27
30
  )
28
- })
31
+ }
29
32
 
30
33
  export default InfosBadge
@@ -71,6 +71,8 @@ export const makeTheme = (type, variant) => {
71
71
  typography:
72
72
  uiThemeName === 'Cozy' ? makeTypography(palette) : makeTwakeTypography(),
73
73
  shadows: makeShadows(type, variant),
74
+ type,
75
+ variant,
74
76
  palette
75
77
  })
76
78
 
@@ -885,6 +885,7 @@ export const makeLightNormalOverrides = theme => ({
885
885
  badge: {
886
886
  boxSizing: 'content-box',
887
887
  padding: 0,
888
+ borderRadius: '100%',
888
889
  '&.badgeBorder': {
889
890
  border: `2px solid ${theme.palette.background.paper}`
890
891
  },
@@ -7,6 +7,7 @@ import SquareAppIcon from 'cozy-ui/transpiled/react/SquareAppIcon'
7
7
  import CozyIcon from 'cozy-ui/transpiled/react/Icons/Cozy'
8
8
  import Icon from 'cozy-ui/transpiled/react/Icon'
9
9
  import { useCozyTheme } from 'cozy-ui/transpiled/react/providers/CozyTheme'
10
+ import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
10
11
  import cloudWallpaper from '../../docs/cloud-wallpaper.jpg'
11
12
  import Button from 'cozy-ui/transpiled/react/Buttons'
12
13
 
@@ -18,7 +19,7 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
18
19
 
19
20
  ;
20
21
 
21
- <>
22
+ <BreakpointsProvider>
22
23
  <Button className="u-mb-1 u-mr-1" label="Toggle Loading" onClick={() => setLoading(!isLoading)} />
23
24
  <Button className="u-mb-1 u-mr-1" label="Toggle Loading Error" onClick={() => setIsError(!isError)} />
24
25
  <Button className="u-mb-1" label="Hide shortcut badge" onClick={() => setShortcutBadgeHide(!isShortcutBadgeHide)} />
@@ -44,10 +45,10 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
44
45
  <SquareAppIcon name="Shortcut" variant="shortcut" hideShortcutBadge={isShortcutBadgeHide} />
45
46
  </Grid>
46
47
  <Grid item>
47
- <SquareAppIcon IconContent={<Icon icon={CozyIcon} size="48" />} name="Loading" variant={isLoading ? 'loading' : 'default'} />
48
+ <SquareAppIcon IconContent={<Icon icon={CozyIcon} size={isTwakeTheme() ? 32 : 48} />} name="Loading" variant={isLoading ? 'loading' : 'default'} />
48
49
  </Grid>
49
50
  <Grid item>
50
- <SquareAppIcon IconContent={<Icon icon={CozyIcon} size="48" />} name="Loading" variant={isError ? 'error' : 'loading'} />
51
+ <SquareAppIcon IconContent={<Icon icon={CozyIcon} size={isTwakeTheme() ? 32 : 48} />} name="Loading" variant={isError ? 'error' : 'loading'} />
51
52
  </Grid>
52
53
  <Grid item>
53
54
  <SquareAppIcon name="Shortcut" variant="shortcut" IconContent={<img
@@ -63,7 +64,7 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
63
64
  />} hideShortcutBadge={isShortcutBadgeHide} />
64
65
  </Grid>
65
66
  <Grid item>
66
- <SquareAppIcon name="Custom Icon" IconContent={<Icon icon={CozyIcon} size="48" />} />
67
+ <SquareAppIcon name="Custom Icon" IconContent={<Icon icon={CozyIcon} size={isTwakeTheme() ? 32 : 48} />} />
67
68
  </Grid>
68
69
  <Grid item>
69
70
  <SquareAppIcon name="Icon Grid" IconContent={(
@@ -84,7 +85,7 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
84
85
  )} />
85
86
  </Grid>
86
87
  </Grid>
87
- </>
88
+ </BreakpointsProvider>
88
89
  ```
89
90
 
90
91
  ### Using the "detailed" display mode
@@ -98,6 +99,7 @@ import SquareAppIcon from 'cozy-ui/transpiled/react/SquareAppIcon'
98
99
  import CozyIcon from 'cozy-ui/transpiled/react/Icons/Cozy'
99
100
  import Icon from 'cozy-ui/transpiled/react/Icon'
100
101
  import { useCozyTheme } from 'cozy-ui/transpiled/react/providers/CozyTheme'
102
+ import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
101
103
  import cloudWallpaper from '../../docs/cloud-wallpaper.jpg'
102
104
  import Button from 'cozy-ui/transpiled/react/Buttons'
103
105
 
@@ -109,7 +111,7 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
109
111
 
110
112
  ;
111
113
 
112
- <>
114
+ <BreakpointsProvider>
113
115
  <Button className="u-mb-1 u-mr-1" label="Toggle Loading" onClick={() => setLoading(!isLoading)} />
114
116
  <Button className="u-mb-1 u-mr-1" label="Toggle Loading Error" onClick={() => setIsError(!isError)} />
115
117
  <Button className="u-mb-1" label="Hide shortcut badge" onClick={() => setShortcutBadgeHide(!isShortcutBadgeHide)} />
@@ -179,5 +181,5 @@ const [isShortcutBadgeHide, setShortcutBadgeHide] = React.useState(false)
179
181
  IconContent={<Icon icon={CozyIcon} size="48" />} />
180
182
  </Grid>
181
183
  </Grid>
182
- </>
184
+ </BreakpointsProvider>
183
185
  ```
@@ -37,7 +37,7 @@ exports[`SquareAppIcon component should render an app correctly with the app nam
37
37
  />
38
38
  </span>
39
39
  <span
40
- class="MuiBadge-badge-43 Component-qualifier-41 MuiBadge-anchorOriginBottomRightRectangular-51 MuiBadge-invisible-64"
40
+ class="MuiBadge-badge-43 makeStyles-qualifier-41 MuiBadge-anchorOriginBottomRightRectangular-51 MuiBadge-invisible-64"
41
41
  />
42
42
  </span>
43
43
  </div>
@@ -86,7 +86,7 @@ exports[`SquareAppIcon component should render an app correctly with the given n
86
86
  />
87
87
  </span>
88
88
  <span
89
- class="MuiBadge-badge-11 Component-qualifier-9 MuiBadge-anchorOriginBottomRightRectangular-19 MuiBadge-invisible-32"
89
+ class="MuiBadge-badge-11 makeStyles-qualifier-9 MuiBadge-anchorOriginBottomRightRectangular-19 MuiBadge-invisible-32"
90
90
  />
91
91
  </span>
92
92
  </div>
@@ -135,7 +135,7 @@ exports[`SquareAppIcon component should render an app with the app slug if no na
135
135
  />
136
136
  </span>
137
137
  <span
138
- class="MuiBadge-badge-75 Component-qualifier-73 MuiBadge-anchorOriginBottomRightRectangular-83 MuiBadge-invisible-96"
138
+ class="MuiBadge-badge-75 makeStyles-qualifier-73 MuiBadge-anchorOriginBottomRightRectangular-83 MuiBadge-invisible-96"
139
139
  />
140
140
  </span>
141
141
  </div>
@@ -191,7 +191,7 @@ exports[`SquareAppIcon component should render correctly an app in add state 1`]
191
191
  />
192
192
  </span>
193
193
  <span
194
- class="MuiBadge-badge-203 Component-qualifier-201 MuiBadge-anchorOriginBottomRightRectangular-211 MuiBadge-invisible-224"
194
+ class="MuiBadge-badge-203 makeStyles-qualifier-201 MuiBadge-anchorOriginBottomRightRectangular-211 MuiBadge-invisible-224"
195
195
  />
196
196
  </span>
197
197
  </div>
@@ -250,7 +250,7 @@ exports[`SquareAppIcon component should render correctly an app in error state 1
250
250
  </span>
251
251
  </span>
252
252
  <span
253
- class="MuiBadge-badge-171 Component-qualifier-169 MuiBadge-anchorOriginBottomRightRectangular-179 MuiBadge-invisible-192"
253
+ class="MuiBadge-badge-171 makeStyles-qualifier-169 MuiBadge-anchorOriginBottomRightRectangular-179 MuiBadge-invisible-192"
254
254
  />
255
255
  </span>
256
256
  </div>
@@ -299,7 +299,7 @@ exports[`SquareAppIcon component should render correctly an app in ghost state 1
299
299
  />
300
300
  </span>
301
301
  <span
302
- class="MuiBadge-badge-139 Component-qualifier-137 MuiBadge-anchorOriginBottomRightRectangular-147 MuiBadge-invisible-160"
302
+ class="MuiBadge-badge-139 makeStyles-qualifier-137 MuiBadge-anchorOriginBottomRightRectangular-147 MuiBadge-invisible-160"
303
303
  />
304
304
  </span>
305
305
  </div>
@@ -348,7 +348,7 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s
348
348
  />
349
349
  </span>
350
350
  <span
351
- class="MuiBadge-badge-107 Component-qualifier-105 MuiBadge-anchorOriginBottomRightRectangular-115 MuiBadge-invisible-128"
351
+ class="MuiBadge-badge-107 makeStyles-qualifier-105 MuiBadge-anchorOriginBottomRightRectangular-115 MuiBadge-invisible-128"
352
352
  />
353
353
  </span>
354
354
  </div>
@@ -385,7 +385,7 @@ exports[`SquareAppIcon component should render correctly an app in shortcut stat
385
385
  />
386
386
  </span>
387
387
  <span
388
- class="MuiBadge-badge-235 Component-qualifier-233 MuiBadge-anchorOriginBottomRightRectangular-243"
388
+ class="MuiBadge-badge-235 makeStyles-qualifier-233 MuiBadge-anchorOriginBottomRightRectangular-243"
389
389
  >
390
390
  <svg
391
391
  class="styles__icon___23x3R"
@@ -447,7 +447,7 @@ exports[`SquareAppIcon component should render correctly an app with custom cont
447
447
  />
448
448
  </span>
449
449
  <span
450
- class="MuiBadge-badge-329 Component-qualifier-327 MuiBadge-anchorOriginBottomRightRectangular-337 MuiBadge-invisible-350"
450
+ class="MuiBadge-badge-329 makeStyles-qualifier-327 MuiBadge-anchorOriginBottomRightRectangular-337 MuiBadge-invisible-350"
451
451
  />
452
452
  </span>
453
453
  </div>
@@ -5,7 +5,8 @@ import React, { useEffect, useState } from 'react'
5
5
 
6
6
  import ListItemText from 'cozy-ui/transpiled/react/ListItemText'
7
7
 
8
- import styles from './styles.styl'
8
+ import stylesCozy from './styles.styl'
9
+ import stylesTwake from './styles_twake.styl'
9
10
  import AppIcon from '../AppIcon'
10
11
  import Badge from '../Badge'
11
12
  import Icon from '../Icon'
@@ -17,17 +18,31 @@ import iconWarning from '../Icons/WarningCircle'
17
18
  import InfosBadge from '../InfosBadge'
18
19
  import Spinner from '../Spinner'
19
20
  import Typography from '../Typography'
21
+ import { isTwakeTheme } from '../helpers/isTwakeTheme'
20
22
  import { nameToColor } from '../legacy/Avatar/helpers'
23
+ import { useBreakpoints } from '../providers/Breakpoints'
21
24
  import CozyTheme, { useCozyTheme } from '../providers/CozyTheme'
22
25
  import { alpha, makeStyles } from '../styles'
23
26
 
27
+ const styles = isTwakeTheme() ? stylesTwake : stylesCozy
28
+
29
+ const makeTwakeColor = theme =>
30
+ theme.variant === 'inverted' || theme.type === 'dark'
31
+ ? 'var(--white)'
32
+ : 'var(--black)'
33
+
24
34
  const useStyles = makeStyles(theme => ({
25
35
  name: {
26
- color: 'var(--primaryTextColor)',
36
+ color: isTwakeTheme() ? makeTwakeColor(theme) : 'var(--primaryTextColor)',
37
+ textShadow: isTwakeTheme()
38
+ ? theme.variant === 'inverted' || theme.type === 'dark'
39
+ ? '0px 0px 10px rgba(0, 0, 0, 0.10), 0px 0px 2px rgba(0, 0, 0, 0.20), 0.5px 0.5px 1px rgba(0, 0, 0, 0.50)'
40
+ : undefined
41
+ : undefined,
27
42
  width: '5.5rem',
28
43
  textAlign: 'center',
29
- fontSize: '0.875rem',
30
- lineHeight: '1.188rem',
44
+ fontSize: isTwakeTheme() ? undefined : '0.875rem',
45
+ lineHeight: isTwakeTheme() ? undefined : '1.188rem',
31
46
  margin: '0.5rem 0.25rem 0 0.25rem',
32
47
  lineClamp: '2',
33
48
  boxOrient: 'vertical',
@@ -35,8 +50,8 @@ const useStyles = makeStyles(theme => ({
35
50
  height: '2.375rem',
36
51
  [theme.breakpoints.down('sm')]: {
37
52
  width: '3.75rem',
38
- fontSize: '0.6875rem',
39
- lineHeight: '1rem',
53
+ fontSize: isTwakeTheme() ? undefined : '0.6875rem',
54
+ lineHeight: isTwakeTheme() ? undefined : '1rem',
40
55
  margin: '0.25rem 0.25rem 0 0.25rem',
41
56
  height: '2rem'
42
57
  }
@@ -59,7 +74,7 @@ const useStyles = makeStyles(theme => ({
59
74
  margin: 'auto'
60
75
  },
61
76
  shadow: {
62
- boxShadow: theme.shadows[1]
77
+ boxShadow: isTwakeTheme() ? undefined : theme.shadows[1]
63
78
  },
64
79
  errorIcon: {
65
80
  fill: 'var(--errorColor)',
@@ -71,9 +86,9 @@ const useStyles = makeStyles(theme => ({
71
86
  display: 'flex',
72
87
  flexDirection: 'column',
73
88
  alignItems: 'center',
74
- width: '6rem',
89
+ minWidth: '6rem',
75
90
  [theme.breakpoints.down('sm')]: {
76
- width: '4.25rem'
91
+ minWidth: '4.25rem'
77
92
  }
78
93
  },
79
94
  detailedTileWrapper: {
@@ -104,6 +119,7 @@ export const SquareAppIcon = ({
104
119
  ...appIconProps
105
120
  }) => {
106
121
  const { variant: themeVariant } = useCozyTheme()
122
+ const { isMobile } = useBreakpoints()
107
123
  const classes = useStyles()
108
124
  const appName =
109
125
  name || get(appIconProps, 'app.name') || get(appIconProps, 'app') || ''
@@ -126,7 +142,9 @@ export const SquareAppIcon = ({
126
142
  prevVariant.current = variant
127
143
  }, [variant])
128
144
 
129
- const squareTheme = ['add', 'ghost'].includes(variant)
145
+ const exceptionVariant = [isTwakeTheme() ? 'ghost' : 'add', 'ghost']
146
+
147
+ const squareTheme = exceptionVariant.includes(variant)
130
148
  ? themeVariant
131
149
  : 'normal'
132
150
 
@@ -157,16 +175,15 @@ export const SquareAppIcon = ({
157
175
  styles['SquareAppIcon-wrapper'],
158
176
  styles[`SquareAppIcon-wrapper-${variant}`],
159
177
  {
160
- [classes.squareAppIconGhost]: ['ghost', 'add'].includes(
161
- variant
162
- ),
163
- [classes.shadow]: !['add', 'ghost'].includes(variant)
178
+ [classes.squareAppIconGhost]:
179
+ exceptionVariant.includes(variant),
180
+ [classes.shadow]: !exceptionVariant.includes(variant)
164
181
  }
165
182
  )}
166
183
  badgeContent={
167
184
  variant === 'error' ? (
168
185
  <Icon
169
- size="16"
186
+ size={16}
170
187
  className={cx(classes.errorIcon)}
171
188
  icon={iconWarning}
172
189
  />
@@ -180,7 +197,10 @@ export const SquareAppIcon = ({
180
197
  overlap="rectangular"
181
198
  style={
182
199
  variant === 'shortcut' && !IconContent
183
- ? { backgroundColor: nameToColor(name) }
200
+ ? {
201
+ [isTwakeTheme() ? 'background' : 'backgroundColor']:
202
+ nameToColor(name)
203
+ }
184
204
  : null
185
205
  }
186
206
  >
@@ -209,7 +229,7 @@ export const SquareAppIcon = ({
209
229
  >
210
230
  {animationState && (
211
231
  <Icon
212
- size="32"
232
+ size={32}
213
233
  icon={
214
234
  animationState === 'success'
215
235
  ? IconCheckAnimated
@@ -223,6 +243,10 @@ export const SquareAppIcon = ({
223
243
  <Icon icon={iconPlus} color="var(--primaryColor)" />
224
244
  ) : IconContent ? (
225
245
  IconContent
246
+ ) : isTwakeTheme() ? (
247
+ <div className="u-w-1-half-s u-h-1-half-s u-w-2 u-h-2">
248
+ <AppIcon {...appIconProps} />
249
+ </div>
226
250
  ) : (
227
251
  <AppIcon {...appIconProps} />
228
252
  )}
@@ -240,7 +264,7 @@ export const SquareAppIcon = ({
240
264
  { [classes.nameInverted]: themeVariant === 'inverted' },
241
265
  'u-spacellipsis'
242
266
  )}
243
- variant="h6"
267
+ variant={isTwakeTheme() ? (isMobile ? 'overline' : 'h6') : 'h6'}
244
268
  align="center"
245
269
  >
246
270
  {appName}
@@ -5,7 +5,6 @@ $iconSize = constants['iconSize']
5
5
  $iconPadding = constants['iconPadding']
6
6
  $mobileIconSize = constants['mobileIconSize']
7
7
  $mobileIconPadding = constants['mobileIconPadding']
8
- $color = constants['color'] // hard-coded color, because the component is currently only used in the Home
9
8
 
10
9
  .SquareAppIcon-wrapper
11
10
  box-sizing border-box
@@ -26,30 +25,37 @@ $color = constants['color'] // hard-coded color, because the component is curren
26
25
  padding $iconPadding
27
26
  border-radius rem(12)
28
27
  width 100%
28
+
29
29
  +small-screen()
30
30
  padding $mobileIconPadding
31
+
31
32
  svg, img
32
33
  width 100%
33
34
 
34
35
  .SquareAppIcon-wrapper-ghost
35
36
  .SquareAppIcon-icon-container
36
37
  mix-blend-mode screen
38
+
37
39
  svg, img
38
40
  filter saturate(0%)
41
+
39
42
  .SquareAppIcon-icon-container-normal
40
43
  mix-blend-mode luminosity
44
+
41
45
  svg, img
42
46
  opacity .5
43
47
 
44
48
  .SquareAppIcon-wrapper-maintenance
45
49
  .SquareAppIcon-icon-container
46
50
  mix-blend-mode luminosity
51
+
47
52
  svg, img
48
53
  opacity .5
49
54
 
50
55
  .SquareAppIcon-wrapper-loading
51
56
  border-radius 50%
52
57
  transform scale(0.875)
58
+
53
59
  +small-screen()
54
60
  transform scale(0.8334)
55
61