From c546768aa3f2f5a83e3154da23b456c320b11e12 Mon Sep 17 00:00:00 2001 From: soupette Date: Thu, 28 Oct 2021 16:11:11 +0200 Subject: [PATCH] updgrade design system Signed-off-by: soupette --- .../components/EditFieldForm.js | 2 +- packages/core/admin/package.json | 4 +- .../src/components/AttributeIcon/index.js | 2 +- .../tests/__snapshots__/index.test.js.snap | 237 ++++++++----- .../tests/__snapshots__/index.test.js.snap | 4 +- .../PaginationURLQuery/tests/index.test.js | 2 +- packages/core/helper-plugin/package.json | 4 +- .../EditAssetDialog.test.js.snap | 6 +- .../EditAssetDialog/tests/index.test.js | 6 +- .../tests/FromComputerForm.test.js | 4 +- .../tests/PendingAssetStep.test.js | 4 +- .../UploadAssetDialog.test.js.snap | 8 +- .../Roles/CreatePage/tests/index.test.js | 333 ++++++++++++------ .../pages/Roles/EditPage/tests/index.test.js | 333 ++++++++++++------ yarn.lock | 16 +- 15 files changed, 618 insertions(+), 347 deletions(-) diff --git a/packages/core/admin/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js b/packages/core/admin/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js index a799589449..e39d93e5bf 100644 --- a/packages/core/admin/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js +++ b/packages/core/admin/admin/src/content-manager/pages/ListSettingsView/components/EditFieldForm.js @@ -19,7 +19,7 @@ import Date from '@strapi/icons/Date'; import Boolean from '@strapi/icons/Boolean'; import Email from '@strapi/icons/Email'; import Enumeration from '@strapi/icons/Enumeration'; -import Media from '@strapi/icons/Landscape'; +import Media from '@strapi/icons/Media'; import Relation from '@strapi/icons/Relation'; import Text from '@strapi/icons/Text'; import Uid from '@strapi/icons/Uid'; diff --git a/packages/core/admin/package.json b/packages/core/admin/package.json index b17d415b43..e9ffeb488e 100644 --- a/packages/core/admin/package.json +++ b/packages/core/admin/package.json @@ -40,8 +40,8 @@ "@fortawesome/react-fontawesome": "^0.1.14", "@strapi/babel-plugin-switch-ee-ce": "1.0.0", "@strapi/helper-plugin": "3.6.8", - "@strapi/icons": "0.0.1-alpha.53", - "@strapi/design-system": "0.0.1-alpha.53", + "@strapi/icons": "0.0.1-alpha.54", + "@strapi/design-system": "0.0.1-alpha.54", "@strapi/utils": "3.6.8", "axios": "^0.21.1", "babel-loader": "8.2.2", diff --git a/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js b/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js index e15da15fc6..0e1cbea348 100644 --- a/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js +++ b/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js @@ -11,7 +11,7 @@ import Email from '@strapi/icons/Email'; import Enumeration from '@strapi/icons/Enumeration'; import Json from '@strapi/icons/Json'; import LongDescription from '@strapi/icons/RichText'; -import Media from '@strapi/icons/Picture'; +import Media from '@strapi/icons/Media'; import Password from '@strapi/icons/Password'; import Relation from '@strapi/icons/Relation'; import SingleType from '@strapi/icons/SingleType'; diff --git a/packages/core/content-type-builder/admin/src/pages/ListView/tests/__snapshots__/index.test.js.snap b/packages/core/content-type-builder/admin/src/pages/ListView/tests/__snapshots__/index.test.js.snap index a810b012af..940cc7769a 100644 --- a/packages/core/content-type-builder/admin/src/pages/ListView/tests/__snapshots__/index.test.js.snap +++ b/packages/core/content-type-builder/admin/src/pages/ListView/tests/__snapshots__/index.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` renders and matches the snapshot 1`] = ` -.c82 { +.c83 { border: 0; -webkit-clip: rect(0 0 0 0); clip: rect(0 0 0 0); @@ -46,7 +46,11 @@ exports[` renders and matches the snapshot 1`] = ` padding-left: 40px; } -.c71 { +.c63 { + border-radius: borderRadius; +} + +.c72 { background: #d9d8ff; } @@ -556,24 +560,24 @@ exports[` renders and matches the snapshot 1`] = ` margin-left: 4px; } -.c73 { +.c74 { background: #eaeaef; } -.c75 { +.c76 { background: #f0f0ff; padding: 20px; } -.c78 { +.c79 { background: #d9d8ff; } -.c80 { +.c81 { padding-left: 12px; } -.c77 { +.c78 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -587,20 +591,20 @@ exports[` renders and matches the snapshot 1`] = ` align-items: center; } -.c74 { +.c75 { height: 1px; border: none; margin: 0; } -.c81 { +.c82 { font-weight: 500; font-size: 0.75rem; line-height: 1.33; color: #4945ff; } -.c79 { +.c80 { height: 1.5rem; width: 1.5rem; border-radius: 50%; @@ -618,16 +622,16 @@ exports[` renders and matches the snapshot 1`] = ` align-items: center; } -.c79 svg { +.c80 svg { height: 0.625rem; width: 0.625rem; } -.c79 svg path { +.c80 svg path { fill: #4945ff; } -.c76 { +.c77 { border-radius: 0 0 4px 4px; display: block; width: 100%; @@ -669,7 +673,7 @@ exports[` renders and matches the snapshot 1`] = ` color: #4945ff; } -.c66 { +.c67 { font-weight: 500; font-size: 0.75rem; line-height: 1.33; @@ -844,7 +848,7 @@ exports[` renders and matches the snapshot 1`] = ` line-height: 1.5; } -.c65 { +.c66 { width: 2rem !important; height: 2rem !important; padding: 0.5625rem; @@ -852,27 +856,27 @@ exports[` renders and matches the snapshot 1`] = ` background: #eaeaef; } -.c65 path { +.c66 path { fill: #8e8ea9; } -.c68 { +.c69 { position: absolute; display: none; top: 5px; right: 0.5rem; } -.c68 svg { +.c69 svg { width: 0.625rem; height: 0.625rem; } -.c68 svg path { +.c69 svg path { fill: #4945ff; } -.c63 { +.c64 { -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; @@ -896,29 +900,29 @@ exports[` renders and matches the snapshot 1`] = ` align-items: center; } -.c63.active, -.c63:hover { +.c64.active, +.c64:hover { border: 1px solid #d9d8ff; background: #f0f0ff; } -.c63.active .c67, -.c63:hover .c67 { +.c64.active .c68, +.c64:hover .c68 { display: block; } -.c63.active .c64, -.c63:hover .c64 { +.c64.active .c65, +.c64:hover .c65 { background: #d9d8ff; } -.c63.active .c64 path, -.c63:hover .c64 path { +.c64.active .c65 path, +.c64:hover .c65 path { fill: #4945ff; } -.c63.active .c31, -.c63:hover .c31 { +.c64.active .c31, +.c64:hover .c31 { color: #4945ff; } @@ -1013,7 +1017,7 @@ exports[` renders and matches the snapshot 1`] = ` overflow-x: auto; } -.c69 { +.c70 { padding-top: 5.625rem; } @@ -1095,7 +1099,7 @@ exports[` renders and matches the snapshot 1`] = ` fill: #666687; } -.c72 { +.c73 { height: 1.5rem; width: 1.5rem; border-radius: 50%; @@ -1113,12 +1117,12 @@ exports[` renders and matches the snapshot 1`] = ` align-items: center; } -.c72 svg { +.c73 svg { height: 0.625rem; width: 0.625rem; } -.c72 svg path { +.c73 svg path { fill: #4945ff; } @@ -1158,7 +1162,7 @@ exports[` renders and matches the snapshot 1`] = ` fill: #eaeaef; } -.c70 { +.c71 { position: relative; -webkit-flex-shrink: 0; -ms-flex-negative: 0; @@ -1168,7 +1172,7 @@ exports[` renders and matches the snapshot 1`] = ` transform: translate(-0.5px,-1px); } -.c70 * { +.c71 * { fill: #d9d8ff; } @@ -1641,14 +1645,23 @@ exports[` renders and matches the snapshot 1`] = ` class="c38" fill="none" height="1em" - viewBox="0 0 24 24" + viewBox="0 0 32 24" width="1em" xmlns="http://www.w3.org/2000/svg" > + @@ -1740,14 +1753,23 @@ exports[` renders and matches the snapshot 1`] = ` class="c38" fill="none" height="1em" - viewBox="0 0 24 24" + viewBox="0 0 32 24" width="1em" xmlns="http://www.w3.org/2000/svg" > + @@ -3373,7 +3395,7 @@ exports[` renders and matches the snapshot 1`] = ` type="button" >
renders and matches the snapshot 1`] = ` > renders and matches the snapshot 1`] = ` /> Compo
@@ -3424,7 +3446,7 @@ exports[` renders and matches the snapshot 1`] = ` type="button" >
renders and matches the snapshot 1`] = ` > renders and matches the snapshot 1`] = ` /> dish
@@ -3475,7 +3497,7 @@ exports[` renders and matches the snapshot 1`] = ` type="button" >
renders and matches the snapshot 1`] = ` > renders and matches the snapshot 1`] = ` /> openingtimes
@@ -3526,7 +3548,7 @@ exports[` renders and matches the snapshot 1`] = ` type="button" >
renders and matches the snapshot 1`] = ` > renders and matches the snapshot 1`] = ` /> restaurantservice
@@ -3576,7 +3598,7 @@ exports[` renders and matches the snapshot 1`] = `
renders and matches the snapshot 1`] = ` class="c46" > renders and matches the snapshot 1`] = ` class="c46" > renders and matches the snapshot 1`] = ` class="c46" > renders and matches the snapshot 1`] = ` >
{ padding-left: 32px; } - .c61 { + .c67 { background: #eaeaef; padding-top: 24px; padding-right: 32px; @@ -723,99 +723,62 @@ describe('Admin | containers | RoleEditPage', () => { grid-column: span 7; } - .c60 { + .c66 { grid-column: span 5; } - .c54 { + .c59 { font-weight: 500; font-size: 1rem; line-height: 1.25; color: #4a4a6a; } - .c56 { + .c57 { + font-weight: 400; + font-size: 0.75rem; + line-height: 1.33; + color: #4945ff; + } + + .c60 { font-weight: 400; font-size: 0.875rem; line-height: 1.43; color: #666687; } - .c47 { + .c46 { border-radius: 4px; } .c49 { - background: #f6f6f9; - padding: 24px; - border-radius: 4px; + background: #ffffff; + padding-right: 24px; + padding-left: 24px; } .c52 { - padding-right: 24px; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; } - .c58 { + .c62 { background: #dcdce4; - } - - .c59 { - height: 2rem; - width: 2rem; border-radius: 50%; - 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; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; + cursor: pointer; + width: 2rem; + height: 2rem; + cursor: pointer; } - .c59 svg { - height: 0.375rem; + .c64 { + color: #666687; width: 0.6875rem; } - .c59 svg path { - fill: #666687; - } - - .c48 { - border: 1px solid transparent; - overflow: hidden; - } - - .c48:hover { - border: 1px solid #4945ff; - } - - .c48:hover .c53 { - color: #271fe0; - } - - .c48:hover .c55 { - color: #4945ff; - } - - .c48:hover > .c46 { - background: #f0f0ff; - } - - .c48:hover .c57 { - background: #d9d8ff; - } - - .c48:hover .c57 svg path { - fill: #4945ff; - } - - .c51 { + .c50 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -833,13 +796,152 @@ describe('Admin | containers | RoleEditPage', () => { align-items: center; } - .c50 { - border: none; + .c53 { + 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; + } + + .c63 { + 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: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + } + + .c47 { + border: 1px solid #ffffff; + overflow: hidden; + } + + .c47:hover:not([aria-disabled='true']) { + border: 1px solid #4945ff; + } + + .c47:hover:not([aria-disabled='true']) .c58 { + color: #271fe0; + } + + .c47:hover:not([aria-disabled='true']) .c56 { + color: #4945ff; + } + + .c47:hover:not([aria-disabled='true']) > .c48 { + background: #f0f0ff; + } + + .c47:hover:not([aria-disabled='true']) [data-strapi-dropdown='true'] { + background: #d9d8ff; + } + + .c47:hover:not([aria-disabled='true']) svg path { + fill: #4945ff; + } + + .c54 { background: transparent; - display: block; - width: 100%; - text-align: unset; - padding: 0; + border: none; + position: relative; + outline: none; + } + + .c54[aria-disabled='true'] { + pointer-events: none; + } + + .c54[aria-disabled='true'] svg path { + fill: #666687; + } + + .c54 svg { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + font-size: 0.625rem; + } + + .c54 svg path { + fill: #4945ff; + } + + .c54: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; + } + + .c54:focus-visible { + outline: none; + } + + .c54:focus-visible:after { + border-radius: 8px; + content: ''; + position: absolute; + top: -5px; + bottom: -5px; + left: -5px; + right: -5px; + border: 2px solid #4945ff; + } + + .c61 > * { + margin-left: 0; + margin-right: 0; + } + + .c61 > * + * { + margin-left: 12px; + } + + .c65 path { + fill: #666687; + } + + .c55 { + text-align: left; + } + + .c55 svg { + width: 0.875rem; + height: 0.875rem; + } + + .c55 svg path { + fill: #8e8ea9; + } + + .c51 { + height: 5.5rem; } @media (max-width:68.75rem) { @@ -867,13 +969,13 @@ describe('Admin | containers | RoleEditPage', () => { } @media (max-width:68.75rem) { - .c60 { + .c66 { grid-column: span; } } @media (max-width:34.375rem) { - .c60 { + .c66 { grid-column: span; } } @@ -1104,69 +1206,78 @@ describe('Admin | containers | RoleEditPage', () => {

+
+ +