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
@@ -0,0 +1,136 @@
1
+ @require 'settings/breakpoints.styl'
2
+ constants=json('constants.json', { hash: true })
3
+
4
+ $iconSize = constants['iconSize']
5
+ $iconPadding = constants['iconPadding']
6
+ $mobileIconSize = constants['mobileIconSize']
7
+ $mobileIconPadding = constants['mobileIconPadding']
8
+
9
+ .SquareAppIcon-wrapper
10
+ box-sizing border-box
11
+ background linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.09) 100%), rgba(255, 251, 254, 0.80) // we don't want to be theme responsive
12
+ border-radius 100%
13
+ height $iconSize
14
+ width $iconSize
15
+ transition transform 300ms, border-radius 300ms
16
+
17
+ +small-screen()
18
+ height $mobileIconSize
19
+ width $mobileIconSize
20
+
21
+ .SquareAppIcon-icon-container
22
+ display flex
23
+ align-items center
24
+ justify-content center
25
+ padding $iconPadding
26
+ border-radius 100%
27
+ width 100%
28
+
29
+ +small-screen()
30
+ padding $mobileIconPadding
31
+
32
+ svg, img
33
+ width 100%
34
+
35
+ .SquareAppIcon-wrapper-ghost
36
+ .SquareAppIcon-icon-container
37
+ mix-blend-mode screen
38
+
39
+ svg, img
40
+ filter saturate(0%)
41
+
42
+ .SquareAppIcon-icon-container-normal
43
+ mix-blend-mode luminosity
44
+
45
+ svg, img
46
+ opacity .5
47
+
48
+ .SquareAppIcon-wrapper-maintenance
49
+ .SquareAppIcon-icon-container
50
+ mix-blend-mode luminosity
51
+
52
+ svg, img
53
+ opacity .5
54
+
55
+ .SquareAppIcon-wrapper-loading
56
+ border-radius 50%
57
+ transform scale(0.875)
58
+
59
+ +small-screen()
60
+ transform scale(0.8334)
61
+
62
+ .SquareAppIcon-spinner
63
+ margin 0 !important
64
+
65
+ svg
66
+ position absolute
67
+ height 100%
68
+ width 100%
69
+
70
+ animation-duration = 1.50s
71
+ icon-duration = 0.2s
72
+ icon-start = 0.2s
73
+ border-radius-start = 50%
74
+ border-radius-end = 100%
75
+ opacity-start = 0
76
+ opacity-end = 1
77
+
78
+ .onEnd
79
+ align-items center
80
+ border-radius border-radius-start
81
+ display flex
82
+ height 100%
83
+ opacity opacity-start
84
+ position absolute
85
+ width 100%
86
+ z-index 1
87
+
88
+ svg
89
+ fill transparent !important
90
+
91
+ path
92
+ animation-duration icon-duration !important
93
+
94
+ path:first-of-type
95
+ animation-delay icon-start !important
96
+
97
+ // The second path is a part of the cross,
98
+ // since it has its own hardcoded animation delay we need to add it again (.16s)
99
+ path+path
100
+ animation-delay icon-start + .16s !important
101
+
102
+ *
103
+ stroke var(--white) !important
104
+
105
+ .onEnd.isFailed
106
+ --animationColor var(--errorColor)
107
+
108
+ .onEnd.isSuccess
109
+ --animationColor var(--successColor)
110
+
111
+ .isSuccess
112
+ .isFailed
113
+ animation end-animation animation-duration forwards
114
+
115
+ @keyframes end-animation {
116
+ 0% {
117
+ background-color transparent
118
+ border-radius border-radius-start
119
+ opacity opacity-start
120
+ }
121
+ 13.33% {
122
+ background-color var(--animationColor)
123
+ border-radius border-radius-end
124
+ opacity opacity-end
125
+ }
126
+ 66.67% {
127
+ background-color var(--animationColor)
128
+ border-radius border-radius-end
129
+ opacity opacity-end
130
+ }
131
+ 100% {
132
+ border-radius border-radius-end
133
+ opacity opacity-start
134
+ background-color transparent
135
+ }
136
+ }
@@ -14,6 +14,7 @@ const variants = [
14
14
  'h3',
15
15
  'h4',
16
16
  'h5',
17
+ 'h6',
17
18
  'button',
18
19
  'overline',
19
20
  'subtitle1',
@@ -36,6 +36,7 @@ const DumbCozyTheme = ({
36
36
  value={{
37
37
  type: selfThemeType,
38
38
  variant: selfThemeVariant,
39
+ name: uiThemeName,
39
40
  isLight: selfThemeType === 'light'
40
41
  }}
41
42
  >
@@ -10,7 +10,7 @@ import { isRsg } from '../../hooks/useSetFlagshipUi/helpers'
10
10
  export const CozyThemeContext = createContext()
11
11
 
12
12
  /**
13
- * @returns {{ type: 'light'|'dark', variant: 'normal'|'inverted', isLight: boolean }}
13
+ * @returns {{ type: 'light'|'dark', variant: 'normal'|'inverted', isLight: boolean, name: 'Twake'|'Cozy' }}
14
14
  */
15
15
  export const useCozyTheme = () => {
16
16
  const context = useContext(CozyThemeContext)
@@ -21,7 +21,12 @@ export const useCozyTheme = () => {
21
21
  '`CozyThemeContext` is missing. `useCozyTheme()` must be used within a `<CozyTheme>`. `light normal` is returned as fallback value.'
22
22
  )
23
23
 
24
- return { type: 'light', variant: 'normal', isLight: true }
24
+ return {
25
+ type: 'light',
26
+ variant: 'normal',
27
+ isLight: true,
28
+ name: 'Cozy'
29
+ }
25
30
  }
26
31
 
27
32
  return context
@@ -243,8 +243,6 @@ html,
243
243
  --shadow25 0px 1px 4px alpha($shadowColor, 0.04)
244
244
 
245
245
  .TwakeTheme--light-normal
246
- --primaryFont Inter
247
-
248
246
  --primaryColorLightest paletteTwake.Primary['100']
249
247
  --primaryColorLight paletteTwake.Primary['200']
250
248
  --primaryColor paletteTwake.Primary['600']
@@ -28,7 +28,7 @@
28
28
  },
29
29
 
30
30
  "Error": {
31
- "50": "#fffbf9",
31
+ "50": "#fffbfe",
32
32
  "100": "#fceeee",
33
33
  "200": "#ffd2d7",
34
34
  "300": "#ff939d",