cozy-ui 57.3.1 → 57.5.2
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 +36 -0
- package/package.json +6 -5
- package/react/Icons/WarningCircle.jsx +1 -1
- package/react/MuiCozyTheme/makeOverrides.js +12 -0
- package/react/MuiCozyTheme/makeTheme.js +6 -2
- package/react/SquareAppIcon/Readme.md +2 -2
- package/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap +50 -32
- package/react/SquareAppIcon/index.jsx +50 -9
- package/react/SquareAppIcon/styles.styl +2 -2
- package/react/__snapshots__/examples.spec.jsx.snap +1 -1
- package/scripts/screenshots/parser.js +1 -1
- package/scripts/screenshots.js +0 -3
- package/transpiled/react/Icons/WarningCircle.js +1 -1
- package/transpiled/react/MuiCozyTheme/makeOverrides.js +12 -0
- package/transpiled/react/MuiCozyTheme/makeTheme.js +4 -2
- package/transpiled/react/SquareAppIcon/index.js +42 -12
- package/transpiled/react/stylesheet.css +1 -1
- package/scripts/screenshots/screenshotStackExamples.js +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## [57.5.2](https://github.com/cozy/cozy-ui/compare/v57.5.1...v57.5.2) (2021-11-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Use u-spacellipsis instead of u-ellipsis ([3a4a6c3](https://github.com/cozy/cozy-ui/commit/3a4a6c3))
|
|
7
|
+
|
|
8
|
+
## [57.5.1](https://github.com/cozy/cozy-ui/compare/v57.5.0...v57.5.1) (2021-11-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* Set correct argos batchCount ([8a6179d](https://github.com/cozy/cozy-ui/commit/8a6179d)), closes [cozy/cozy-ui#1917](https://github.com/cozy/cozy-ui/issues/1917)
|
|
14
|
+
|
|
15
|
+
# [57.5.0](https://github.com/cozy/cozy-ui/compare/v57.4.0...v57.5.0) (2021-10-28)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* SquareAppIcon error badge appearance ([b1c0275](https://github.com/cozy/cozy-ui/commit/b1c0275))
|
|
21
|
+
* Various style updates after review ([2d6f829](https://github.com/cozy/cozy-ui/commit/2d6f829))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* Add shadows on SquareAppIcon text and icon background ([5008d63](https://github.com/cozy/cozy-ui/commit/5008d63))
|
|
27
|
+
* Allow more width for the name ([12b280c](https://github.com/cozy/cozy-ui/commit/12b280c))
|
|
28
|
+
* Allow two lines for the name ([64776ea](https://github.com/cozy/cozy-ui/commit/64776ea))
|
|
29
|
+
|
|
30
|
+
# [57.4.0](https://github.com/cozy/cozy-ui/compare/v57.3.1...v57.4.0) (2021-10-19)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Features
|
|
34
|
+
|
|
35
|
+
* Add piwik-react-router package ([e3bd229](https://github.com/cozy/cozy-ui/commit/e3bd229))
|
|
36
|
+
|
|
1
37
|
## [57.3.1](https://github.com/cozy/cozy-ui/compare/v57.3.0...v57.3.1) (2021-10-15)
|
|
2
38
|
|
|
3
39
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-ui",
|
|
3
|
-
"version": "57.
|
|
3
|
+
"version": "57.5.2",
|
|
4
4
|
"description": "Cozy apps UI SDK",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"commitlint-config-cozy": "0.6.0",
|
|
89
89
|
"copyfiles": "2.1.1",
|
|
90
90
|
"cozy-client": "^18.1.2",
|
|
91
|
-
"cozy-device-helper": "1.
|
|
91
|
+
"cozy-device-helper": "1.12.0",
|
|
92
92
|
"cozy-doctypes": "^1.69.0",
|
|
93
93
|
"cozy-harvest-lib": "^6.7.3",
|
|
94
94
|
"cozy-sharing": "^3.10.0",
|
|
95
95
|
"css-loader": "0.28.11",
|
|
96
96
|
"cssnano": "4.1.11",
|
|
97
97
|
"cssnano-preset-advanced": "4.0.7",
|
|
98
|
-
"enzyme": "3.
|
|
98
|
+
"enzyme": "3.11.0",
|
|
99
99
|
"enzyme-adapter-react-16": "1.15.6",
|
|
100
100
|
"enzyme-to-json": "3.6.2",
|
|
101
101
|
"eslint": "4.19.1",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"focus-trap-react": "^6.0.0",
|
|
105
105
|
"git-directory-deploy": "1.5.1",
|
|
106
106
|
"handlebars": "^4.7.6",
|
|
107
|
-
"http-server": "0.
|
|
107
|
+
"http-server": "0.13.0",
|
|
108
108
|
"husky": "0.14.3",
|
|
109
109
|
"identity-obj-proxy": "3.0.0",
|
|
110
110
|
"jest-cli": "^26.6.3",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"mini-css-extract-plugin": "0.6.0",
|
|
117
117
|
"nodemon": "1.19.4",
|
|
118
118
|
"npm-run-all": "4.1.5",
|
|
119
|
+
"piwik-react-router": "0.12.1",
|
|
119
120
|
"postcss-cli": "6.1.3",
|
|
120
121
|
"postcss-loader": "2.1.6",
|
|
121
122
|
"pretty": "2.0.0",
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
"cozy-doctypes": "^1.69.0",
|
|
169
170
|
"cozy-harvest-lib": "^6.7.3",
|
|
170
171
|
"cozy-sharing": "^3.10.0",
|
|
171
|
-
"piwik-react-router": "
|
|
172
|
+
"piwik-react-router": "0.12.1",
|
|
172
173
|
"puppeteer": "^1.20.0",
|
|
173
174
|
"react": "^16.8.6",
|
|
174
175
|
"react-dom": "^16.8.6"
|
|
@@ -6,7 +6,7 @@ function SvgWarningCircle(props) {
|
|
|
6
6
|
<svg viewBox="0 0 16 16" {...props}>
|
|
7
7
|
<path
|
|
8
8
|
fillRule="evenodd"
|
|
9
|
-
d="M8
|
|
9
|
+
d="M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8 9.75C7.30964 9.75 6.75 10.3096 6.75 11C6.75 11.6904 7.30964 12.25 8 12.25C8.69036 12.25 9.25 11.6904 9.25 11C9.25 10.3096 8.69036 9.75 8 9.75ZM8 4C7.48716 4 7.06449 4.38604 7.00673 4.88338L7 5V8C7 8.55228 7.44772 9 8 9C8.51284 9 8.93551 8.61396 8.99327 8.11662L9 8V5C9 4.44772 8.55228 4 8 4Z"
|
|
10
10
|
/>
|
|
11
11
|
</svg>
|
|
12
12
|
)
|
|
@@ -480,6 +480,18 @@ const makeOverrides = theme => ({
|
|
|
480
480
|
fontSize: '.5rem'
|
|
481
481
|
}
|
|
482
482
|
},
|
|
483
|
+
anchorOriginTopRightRectangle: {
|
|
484
|
+
transform: 'scale(1) translate(37%, -37%)'
|
|
485
|
+
},
|
|
486
|
+
anchorOriginBottomRightRectangle: {
|
|
487
|
+
transform: 'scale(1) translate(37%, 37%)'
|
|
488
|
+
},
|
|
489
|
+
anchorOriginBottomLeftRectangle: {
|
|
490
|
+
transform: 'scale(1) translate(-37%, 37%)'
|
|
491
|
+
},
|
|
492
|
+
anchorOriginTopLeftRectangle: {
|
|
493
|
+
transform: 'scale(1) translate(-37%, -37%)'
|
|
494
|
+
},
|
|
483
495
|
dot: {
|
|
484
496
|
borderRadius: '100%',
|
|
485
497
|
padding: 0,
|
|
@@ -25,6 +25,11 @@ const themesCommonConfig = {
|
|
|
25
25
|
zIndex: {
|
|
26
26
|
modal: getCssVariableValue('zIndex-modal')
|
|
27
27
|
},
|
|
28
|
+
textShadows: [
|
|
29
|
+
'none',
|
|
30
|
+
'0px 2px 8px rgba(29, 33, 42, 0.16), 0px 0px 1px rgba(29, 33, 42, 0.48)'
|
|
31
|
+
],
|
|
32
|
+
shadows: makeShadows(), // Shadow ar not linked to themes
|
|
28
33
|
props: {
|
|
29
34
|
MuiTabs: {
|
|
30
35
|
textColor: 'primary',
|
|
@@ -51,8 +56,7 @@ export const makeTheme = type => {
|
|
|
51
56
|
const theme = createMuiTheme({
|
|
52
57
|
...themesCommonConfig,
|
|
53
58
|
typography: makeTypography(palette),
|
|
54
|
-
palette
|
|
55
|
-
shadows: makeShadows()
|
|
59
|
+
palette
|
|
56
60
|
})
|
|
57
61
|
const overrides = makeThemeOverrides(theme)
|
|
58
62
|
|
|
@@ -12,7 +12,7 @@ const theme = useCozyTheme()
|
|
|
12
12
|
;
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
<Grid container spacing={
|
|
15
|
+
<Grid container spacing={1} style={{ background: `center / cover no-repeat url(${cloudWallpaper})` }}
|
|
16
16
|
>
|
|
17
17
|
<Grid item>
|
|
18
18
|
<SquareAppIcon app="testapp" name="Normal" />
|
|
@@ -27,7 +27,7 @@ const theme = useCozyTheme()
|
|
|
27
27
|
<SquareAppIcon name="Add" variant="add" />
|
|
28
28
|
</Grid>
|
|
29
29
|
<Grid item>
|
|
30
|
-
<SquareAppIcon app="testapp" name="
|
|
30
|
+
<SquareAppIcon app="testapp" name="No Account long name very very very very long" variant="ghost" />
|
|
31
31
|
</Grid>
|
|
32
32
|
<Grid item>
|
|
33
33
|
<SquareAppIcon name="Shortcut" variant="shortcut" />
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`SquareAppIcon component should render an app correctly with the app name 1`] = `
|
|
4
4
|
<div
|
|
5
|
+
class="makeStyles-tileWrapper-11"
|
|
5
6
|
data-testid="square-app-icon"
|
|
6
7
|
>
|
|
7
8
|
<span
|
|
8
9
|
class="MuiBadge-root"
|
|
9
10
|
>
|
|
10
11
|
<span
|
|
11
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM"
|
|
12
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM makeStyles-shadow-9"
|
|
12
13
|
>
|
|
13
14
|
<div
|
|
14
15
|
class="styles__SquareAppIcon-icon-container___39MRl"
|
|
@@ -26,15 +27,15 @@ exports[`SquareAppIcon component should render an app correctly with the app nam
|
|
|
26
27
|
</svg>
|
|
27
28
|
</div>
|
|
28
29
|
<span
|
|
29
|
-
class="MuiBadge-badge
|
|
30
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
30
31
|
/>
|
|
31
32
|
</span>
|
|
32
33
|
<span
|
|
33
|
-
class="MuiBadge-badge Component-qualifier-
|
|
34
|
+
class="MuiBadge-badge Component-qualifier-12 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
34
35
|
/>
|
|
35
36
|
</span>
|
|
36
37
|
<h6
|
|
37
|
-
class="MuiTypography-root makeStyles-name-
|
|
38
|
+
class="MuiTypography-root makeStyles-name-7 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
38
39
|
>
|
|
39
40
|
Test
|
|
40
41
|
</h6>
|
|
@@ -43,13 +44,14 @@ exports[`SquareAppIcon component should render an app correctly with the app nam
|
|
|
43
44
|
|
|
44
45
|
exports[`SquareAppIcon component should render an app correctly with the given name 1`] = `
|
|
45
46
|
<div
|
|
47
|
+
class="makeStyles-tileWrapper-5"
|
|
46
48
|
data-testid="square-app-icon"
|
|
47
49
|
>
|
|
48
50
|
<span
|
|
49
51
|
class="MuiBadge-root"
|
|
50
52
|
>
|
|
51
53
|
<span
|
|
52
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM"
|
|
54
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM makeStyles-shadow-3"
|
|
53
55
|
>
|
|
54
56
|
<div
|
|
55
57
|
class="styles__SquareAppIcon-icon-container___39MRl"
|
|
@@ -67,15 +69,15 @@ exports[`SquareAppIcon component should render an app correctly with the given n
|
|
|
67
69
|
</svg>
|
|
68
70
|
</div>
|
|
69
71
|
<span
|
|
70
|
-
class="MuiBadge-badge
|
|
72
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
71
73
|
/>
|
|
72
74
|
</span>
|
|
73
75
|
<span
|
|
74
|
-
class="MuiBadge-badge Component-qualifier-
|
|
76
|
+
class="MuiBadge-badge Component-qualifier-6 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
75
77
|
/>
|
|
76
78
|
</span>
|
|
77
79
|
<h6
|
|
78
|
-
class="MuiTypography-root makeStyles-name-1
|
|
80
|
+
class="MuiTypography-root makeStyles-name-1 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
79
81
|
>
|
|
80
82
|
modified
|
|
81
83
|
</h6>
|
|
@@ -84,13 +86,14 @@ exports[`SquareAppIcon component should render an app correctly with the given n
|
|
|
84
86
|
|
|
85
87
|
exports[`SquareAppIcon component should render an app with the app slug if no name prop and app is a string 1`] = `
|
|
86
88
|
<div
|
|
89
|
+
class="makeStyles-tileWrapper-17"
|
|
87
90
|
data-testid="square-app-icon"
|
|
88
91
|
>
|
|
89
92
|
<span
|
|
90
93
|
class="MuiBadge-root"
|
|
91
94
|
>
|
|
92
95
|
<span
|
|
93
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM"
|
|
96
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM makeStyles-shadow-15"
|
|
94
97
|
>
|
|
95
98
|
<div
|
|
96
99
|
class="styles__SquareAppIcon-icon-container___39MRl"
|
|
@@ -108,15 +111,15 @@ exports[`SquareAppIcon component should render an app with the app slug if no na
|
|
|
108
111
|
</svg>
|
|
109
112
|
</div>
|
|
110
113
|
<span
|
|
111
|
-
class="MuiBadge-badge
|
|
114
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
112
115
|
/>
|
|
113
116
|
</span>
|
|
114
117
|
<span
|
|
115
|
-
class="MuiBadge-badge Component-qualifier-
|
|
118
|
+
class="MuiBadge-badge Component-qualifier-18 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
116
119
|
/>
|
|
117
120
|
</span>
|
|
118
121
|
<h6
|
|
119
|
-
class="MuiTypography-root makeStyles-name-
|
|
122
|
+
class="MuiTypography-root makeStyles-name-13 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
120
123
|
>
|
|
121
124
|
testslug
|
|
122
125
|
</h6>
|
|
@@ -125,6 +128,7 @@ exports[`SquareAppIcon component should render an app with the app slug if no na
|
|
|
125
128
|
|
|
126
129
|
exports[`SquareAppIcon component should render correctly an app in add state 1`] = `
|
|
127
130
|
<div
|
|
131
|
+
class="makeStyles-tileWrapper-41"
|
|
128
132
|
data-testid="square-app-icon"
|
|
129
133
|
>
|
|
130
134
|
<span
|
|
@@ -156,28 +160,29 @@ exports[`SquareAppIcon component should render correctly an app in add state 1`]
|
|
|
156
160
|
</svg>
|
|
157
161
|
</div>
|
|
158
162
|
<span
|
|
159
|
-
class="MuiBadge-badge
|
|
163
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
160
164
|
/>
|
|
161
165
|
</span>
|
|
162
166
|
<span
|
|
163
|
-
class="MuiBadge-badge Component-qualifier-
|
|
167
|
+
class="MuiBadge-badge Component-qualifier-42 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
164
168
|
/>
|
|
165
169
|
</span>
|
|
166
170
|
<h6
|
|
167
|
-
class="MuiTypography-root makeStyles-name-
|
|
171
|
+
class="MuiTypography-root makeStyles-name-37 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
168
172
|
/>
|
|
169
173
|
</div>
|
|
170
174
|
`;
|
|
171
175
|
|
|
172
176
|
exports[`SquareAppIcon component should render correctly an app in error state 1`] = `
|
|
173
177
|
<div
|
|
178
|
+
class="makeStyles-tileWrapper-35"
|
|
174
179
|
data-testid="square-app-icon"
|
|
175
180
|
>
|
|
176
181
|
<span
|
|
177
182
|
class="MuiBadge-root"
|
|
178
183
|
>
|
|
179
184
|
<span
|
|
180
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM"
|
|
185
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM makeStyles-shadow-33"
|
|
181
186
|
>
|
|
182
187
|
<div
|
|
183
188
|
class="styles__SquareAppIcon-icon-container___39MRl"
|
|
@@ -195,17 +200,27 @@ exports[`SquareAppIcon component should render correctly an app in error state 1
|
|
|
195
200
|
</svg>
|
|
196
201
|
</div>
|
|
197
202
|
<span
|
|
198
|
-
class="MuiBadge-badge
|
|
203
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle MuiBadge-colorError"
|
|
199
204
|
>
|
|
200
|
-
|
|
205
|
+
<svg
|
|
206
|
+
class="makeStyles-errorIcon-34 styles__icon___23x3R"
|
|
207
|
+
height="16"
|
|
208
|
+
viewBox="0 0 16 16"
|
|
209
|
+
width="16"
|
|
210
|
+
>
|
|
211
|
+
<path
|
|
212
|
+
d="M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8 9.75C7.30964 9.75 6.75 10.3096 6.75 11C6.75 11.6904 7.30964 12.25 8 12.25C8.69036 12.25 9.25 11.6904 9.25 11C9.25 10.3096 8.69036 9.75 8 9.75ZM8 4C7.48716 4 7.06449 4.38604 7.00673 4.88338L7 5V8C7 8.55228 7.44772 9 8 9C8.51284 9 8.93551 8.61396 8.99327 8.11662L9 8V5C9 4.44772 8.55228 4 8 4Z"
|
|
213
|
+
fill-rule="evenodd"
|
|
214
|
+
/>
|
|
215
|
+
</svg>
|
|
201
216
|
</span>
|
|
202
217
|
</span>
|
|
203
218
|
<span
|
|
204
|
-
class="MuiBadge-badge Component-qualifier-
|
|
219
|
+
class="MuiBadge-badge Component-qualifier-36 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
205
220
|
/>
|
|
206
221
|
</span>
|
|
207
222
|
<h6
|
|
208
|
-
class="MuiTypography-root makeStyles-name-
|
|
223
|
+
class="MuiTypography-root makeStyles-name-31 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
209
224
|
>
|
|
210
225
|
Test
|
|
211
226
|
</h6>
|
|
@@ -214,6 +229,7 @@ exports[`SquareAppIcon component should render correctly an app in error state 1
|
|
|
214
229
|
|
|
215
230
|
exports[`SquareAppIcon component should render correctly an app in ghost state 1`] = `
|
|
216
231
|
<div
|
|
232
|
+
class="makeStyles-tileWrapper-29"
|
|
217
233
|
data-testid="square-app-icon"
|
|
218
234
|
>
|
|
219
235
|
<span
|
|
@@ -238,15 +254,15 @@ exports[`SquareAppIcon component should render correctly an app in ghost state 1
|
|
|
238
254
|
</svg>
|
|
239
255
|
</div>
|
|
240
256
|
<span
|
|
241
|
-
class="MuiBadge-badge
|
|
257
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
242
258
|
/>
|
|
243
259
|
</span>
|
|
244
260
|
<span
|
|
245
|
-
class="MuiBadge-badge Component-qualifier-
|
|
261
|
+
class="MuiBadge-badge Component-qualifier-30 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
246
262
|
/>
|
|
247
263
|
</span>
|
|
248
264
|
<h6
|
|
249
|
-
class="MuiTypography-root makeStyles-name-
|
|
265
|
+
class="MuiTypography-root makeStyles-name-25 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
250
266
|
>
|
|
251
267
|
Test
|
|
252
268
|
</h6>
|
|
@@ -255,13 +271,14 @@ exports[`SquareAppIcon component should render correctly an app in ghost state 1
|
|
|
255
271
|
|
|
256
272
|
exports[`SquareAppIcon component should render correctly an app in maintenance state 1`] = `
|
|
257
273
|
<div
|
|
274
|
+
class="makeStyles-tileWrapper-23"
|
|
258
275
|
data-testid="square-app-icon"
|
|
259
276
|
>
|
|
260
277
|
<span
|
|
261
278
|
class="MuiBadge-root"
|
|
262
279
|
>
|
|
263
280
|
<span
|
|
264
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM styles__SquareAppIcon-wrapper-maintenance___2ne2n"
|
|
281
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM styles__SquareAppIcon-wrapper-maintenance___2ne2n makeStyles-shadow-21"
|
|
265
282
|
>
|
|
266
283
|
<div
|
|
267
284
|
class="styles__SquareAppIcon-icon-container___39MRl"
|
|
@@ -279,15 +296,15 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s
|
|
|
279
296
|
</svg>
|
|
280
297
|
</div>
|
|
281
298
|
<span
|
|
282
|
-
class="MuiBadge-badge
|
|
299
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
283
300
|
/>
|
|
284
301
|
</span>
|
|
285
302
|
<span
|
|
286
|
-
class="MuiBadge-badge Component-qualifier-
|
|
303
|
+
class="MuiBadge-badge Component-qualifier-24 MuiBadge-anchorOriginBottomRightRectangle MuiBadge-invisible"
|
|
287
304
|
/>
|
|
288
305
|
</span>
|
|
289
306
|
<h6
|
|
290
|
-
class="MuiTypography-root makeStyles-name-
|
|
307
|
+
class="MuiTypography-root makeStyles-name-19 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
291
308
|
>
|
|
292
309
|
Test
|
|
293
310
|
</h6>
|
|
@@ -296,26 +313,27 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s
|
|
|
296
313
|
|
|
297
314
|
exports[`SquareAppIcon component should render correctly an app in shortcut state 1`] = `
|
|
298
315
|
<div
|
|
316
|
+
class="makeStyles-tileWrapper-47"
|
|
299
317
|
data-testid="square-app-icon"
|
|
300
318
|
>
|
|
301
319
|
<span
|
|
302
320
|
class="MuiBadge-root"
|
|
303
321
|
>
|
|
304
322
|
<span
|
|
305
|
-
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM"
|
|
323
|
+
class="MuiBadge-root styles__SquareAppIcon-wrapper___2SEuM makeStyles-shadow-45"
|
|
306
324
|
style="background-color: rgb(61, 166, 126);"
|
|
307
325
|
>
|
|
308
326
|
<h2
|
|
309
|
-
class="MuiTypography-root makeStyles-letter-
|
|
327
|
+
class="MuiTypography-root makeStyles-letter-44 MuiTypography-h2 MuiTypography-alignCenter"
|
|
310
328
|
>
|
|
311
329
|
S
|
|
312
330
|
</h2>
|
|
313
331
|
<span
|
|
314
|
-
class="MuiBadge-badge
|
|
332
|
+
class="MuiBadge-badge badgeSizeLarge MuiBadge-anchorOriginTopRightRectangle"
|
|
315
333
|
/>
|
|
316
334
|
</span>
|
|
317
335
|
<span
|
|
318
|
-
class="MuiBadge-badge Component-qualifier-
|
|
336
|
+
class="MuiBadge-badge Component-qualifier-48 MuiBadge-anchorOriginBottomRightRectangle"
|
|
319
337
|
>
|
|
320
338
|
<svg
|
|
321
339
|
class="styles__icon___23x3R"
|
|
@@ -331,7 +349,7 @@ exports[`SquareAppIcon component should render correctly an app in shortcut stat
|
|
|
331
349
|
</span>
|
|
332
350
|
</span>
|
|
333
351
|
<h6
|
|
334
|
-
class="MuiTypography-root makeStyles-name-
|
|
352
|
+
class="MuiTypography-root makeStyles-name-43 u-spacellipsis MuiTypography-h6 MuiTypography-alignCenter"
|
|
335
353
|
>
|
|
336
354
|
shortcut
|
|
337
355
|
</h6>
|
|
@@ -11,28 +11,53 @@ import Typography from '../Typography'
|
|
|
11
11
|
import { AppDoctype } from '../proptypes'
|
|
12
12
|
import Icon from '../Icon'
|
|
13
13
|
import iconPlus from '../Icons/Plus'
|
|
14
|
+
import iconWarning from '../Icons/WarningCircle'
|
|
14
15
|
import iconOut from '../Icons/LinkOut'
|
|
15
16
|
|
|
16
|
-
import {
|
|
17
|
+
import { color } from './constants.json'
|
|
17
18
|
import styles from './styles.styl'
|
|
18
19
|
|
|
19
20
|
const useStyles = makeStyles(theme => ({
|
|
20
21
|
name: {
|
|
21
22
|
color,
|
|
22
|
-
|
|
23
|
+
width: '5.5rem',
|
|
24
|
+
textAlign: 'center',
|
|
23
25
|
fontSize: '0.875rem',
|
|
24
26
|
lineHeight: '1.188rem',
|
|
25
|
-
|
|
27
|
+
margin: '0.5rem 0.25rem 0 0.25rem',
|
|
28
|
+
textShadow: theme.textShadows[1],
|
|
29
|
+
lineClamp: '2',
|
|
30
|
+
boxOrient: 'vertical',
|
|
31
|
+
display: '-webkit-box',
|
|
32
|
+
height: '2.375rem',
|
|
26
33
|
[theme.breakpoints.down('sm')]: {
|
|
27
|
-
|
|
34
|
+
width: '3.75rem',
|
|
28
35
|
fontSize: '0.6875rem',
|
|
29
36
|
lineHeight: '1rem',
|
|
30
|
-
|
|
37
|
+
margin: '0.25rem 0.25rem 0 0.25rem',
|
|
38
|
+
height: '2rem'
|
|
31
39
|
}
|
|
32
40
|
},
|
|
33
41
|
letter: {
|
|
34
42
|
color,
|
|
35
43
|
margin: 'auto'
|
|
44
|
+
},
|
|
45
|
+
shadow: {
|
|
46
|
+
boxShadow: theme.shadows[2]
|
|
47
|
+
},
|
|
48
|
+
errorIcon: {
|
|
49
|
+
fill: 'var(--errorColor)',
|
|
50
|
+
backgroundColor: 'var(--primaryContrastTextColor)',
|
|
51
|
+
borderRadius: '1rem'
|
|
52
|
+
},
|
|
53
|
+
tileWrapper: {
|
|
54
|
+
display: 'flex',
|
|
55
|
+
flexDirection: 'column',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
width: '6rem',
|
|
58
|
+
[theme.breakpoints.down('sm')]: {
|
|
59
|
+
width: '4.25rem'
|
|
60
|
+
}
|
|
36
61
|
}
|
|
37
62
|
}))
|
|
38
63
|
|
|
@@ -42,7 +67,7 @@ export const SquareAppIcon = ({ app, name, variant }) => {
|
|
|
42
67
|
const letter = appName[0] || ''
|
|
43
68
|
|
|
44
69
|
return (
|
|
45
|
-
<div data-testid="square-app-icon">
|
|
70
|
+
<div data-testid="square-app-icon" className={cx(classes.tileWrapper)}>
|
|
46
71
|
<InfosBadge
|
|
47
72
|
badgeContent={
|
|
48
73
|
variant === 'shortcut' ? <Icon size="10" icon={iconOut} /> : null
|
|
@@ -58,12 +83,24 @@ export const SquareAppIcon = ({ app, name, variant }) => {
|
|
|
58
83
|
[`${styles['SquareAppIcon-wrapper-fx']}`]: [
|
|
59
84
|
'ghost',
|
|
60
85
|
'add'
|
|
61
|
-
].includes(variant)
|
|
86
|
+
].includes(variant),
|
|
87
|
+
[classes.shadow]: !['add', 'ghost'].includes(variant)
|
|
62
88
|
}
|
|
63
89
|
)}
|
|
64
|
-
badgeContent={
|
|
90
|
+
badgeContent={
|
|
91
|
+
variant === 'error' ? (
|
|
92
|
+
<Icon
|
|
93
|
+
size="16"
|
|
94
|
+
className={cx(classes.errorIcon)}
|
|
95
|
+
icon={iconWarning}
|
|
96
|
+
/>
|
|
97
|
+
) : (
|
|
98
|
+
''
|
|
99
|
+
)
|
|
100
|
+
}
|
|
65
101
|
color={variant === 'error' ? 'error' : undefined}
|
|
66
102
|
withBorder={false}
|
|
103
|
+
size="large"
|
|
67
104
|
overlap="rectangle"
|
|
68
105
|
style={
|
|
69
106
|
variant === 'shortcut'
|
|
@@ -86,7 +123,11 @@ export const SquareAppIcon = ({ app, name, variant }) => {
|
|
|
86
123
|
)}
|
|
87
124
|
</Badge>
|
|
88
125
|
</InfosBadge>
|
|
89
|
-
<Typography
|
|
126
|
+
<Typography
|
|
127
|
+
className={cx(classes.name, 'u-spacellipsis')}
|
|
128
|
+
variant="h6"
|
|
129
|
+
align="center"
|
|
130
|
+
>
|
|
90
131
|
{appName}
|
|
91
132
|
</Typography>
|
|
92
133
|
</div>
|
|
@@ -9,7 +9,7 @@ $color = constants['color'] // hard-coded color, because the component is curren
|
|
|
9
9
|
|
|
10
10
|
.SquareAppIcon-wrapper
|
|
11
11
|
box-sizing border-box
|
|
12
|
-
background-color var(--
|
|
12
|
+
background-color var(--paperBackgroundColor)
|
|
13
13
|
border-radius rem(12)
|
|
14
14
|
height $iconSize
|
|
15
15
|
width $iconSize
|
|
@@ -39,7 +39,7 @@ $color = constants['color'] // hard-coded color, because the component is curren
|
|
|
39
39
|
|
|
40
40
|
.SquareAppIcon-wrapper-ghost
|
|
41
41
|
.SquareAppIcon-icon-container
|
|
42
|
-
mix-blend-mode
|
|
42
|
+
mix-blend-mode screen // need to apply backdrop-filter and mix blend-mode in a separated element to have the proper effect
|
|
43
43
|
svg, img
|
|
44
44
|
filter saturate(0%)
|
|
45
45
|
|
|
@@ -3727,7 +3727,7 @@ exports[`Icon should render examples: Icon 1`] = `
|
|
|
3727
3727
|
<p class=\\"MuiTypography-root u-mt-half MuiTypography-body1\\">Warning</p>
|
|
3728
3728
|
</div>
|
|
3729
3729
|
<div class=\\"makeStyles-iconTile-16 u-ta-center u-mb-1\\"><svg viewBox=\\"0 0 16 16\\" class=\\"styles__icon___23x3R\\" width=\\"16\\" height=\\"16\\">
|
|
3730
|
-
<path fill-rule=\\"evenodd\\" d=\\"M8
|
|
3730
|
+
<path fill-rule=\\"evenodd\\" d=\\"M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8 9.75C7.30964 9.75 6.75 10.3096 6.75 11C6.75 11.6904 7.30964 12.25 8 12.25C8.69036 12.25 9.25 11.6904 9.25 11C9.25 10.3096 8.69036 9.75 8 9.75ZM8 4C7.48716 4 7.06449 4.38604 7.00673 4.88338L7 5V8C7 8.55228 7.44772 9 8 9C8.51284 9 8.93551 8.61396 8.99327 8.11662L9 8V5C9 4.44772 8.55228 4 8 4Z\\"></path>
|
|
3731
3731
|
</svg>
|
|
3732
3732
|
<p class=\\"MuiTypography-root u-mt-half MuiTypography-body1\\">WarningCircle</p>
|
|
3733
3733
|
</div>
|
package/scripts/screenshots.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const { prepareFS, prepareBrowser } = require('./screenshots/prepares')
|
|
4
4
|
const screenshotReactStyleguide = require('./screenshots/screenshotReactStyleguide')
|
|
5
|
-
const screenshotStackExamples = require('./screenshots/screenshotStackExamples')
|
|
6
5
|
const screenshotKSSStyleguide = require('./screenshots/screenshotKSSStyleguide')
|
|
7
6
|
const makeParser = require('./screenshots/parser')
|
|
8
7
|
const { readConfig, parseViewportArgument } = require('./screenshots/helpers')
|
|
@@ -38,8 +37,6 @@ const main = async () => {
|
|
|
38
37
|
|
|
39
38
|
if (args.mode == 'react') {
|
|
40
39
|
await screenshotReactStyleguide(page, args, config)
|
|
41
|
-
} else if (args.mode == 'stack') {
|
|
42
|
-
await screenshotStackExamples(page, args)
|
|
43
40
|
} else if (args.mode == 'kss') {
|
|
44
41
|
await screenshotKSSStyleguide(page, args)
|
|
45
42
|
}
|
|
@@ -7,7 +7,7 @@ function SvgWarningCircle(props) {
|
|
|
7
7
|
viewBox: "0 0 16 16"
|
|
8
8
|
}, props), React.createElement("path", {
|
|
9
9
|
fillRule: "evenodd",
|
|
10
|
-
d: "M8
|
|
10
|
+
d: "M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8 9.75C7.30964 9.75 6.75 10.3096 6.75 11C6.75 11.6904 7.30964 12.25 8 12.25C8.69036 12.25 9.25 11.6904 9.25 11C9.25 10.3096 8.69036 9.75 8 9.75ZM8 4C7.48716 4 7.06449 4.38604 7.00673 4.88338L7 5V8C7 8.55228 7.44772 9 8 9C8.51284 9 8.93551 8.61396 8.99327 8.11662L9 8V5C9 4.44772 8.55228 4 8 4Z"
|
|
11
11
|
}));
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -457,6 +457,18 @@ var makeOverrides = function makeOverrides(theme) {
|
|
|
457
457
|
fontSize: '.5rem'
|
|
458
458
|
}
|
|
459
459
|
},
|
|
460
|
+
anchorOriginTopRightRectangle: {
|
|
461
|
+
transform: 'scale(1) translate(37%, -37%)'
|
|
462
|
+
},
|
|
463
|
+
anchorOriginBottomRightRectangle: {
|
|
464
|
+
transform: 'scale(1) translate(37%, 37%)'
|
|
465
|
+
},
|
|
466
|
+
anchorOriginBottomLeftRectangle: {
|
|
467
|
+
transform: 'scale(1) translate(-37%, 37%)'
|
|
468
|
+
},
|
|
469
|
+
anchorOriginTopLeftRectangle: {
|
|
470
|
+
transform: 'scale(1) translate(-37%, -37%)'
|
|
471
|
+
},
|
|
460
472
|
dot: {
|
|
461
473
|
borderRadius: '100%',
|
|
462
474
|
padding: 0,
|
|
@@ -25,6 +25,9 @@ var themesCommonConfig = _objectSpread({
|
|
|
25
25
|
zIndex: {
|
|
26
26
|
modal: getCssVariableValue('zIndex-modal')
|
|
27
27
|
},
|
|
28
|
+
textShadows: ['none', '0px 2px 8px rgba(29, 33, 42, 0.16), 0px 0px 1px rgba(29, 33, 42, 0.48)'],
|
|
29
|
+
shadows: makeShadows(),
|
|
30
|
+
// Shadow ar not linked to themes
|
|
28
31
|
props: {
|
|
29
32
|
MuiTabs: {
|
|
30
33
|
textColor: 'primary',
|
|
@@ -57,8 +60,7 @@ export var makeTheme = function makeTheme(type) {
|
|
|
57
60
|
var palette = makePalette(type);
|
|
58
61
|
var theme = createMuiTheme(_objectSpread({}, themesCommonConfig, {
|
|
59
62
|
typography: makeTypography(palette),
|
|
60
|
-
palette: palette
|
|
61
|
-
shadows: makeShadows()
|
|
63
|
+
palette: palette
|
|
62
64
|
}));
|
|
63
65
|
var overrides = makeThemeOverrides(theme);
|
|
64
66
|
return _objectSpread({}, theme, {
|