mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Merge pull request #11596 from strapi/typography-settings-ml
[DS] Typography in Settings/ML
This commit is contained in:
commit
586bc9de0a
File diff suppressed because one or more lines are too long
@ -37,10 +37,812 @@ describe('Upload | SettingsPage', () => {
|
||||
|
||||
afterAll(() => server.close());
|
||||
|
||||
it('renders and matches the snapshot', () => {
|
||||
const { container } = render(App);
|
||||
it('renders and matches the snapshot', async () => {
|
||||
const { container, getByText } = render(App);
|
||||
|
||||
expect(container).toMatchSnapshot();
|
||||
await waitFor(() =>
|
||||
expect(
|
||||
getByText('Automatically rotate image according to EXIF orientation tag')
|
||||
).toBeInTheDocument()
|
||||
);
|
||||
|
||||
expect(container).toMatchInlineSnapshot(`
|
||||
.c41 {
|
||||
border: 0;
|
||||
-webkit-clip: rect(0 0 0 0);
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.c18 {
|
||||
background: #ffffff;
|
||||
padding: 24px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 1px 4px rgba(33,33,52,0.1);
|
||||
}
|
||||
|
||||
.c11 {
|
||||
font-weight: 600;
|
||||
color: #32324d;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.43;
|
||||
}
|
||||
|
||||
.c8 {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.c5 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #dcdce4;
|
||||
position: relative;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.c5 svg {
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.c5 svg > g,
|
||||
.c5 svg path {
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
.c5[aria-disabled='true'] {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.c5:after {
|
||||
-webkit-transition-property: all;
|
||||
transition-property: all;
|
||||
-webkit-transition-duration: 0.2s;
|
||||
transition-duration: 0.2s;
|
||||
border-radius: 8px;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
bottom: -4px;
|
||||
left: -4px;
|
||||
right: -4px;
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
|
||||
.c5:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.c5:focus-visible:after {
|
||||
border-radius: 8px;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
bottom: -5px;
|
||||
left: -5px;
|
||||
right: -5px;
|
||||
border: 2px solid #4945ff;
|
||||
}
|
||||
|
||||
.c9 {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.c6 {
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
padding: 10px 16px;
|
||||
background: #4945ff;
|
||||
border: none;
|
||||
border: 1px solid #4945ff;
|
||||
background: #4945ff;
|
||||
}
|
||||
|
||||
.c6 .c7 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c6 .c10 {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true'] {
|
||||
border: 1px solid #dcdce4;
|
||||
background: #eaeaef;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true'] .c10 {
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true'] svg > g,
|
||||
.c6[aria-disabled='true'] svg path {
|
||||
fill: #666687;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true']:active {
|
||||
border: 1px solid #dcdce4;
|
||||
background: #eaeaef;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true']:active .c10 {
|
||||
color: #666687;
|
||||
}
|
||||
|
||||
.c6[aria-disabled='true']:active svg > g,
|
||||
.c6[aria-disabled='true']:active svg path {
|
||||
fill: #666687;
|
||||
}
|
||||
|
||||
.c6:hover {
|
||||
border: 1px solid #7b79ff;
|
||||
background: #7b79ff;
|
||||
}
|
||||
|
||||
.c6:active {
|
||||
border: 1px solid #4945ff;
|
||||
background: #4945ff;
|
||||
}
|
||||
|
||||
.c20 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c17 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c17 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c19 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c19 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c19 > * + * {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.c27 {
|
||||
font-weight: 600;
|
||||
color: #32324d;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.c36 {
|
||||
font-weight: 600;
|
||||
color: #271fe0;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.c38 {
|
||||
color: #666687;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.c40 {
|
||||
font-weight: 600;
|
||||
color: #b72b1a;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.33;
|
||||
}
|
||||
|
||||
.c30 {
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.c32 {
|
||||
background: #ffffff;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.c34 {
|
||||
background: #f0f0ff;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.c39 {
|
||||
background: #fcecea;
|
||||
padding-right: 32px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.c26 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c25 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.c25 > * {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.c25 > * + * {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.c29 {
|
||||
border: 0;
|
||||
-webkit-clip: rect(0 0 0 0);
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.c28 {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.c31 {
|
||||
height: 2.5rem;
|
||||
border: 1px solid #dcdce4;
|
||||
display: -webkit-inline-box;
|
||||
display: -webkit-inline-flex;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
outline: none;
|
||||
box-shadow: 0;
|
||||
-webkit-transition-property: border-color,box-shadow,fill;
|
||||
transition-property: border-color,box-shadow,fill;
|
||||
-webkit-transition-duration: 0.2s;
|
||||
transition-duration: 0.2s;
|
||||
}
|
||||
|
||||
.c31:focus-within {
|
||||
border: 1px solid #4945ff;
|
||||
box-shadow: #4945ff 0px 0px 0px 2px;
|
||||
}
|
||||
|
||||
.c35 {
|
||||
text-transform: uppercase;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.c33 {
|
||||
text-transform: uppercase;
|
||||
border-right: 1px solid #dcdce4;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.c37 {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
left: 4px;
|
||||
top: 4px;
|
||||
}
|
||||
|
||||
.c24 {
|
||||
width: -webkit-fit-content;
|
||||
width: -moz-fit-content;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.c21 {
|
||||
color: #32324d;
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.c0 {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.c22 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12,1fr);
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.c23 {
|
||||
grid-column: span 6;
|
||||
}
|
||||
|
||||
.c1 {
|
||||
background: #f6f6f9;
|
||||
padding-top: 56px;
|
||||
padding-right: 56px;
|
||||
padding-bottom: 56px;
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
.c13 {
|
||||
padding-right: 56px;
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
.c15 {
|
||||
padding-bottom: 56px;
|
||||
}
|
||||
|
||||
.c14 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.c16 {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.c2 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-box-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c3 {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-align-items: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.c4 {
|
||||
color: #32324d;
|
||||
font-weight: 600;
|
||||
font-size: 2rem;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.c12 {
|
||||
color: #666687;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
@media (max-width:68.75rem) {
|
||||
.c23 {
|
||||
grid-column: span 12;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:34.375rem) {
|
||||
.c23 {
|
||||
grid-column: span;
|
||||
}
|
||||
}
|
||||
|
||||
<div>
|
||||
<main
|
||||
aria-labelledby="main-content-title"
|
||||
class="c0"
|
||||
id="main-content"
|
||||
tabindex="-1"
|
||||
>
|
||||
<form>
|
||||
<div
|
||||
style="height: 0px;"
|
||||
>
|
||||
<div
|
||||
class="c1"
|
||||
data-strapi-header="true"
|
||||
>
|
||||
<div
|
||||
class="c2"
|
||||
>
|
||||
<div
|
||||
class="c3"
|
||||
>
|
||||
<h1
|
||||
class="c4"
|
||||
>
|
||||
Media Library - Settings
|
||||
</h1>
|
||||
</div>
|
||||
<button
|
||||
aria-disabled="true"
|
||||
class="c5 c6"
|
||||
data-testid="save-button"
|
||||
disabled=""
|
||||
type="submit"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c7 c8 c9"
|
||||
>
|
||||
<svg
|
||||
fill="none"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
width="1em"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M20.727 2.97a.2.2 0 01.286 0l2.85 2.89a.2.2 0 010 .28L9.554 20.854a.2.2 0 01-.285 0l-9.13-9.243a.2.2 0 010-.281l2.85-2.892a.2.2 0 01.284 0l6.14 6.209L20.726 2.97z"
|
||||
fill="#212134"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<span
|
||||
class="c10 c11"
|
||||
>
|
||||
Save
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<p
|
||||
class="c12"
|
||||
>
|
||||
Configure the settings for the media library
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c13"
|
||||
>
|
||||
<div
|
||||
class="c14"
|
||||
>
|
||||
<div
|
||||
class="c15 c16"
|
||||
>
|
||||
<div
|
||||
class="c17"
|
||||
>
|
||||
<div
|
||||
class="c18"
|
||||
>
|
||||
<div
|
||||
class="c19"
|
||||
>
|
||||
<div
|
||||
class="c20"
|
||||
>
|
||||
<h2
|
||||
class="c21"
|
||||
>
|
||||
Image
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
class="c22"
|
||||
>
|
||||
<div
|
||||
class="c23"
|
||||
>
|
||||
<div
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
class="c24"
|
||||
>
|
||||
<div
|
||||
class="c25"
|
||||
>
|
||||
<div
|
||||
class="c26"
|
||||
>
|
||||
<label
|
||||
class="c27"
|
||||
for="field-1"
|
||||
>
|
||||
Enable responsive friendly upload
|
||||
</label>
|
||||
</div>
|
||||
<label
|
||||
class="c28"
|
||||
>
|
||||
<div
|
||||
class="c29"
|
||||
>
|
||||
Enable responsive friendly upload
|
||||
</div>
|
||||
<div
|
||||
class="c30 c31"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c32 c26 c33"
|
||||
>
|
||||
<span
|
||||
class="c27"
|
||||
>
|
||||
Off
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c34 c26 c35"
|
||||
>
|
||||
<span
|
||||
class="c36"
|
||||
>
|
||||
On
|
||||
</span>
|
||||
</div>
|
||||
<input
|
||||
aria-label="responsiveDimensions"
|
||||
checked=""
|
||||
class="c37"
|
||||
data-testid="responsiveDimensions"
|
||||
name="responsiveDimensions"
|
||||
type="checkbox"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
<p
|
||||
class="c38"
|
||||
id="field-1-hint"
|
||||
>
|
||||
It automatically generates multiple formats (large, medium, small) of the uploaded asset
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c23"
|
||||
>
|
||||
<div
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
class="c24"
|
||||
>
|
||||
<div
|
||||
class="c25"
|
||||
>
|
||||
<div
|
||||
class="c26"
|
||||
>
|
||||
<label
|
||||
class="c27"
|
||||
for="field-2"
|
||||
>
|
||||
Enable size optimization (without quality loss)
|
||||
</label>
|
||||
</div>
|
||||
<label
|
||||
class="c28"
|
||||
>
|
||||
<div
|
||||
class="c29"
|
||||
>
|
||||
Enable size optimization (without quality loss)
|
||||
</div>
|
||||
<div
|
||||
class="c30 c31"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c39 c26 c33"
|
||||
>
|
||||
<span
|
||||
class="c40"
|
||||
>
|
||||
Off
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c32 c26 c35"
|
||||
>
|
||||
<span
|
||||
class="c27"
|
||||
>
|
||||
On
|
||||
</span>
|
||||
</div>
|
||||
<input
|
||||
aria-label="sizeOptimization"
|
||||
class="c37"
|
||||
data-testid="sizeOptimization"
|
||||
name="sizeOptimization"
|
||||
type="checkbox"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="c23"
|
||||
>
|
||||
<div
|
||||
class=""
|
||||
>
|
||||
<div
|
||||
class="c24"
|
||||
>
|
||||
<div
|
||||
class="c25"
|
||||
>
|
||||
<div
|
||||
class="c26"
|
||||
>
|
||||
<label
|
||||
class="c27"
|
||||
for="field-3"
|
||||
>
|
||||
Enable auto orientation
|
||||
</label>
|
||||
</div>
|
||||
<label
|
||||
class="c28"
|
||||
>
|
||||
<div
|
||||
class="c29"
|
||||
>
|
||||
Enable auto orientation
|
||||
</div>
|
||||
<div
|
||||
class="c30 c31"
|
||||
>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c32 c26 c33"
|
||||
>
|
||||
<span
|
||||
class="c27"
|
||||
>
|
||||
Off
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
aria-hidden="true"
|
||||
class="c34 c26 c35"
|
||||
>
|
||||
<span
|
||||
class="c36"
|
||||
>
|
||||
On
|
||||
</span>
|
||||
</div>
|
||||
<input
|
||||
aria-label="autoOrientation"
|
||||
checked=""
|
||||
class="c37"
|
||||
data-testid="autoOrientation"
|
||||
name="autoOrientation"
|
||||
type="checkbox"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
<p
|
||||
class="c38"
|
||||
id="field-3-hint"
|
||||
>
|
||||
Automatically rotate image according to EXIF orientation tag
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
<div
|
||||
class="c41"
|
||||
>
|
||||
<p
|
||||
aria-live="polite"
|
||||
aria-relevant="all"
|
||||
id="live-region-log"
|
||||
role="log"
|
||||
/>
|
||||
<p
|
||||
aria-live="polite"
|
||||
aria-relevant="all"
|
||||
id="live-region-status"
|
||||
role="status"
|
||||
/>
|
||||
<p
|
||||
aria-live="assertive"
|
||||
aria-relevant="all"
|
||||
id="live-region-alert"
|
||||
role="alert"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
});
|
||||
|
||||
it('should display the form correctly with the initial values', async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user